aboutsummaryrefslogtreecommitdiffstats
path: root/appc-config/appc-config-audit/provider/src/test/java/org/openecomp/sdnc/config/audit/node/TestCompareNodeCli.java
diff options
context:
space:
mode:
Diffstat (limited to 'appc-config/appc-config-audit/provider/src/test/java/org/openecomp/sdnc/config/audit/node/TestCompareNodeCli.java')
-rw-r--r--appc-config/appc-config-audit/provider/src/test/java/org/openecomp/sdnc/config/audit/node/TestCompareNodeCli.java94
1 files changed, 32 insertions, 62 deletions
diff --git a/appc-config/appc-config-audit/provider/src/test/java/org/openecomp/sdnc/config/audit/node/TestCompareNodeCli.java b/appc-config/appc-config-audit/provider/src/test/java/org/openecomp/sdnc/config/audit/node/TestCompareNodeCli.java
index ad1112ffc..337bc6508 100644
--- a/appc-config/appc-config-audit/provider/src/test/java/org/openecomp/sdnc/config/audit/node/TestCompareNodeCli.java
+++ b/appc-config/appc-config-audit/provider/src/test/java/org/openecomp/sdnc/config/audit/node/TestCompareNodeCli.java
@@ -30,71 +30,41 @@ import org.slf4j.LoggerFactory;
import org.openecomp.sdnc.sli.SvcLogicContext;
import org.openecomp.sdnc.sli.SvcLogicException;
-public class TestCompareNodeCli
-{
-private static final Logger log = LoggerFactory.getLogger(TestCompareNodeCli.class);
-
+public class TestCompareNodeCli {
+ private static final Logger log = LoggerFactory.getLogger(TestCompareNodeCli.class);
-//@Test
- public void TestCompareCliForSamePayload()
- {
- SvcLogicContext ctx = new SvcLogicContext();
- HashMap<String, String> testMap = new HashMap<String, String>();
- CompareNode cmp = new CompareNode();
- try
- {
- testMap.put("compareDataType", "Cli");
- testMap.put("sourceData", "This is a Text Configuration of Device");
- testMap.put("targetData", "This is a Text Configuration of Device");
- cmp.compare(testMap, ctx);
- assert(ctx.getAttribute("STATUS").equals("SUCCESS"));
- }
- catch (SvcLogicException e)
- {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
+ @Test
+ public void TestCompareCliForSamePayload() throws SvcLogicException {
+ SvcLogicContext ctx = new SvcLogicContext();
+ HashMap<String, String> testMap = new HashMap<String, String>();
+ CompareNode cmp = new CompareNode();
+ testMap.put("compareDataType", "Cli");
+ testMap.put("sourceData", "This is a Text Configuration of Device");
+ testMap.put("targetData", "This is a Text Configuration of Device");
+ cmp.compare(testMap, ctx);
+ assert (ctx.getAttribute("STATUS").equals("SUCCESS"));
}
- //@Test
- public void TestCompareCliFordifferentPayload()
- {
- SvcLogicContext ctx = new SvcLogicContext();
- HashMap<String, String> testMap = new HashMap<String, String>();
- CompareNode cmp = new CompareNode();
- try
- {
- testMap.put("compareDataType", "Cli");
- testMap.put("sourceData", "This is a Text Negative test Configuration of Device");
- testMap.put("targetData", "This is a Text Configuration of Device");
- cmp.compare(testMap, ctx);
- assert(ctx.getAttribute("STATUS").equals("FAILURE"));
- }
- catch (SvcLogicException e)
- {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
+ @Test
+ public void TestCompareCliFordifferentPayload() throws SvcLogicException {
+ SvcLogicContext ctx = new SvcLogicContext();
+ HashMap<String, String> testMap = new HashMap<String, String>();
+ CompareNode cmp = new CompareNode();
+ testMap.put("compareDataType", "Cli");
+ testMap.put("sourceData", "This is a Text Negative test Configuration of Device");
+ testMap.put("targetData", "This is a Text Configuration of Device");
+ cmp.compare(testMap, ctx);
+ assert (ctx.getAttribute("STATUS").equals("FAILURE"));
}
-
- //@Test
- public void TestCompareForMissingInput()
- {
- SvcLogicContext ctx = new SvcLogicContext();
- HashMap<String, String> testMap = new HashMap<String, String>();
- CompareNode cmp = new CompareNode();
- try
- {
- // testMap.put("compareDataType", "Cli"); Missing compareDataType from the input
- testMap.put("sourceData", "This is a Text Negative test Configuration of Device");
- testMap.put("targetData.configuration-data", "This is a Text Configuration of Device");
- cmp.compare(testMap, ctx);
- assert(ctx.getAttribute("STATUS").equals("FAILURE"));
- }
- catch (SvcLogicException e)
- {
- assert(ctx.getAttribute("STATUS").equals("FAILURE"));
- }
+
+ @Test
+ public void TestCompareForMissingInput() throws SvcLogicException {
+ SvcLogicContext ctx = new SvcLogicContext();
+ HashMap<String, String> testMap = new HashMap<String, String>();
+ CompareNode cmp = new CompareNode();
+ testMap.put("sourceData", "This is a Text Negative test Configuration of Device");
+ testMap.put("targetData.configuration-data", "This is a Text Configuration of Device");
+ cmp.compare(testMap, ctx);
+ assert (ctx.getAttribute("STATUS").equals("FAILURE"));
}
-
}