@@ -0,0 +1,844 @@
+package testCases;%0A%0Aimport static org.junit.Assert.*;%0A%0Aimport java.io.IOException;%0A%0Aimport utilities.Crypto;%0Aimport utilities.FileHandler;%0A%0Aimport org.junit.Test;%0A%0Apublic class EncryptionAndFileTest %7B%0A%0A%09@Test%0A%09public void testInsertEncryptedMessage() throws IOException %7B%0A%09%09FileHandler f = new FileHandler(System.getProperty(%22user.dir%22) + %22/src/testCases/testImages/cat.jpg%22);%0A%09%09byte %5B%5D message = %7B(byte)'M', (byte)'e', (byte)'o', (byte)'w', (byte)'!'%7D;%0A%09%09String password = %221234%22;%0A%09%09byte %5B%5D cipheredMessage = Crypto.encrypt(password, message);%0A%09%09f.insertMessage(cipheredMessage);%0A%09%09byte %5B%5D actualCipheredMessage = f.extractMessage();%0A%09%09byte %5B%5D actualMessage = Crypto.decrypt(password, actualCipheredMessage);%0A%09%09String expected = %22Meow!%22;%0A%09%09String actual = new String(actualMessage);%0A%09%09f.removeMessage();%0A%09%09assertEquals(expected, actual);%0A%09%7D%0A%7D%0A

Add new testCase