aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--appc-adapters/appc-iaas-adapter/appc-iaas-adapter-bundle/src/test/java/org/onap/appc/adapter/openstack/heat/model/TestSnapshot.java75
-rw-r--r--appc-adapters/appc-iaas-adapter/appc-iaas-adapter-bundle/src/test/java/org/onap/appc/adapter/openstack/heat/model/TestSnapshotRestoreResponse.java61
-rw-r--r--appc-adapters/appc-iaas-adapter/appc-iaas-adapter-bundle/src/test/java/org/onap/appc/adapter/openstack/heat/model/TestTemplate.java48
-rw-r--r--appc-adapters/appc-iaas-adapter/appc-iaas-adapter-bundle/src/test/java/org/onap/appc/adapter/openstack/heat/model/TestVolume.java47
-rw-r--r--appc-adapters/appc-iaas-adapter/appc-iaas-adapter-bundle/src/test/java/org/onap/appc/adapter/openstack/heat/model/TestVolume_.java75
5 files changed, 306 insertions, 0 deletions
diff --git a/appc-adapters/appc-iaas-adapter/appc-iaas-adapter-bundle/src/test/java/org/onap/appc/adapter/openstack/heat/model/TestSnapshot.java b/appc-adapters/appc-iaas-adapter/appc-iaas-adapter-bundle/src/test/java/org/onap/appc/adapter/openstack/heat/model/TestSnapshot.java
new file mode 100644
index 000000000..1adc63e87
--- /dev/null
+++ b/appc-adapters/appc-iaas-adapter/appc-iaas-adapter-bundle/src/test/java/org/onap/appc/adapter/openstack/heat/model/TestSnapshot.java
@@ -0,0 +1,75 @@
+/*
+* ============LICENSE_START=======================================================
+* ONAP : APPC
+* ================================================================================
+* Copyright 2018 TechMahindra
+*=================================================================================
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+* ============LICENSE_END=========================================================
+*/
+package org.onap.appc.adapter.openstack.heat.model;
+
+import static org.junit.Assert.*;
+
+import org.junit.Before;
+import org.junit.Test;
+
+public class TestSnapshot {
+ private Snapshot snapshot;
+
+ @Before
+ public void setUp() {
+ snapshot = new Snapshot();
+ }
+
+ @Test
+ public void testGetBackupId() {
+ snapshot.setId("222");
+ assertNotNull(snapshot.getId());
+ assertEquals(snapshot.getId(), "222");
+ }
+
+ @Test
+ public void testGetName() {
+ snapshot.setName("ABC");
+ assertNotNull(snapshot.getName());
+ assertEquals(snapshot.getName(), "ABC");
+ }
+
+ @Test
+ public void testGetStatus() {
+ snapshot.setStatus("status");
+ assertNotNull(snapshot.getStatus());
+ assertEquals(snapshot.getStatus(), "status");
+ }
+
+ @Test
+ public void testGetStatusReason() {
+ snapshot.setStatusReason("statusReason");
+ assertNotNull(snapshot.getStatusReason());
+ assertEquals(snapshot.getStatusReason(), "statusReason");
+ }
+
+ @Test
+ public void testGetCreationTime() {
+ snapshot.setCreationTime("01-March-2018");
+ assertNotNull(snapshot.getCreationTime());
+ assertEquals(snapshot.getCreationTime(), "01-March-2018");
+ }
+
+ @Test
+ public void testToString_ReturnNonEmptyString() {
+ assertNotEquals(snapshot.toString(), "");
+ assertNotEquals(snapshot.toString(), null);
+ }
+}
diff --git a/appc-adapters/appc-iaas-adapter/appc-iaas-adapter-bundle/src/test/java/org/onap/appc/adapter/openstack/heat/model/TestSnapshotRestoreResponse.java b/appc-adapters/appc-iaas-adapter/appc-iaas-adapter-bundle/src/test/java/org/onap/appc/adapter/openstack/heat/model/TestSnapshotRestoreResponse.java
new file mode 100644
index 000000000..3947161d8
--- /dev/null
+++ b/appc-adapters/appc-iaas-adapter/appc-iaas-adapter-bundle/src/test/java/org/onap/appc/adapter/openstack/heat/model/TestSnapshotRestoreResponse.java
@@ -0,0 +1,61 @@
+/*
+* ============LICENSE_START=======================================================
+* ONAP : APPC
+* ================================================================================
+* Copyright 2018 TechMahindra
+*=================================================================================
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+* ============LICENSE_END=========================================================
+*/
+package org.onap.appc.adapter.openstack.heat.model;
+
+import static org.junit.Assert.*;
+
+import org.junit.Before;
+import org.junit.Test;
+
+public class TestSnapshotRestoreResponse {
+ private SnapshotRestoreResponse snapshotRestoreResponse;
+
+ @Before
+ public void setUp() {
+ snapshotRestoreResponse = new SnapshotRestoreResponse();
+ }
+
+ @Test
+ public void testGetCode() {
+ snapshotRestoreResponse.setCode("200");
+ assertNotNull(snapshotRestoreResponse.getCode());
+ assertEquals(snapshotRestoreResponse.getCode(), "200");
+ }
+
+ @Test
+ public void testMessage() {
+ snapshotRestoreResponse.setMessage("Success");
+ assertNotNull(snapshotRestoreResponse.getMessage());
+ assertEquals(snapshotRestoreResponse.getMessage(), "Success");
+ }
+
+ @Test
+ public void testTitle() {
+ snapshotRestoreResponse.setTitle("A1");
+ assertNotNull(snapshotRestoreResponse.getTitle());
+ assertEquals(snapshotRestoreResponse.getTitle(), "A1");
+ }
+
+ @Test
+ public void testToString_ReturnNonEmptyString() {
+ assertNotEquals(snapshotRestoreResponse.toString(), "");
+ assertNotEquals(snapshotRestoreResponse.toString(), null);
+ }
+}
diff --git a/appc-adapters/appc-iaas-adapter/appc-iaas-adapter-bundle/src/test/java/org/onap/appc/adapter/openstack/heat/model/TestTemplate.java b/appc-adapters/appc-iaas-adapter/appc-iaas-adapter-bundle/src/test/java/org/onap/appc/adapter/openstack/heat/model/TestTemplate.java
new file mode 100644
index 000000000..e22548077
--- /dev/null
+++ b/appc-adapters/appc-iaas-adapter/appc-iaas-adapter-bundle/src/test/java/org/onap/appc/adapter/openstack/heat/model/TestTemplate.java
@@ -0,0 +1,48 @@
+/*
+* ============LICENSE_START=======================================================
+* ONAP : APPC
+* ================================================================================
+* Copyright 2018 TechMahindra
+*=================================================================================
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+* ============LICENSE_END=========================================================
+*/
+package org.onap.appc.adapter.openstack.heat.model;
+
+import static org.junit.Assert.*;
+
+import org.junit.Before;
+import org.junit.Test;
+
+public class TestTemplate {
+ private Template template;
+
+ @Before
+ public void setUp() {
+ template = new Template();
+ }
+
+ @Test
+ public void testGetHeatTemplateVersion() {
+ template.setHeatTemplateVersion("1.0");
+ assertNotNull(template.getHeatTemplateVersion());
+ assertEquals(template.getHeatTemplateVersion(), "1.0");
+ }
+
+ @Test
+ public void testToString_ReturnNonEmptyString() {
+ assertNotEquals(template.toString(), "");
+ assertNotEquals(template.toString(), null);
+ }
+
+}
diff --git a/appc-adapters/appc-iaas-adapter/appc-iaas-adapter-bundle/src/test/java/org/onap/appc/adapter/openstack/heat/model/TestVolume.java b/appc-adapters/appc-iaas-adapter/appc-iaas-adapter-bundle/src/test/java/org/onap/appc/adapter/openstack/heat/model/TestVolume.java
new file mode 100644
index 000000000..c70c261c4
--- /dev/null
+++ b/appc-adapters/appc-iaas-adapter/appc-iaas-adapter-bundle/src/test/java/org/onap/appc/adapter/openstack/heat/model/TestVolume.java
@@ -0,0 +1,47 @@
+/*
+* ============LICENSE_START=======================================================
+* ONAP : APPC
+* ================================================================================
+* Copyright 2018 TechMahindra
+*=================================================================================
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+* ============LICENSE_END=========================================================
+*/
+package org.onap.appc.adapter.openstack.heat.model;
+
+import static org.junit.Assert.*;
+
+import org.junit.Before;
+import org.junit.Test;
+
+public class TestVolume {
+ private Volume volume;
+
+ @Before
+ public void setUp() {
+ volume = new Volume();
+ }
+
+ @Test
+ public void testGetType() {
+ volume.setType("A");
+ assertNotNull(volume.getType());
+ assertEquals(volume.getType(), "A");
+ }
+
+ @Test
+ public void testToString_ReturnNonEmptyString() {
+ assertNotEquals(volume.toString(), "");
+ assertNotEquals(volume.toString(), null);
+ }
+}
diff --git a/appc-adapters/appc-iaas-adapter/appc-iaas-adapter-bundle/src/test/java/org/onap/appc/adapter/openstack/heat/model/TestVolume_.java b/appc-adapters/appc-iaas-adapter/appc-iaas-adapter-bundle/src/test/java/org/onap/appc/adapter/openstack/heat/model/TestVolume_.java
new file mode 100644
index 000000000..f20cea445
--- /dev/null
+++ b/appc-adapters/appc-iaas-adapter/appc-iaas-adapter-bundle/src/test/java/org/onap/appc/adapter/openstack/heat/model/TestVolume_.java
@@ -0,0 +1,75 @@
+/*
+* ============LICENSE_START=======================================================
+* ONAP : APPC
+* ================================================================================
+* Copyright 2018 TechMahindra
+*=================================================================================
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+* ============LICENSE_END=========================================================
+*/
+package org.onap.appc.adapter.openstack.heat.model;
+
+import static org.junit.Assert.*;
+
+import org.junit.Before;
+import org.junit.Test;
+
+public class TestVolume_ {
+ private Volume_ volume_;
+
+ @Before
+ public void setUp() {
+ volume_ = new Volume_();
+ }
+
+ @Test
+ public void testGetStatus() {
+ volume_.setStatus("Success");
+ assertNotNull(volume_.getStatus());
+ assertEquals(volume_.getStatus(), "Success");
+ }
+
+ @Test
+ public void testGetName() {
+ volume_.setName("XYZ");
+ assertNotNull(volume_.getName());
+ assertEquals(volume_.getName(), "XYZ");
+ }
+
+ @Test
+ public void testGetResourceId() {
+ volume_.setResourceId("333");
+ assertNotNull(volume_.getResourceId());
+ assertEquals(volume_.getResourceId(), "333");
+ }
+
+ @Test
+ public void testGetAction() {
+ volume_.setAction("action");
+ assertNotNull(volume_.getAction());
+ assertEquals(volume_.getAction(), "action");
+ }
+
+ @Test
+ public void testGetType() {
+ volume_.setType("A");
+ assertNotNull(volume_.getType());
+ assertEquals(volume_.getType(), "A");
+ }
+
+ @Test
+ public void testToString_ReturnNonEmptyString() {
+ assertNotEquals(volume_.toString(), "");
+ assertNotEquals(volume_.toString(), null);
+ }
+}