public void IsValid_ShouldBeFalse_WhenLimitIsGreaterThan20() { var query = new GetProductListByIngredientQuery { Ingredient = "Sugar", Limit = 21 }; var validator = new GetProductListByIngredientQueryValidator(); var result = validator.Validate(query); result.IsValid.ShouldBe(false); }
public void IsValid_ShouldBeFalse_WhenIngredientIsNullOrEmpty() { var query = new GetProductListByIngredientQuery { Ingredient = "", Limit = 20 }; var validator = new GetProductListByIngredientQueryValidator(); var result = validator.Validate(query); result.IsValid.ShouldBe(false); }