public void GivenUpsertRecipeModel_WhenHavingTypeEmpty_ThenResultShouldBeInvalid() { var model = UpsertRecipeModelFactory.WithTypeEmpty(); var validator = new UpsertRecipeModelValidator(); var result = validator.Validate(model); result.IsValid.Should().BeFalse(); }
public void GivenUpsertRecipeModel_WhenHavingDescriptionWithMoreThan300Characters_ThenResultShouldBeInvalid() { var model = UpsertRecipeModelFactory.WithDescriptionGreaterThan300Characters(); var validator = new UpsertRecipeModelValidator(); var result = validator.Validate(model); result.IsValid.Should().BeFalse(); }
public void GivenUpsertRecipeModel_WhenHavingValidType_ThenResultShouldBeValid() { var model = UpsertRecipeModelFactory.Default(); var validator = new UpsertRecipeModelValidator(); var result = validator.Validate(model); result.IsValid.Should().BeTrue(); }
public void GivenUpsertRecipeModel_WhenHavingANullIngredientsList_ThenResultShouldBeInvalid() { var model = UpsertRecipeModelFactory.WithIngredientsListNull(); var validator = new UpsertRecipeModelValidator(); var result = validator.Validate(model); result.IsValid.Should().BeFalse(); }