public async Task Error_description_not_object()
        {
            var manifest  = JObject.Parse(@"
{
    ""description"": ""not an object""
}
");
            var validator = new DescriptionValidator(manifest);
            var result    = await validator.ValidateAsync();

            Assert.AreEqual(1, result.ErrorMessages.Count);
            Assert.AreEqual(ValidationResult.MessageCode.DescriptionObjectRequired, result.ErrorMessages.First());
        }
        public async Task Error_no_full_description()
        {
            var manifest  = JObject.Parse(@"
{
    ""description"": {
        ""no_full_desc_key"": 1
    }
}
");
            var validator = new DescriptionValidator(manifest);
            var result    = await validator.ValidateAsync();

            Assert.IsTrue(result.ErrorMessages.Contains(ValidationResult.MessageCode.FullDescriptionRequired));
        }
        public async Task Warning_short_description_contains_competitor_keyword()
        {
            var manifest  = JObject.Parse(@"
{
    ""description"": {
        ""short"": ""awesome app for slack""
    }
}
");
            var validator = new DescriptionValidator(manifest);
            var result    = await validator.ValidateAsync();

            Assert.IsTrue(result.WarningMessages.Contains(ValidationResult.MessageCode.ShortDescriptionCompetitor));
        }
        public async Task Error_short_description_not_string()
        {
            var manifest  = JObject.Parse(@"
{
    ""description"": {
        ""short"": 12345
    }
}
");
            var validator = new DescriptionValidator(manifest);
            var result    = await validator.ValidateAsync();

            Assert.IsTrue(result.ErrorMessages.Contains(ValidationResult.MessageCode.ShortDescriptionType));
        }
        public async Task Warning_full_description_contains_short_description()
        {
            var manifest  = JObject.Parse(@"
{
    ""description"": {
        ""full"": ""Full description for my app"",
        ""short"": ""my app""
    }
}
");
            var validator = new DescriptionValidator(manifest);
            var result    = await validator.ValidateAsync();

            Assert.IsTrue(result.WarningMessages.Contains(ValidationResult.MessageCode.FullDescriptionContainsShortDescription));
        }