コード例 #1
0
 @Test
 public void findMultiWords() throws Exception {
   System.out.println("findMultiWords");
   PasswordAnalysis p = new PasswordAnalysis("wispwisp");
   finder.blockingAnalyze(p);
   assertEquals(2, p.getPossiblePatternCount());
 }
コード例 #2
0
 @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());
 }
コード例 #3
0
  @Test
  public void findNonWord() throws Exception {
    System.out.println("findNonWord");

    PasswordAnalysis p = new PasswordAnalysis("qqq");
    finder.blockingAnalyze(p);
    assertEquals(0, p.getPossiblePatternCount());
  }
コード例 #4
0
  @Test
  public void findWord_garbageinback() throws Exception {

    System.out.println("findWord_garbageinback");
    PasswordAnalysis p = new PasswordAnalysis("wisp1234");
    finder.blockingAnalyze(p);
    assertEquals(1, p.getPossiblePatternCount());
  }