public void IsKilnRequestWithCustomDomainPatterns(bool expectedResult, string domainPattern)
        {
            // Arrange
            const string payload = @"{ ""repository"": { ""url"": ""https://kudu.kilnhg.com/Code/Test/Group/KuduApp"" } } ";

            var settingsManager = new MockDeploymentSettingsManager();
            settingsManager.SetValue("kiln.domain", domainPattern);

            var kilnHandler = new KilnHgHandler(settingsManager);

            // Act
            bool result = kilnHandler.IsKilnRequest(JObject.Parse(payload));

            // Assert
            Assert.Equal(expectedResult, result);
        }
        public void IsKilnRequestWithDefaultDomainPatterns(bool expectedResult, string domain)
        {
            // Arrange
            var payload = string.Format(@"{{ ""repository"": {{ ""url"": ""https://kudu.{0}/Code/Test/Group/KuduApp"" }} }} ", domain);
            var settingsManager = new MockDeploymentSettingsManager();
            var kilnHandler = new KilnHgHandler(settingsManager);

            // Act
            bool result = kilnHandler.IsKilnRequest(JObject.Parse(payload));

            // Assert
            Assert.Equal(expectedResult, result);
        }
        public void IsKilnRequestWithoutRepositoryUrl(string payloadContent)
        {
            // Arrange
            var settingsManager = new MockDeploymentSettingsManager();
            var kilnHandler = new KilnHgHandler(settingsManager);

            // Act
            bool result = kilnHandler.IsKilnRequest(JObject.Parse(payloadContent));

            // Assert
            Assert.False(result);
        }