public void Created_Valitator_Properly_Handles_FailFast_Strategy() { var valitator = new ModelRulesProvider().CreateValitator(); var result = valitator.Validate(_model, new FailFastValitStrategy()); Assert.False(result.Succeeded); result.ErrorMessages.ShouldContain("One"); result.ErrorMessages.ShouldNotContain("Two"); result.ErrorMessages.ShouldNotContain("Three"); }
public void Created_Valitator_Properly_Handles_Complete_Strategy() { var valitator = new ModelRulesProvider().GetRules().CreateValitator(); var result = valitator.Validate(_model); result.Succeeded.ShouldBeFalse(); result.ErrorMessages.ShouldContain("One"); result.ErrorMessages.ShouldNotContain("Two"); result.ErrorMessages.ShouldContain("Three"); }