X-Git-Url: http://git.nikiroo.be/?a=blobdiff_plain;f=src%2Fbe%2Fnikiroo%2Futils%2Ftest_code%2FNextableInputStreamTest.java;h=463a123652a14aebbc0962def6fc3f7a2e9106fd;hb=aa9c3626f962e59ac7460d8ac6645a6e30a4d248;hp=1b0064df249726c006d7f7d5c06ba793374d2a0f;hpb=2e7584daaf5d2f06d326c21297a71d02dd275a35;p=nikiroo-utils.git diff --git a/src/be/nikiroo/utils/test_code/NextableInputStreamTest.java b/src/be/nikiroo/utils/test_code/NextableInputStreamTest.java deleted file mode 100644 index 1b0064d..0000000 --- a/src/be/nikiroo/utils/test_code/NextableInputStreamTest.java +++ /dev/null @@ -1,33 +0,0 @@ -package be.nikiroo.utils.test_code; - -import java.io.ByteArrayInputStream; -import java.io.InputStream; - -import be.nikiroo.utils.IOUtils; -import be.nikiroo.utils.NextableInputStream; -import be.nikiroo.utils.test.TestCase; -import be.nikiroo.utils.test.TestLauncher; - -public class NextableInputStreamTest extends TestLauncher { - public NextableInputStreamTest(String[] args) { - super("NextableInputStream test", args); - - addTest(new TestCase("Simple byte array reading") { - @Override - public void test() throws Exception { - byte[] expected = new byte[] { 42, 12, 0, 127 }; - InputStream bin = new ByteArrayInputStream(expected); - NextableInputStream in = new NextableInputStream(bin); - byte[] actual = IOUtils.toByteArray(in); - - assertEquals( - "The resulting array has not the same number of items", - expected.length, actual.length); - for (int i = 0; i < expected.length; i++) { - assertEquals("Item " + i + " (0-based) is not the same", - expected[i], actual[i]); - } - } - }); - } -}