summaryrefslogtreecommitdiffstats
path: root/appc-config/appc-config-audit/provider/src/test/java/org/onap/sdnc/config/audit/node/TestCompareNodeCli.java
diff options
context:
space:
mode:
Diffstat (limited to 'appc-config/appc-config-audit/provider/src/test/java/org/onap/sdnc/config/audit/node/TestCompareNodeCli.java')
-rw-r--r--appc-config/appc-config-audit/provider/src/test/java/org/onap/sdnc/config/audit/node/TestCompareNodeCli.java27
1 files changed, 14 insertions, 13 deletions
diff --git a/appc-config/appc-config-audit/provider/src/test/java/org/onap/sdnc/config/audit/node/TestCompareNodeCli.java b/appc-config/appc-config-audit/provider/src/test/java/org/onap/sdnc/config/audit/node/TestCompareNodeCli.java
index bd28ef7a3..1e8c4f8b2 100644
--- a/appc-config/appc-config-audit/provider/src/test/java/org/onap/sdnc/config/audit/node/TestCompareNodeCli.java
+++ b/appc-config/appc-config-audit/provider/src/test/java/org/onap/sdnc/config/audit/node/TestCompareNodeCli.java
@@ -27,6 +27,7 @@ package org.onap.sdnc.config.audit.node;
import java.util.HashMap;
+import org.junit.Before;
import org.junit.Test;
import org.onap.sdnc.config.audit.node.CompareNode;
import org.slf4j.Logger;
@@ -38,12 +39,21 @@ import static org.junit.Assert.assertEquals;
public class TestCompareNodeCli {
private static final Logger log = LoggerFactory.getLogger(TestCompareNodeCli.class);
-
+ private CompareNode cmp;
+ SvcLogicContext ctx;
+ HashMap<String, String> testMap;
+
+
+ @Before
+ public void setUp()
+ {
+ cmp = new CompareNode();
+ ctx = new SvcLogicContext();
+ testMap = new HashMap<String, String>();
+ }
+
@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");
@@ -53,9 +63,6 @@ public class TestCompareNodeCli {
@Test
public void TestCompareCliForNoPayload() throws SvcLogicException {
- SvcLogicContext ctx = new SvcLogicContext();
- HashMap<String, String> testMap = new HashMap<String, String>();
- CompareNode cmp = new CompareNode();
testMap.put("compareDataType", "Cli");
cmp.compare(testMap, ctx);
assertEquals ("FAILURE",ctx.getAttribute("STATUS"));
@@ -63,9 +70,6 @@ public class TestCompareNodeCli {
@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");
@@ -75,9 +79,6 @@ public class TestCompareNodeCli {
@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);