예제 #1
0
        public void AddressNotNull()
        {
            var val    = new AddressNotNullValidator();
            var errors = val.Validate(new Person {
                Address = new Address()
            });

            Assert.AreEqual(0, errors.Count);
        }
예제 #2
0
        public void AddressNull()
        {
            var val    = new AddressNotNullValidator();
            var errors = val.Validate(new Person {
                Address = null
            });

            Assert.AreEqual(1, errors.Count);
            Assert.AreEqual("Address not valid", errors[0]);
        }