public async Task GetCurrencyLiveRates_InvokeExpectedMethod() { var provider = new Mock <IExchangeRateProvider>(); provider.Setup(c => c.SystemName).Returns("sysname"); _settings.ActiveExchangeRateProviderSystemName = "sysname"; var exchangeRateService = new ExchangeRateService(new List <IExchangeRateProvider>() { provider.Object }, _settings); await exchangeRateService.GetCurrencyLiveRates("rate"); provider.Verify(c => c.GetCurrencyLiveRates(It.IsAny <string>()), Times.Once); }