upgraded to use apache commons compress instead of core java zip api to accomodate UTF-8

Former-commit-id: 2637cacd6a702268bcb7f9c31b80ac513992a5a3
This commit is contained in:
Jeremy Long
2013-08-14 20:06:26 -04:00
parent b031ff5b57
commit ecc5e6ab02
3 changed files with 54 additions and 7 deletions

View File

@@ -154,4 +154,29 @@ public class ArchiveAnalyzerTest {
instance.close();
}
}
/**
* Test of analyze method, of class ArchiveAnalyzer.
*/
@Test
public void testAnalyze_badZip() throws Exception {
ArchiveAnalyzer instance = new ArchiveAnalyzer();
try {
instance.initialize();
File file = new File(this.getClass().getClassLoader().getResource("test.zip").getPath());
Dependency dependency = new Dependency(file);
Settings.setBoolean(Settings.KEYS.AUTO_UPDATE, false);
Engine engine = new Engine();
int initial_size = engine.getDependencies().size();
instance.analyze(dependency, engine);
int ending_size = engine.getDependencies().size();
assertTrue(initial_size == ending_size);
} finally {
instance.close();
}
}
}