From 96b5a685d0c3afddb632e4a68ca7483f933b55dc Mon Sep 17 00:00:00 2001 From: Rob Daugherty Date: Fri, 9 Mar 2018 15:02:18 -0500 Subject: Revert Reduce log noise/warnings This reverts commit 327b17ab250b4c17cf3f91f5e4cd9bffd89f3d1e. It is seriously impeding our ability complete the promised merge of AT&T 1802 code. While I'm all for coding standards, if we are serious about using spaces instead of tabs, then I think we need to (1) agree with the community when this will happen, (2) do consistently in all files, and (3) enforce it. Change-Id: Ib9b996f6b6c7d81ac9ac95d58b0c7d8cc39675ff Issue-ID: SO-368 Signed-off-by: Rob Daugherty --- .../mso/adapter_utils/tests/CryptoTest.java | 51 +++++++++++----------- 1 file changed, 26 insertions(+), 25 deletions(-) (limited to 'common/src/test/java/org/openecomp/mso/adapter_utils/tests/CryptoTest.java') diff --git a/common/src/test/java/org/openecomp/mso/adapter_utils/tests/CryptoTest.java b/common/src/test/java/org/openecomp/mso/adapter_utils/tests/CryptoTest.java index e38aed8285..3415420c88 100644 --- a/common/src/test/java/org/openecomp/mso/adapter_utils/tests/CryptoTest.java +++ b/common/src/test/java/org/openecomp/mso/adapter_utils/tests/CryptoTest.java @@ -34,45 +34,46 @@ import org.openecomp.mso.utils.CryptoUtils; /** * This class implements all test methods of the CryptoUtils features. + * + * */ public class CryptoTest { - private static String testKey = "546573746F736973546573746F736973"; + private static String testKey = "546573746F736973546573746F736973"; - /** + /** * This method is called before any test occurs. * It creates a fake tree from scratch */ @BeforeClass - public static final void prepare() { - + public static final void prepare () { + } /** * This method implements a test of tree structure, mainly the storage of the leaves structure. - * - * @throws GeneralSecurityException + * @throws GeneralSecurityException */ @Test - public final void testEncryption() throws GeneralSecurityException { - String hexString = CryptoUtils.byteArrayToHexString("testosistestosi".getBytes()); - - final String testData = "This is a test string"; - final String nonTestData = "This is not the right String"; - - String encodeString = CryptoUtils.encrypt(testData, testKey); - - assertNotNull(encodeString); - - assertTrue(testData.equals(CryptoUtils.decrypt(encodeString, testKey))); - assertFalse(nonTestData.equals(CryptoUtils.decrypt(encodeString, testKey))); - - String encode2String = CryptoUtils.encrypt(testData, testKey); - assertNotNull(encode2String); - - assertEquals(encodeString, encode2String); - - assertEquals(CryptoUtils.decrypt(encodeString, testKey), CryptoUtils.decrypt(encode2String, testKey)); + public final void testEncryption () throws GeneralSecurityException { + String hexString = CryptoUtils.byteArrayToHexString("testosistestosi".getBytes()); + + final String testData = "This is a test string"; + final String nonTestData = "This is not the right String"; + + String encodeString = CryptoUtils.encrypt(testData, testKey); + + assertNotNull(encodeString); + + assertTrue(testData.equals(CryptoUtils.decrypt(encodeString, testKey))); + assertFalse(nonTestData.equals(CryptoUtils.decrypt(encodeString, testKey))); + + String encode2String = CryptoUtils.encrypt(testData, testKey); + assertNotNull(encode2String); + + assertEquals(encodeString,encode2String); + + assertEquals(CryptoUtils.decrypt(encodeString, testKey),CryptoUtils.decrypt(encode2String, testKey)); } } -- cgit 1.2.3-korg