added test case to TestEncryptionTool.java 29/59429/1
authorSandeep J <sandeejh@in.ibm.com>
Tue, 7 Aug 2018 11:09:45 +0000 (16:39 +0530)
committerSandeep J <sandeejh@in.ibm.com>
Tue, 7 Aug 2018 11:09:51 +0000 (16:39 +0530)
to increase code coverage

Issue-ID: APPC-1086
Change-Id: Icf3522dee487c4ab876e11f201ad160c6be3831d
Signed-off-by: Sandeep J <sandeejh@in.ibm.com>
appc-config/appc-encryption-tool/provider/src/test/java/org/onap/appc/encryptiontool/TestEncryptionTool.java

index f6ad5a5..a025568 100644 (file)
@@ -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);
+    }
 }