コード例 #1
0
        public void CheckInvariantValidationRules()
        {
            Action<UpdateDepartment.Request> CallSut = request =>
            {
                var serviceUnderTest = new UpdateDepartmentHandlerFactory().Object;
                serviceUnderTest.Handle(request);
            };

            // Assert2.CheckInvariantValidation("[ErrorMessage]", () => CallSut(CreateValidRequest(p => p.CommandModel. )));
        }
コード例 #2
0
        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")));
        }