Code example for ZipFile

Methods: close, getEntry

0
        Verifier verifier = getVerifier("MNGECLIPSE1007");
 
        verifier.executeGoal("package");
        verifier.verifyErrorFreeLog();
 
        ZipFile zip = new ZipFile(new File(verifier.getBasedir(), "target/MNGECLIPSE1007-1.0.0.jar"));
 
        try { 
            Assert.assertNotNull(zip.getEntry("files/included.txt"));
            Assert.assertNull(zip.getEntry("files/excluded.txt"));
            Assert.assertNull(zip.getEntry("Makefile"));
        } finally { 
            zip.close();
        } 
    } 
 
}