public void ValidateName() { var errors = _personValidatior.ShouldHaveValidationErrorFor(p => p.Name, null as string); Assert.NotEmpty(errors); string errorCode = errors.ToList().First(x => x.PropertyName == "Name").ErrorCode; Assert.Equal("NotEmptyValidator", errorCode); }
public void ShouldReturnErrorIfNoFirstNameEntered() { _validator.ShouldHaveValidationErrorFor(r => r.FirstName, null as string); }