Esempio n. 1
0
        public async void DoesValidatorPreventRequestWithoutCorrectCaloriesTarget()
        {
            var query     = new FindRecipe(MealType.Snack, -1);
            var validator = new FindRecipeValidator();

            var result = await validator.ValidateAsync(query);

            result.IsValid.Should().BeFalse();
        }
Esempio n. 2
0
        public async void DoesValidatorAllowCorrectRequest()
        {
            var query     = new FindRecipe(MealType.Breakfast, 600);
            var validator = new FindRecipeValidator();

            var result = await validator.ValidateAsync(query);

            result.IsValid.Should().BeTrue();
        }