public async Task Error_valid_domain_is_wildcard_hosting_site()
        {
            var manifest  = JObject.Parse(@"
{
    ""validDomains"": [""*.azurewebsites.net""]
}
");
            var validator = new ValidDomainsValidator(manifest);
            var result    = await validator.ValidateAsync();

            Assert.AreEqual(1, result.ErrorMessages.Count);
            Assert.AreEqual(ValidationResult.MessageCode.ValidDomainsIsWildcardHostingSite, result.ErrorMessages.First());
        }
        public async Task Error_valid_domain_empty_string()
        {
            var manifest  = JObject.Parse(@"
{
    ""validDomains"": [""""]
}
");
            var validator = new ValidDomainsValidator(manifest);
            var result    = await validator.ValidateAsync();

            Assert.AreEqual(1, result.ErrorMessages.Count);
            Assert.AreEqual(ValidationResult.MessageCode.ValidDomainsType, result.ErrorMessages.First());
        }
        public async Task Error_valid_domain_is_tunnel_site()
        {
            var manifest  = JObject.Parse(@"
{
    ""validDomains"": [""avalidsite.com"", ""something.ngrok.io""]
}
");
            var validator = new ValidDomainsValidator(manifest);
            var result    = await validator.ValidateAsync();

            Assert.AreEqual(1, result.ErrorMessages.Count);
            Assert.AreEqual(ValidationResult.MessageCode.ValidDomainsIsTunnelSite, result.ErrorMessages.First());
        }
        public async Task Okay_valid_domains_empty_array()
        {
            var manifest  = JObject.Parse(@"
{
    ""validDomains"": []
}
");
            var validator = new ValidDomainsValidator(manifest);
            var result    = await validator.ValidateAsync();

            Assert.AreEqual(0, result.ErrorMessages.Count);
            Assert.AreEqual(0, result.WarningMessages.Count);
        }