--- /dev/null
+/*\r
+* ============LICENSE_START=======================================================\r
+* ONAP : SO\r
+* ================================================================================\r
+* Copyright 2018 TechMahindra\r
+*=================================================================================\r
+* Licensed under the Apache License, Version 2.0 (the "License");\r
+* you may not use this file except in compliance with the License.\r
+* You may obtain a copy of the License at\r
+*\r
+* http://www.apache.org/licenses/LICENSE-2.0\r
+*\r
+* Unless required by applicable law or agreed to in writing, software\r
+* distributed under the License is distributed on an "AS IS" BASIS,\r
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+* See the License for the specific language governing permissions and\r
+* limitations under the License.\r
+* ============LICENSE_END=========================================================\r
+*/\r
+package org.openecomp.mso.adapters.vnf;\r
+import static org.junit.Assert.assertEquals;\r
+import org.junit.Test;\r
+public class VfRollbackTest {\r
+ private VfRollback vfRollback = new VfRollback();\r
+\r
+ @Test\r
+ public void test() {\r
+ vfRollback.setVnfId("vnfId");\r
+ vfRollback.setTenantId("tenantId");\r
+ vfRollback.setCloudSiteId("cloudId");\r
+ vfRollback.setTenantCreated(true);\r
+ vfRollback.setVnfCreated(true);\r
+ vfRollback.setMsoRequest(null);\r
+ vfRollback.setVolumeGroupName("volumeGroupName");\r
+ vfRollback.setVolumeGroupId("volumeGroupId");\r
+ vfRollback.setRequestType("requestType");\r
+ vfRollback.setVolumeGroupHeatStackId("volumeGroupHeatStackId");\r
+ vfRollback.setBaseGroupHeatStackId("baseGroupHeatStackId");\r
+ vfRollback.setIsBase(true);\r
+ vfRollback.setVfModuleStackId("vfModuleStackId");\r
+ assert(vfRollback.getVnfId() != null);\r
+ assert(vfRollback.getTenantId() != null);\r
+ assert(vfRollback.getCloudSiteId() != null);\r
+ assert(vfRollback.getVolumeGroupName() != null);\r
+ assert(vfRollback.getVolumeGroupId() != null);\r
+ assert(vfRollback.getRequestType() != null);\r
+ assert(vfRollback.getVolumeGroupHeatStackId() != null);\r
+ assert(vfRollback.getBaseGroupHeatStackId() != null);\r
+ assert(vfRollback.getVfModuleStackId() != null);\r
+ assertEquals(vfRollback.getVnfId(), "vnfId");\r
+ assertEquals(vfRollback.getTenantId(),"tenantId");\r
+ assertEquals(vfRollback.getCloudSiteId(), "cloudId");\r
+ assertEquals(vfRollback.getTenantCreated(), true);\r
+ assertEquals(vfRollback.getVnfCreated(), true);\r
+ assertEquals(vfRollback.getMsoRequest(), null);\r
+ assertEquals(vfRollback.getVolumeGroupName(), "volumeGroupName");\r
+ assertEquals(vfRollback.getVolumeGroupId(), "volumeGroupId");\r
+ assertEquals(vfRollback.getRequestType(), "requestType");\r
+ assertEquals(vfRollback.getVolumeGroupHeatStackId(), "volumeGroupHeatStackId");\r
+ assertEquals(vfRollback.getBaseGroupHeatStackId(), "baseGroupHeatStackId");\r
+ assertEquals(vfRollback.isBase(), true);\r
+ assertEquals(vfRollback.getVfModuleStackId(), "vfModuleStackId"); \r
+ }\r
+ \r
+ @Test\r
+ public void testtoString() {\r
+ assert(vfRollback.toString() != null);\r
+ }\r
+}\r