@Test public void findMultiWords() throws Exception { System.out.println("findMultiWords"); PasswordAnalysis p = new PasswordAnalysis("wispwisp"); finder.blockingAnalyze(p); assertEquals(2, p.getPossiblePatternCount()); }
@Test public void findWordWithMulti() throws Exception { System.out.println("findMultiWords"); PasswordAnalysis p = new PasswordAnalysis("password"); finder.blockingAnalyze(p); assertEquals(4, p.getPossiblePatternCount()); assertEquals("password", p.calculateHighestProbablePatterns().path.get(0).getMatchString()); }
@Test public void findNonWord() throws Exception { System.out.println("findNonWord"); PasswordAnalysis p = new PasswordAnalysis("qqq"); finder.blockingAnalyze(p); assertEquals(0, p.getPossiblePatternCount()); }
@Test public void findWord_garbageinback() throws Exception { System.out.println("findWord_garbageinback"); PasswordAnalysis p = new PasswordAnalysis("wisp1234"); finder.blockingAnalyze(p); assertEquals(1, p.getPossiblePatternCount()); }