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