Fixes some warnings

This commit is contained in:
2024-09-07 01:27:00 +02:00
parent 0f76c8f869
commit e482e494f8
12 changed files with 44 additions and 36 deletions

View File

@@ -1,9 +1,9 @@
package net.knarcraft.bookswithoutborders.encryption;
import junit.framework.Assert;
import org.junit.Test;
import static junit.framework.Assert.assertEquals;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotSame;
public class AESTest {
@@ -15,7 +15,7 @@ public class AESTest {
AES aes = new AES(AES.generateIV(), AES.generateIV());
String encrypted = aes.encryptDecryptText(plainText, password, true);
Assert.assertNotSame(encrypted, plainText);
assertNotSame(encrypted, plainText);
String decrypted = aes.encryptDecryptText(encrypted, password, false);
assertEquals(plainText, decrypted);
}