added test cases to TestVServerInfo.java 76/83576/2
authorSandeep J <sandeejh@in.ibm.com>
Thu, 28 Mar 2019 09:50:51 +0000 (15:20 +0530)
committerPatrick Brady <patrick.brady@att.com>
Thu, 28 Mar 2019 17:32:14 +0000 (17:32 +0000)
to increase code coverage

Issue-ID: APPC-1086
Change-Id: Ib6fb537e576f928552763ec0e6d1abf2d556f00a
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 728d270..5da52d3 100644 (file)
@@ -77,5 +77,24 @@ public class TestVServerInfo {
         params.put("tenantId", "");
         vServerInfo = new VServerInfo(params);
     }
+    
+    @Test(expected = MissingParameterException.class)
+    public void testConstructorWithEmptyCloudOwner() throws MissingParameterException {
+        Map<String, String> params = new HashMap<>();
+        params.put("vserverId", "testVserverId");
+        params.put("tenantId", "testTenantId");
+        params.put("cloudOwner", "");
+        vServerInfo = new VServerInfo(params);
+    }
+    
+    @Test(expected = MissingParameterException.class)
+    public void testConstructorWithEmptyCloudRegionId() throws MissingParameterException {
+        Map<String, String> params = new HashMap<>();
+        params.put("vserverId", "testVserverId");
+        params.put("tenantId", "testTenantId");
+        params.put("cloudOwner", "testCloudOwner");
+        params.put("cloudRegionId", "");
+        vServerInfo = new VServerInfo(params);
+    }
 
 }