Ejemplo n.º 1
0
        public void RPasswordAttributeDisplayValueCorrect()
        {
            var result = new RPasswordAttribute(RPasswordStrength.Medium).Validate(() => new { Password = "******" }, "Password", "Repeat Password");

            Assert.IsNotNull(result);
            Assert.IsTrue(result.ErrorMessage.Contains("Repeat Password"));
        }
Ejemplo n.º 2
0
        public void RPasswordAttributeBlankPositive()
        {
            var result = new RPasswordAttribute(RPasswordStrength.Blank).Validate(() => new { Password = "******" }, "Password");

            Assert.IsNull(result);
        }
Ejemplo n.º 3
0
        public void RPasswordAttributeWeakNegative()
        {
            var result = new RPasswordAttribute(RPasswordStrength.Weak).Validate(() => new { Password = "******" }, "Password");

            Assert.IsNotNull(result);
        }
Ejemplo n.º 4
0
        public void RPasswordAttributeVeryWeakNegative()
        {
            var result = new RPasswordAttribute(RPasswordStrength.VeryWeak).Validate(() => new { Password = string.Empty }, "Password");

            Assert.IsNotNull(result);
        }
Ejemplo n.º 5
0
        public void RPasswordAttributeVeryWeakPositive()
        {
            var result = new RPasswordAttribute(RPasswordStrength.VeryWeak).Validate(() => new { Password = "******" }, "Password");

            Assert.IsNull(result);
        }
Ejemplo n.º 6
0
        public void RPasswordAttributeVeryStrongPositive()
        {
            var result = new RPasswordAttribute(RPasswordStrength.VeryStrong).Validate(() => new { Password = "******" }, "Password");

            Assert.IsNull(result);
        }
Ejemplo n.º 7
0
        public void RPasswordAttributeMediumPositive()
        {
            var result = new RPasswordAttribute(RPasswordStrength.Medium).Validate(() => new { Password = "******" }, "Password");

            Assert.IsNull(result);
        }