public void CheckInvariantValidationRules() { Action<DeleteStudent.Request> CallSut = request => { var serviceUnderTest = new DeleteStudentHandlerFactory().Object; serviceUnderTest.Handle(request); }; // Assert2.CheckInvariantValidation("[ErrorMessage]", () => CallSut(CreateValidRequest(p => p.CommandModel. ))); }
public void CheckContextualValidationRules() { Func<DeleteStudent.Request, ValidationMessageCollection> CallSut = request => { var serviceUnderTest = new DeleteStudentHandlerFactory().Object; var reponse = serviceUnderTest.Handle(request); return reponse.ValidationDetails; }; // Assert2.CheckValidation( "[ExpectedMessage]", "[PropertyName]", () => CallSut(CreateValidRequest(p => p.CommandModel.DummyValue = "1"))); }