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