From: Sandeep J Date: Tue, 26 Mar 2019 07:40:29 +0000 (+0530) Subject: added test cases to TestVServerInfo.java X-Git-Tag: 1.5.0~52 X-Git-Url: https://gerrit.onap.org/r/gitweb?a=commitdiff_plain;h=9c018402d46127218dd8ed2bf67ed41f925b2305;p=appc.git added test cases to TestVServerInfo.java to increase code coverage Issue-ID: APPC-1086 Change-Id: I1141fa522e3c4943c2a51d9c585cdcaa0186b373 Signed-off-by: Sandeep J --- diff --git a/appc-outbound/appc-aai-client/provider/src/test/java/org/onap/appc/aai/client/aai/TestVServerInfo.java b/appc-outbound/appc-aai-client/provider/src/test/java/org/onap/appc/aai/client/aai/TestVServerInfo.java index 879eb9d61..728d2704b 100644 --- a/appc-outbound/appc-aai-client/provider/src/test/java/org/onap/appc/aai/client/aai/TestVServerInfo.java +++ b/appc-outbound/appc-aai-client/provider/src/test/java/org/onap/appc/aai/client/aai/TestVServerInfo.java @@ -62,5 +62,20 @@ public class TestVServerInfo { public void testCloudRegionId() { assertEquals("testCloudRegionId", vServerInfo.getCloudRegionId()); } + + @Test(expected = MissingParameterException.class) + public void testConstructorWithEmptyVserverId() throws MissingParameterException { + Map params = new HashMap<>(); + params.put("vserverId", ""); + vServerInfo = new VServerInfo(params); + } + + @Test(expected = MissingParameterException.class) + public void testConstructorWithEmptyTenantId() throws MissingParameterException { + Map params = new HashMap<>(); + params.put("vserverId", "testVserverId"); + params.put("tenantId", ""); + vServerInfo = new VServerInfo(params); + } }