Exemple #1
0
 public PostHealthDataLogic(HttpClient httpClient,
                            IOptions <WebHookConfiguration> webHookConfiguration,
                            CosmosDbLogic cosmosDbLogic)
 {
     _httpClient           = httpClient;
     _webHookConfiguration = webHookConfiguration.Value;
     _cosmosDbLogic        = cosmosDbLogic;
 }
        public void Should_throw_ANE_when_path_isEmpty()
        {
            var configuration = new WebHookConfiguration
            {
                UseWebHook     = true,
                WebHookBaseUrl = "host",
                WebHookPath    = null
            };

            Assert.Throws <ArgumentNullException>(() => configuration.WebHookUrl);
        }
        public void Should_return_correct_uri(string baseUrl, string path, string url)
        {
            var configuration = new WebHookConfiguration
            {
                UseWebHook     = true,
                WebHookBaseUrl = baseUrl,
                WebHookPath    = path
            };

            Assert.Equal(url, configuration.WebHookUrl, StringComparer.InvariantCultureIgnoreCase);
        }