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")); }
public void RPasswordAttributeBlankPositive() { var result = new RPasswordAttribute(RPasswordStrength.Blank).Validate(() => new { Password = "******" }, "Password"); Assert.IsNull(result); }
public void RPasswordAttributeWeakNegative() { var result = new RPasswordAttribute(RPasswordStrength.Weak).Validate(() => new { Password = "******" }, "Password"); Assert.IsNotNull(result); }
public void RPasswordAttributeVeryWeakNegative() { var result = new RPasswordAttribute(RPasswordStrength.VeryWeak).Validate(() => new { Password = string.Empty }, "Password"); Assert.IsNotNull(result); }
public void RPasswordAttributeVeryWeakPositive() { var result = new RPasswordAttribute(RPasswordStrength.VeryWeak).Validate(() => new { Password = "******" }, "Password"); Assert.IsNull(result); }
public void RPasswordAttributeVeryStrongPositive() { var result = new RPasswordAttribute(RPasswordStrength.VeryStrong).Validate(() => new { Password = "******" }, "Password"); Assert.IsNull(result); }
public void RPasswordAttributeMediumPositive() { var result = new RPasswordAttribute(RPasswordStrength.Medium).Validate(() => new { Password = "******" }, "Password"); Assert.IsNull(result); }