summaryrefslogtreecommitdiffstats
path: root/appc-dg
diff options
context:
space:
mode:
authorSandeep J <sandeejh@in.ibm.com>2018-08-17 15:30:35 +0530
committerTakamune Cho <tc012c@att.com>2018-08-17 14:35:31 +0000
commitec0de90656d445a56164bd7416bf4f4c403f01cd (patch)
tree4f8b09cb6819f0af7e9debb5e6037d3ac81e27c2 /appc-dg
parent53d565957de90e11ca3022201f5b6f9d7d3332bb (diff)
added test case to TestVnf.java
to increase code coverage Issue-ID: APPC-1086 Change-Id: I19bb65887308029ec991074175e64bc151962677 Signed-off-by: Sandeep J <sandeejh@in.ibm.com>
Diffstat (limited to 'appc-dg')
-rw-r--r--appc-dg/appc-dg-shared/appc-dg-domain-model-lib/src/test/java/org/onap/appc/domainmodel/TestVnf.java15
1 files changed, 14 insertions, 1 deletions
diff --git a/appc-dg/appc-dg-shared/appc-dg-domain-model-lib/src/test/java/org/onap/appc/domainmodel/TestVnf.java b/appc-dg/appc-dg-shared/appc-dg-domain-model-lib/src/test/java/org/onap/appc/domainmodel/TestVnf.java
index 0503a7ce4..6ddb37ba1 100644
--- a/appc-dg/appc-dg-shared/appc-dg-domain-model-lib/src/test/java/org/onap/appc/domainmodel/TestVnf.java
+++ b/appc-dg/appc-dg-shared/appc-dg-domain-model-lib/src/test/java/org/onap/appc/domainmodel/TestVnf.java
@@ -105,8 +105,21 @@ public class TestVnf {
@Test
public void testGetSetIdentityUrl()
{
- Vnf vnf = new Vnf();
vnf.setIdentityUrl("testIdentityUrl");
assertEquals("testIdentityUrl", vnf.getIdentityUrl());
}
+
+ @Test
+ public void testAddVserver()
+ {
+ Vserver vserver = new Vserver();
+ vserver.setId("V1");
+ vserver.setName("V1-Name");
+ vserver.setRelatedLink("V1-relatedlink");
+ vserver.setTenantId("V1-T1");
+ vserver.setUrl("http://v1.net");
+ vnf.addVserver(vserver);
+ assertEquals(1, vnf.getVservers().size());
+ assertEquals(vserver, vnf.getVservers().get(0));
+ }
}