Exemple #1
0
 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> >());
        }
Exemple #3
0
 public MusicSearchApiClient(HttpClient httpClient, MusicSearchConfig musicSearchConfig, ILogger <MusicSearchApiClient> logger)
 {
     _httpClient        = httpClient;
     _musicSearchConfig = musicSearchConfig;
     _logger            = logger;
 }
Exemple #4
0
 public MusicArtistFilterService(MusicSearchConfig musicSearchConfig)
 {
     _minScore = (musicSearchConfig == null || musicSearchConfig.MinConfidenceForArtistFilter <= 0) ? 100 : musicSearchConfig.MinConfidenceForArtistFilter;
 }