added asserts statements in JUnits 73/107773/2
authorRupinder <rupinsi1@in.ibm.com>
Mon, 18 May 2020 05:14:47 +0000 (10:44 +0530)
committerTakamune Cho <takamune.cho@att.com>
Mon, 18 May 2020 13:08:22 +0000 (13:08 +0000)
Issue-ID: APPC-1859
Change-Id: I7fbc6a536e0f3fc40d652c3cc402fcb0b9fc7020
Signed-off-by: Rupinder <rupinsi1@in.ibm.com>
appc-config/appc-config-audit/provider/src/test/java/org/onap/sdnc/config/audit/node/TestCompareNodeJson.java
appc-config/appc-config-audit/provider/src/test/java/org/onap/sdnc/config/audit/node/TestCompareNodeXml.java

index 8ebe3b5..46d9c41 100644 (file)
@@ -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
index 808706e..e53ac18 100644 (file)
@@ -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);
     }
 
 }