From 9c018402d46127218dd8ed2bf67ed41f925b2305 Mon Sep 17 00:00:00 2001 From: Sandeep J Date: Tue, 26 Mar 2019 13:10:29 +0530 Subject: added test cases to TestVServerInfo.java to increase code coverage Issue-ID: APPC-1086 Change-Id: I1141fa522e3c4943c2a51d9c585cdcaa0186b373 Signed-off-by: Sandeep J --- .../org/onap/appc/aai/client/aai/TestVServerInfo.java | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'appc-outbound/appc-aai-client') 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); + } } -- cgit 1.2.3-korg