public void ModelWithHasNoIdentificationNumber_ValidModel_ReturnsExpectedResults(string identificationNumber, bool hasNoIdentificationNumber) { // Arrange var model = new ModelWithHasNoIdentificationNumber() { IdentificationNumber = identificationNumber, HasNoIdentificationNumber = hasNoIdentificationNumber }; // Act var result = ModelValidator.Validate(model); // Assert AssertIsValid(result); }
public void ModelWithHasNoIdentificationNumber_InvalidModel_ReturnsExpectedResults(string identificationNumber, bool hasNoIdentificationNumber) { // Arrange var model = new ModelWithHasNoIdentificationNumber() { IdentificationNumber = identificationNumber, HasNoIdentificationNumber = hasNoIdentificationNumber }; // Act var result = ModelValidator.Validate(model); // Assert AssertIsNotValid(result, nameof(model.IdentificationNumber), typeof(IdentificationNumberAttribute), ValidationType.IdentificationNumber); }