Environment-Junit Test Case Added 57/77557/3
authorSudarshan Kumar <sudars19@in.ibm.com>
Wed, 30 Jan 2019 07:00:37 +0000 (12:30 +0530)
committerPatrick Brady <patrick.brady@att.com>
Wed, 30 Jan 2019 21:54:20 +0000 (21:54 +0000)
Environment-Junit Test Case Added

Issue-ID: APPC-1372
Change-Id: I571f2417eb69e5d7c3ec451ef0b778eb79dde92e
Signed-off-by: Sudarshan Kumar <sudars19@in.ibm.com>
appc-adapters/appc-iaas-adapter/appc-iaas-adapter-bundle/src/test/java/org/onap/appc/adapter/openstack/heat/model/TestEnvironment.java [new file with mode: 0644]

diff --git a/appc-adapters/appc-iaas-adapter/appc-iaas-adapter-bundle/src/test/java/org/onap/appc/adapter/openstack/heat/model/TestEnvironment.java b/appc-adapters/appc-iaas-adapter/appc-iaas-adapter-bundle/src/test/java/org/onap/appc/adapter/openstack/heat/model/TestEnvironment.java
new file mode 100644 (file)
index 0000000..505c2fa
--- /dev/null
@@ -0,0 +1,62 @@
+/*
+ * ============LICENSE_START==========================================
+ * org.onap.music
+ * ===================================================================
+ *  Copyright (c) 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
+ * 
+ *     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.assertNotNull;
+import static org.junit.Assert.assertSame;
+
+import org.junit.Before;
+import org.junit.Test;
+
+public class TestEnvironment {
+
+    private Environment environment;
+    private Parameters parameters;
+    private ResourceRegistry resourceRegistry;
+
+    @Before
+    public void setUp() {
+        environment = new Environment();
+        parameters = new Parameters();
+        resourceRegistry = new ResourceRegistry();
+    }
+
+    @Test
+    public void testGetParameters() {
+        environment.setParameters(parameters);
+        assertNotNull(environment.getParameters());
+        assertSame(parameters, environment.getParameters());
+    }
+
+    @Test
+    public void testGetResourceRegistry() {
+        environment.setResourceRegistry(resourceRegistry);
+        assertNotNull(environment.getResourceRegistry());
+        assertSame(resourceRegistry, environment.getResourceRegistry());
+    }
+
+    @Test
+    public void testToString() {
+        environment.setResourceRegistry(resourceRegistry);
+        assertNotNull(environment.toString());
+    }
+}