Skip to content
Permalink
Browse files
Fix broken tests.
  • Loading branch information
garydgregory committed May 5, 2022
1 parent 271f315 commit abf6a7551a3b60a280d221ace486df9800b4eaf8
Showing 1 changed file with 5 additions and 6 deletions.
@@ -21,6 +21,7 @@
import static org.apache.commons.compress.AbstractTestCase.getFile;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertThrows;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;

@@ -90,16 +91,14 @@ public void testCOMPRESS209() throws Exception {

@Test
public void cantRead7zFromStream() throws Exception {
ArchiveStreamFactory.DEFAULT
.createArchiveInputStream(ArchiveStreamFactory.SEVEN_Z,
new ByteArrayInputStream(ByteUtils.EMPTY_BYTE_ARRAY));
assertThrows(StreamingNotSupportedException.class,
() -> ArchiveStreamFactory.DEFAULT.createArchiveInputStream(ArchiveStreamFactory.SEVEN_Z, new ByteArrayInputStream(ByteUtils.EMPTY_BYTE_ARRAY)));
}

@Test
public void cantWrite7zToStream() throws Exception {
ArchiveStreamFactory.DEFAULT
.createArchiveOutputStream(ArchiveStreamFactory.SEVEN_Z,
new ByteArrayOutputStream());
assertThrows(StreamingNotSupportedException.class,
() -> ArchiveStreamFactory.DEFAULT.createArchiveOutputStream(ArchiveStreamFactory.SEVEN_Z, new ByteArrayOutputStream()));
}

/**

0 comments on commit abf6a75

Please sign in to comment.