aboutsummaryrefslogtreecommitdiffstats
path: root/appc-config/appc-encryption-tool
diff options
context:
space:
mode:
authorSandeep J <sandeejh@in.ibm.com>2018-08-07 16:39:45 +0530
committerSandeep J <sandeejh@in.ibm.com>2018-08-07 16:39:51 +0530
commit2678c12a4091b0815b5b42efab8e8aba9e841638 (patch)
tree5f7e50bb9e32b9f878896025b993853199c70bcc /appc-config/appc-encryption-tool
parent171b07e5ed1b99dbe130b55726fc9ec65d4432ea (diff)
added test case to TestEncryptionTool.java
to increase code coverage Issue-ID: APPC-1086 Change-Id: Icf3522dee487c4ab876e11f201ad160c6be3831d Signed-off-by: Sandeep J <sandeejh@in.ibm.com>
Diffstat (limited to 'appc-config/appc-encryption-tool')
-rw-r--r--appc-config/appc-encryption-tool/provider/src/test/java/org/onap/appc/encryptiontool/TestEncryptionTool.java10
1 files changed, 10 insertions, 0 deletions
diff --git a/appc-config/appc-encryption-tool/provider/src/test/java/org/onap/appc/encryptiontool/TestEncryptionTool.java b/appc-config/appc-encryption-tool/provider/src/test/java/org/onap/appc/encryptiontool/TestEncryptionTool.java
index f6ad5a59d..a02556803 100644
--- a/appc-config/appc-encryption-tool/provider/src/test/java/org/onap/appc/encryptiontool/TestEncryptionTool.java
+++ b/appc-config/appc-encryption-tool/provider/src/test/java/org/onap/appc/encryptiontool/TestEncryptionTool.java
@@ -6,6 +6,8 @@
* ================================================================================
* Copyright (C) 2017 Amdocs
* =============================================================================
+ * Modification Copyright (C) 2018 IBM.
+ * =============================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
@@ -34,6 +36,7 @@ import org.onap.appc.encryptiontool.wrapper.EncryptionTool;
import org.onap.appc.encryptiontool.wrapper.EncryptionToolDGWrapper;
import org.onap.appc.encryptiontool.wrapper.WrapperEncryptionTool;
import org.onap.ccsdk.sli.core.sli.SvcLogicContext;
+import static org.junit.Assert.assertEquals;
public class TestEncryptionTool {
@@ -98,4 +101,11 @@ public class TestEncryptionTool {
inParams.put("prefix", "user");
et.getProperty(inParams, ctx);
}
+
+ @Test
+ public void testEncrypt() throws Exception {
+ EncryptionTool et = EncryptionTool.getInstance();
+ String s1=et.encrypt("sampleText");
+ assertEquals("enc:MD4XHE0udVFHOw==", s1);
+ }
}