2 * ============LICENSE_START======================================================= ONAP : SO
3 * ================================================================================ Copyright (C) 2018 TechMahindra
4 * ================================================================================ Licensed under the Apache License,
5 * Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
11 * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
12 * specific language governing permissions and limitations under the License.
13 * ============LICENSE_END=========================================================
15 package org.onap.so.adapters.vnf;
17 import static org.junit.Assert.assertEquals;
18 import org.junit.Test;
20 public class VfRollbackTest {
21 private VfRollback vfRollback = new VfRollback();
25 vfRollback.setVnfId("vnfId");
26 vfRollback.setTenantId("tenantId");
27 vfRollback.setCloudSiteId("cloudId");
28 vfRollback.setTenantCreated(true);
29 vfRollback.setVnfCreated(true);
30 vfRollback.setMsoRequest(null);
31 vfRollback.setVolumeGroupName("volumeGroupName");
32 vfRollback.setVolumeGroupId("volumeGroupId");
33 vfRollback.setRequestType("requestType");
34 vfRollback.setVolumeGroupHeatStackId("volumeGroupHeatStackId");
35 vfRollback.setBaseGroupHeatStackId("baseGroupHeatStackId");
36 vfRollback.setIsBase(true);
37 vfRollback.setVfModuleStackId("vfModuleStackId");
38 assert (vfRollback.getVnfId() != null);
39 assert (vfRollback.getTenantId() != null);
40 assert (vfRollback.getCloudSiteId() != null);
41 assert (vfRollback.getVolumeGroupName() != null);
42 assert (vfRollback.getVolumeGroupId() != null);
43 assert (vfRollback.getRequestType() != null);
44 assert (vfRollback.getVolumeGroupHeatStackId() != null);
45 assert (vfRollback.getBaseGroupHeatStackId() != null);
46 assert (vfRollback.getVfModuleStackId() != null);
47 assertEquals("vnfId", vfRollback.getVnfId());
48 assertEquals("tenantId", vfRollback.getTenantId());
49 assertEquals("cloudId", vfRollback.getCloudSiteId());
50 assertEquals(true, vfRollback.getTenantCreated());
51 assertEquals(true, vfRollback.getVnfCreated());
52 assertEquals(null, vfRollback.getMsoRequest());
53 assertEquals("volumeGroupName", vfRollback.getVolumeGroupName());
54 assertEquals("volumeGroupId", vfRollback.getVolumeGroupId());
55 assertEquals("requestType", vfRollback.getRequestType());
56 assertEquals("volumeGroupHeatStackId", vfRollback.getVolumeGroupHeatStackId());
57 assertEquals("baseGroupHeatStackId", vfRollback.getBaseGroupHeatStackId());
58 assertEquals(true, vfRollback.isBase());
59 assertEquals("vfModuleStackId", vfRollback.getVfModuleStackId());
63 public void testtoString() {
64 assert (vfRollback.toString() != null);