Пример #1
0
        public async Task UnknownCurrencyTarget()
        {
            var currencyLayerProvider = new CurrencyLayerProvider();

            var currencySource = "BRL";
            var currencyQuotes = new List <string>()
            {
                "BlaBla"
            };

            QuoteException quoteException = await Assert.ThrowsAsync <QuoteException>(() => currencyLayerProvider.GetCurrencyValues(currencySource, currencyQuotes));

            Assert.Equal(202, quoteException.ErrorCode);
        }
Пример #2
0
        public async Task UnknownCurrencySource()
        {
            var currencyLayerProvider = new CurrencyLayerProvider();

            var wrongCurrencySource = "EDU";
            var currencyQuotes      = new List <string>()
            {
                "USD", "AUD", "CAD", "PLN", "MXN"
            };

            QuoteException quoteException = await Assert.ThrowsAsync <QuoteException>(() => currencyLayerProvider.GetCurrencyValues(wrongCurrencySource, currencyQuotes));

            Assert.Equal(201, quoteException.ErrorCode);
        }