1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package org.apache.commons.compress.archivers.zip;
18
19 import static org.junit.jupiter.api.Assertions.assertFalse;
20 import static org.junit.jupiter.api.Assertions.assertTrue;
21
22 import java.io.ByteArrayOutputStream;
23 import java.io.IOException;
24
25 import org.apache.commons.compress.AbstractTempDirTest;
26 import org.junit.jupiter.api.Test;
27
28
29
30
31 public class ZipArchiveOutputStreamTest extends AbstractTempDirTest {
32
33 @Test
34 public void testFileBasics() throws IOException {
35 try (ZipArchiveOutputStream stream = new ZipArchiveOutputStream(createTempFile())) {
36 assertTrue(stream.isSeekable());
37 }
38 }
39
40 @Test
41 public void testOutputStreamBasics() throws IOException {
42 try (ZipArchiveOutputStream stream = new ZipArchiveOutputStream(new ByteArrayOutputStream())) {
43 assertFalse(stream.isSeekable());
44 }
45 }
46 }