Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- static File file;
- @BeforeAll
- static void setUp() throws IOException {
- ZipOutputStream out = new ZipOutputStream(new FileOutputStream(file=File.createTempFile("tempDir",".zip")));
- ZipEntry e = new ZipEntry("emptyFile.txt");
- out.putNextEntry(e);
- out.closeEntry();
- e = new ZipEntry("oneLineFile.txt");
- out.putNextEntry(e);
- StringBuilder sb;
- byte[] data;
- sb = new StringBuilder();
- sb.append("route_id,agency_id,route_short_name,route_long_name,route_type");
- data = sb.toString().getBytes();
- out.write(data, 0, data.length);
- out.closeEntry();
- out.close();
- }
- @AfterAll
- static void set(){
- file.delete(); // return false
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement