示例#1
0
        /// Use when you want to filter specified rule in a validator
        public void CanAcceptPersonWithInvalidEmail()
        {
            //given
            var person = new Person()
            {
                FirstName = "Douglas",
                LastName  = "Franco",
                Email     = "invalid@email"
            };

            //when
            var result = _personValidator
                         .FilterRules(typeof(PersonNameSpecification))
                         .IsValid(person);

            //then
            Assert.IsTrue(result);
        }