added test cases to TestVServerInfo.java 98/83298/3
authorSandeep J <sandeejh@in.ibm.com>
Tue, 26 Mar 2019 07:40:29 +0000 (13:10 +0530)
committerPatrick Brady <patrick.brady@att.com>
Tue, 26 Mar 2019 20:05:07 +0000 (20:05 +0000)
to increase code coverage

Issue-ID: APPC-1086
Change-Id: I1141fa522e3c4943c2a51d9c585cdcaa0186b373
Signed-off-by: Sandeep J <sandeejh@in.ibm.com>
appc-outbound/appc-aai-client/provider/src/test/java/org/onap/appc/aai/client/aai/TestVServerInfo.java

index 879eb9d..728d270 100644 (file)
@@ -62,5 +62,20 @@ public class TestVServerInfo {
     public void testCloudRegionId() {
         assertEquals("testCloudRegionId", vServerInfo.getCloudRegionId());
     }
+    
+    @Test(expected = MissingParameterException.class)
+    public void testConstructorWithEmptyVserverId() throws MissingParameterException {
+        Map<String, String> params = new HashMap<>();
+        params.put("vserverId", "");
+        vServerInfo = new VServerInfo(params);
+    }
+    
+    @Test(expected = MissingParameterException.class)
+    public void testConstructorWithEmptyTenantId() throws MissingParameterException {
+        Map<String, String> params = new HashMap<>();
+        params.put("vserverId", "testVserverId");
+        params.put("tenantId", "");
+        vServerInfo = new VServerInfo(params);
+    }
 
 }