@Test
public void testAnalyze() throws Exception {
System.out.println("analyze");
{
MockPasswordResults pass = new MockPasswordResults("12-25-1999");
new DateFinder().analyze(pass);
assertEquals(1, pass.getFoundPatterns().size());
}
{
MockPasswordResults pass = new MockPasswordResults("12-25-99");
new DateFinder().analyze(pass);
assertEquals(1, pass.getFoundPatterns().size());
}
{
MockPasswordResults pass = new MockPasswordResults("04-06-1976");
new DateFinder().analyze(pass);
assertEquals(1, pass.getFoundPatterns().size());
}
{
MockPasswordResults pass = new MockPasswordResults("122599");
new DateFinder().analyze(pass);
assertEquals(1, pass.getFoundPatterns().size());
}
{
MockPasswordResults pass = new MockPasswordResults("2001-12-25");
new DateFinder().analyze(pass);
assertEquals(1, pass.getFoundPatterns().size());
}
{
MockPasswordResults pass = new MockPasswordResults("1776-06-04");
new DateFinder().analyze(pass);
assertEquals(1, pass.getFoundPatterns().size());
}
}