License agreement changes
[so.git] / bpmn / MSOCommonBPMN / src / test / java / org / onap / so / client / cds / beans / ConfigDeployPropertiesForVnfTest.java
1 /*-
2  * ============LICENSE_START=======================================================
3  * ONAP - SO
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
10  *
11  *      http://www.apache.org/licenses/LICENSE-2.0
12  *
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=========================================================
19  */
20
21 package org.onap.so.client.cds.beans;
22
23 import static org.junit.Assert.assertEquals;
24 import static org.junit.Assert.assertNotNull;
25 import org.junit.Test;
26
27 public class ConfigDeployPropertiesForVnfTest {
28     ConfigDeployPropertiesForVnf configDeployPropertiesForVnf = new ConfigDeployPropertiesForVnf();
29     private String serviceInstanceId;
30     private String vnfId;
31     private String vnfName;
32     private String serviceModelUuid;
33     private String vnfCustomizationUuid;
34
35     @Test
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());
47
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());
53     }
54
55     @Test
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("\"");
63         sb.append('}');
64         String Expexted = sb.toString();
65         assertEquals(Expexted, configDeployPropertiesForVnf.toString());
66
67     }
68 }