示例#1
0
        public void TestPasswordPolicySelfCheck2(string policyRaw, string password, bool expectedValid)
        {
            PasswordPolicy policy = new PasswordPolicy(policyRaw);

            bool valid = policy.Check(password);

            Assert.AreEqual(expectedValid, valid);
        }
示例#2
0
 public bool Check(string password)
 {
     return(PasswordPolicy.Check(this.minOccurence, this.maxOccurence, this.policyLetter, password));
 }
示例#3
0
        public void TestPasswordPolicyCheck(int minOccurence, int maxOccurence, char policyLetter, string password, bool expectedValid)
        {
            bool passwordValid = PasswordPolicy.Check(minOccurence, maxOccurence, policyLetter, password);

            Assert.AreEqual(passwordValid, expectedValid);
        }