コード例 #1
0
 public void Analyze_IfPasswordContainsWrongChars_ThrowException(string password)
 {
     Assert.Throws <ArgumentException>(() =>
     {
         PasswordAnalyzer.Analyze(password);
     });
 }
コード例 #2
0
 public void EmptyPassword_ShouldReturn_ZeroStrength()
 {
     Assert.AreEqual(0, PasswordAnalyzer.Analyze(""));
 }
コード例 #3
0
 public void Analyze_ShouldCalculate_CorrectPasswordStrengthForLongPasswords(string password, int expectedStrength)
 {
     Assert.AreEqual(expectedStrength, PasswordAnalyzer.Analyze(password));
 }