Esempio n. 1
0
        public void Given_OneUnknownConfiguredCurrencyWithMore_When_GetConfiguredLatestAsyncInvoked_Then_ActionResponseWithConfiguredAndBaseExchangeRatesAndErrorsRetrived()
        {
            _serviceUnderTest = ExchangeRateTestHelper.CreateMockService(false);

            var result = _serviceUnderTest.GetConfiguredLatestAsync().Result;

            Assert.IsNotNull(result);
            Assert.IsTrue(result.SelectMany(x => x.Value.ExchangeRates).All(x => x.To == ExchangeRateTestHelper.GetMockedConfiguredCurrencyBase()));
        }
Esempio n. 2
0
        public void Given_OneUnknownConfiguredCurrencyWithMoreAndDates_When_GetGetConfiguredHistoricalAsyncInvoked_Then_ActionResponseWithConfiguredAndBaseExchangeRatesRetrived()
        {
            _serviceUnderTest = ExchangeRateTestHelper.CreateMockService(false);
            DateTime beginDate = new DateTime(2018, 1, 1), endDate = new DateTime(2018, 1, 7);

            var result = _serviceUnderTest.GetConfiguredHistoricalAsync(beginDate, endDate).Result;

            Assert.IsNotNull(result);
        }
Esempio n. 3
0
 public void TestInitialize()
 {
     _serviceUnderTest = ExchangeRateTestHelper.CreateMockService(true);
 }