Пример #1
0
        public void Identity_SingleCurrency_BuildsAnIdentityRateForItself()
        {
            var identity = ExchangeRate.Identity(CurrencyIsoCode.EUR);

            Assert.That(identity.From, Is.EqualTo(CurrencyIsoCode.EUR));
            Assert.That(identity.To, Is.EqualTo(CurrencyIsoCode.EUR));
            Assert.That(identity.Rate, Is.EqualTo(1m));
        }
Пример #2
0
        public void Identity_TwoCurrencies_BuildsAnIdentityRate()
        {
            var identity = ExchangeRate.Identity(CurrencyIsoCode.EUR, CurrencyIsoCode.USD);

            Assert.That(identity.From, Is.EqualTo(CurrencyIsoCode.EUR));
            Assert.That(identity.To, Is.EqualTo(CurrencyIsoCode.USD));
            Assert.That(identity.Rate, Is.EqualTo(1m));
        }
Пример #3
0
 /// <returns>Returns an identity rate: a rate of one.</returns>
 public ExchangeRate Get(CurrencyIsoCode from, CurrencyIsoCode to)
 {
     return(ExchangeRate.Identity(from, to));
 }