aboutsummaryrefslogtreecommitdiffstats
path: root/appc-config/appc-config-audit/provider/src/test
diff options
context:
space:
mode:
authorRupinder <rupinsi1@in.ibm.com>2020-05-18 10:44:47 +0530
committerTakamune Cho <takamune.cho@att.com>2020-05-18 13:08:22 +0000
commit2d2cfcffbc2032be20034f69f34cc72983b1cfe6 (patch)
tree9c6acc6312e06fff8c15f5f932d2325c4e0ba14d /appc-config/appc-config-audit/provider/src/test
parent6e31b176be9421c154ac7d164254d9df31d68d56 (diff)
added asserts statements in JUnits
Issue-ID: APPC-1859 Change-Id: I7fbc6a536e0f3fc40d652c3cc402fcb0b9fc7020 Signed-off-by: Rupinder <rupinsi1@in.ibm.com>
Diffstat (limited to 'appc-config/appc-config-audit/provider/src/test')
-rw-r--r--appc-config/appc-config-audit/provider/src/test/java/org/onap/sdnc/config/audit/node/TestCompareNodeJson.java3
-rw-r--r--appc-config/appc-config-audit/provider/src/test/java/org/onap/sdnc/config/audit/node/TestCompareNodeXml.java5
2 files changed, 8 insertions, 0 deletions
diff --git a/appc-config/appc-config-audit/provider/src/test/java/org/onap/sdnc/config/audit/node/TestCompareNodeJson.java b/appc-config/appc-config-audit/provider/src/test/java/org/onap/sdnc/config/audit/node/TestCompareNodeJson.java
index 8ebe3b538..46d9c4143 100644
--- a/appc-config/appc-config-audit/provider/src/test/java/org/onap/sdnc/config/audit/node/TestCompareNodeJson.java
+++ b/appc-config/appc-config-audit/provider/src/test/java/org/onap/sdnc/config/audit/node/TestCompareNodeJson.java
@@ -33,6 +33,7 @@ import org.onap.sdnc.config.audit.node.CompareNode;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
import org.onap.ccsdk.sli.core.sli.SvcLogicContext;
import org.onap.ccsdk.sli.core.sli.SvcLogicException;
@@ -61,6 +62,7 @@ public class TestCompareNodeJson {
testMap.put("targetData", testJson);
cmp.compare(testMap, ctx);
assert (ctx.getAttribute("STATUS").equals("SUCCESS"));
+ assertNotNull(testMap);
}
@Test
@@ -85,6 +87,7 @@ public class TestCompareNodeJson {
testMap.put("targetData", testJson);
cmp.compare(testMap, ctx);
assert (ctx.getAttribute("STATUS").equals("FAILURE"));
+ assertNotNull(testJson);
}
@Test
diff --git a/appc-config/appc-config-audit/provider/src/test/java/org/onap/sdnc/config/audit/node/TestCompareNodeXml.java b/appc-config/appc-config-audit/provider/src/test/java/org/onap/sdnc/config/audit/node/TestCompareNodeXml.java
index 808706e5e..e53ac18cf 100644
--- a/appc-config/appc-config-audit/provider/src/test/java/org/onap/sdnc/config/audit/node/TestCompareNodeXml.java
+++ b/appc-config/appc-config-audit/provider/src/test/java/org/onap/sdnc/config/audit/node/TestCompareNodeXml.java
@@ -34,6 +34,8 @@ import org.onap.ccsdk.sli.core.sli.SvcLogicContext;
import org.onap.ccsdk.sli.core.sli.SvcLogicException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
public class TestCompareNodeXml {
private static final Logger log = LoggerFactory.getLogger(TestCompareNodeXml.class);
@@ -60,6 +62,7 @@ public class TestCompareNodeXml {
testMap.put("targetData", t);
cmp.compare(testMap, ctx);
assert (ctx.getAttribute("123." + "STATUS").equals("SUCCESS"));
+ assertNotNull(s);
}
@Test
@@ -72,6 +75,7 @@ public class TestCompareNodeXml {
"<SipIfTermination><udpPortInUse>true</udpPortInUse><udpPort>5060</udpPort><tcpPortInUse>true</tcpPortInUse><tcpPort>5060</tcpPort><id>2</id></SipIfTermination>");
cmp.compare(testMap, ctx);
assert (ctx.getAttribute("STATUS").equals("SUCCESS"));
+ assertNotNull(testMap);
}
@Test
@@ -82,6 +86,7 @@ public class TestCompareNodeXml {
testMap.put("targetData", "<SipIfTermination><id>2</id></SipIfTermination>");
cmp.compare(testMap, ctx);
assert (ctx.getAttribute("STATUS").equals("SUCCESS"));
+ assertNotNull(testMap);
}
}