public void Validate1()
        {
            const string propertyName = "Email";
            StubEntityValidationRule entityValidationRule = new StubEntityValidationRule(new EntityPropertyValidator(new NotNullValidator()), "User Email", propertyName);

            ValidationResult validationResult = entityValidationRule.Validate(new User { Email = "[email protected]" });

            Assert.IsTrue(validationResult.IsValid);
            Assert.AreEqual(0, validationResult.Errors.Count);
        }
        public void Validate()
        {
            const string propertyName = "Email";
            StubEntityValidationRule entityValidationRule = new StubEntityValidationRule(new EntityPropertyValidator(new NotNullValidator()), "User Email", propertyName);

            ValidationResult validationResult = entityValidationRule.Validate(null);
            
            Assert.IsFalse(validationResult.IsValid);
             
            Assert.AreEqual(1, validationResult.Errors.Count);
            Assert.AreEqual("'User Email' must not be empty.", validationResult.Errors[0].Message);
            Assert.AreEqual("Email", validationResult.Errors[0].PropertyName);
        }