diff --git a/src/test/java/org/scijava/io/handle/DataHandleTest.java b/src/test/java/org/scijava/io/handle/DataHandleTest.java index 7c38e3e1a..f2b7d5a16 100644 --- a/src/test/java/org/scijava/io/handle/DataHandleTest.java +++ b/src/test/java/org/scijava/io/handle/DataHandleTest.java @@ -113,7 +113,7 @@ public void testEndianesSettings() throws IOException { @Test public void testReading() throws IOException { try (final DataHandle handle = createHandle()) { - checkBasicReadMethods(handle); + checkBasicReadMethods(handle, true); checkEndiannessReading(handle); } } @@ -168,13 +168,16 @@ public void populateData(final OutputStream out) throws IOException { * Checks basic byte reading methods. * * @param handle the handle to test + * @param checkLength whether to check the total length of the handle * @throws IOException */ public void checkBasicReadMethods( - final DataHandle handle) throws IOException + final DataHandle handle, boolean checkLength) throws IOException { assertEquals(0, handle.offset()); - assertEquals(BYTES.length, handle.length()); + if (checkLength) { + assertEquals(BYTES.length, handle.length()); + } assertEquals("UTF-8", handle.getEncoding()); // test read() diff --git a/src/test/java/org/scijava/io/handle/ReadBufferDataHandleTest.java b/src/test/java/org/scijava/io/handle/ReadBufferDataHandleTest.java index e7cb332f2..9f05bd38b 100644 --- a/src/test/java/org/scijava/io/handle/ReadBufferDataHandleTest.java +++ b/src/test/java/org/scijava/io/handle/ReadBufferDataHandleTest.java @@ -64,7 +64,7 @@ public void testSmallBuffer() throws IOException { new ReadBufferDataHandle(handle, 5)) { // check with small buffersize - checkBasicReadMethods(bufferedHandle); + checkBasicReadMethods(bufferedHandle, true); checkEndiannessReading(bufferedHandle); } } @@ -127,7 +127,6 @@ public void testLargeRead() throws Exception { } @Test - @Ignore @Override public void testWriting() throws IOException { // nothing to do here diff --git a/src/test/java/org/scijava/io/handle/WriteBufferDataHandleTest.java b/src/test/java/org/scijava/io/handle/WriteBufferDataHandleTest.java index 40f035e3a..6ea468872 100644 --- a/src/test/java/org/scijava/io/handle/WriteBufferDataHandleTest.java +++ b/src/test/java/org/scijava/io/handle/WriteBufferDataHandleTest.java @@ -64,14 +64,12 @@ public DataHandle createHandle() { } @Test - @Ignore @Override public void testReading() throws IOException { // nothing to do } @Test - @Ignore @Override public void checkSkip() throws IOException { // nothing to do