Ejemplo n.º 1
0
        public void BirthValid()
        {
            var validator = new BirthInRangeValidator();
            var errors    = validator.Validate(new Person {
                Birth = new DateTime(2001, 09, 11)
            });

            Assert.AreEqual(0, errors.Count);
        }
Ejemplo n.º 2
0
        public void BirthYounger()
        {
            var validator = new BirthInRangeValidator();
            var errors    = validator.Validate(new Person {
                Birth = new DateTime(2018, 01, 01)
            });

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