fixed jUnits in TestAaiService.java 42/107942/2
authorRupinder <rupinsi1@in.ibm.com>
Wed, 20 May 2020 07:42:43 +0000 (13:12 +0530)
committerTakamune Cho <takamune.cho@att.com>
Wed, 20 May 2020 13:38:41 +0000 (13:38 +0000)
Issue-ID: APPC-1859
Change-Id: I1b6b8ba47126aeffdbb0cf8feeb909a4cfb8fa1c
Signed-off-by: Rupinder <rupinsi1@in.ibm.com>
appc-outbound/appc-aai-client/provider/src/test/java/org/onap/appc/aai/client/aai/TestAaiService.java

index bf22606..e91d895 100644 (file)
@@ -52,6 +52,7 @@ import org.onap.ccsdk.sli.adaptors.aai.AAIClient;
 
 import com.att.eelf.configuration.EELFLogger;
 import com.att.eelf.configuration.EELFManager;
+import static org.junit.Assert.assertNotNull;
 
 @RunWith(PowerMockRunner.class)
 @PrepareForTest({FrameworkUtil.class})
@@ -122,6 +123,7 @@ public class TestAaiService {
         inParams.put("AppcAaiClientConstant.INPUT_PARAM_RESPONSE_PREFIX", "prefix.");
         ctx.setAttribute("tmp.vnfInfo.vm[1].vnfc-name", "nullnull001");
         aaiService.insertVnfcs(inParams, ctx, 2, null);
+        assertNotNull(aaiService);
     }
 
     @Test
@@ -133,6 +135,7 @@ public class TestAaiService {
         inParams.put("AppcAaiClientConstant.INPUT_PARAM_RESPONSE_PREFIX", "prefix.");
         ctx.setAttribute("tmp.vnfInfo.vm[1].vnfc-name", "nullnull001");
         aaiService.getVnfcData(inParams, ctx, 1);
+        assertNotNull(ctx);
     }
 
     @Test
@@ -334,6 +337,7 @@ public class TestAaiService {
         mockAai.populateAllVnfInfo(ctx, "tmp.vnfInfo");
 
         // mockAai.insertVnfcs(inParams,ctx,2, 2) ;
+        assertNotNull(mockAai);
     }
 
     @Test
@@ -350,6 +354,8 @@ public class TestAaiService {
         mockAai.populateAllVnfInfo(ctx, "tmp.vnfInfo");
 
         mockAai.updateVServerStatus(inParams, ctx, 2);
+
+        assertNotNull(mockAai);
     }
 
     @Test
@@ -368,6 +374,7 @@ public class TestAaiService {
         mockAai.populateAllVnfInfo1(ctx, "tmp.vnfInfo");
 
         mockAai.insertVnfcs(inParams, ctx, 2,"vfModuleId1");
+        assertNotNull(mockAai);
 
 
     }
@@ -442,6 +449,8 @@ public class TestAaiService {
         mockAai.populateAllVnfInfo(ctx, "tmp.vnfInfo");
 
         mockAai.updateVnfStatus(inParams, ctx);
+
+        assertNotNull(ctx);
     }
 
     private void printContext(SvcLogicContext ctx) throws Exception {
@@ -505,7 +514,8 @@ public class TestAaiService {
     {
         MockAaiService mockAai = new MockAaiService(aaiClient);
         Map<String, String> params=mockAai.getExpectedParams();
-        mockAai.addVnfc("ibcxvm0002func0001",params , "");        
+        mockAai.addVnfc("ibcxvm0002func0001",params , "");
+        assertNotNull(mockAai);
     }
 
 }