Skip to content
Permalink
Browse files
Fix test
  • Loading branch information
arturobernalg committed Apr 30, 2021
1 parent b3676bb commit b33dda73d7f3eaeded6e592ed6b1e9c3c521743c
Showing 2 changed files with 6 additions and 5 deletions.
@@ -25,8 +25,8 @@

import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.UncheckedIOException;
import java.util.Arrays;
import org.apache.commons.io.FileUtils;

@@ -127,7 +127,7 @@ public void testBelowThreshold() {
assertEquals(item.getSize(), testFieldValueBytes.length);
try {
assertTrue(Arrays.equals(item.get(), testFieldValueBytes));
} catch (IOException e) {
} catch (UncheckedIOException e) {
fail("Unexpected IOException", e);
}
assertEquals(item.getString(), textFieldValue);
@@ -190,7 +190,7 @@ public void doTestAboveThreshold(final File repository) {
assertEquals(item.getSize(), testFieldValueBytes.length);
try {
assertTrue(Arrays.equals(item.get(), testFieldValueBytes));
} catch (IOException e) {
} catch (UncheckedIOException e) {
fail("Unexpected IOException", e);
}
assertEquals(item.getString(), textFieldValue);
@@ -30,6 +30,7 @@
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import java.io.OutputStream;
import java.io.UncheckedIOException;

import org.apache.commons.fileupload2.disk.DiskFileItemFactory;
import org.apache.commons.io.FileUtils;
@@ -83,7 +84,7 @@ public void testInMemoryObject(final byte[] testFieldValueBytes, final File repo
assertEquals(item.getSize(), testFieldValueBytes.length, "Initial: size");
try {
compareBytes("Initial", item.get(), testFieldValueBytes);
} catch (IOException e) {
} catch (UncheckedIOException e) {
fail("Unexpected IOException", e);
}
item.delete();
@@ -133,7 +134,7 @@ public void testAboveThreshold() {
assertEquals(item.getSize(), testFieldValueBytes.length, "Initial: size");
try {
compareBytes("Initial", item.get(), testFieldValueBytes);
} catch (IOException e) {
} catch (UncheckedIOException e) {
fail("Unexpected IOException", e);
}

0 comments on commit b33dda7

Please sign in to comment.