1 package org.onap.so.client.cds.beans;
3 import static org.junit.Assert.assertEquals;
4 import static org.junit.Assert.assertNotNull;
5 import org.junit.Before;
8 public class ConfigDeployPropertiesForPnfTest {
10 ConfigDeployPropertiesForPnf configDeployPropertiesForPnf = new ConfigDeployPropertiesForPnf();
11 private static final String TEST_SERVICE_MODEL_UUID = "service-model-uuid";
12 private static final String TEST_PNF_CUSTOMIZATION_UUID = "pnf-customization-uuid";
13 private static final String TEST_PNF_ID = "pnf-id";
14 private static final String TEST_PNF_NAME = "pnf-name";
15 private static final String TEST_PNF_IP_V4_ADDRESS = "1.1.1.1";
16 private static final String TEST_PNF_IP_V6_ADDRESS = "::/128";
17 private static final String TEST_SERVICE_INSTANCE_ID = "service-instance-id";
21 configDeployPropertiesForPnf.setServiceInstanceId(TEST_SERVICE_INSTANCE_ID);
22 configDeployPropertiesForPnf.setServiceModelUuid(TEST_SERVICE_MODEL_UUID);
23 configDeployPropertiesForPnf.setPnfCustomizationUuid(TEST_PNF_CUSTOMIZATION_UUID);
24 configDeployPropertiesForPnf.setPnfId(TEST_PNF_ID);
25 configDeployPropertiesForPnf.setPnfName(TEST_PNF_NAME);
26 configDeployPropertiesForPnf.setPnfIpV4Address(TEST_PNF_IP_V4_ADDRESS);
27 configDeployPropertiesForPnf.setPnfIpV6Address(TEST_PNF_IP_V6_ADDRESS);
31 public final void testConfigDeployPropertiesForPnfTest() {
32 assertNotNull(configDeployPropertiesForPnf.getServiceInstanceId());
33 assertNotNull(configDeployPropertiesForPnf.getServiceModelUuid());
34 assertNotNull(configDeployPropertiesForPnf.getPnfCustomizationUuid());
35 assertNotNull(configDeployPropertiesForPnf.getPnfId());
36 assertNotNull(configDeployPropertiesForPnf.getPnfName());
38 assertEquals(TEST_SERVICE_INSTANCE_ID, configDeployPropertiesForPnf.getServiceInstanceId());
39 assertEquals(TEST_SERVICE_MODEL_UUID, configDeployPropertiesForPnf.getServiceModelUuid());
40 assertEquals(TEST_PNF_CUSTOMIZATION_UUID, configDeployPropertiesForPnf.getPnfCustomizationUuid());
41 assertEquals(TEST_PNF_ID, configDeployPropertiesForPnf.getPnfId());
42 assertEquals(TEST_PNF_NAME, configDeployPropertiesForPnf.getPnfName());
43 assertEquals(TEST_PNF_IP_V4_ADDRESS, configDeployPropertiesForPnf.getPnfIpV4Address());
44 assertEquals(TEST_PNF_IP_V6_ADDRESS, configDeployPropertiesForPnf.getPnfIpV6Address());
49 public void testtoString() {
50 final StringBuilder sb = new StringBuilder("{");
51 sb.append("\"service-instance-id\":").append("\"").append(TEST_SERVICE_INSTANCE_ID).append("\"");
52 sb.append(", \"pnf-id\":").append("\"").append(TEST_PNF_ID).append("\"");
53 sb.append(", \"pnf-name\":").append("\"").append(TEST_PNF_NAME).append("\"");
54 sb.append(", \"pnf-ipv4-address\":").append("\"").append(TEST_PNF_IP_V4_ADDRESS).append("\"");
55 sb.append(", \"pnf-ipv6-address\":").append("\"").append(TEST_PNF_IP_V6_ADDRESS).append("\"");
56 sb.append(", \"service-model-uuid\":").append("\"").append(TEST_SERVICE_MODEL_UUID).append("\"");
57 sb.append(", \"pnf-customization-uuid\":").append("\"").append(TEST_PNF_CUSTOMIZATION_UUID).append("\"");
59 String Expexted = sb.toString();
60 assertEquals(Expexted, configDeployPropertiesForPnf.toString());