Containerization feature of SO
[so.git] / adapters / mso-openstack-adapters / src / test / java / org / onap / so / adapters / vnf / VfRollbackTest.java
1 /*
2 * ============LICENSE_START=======================================================
3  * ONAP : SO
4  * ================================================================================
5  * Copyright (C) 2018 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 package org.onap.so.adapters.vnf;
21 import static org.junit.Assert.assertEquals;
22
23 import org.junit.Test;
24 public class VfRollbackTest {
25         private VfRollback vfRollback = new VfRollback();
26
27         @Test
28         public void test() {
29                 vfRollback.setVnfId("vnfId");
30                 vfRollback.setTenantId("tenantId");
31                 vfRollback.setCloudSiteId("cloudId");
32                 vfRollback.setTenantCreated(true);
33                 vfRollback.setVnfCreated(true);
34                 vfRollback.setMsoRequest(null);
35                 vfRollback.setVolumeGroupName("volumeGroupName");
36                 vfRollback.setVolumeGroupId("volumeGroupId");
37                 vfRollback.setRequestType("requestType");
38                 vfRollback.setVolumeGroupHeatStackId("volumeGroupHeatStackId");
39                 vfRollback.setBaseGroupHeatStackId("baseGroupHeatStackId");
40                 vfRollback.setIsBase(true);
41                 vfRollback.setVfModuleStackId("vfModuleStackId");
42                 assert(vfRollback.getVnfId() != null);
43                 assert(vfRollback.getTenantId() != null);
44                 assert(vfRollback.getCloudSiteId() != null);
45                 assert(vfRollback.getVolumeGroupName() != null);
46                 assert(vfRollback.getVolumeGroupId() != null);
47                 assert(vfRollback.getRequestType() != null);
48                 assert(vfRollback.getVolumeGroupHeatStackId() != null);
49                 assert(vfRollback.getBaseGroupHeatStackId() != null);
50                 assert(vfRollback.getVfModuleStackId() != null);
51                 assertEquals("vnfId", vfRollback.getVnfId());
52                 assertEquals("tenantId", vfRollback.getTenantId());
53                 assertEquals("cloudId", vfRollback.getCloudSiteId());
54                 assertEquals(true,  vfRollback.getTenantCreated());
55                 assertEquals(true, vfRollback.getVnfCreated());
56                 assertEquals(null, vfRollback.getMsoRequest());
57                 assertEquals("volumeGroupName", vfRollback.getVolumeGroupName());
58                 assertEquals("volumeGroupId", vfRollback.getVolumeGroupId());
59                 assertEquals("requestType", vfRollback.getRequestType());
60                 assertEquals("volumeGroupHeatStackId", vfRollback.getVolumeGroupHeatStackId());
61                 assertEquals("baseGroupHeatStackId", vfRollback.getBaseGroupHeatStackId());
62                 assertEquals(true, vfRollback.isBase());
63                 assertEquals("vfModuleStackId", vfRollback.getVfModuleStackId());       
64         }
65         
66         @Test
67         public void testtoString() {
68                 assert(vfRollback.toString() != null);
69         }
70 }