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:33:17 UTC

(commons-io) branch master updated: Add org.apache.commons.io.input.BufferedFileChannelInputStreamTest.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 b5de1f75 Add org.apache.commons.io.input.BufferedFileChannelInputStreamTest.testBuilderGet()
b5de1f75 is described below

commit b5de1f755ef1c714e47a17c792d02a872f012bd9
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Sat Jan 27 17:33:13 2024 -0500

    Add org.apache.commons.io.input.BufferedFileChannelInputStreamTest.testBuilderGet()
---
 .../commons/io/input/BufferedFileChannelInputStreamTest.java   | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/src/test/java/org/apache/commons/io/input/BufferedFileChannelInputStreamTest.java b/src/test/java/org/apache/commons/io/input/BufferedFileChannelInputStreamTest.java
index 0a56ae8e..f05ca23e 100644
--- a/src/test/java/org/apache/commons/io/input/BufferedFileChannelInputStreamTest.java
+++ b/src/test/java/org/apache/commons/io/input/BufferedFileChannelInputStreamTest.java
@@ -16,11 +16,14 @@
  */
 package org.apache.commons.io.input;
 
+import static org.junit.jupiter.api.Assertions.assertThrows;
+
 import java.io.IOException;
 import java.io.InputStream;
 import java.nio.file.StandardOpenOption;
 
 import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
 
 /**
  * Tests functionality of {@link BufferedFileChannelInputStream}.
@@ -46,4 +49,11 @@ public class BufferedFileChannelInputStreamTest extends AbstractInputStreamTest
         };
         //@formatter:on
     }
+
+    @Test
+    public void testBuilderGet() {
+        // java.lang.IllegalStateException: origin == null
+        assertThrows(IllegalStateException.class, () -> BufferedFileChannelInputStream.builder().get());
+    }
+
 }