public static void validateZipStructure(ReferenceApp app) throws IOException, Exception {
File zipFile = app.getZip().getFile();
assertTrue("Could not download "+ app.getZip(),
zipFile!=null && zipFile.exists());
CodeSet allData = CodeSet.fromZip("all", app.getZip(), new Path("/"));
assertTrue("ZipFile is empty", allData.exists());
// CodeSet.Processor<Void> printEntry = new CodeSet.Processor<Void>() {
// public Void doit(CodeSetEntry e) {
// System.out.println(e);
// return null;
// };
// };
// allData.each(printEntry);
assertFolder(allData, app.getRootPath());
String readme = app.getReadme();
assertNotNull("No README.md file", readme);
CodeSet codeset = app.getCodeSet();
String codesetName = codeset.getName();
assertTrue("No '"+codeset.getName()+"' codeset", codeset.exists());
boolean isGradle = codeset.hasFile("build.gradle");
boolean isMaven = codeset.hasFile("pom.xml");
assertTrue("Codeset "+codesetName+" has neither a build.gradle nor a pom.xml", isGradle||isMaven);
}