diff options
Diffstat (limited to 'plans/usecases-pnf-sw-upgrade/pnf-sw-upgrade/sorch/simulator/aai-simulator/src/test/java/org/onap/so/aaisimulator')
17 files changed, 258 insertions, 189 deletions
diff --git a/plans/usecases-pnf-sw-upgrade/pnf-sw-upgrade/sorch/simulator/aai-simulator/src/test/java/org/onap/so/aaisimulator/controller/AaiSimulatorControllerTest.java b/plans/usecases-pnf-sw-upgrade/pnf-sw-upgrade/sorch/simulator/aai-simulator/src/test/java/org/onap/so/aaisimulator/controller/AaiSimulatorControllerTest.java index 4fe5c403..af9b2367 100755 --- a/plans/usecases-pnf-sw-upgrade/pnf-sw-upgrade/sorch/simulator/aai-simulator/src/test/java/org/onap/so/aaisimulator/controller/AaiSimulatorControllerTest.java +++ b/plans/usecases-pnf-sw-upgrade/pnf-sw-upgrade/sorch/simulator/aai-simulator/src/test/java/org/onap/so/aaisimulator/controller/AaiSimulatorControllerTest.java @@ -17,13 +17,13 @@ * SPDX-License-Identifier: Apache-2.0 * ============LICENSE_END========================================================= */ -package org.onap.so.aaisimulator.controller; +package org.onap.aaisimulator.controller; import static org.junit.Assert.assertEquals; import org.junit.Test; import org.junit.runner.RunWith; -import org.onap.so.aaisimulator.utils.Constants; -import org.onap.so.aaisimulator.utils.TestConstants; +import org.onap.aaisimulator.utils.Constants; +import org.onap.aaisimulator.utils.TestConstants; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.boot.test.context.SpringBootTest.WebEnvironment; diff --git a/plans/usecases-pnf-sw-upgrade/pnf-sw-upgrade/sorch/simulator/aai-simulator/src/test/java/org/onap/so/aaisimulator/controller/AbstractSpringBootTest.java b/plans/usecases-pnf-sw-upgrade/pnf-sw-upgrade/sorch/simulator/aai-simulator/src/test/java/org/onap/so/aaisimulator/controller/AbstractSpringBootTest.java index 84bb8cab..4f2eab27 100755 --- a/plans/usecases-pnf-sw-upgrade/pnf-sw-upgrade/sorch/simulator/aai-simulator/src/test/java/org/onap/so/aaisimulator/controller/AbstractSpringBootTest.java +++ b/plans/usecases-pnf-sw-upgrade/pnf-sw-upgrade/sorch/simulator/aai-simulator/src/test/java/org/onap/so/aaisimulator/controller/AbstractSpringBootTest.java @@ -17,14 +17,14 @@ * SPDX-License-Identifier: Apache-2.0 * ============LICENSE_END========================================================= */ -package org.onap.so.aaisimulator.controller; +package org.onap.aaisimulator.controller; import java.util.List; import org.junit.runner.RunWith; import org.onap.aai.domain.yang.RelatedToProperty; import org.onap.aai.domain.yang.RelationshipData; -import org.onap.so.aaisimulator.utils.TestRestTemplateService; -import org.onap.so.aaisimulator.utils.TestUtils; +import org.onap.aaisimulator.utils.TestRestTemplateService; +import org.onap.aaisimulator.utils.TestUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.boot.test.context.SpringBootTest.WebEnvironment; diff --git a/plans/usecases-pnf-sw-upgrade/pnf-sw-upgrade/sorch/simulator/aai-simulator/src/test/java/org/onap/so/aaisimulator/controller/BusinessControllerTest.java b/plans/usecases-pnf-sw-upgrade/pnf-sw-upgrade/sorch/simulator/aai-simulator/src/test/java/org/onap/so/aaisimulator/controller/BusinessControllerTest.java index c08c51ec..70f5d21b 100755 --- a/plans/usecases-pnf-sw-upgrade/pnf-sw-upgrade/sorch/simulator/aai-simulator/src/test/java/org/onap/so/aaisimulator/controller/BusinessControllerTest.java +++ b/plans/usecases-pnf-sw-upgrade/pnf-sw-upgrade/sorch/simulator/aai-simulator/src/test/java/org/onap/so/aaisimulator/controller/BusinessControllerTest.java @@ -17,28 +17,28 @@ * SPDX-License-Identifier: Apache-2.0 * ============LICENSE_END========================================================= */ -package org.onap.so.aaisimulator.controller; +package org.onap.aaisimulator.controller; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertTrue; -import static org.onap.so.aaisimulator.utils.Constants.BI_DIRECTIONAL_RELATIONSHIP_LIST_URL; -import static org.onap.so.aaisimulator.utils.Constants.X_HTTP_METHOD_OVERRIDE; -import static org.onap.so.aaisimulator.utils.TestConstants.CUSTOMERS_URL; -import static org.onap.so.aaisimulator.utils.TestConstants.GENERIC_VNF_NAME; -import static org.onap.so.aaisimulator.utils.TestConstants.GENERIC_VNF_URL; -import static org.onap.so.aaisimulator.utils.TestConstants.GLOBAL_CUSTOMER_ID; -import static org.onap.so.aaisimulator.utils.TestConstants.RELATED_TO_URL; -import static org.onap.so.aaisimulator.utils.TestConstants.SERVICE_INSTANCES_URL; -import static org.onap.so.aaisimulator.utils.TestConstants.SERVICE_INSTANCE_ID; -import static org.onap.so.aaisimulator.utils.TestConstants.SERVICE_INSTANCE_URL; -import static org.onap.so.aaisimulator.utils.TestConstants.SERVICE_NAME; -import static org.onap.so.aaisimulator.utils.TestConstants.SERVICE_SUBSCRIPTIONS_URL; -import static org.onap.so.aaisimulator.utils.TestConstants.SERVICE_TYPE; -import static org.onap.so.aaisimulator.utils.TestConstants.VNF_ID; -import static org.onap.so.aaisimulator.utils.TestUtils.getCustomer; -import static org.onap.so.aaisimulator.utils.TestUtils.getServiceInstance; +import static org.onap.aaisimulator.utils.Constants.BI_DIRECTIONAL_RELATIONSHIP_LIST_URL; +import static org.onap.aaisimulator.utils.Constants.X_HTTP_METHOD_OVERRIDE; +import static org.onap.aaisimulator.utils.TestConstants.CUSTOMERS_URL; +import static org.onap.aaisimulator.utils.TestConstants.GENERIC_VNF_NAME; +import static org.onap.aaisimulator.utils.TestConstants.GENERIC_VNF_URL; +import static org.onap.aaisimulator.utils.TestConstants.GLOBAL_CUSTOMER_ID; +import static org.onap.aaisimulator.utils.TestConstants.RELATED_TO_URL; +import static org.onap.aaisimulator.utils.TestConstants.SERVICE_INSTANCES_URL; +import static org.onap.aaisimulator.utils.TestConstants.SERVICE_INSTANCE_ID; +import static org.onap.aaisimulator.utils.TestConstants.SERVICE_INSTANCE_URL; +import static org.onap.aaisimulator.utils.TestConstants.SERVICE_NAME; +import static org.onap.aaisimulator.utils.TestConstants.SERVICE_SUBSCRIPTIONS_URL; +import static org.onap.aaisimulator.utils.TestConstants.SERVICE_TYPE; +import static org.onap.aaisimulator.utils.TestConstants.VNF_ID; +import static org.onap.aaisimulator.utils.TestUtils.getCustomer; +import static org.onap.aaisimulator.utils.TestUtils.getServiceInstance; import java.io.IOException; import java.util.Optional; import java.util.UUID; @@ -51,11 +51,11 @@ import org.onap.aai.domain.yang.Relationship; import org.onap.aai.domain.yang.ServiceInstance; import org.onap.aai.domain.yang.ServiceInstances; import org.onap.aai.domain.yang.ServiceSubscription; -import org.onap.so.aaisimulator.service.providers.CustomerCacheServiceProvider; -import org.onap.so.aaisimulator.utils.RequestError; -import org.onap.so.aaisimulator.utils.RequestErrorResponseUtils; -import org.onap.so.aaisimulator.utils.ServiceException; -import org.onap.so.aaisimulator.utils.TestUtils; +import org.onap.aaisimulator.service.providers.CustomerCacheServiceProvider; +import org.onap.aaisimulator.utils.RequestError; +import org.onap.aaisimulator.utils.RequestErrorResponseUtils; +import org.onap.aaisimulator.utils.ServiceException; +import org.onap.aaisimulator.utils.TestUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.HttpHeaders; import org.springframework.http.HttpMethod; diff --git a/plans/usecases-pnf-sw-upgrade/pnf-sw-upgrade/sorch/simulator/aai-simulator/src/test/java/org/onap/so/aaisimulator/controller/CloudRegionsControllerTest.java b/plans/usecases-pnf-sw-upgrade/pnf-sw-upgrade/sorch/simulator/aai-simulator/src/test/java/org/onap/so/aaisimulator/controller/CloudRegionsControllerTest.java index 1b967596..29d03ce0 100755 --- a/plans/usecases-pnf-sw-upgrade/pnf-sw-upgrade/sorch/simulator/aai-simulator/src/test/java/org/onap/so/aaisimulator/controller/CloudRegionsControllerTest.java +++ b/plans/usecases-pnf-sw-upgrade/pnf-sw-upgrade/sorch/simulator/aai-simulator/src/test/java/org/onap/so/aaisimulator/controller/CloudRegionsControllerTest.java @@ -17,37 +17,37 @@ * SPDX-License-Identifier: Apache-2.0 * ============LICENSE_END========================================================= */ -package org.onap.so.aaisimulator.controller; +package org.onap.aaisimulator.controller; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertTrue; -import static org.onap.so.aaisimulator.utils.Constants.BI_DIRECTIONAL_RELATIONSHIP_LIST_URL; -import static org.onap.so.aaisimulator.utils.Constants.RELATIONSHIP_LIST_RELATIONSHIP_URL; -import static org.onap.so.aaisimulator.utils.Constants.VSERVER; -import static org.onap.so.aaisimulator.utils.TestConstants.CLOUD_OWNER_NAME; -import static org.onap.so.aaisimulator.utils.TestConstants.CLOUD_REGION_NAME; -import static org.onap.so.aaisimulator.utils.TestConstants.CUSTOMERS_URL; -import static org.onap.so.aaisimulator.utils.TestConstants.ESR_PASSWORD; -import static org.onap.so.aaisimulator.utils.TestConstants.ESR_SERVICE_URL; -import static org.onap.so.aaisimulator.utils.TestConstants.ESR_SYSTEM_INFO_ID; -import static org.onap.so.aaisimulator.utils.TestConstants.ESR_SYSTEM_INFO_LIST_URL; -import static org.onap.so.aaisimulator.utils.TestConstants.ESR_SYSTEM_TYPE; -import static org.onap.so.aaisimulator.utils.TestConstants.ESR_TYEP; -import static org.onap.so.aaisimulator.utils.TestConstants.ESR_USERNAME; -import static org.onap.so.aaisimulator.utils.TestConstants.ESR_VENDOR; -import static org.onap.so.aaisimulator.utils.TestConstants.GENERIC_VNF_NAME; -import static org.onap.so.aaisimulator.utils.TestConstants.GENERIC_VNF_URL; -import static org.onap.so.aaisimulator.utils.TestConstants.SERVICE_INSTANCE_URL; -import static org.onap.so.aaisimulator.utils.TestConstants.SERVICE_SUBSCRIPTIONS_URL; -import static org.onap.so.aaisimulator.utils.TestConstants.SYSTEM_NAME; -import static org.onap.so.aaisimulator.utils.TestConstants.TENANTS_TENANT; -import static org.onap.so.aaisimulator.utils.TestConstants.TENANT_ID; -import static org.onap.so.aaisimulator.utils.TestConstants.VNF_ID; -import static org.onap.so.aaisimulator.utils.TestConstants.VSERVER_ID; -import static org.onap.so.aaisimulator.utils.TestConstants.VSERVER_NAME; -import static org.onap.so.aaisimulator.utils.TestConstants.VSERVER_URL; +import static org.onap.aaisimulator.utils.Constants.BI_DIRECTIONAL_RELATIONSHIP_LIST_URL; +import static org.onap.aaisimulator.utils.Constants.RELATIONSHIP_LIST_RELATIONSHIP_URL; +import static org.onap.aaisimulator.utils.Constants.VSERVER; +import static org.onap.aaisimulator.utils.TestConstants.CLOUD_OWNER_NAME; +import static org.onap.aaisimulator.utils.TestConstants.CLOUD_REGION_NAME; +import static org.onap.aaisimulator.utils.TestConstants.CUSTOMERS_URL; +import static org.onap.aaisimulator.utils.TestConstants.ESR_PASSWORD; +import static org.onap.aaisimulator.utils.TestConstants.ESR_SERVICE_URL; +import static org.onap.aaisimulator.utils.TestConstants.ESR_SYSTEM_INFO_ID; +import static org.onap.aaisimulator.utils.TestConstants.ESR_SYSTEM_INFO_LIST_URL; +import static org.onap.aaisimulator.utils.TestConstants.ESR_SYSTEM_TYPE; +import static org.onap.aaisimulator.utils.TestConstants.ESR_TYEP; +import static org.onap.aaisimulator.utils.TestConstants.ESR_USERNAME; +import static org.onap.aaisimulator.utils.TestConstants.ESR_VENDOR; +import static org.onap.aaisimulator.utils.TestConstants.GENERIC_VNF_NAME; +import static org.onap.aaisimulator.utils.TestConstants.GENERIC_VNF_URL; +import static org.onap.aaisimulator.utils.TestConstants.SERVICE_INSTANCE_URL; +import static org.onap.aaisimulator.utils.TestConstants.SERVICE_SUBSCRIPTIONS_URL; +import static org.onap.aaisimulator.utils.TestConstants.SYSTEM_NAME; +import static org.onap.aaisimulator.utils.TestConstants.TENANTS_TENANT; +import static org.onap.aaisimulator.utils.TestConstants.TENANT_ID; +import static org.onap.aaisimulator.utils.TestConstants.VNF_ID; +import static org.onap.aaisimulator.utils.TestConstants.VSERVER_ID; +import static org.onap.aaisimulator.utils.TestConstants.VSERVER_NAME; +import static org.onap.aaisimulator.utils.TestConstants.VSERVER_URL; import java.io.IOException; import java.util.List; import java.util.Optional; @@ -63,13 +63,13 @@ import org.onap.aai.domain.yang.RelationshipData; import org.onap.aai.domain.yang.RelationshipList; import org.onap.aai.domain.yang.Tenant; import org.onap.aai.domain.yang.Vserver; -import org.onap.so.aaisimulator.models.CloudRegionKey; -import org.onap.so.aaisimulator.service.providers.CloudRegionCacheServiceProvider; -import org.onap.so.aaisimulator.service.providers.CustomerCacheServiceProvider; -import org.onap.so.aaisimulator.service.providers.GenericVnfCacheServiceProvider; -import org.onap.so.aaisimulator.utils.Constants; -import org.onap.so.aaisimulator.utils.TestConstants; -import org.onap.so.aaisimulator.utils.TestUtils; +import org.onap.aaisimulator.models.CloudRegionKey; +import org.onap.aaisimulator.service.providers.CloudRegionCacheServiceProvider; +import org.onap.aaisimulator.service.providers.CustomerCacheServiceProvider; +import org.onap.aaisimulator.service.providers.GenericVnfCacheServiceProvider; +import org.onap.aaisimulator.utils.Constants; +import org.onap.aaisimulator.utils.TestConstants; +import org.onap.aaisimulator.utils.TestUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; diff --git a/plans/usecases-pnf-sw-upgrade/pnf-sw-upgrade/sorch/simulator/aai-simulator/src/test/java/org/onap/so/aaisimulator/controller/ExternalSystemEsrControllerTest.java b/plans/usecases-pnf-sw-upgrade/pnf-sw-upgrade/sorch/simulator/aai-simulator/src/test/java/org/onap/so/aaisimulator/controller/ExternalSystemEsrControllerTest.java index 2fd5f7b8..fb406ab4 100755 --- a/plans/usecases-pnf-sw-upgrade/pnf-sw-upgrade/sorch/simulator/aai-simulator/src/test/java/org/onap/so/aaisimulator/controller/ExternalSystemEsrControllerTest.java +++ b/plans/usecases-pnf-sw-upgrade/pnf-sw-upgrade/sorch/simulator/aai-simulator/src/test/java/org/onap/so/aaisimulator/controller/ExternalSystemEsrControllerTest.java @@ -17,30 +17,30 @@ * SPDX-License-Identifier: Apache-2.0 * ============LICENSE_END========================================================= */ -package org.onap.so.aaisimulator.controller; +package org.onap.aaisimulator.controller; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertTrue; -import static org.onap.so.aaisimulator.utils.Constants.RELATIONSHIP_LIST_RELATIONSHIP_URL; -import static org.onap.so.aaisimulator.utils.TestConstants.CUSTOMERS_URL; -import static org.onap.so.aaisimulator.utils.TestConstants.ESR_PASSWORD; -import static org.onap.so.aaisimulator.utils.TestConstants.ESR_SERVICE_URL; -import static org.onap.so.aaisimulator.utils.TestConstants.ESR_SYSTEM_INFO_ID; -import static org.onap.so.aaisimulator.utils.TestConstants.ESR_SYSTEM_INFO_LIST_URL; -import static org.onap.so.aaisimulator.utils.TestConstants.ESR_SYSTEM_TYPE; -import static org.onap.so.aaisimulator.utils.TestConstants.ESR_TYEP; -import static org.onap.so.aaisimulator.utils.TestConstants.ESR_USERNAME; -import static org.onap.so.aaisimulator.utils.TestConstants.ESR_VENDOR; -import static org.onap.so.aaisimulator.utils.TestConstants.ESR_VIM_ID; -import static org.onap.so.aaisimulator.utils.TestConstants.ESR_VNFM_ID; -import static org.onap.so.aaisimulator.utils.TestConstants.ESR_VNFM_URL; -import static org.onap.so.aaisimulator.utils.TestConstants.GENERIC_VNF_URL; -import static org.onap.so.aaisimulator.utils.TestConstants.SERVICE_INSTANCE_URL; -import static org.onap.so.aaisimulator.utils.TestConstants.SERVICE_SUBSCRIPTIONS_URL; -import static org.onap.so.aaisimulator.utils.TestConstants.SYSTEM_NAME; -import static org.onap.so.aaisimulator.utils.TestConstants.VNF_ID; +import static org.onap.aaisimulator.utils.Constants.RELATIONSHIP_LIST_RELATIONSHIP_URL; +import static org.onap.aaisimulator.utils.TestConstants.CUSTOMERS_URL; +import static org.onap.aaisimulator.utils.TestConstants.ESR_PASSWORD; +import static org.onap.aaisimulator.utils.TestConstants.ESR_SERVICE_URL; +import static org.onap.aaisimulator.utils.TestConstants.ESR_SYSTEM_INFO_ID; +import static org.onap.aaisimulator.utils.TestConstants.ESR_SYSTEM_INFO_LIST_URL; +import static org.onap.aaisimulator.utils.TestConstants.ESR_SYSTEM_TYPE; +import static org.onap.aaisimulator.utils.TestConstants.ESR_TYEP; +import static org.onap.aaisimulator.utils.TestConstants.ESR_USERNAME; +import static org.onap.aaisimulator.utils.TestConstants.ESR_VENDOR; +import static org.onap.aaisimulator.utils.TestConstants.ESR_VIM_ID; +import static org.onap.aaisimulator.utils.TestConstants.ESR_VNFM_ID; +import static org.onap.aaisimulator.utils.TestConstants.ESR_VNFM_URL; +import static org.onap.aaisimulator.utils.TestConstants.GENERIC_VNF_URL; +import static org.onap.aaisimulator.utils.TestConstants.SERVICE_INSTANCE_URL; +import static org.onap.aaisimulator.utils.TestConstants.SERVICE_SUBSCRIPTIONS_URL; +import static org.onap.aaisimulator.utils.TestConstants.SYSTEM_NAME; +import static org.onap.aaisimulator.utils.TestConstants.VNF_ID; import java.io.IOException; import java.util.List; import java.util.Optional; @@ -54,11 +54,11 @@ import org.onap.aai.domain.yang.GenericVnf; import org.onap.aai.domain.yang.Relationship; import org.onap.aai.domain.yang.RelationshipData; import org.onap.aai.domain.yang.RelationshipList; -import org.onap.so.aaisimulator.service.providers.ExternalSystemCacheServiceProvider; -import org.onap.so.aaisimulator.service.providers.GenericVnfCacheServiceProvider; -import org.onap.so.aaisimulator.utils.Constants; -import org.onap.so.aaisimulator.utils.TestConstants; -import org.onap.so.aaisimulator.utils.TestUtils; +import org.onap.aaisimulator.service.providers.ExternalSystemCacheServiceProvider; +import org.onap.aaisimulator.service.providers.GenericVnfCacheServiceProvider; +import org.onap.aaisimulator.utils.Constants; +import org.onap.aaisimulator.utils.TestConstants; +import org.onap.aaisimulator.utils.TestUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; diff --git a/plans/usecases-pnf-sw-upgrade/pnf-sw-upgrade/sorch/simulator/aai-simulator/src/test/java/org/onap/so/aaisimulator/controller/GenericVnfsControllerTest.java b/plans/usecases-pnf-sw-upgrade/pnf-sw-upgrade/sorch/simulator/aai-simulator/src/test/java/org/onap/so/aaisimulator/controller/GenericVnfsControllerTest.java index 8b6ec8c7..8ec26065 100755 --- a/plans/usecases-pnf-sw-upgrade/pnf-sw-upgrade/sorch/simulator/aai-simulator/src/test/java/org/onap/so/aaisimulator/controller/GenericVnfsControllerTest.java +++ b/plans/usecases-pnf-sw-upgrade/pnf-sw-upgrade/sorch/simulator/aai-simulator/src/test/java/org/onap/so/aaisimulator/controller/GenericVnfsControllerTest.java @@ -17,29 +17,29 @@ * SPDX-License-Identifier: Apache-2.0 * ============LICENSE_END========================================================= */ -package org.onap.so.aaisimulator.controller; +package org.onap.aaisimulator.controller; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertTrue; -import static org.onap.so.aaisimulator.utils.Constants.BI_DIRECTIONAL_RELATIONSHIP_LIST_URL; -import static org.onap.so.aaisimulator.utils.Constants.RELATIONSHIP_LIST_RELATIONSHIP_URL; -import static org.onap.so.aaisimulator.utils.Constants.X_HTTP_METHOD_OVERRIDE; -import static org.onap.so.aaisimulator.utils.TestConstants.CLOUD_OWNER_NAME; -import static org.onap.so.aaisimulator.utils.TestConstants.CLOUD_REGION_NAME; -import static org.onap.so.aaisimulator.utils.TestConstants.CUSTOMERS_URL; -import static org.onap.so.aaisimulator.utils.TestConstants.GENERIC_VNF_NAME; -import static org.onap.so.aaisimulator.utils.TestConstants.GENERIC_VNF_URL; -import static org.onap.so.aaisimulator.utils.TestConstants.GLOBAL_CUSTOMER_ID; -import static org.onap.so.aaisimulator.utils.TestConstants.LINE_OF_BUSINESS_NAME; -import static org.onap.so.aaisimulator.utils.TestConstants.PLATFORM_NAME; -import static org.onap.so.aaisimulator.utils.TestConstants.SERVICE_INSTANCE_ID; -import static org.onap.so.aaisimulator.utils.TestConstants.SERVICE_INSTANCE_URL; -import static org.onap.so.aaisimulator.utils.TestConstants.SERVICE_NAME; -import static org.onap.so.aaisimulator.utils.TestConstants.SERVICE_SUBSCRIPTIONS_URL; -import static org.onap.so.aaisimulator.utils.TestConstants.SERVICE_TYPE; -import static org.onap.so.aaisimulator.utils.TestConstants.VNF_ID; +import static org.onap.aaisimulator.utils.Constants.BI_DIRECTIONAL_RELATIONSHIP_LIST_URL; +import static org.onap.aaisimulator.utils.Constants.RELATIONSHIP_LIST_RELATIONSHIP_URL; +import static org.onap.aaisimulator.utils.Constants.X_HTTP_METHOD_OVERRIDE; +import static org.onap.aaisimulator.utils.TestConstants.CLOUD_OWNER_NAME; +import static org.onap.aaisimulator.utils.TestConstants.CLOUD_REGION_NAME; +import static org.onap.aaisimulator.utils.TestConstants.CUSTOMERS_URL; +import static org.onap.aaisimulator.utils.TestConstants.GENERIC_VNF_NAME; +import static org.onap.aaisimulator.utils.TestConstants.GENERIC_VNF_URL; +import static org.onap.aaisimulator.utils.TestConstants.GLOBAL_CUSTOMER_ID; +import static org.onap.aaisimulator.utils.TestConstants.LINE_OF_BUSINESS_NAME; +import static org.onap.aaisimulator.utils.TestConstants.PLATFORM_NAME; +import static org.onap.aaisimulator.utils.TestConstants.SERVICE_INSTANCE_ID; +import static org.onap.aaisimulator.utils.TestConstants.SERVICE_INSTANCE_URL; +import static org.onap.aaisimulator.utils.TestConstants.SERVICE_NAME; +import static org.onap.aaisimulator.utils.TestConstants.SERVICE_SUBSCRIPTIONS_URL; +import static org.onap.aaisimulator.utils.TestConstants.SERVICE_TYPE; +import static org.onap.aaisimulator.utils.TestConstants.VNF_ID; import java.io.IOException; import java.util.List; import java.util.Optional; @@ -52,13 +52,13 @@ import org.onap.aai.domain.yang.Relationship; import org.onap.aai.domain.yang.RelationshipData; import org.onap.aai.domain.yang.RelationshipList; import org.onap.aai.domain.yang.ServiceInstance; -import org.onap.so.aaisimulator.service.providers.CustomerCacheServiceProvider; -import org.onap.so.aaisimulator.service.providers.GenericVnfCacheServiceProvider; -import org.onap.so.aaisimulator.service.providers.LinesOfBusinessCacheServiceProvider; -import org.onap.so.aaisimulator.service.providers.PlatformCacheServiceProvider; -import org.onap.so.aaisimulator.utils.Constants; -import org.onap.so.aaisimulator.utils.TestConstants; -import org.onap.so.aaisimulator.utils.TestUtils; +import org.onap.aaisimulator.service.providers.CustomerCacheServiceProvider; +import org.onap.aaisimulator.service.providers.GenericVnfCacheServiceProvider; +import org.onap.aaisimulator.service.providers.LinesOfBusinessCacheServiceProvider; +import org.onap.aaisimulator.service.providers.PlatformCacheServiceProvider; +import org.onap.aaisimulator.utils.Constants; +import org.onap.aaisimulator.utils.TestConstants; +import org.onap.aaisimulator.utils.TestUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.HttpHeaders; import org.springframework.http.HttpMethod; diff --git a/plans/usecases-pnf-sw-upgrade/pnf-sw-upgrade/sorch/simulator/aai-simulator/src/test/java/org/onap/so/aaisimulator/controller/LinesOfBusinessControllerTest.java b/plans/usecases-pnf-sw-upgrade/pnf-sw-upgrade/sorch/simulator/aai-simulator/src/test/java/org/onap/so/aaisimulator/controller/LinesOfBusinessControllerTest.java index 30b3d279..0b6cfb50 100755 --- a/plans/usecases-pnf-sw-upgrade/pnf-sw-upgrade/sorch/simulator/aai-simulator/src/test/java/org/onap/so/aaisimulator/controller/LinesOfBusinessControllerTest.java +++ b/plans/usecases-pnf-sw-upgrade/pnf-sw-upgrade/sorch/simulator/aai-simulator/src/test/java/org/onap/so/aaisimulator/controller/LinesOfBusinessControllerTest.java @@ -17,16 +17,16 @@ * SPDX-License-Identifier: Apache-2.0 * ============LICENSE_END========================================================= */ -package org.onap.so.aaisimulator.controller; +package org.onap.aaisimulator.controller; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertTrue; -import static org.onap.so.aaisimulator.utils.Constants.BI_DIRECTIONAL_RELATIONSHIP_LIST_URL; -import static org.onap.so.aaisimulator.utils.TestConstants.GENERIC_VNF_URL; -import static org.onap.so.aaisimulator.utils.TestConstants.LINE_OF_BUSINESS_NAME; -import static org.onap.so.aaisimulator.utils.TestConstants.VNF_ID; +import static org.onap.aaisimulator.utils.Constants.BI_DIRECTIONAL_RELATIONSHIP_LIST_URL; +import static org.onap.aaisimulator.utils.TestConstants.GENERIC_VNF_URL; +import static org.onap.aaisimulator.utils.TestConstants.LINE_OF_BUSINESS_NAME; +import static org.onap.aaisimulator.utils.TestConstants.VNF_ID; import java.util.List; import java.util.Optional; import org.junit.After; @@ -35,12 +35,12 @@ import org.onap.aai.domain.yang.LineOfBusiness; import org.onap.aai.domain.yang.RelatedToProperty; import org.onap.aai.domain.yang.Relationship; import org.onap.aai.domain.yang.RelationshipData; -import org.onap.so.aaisimulator.models.Format; -import org.onap.so.aaisimulator.models.Results; -import org.onap.so.aaisimulator.service.providers.LinesOfBusinessCacheServiceProvider; -import org.onap.so.aaisimulator.utils.Constants; -import org.onap.so.aaisimulator.utils.TestConstants; -import org.onap.so.aaisimulator.utils.TestUtils; +import org.onap.aaisimulator.models.Format; +import org.onap.aaisimulator.models.Results; +import org.onap.aaisimulator.service.providers.LinesOfBusinessCacheServiceProvider; +import org.onap.aaisimulator.utils.Constants; +import org.onap.aaisimulator.utils.TestConstants; +import org.onap.aaisimulator.utils.TestUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; diff --git a/plans/usecases-pnf-sw-upgrade/pnf-sw-upgrade/sorch/simulator/aai-simulator/src/test/java/org/onap/so/aaisimulator/controller/NodesControllerTest.java b/plans/usecases-pnf-sw-upgrade/pnf-sw-upgrade/sorch/simulator/aai-simulator/src/test/java/org/onap/so/aaisimulator/controller/NodesControllerTest.java index 378d77df..12412872 100755 --- a/plans/usecases-pnf-sw-upgrade/pnf-sw-upgrade/sorch/simulator/aai-simulator/src/test/java/org/onap/so/aaisimulator/controller/NodesControllerTest.java +++ b/plans/usecases-pnf-sw-upgrade/pnf-sw-upgrade/sorch/simulator/aai-simulator/src/test/java/org/onap/so/aaisimulator/controller/NodesControllerTest.java @@ -17,24 +17,24 @@ * SPDX-License-Identifier: Apache-2.0 * ============LICENSE_END========================================================= */ -package org.onap.so.aaisimulator.controller; +package org.onap.aaisimulator.controller; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertTrue; -import static org.onap.so.aaisimulator.utils.Constants.RESOURCE_LINK; -import static org.onap.so.aaisimulator.utils.Constants.RESOURCE_TYPE; -import static org.onap.so.aaisimulator.utils.Constants.SERVICE_RESOURCE_TYPE; -import static org.onap.so.aaisimulator.utils.TestConstants.CUSTOMERS_URL; -import static org.onap.so.aaisimulator.utils.TestConstants.GENERIC_VNFS_URL; -import static org.onap.so.aaisimulator.utils.TestConstants.GENERIC_VNF_NAME; -import static org.onap.so.aaisimulator.utils.TestConstants.GENERIC_VNF_URL; -import static org.onap.so.aaisimulator.utils.TestConstants.SERVICE_INSTANCE_ID; -import static org.onap.so.aaisimulator.utils.TestConstants.SERVICE_INSTANCE_URL; -import static org.onap.so.aaisimulator.utils.TestConstants.SERVICE_NAME; -import static org.onap.so.aaisimulator.utils.TestConstants.SERVICE_SUBSCRIPTIONS_URL; -import static org.onap.so.aaisimulator.utils.TestConstants.VNF_ID; +import static org.onap.aaisimulator.utils.Constants.RESOURCE_LINK; +import static org.onap.aaisimulator.utils.Constants.RESOURCE_TYPE; +import static org.onap.aaisimulator.utils.Constants.SERVICE_RESOURCE_TYPE; +import static org.onap.aaisimulator.utils.TestConstants.CUSTOMERS_URL; +import static org.onap.aaisimulator.utils.TestConstants.GENERIC_VNFS_URL; +import static org.onap.aaisimulator.utils.TestConstants.GENERIC_VNF_NAME; +import static org.onap.aaisimulator.utils.TestConstants.GENERIC_VNF_URL; +import static org.onap.aaisimulator.utils.TestConstants.SERVICE_INSTANCE_ID; +import static org.onap.aaisimulator.utils.TestConstants.SERVICE_INSTANCE_URL; +import static org.onap.aaisimulator.utils.TestConstants.SERVICE_NAME; +import static org.onap.aaisimulator.utils.TestConstants.SERVICE_SUBSCRIPTIONS_URL; +import static org.onap.aaisimulator.utils.TestConstants.VNF_ID; import java.io.IOException; import java.util.Map; import org.junit.After; @@ -42,12 +42,12 @@ import org.junit.Test; import org.onap.aai.domain.yang.GenericVnf; import org.onap.aai.domain.yang.GenericVnfs; import org.onap.aai.domain.yang.ServiceInstance; -import org.onap.so.aaisimulator.models.Format; -import org.onap.so.aaisimulator.models.Results; -import org.onap.so.aaisimulator.service.providers.CustomerCacheServiceProvider; -import org.onap.so.aaisimulator.service.providers.NodesCacheServiceProvider; -import org.onap.so.aaisimulator.utils.TestConstants; -import org.onap.so.aaisimulator.utils.TestUtils; +import org.onap.aaisimulator.models.Format; +import org.onap.aaisimulator.models.Results; +import org.onap.aaisimulator.service.providers.CustomerCacheServiceProvider; +import org.onap.aaisimulator.service.providers.NodesCacheServiceProvider; +import org.onap.aaisimulator.utils.TestConstants; +import org.onap.aaisimulator.utils.TestUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; diff --git a/plans/usecases-pnf-sw-upgrade/pnf-sw-upgrade/sorch/simulator/aai-simulator/src/test/java/org/onap/so/aaisimulator/controller/OwningEntityControllerTest.java b/plans/usecases-pnf-sw-upgrade/pnf-sw-upgrade/sorch/simulator/aai-simulator/src/test/java/org/onap/so/aaisimulator/controller/OwningEntityControllerTest.java index 015994a5..c5baad47 100755 --- a/plans/usecases-pnf-sw-upgrade/pnf-sw-upgrade/sorch/simulator/aai-simulator/src/test/java/org/onap/so/aaisimulator/controller/OwningEntityControllerTest.java +++ b/plans/usecases-pnf-sw-upgrade/pnf-sw-upgrade/sorch/simulator/aai-simulator/src/test/java/org/onap/so/aaisimulator/controller/OwningEntityControllerTest.java @@ -17,19 +17,19 @@ * SPDX-License-Identifier: Apache-2.0 * ============LICENSE_END========================================================= */ -package org.onap.so.aaisimulator.controller; +package org.onap.aaisimulator.controller; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertTrue; -import static org.onap.so.aaisimulator.utils.Constants.RELATIONSHIP_LIST_RELATIONSHIP_URL; -import static org.onap.so.aaisimulator.utils.TestConstants.CUSTOMERS_URL; -import static org.onap.so.aaisimulator.utils.TestConstants.GLOBAL_CUSTOMER_ID; -import static org.onap.so.aaisimulator.utils.TestConstants.SERVICE_INSTANCE_ID; -import static org.onap.so.aaisimulator.utils.TestConstants.SERVICE_INSTANCE_URL; -import static org.onap.so.aaisimulator.utils.TestConstants.SERVICE_SUBSCRIPTIONS_URL; -import static org.onap.so.aaisimulator.utils.TestConstants.SERVICE_TYPE; +import static org.onap.aaisimulator.utils.Constants.RELATIONSHIP_LIST_RELATIONSHIP_URL; +import static org.onap.aaisimulator.utils.TestConstants.CUSTOMERS_URL; +import static org.onap.aaisimulator.utils.TestConstants.GLOBAL_CUSTOMER_ID; +import static org.onap.aaisimulator.utils.TestConstants.SERVICE_INSTANCE_ID; +import static org.onap.aaisimulator.utils.TestConstants.SERVICE_INSTANCE_URL; +import static org.onap.aaisimulator.utils.TestConstants.SERVICE_SUBSCRIPTIONS_URL; +import static org.onap.aaisimulator.utils.TestConstants.SERVICE_TYPE; import java.io.IOException; import java.util.List; import java.util.Optional; @@ -39,13 +39,13 @@ import org.onap.aai.domain.yang.OwningEntity; import org.onap.aai.domain.yang.Relationship; import org.onap.aai.domain.yang.RelationshipData; import org.onap.aai.domain.yang.ServiceInstance; -import org.onap.so.aaisimulator.models.Format; -import org.onap.so.aaisimulator.models.Results; -import org.onap.so.aaisimulator.service.providers.CustomerCacheServiceProvider; -import org.onap.so.aaisimulator.service.providers.OwnEntityCacheServiceProvider; -import org.onap.so.aaisimulator.utils.Constants; -import org.onap.so.aaisimulator.utils.TestConstants; -import org.onap.so.aaisimulator.utils.TestUtils; +import org.onap.aaisimulator.models.Format; +import org.onap.aaisimulator.models.Results; +import org.onap.aaisimulator.service.providers.CustomerCacheServiceProvider; +import org.onap.aaisimulator.service.providers.OwnEntityCacheServiceProvider; +import org.onap.aaisimulator.utils.Constants; +import org.onap.aaisimulator.utils.TestConstants; +import org.onap.aaisimulator.utils.TestUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; diff --git a/plans/usecases-pnf-sw-upgrade/pnf-sw-upgrade/sorch/simulator/aai-simulator/src/test/java/org/onap/so/aaisimulator/controller/PlatformControllerTest.java b/plans/usecases-pnf-sw-upgrade/pnf-sw-upgrade/sorch/simulator/aai-simulator/src/test/java/org/onap/so/aaisimulator/controller/PlatformControllerTest.java index 7e88eec5..00c66388 100755 --- a/plans/usecases-pnf-sw-upgrade/pnf-sw-upgrade/sorch/simulator/aai-simulator/src/test/java/org/onap/so/aaisimulator/controller/PlatformControllerTest.java +++ b/plans/usecases-pnf-sw-upgrade/pnf-sw-upgrade/sorch/simulator/aai-simulator/src/test/java/org/onap/so/aaisimulator/controller/PlatformControllerTest.java @@ -17,16 +17,16 @@ * SPDX-License-Identifier: Apache-2.0 * ============LICENSE_END========================================================= */ -package org.onap.so.aaisimulator.controller; +package org.onap.aaisimulator.controller; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertTrue; -import static org.onap.so.aaisimulator.utils.Constants.BI_DIRECTIONAL_RELATIONSHIP_LIST_URL; -import static org.onap.so.aaisimulator.utils.TestConstants.GENERIC_VNF_URL; -import static org.onap.so.aaisimulator.utils.TestConstants.PLATFORM_NAME; -import static org.onap.so.aaisimulator.utils.TestConstants.VNF_ID; +import static org.onap.aaisimulator.utils.Constants.BI_DIRECTIONAL_RELATIONSHIP_LIST_URL; +import static org.onap.aaisimulator.utils.TestConstants.GENERIC_VNF_URL; +import static org.onap.aaisimulator.utils.TestConstants.PLATFORM_NAME; +import static org.onap.aaisimulator.utils.TestConstants.VNF_ID; import java.util.List; import java.util.Optional; import org.junit.After; @@ -35,12 +35,12 @@ import org.onap.aai.domain.yang.Platform; import org.onap.aai.domain.yang.RelatedToProperty; import org.onap.aai.domain.yang.Relationship; import org.onap.aai.domain.yang.RelationshipData; -import org.onap.so.aaisimulator.models.Format; -import org.onap.so.aaisimulator.models.Results; -import org.onap.so.aaisimulator.service.providers.PlatformCacheServiceProvider; -import org.onap.so.aaisimulator.utils.Constants; -import org.onap.so.aaisimulator.utils.TestConstants; -import org.onap.so.aaisimulator.utils.TestUtils; +import org.onap.aaisimulator.models.Format; +import org.onap.aaisimulator.models.Results; +import org.onap.aaisimulator.service.providers.PlatformCacheServiceProvider; +import org.onap.aaisimulator.utils.Constants; +import org.onap.aaisimulator.utils.TestConstants; +import org.onap.aaisimulator.utils.TestUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; diff --git a/plans/usecases-pnf-sw-upgrade/pnf-sw-upgrade/sorch/simulator/aai-simulator/src/test/java/org/onap/so/aaisimulator/controller/PnfsControllerTest.java b/plans/usecases-pnf-sw-upgrade/pnf-sw-upgrade/sorch/simulator/aai-simulator/src/test/java/org/onap/so/aaisimulator/controller/PnfsControllerTest.java index 10e9b66f..440c66d6 100755 --- a/plans/usecases-pnf-sw-upgrade/pnf-sw-upgrade/sorch/simulator/aai-simulator/src/test/java/org/onap/so/aaisimulator/controller/PnfsControllerTest.java +++ b/plans/usecases-pnf-sw-upgrade/pnf-sw-upgrade/sorch/simulator/aai-simulator/src/test/java/org/onap/so/aaisimulator/controller/PnfsControllerTest.java @@ -17,13 +17,13 @@ * SPDX-License-Identifier: Apache-2.0 * ============LICENSE_END========================================================= */ -package org.onap.so.aaisimulator.controller; +package org.onap.aaisimulator.controller; import org.junit.After; import org.junit.Test; import org.onap.aai.domain.yang.v15.Pnf; -import org.onap.so.aaisimulator.service.providers.PnfCacheServiceProvider; -import org.onap.so.aaisimulator.utils.TestUtils; +import org.onap.aaisimulator.service.providers.PnfCacheServiceProvider; +import org.onap.aaisimulator.utils.TestUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; diff --git a/plans/usecases-pnf-sw-upgrade/pnf-sw-upgrade/sorch/simulator/aai-simulator/src/test/java/org/onap/so/aaisimulator/controller/ProjectControllerTest.java b/plans/usecases-pnf-sw-upgrade/pnf-sw-upgrade/sorch/simulator/aai-simulator/src/test/java/org/onap/so/aaisimulator/controller/ProjectControllerTest.java index 678d417b..5478ef7c 100755 --- a/plans/usecases-pnf-sw-upgrade/pnf-sw-upgrade/sorch/simulator/aai-simulator/src/test/java/org/onap/so/aaisimulator/controller/ProjectControllerTest.java +++ b/plans/usecases-pnf-sw-upgrade/pnf-sw-upgrade/sorch/simulator/aai-simulator/src/test/java/org/onap/so/aaisimulator/controller/ProjectControllerTest.java @@ -17,19 +17,19 @@ * SPDX-License-Identifier: Apache-2.0 * ============LICENSE_END========================================================= */ -package org.onap.so.aaisimulator.controller; +package org.onap.aaisimulator.controller; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertTrue; -import static org.onap.so.aaisimulator.utils.Constants.RELATIONSHIP_LIST_RELATIONSHIP_URL; -import static org.onap.so.aaisimulator.utils.TestConstants.CUSTOMERS_URL; -import static org.onap.so.aaisimulator.utils.TestConstants.GLOBAL_CUSTOMER_ID; -import static org.onap.so.aaisimulator.utils.TestConstants.SERVICE_INSTANCE_ID; -import static org.onap.so.aaisimulator.utils.TestConstants.SERVICE_INSTANCE_URL; -import static org.onap.so.aaisimulator.utils.TestConstants.SERVICE_SUBSCRIPTIONS_URL; -import static org.onap.so.aaisimulator.utils.TestConstants.SERVICE_TYPE; +import static org.onap.aaisimulator.utils.Constants.RELATIONSHIP_LIST_RELATIONSHIP_URL; +import static org.onap.aaisimulator.utils.TestConstants.CUSTOMERS_URL; +import static org.onap.aaisimulator.utils.TestConstants.GLOBAL_CUSTOMER_ID; +import static org.onap.aaisimulator.utils.TestConstants.SERVICE_INSTANCE_ID; +import static org.onap.aaisimulator.utils.TestConstants.SERVICE_INSTANCE_URL; +import static org.onap.aaisimulator.utils.TestConstants.SERVICE_SUBSCRIPTIONS_URL; +import static org.onap.aaisimulator.utils.TestConstants.SERVICE_TYPE; import java.io.IOException; import java.util.List; import java.util.Optional; @@ -39,13 +39,13 @@ import org.onap.aai.domain.yang.Project; import org.onap.aai.domain.yang.Relationship; import org.onap.aai.domain.yang.RelationshipData; import org.onap.aai.domain.yang.ServiceInstance; -import org.onap.so.aaisimulator.models.Results; -import org.onap.so.aaisimulator.service.providers.CustomerCacheServiceProvider; -import org.onap.so.aaisimulator.service.providers.ProjectCacheServiceProvider; -import org.onap.so.aaisimulator.utils.Constants; -import org.onap.so.aaisimulator.utils.TestConstants; -import org.onap.so.aaisimulator.utils.TestRestTemplateService; -import org.onap.so.aaisimulator.utils.TestUtils; +import org.onap.aaisimulator.models.Results; +import org.onap.aaisimulator.service.providers.CustomerCacheServiceProvider; +import org.onap.aaisimulator.service.providers.ProjectCacheServiceProvider; +import org.onap.aaisimulator.utils.Constants; +import org.onap.aaisimulator.utils.TestConstants; +import org.onap.aaisimulator.utils.TestRestTemplateService; +import org.onap.aaisimulator.utils.TestUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.web.server.LocalServerPort; import org.springframework.http.HttpStatus; diff --git a/plans/usecases-pnf-sw-upgrade/pnf-sw-upgrade/sorch/simulator/aai-simulator/src/test/java/org/onap/so/aaisimulator/controller/ServiceDesignAndCreationControllerTest.java b/plans/usecases-pnf-sw-upgrade/pnf-sw-upgrade/sorch/simulator/aai-simulator/src/test/java/org/onap/so/aaisimulator/controller/ServiceDesignAndCreationControllerTest.java new file mode 100644 index 00000000..d0e652bd --- /dev/null +++ b/plans/usecases-pnf-sw-upgrade/pnf-sw-upgrade/sorch/simulator/aai-simulator/src/test/java/org/onap/so/aaisimulator/controller/ServiceDesignAndCreationControllerTest.java @@ -0,0 +1,67 @@ +/*- + * ============LICENSE_START======================================================= + * Copyright (C) 2019 Nordix Foundation. + * ================================================================================ + * 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. + * + * SPDX-License-Identifier: Apache-2.0 + * ============LICENSE_END========================================================= + */ +package org.onap.aaisimulator.controller; + +import org.junit.Test; +import org.springframework.boot.test.context.SpringBootTest; +import org.springframework.boot.test.context.SpringBootTest.WebEnvironment; +import org.springframework.http.HttpStatus; +import org.springframework.http.MediaType; +import org.springframework.http.ResponseEntity; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertTrue; +import static org.onap.aaisimulator.utils.TestConstants.SERVICE_DESIGN_AND_CREATION_URL; + +@SpringBootTest(webEnvironment = WebEnvironment.RANDOM_PORT, + properties = "SERVICE_DESIGN_AND_CREATION_RESPONSES_LOCATION=./src/test/resources/test-data/service-design-and-creation-responses") +public class ServiceDesignAndCreationControllerTest extends AbstractSpringBootTest{ + + @Test + public void should_reply_sample_modelvers_response() { + final String url = getUrl(SERVICE_DESIGN_AND_CREATION_URL, + "/models/model/a51e2bef-961c-496f-b235-b4540400e885/model-vers"); + ResponseEntity<String> actual = testRestTemplateService.invokeHttpGet(url, String.class); + String expectedXml = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n" + + "<model-vers xmlns=\"http://org.onap.aai.inventory/v11\">\n" + + " <model-ver>\n" + + " <model-version-id>c0818142-324d-4a8c-8065-45a61df247a5</model-version-id>\n" + + " <model-name>EricService</model-name>\n" + + " <model-version>1.0</model-version>\n" + + " <model-description>blah</model-description>\n" + + " <resource-version>1594657102313</resource-version>\n" + + " </model-ver>\n" + + " <model-ver>\n" + + " <model-version-id>4442dfc1-0d2d-46b4-b0bc-a2ac10448269</model-version-id>\n" + + " <model-name>EricService</model-name>\n" + + " <model-version>2.0</model-version>\n" + + " <model-description>blahhhh</model-description>\n" + + " <resource-version>1594707742646</resource-version>\n" + + " </model-ver>\n" + + "</model-vers>"; + + assertEquals(HttpStatus.OK, actual.getStatusCode()); + MediaType contentType = actual.getHeaders().getContentType(); + assertNotNull(contentType); + assertTrue(contentType.isCompatibleWith(MediaType.APPLICATION_XML)); + assertEquals(expectedXml, actual.getBody()); + } +}
\ No newline at end of file diff --git a/plans/usecases-pnf-sw-upgrade/pnf-sw-upgrade/sorch/simulator/aai-simulator/src/test/java/org/onap/so/aaisimulator/controller/configuration/TestRestTemplateConfigration.java b/plans/usecases-pnf-sw-upgrade/pnf-sw-upgrade/sorch/simulator/aai-simulator/src/test/java/org/onap/so/aaisimulator/controller/configuration/TestRestTemplateConfigration.java index 92036e83..2e50d3d7 100755 --- a/plans/usecases-pnf-sw-upgrade/pnf-sw-upgrade/sorch/simulator/aai-simulator/src/test/java/org/onap/so/aaisimulator/controller/configuration/TestRestTemplateConfigration.java +++ b/plans/usecases-pnf-sw-upgrade/pnf-sw-upgrade/sorch/simulator/aai-simulator/src/test/java/org/onap/so/aaisimulator/controller/configuration/TestRestTemplateConfigration.java @@ -17,7 +17,7 @@ * SPDX-License-Identifier: Apache-2.0 * ============LICENSE_END========================================================= */ -package org.onap.so.aaisimulator.controller.configuration; +package org.onap.aaisimulator.controller.configuration; import javax.net.ssl.HostnameVerifier; import javax.net.ssl.SSLSession; diff --git a/plans/usecases-pnf-sw-upgrade/pnf-sw-upgrade/sorch/simulator/aai-simulator/src/test/java/org/onap/so/aaisimulator/utils/TestConstants.java b/plans/usecases-pnf-sw-upgrade/pnf-sw-upgrade/sorch/simulator/aai-simulator/src/test/java/org/onap/so/aaisimulator/utils/TestConstants.java index 85ceeef3..942e8701 100755 --- a/plans/usecases-pnf-sw-upgrade/pnf-sw-upgrade/sorch/simulator/aai-simulator/src/test/java/org/onap/so/aaisimulator/utils/TestConstants.java +++ b/plans/usecases-pnf-sw-upgrade/pnf-sw-upgrade/sorch/simulator/aai-simulator/src/test/java/org/onap/so/aaisimulator/utils/TestConstants.java @@ -17,7 +17,7 @@ * SPDX-License-Identifier: Apache-2.0 * ============LICENSE_END========================================================= */ -package org.onap.so.aaisimulator.utils; +package org.onap.aaisimulator.utils; /** * @author waqas.ikram@ericsson.com @@ -113,6 +113,8 @@ public class TestConstants { public static final String PROJECT_URL = BASE_URL_V17 + "/business/projects/project/"; + public static final String SERVICE_DESIGN_AND_CREATION_URL = BASE_URL_V17 + "/service-design-and-creation"; + private TestConstants() {} } diff --git a/plans/usecases-pnf-sw-upgrade/pnf-sw-upgrade/sorch/simulator/aai-simulator/src/test/java/org/onap/so/aaisimulator/utils/TestRestTemplateService.java b/plans/usecases-pnf-sw-upgrade/pnf-sw-upgrade/sorch/simulator/aai-simulator/src/test/java/org/onap/so/aaisimulator/utils/TestRestTemplateService.java index e49e6d49..2e068bce 100755 --- a/plans/usecases-pnf-sw-upgrade/pnf-sw-upgrade/sorch/simulator/aai-simulator/src/test/java/org/onap/so/aaisimulator/utils/TestRestTemplateService.java +++ b/plans/usecases-pnf-sw-upgrade/pnf-sw-upgrade/sorch/simulator/aai-simulator/src/test/java/org/onap/so/aaisimulator/utils/TestRestTemplateService.java @@ -17,9 +17,9 @@ * SPDX-License-Identifier: Apache-2.0 * ============LICENSE_END========================================================= */ -package org.onap.so.aaisimulator.utils; +package org.onap.aaisimulator.utils; -import org.onap.so.simulator.model.UserCredentials; +import org.onap.aaisimulator.model.UserCredentials; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.web.client.TestRestTemplate; import org.springframework.http.HttpEntity; diff --git a/plans/usecases-pnf-sw-upgrade/pnf-sw-upgrade/sorch/simulator/aai-simulator/src/test/java/org/onap/so/aaisimulator/utils/TestUtils.java b/plans/usecases-pnf-sw-upgrade/pnf-sw-upgrade/sorch/simulator/aai-simulator/src/test/java/org/onap/so/aaisimulator/utils/TestUtils.java index 55eb0ef5..e8dc9df2 100755 --- a/plans/usecases-pnf-sw-upgrade/pnf-sw-upgrade/sorch/simulator/aai-simulator/src/test/java/org/onap/so/aaisimulator/utils/TestUtils.java +++ b/plans/usecases-pnf-sw-upgrade/pnf-sw-upgrade/sorch/simulator/aai-simulator/src/test/java/org/onap/so/aaisimulator/utils/TestUtils.java @@ -17,7 +17,7 @@ * SPDX-License-Identifier: Apache-2.0 * ============LICENSE_END========================================================= */ -package org.onap.so.aaisimulator.utils; +package org.onap.aaisimulator.utils; import java.io.File; import java.io.IOException; |