public void UserNameIsNull() { var afuser = new AfUserModelCreate(); var validator = new AfUserValidator(); // var results = validator.Validate(afuser); // Validate(afuser, ruleSet: "all"); validator.ShouldHaveValidationErrorFor(xx => xx.UserName, null as string); }
public void UserNameHasADomain() { var afuser = new AfUserModelCreate(); var validator = new AfUserValidator(); // Reload the data from the initial load _fixture.RefreshContext(); // var results = validator.Validate(afuser); // Validate(afuser, ruleSet: "all"); validator.ShouldHaveValidationErrorFor(xx => xx.UserName, "AdviceFirst\\jeco.jacob" as string); }