public void DictionaryTest() { var dm = new Zxcvbn.Matcher.DictionaryMatcher("test", "test_dictionary.txt"); var res = dm.MatchPassword("NotInDictionary"); Assert.AreEqual(0, res.Count()); res = dm.MatchPassword("choreography"); Assert.AreEqual(1, res.Count()); res = dm.MatchPassword("ChOrEograPHy"); Assert.AreEqual(1, res.Count()); var leet = new Zxcvbn.Matcher.L33tMatcher(dm); res = leet.MatchPassword("3mu"); Assert.AreEqual(1, res.Count()); res = leet.MatchPassword("3mupr4nce|egume"); }
public void DictionaryTest() { var dm = new Zxcvbn.Matcher.DictionaryMatcher("test", "test_dictionary.txt"); var res = dm.MatchPassword("NotInDictionary"); Assert.AreEqual(0, res.Count()); res = dm.MatchPassword("choreography"); Assert.AreEqual(1, res.Count()); res = dm.MatchPassword("ChOrEograPHy"); Assert.AreEqual(1, res.Count()); var leet = new Zxcvbn.Matcher.L33tMatcher(dm); res = leet.MatchPassword("3mu"); Assert.AreEqual(1, res.Count()); res = leet.MatchPassword("3mupr4nce|egume"); }