2 * ============LICENSE_START=======================================================
4 * ================================================================================
5 * Copyright (C) 2019 TechMahindra
6 * ================================================================================
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
11 * http://www.apache.org/licenses/LICENSE-2.0
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
18 * ============LICENSE_END=========================================================
21 package org.onap.so.client.cds.beans;
23 import static org.junit.Assert.assertEquals;
24 import static org.junit.Assert.assertNotNull;
25 import org.junit.Test;
27 public class ConfigDeployPropertiesForVnfTest {
28 ConfigDeployPropertiesForVnf configDeployPropertiesForVnf = new ConfigDeployPropertiesForVnf();
29 private String serviceInstanceId;
31 private String vnfName;
32 private String serviceModelUuid;
33 private String vnfCustomizationUuid;
36 public final void testConfigDeployPropertiesForVnf() {
37 configDeployPropertiesForVnf.setServiceInstanceId("service-instance-id");
38 configDeployPropertiesForVnf.setServiceModelUuid("service-model-uuid");
39 configDeployPropertiesForVnf.setVnfCustomizationUuid("vnf-customization-uuid");
40 configDeployPropertiesForVnf.setVnfId("vnf-id");
41 configDeployPropertiesForVnf.setVnfName("vnf-name");
42 assertNotNull(configDeployPropertiesForVnf.getServiceInstanceId());
43 assertNotNull(configDeployPropertiesForVnf.getServiceModelUuid());
44 assertNotNull(configDeployPropertiesForVnf.getVnfCustomizationUuid());
45 assertNotNull(configDeployPropertiesForVnf.getVnfId());
46 assertNotNull(configDeployPropertiesForVnf.getVnfName());
48 assertEquals("service-instance-id", configDeployPropertiesForVnf.getServiceInstanceId());
49 assertEquals("service-model-uuid", configDeployPropertiesForVnf.getServiceModelUuid());
50 assertEquals("vnf-customization-uuid", configDeployPropertiesForVnf.getVnfCustomizationUuid());
51 assertEquals("vnf-id", configDeployPropertiesForVnf.getVnfId());
52 assertEquals("vnf-name", configDeployPropertiesForVnf.getVnfName());
56 public void testtoString() {
57 final StringBuilder sb = new StringBuilder("{");
58 sb.append("\"service-instance-id\":").append("\"").append(serviceInstanceId).append("\"");
59 sb.append(", \"vnf-id\":").append("\"").append(vnfId).append("\"");
60 sb.append(", \"vnf-name\":").append("\"").append(vnfName).append("\"");
61 sb.append(", \"service-model-uuid\":").append("\"").append(serviceModelUuid).append("\"");
62 sb.append(", \"vnf-customization-uuid\":").append("\"").append(vnfCustomizationUuid).append("\"");
64 String Expexted = sb.toString();
65 assertEquals(Expexted, configDeployPropertiesForVnf.toString());