public void UpdateValuesBy_NullArgument_ShouldNotUpdateItsFields()
        {
            const decimal bid = 77;
            const decimal ask = 79;
            CurrencyPair currencyPair = new CurrencyPair("USD/RUB", bid, ask);

            currencyPair.UpdateValuesBy(null);

            Assert.That(currencyPair.Bid, Is.EqualTo(bid));
            Assert.That(currencyPair.Ask, Is.EqualTo(ask));
        }
        public void UpdateValuesBy_PassingSameCurrencyPairArgument_ShouldUpdateItsFields()
        {
            const decimal bid = 77;
            const decimal ask = 79;
            CurrencyPair mainCurrencyPair = new CurrencyPair("USD/RUB");
            CurrencyPair sourceCurrencyPair = new CurrencyPair("USD/RUB", bid, ask);
            
            mainCurrencyPair.UpdateValuesBy(sourceCurrencyPair);

            Assert.That(mainCurrencyPair.Bid, Is.EqualTo(bid));
            Assert.That(mainCurrencyPair.Ask, Is.EqualTo(ask));
        }
        public void UpdateValuesBy_PassingOtherCurrencyPairArgument_ShouldThrowArgumentException()
        {
            const decimal bid = 87;
            const decimal ask = 89;
            CurrencyPair mainCurrencyPair = new CurrencyPair("USD/RUB");
            CurrencyPair sourceCurrencyPair = new CurrencyPair("EUR/RUB", bid, ask);

            Assert.Throws(typeof(ArgumentException), () => mainCurrencyPair.UpdateValuesBy(sourceCurrencyPair));
        }
        public void UpdateValuesBy_NullArgument_DoesNotThrowAnException()
        {
            CurrencyPair currencyPair = new CurrencyPair("USD/RUB");

            Assert.DoesNotThrow(() => currencyPair.UpdateValuesBy(null));
        }