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); }
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); }