public WebHookNotifierSearchEventStatus(HttpClient httpClient, IOptions <SearchApiOptions> searchApiOptions, ILogger <WebHookNotifierSearchEventStatus> logger) { _httpClient = httpClient; _logger = logger; _searchApiOptions = searchApiOptions.Value; }
public void Should_add_a_new_webHook() { var options = new SearchApiOptions().AddWebHook("test", "http://example.com/post"); Assert.AreEqual(1, options.WebHooks.Count); Assert.AreEqual("test", options.WebHooks.FirstOrDefault().Name); Assert.AreEqual("http://example.com/post", options.WebHooks.FirstOrDefault().Uri); }
public WebHookNotifierSearchEventStatus(HttpClient httpClient, IOptions <SearchApiOptions> searchApiOptions, ILogger <WebHookNotifierSearchEventStatus> logger, IDeepSearchService deepSearchService) { _httpClient = httpClient; _logger = logger; _searchApiOptions = searchApiOptions.Value; _deepSearchService = deepSearchService; }
public WebHookNotifierSearchEventStatus(HttpClient httpClient, IOptions <SearchApiOptions> searchApiOptions, ILogger <WebHookNotifierSearchEventStatus> logger, IDeepSearchService deepSearchService) { _httpClient = httpClient; _logger = logger; _searchApiOptions = searchApiOptions.Value; _deepSearchService = deepSearchService; _httpClient.Timeout = TimeSpan.FromMinutes(_searchApiOptions.Timeout); }