X-Git-Url: http://git.nikiroo.be/?p=nikiroo-utils.git;a=blobdiff_plain;f=src%2Fbe%2Fnikiroo%2Futils%2Ftest_code%2FCryptUtilsTest.java;h=11578f5be88901f6555ee3d6cb9a2c5801d756c7;hp=61e18fbb49198ec36240d361a9d16d13a44af7c3;hb=23742ceddbd2de2d81d3bf86520e066b835dae5d;hpb=c8468a10176ff56b4d4457cebd9b2f064b93eaed diff --git a/src/be/nikiroo/utils/test_code/CryptUtilsTest.java b/src/be/nikiroo/utils/test_code/CryptUtilsTest.java index 61e18fb..11578f5 100644 --- a/src/be/nikiroo/utils/test_code/CryptUtilsTest.java +++ b/src/be/nikiroo/utils/test_code/CryptUtilsTest.java @@ -135,15 +135,17 @@ class CryptUtilsTest extends TestLauncher { addTest(new TestCase("Simple test") { @Override public void test() throws Exception { - InputStream in = new ByteArrayInputStream(new byte[] {42, 127, 12}); - crypt.encryptInputStream(in); + InputStream in = new ByteArrayInputStream(new byte[] { 42, 127, + 12 }); + crypt.encrypt(in); ByteArrayOutputStream out = new ByteArrayOutputStream(); IOUtils.write(in, out); byte[] result = out.toByteArray(); - - assertEquals("We wrote 3 bytes, we expected 3 bytes back but got: " - + result.length, result.length, result.length); - + + assertEquals( + "We wrote 3 bytes, we expected 3 bytes back but got: " + + result.length, result.length, result.length); + assertEquals(42, result[0]); assertEquals(127, result[1]); assertEquals(12, result[2]);