summaryrefslogtreecommitdiffstats
path: root/appc-dg/appc-dg-shared/appc-dg-domain-model-lib
diff options
context:
space:
mode:
Diffstat (limited to 'appc-dg/appc-dg-shared/appc-dg-domain-model-lib')
-rw-r--r--appc-dg/appc-dg-shared/appc-dg-domain-model-lib/src/main/java/org/onap/appc/domainmodel/Vnfc.java10
-rw-r--r--appc-dg/appc-dg-shared/appc-dg-domain-model-lib/src/test/java/org/onap/appc/domainmodel/TestVnfc.java27
2 files changed, 28 insertions, 9 deletions
diff --git a/appc-dg/appc-dg-shared/appc-dg-domain-model-lib/src/main/java/org/onap/appc/domainmodel/Vnfc.java b/appc-dg/appc-dg-shared/appc-dg-domain-model-lib/src/main/java/org/onap/appc/domainmodel/Vnfc.java
index f908286bd..d5e201b22 100644
--- a/appc-dg/appc-dg-shared/appc-dg-domain-model-lib/src/main/java/org/onap/appc/domainmodel/Vnfc.java
+++ b/appc-dg/appc-dg-shared/appc-dg-domain-model-lib/src/main/java/org/onap/appc/domainmodel/Vnfc.java
@@ -33,6 +33,7 @@ public class Vnfc {
private String resilienceType;
private boolean mandatory;
private String vnfcName;
+ private String vnfcFunctionCode;
private List<Vserver> vserverList;
public Vnfc(){
@@ -124,7 +125,16 @@ public class Vnfc {
public void setVnfcName(String vnfcName) {
this.vnfcName = vnfcName;
}
+
+ public String getVnfcFunctionCode() {
+ return vnfcFunctionCode;
+ }
+
+ public void setVnfcFunctionCode(String vnfcFunctionCode) {
+ this.vnfcFunctionCode = vnfcFunctionCode;
+ }
+
public List<Vserver> getVserverList() {
return vserverList;
}
diff --git a/appc-dg/appc-dg-shared/appc-dg-domain-model-lib/src/test/java/org/onap/appc/domainmodel/TestVnfc.java b/appc-dg/appc-dg-shared/appc-dg-domain-model-lib/src/test/java/org/onap/appc/domainmodel/TestVnfc.java
index 21936ac47..6069d47eb 100644
--- a/appc-dg/appc-dg-shared/appc-dg-domain-model-lib/src/test/java/org/onap/appc/domainmodel/TestVnfc.java
+++ b/appc-dg/appc-dg-shared/appc-dg-domain-model-lib/src/test/java/org/onap/appc/domainmodel/TestVnfc.java
@@ -45,21 +45,28 @@ public class TestVnfc {
public void testGetVnfcType() {
vnfc.setVnfcType("1");
assertNotNull(vnfc.getVnfcType());
- assertEquals(vnfc.getVnfcType(), "1");
+ assertEquals("1", vnfc.getVnfcType());
}
@Test
public void testGetResilienceType() {
vnfc.setResilienceType("resilienceType");
assertNotNull(vnfc.getResilienceType());
- assertEquals(vnfc.getResilienceType(), "resilienceType");
+ assertEquals("resilienceType", vnfc.getResilienceType());
}
@Test
public void testGetVnfcName() {
vnfc.setVnfcName("vnfcName");
assertNotNull(vnfc.getVnfcName());
- assertEquals(vnfc.getVnfcName(), "vnfcName");
+ assertEquals("vnfcName", vnfc.getVnfcName());
+ }
+
+ @Test
+ public void testGetVnfcFunctionCode() {
+ vnfc.setVnfcFunctionCode("vnfcFunctionCode");
+ assertNotNull(vnfc.getVnfcFunctionCode());
+ assertEquals("vnfcFunctionCode", vnfc.getVnfcFunctionCode());
}
@Test
@@ -67,14 +74,14 @@ public class TestVnfc {
List<Vserver> vserverList = new LinkedList<>();
vnfc.setVserverList(vserverList);
assertNotNull(vnfc.getVserverList());
- assertEquals(vnfc.getVserverList(), vserverList);
+ assertEquals(vserverList, vnfc.getVserverList());
}
@Test
public void testIsMandatory() {
vnfc.setMandatory(false);
assertNotNull(vnfc.isMandatory());
- assertEquals(vnfc.isMandatory(), false);
+ assertEquals(false, vnfc.isMandatory());
}
@Test
@@ -93,8 +100,9 @@ public class TestVnfc {
System.out.println("ok vnfc = " + vnfc.toString());
- assertEquals(vnfc.toString(),
- "Vnfc : vnfcType = B, vnfcName = A, resilienceType = null, mandatory = falseVserver : url = http://v1.net, tenantId = V1-T1, id = V1 ,relatedLink = V1-relatedlink , name = V1-Name, \n");
+ assertEquals(
+ "Vnfc : vnfcType = B, vnfcName = A, resilienceType = null, mandatory = falseVserver : url = http://v1.net, tenantId = V1-T1, id = V1 ,relatedLink = V1-relatedlink , name = V1-Name, \n",
+ vnfc.toString());
}
@Test
@@ -153,8 +161,9 @@ public class TestVnfc {
System.out.println("vnfc = " + vnfc.toString());
- assertEquals(vnfc.toString(),
- "Vnfc : vnfcType = B, vnfcName = A, resilienceType = null, mandatory = falseVserver : url = http://v1.net, tenantId = V1-T1, id = V1 ,relatedLink = V1-relatedlink , name = V1-Name, \n");
+ assertEquals(
+ "Vnfc : vnfcType = B, vnfcName = A, resilienceType = null, mandatory = falseVserver : url = http://v1.net, tenantId = V1-T1, id = V1 ,relatedLink = V1-relatedlink , name = V1-Name, \n",
+ vnfc.toString());
}
@Test