public void ReturnNoValidationErrorsForAGreenModel() { // arrange ProductModel model = GreenProductModel.Model(); // act IEnumerable <ValidationResult> validationResult = model.Validate(new ValidationContext(this)); // assert validationResult.Should().HaveCount(0); }
public void ReturnInValidWhenSizeIsEmpty() { // arrange ProductModel model = GreenProductModel.Model(); model.Size = string.Empty; //act IEnumerable <ValidationResult> validationResult = model.Validate(new ValidationContext(this)); //assert validationResult.Should().HaveCount(1); }