Beispiel #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));
        }
Beispiel #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));
        }
 /// <returns>Returns an identity rate: a rate of one.</returns>
 public ExchangeRate Get(CurrencyIsoCode from, CurrencyIsoCode to)
 {
     return(ExchangeRate.Identity(from, to));
 }