public MusicArtistFilterServiceTests(TestsInitializer testsInitializer) { _testsInitializer = testsInitializer; _musicSearchConfig = new MusicSearchConfig { MinConfidenceForArtistFilter = 80 }; _service = new MusicArtistFilterService(_musicSearchConfig); }
public MusicSearchApiClientTests(TestsInitializer testsInitializer) { _httpClientHandler = new Mock <HttpClientHandler>(); _httpClient = new HttpClient(_httpClientHandler.Object); _testsInitializer = testsInitializer; _musicSearchConfig = new MusicSearchConfig { ApplicationId = "someappid", MinConfidenceForArtistFilter = 80, Url = "https://www.coles.com.au" }; _service = new MusicSearchApiClient(_httpClient, _musicSearchConfig, Mock.Of <ILogger <MusicSearchApiClient> >()); }
public MusicSearchApiClient(HttpClient httpClient, MusicSearchConfig musicSearchConfig, ILogger <MusicSearchApiClient> logger) { _httpClient = httpClient; _musicSearchConfig = musicSearchConfig; _logger = logger; }
public MusicArtistFilterService(MusicSearchConfig musicSearchConfig) { _minScore = (musicSearchConfig == null || musicSearchConfig.MinConfidenceForArtistFilter <= 0) ? 100 : musicSearchConfig.MinConfidenceForArtistFilter; }