MCPcopy Create free account
hub / github.com/src-d/hercules / testPackEntry

Method testPackEntry

internal/test_data/2.java:200–211  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

198 }
199
200 public void testPackEntry() throws Exception {
201 File fileToPack = new File(getClass().getResource("TestFile.txt").getPath());
202 File dest = File.createTempFile("temp", null);
203 ZipUtil.packEntry(fileToPack, dest);
204 assertTrue(dest.exists());
205
206 ZipUtil.explode(dest);
207 assertTrue((new File(dest, "TestFile.txt")).exists());
208 // if fails then maybe somebody changed the file contents and did not update
209 // the test
210 assertEquals(108, (new File(dest, "TestFile.txt")).length());
211 }
212
213 public void testPackEntries() throws Exception {
214 File fileToPack = new File(getClass().getResource("TestFile.txt").getPath());

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected