From 0b2b3cd7e8d18ed78046b3127aa1501c59b97f39 Mon Sep 17 00:00:00 2001 From: Sudarshan Kumar Date: Wed, 30 Jan 2019 12:30:37 +0530 Subject: Environment-Junit Test Case Added Environment-Junit Test Case Added Issue-ID: APPC-1372 Change-Id: I571f2417eb69e5d7c3ec451ef0b778eb79dde92e Signed-off-by: Sudarshan Kumar --- .../openstack/heat/model/TestEnvironment.java | 62 ++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 appc-adapters/appc-iaas-adapter/appc-iaas-adapter-bundle/src/test/java/org/onap/appc/adapter/openstack/heat/model/TestEnvironment.java 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 index 000000000..505c2fa5d --- /dev/null +++ b/appc-adapters/appc-iaas-adapter/appc-iaas-adapter-bundle/src/test/java/org/onap/appc/adapter/openstack/heat/model/TestEnvironment.java @@ -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()); + } +} -- cgit 1.2.3-korg