summaryrefslogtreecommitdiffstats
path: root/common/src/test/java/org/openecomp/mso/adapter_utils/tests/CryptoTest.java
diff options
context:
space:
mode:
authorRob Daugherty <rd472p@att.com>2018-03-09 15:02:18 -0500
committerRob Daugherty <rd472p@att.com>2018-03-09 15:08:14 -0500
commit96b5a685d0c3afddb632e4a68ca7483f933b55dc (patch)
tree246399de05a3d429bf45ef1e5af2b9b0218d99f3 /common/src/test/java/org/openecomp/mso/adapter_utils/tests/CryptoTest.java
parent4475278c81668109b2b37a1d2720d8f2910641c4 (diff)
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 <rd472p@att.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.java51
1 files changed, 26 insertions, 25 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 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));
}
}