summaryrefslogtreecommitdiffstats
path: root/appc-adapters/appc-iaas-adapter/appc-iaas-adapter-bundle/src
diff options
context:
space:
mode:
Diffstat (limited to 'appc-adapters/appc-iaas-adapter/appc-iaas-adapter-bundle/src')
-rw-r--r--appc-adapters/appc-iaas-adapter/appc-iaas-adapter-bundle/src/test/java/org/onap/appc/adapter/openstack/heat/model/TestData.java66
1 files changed, 56 insertions, 10 deletions
diff --git a/appc-adapters/appc-iaas-adapter/appc-iaas-adapter-bundle/src/test/java/org/onap/appc/adapter/openstack/heat/model/TestData.java b/appc-adapters/appc-iaas-adapter/appc-iaas-adapter-bundle/src/test/java/org/onap/appc/adapter/openstack/heat/model/TestData.java
index 4d40dba36..34dcce22b 100644
--- a/appc-adapters/appc-iaas-adapter/appc-iaas-adapter-bundle/src/test/java/org/onap/appc/adapter/openstack/heat/model/TestData.java
+++ b/appc-adapters/appc-iaas-adapter/appc-iaas-adapter-bundle/src/test/java/org/onap/appc/adapter/openstack/heat/model/TestData.java
@@ -4,6 +4,8 @@
* ================================================================================
* Copyright 2018 TechMahindra
*=================================================================================
+* Modifications Copyright (c) 2018-2019 IBM
+*=================================================================================
* 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
@@ -19,65 +21,109 @@
*/
package org.onap.appc.adapter.openstack.heat.model;
-import static org.junit.Assert.*;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertSame;
import org.junit.Before;
import org.junit.Test;
public class TestData {
private Data data;
+ private Environment environment;
+ private Resources__ resources__;
+ private Template template;
@Before
public void setUp() {
- data=new Data();
+ data = new Data();
+ environment = new Environment();
+ resources__ = new Resources__();
+ template = new Template();
}
@Test
public void testGetStatus() {
data.setStatus("status");
assertNotNull(data.getStatus());
- assertEquals(data.getStatus(),"status");
+ assertEquals("status", data.getStatus());
}
@Test
public void testGetName() {
data.setName("XYZ");
assertNotNull(data.getName());
- assertEquals(data.getName(),"XYZ");
+ assertEquals("XYZ", data.getName());
}
@Test
public void testGetStackUserProjectId() {
data.setStackUserProjectId("stackUserProjectId");
assertNotNull(data.getStackUserProjectId());
- assertEquals(data.getStackUserProjectId(),"stackUserProjectId");
+ assertEquals("stackUserProjectId", data.getStackUserProjectId());
}
@Test
public void testGetAction() {
data.setAction("action");
assertNotNull(data.getAction());
- assertEquals(data.getAction(),"action");
+ assertEquals("action", data.getAction());
}
@Test
public void testGetProjectId() {
data.setProjectId("projectId");
assertNotNull(data.getProjectId());
- assertEquals(data.getProjectId(),"projectId");
+ assertEquals("projectId", data.getProjectId());
}
@Test
public void testGetId() {
data.setId("Id");
assertNotNull(data.getId());
- assertEquals(data.getId(),"Id");
+ assertEquals("Id", data.getId());
}
@Test
public void testToString_ReturnNonEmptyString() {
- assertNotEquals(data.toString(), "");
- assertNotEquals(data.toString(), null);
+ assertNotEquals("", data.toString());
+ assertNotEquals(null, data.toString());
+ }
+
+ @Test
+ public void testSetEnvironment() {
+ data.setEnvironment(environment);
+ assertNotNull(data.getEnvironment());
+ }
+
+ @Test
+ public void testGetEnvironment() {
+ data.setEnvironment(environment);
+ assertSame(environment, data.getEnvironment());
+ }
+
+ @Test
+ public void testSetTemplate() {
+ data.setTemplate(template);
+ assertNotNull(data.getTemplate());
}
+ @Test
+ public void testGetTemplate() {
+ data.setTemplate(template);
+ assertSame(template, data.getTemplate());
+ }
+
+ @Test
+ public void testSetResources__() {
+ data.setResources(resources__);
+ assertNotNull(data.getResources());
+ }
+
+ @Test
+ public void testGetResources__() {
+ data.setResources(resources__);
+ assertSame(resources__, data.getResources());
+ }
}