public void TestPasswordPolicySelfCheck2(string policyRaw, string password, bool expectedValid) { PasswordPolicy policy = new PasswordPolicy(policyRaw); bool valid = policy.Check(password); Assert.AreEqual(expectedValid, valid); }
public bool Check(string password) { return(PasswordPolicy.Check(this.minOccurence, this.maxOccurence, this.policyLetter, password)); }
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); }