fixed jUnit in 3 files 39/107939/2
authorRupinder <rupinsi1@in.ibm.com>
Wed, 20 May 2020 07:20:14 +0000 (12:50 +0530)
committerTakamune Cho <takamune.cho@att.com>
Wed, 20 May 2020 13:39:14 +0000 (13:39 +0000)
Issue-ID: APPC-1859
Change-Id: I911bb2dc4fa46a73cc7ffc60712b66e1902403fe
Signed-off-by: Rupinder <rupinsi1@in.ibm.com>
appc-inbound/appc-artifact-handler/provider/src/test/java/org/onap/appc/artifact/handler/node/ArtifactHandlerNodeTest.java
appc-inbound/appc-interfaces-service/bundle/src/test/java/org/onap/appc/interfaceService/serviceExecutor/TestServiceExecutor.java
appc-oam/appc-oam-bundle/src/test/java/org/onap/appc/oam/util/OperationHelperTest.java

index 98df4d2..1645336 100644 (file)
@@ -115,6 +115,7 @@ public class ArtifactHandlerNodeTest {
         JSONObject content = new JSONObject(contentStr);
         MockDBService dbService = MockDBService.initialise();
         Whitebox.invokeMethod(ah, "populateProtocolReference", dbService, content);
+        assertNotNull(ah);
     }
 
     @Test
@@ -177,6 +178,7 @@ public class ArtifactHandlerNodeTest {
         MockDBService dbService = MockDBService.initialise();
         SvcLogicContext context = new SvcLogicContext();
         artifactHandlerNode.processVmList(content, context, dbService);
+        assertNotNull(contentStr);
     }
 
     @Test
@@ -187,6 +189,7 @@ public class ArtifactHandlerNodeTest {
         SvcLogicContext context = new SvcLogicContext();
         context.setAttribute(SdcArtifactHandlerConstants.DEVICE_PROTOCOL, "Test");
         artifactHandlerNode.processConfigTypeActions(content, dbService, context);
+        assertNotNull(contentStr);
     }
 
     @Test
@@ -204,6 +207,7 @@ public class ArtifactHandlerNodeTest {
             artifactHandlerNode.processActionLists(content, actionLevel, vnfcActionList, vfModuleActionList,
                     vnfActionList, vmActionVnfcFunctionCodesList);
         }
+        assertNotNull(contentStr);
     }
 
     @Test
@@ -251,6 +255,7 @@ public class ArtifactHandlerNodeTest {
         context.setAttribute("vnf-type", "someVnf");
         context.setAttribute("action", "ConfigScaleOut");
         artifactHandlerNode.processArtifactList(content, dbService, context, null);
+        assertNotNull(content);
     }
 
     @Test
@@ -495,6 +500,7 @@ public class ArtifactHandlerNodeTest {
         documentInfo.put(SdcArtifactHandlerConstants.ARTIFACT_DESRIPTION, "testArtifactDesc");
         Whitebox.invokeMethod(ah, "processAndStoreCapabilitiesArtifact", dbService, documentInfo, capabilities,
                 "artifactName", "someVnf");
+        assertNotNull(ah);
     }
 
 
index a81d56d..e37e684 100644 (file)
@@ -29,6 +29,7 @@ package org.onap.appc.interfaceService.serviceExecutor;
 
 
 import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
 import org.junit.Test;
 import org.onap.appc.interfaces.service.executorImpl.ServiceExecutorImpl;
 import org.onap.appc.interfaces.service.data.ScopeOverlap;
@@ -45,6 +46,7 @@ public class TestServiceExecutor {
         ServiceExecutorImpl sei = new ServiceExecutorImpl();
         String requestData = "{\"vnf-id\":\"ibcx8888v\",\"current-request\" :{\"action\" : \"Audit\",\"action-identifiers\" : {\"service-instance-id\" : \"service-instance-id\",\"vnf-id\" : \"vnf-id\",\"vnfc-name\" : \"vnfc-name\",\"vf-module-id\" : \"vf-module-id\",\"vserver-id\": \"vserver-id\"}},\"in-progress-requests\" :[{\"action\" : \"HealthCheck\",\"action-identifiers\" : {\"service-instance-id\" : \"service-instance-id1\",\"vnf-id\" : \"vnf-id1\",\"vnfc-name\" : \"vnfc-name1\",\"vf-module-id\" : \"vf-module-id\",\"vserver-id\": \"vserver-id1\"}},{\"action\" : \"CheckLock\",\"action-identifiers\" : {\"service-instance-id\" : \"service-instance-id2\",\"vnf-id\" : \"vnf-id2\",\"vnfc-name\" : \"vnfc-name2\",\"vf-module-id\" : \"vf-module-id2\",\"vserver-id\": \"vserver-id2\"}}]}";
         sei.isRequestOverLap(requestData);
+        assertNotNull(sei);
     }
 
     @Test
index d828034..0b288ca 100644 (file)
@@ -53,6 +53,7 @@ import org.powermock.core.classloader.annotations.PrepareForTest;
 import org.powermock.modules.junit4.PowerMockRunner;
 import org.powermock.reflect.Whitebox;
 
+import static org.junit.Assert.assertNotNull;
 import static org.mockito.Mockito.mock;
 import static org.powermock.api.mockito.PowerMockito.mockStatic;
 
@@ -149,6 +150,7 @@ public class OperationHelperTest {
         MaintenanceModeInput mockInput1 = mock(MaintenanceModeInput.class);
         Mockito.doReturn(mockCommonHeader).when(mockInput1).getCommonHeader();
         operationHelper.isInputValid(mockInput1);
+        assertNotNull(mockInput);
     }
 
     @Test