public void Test_When_MoneyCurrencyIsNotDKK_ItReturnsCorrectExchangeRate() { var mocks = new MockRepository(MockBehavior.Default); var logger = mocks.Create <ILogger>(); var retriever = new ExchangeRateRetriever(new HardCodedExchangeRateStore(), logger.Object); Assert.AreEqual(EURUSD, retriever.ExchangeRate(MainCurrency, MoneyCurrency)); }
public void Test_When_MainOrMoneyCurrencyIsNotInStore_ItThrowsArgumentException() { var mocks = new MockRepository(MockBehavior.Default); var logger = mocks.Create <ILogger>(); var retriever = new ExchangeRateRetriever(new HardCodedExchangeRateStore(), logger.Object); var d = retriever.ExchangeRate("ARS", DKK); }
public void Test_When_MainCurrencyAndMoneyCurrencyAreTheSame_ItReturnsOne() { var mocks = new MockRepository(MockBehavior.Default); var exchageRateStore = mocks.Create <IExchangeRateStore>(); var logger = mocks.Create <ILogger>(); var retriever = new ExchangeRateRetriever(exchageRateStore.Object, logger.Object); Assert.AreEqual(1.0, retriever.ExchangeRate(MainCurrency, MainCurrency)); }