diff options
author | Sandeep J <sandeejh@in.ibm.com> | 2019-03-28 15:20:51 +0530 |
---|---|---|
committer | Patrick Brady <patrick.brady@att.com> | 2019-03-28 17:32:14 +0000 |
commit | c59de000d948ce0d6861a0724642249b4af3821e (patch) | |
tree | b516ebeb38100643a3012d543ec65747c94eb2da /appc-outbound/appc-aai-client/provider | |
parent | 0b1b38d7e059598e8935fb3c38a45b51bd3a1411 (diff) |
added test cases to TestVServerInfo.java
to increase code coverage
Issue-ID: APPC-1086
Change-Id: Ib6fb537e576f928552763ec0e6d1abf2d556f00a
Signed-off-by: Sandeep J <sandeejh@in.ibm.com>
Diffstat (limited to 'appc-outbound/appc-aai-client/provider')
-rw-r--r-- | appc-outbound/appc-aai-client/provider/src/test/java/org/onap/appc/aai/client/aai/TestVServerInfo.java | 19 |
1 files changed, 19 insertions, 0 deletions
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 728d2704b..5da52d349 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 @@ -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); + } } |