Exemplo n.º 1
0
        public void Should_Fail_By_Empty_Name()
        {
            // arrange
            var command          = PatchMemberCommandFake.ChangeMemberNameInvalidByEmptyName().Generate();
            var memberRepository = MemberRepositoryMockBuilder.Create().Build();

            var sut = new ChangeMemberNameValidator(memberRepository)
            {
                CascadeMode = FluentValidation.CascadeMode.Stop
            };

            // act
            var result = sut.Validate(command);

            // assert
            result.AssertErrorsCount(1);
        }