private void Validate(Account model, System.Linq.Expressions.Expression <System.Func <Account, string> > expression, bool shouldHaveError = false) { var result = validator.TestValidate(model); if (shouldHaveError) { result.ShouldHaveValidationErrorFor(expression); } else { result.ShouldNotHaveValidationErrorFor(expression); } }