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