You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by gg...@apache.org on 2024/01/27 22:23:36 UTC
(commons-io) branch master updated: Add org.apache.commons.io.input.AutoCloseInputStreamTest.testBuilderGet()
This is an automated email from the ASF dual-hosted git repository.
ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-io.git
The following commit(s) were added to refs/heads/master by this push:
new fcc43a62 Add org.apache.commons.io.input.AutoCloseInputStreamTest.testBuilderGet()
fcc43a62 is described below
commit fcc43a625263bcb8facefc98a542c41fc39e509d
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Sat Jan 27 17:23:32 2024 -0500
Add org.apache.commons.io.input.AutoCloseInputStreamTest.testBuilderGet()
---
.../java/org/apache/commons/io/input/AutoCloseInputStreamTest.java | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/src/test/java/org/apache/commons/io/input/AutoCloseInputStreamTest.java b/src/test/java/org/apache/commons/io/input/AutoCloseInputStreamTest.java
index 1e615843..2d7fe69d 100644
--- a/src/test/java/org/apache/commons/io/input/AutoCloseInputStreamTest.java
+++ b/src/test/java/org/apache/commons/io/input/AutoCloseInputStreamTest.java
@@ -19,6 +19,7 @@ package org.apache.commons.io.input;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertFalse;
import static org.junit.jupiter.api.Assertions.assertTrue;
+import static org.junit.jupiter.api.Assertions.assertThrows;
import java.io.ByteArrayInputStream;
import java.io.IOException;
@@ -49,6 +50,12 @@ public class AutoCloseInputStreamTest {
closed = false;
}
+ @Test
+ public void testBuilderGet() {
+ // java.lang.IllegalStateException: origin == null
+ assertThrows(IllegalStateException.class, () -> AutoCloseInputStream.builder().get());
+ }
+
@Test
public void testClose() throws IOException {
stream.close();