diff options
author | 2018-03-07 18:17:22 -0800 | |
---|---|---|
committer | 2018-03-08 09:17:48 -0800 | |
commit | 327b17ab250b4c17cf3f91f5e4cd9bffd89f3d1e (patch) | |
tree | 0d943226962ae31c0bf2fd0696e91c6bb41d099c /common/src/test/java/org/openecomp/mso/adapter_utils/tests/CryptoTest.java | |
parent | dee036198ee09d71bfdd50247c1d23a7f472df87 (diff) |
Reduce log noise/warnings format to conventions
Reduce build log warnings by formatting tests
to ONAP code conventions (removing tabs etc.)
Issue-ID: SO-368
Change-Id: I48c6d359b83617aebeb79db4e30c1d72d31f7eec
Signed-off-by: Marcus G K Williams <marcus.williams@intel.com>
Diffstat (limited to 'common/src/test/java/org/openecomp/mso/adapter_utils/tests/CryptoTest.java')
-rw-r--r-- | common/src/test/java/org/openecomp/mso/adapter_utils/tests/CryptoTest.java | 51 |
1 files changed, 25 insertions, 26 deletions
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 3415420c88..e38aed8285 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,46 +34,45 @@ 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)); } } |