Convert component functions IT to UT. 19/98219/2
authorBrinda Santh <bs2796@att.com>
Sun, 10 Nov 2019 01:35:47 +0000 (20:35 -0500)
committerBrinda Santh <bs2796@att.com>
Sun, 10 Nov 2019 01:51:26 +0000 (20:51 -0500)
Issue-ID: CCSDK-1735

Convert Netconf and Restconf Executor IT to UT.

Remove duplicate BluePrintProperties.

Signed-off-by: Brinda Santh <bs2796@att.com>
Change-Id: I2eafdbabb17a4df72541ab93c46e7fc9eb0fe8d7

35 files changed:
ms/blueprintsprocessor/functions/cli-executor/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/cli/executor/ComponentCliExecutorTest.kt
ms/blueprintsprocessor/functions/config-snapshots/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/config/snapshots/ComponentConfigSnapshotsExecutorTest.kt
ms/blueprintsprocessor/functions/netconf-executor/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/netconf/executor/ComponentNetconfExecutorTest.kt
ms/blueprintsprocessor/functions/resource-resolution/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/ResourceResolutionServiceTest.kt
ms/blueprintsprocessor/functions/resource-resolution/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/mock/MockBlueprintResLibPropertyService.kt
ms/blueprintsprocessor/functions/resource-resolution/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/processor/DatabaseResourceResolutionProcessorTest.kt
ms/blueprintsprocessor/functions/resource-resolution/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/processor/RestResourceResolutionProcessorTest.kt
ms/blueprintsprocessor/functions/restconf-executor/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/restconf/executor/ComponentRestconfExecutorTest.kt
ms/blueprintsprocessor/modules/commons/db-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/db/BluePrintDBLibConfiguration.kt
ms/blueprintsprocessor/modules/commons/db-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/db/primary/BluePrintDBLibPropertyService.kt
ms/blueprintsprocessor/modules/commons/db-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/db/primary/PrimaryDatabaseConfiguration.kt
ms/blueprintsprocessor/modules/commons/db-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/db/primary/PrimaryDatabaseConfigurationTest.kt
ms/blueprintsprocessor/modules/commons/dmaap-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/dmaap/BluePrintDmaapLibPropertyService.kt
ms/blueprintsprocessor/modules/commons/dmaap-lib/src/test/kotlin/org/ccsdk/cds/blueprintprocessor/dmaap/TestDmaapEventPublisher.kt
ms/blueprintsprocessor/modules/commons/grpc-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/grpc/service/BluePrintGrpcLibPropertyService.kt
ms/blueprintsprocessor/modules/commons/grpc-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/grpc/service/BluePrintGrpcLibPropertyServiceTest.kt
ms/blueprintsprocessor/modules/commons/message-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/message/service/BluePrintMessageLibPropertyService.kt
ms/blueprintsprocessor/modules/commons/message-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/message/service/BlueprintMessageConsumerServiceTest.kt
ms/blueprintsprocessor/modules/commons/message-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/message/service/BlueprintMessageProducerServiceTest.kt
ms/blueprintsprocessor/modules/commons/processor-core/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/core/BluePrintCoreConfiguration.kt
ms/blueprintsprocessor/modules/commons/processor-core/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/core/BluePrintProperties.kt [deleted file]
ms/blueprintsprocessor/modules/commons/rest-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/service/BluePrintRestLibPropertyService.kt
ms/blueprintsprocessor/modules/commons/rest-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/service/BluePrintRestLibPropertyServiceTest.kt
ms/blueprintsprocessor/modules/commons/rest-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/service/RestClientServiceTest.kt
ms/blueprintsprocessor/modules/commons/ssh-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/ssh/service/BluePrintSshLibPropertyService.kt
ms/blueprintsprocessor/modules/commons/ssh-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/ssh/service/BluePrintSshLibPropertyServiceTest.kt
ms/blueprintsprocessor/modules/commons/ssh-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/ssh/service/BlueprintSshClientServiceTest.kt
ms/blueprintsprocessor/modules/inbounds/designer-api/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/BlueprintModelControllerTest.kt
ms/blueprintsprocessor/modules/inbounds/designer-api/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/ModelTypeControllerTest.kt
ms/blueprintsprocessor/modules/inbounds/designer-api/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/ResourceDictionaryControllerTest.kt
ms/blueprintsprocessor/modules/inbounds/designer-api/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/enhancer/BluePrintEnhancerServiceImplTest.kt
ms/blueprintsprocessor/modules/inbounds/designer-api/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/handler/ModelTypeServiceTest.kt
ms/blueprintsprocessor/modules/inbounds/designer-api/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/repository/ModelTypeReactRepositoryTest.kt
ms/blueprintsprocessor/modules/inbounds/designer-api/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/repository/ResourceDictionaryRepositoryTest.kt
ms/blueprintsprocessor/modules/inbounds/selfservice-api/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/selfservice/api/BluePrintProcessingKafkaConsumerTest.kt

index 9c0258d..c4e674c 100644 (file)
@@ -23,8 +23,8 @@ import io.mockk.mockk
 import kotlinx.coroutines.runBlocking
 import org.junit.Test
 import org.junit.runner.RunWith
-import org.onap.ccsdk.cds.blueprintsprocessor.core.BluePrintProperties
-import org.onap.ccsdk.cds.blueprintsprocessor.core.BlueprintPropertyConfiguration
+import org.onap.ccsdk.cds.blueprintsprocessor.core.BluePrintPropertiesService
+import org.onap.ccsdk.cds.blueprintsprocessor.core.BluePrintPropertyConfiguration
 import org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.ActionIdentifiers
 import org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.CommonHeader
 import org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.ExecutionServiceInput
@@ -50,7 +50,7 @@ import kotlin.test.assertNotNull
 @ContextConfiguration(classes = [CliExecutorConfiguration::class,
     ExecutionServiceConfiguration::class,
     BluePrintSshLibConfiguration::class, BluePrintScriptsServiceImpl::class,
-    BlueprintPropertyConfiguration::class, BluePrintProperties::class, BluePrintDependencyService::class])
+    BluePrintPropertyConfiguration::class, BluePrintPropertiesService::class, BluePrintDependencyService::class])
 @DirtiesContext
 @TestPropertySource(properties = [], locations = ["classpath:application-test.properties"])
 class ComponentCliExecutorTest {
index baff96a..f013e89 100644 (file)
@@ -23,8 +23,8 @@ import org.junit.Assert.assertTrue
 import org.junit.Before
 import org.junit.Test
 import org.junit.runner.RunWith
-import org.onap.ccsdk.cds.blueprintsprocessor.core.BluePrintProperties
-import org.onap.ccsdk.cds.blueprintsprocessor.core.BlueprintPropertyConfiguration
+import org.onap.ccsdk.cds.blueprintsprocessor.core.BluePrintPropertiesService
+import org.onap.ccsdk.cds.blueprintsprocessor.core.BluePrintPropertyConfiguration
 import org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.ExecutionServiceInput
 import org.onap.ccsdk.cds.blueprintsprocessor.db.BluePrintDBLibConfiguration
 import org.onap.ccsdk.cds.blueprintsprocessor.functions.config.snapshots.ComponentConfigSnapshotsExecutor.Companion.DIFF_JSON
@@ -48,7 +48,7 @@ import org.springframework.test.context.junit4.SpringRunner
 
 @RunWith(SpringRunner::class)
 @ContextConfiguration(classes = [ResourceConfigSnapshotService::class,
-    BlueprintPropertyConfiguration::class, BluePrintProperties::class,
+    BluePrintPropertyConfiguration::class, BluePrintPropertiesService::class,
     BluePrintDBLibConfiguration::class, BluePrintLoadConfiguration::class])
 @TestPropertySource(locations = ["classpath:application-test.properties"])
 @ComponentScan(basePackages = ["org.onap.ccsdk.cds.blueprintsprocessor", "org.onap.ccsdk.cds.controllerblueprints"])
index 8a08268..be3ee46 100644 (file)
 package org.onap.ccsdk.cds.blueprintsprocessor.functions.netconf.executor
 
 import com.fasterxml.jackson.databind.JsonNode
+import io.mockk.coEvery
+import io.mockk.every
+import io.mockk.mockk
+import io.mockk.spyk
 import kotlinx.coroutines.runBlocking
 import org.junit.Test
-import org.junit.runner.RunWith
 import org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.ExecutionServiceInput
 import org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.StepData
+import org.onap.ccsdk.cds.blueprintsprocessor.services.execution.AbstractScriptComponentFunction
+import org.onap.ccsdk.cds.blueprintsprocessor.services.execution.ComponentFunctionScriptingService
+import org.onap.ccsdk.cds.blueprintsprocessor.services.execution.scripts.BlueprintJythonService
 import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
 import org.onap.ccsdk.cds.controllerblueprints.core.asJsonType
 import org.onap.ccsdk.cds.controllerblueprints.core.putJsonElement
 import org.onap.ccsdk.cds.controllerblueprints.core.utils.BluePrintMetadataUtils
 import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonUtils
-import org.springframework.beans.factory.annotation.Autowired
-import org.springframework.boot.autoconfigure.EnableAutoConfiguration
-import org.springframework.context.annotation.ComponentScan
-import org.springframework.test.annotation.DirtiesContext
-import org.springframework.test.context.TestPropertySource
-import org.springframework.test.context.junit4.SpringRunner
-
-@RunWith(SpringRunner::class)
-@EnableAutoConfiguration
-@ComponentScan(basePackages = ["org.onap.ccsdk.cds.blueprintsprocessor", "org.onap.ccsdk.cds.controllerblueprints"])
-@DirtiesContext
-@TestPropertySource(properties =
-["blueprints.processor.functions.python.executor.modulePaths=./../../../../components/scripts/python/ccsdk_netconf,./../../../../components/scripts/python/ccsdk_blueprints",
-    "blueprints.processor.functions.python.executor.executionPath=./../../../../components/scripts/python/ccsdk_netconf"],
-        locations = ["classpath:application-test.properties"])
-class ComponentNetconfExecutorTest {
-
-    @Autowired
-    lateinit var componentNetconfExecutor: ComponentNetconfExecutor
+import org.springframework.context.ApplicationContext
 
+class ComponentNetconfExecutorTest {
 
     @Test
     fun testComponentNetconfExecutor() {
 
         runBlocking {
+
+            val applicationContext = mockk<ApplicationContext>()
+            every { applicationContext.getBean(any()) } returns mockk()
+
+            val blueprintJythonService = mockk<BlueprintJythonService>()
+            val mockAbstractScriptComponentFunction = spyk<AbstractScriptComponentFunction>()
+            coEvery { mockAbstractScriptComponentFunction.executeScript(any()) } returns mockk()
+
+            coEvery { blueprintJythonService.jythonComponentInstance(any(), any()) } returns mockAbstractScriptComponentFunction
+
+            val componentFunctionScriptingService = ComponentFunctionScriptingService(applicationContext,
+                    blueprintJythonService)
+
+            val componentNetconfExecutor = ComponentNetconfExecutor(componentFunctionScriptingService)
+
             val executionServiceInput = JacksonUtils.readValueFromClassPathFile("requests/sample-activate-request.json",
                     ExecutionServiceInput::class.java)!!
 
             val bluePrintRuntimeService = BluePrintMetadataUtils.getBluePrintRuntime("1234",
                     "./../../../../components/model-catalog/blueprint-model/test-blueprint/baseconfiguration")
 
-            val assignmentParams = "{\n" +
-                    "            \"ipAddress\": \"127.0.0.1\",\n" +
-                    "            \"hostName\": \"vnf-host\"\n" +
-                    "          }"
+            val assignmentParams = """{
+                "ipAddress" : "127.0.0.1",
+                "hostName" : "vnf-host"
+                }                
+            """.trimIndent()
 
             val json = """{
                 "hostname" : "127.0.0.1"
@@ -75,8 +80,6 @@ class ComponentNetconfExecutorTest {
             bluePrintRuntimeService.setNodeTemplateAttributeValue("resource-assignment", "assignment-params",
                     JacksonUtils.jsonNode(assignmentParams))
 
-            val executionContext = bluePrintRuntimeService.getExecutionContext()
-
             componentNetconfExecutor.bluePrintRuntimeService = bluePrintRuntimeService
 
             //TODO("Set Attribute properties")
@@ -93,7 +96,6 @@ class ComponentNetconfExecutorTest {
             executionServiceInput.stepData = stepInputData
             componentNetconfExecutor.applyNB(executionServiceInput)
         }
-
     }
 }
 
index 5a5336a..db453ac 100644 (file)
@@ -25,8 +25,8 @@ import org.junit.Assert
 import org.junit.Before
 import org.junit.Test
 import org.junit.runner.RunWith
-import org.onap.ccsdk.cds.blueprintsprocessor.core.BluePrintProperties
-import org.onap.ccsdk.cds.blueprintsprocessor.core.BlueprintPropertyConfiguration
+import org.onap.ccsdk.cds.blueprintsprocessor.core.BluePrintPropertiesService
+import org.onap.ccsdk.cds.blueprintsprocessor.core.BluePrintPropertyConfiguration
 import org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.ExecutionServiceInput
 import org.onap.ccsdk.cds.blueprintsprocessor.core.utils.PayloadUtils
 import org.onap.ccsdk.cds.blueprintsprocessor.db.BluePrintDBLibConfiguration
@@ -61,7 +61,7 @@ import kotlin.test.assertTrue
     InputResourceResolutionProcessor::class, DefaultResourceResolutionProcessor::class,
     DatabaseResourceAssignmentProcessor::class, RestResourceResolutionProcessor::class,
     CapabilityResourceResolutionProcessor::class,
-    BlueprintPropertyConfiguration::class, BluePrintProperties::class,
+    BluePrintPropertyConfiguration::class, BluePrintPropertiesService::class,
     BluePrintDBLibConfiguration::class, BluePrintLoadConfiguration::class])
 @TestPropertySource(locations = ["classpath:application-test.properties"])
 @ComponentScan(basePackages = ["org.onap.ccsdk.cds.blueprintsprocessor", "org.onap.ccsdk.cds.controllerblueprints"])
index b79f486..f64ba2b 100644 (file)
  */
 package org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.mock
 
-import org.onap.ccsdk.cds.blueprintsprocessor.core.BluePrintProperties
+import org.onap.ccsdk.cds.blueprintsprocessor.core.BluePrintPropertiesService
 import org.onap.ccsdk.cds.blueprintsprocessor.rest.RestClientProperties
 import org.onap.ccsdk.cds.blueprintsprocessor.rest.service.BluePrintRestLibPropertyService
 
-class MockBluePrintRestLibPropertyService(bluePrintProperties: BluePrintProperties) :
+class MockBluePrintRestLibPropertyService(bluePrintProperties: BluePrintPropertiesService) :
         BluePrintRestLibPropertyService(bluePrintProperties) {
 
     fun mockBlueprintWebClientService (selector: String):
index 547681d..ac5ba3c 100644 (file)
@@ -19,9 +19,8 @@ import kotlinx.coroutines.runBlocking
 import org.junit.Test
 import org.junit.runner.RunWith
 import org.onap.ccsdk.cds.blueprintsprocessor.core.BluePrintCoreConfiguration
-import org.onap.ccsdk.cds.blueprintsprocessor.core.BluePrintProperties
-import org.onap.ccsdk.cds.blueprintsprocessor.core.BlueprintPropertiesService
-import org.onap.ccsdk.cds.blueprintsprocessor.core.BlueprintPropertyConfiguration
+import org.onap.ccsdk.cds.blueprintsprocessor.core.BluePrintPropertiesService
+import org.onap.ccsdk.cds.blueprintsprocessor.core.BluePrintPropertyConfiguration
 import org.onap.ccsdk.cds.blueprintsprocessor.db.BluePrintDBLibConfiguration
 import org.onap.ccsdk.cds.blueprintsprocessor.db.primary.BluePrintDBLibPropertySevice
 import org.onap.ccsdk.cds.blueprintsprocessor.db.primary.PrimaryDatabaseConfiguration
@@ -39,10 +38,10 @@ import org.springframework.test.context.junit4.SpringRunner
 import kotlin.test.assertNotNull
 
 @RunWith(SpringRunner::class)
-@ContextConfiguration(classes = [DatabaseResourceAssignmentProcessor::class, BlueprintPropertyConfiguration::class,
-    BluePrintProperties::class, BluePrintDBLibPropertySevice::class, BluePrintDBLibConfiguration::class,
+@ContextConfiguration(classes = [DatabaseResourceAssignmentProcessor::class, BluePrintPropertyConfiguration::class,
+    BluePrintPropertiesService::class, BluePrintDBLibPropertySevice::class, BluePrintDBLibConfiguration::class,
     BluePrintCoreConfiguration::class, MockDatabaseConfiguration::class, MockBlueprintProcessorCatalogServiceImpl::class,
-    BlueprintPropertiesService::class, PrimaryDatabaseConfiguration::class])
+    BluePrintPropertiesService::class, PrimaryDatabaseConfiguration::class])
 @TestPropertySource(locations = ["classpath:application-test.properties"])
 class DatabaseResourceResolutionProcessorTest {
 
index 2879342..1c0f33f 100644 (file)
@@ -18,8 +18,8 @@ package org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.pro
 import kotlinx.coroutines.runBlocking
 import org.junit.Test
 import org.junit.runner.RunWith
-import org.onap.ccsdk.cds.blueprintsprocessor.core.BluePrintProperties
-import org.onap.ccsdk.cds.blueprintsprocessor.core.BlueprintPropertyConfiguration
+import org.onap.ccsdk.cds.blueprintsprocessor.core.BluePrintPropertiesService
+import org.onap.ccsdk.cds.blueprintsprocessor.core.BluePrintPropertyConfiguration
 import org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.ResourceAssignmentRuntimeService
 import org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.mock.MockBluePrintRestLibPropertyService
 import org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.mock.MockRestResourceResolutionProcessor
@@ -37,7 +37,7 @@ import kotlin.test.assertNotNull
 
 @RunWith(SpringRunner::class)
 @ContextConfiguration(classes = [MockRestResourceResolutionProcessor::class, MockBluePrintRestLibPropertyService::class,
-    BlueprintPropertyConfiguration::class, BluePrintProperties::class, RestClientProperties::class])
+    BluePrintPropertyConfiguration::class, BluePrintPropertiesService::class, RestClientProperties::class])
 @TestPropertySource(locations = ["classpath:application-test.properties"])
 class RestResourceResolutionProcessorTest {
     @Autowired
index 2b2b83e..0336ce9 100644 (file)
@@ -22,45 +22,31 @@ import io.mockk.every
 import io.mockk.mockk
 import kotlinx.coroutines.runBlocking
 import org.junit.Test
-import org.junit.runner.RunWith
 import org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.ActionIdentifiers
 import org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.CommonHeader
 import org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.ExecutionServiceInput
 import org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.StepData
+import org.onap.ccsdk.cds.blueprintsprocessor.services.execution.ComponentFunctionScriptingService
 import org.onap.ccsdk.cds.blueprintsprocessor.services.execution.ComponentScriptExecutor
 import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
 import org.onap.ccsdk.cds.controllerblueprints.core.asJsonPrimitive
 import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintContext
 import org.onap.ccsdk.cds.controllerblueprints.core.service.DefaultBluePrintRuntimeService
 import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonUtils
-import org.springframework.beans.factory.annotation.Autowired
-import org.springframework.boot.autoconfigure.EnableAutoConfiguration
-import org.springframework.context.annotation.ComponentScan
-import org.springframework.test.annotation.DirtiesContext
-import org.springframework.test.context.TestPropertySource
-import org.springframework.test.context.junit4.SpringRunner
+import org.springframework.context.ApplicationContext
 import kotlin.test.assertNotNull
 
-@RunWith(SpringRunner::class)
-@EnableAutoConfiguration
-@ComponentScan(basePackages = ["org.onap.ccsdk.cds.blueprintsprocessor", "org.onap.ccsdk.cds.controllerblueprints"])
-@DirtiesContext
-@TestPropertySource(properties =
-["server.port=9111",
-    "blueprintsprocessor.restconfEnabled=true",
-    "blueprintsprocessor.restclient.odlPrimary.type=basic-auth",
-    "blueprintsprocessor.restclient.odlPrimary.url=http://127.0.0.1:9111",
-    "blueprintsprocessor.restclient.odlPrimary.userId=sampleuser",
-    "blueprintsprocessor.restclient.odlPrimary.token=sampletoken"],
-        locations = ["classpath:application-test.properties"])
 class ComponentRestconfExecutorTest {
 
-    @Autowired
-    lateinit var componentScriptExecutor: ComponentScriptExecutor
-
     @Test
     fun `test Restconf Component Instance`() {
         runBlocking {
+
+            val applicationContext = mockk<ApplicationContext>()
+            every { applicationContext.getBean(any()) } returns mockk()
+            val componentFunctionScriptingService = ComponentFunctionScriptingService(applicationContext, mockk())
+            val componentScriptExecutor = ComponentScriptExecutor(componentFunctionScriptingService)
+
             assertNotNull(componentScriptExecutor, "failed to get ComponentRestconfExecutor instance")
             val executionServiceInput = ExecutionServiceInput().apply {
                 commonHeader = CommonHeader().apply {
index 907e93b..a7ad921 100644 (file)
@@ -16,7 +16,7 @@
 
 package org.onap.ccsdk.cds.blueprintsprocessor.db
 
-import org.onap.ccsdk.cds.blueprintsprocessor.core.BluePrintProperties
+import org.onap.ccsdk.cds.blueprintsprocessor.core.BluePrintPropertiesService
 import org.onap.ccsdk.cds.blueprintsprocessor.db.primary.BluePrintDBLibPropertySevice
 import org.onap.ccsdk.cds.blueprintsprocessor.db.primary.PrimaryDBLibGenericService
 import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintDependencyService
@@ -26,11 +26,11 @@ import org.springframework.context.annotation.Configuration
 
 @Configuration
 @EnableConfigurationProperties
-open class BluePrintDBLibConfiguration(private var bluePrintProperties: BluePrintProperties) {
+open class BluePrintDBLibConfiguration(private var bluePrintPropertiesService: BluePrintPropertiesService) {
 
     @Bean("primary-database-properties")
     open fun getPrimaryProperties(): PrimaryDataSourceProperties {
-        return bluePrintProperties.propertyBeanType(DBLibConstants.PREFIX_DB,
+        return bluePrintPropertiesService.propertyBeanType(DBLibConstants.PREFIX_DB,
                 PrimaryDataSourceProperties::class.java)
     }
 }
index 2ae5042..ff53de8 100644 (file)
 package org.onap.ccsdk.cds.blueprintsprocessor.db.primary
 
 import com.fasterxml.jackson.databind.JsonNode
-import org.onap.ccsdk.cds.blueprintsprocessor.core.BluePrintProperties
+import org.onap.ccsdk.cds.blueprintsprocessor.core.BluePrintPropertiesService
 import org.onap.ccsdk.cds.blueprintsprocessor.db.*
 import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintProcessorException
 import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonUtils
 import org.springframework.stereotype.Service
 
 @Service
-class BluePrintDBLibPropertySevice(private var bluePrintProperties: BluePrintProperties) {
+class BluePrintDBLibPropertySevice(private var bluePrintPropertiesService: BluePrintPropertiesService) {
 
     fun JdbcTemplate(jsonNode: JsonNode): BluePrintDBLibGenericService {
         val dBConnetionProperties = dBDataSourceProperties(jsonNode)
@@ -53,7 +53,7 @@ class BluePrintDBLibPropertySevice(private var bluePrintProperties: BluePrintPro
     }
 
     private fun dBDataSourceProperties(prefix: String): DBDataSourceProperties {
-        val type = bluePrintProperties.propertyBeanType("$prefix.type", String::class.java)
+        val type = bluePrintPropertiesService.propertyBeanType("$prefix.type", String::class.java)
         return when (type) {
             DBLibConstants.MARIA_DB -> {
                 mariaDBConnectionProperties(prefix)
@@ -91,15 +91,15 @@ class BluePrintDBLibPropertySevice(private var bluePrintProperties: BluePrintPro
     }
 
     private fun mySqlDBConnectionProperties(prefix: String): MySqlDataSourceProperties {
-        return bluePrintProperties.propertyBeanType(prefix, MySqlDataSourceProperties::class.java)
+        return bluePrintPropertiesService.propertyBeanType(prefix, MySqlDataSourceProperties::class.java)
     }
 
     private fun mariaDBConnectionProperties(prefix: String): MariaDataSourceProperties {
-        return bluePrintProperties.propertyBeanType(prefix, MariaDataSourceProperties::class.java)
+        return bluePrintPropertiesService.propertyBeanType(prefix, MariaDataSourceProperties::class.java)
     }
 
     private fun primaryDBConnectionProperties(prefix: String): PrimaryDataSourceProperties {
-        return bluePrintProperties.propertyBeanType(prefix, PrimaryDataSourceProperties::class.java)
+        return bluePrintPropertiesService.propertyBeanType(prefix, PrimaryDataSourceProperties::class.java)
     }
 
 }
\ No newline at end of file
index b17dcf0..82b77da 100644 (file)
@@ -22,7 +22,6 @@ import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty
 import org.springframework.context.annotation.Bean
 import org.springframework.context.annotation.ComponentScan
 import org.springframework.context.annotation.Configuration
-import org.springframework.context.annotation.Primary
 import org.springframework.data.jpa.repository.config.EnableJpaAuditing
 import org.springframework.data.jpa.repository.config.EnableJpaRepositories
 import org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate
@@ -48,7 +47,6 @@ import javax.sql.DataSource
 open class PrimaryDatabaseConfiguration(private val primaryDataSourceProperties: PrimaryDataSourceProperties) {
     private val log = LoggerFactory.getLogger(PrimaryDatabaseConfiguration::class.java)!!
 
-    @Primary
     @Bean("primaryEntityManager")
     open fun primaryEntityManager(): LocalContainerEntityManagerFactoryBean {
         val em = LocalContainerEntityManagerFactoryBean()
@@ -63,7 +61,6 @@ open class PrimaryDatabaseConfiguration(private val primaryDataSourceProperties:
         return em
     }
 
-    @Primary
     @Bean("primaryDataSource")
     open fun primaryDataSource(): DataSource {
         val dataSource = DriverManagerDataSource()
@@ -74,7 +71,6 @@ open class PrimaryDatabaseConfiguration(private val primaryDataSourceProperties:
         return dataSource
     }
 
-    @Primary
     @Bean("primaryTransactionManager")
     open fun primaryTransactionManager(): PlatformTransactionManager {
         val transactionManager = JpaTransactionManager()
index b4a2178..2ab1c5d 100644 (file)
@@ -18,8 +18,8 @@ package org.onap.ccsdk.cds.blueprintsprocessor.db.primary
 
 import org.junit.Test
 import org.junit.runner.RunWith
-import org.onap.ccsdk.cds.blueprintsprocessor.core.BluePrintProperties
-import org.onap.ccsdk.cds.blueprintsprocessor.core.BlueprintPropertyConfiguration
+import org.onap.ccsdk.cds.blueprintsprocessor.core.BluePrintPropertiesService
+import org.onap.ccsdk.cds.blueprintsprocessor.core.BluePrintPropertyConfiguration
 import org.onap.ccsdk.cds.blueprintsprocessor.db.BluePrintDBLibConfiguration
 import org.onap.ccsdk.cds.controllerblueprints.core.config.BluePrintLoadConfiguration
 import org.springframework.beans.factory.annotation.Autowired
@@ -32,7 +32,7 @@ import javax.sql.DataSource
 import kotlin.test.assertNotNull
 
 @RunWith(SpringRunner::class)
-@ContextConfiguration(classes = [BlueprintPropertyConfiguration::class, BluePrintProperties::class,
+@ContextConfiguration(classes = [BluePrintPropertyConfiguration::class, BluePrintPropertiesService::class,
     BluePrintDBLibConfiguration::class, BluePrintLoadConfiguration::class])
 @TestPropertySource(locations = ["classpath:application-test.properties"])
 @ComponentScan(basePackages = ["org.onap.ccsdk.cds.blueprintsprocessor", "org.onap.ccsdk.cds.controllerblueprints"])
index 8604d88..cde4987 100644 (file)
@@ -21,7 +21,7 @@
 package org.onap.ccsdk.cds.blueprintsprocessor.dmaap
 
 import com.fasterxml.jackson.databind.JsonNode
-import org.onap.ccsdk.cds.blueprintsprocessor.core.BluePrintProperties
+import org.onap.ccsdk.cds.blueprintsprocessor.core.BluePrintPropertiesService
 import org.onap.ccsdk.cds.blueprintsprocessor.dmaap.DmaapLibConstants.Companion.SERVICE_BLUEPRINT_DMAAP_LIB_PROPERTY
 import org.onap.ccsdk.cds.blueprintsprocessor.dmaap.DmaapLibConstants.Companion.TYPE_HTTP_AAF_AUTH
 import org.onap.ccsdk.cds.blueprintsprocessor.dmaap.DmaapLibConstants.Companion.TYPE_HTTP_NO_AUTH
@@ -36,7 +36,7 @@ import org.springframework.core.env.ConfigurableEnvironment
 import org.springframework.core.env.Environment
 import org.springframework.core.io.support.ResourcePropertySource
 import org.springframework.stereotype.Service
-import java.util.Properties
+import java.util.*
 
 /**
  * Representation of DMAAP lib property service to load the properties
@@ -46,15 +46,14 @@ import java.util.Properties
 @Service(SERVICE_BLUEPRINT_DMAAP_LIB_PROPERTY)
 @Configuration
 @PropertySources(PropertySource("classpath:event.properties"))
-open class BluePrintDmaapLibPropertyService(private var bluePrintProperties:
-                                            BluePrintProperties) {
+open class BluePrintDmaapLibPropertyService(private var bluePrintPropertiesService: BluePrintPropertiesService) {
 
     /**
      * Static variable for logging.
      */
     companion object {
         var log = LoggerFactory.getLogger(
-            BluePrintDmaapLibPropertyService::class.java)!!
+                BluePrintDmaapLibPropertyService::class.java)!!
     }
 
     /**
@@ -90,20 +89,20 @@ open class BluePrintDmaapLibPropertyService(private var bluePrintProperties:
      * requires.
      */
     fun dmaapClientProperties(prefix: String): DmaapClientProperties {
-        val type = bluePrintProperties.propertyBeanType(
-            "$prefix.type", String::class.java)
-        val clientProps : DmaapClientProperties
+        val type = bluePrintPropertiesService.propertyBeanType(
+                "$prefix.type", String::class.java)
+        val clientProps: DmaapClientProperties
 
         when (type) {
             TYPE_HTTP_NO_AUTH -> {
-                clientProps =  bluePrintProperties.propertyBeanType(
-                    prefix, HttpNoAuthDmaapClientProperties::class.java)
+                clientProps = bluePrintPropertiesService.propertyBeanType(
+                        prefix, HttpNoAuthDmaapClientProperties::class.java)
                 clientProps.props = parseEventProps()
             }
 
             TYPE_HTTP_AAF_AUTH -> {
-                clientProps =  bluePrintProperties.propertyBeanType(
-                    prefix, AafAuthDmaapClientProperties::class.java)
+                clientProps = bluePrintPropertiesService.propertyBeanType(
+                        prefix, AafAuthDmaapClientProperties::class.java)
                 clientProps.props = parseEventProps()
             }
 
@@ -121,18 +120,18 @@ open class BluePrintDmaapLibPropertyService(private var bluePrintProperties:
      */
     fun dmaapClientProperties(jsonNode: JsonNode): DmaapClientProperties {
         val type = jsonNode.get("type").textValue()
-        val clientProps : DmaapClientProperties
+        val clientProps: DmaapClientProperties
 
         when (type) {
             TYPE_HTTP_NO_AUTH -> {
                 clientProps = JacksonUtils.readValue(jsonNode,
-                    HttpNoAuthDmaapClientProperties::class.java)!!
+                        HttpNoAuthDmaapClientProperties::class.java)!!
                 clientProps.props = parseEventProps()
             }
 
             TYPE_HTTP_AAF_AUTH -> {
                 clientProps = JacksonUtils.readValue(jsonNode,
-                    AafAuthDmaapClientProperties::class.java)!!
+                        AafAuthDmaapClientProperties::class.java)!!
                 clientProps.props = parseEventProps()
             }
 
@@ -172,7 +171,7 @@ open class BluePrintDmaapLibPropertyService(private var bluePrintProperties:
     private fun parseEventProps(): Properties {
         val prodProps = Properties()
         val proProps = (env as ConfigurableEnvironment).propertySources.get(
-            "class path resource [event.properties]")
+                "class path resource [event.properties]")
 
         if (proProps != null) {
             val entries = (proProps as ResourcePropertySource).source.entries
index 65d8775..4e91d59 100644 (file)
@@ -23,8 +23,8 @@ package org.ccsdk.apps.blueprintprocessor.dmaap
 import com.fasterxml.jackson.databind.ObjectMapper
 import org.junit.Test
 import org.junit.runner.RunWith
-import org.onap.ccsdk.cds.blueprintsprocessor.core.BluePrintProperties
-import org.onap.ccsdk.cds.blueprintsprocessor.core.BlueprintPropertyConfiguration
+import org.onap.ccsdk.cds.blueprintsprocessor.core.BluePrintPropertiesService
+import org.onap.ccsdk.cds.blueprintsprocessor.core.BluePrintPropertyConfiguration
 import org.onap.ccsdk.cds.blueprintsprocessor.dmaap.BluePrintDmaapLibConfiguration
 import org.onap.ccsdk.cds.blueprintsprocessor.dmaap.BluePrintDmaapLibPropertyService
 import org.springframework.beans.factory.annotation.Autowired
@@ -50,7 +50,7 @@ import kotlin.test.assertNotNull
 @EnableAutoConfiguration(exclude = [DataSourceAutoConfiguration::class])
 @SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.DEFINED_PORT)
 @ContextConfiguration(classes = [BluePrintDmaapLibConfiguration::class, TestController::class,
-    BlueprintPropertyConfiguration::class, BluePrintProperties::class])
+    BluePrintPropertyConfiguration::class, BluePrintPropertiesService::class])
 @TestPropertySource(properties = ["server.port=9111",
     "blueprintsprocessor.dmaapclient.aai.topic=cds_aai",
     "blueprintsprocessor.dmaapclient.aai.type=HTTPNOAUTH",
index f4933a3..fbc9ddd 100644 (file)
@@ -18,7 +18,7 @@
 package org.onap.ccsdk.cds.blueprintsprocessor.grpc.service
 
 import com.fasterxml.jackson.databind.JsonNode
-import org.onap.ccsdk.cds.blueprintsprocessor.core.BluePrintProperties
+import org.onap.ccsdk.cds.blueprintsprocessor.core.BluePrintPropertiesService
 import org.onap.ccsdk.cds.blueprintsprocessor.grpc.*
 import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintProcessorException
 import org.onap.ccsdk.cds.controllerblueprints.core.returnNullIfMissing
@@ -26,7 +26,7 @@ import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonUtils
 import org.springframework.stereotype.Service
 
 @Service(GRPCLibConstants.SERVICE_BLUEPRINT_GRPC_LIB_PROPERTY)
-open class BluePrintGrpcLibPropertyService(private var bluePrintProperties: BluePrintProperties) {
+open class BluePrintGrpcLibPropertyService(private var bluePrintPropertiesService: BluePrintPropertiesService) {
 
     /** GRPC Server Lib Property Service */
     fun grpcServerProperties(jsonNode: JsonNode): GrpcServerProperties {
@@ -44,7 +44,7 @@ open class BluePrintGrpcLibPropertyService(private var bluePrintProperties: Blue
     }
 
     fun grpcServerProperties(prefix: String): GrpcServerProperties {
-        val type = bluePrintProperties.propertyBeanType(
+        val type = bluePrintPropertiesService.propertyBeanType(
                 "$prefix.type", String::class.java)
         return when (type) {
             GRPCLibConstants.TYPE_TOKEN_AUTH -> {
@@ -60,11 +60,11 @@ open class BluePrintGrpcLibPropertyService(private var bluePrintProperties: Blue
     }
 
     private fun tokenAuthGrpcServerProperties(prefix: String): TokenAuthGrpcServerProperties {
-        return bluePrintProperties.propertyBeanType(prefix, TokenAuthGrpcServerProperties::class.java)
+        return bluePrintPropertiesService.propertyBeanType(prefix, TokenAuthGrpcServerProperties::class.java)
     }
 
     private fun tlsAuthGrpcServerProperties(prefix: String): TLSAuthGrpcServerProperties {
-        return bluePrintProperties.propertyBeanType(prefix, TLSAuthGrpcServerProperties::class.java)
+        return bluePrintPropertiesService.propertyBeanType(prefix, TLSAuthGrpcServerProperties::class.java)
     }
 
     /** GRPC Client Lib Property Service */
@@ -101,7 +101,7 @@ open class BluePrintGrpcLibPropertyService(private var bluePrintProperties: Blue
     }
 
     fun grpcClientProperties(prefix: String): GrpcClientProperties {
-        val type = bluePrintProperties.propertyBeanType(
+        val type = bluePrintPropertiesService.propertyBeanType(
                 "$prefix.type", String::class.java)
         return when (type) {
             GRPCLibConstants.TYPE_TOKEN_AUTH -> {
@@ -139,14 +139,14 @@ open class BluePrintGrpcLibPropertyService(private var bluePrintProperties: Blue
     }
 
     private fun tokenAuthGrpcClientProperties(prefix: String): TokenAuthGrpcClientProperties {
-        return bluePrintProperties.propertyBeanType(prefix, TokenAuthGrpcClientProperties::class.java)
+        return bluePrintPropertiesService.propertyBeanType(prefix, TokenAuthGrpcClientProperties::class.java)
     }
 
     private fun tlsAuthGrpcClientProperties(prefix: String): TLSAuthGrpcClientProperties {
-        return bluePrintProperties.propertyBeanType(prefix, TLSAuthGrpcClientProperties::class.java)
+        return bluePrintPropertiesService.propertyBeanType(prefix, TLSAuthGrpcClientProperties::class.java)
     }
 
     private fun basicAuthGrpcClientProperties(prefix: String): BasicAuthGrpcClientProperties {
-        return bluePrintProperties.propertyBeanType(prefix, BasicAuthGrpcClientProperties::class.java)
+        return bluePrintPropertiesService.propertyBeanType(prefix, BasicAuthGrpcClientProperties::class.java)
     }
 }
\ No newline at end of file
index b7ddc15..e4bfd5d 100644 (file)
@@ -21,8 +21,8 @@ import com.fasterxml.jackson.databind.JsonNode
 import com.fasterxml.jackson.databind.ObjectMapper
 import org.junit.Test
 import org.junit.runner.RunWith
-import org.onap.ccsdk.cds.blueprintsprocessor.core.BluePrintProperties
-import org.onap.ccsdk.cds.blueprintsprocessor.core.BlueprintPropertyConfiguration
+import org.onap.ccsdk.cds.blueprintsprocessor.core.BluePrintPropertiesService
+import org.onap.ccsdk.cds.blueprintsprocessor.core.BluePrintPropertyConfiguration
 import org.onap.ccsdk.cds.blueprintsprocessor.grpc.*
 import org.onap.ccsdk.cds.controllerblueprints.core.jsonAsJsonType
 import org.springframework.beans.factory.annotation.Autowired
@@ -35,7 +35,7 @@ import kotlin.test.assertTrue
 
 @RunWith(SpringRunner::class)
 @ContextConfiguration(classes = [BluePrintGrpcLibConfiguration::class,
-    BlueprintPropertyConfiguration::class, BluePrintProperties::class])
+    BluePrintPropertyConfiguration::class, BluePrintPropertiesService::class])
 @TestPropertySource(properties =
 ["blueprintsprocessor.grpcclient.sample.type=basic-auth",
     "blueprintsprocessor.grpcclient.sample.host=127.0.0.1",
index 7c56ea4..52413cc 100644 (file)
 package org.onap.ccsdk.cds.blueprintsprocessor.message.service
 
 import com.fasterxml.jackson.databind.JsonNode
-import org.onap.ccsdk.cds.blueprintsprocessor.core.BluePrintProperties
+import org.onap.ccsdk.cds.blueprintsprocessor.core.BluePrintPropertiesService
 import org.onap.ccsdk.cds.blueprintsprocessor.message.*
 import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintProcessorException
 import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonUtils
 import org.springframework.stereotype.Service
 
 @Service(MessageLibConstants.SERVICE_BLUEPRINT_MESSAGE_LIB_PROPERTY)
-open class BluePrintMessageLibPropertyService(private var bluePrintProperties: BluePrintProperties) {
+open class BluePrintMessageLibPropertyService(private var bluePrintPropertiesService: BluePrintPropertiesService) {
 
     fun blueprintMessageProducerService(jsonNode: JsonNode): BlueprintMessageProducerService {
         val messageClientProperties = messageProducerProperties(jsonNode)
@@ -38,7 +38,7 @@ open class BluePrintMessageLibPropertyService(private var bluePrintProperties: B
     }
 
     fun messageProducerProperties(prefix: String): MessageProducerProperties {
-        val type = bluePrintProperties.propertyBeanType("$prefix.type", String::class.java)
+        val type = bluePrintPropertiesService.propertyBeanType("$prefix.type", String::class.java)
         return when (type) {
             MessageLibConstants.TYPE_KAFKA_BASIC_AUTH -> {
                 kafkaBasicAuthMessageProducerProperties(prefix)
@@ -75,7 +75,7 @@ open class BluePrintMessageLibPropertyService(private var bluePrintProperties: B
     }
 
     private fun kafkaBasicAuthMessageProducerProperties(prefix: String): KafkaBasicAuthMessageProducerProperties {
-        return bluePrintProperties.propertyBeanType(
+        return bluePrintPropertiesService.propertyBeanType(
                 prefix, KafkaBasicAuthMessageProducerProperties::class.java)
     }
 
@@ -96,7 +96,7 @@ open class BluePrintMessageLibPropertyService(private var bluePrintProperties: B
 
     /** Return Message Consumer Properties for [prefix] definitions. */
     fun messageConsumerProperties(prefix: String): MessageConsumerProperties {
-        val type = bluePrintProperties.propertyBeanType("$prefix.type", String::class.java)
+        val type = bluePrintPropertiesService.propertyBeanType("$prefix.type", String::class.java)
         return when (type) {
             MessageLibConstants.TYPE_KAFKA_BASIC_AUTH -> {
                 kafkaBasicAuthMessageConsumerProperties(prefix)
@@ -133,7 +133,7 @@ open class BluePrintMessageLibPropertyService(private var bluePrintProperties: B
     }
 
     private fun kafkaBasicAuthMessageConsumerProperties(prefix: String): KafkaBasicAuthMessageConsumerProperties {
-        return bluePrintProperties.propertyBeanType(
+        return bluePrintPropertiesService.propertyBeanType(
                 prefix, KafkaBasicAuthMessageConsumerProperties::class.java)
     }
 
index bdceec7..b2accfb 100644 (file)
@@ -27,8 +27,8 @@ import org.apache.kafka.clients.consumer.*
 import org.apache.kafka.common.TopicPartition
 import org.junit.Test
 import org.junit.runner.RunWith
-import org.onap.ccsdk.cds.blueprintsprocessor.core.BluePrintProperties
-import org.onap.ccsdk.cds.blueprintsprocessor.core.BlueprintPropertyConfiguration
+import org.onap.ccsdk.cds.blueprintsprocessor.core.BluePrintPropertiesService
+import org.onap.ccsdk.cds.blueprintsprocessor.core.BluePrintPropertyConfiguration
 import org.onap.ccsdk.cds.blueprintsprocessor.message.BluePrintMessageLibConfiguration
 import org.onap.ccsdk.cds.blueprintsprocessor.message.MessageConsumerProperties
 import org.onap.ccsdk.cds.controllerblueprints.core.logger
@@ -44,7 +44,7 @@ import kotlin.test.assertTrue
 @RunWith(SpringRunner::class)
 @DirtiesContext
 @ContextConfiguration(classes = [BluePrintMessageLibConfiguration::class,
-    BlueprintPropertyConfiguration::class, BluePrintProperties::class])
+    BluePrintPropertyConfiguration::class, BluePrintPropertiesService::class])
 @TestPropertySource(properties =
 ["blueprintsprocessor.messageconsumer.sample.type=kafka-basic-auth",
     "blueprintsprocessor.messageconsumer.sample.bootstrapServers=127.0.0.1:9092",
index f23624f..4fe5f5d 100644 (file)
@@ -23,8 +23,8 @@ import kotlinx.coroutines.runBlocking
 import org.apache.kafka.clients.producer.KafkaProducer
 import org.apache.kafka.clients.producer.RecordMetadata
 import org.junit.runner.RunWith
-import org.onap.ccsdk.cds.blueprintsprocessor.core.BluePrintProperties
-import org.onap.ccsdk.cds.blueprintsprocessor.core.BlueprintPropertyConfiguration
+import org.onap.ccsdk.cds.blueprintsprocessor.core.BluePrintPropertiesService
+import org.onap.ccsdk.cds.blueprintsprocessor.core.BluePrintPropertyConfiguration
 import org.onap.ccsdk.cds.blueprintsprocessor.message.BluePrintMessageLibConfiguration
 import org.springframework.beans.factory.annotation.Autowired
 import org.springframework.test.annotation.DirtiesContext
@@ -39,7 +39,7 @@ import kotlin.test.assertTrue
 @RunWith(SpringRunner::class)
 @DirtiesContext
 @ContextConfiguration(classes = [BluePrintMessageLibConfiguration::class,
-    BlueprintPropertyConfiguration::class, BluePrintProperties::class])
+    BluePrintPropertyConfiguration::class, BluePrintPropertiesService::class])
 @TestPropertySource(properties =
 ["blueprintsprocessor.messageproducer.sample.type=kafka-basic-auth",
     "blueprintsprocessor.messageproducer.sample.bootstrapServers=127.0.0.1:9092",
index 9980b9e..62dc933 100644 (file)
@@ -32,7 +32,7 @@ import org.springframework.core.env.Environment
 import org.springframework.stereotype.Service
 
 @Configuration
-open class BluePrintCoreConfiguration(private val bluePrintPropertiesService: BlueprintPropertiesService) {
+open class BluePrintCoreConfiguration(private val bluePrintPropertiesService: BluePrintPropertiesService) {
 
     companion object {
         const val PREFIX_BLUEPRINT_PROCESSOR = "blueprintsprocessor"
@@ -46,7 +46,7 @@ open class BluePrintCoreConfiguration(private val bluePrintPropertiesService: Bl
 }
 
 @Configuration
-open class BlueprintPropertyConfiguration {
+open class BluePrintPropertyConfiguration {
     @Autowired
     lateinit var environment: Environment
 
@@ -58,7 +58,7 @@ open class BlueprintPropertyConfiguration {
 }
 
 @Service
-open class BlueprintPropertiesService(private var bluePrintPropertyBinder: Binder) {
+open class BluePrintPropertiesService(private var bluePrintPropertyBinder: Binder) {
     fun <T> propertyBeanType(prefix: String, type: Class<T>): T {
         return bluePrintPropertyBinder.bind(prefix, Bindable.of(type)).get()
     }
diff --git a/ms/blueprintsprocessor/modules/commons/processor-core/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/core/BluePrintProperties.kt b/ms/blueprintsprocessor/modules/commons/processor-core/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/core/BluePrintProperties.kt
deleted file mode 100644 (file)
index e2a4808..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * Copyright Â© 2017-2018 AT&T Intellectual Property.
- *
- * 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.
- */
-
-package org.onap.ccsdk.cds.blueprintsprocessor.core
-
-import org.springframework.boot.context.properties.bind.Bindable
-import org.springframework.boot.context.properties.bind.Binder
-import org.springframework.stereotype.Service
-
-@Service
-open class BluePrintProperties(var bluePrintPropertyBinder: Binder) {
-
-    fun <T> propertyBeanType(prefix: String, type: Class<T>): T {
-        return bluePrintPropertyBinder.bind(prefix, Bindable.of(type)).get()
-    }
-}
\ No newline at end of file
index 9a7b3c3..84ba7d4 100644 (file)
 package org.onap.ccsdk.cds.blueprintsprocessor.rest.service
 
 import com.fasterxml.jackson.databind.JsonNode
-import org.onap.ccsdk.cds.blueprintsprocessor.core.BluePrintProperties
+import org.onap.ccsdk.cds.blueprintsprocessor.core.BluePrintPropertiesService
 import org.onap.ccsdk.cds.blueprintsprocessor.rest.*
 import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintProcessorException
 import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonUtils
 import org.springframework.stereotype.Service
 
 @Service(RestLibConstants.SERVICE_BLUEPRINT_REST_LIB_PROPERTY)
-open class BluePrintRestLibPropertyService(private var bluePrintProperties:
-                                           BluePrintProperties) {
+open class BluePrintRestLibPropertyService(private var bluePrintPropertiesService: BluePrintPropertiesService) {
 
     private var preInterceptor: PreInterceptor? = null
     private var postInterceptor: PostInterceptor? = null
@@ -58,8 +57,8 @@ open class BluePrintRestLibPropertyService(private var bluePrintProperties:
     }
 
     fun restClientProperties(prefix: String): RestClientProperties {
-        val type = bluePrintProperties.propertyBeanType(
-            "$prefix.type", String::class.java)
+        val type = bluePrintPropertiesService.propertyBeanType(
+                "$prefix.type", String::class.java)
         return when (type) {
             RestLibConstants.TYPE_BASIC_AUTH -> {
                 basicAuthRestClientProperties(prefix)
@@ -82,7 +81,7 @@ open class BluePrintRestLibPropertyService(private var bluePrintProperties:
             }
             else -> {
                 throw BluePrintProcessorException("Rest adaptor($type) is" +
-                    " not supported")
+                        " not supported")
             }
         }
     }
@@ -112,13 +111,13 @@ open class BluePrintRestLibPropertyService(private var bluePrintProperties:
             }
             else -> {
                 throw BluePrintProcessorException(
-                    "Rest adaptor($type) is not supported")
+                        "Rest adaptor($type) is not supported")
             }
         }
     }
 
     private fun blueprintWebClientService(restClientProperties: RestClientProperties):
-        BlueprintWebClientService {
+            BlueprintWebClientService {
 
         when (restClientProperties) {
             is SSLRestClientProperties -> {
@@ -137,53 +136,53 @@ open class BluePrintRestLibPropertyService(private var bluePrintProperties:
     }
 
     private fun tokenRestClientProperties(prefix: String):
-        TokenAuthRestClientProperties {
-        return bluePrintProperties.propertyBeanType(
-            prefix, TokenAuthRestClientProperties::class.java)
+            TokenAuthRestClientProperties {
+        return bluePrintPropertiesService.propertyBeanType(
+                prefix, TokenAuthRestClientProperties::class.java)
     }
 
     private fun basicAuthRestClientProperties(prefix: String):
-        BasicAuthRestClientProperties {
-        return bluePrintProperties.propertyBeanType(
-            prefix, BasicAuthRestClientProperties::class.java)
+            BasicAuthRestClientProperties {
+        return bluePrintPropertiesService.propertyBeanType(
+                prefix, BasicAuthRestClientProperties::class.java)
     }
 
     private fun sslBasicAuthRestClientProperties(prefix: String):
-        SSLRestClientProperties {
+            SSLRestClientProperties {
 
         val sslProps: SSLBasicAuthRestClientProperties =
-            bluePrintProperties.propertyBeanType(
-                prefix, SSLBasicAuthRestClientProperties::class.java)
+                bluePrintPropertiesService.propertyBeanType(
+                        prefix, SSLBasicAuthRestClientProperties::class.java)
         val basicProps: BasicAuthRestClientProperties =
-            bluePrintProperties.propertyBeanType(
-                prefix, BasicAuthRestClientProperties::class.java)
+                bluePrintPropertiesService.propertyBeanType(
+                        prefix, BasicAuthRestClientProperties::class.java)
         sslProps.basicAuth = basicProps
         return sslProps
     }
 
     private fun sslTokenAuthRestClientProperties(prefix: String):
-        SSLRestClientProperties {
+            SSLRestClientProperties {
 
         val sslProps: SSLTokenAuthRestClientProperties =
-            bluePrintProperties.propertyBeanType(prefix,
-                SSLTokenAuthRestClientProperties::class.java)
+                bluePrintPropertiesService.propertyBeanType(prefix,
+                        SSLTokenAuthRestClientProperties::class.java)
         val basicProps: TokenAuthRestClientProperties =
-            bluePrintProperties.propertyBeanType(prefix,
-                TokenAuthRestClientProperties::class.java)
+                bluePrintPropertiesService.propertyBeanType(prefix,
+                        TokenAuthRestClientProperties::class.java)
         sslProps.tokenAuth = basicProps
         return sslProps
     }
 
     private fun sslNoAuthRestClientProperties(prefix: String):
-        SSLRestClientProperties {
-        return bluePrintProperties.propertyBeanType(
-            prefix, SSLRestClientProperties::class.java)
+            SSLRestClientProperties {
+        return bluePrintPropertiesService.propertyBeanType(
+                prefix, SSLRestClientProperties::class.java)
     }
 
     private fun policyManagerRestClientProperties(prefix: String):
-        PolicyManagerRestClientProperties {
-        return bluePrintProperties.propertyBeanType(
-            prefix, PolicyManagerRestClientProperties::class.java)
+            PolicyManagerRestClientProperties {
+        return bluePrintPropertiesService.propertyBeanType(
+                prefix, PolicyManagerRestClientProperties::class.java)
     }
 
     interface PreInterceptor {
index b617dab..1e4518a 100644 (file)
@@ -23,8 +23,8 @@ import com.fasterxml.jackson.databind.JsonNode
 import com.fasterxml.jackson.databind.ObjectMapper
 import org.junit.Test
 import org.junit.runner.RunWith
-import org.onap.ccsdk.cds.blueprintsprocessor.core.BluePrintProperties
-import org.onap.ccsdk.cds.blueprintsprocessor.core.BlueprintPropertyConfiguration
+import org.onap.ccsdk.cds.blueprintsprocessor.core.BluePrintPropertiesService
+import org.onap.ccsdk.cds.blueprintsprocessor.core.BluePrintPropertyConfiguration
 import org.onap.ccsdk.cds.blueprintsprocessor.rest.BluePrintRestLibConfiguration
 import org.onap.ccsdk.cds.blueprintsprocessor.rest.SSLBasicAuthRestClientProperties
 import org.onap.ccsdk.cds.blueprintsprocessor.rest.SSLRestClientProperties
@@ -41,7 +41,8 @@ import kotlin.test.assertFailsWith
 import kotlin.test.assertNotNull
 
 @RunWith(SpringRunner::class)
-@ContextConfiguration(classes = [BluePrintRestLibConfiguration::class, BlueprintPropertyConfiguration::class, BluePrintProperties::class])
+@ContextConfiguration(classes = [BluePrintRestLibConfiguration::class, BluePrintPropertyConfiguration::class,
+    BluePrintPropertiesService::class])
 @TestPropertySource(properties =
 ["blueprintsprocessor.restclient.sample.type=basic-auth",
     "blueprintsprocessor.restclient.sample.url=http://localhost:8080",
index 46d171b..05f3290 100644 (file)
@@ -27,8 +27,8 @@ import org.junit.After
 import org.junit.Before
 import org.junit.Test
 import org.junit.runner.RunWith
-import org.onap.ccsdk.cds.blueprintsprocessor.core.BluePrintProperties
-import org.onap.ccsdk.cds.blueprintsprocessor.core.BlueprintPropertyConfiguration
+import org.onap.ccsdk.cds.blueprintsprocessor.core.BluePrintPropertiesService
+import org.onap.ccsdk.cds.blueprintsprocessor.core.BluePrintPropertyConfiguration
 import org.onap.ccsdk.cds.blueprintsprocessor.rest.BluePrintRestLibConfiguration
 import org.springframework.beans.factory.annotation.Autowired
 import org.springframework.boot.autoconfigure.EnableAutoConfiguration
@@ -57,7 +57,7 @@ import kotlin.test.assertNotNull
 @SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.DEFINED_PORT)
 @ContextConfiguration(classes = [BluePrintRestLibConfiguration::class, SampleController::class,
     SecurityConfiguration::class,
-    BlueprintPropertyConfiguration::class, BluePrintProperties::class])
+    BluePrintPropertyConfiguration::class, BluePrintPropertiesService::class])
 @TestPropertySource(properties =
 [
     "server.port=8443",
index 829fdda..337208c 100644 (file)
@@ -17,7 +17,7 @@
 package org.onap.ccsdk.cds.blueprintsprocessor.ssh.service
 
 import com.fasterxml.jackson.databind.JsonNode
-import org.onap.ccsdk.cds.blueprintsprocessor.core.BluePrintProperties
+import org.onap.ccsdk.cds.blueprintsprocessor.core.BluePrintPropertiesService
 import org.onap.ccsdk.cds.blueprintsprocessor.ssh.BasicAuthSshClientProperties
 import org.onap.ccsdk.cds.blueprintsprocessor.ssh.SshClientProperties
 import org.onap.ccsdk.cds.blueprintsprocessor.ssh.SshLibConstants
@@ -26,7 +26,7 @@ import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonUtils
 import org.springframework.stereotype.Service
 
 @Service(SshLibConstants.SERVICE_BLUEPRINT_SSH_LIB_PROPERTY)
-open class BluePrintSshLibPropertyService(private var bluePrintProperties: BluePrintProperties) {
+open class BluePrintSshLibPropertyService(private var bluePrintProperties: BluePrintPropertiesService) {
 
     fun blueprintSshClientService(jsonNode: JsonNode): BlueprintSshClientService {
         val restClientProperties = sshClientProperties(jsonNode)
index d5c9993..f4275b8 100644 (file)
@@ -18,8 +18,8 @@ package org.onap.ccsdk.cds.blueprintsprocessor.ssh.service
 
 import org.junit.Test
 import org.junit.runner.RunWith
-import org.onap.ccsdk.cds.blueprintsprocessor.core.BluePrintProperties
-import org.onap.ccsdk.cds.blueprintsprocessor.core.BlueprintPropertyConfiguration
+import org.onap.ccsdk.cds.blueprintsprocessor.core.BluePrintPropertiesService
+import org.onap.ccsdk.cds.blueprintsprocessor.core.BluePrintPropertyConfiguration
 import org.onap.ccsdk.cds.blueprintsprocessor.ssh.BasicAuthSshClientProperties
 import org.onap.ccsdk.cds.blueprintsprocessor.ssh.BluePrintSshLibConfiguration
 import org.springframework.beans.factory.annotation.Autowired
@@ -32,7 +32,7 @@ import kotlin.test.assertNotNull
 
 @RunWith(SpringRunner::class)
 @ContextConfiguration(classes = [BluePrintSshLibConfiguration::class,
-    BlueprintPropertyConfiguration::class, BluePrintProperties::class])
+    BluePrintPropertyConfiguration::class, BluePrintPropertiesService::class])
 @TestPropertySource(properties =
 ["blueprintsprocessor.sshclient.sample.type=basic-auth",
     "blueprintsprocessor.sshclient.sample.host=127.0.0.1",
index d612192..430b988 100644 (file)
@@ -26,8 +26,8 @@ import org.apache.sshd.server.keyprovider.SimpleGeneratorHostKeyProvider
 import org.apache.sshd.server.session.ServerSession
 import org.apache.sshd.server.shell.ProcessShellCommandFactory
 import org.junit.runner.RunWith
-import org.onap.ccsdk.cds.blueprintsprocessor.core.BluePrintProperties
-import org.onap.ccsdk.cds.blueprintsprocessor.core.BlueprintPropertyConfiguration
+import org.onap.ccsdk.cds.blueprintsprocessor.core.BluePrintPropertiesService
+import org.onap.ccsdk.cds.blueprintsprocessor.core.BluePrintPropertyConfiguration
 import org.onap.ccsdk.cds.blueprintsprocessor.ssh.BluePrintSshLibConfiguration
 import org.springframework.beans.factory.annotation.Autowired
 import org.springframework.test.context.ContextConfiguration
@@ -41,7 +41,7 @@ import kotlin.test.assertNotNull
 
 @RunWith(SpringRunner::class)
 @ContextConfiguration(classes = [BluePrintSshLibConfiguration::class,
-    BlueprintPropertyConfiguration::class, BluePrintProperties::class])
+    BluePrintPropertyConfiguration::class, BluePrintPropertiesService::class])
 @TestPropertySource(properties =
 ["blueprintsprocessor.sshclient.sample.type=basic-auth",
     "blueprintsprocessor.sshclient.sample.host=localhost",
index 0d834d2..149acb0 100644 (file)
@@ -26,8 +26,8 @@ import org.junit.FixMethodOrder
 import org.junit.Test
 import org.junit.runner.RunWith
 import org.junit.runners.MethodSorters
-import org.onap.ccsdk.cds.blueprintsprocessor.core.BluePrintProperties
-import org.onap.ccsdk.cds.blueprintsprocessor.core.BlueprintPropertyConfiguration
+import org.onap.ccsdk.cds.blueprintsprocessor.core.BluePrintPropertiesService
+import org.onap.ccsdk.cds.blueprintsprocessor.core.BluePrintPropertyConfiguration
 import org.onap.ccsdk.cds.blueprintsprocessor.db.BluePrintDBLibConfiguration
 import org.onap.ccsdk.cds.blueprintsprocessor.db.primary.domain.BlueprintModelSearch
 import org.onap.ccsdk.cds.controllerblueprints.core.*
@@ -61,7 +61,7 @@ import kotlin.test.assertTrue
 @RunWith(SpringRunner::class)
 @SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
 @ContextConfiguration(classes = [DesignerApiTestConfiguration::class,
-    BlueprintPropertyConfiguration::class, BluePrintProperties::class, BluePrintDBLibConfiguration::class])
+    BluePrintPropertyConfiguration::class, BluePrintPropertiesService::class, BluePrintDBLibConfiguration::class])
 @TestPropertySource(locations = ["classpath:application-test.properties"])
 @FixMethodOrder(MethodSorters.NAME_ASCENDING)
 class BlueprintModelControllerTest {
index 6fe7097..8871676 100644 (file)
@@ -21,8 +21,8 @@ import org.junit.FixMethodOrder
 import org.junit.Test
 import org.junit.runner.RunWith
 import org.junit.runners.MethodSorters
-import org.onap.ccsdk.cds.blueprintsprocessor.core.BluePrintProperties
-import org.onap.ccsdk.cds.blueprintsprocessor.core.BlueprintPropertyConfiguration
+import org.onap.ccsdk.cds.blueprintsprocessor.core.BluePrintPropertiesService
+import org.onap.ccsdk.cds.blueprintsprocessor.core.BluePrintPropertyConfiguration
 import org.onap.ccsdk.cds.blueprintsprocessor.db.BluePrintDBLibConfiguration
 import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
 import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonUtils
@@ -36,7 +36,7 @@ import org.springframework.test.context.junit4.SpringRunner
 
 @RunWith(SpringRunner::class)
 @ContextConfiguration(classes = [DesignerApiTestConfiguration::class,
-    BlueprintPropertyConfiguration::class, BluePrintProperties::class, BluePrintDBLibConfiguration::class])
+    BluePrintPropertyConfiguration::class, BluePrintPropertiesService::class, BluePrintDBLibConfiguration::class])
 @TestPropertySource(locations = ["classpath:application-test.properties"])
 @FixMethodOrder(MethodSorters.NAME_ASCENDING)
 class ModelTypeControllerTest {
index 8936223..b13b1ac 100644 (file)
@@ -20,8 +20,8 @@ import org.junit.FixMethodOrder
 import org.junit.Test
 import org.junit.runner.RunWith
 import org.junit.runners.MethodSorters
-import org.onap.ccsdk.cds.blueprintsprocessor.core.BluePrintProperties
-import org.onap.ccsdk.cds.blueprintsprocessor.core.BlueprintPropertyConfiguration
+import org.onap.ccsdk.cds.blueprintsprocessor.core.BluePrintPropertiesService
+import org.onap.ccsdk.cds.blueprintsprocessor.core.BluePrintPropertyConfiguration
 import org.onap.ccsdk.cds.blueprintsprocessor.db.BluePrintDBLibConfiguration
 import org.springframework.beans.factory.annotation.Autowired
 import org.springframework.boot.test.context.SpringBootTest
@@ -33,7 +33,7 @@ import kotlin.test.assertNotNull
 @RunWith(SpringRunner::class)
 @SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
 @ContextConfiguration(classes = [DesignerApiTestConfiguration::class,
-    BlueprintPropertyConfiguration::class, BluePrintProperties::class, BluePrintDBLibConfiguration::class])
+    BluePrintPropertyConfiguration::class, BluePrintPropertiesService::class, BluePrintDBLibConfiguration::class])
 @TestPropertySource(locations = ["classpath:application-test.properties"])
 @FixMethodOrder(MethodSorters.NAME_ASCENDING)
 class ResourceDictionaryControllerTest {
index 974a3b9..a5a0511 100644 (file)
@@ -21,8 +21,8 @@ import kotlinx.coroutines.runBlocking
 import org.junit.Assert
 import org.junit.Test
 import org.junit.runner.RunWith
-import org.onap.ccsdk.cds.blueprintsprocessor.core.BluePrintProperties
-import org.onap.ccsdk.cds.blueprintsprocessor.core.BlueprintPropertyConfiguration
+import org.onap.ccsdk.cds.blueprintsprocessor.core.BluePrintPropertiesService
+import org.onap.ccsdk.cds.blueprintsprocessor.core.BluePrintPropertyConfiguration
 import org.onap.ccsdk.cds.blueprintsprocessor.db.BluePrintDBLibConfiguration
 import org.onap.ccsdk.cds.blueprintsprocessor.designer.api.DesignerApiTestConfiguration
 import org.onap.ccsdk.cds.blueprintsprocessor.designer.api.load.ModelTypeLoadService
@@ -38,7 +38,7 @@ import org.springframework.test.context.junit4.SpringRunner
 
 @RunWith(SpringRunner::class)
 @ContextConfiguration(classes = [DesignerApiTestConfiguration::class,
-    BlueprintPropertyConfiguration::class, BluePrintProperties::class, BluePrintDBLibConfiguration::class])
+    BluePrintPropertyConfiguration::class, BluePrintPropertiesService::class, BluePrintDBLibConfiguration::class])
 @TestPropertySource(locations = ["classpath:application-test.properties"])
 class BluePrintEnhancerServiceImplTest {
 
index 00e78d2..7ea845d 100644 (file)
@@ -22,8 +22,8 @@ import org.junit.FixMethodOrder
 import org.junit.Test
 import org.junit.runner.RunWith
 import org.junit.runners.MethodSorters
-import org.onap.ccsdk.cds.blueprintsprocessor.core.BluePrintProperties
-import org.onap.ccsdk.cds.blueprintsprocessor.core.BlueprintPropertyConfiguration
+import org.onap.ccsdk.cds.blueprintsprocessor.core.BluePrintPropertiesService
+import org.onap.ccsdk.cds.blueprintsprocessor.core.BluePrintPropertyConfiguration
 import org.onap.ccsdk.cds.blueprintsprocessor.db.BluePrintDBLibConfiguration
 import org.onap.ccsdk.cds.blueprintsprocessor.designer.api.DesignerApiTestConfiguration
 import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
@@ -39,7 +39,7 @@ import org.springframework.test.context.junit4.SpringRunner
 
 @RunWith(SpringRunner::class)
 @ContextConfiguration(classes = [DesignerApiTestConfiguration::class,
-    BlueprintPropertyConfiguration::class, BluePrintProperties::class, BluePrintDBLibConfiguration::class])
+    BluePrintPropertyConfiguration::class, BluePrintPropertiesService::class, BluePrintDBLibConfiguration::class])
 @TestPropertySource(locations = ["classpath:application-test.properties"])
 @FixMethodOrder(MethodSorters.NAME_ASCENDING)
 class ModelTypeServiceTest {
index 55bc1e4..3dfed1c 100644 (file)
@@ -21,8 +21,8 @@ import org.junit.FixMethodOrder
 import org.junit.Test
 import org.junit.runner.RunWith
 import org.junit.runners.MethodSorters
-import org.onap.ccsdk.cds.blueprintsprocessor.core.BluePrintProperties
-import org.onap.ccsdk.cds.blueprintsprocessor.core.BlueprintPropertyConfiguration
+import org.onap.ccsdk.cds.blueprintsprocessor.core.BluePrintPropertiesService
+import org.onap.ccsdk.cds.blueprintsprocessor.core.BluePrintPropertyConfiguration
 import org.onap.ccsdk.cds.blueprintsprocessor.db.BluePrintDBLibConfiguration
 import org.onap.ccsdk.cds.blueprintsprocessor.designer.api.DesignerApiTestConfiguration
 import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
@@ -45,7 +45,7 @@ import java.util.*
 
 @RunWith(SpringRunner::class)
 @ContextConfiguration(classes = [DesignerApiTestConfiguration::class,
-    BlueprintPropertyConfiguration::class, BluePrintProperties::class, BluePrintDBLibConfiguration::class])
+    BluePrintPropertyConfiguration::class, BluePrintPropertiesService::class, BluePrintDBLibConfiguration::class])
 @TestPropertySource(locations = ["classpath:application-test.properties"])
 @FixMethodOrder(MethodSorters.NAME_ASCENDING)
 class ModelTypeReactRepositoryTest {
index 70e1b8e..6351f6a 100644 (file)
@@ -21,8 +21,8 @@ import org.junit.FixMethodOrder
 import org.junit.Test
 import org.junit.runner.RunWith
 import org.junit.runners.MethodSorters
-import org.onap.ccsdk.cds.blueprintsprocessor.core.BluePrintProperties
-import org.onap.ccsdk.cds.blueprintsprocessor.core.BlueprintPropertyConfiguration
+import org.onap.ccsdk.cds.blueprintsprocessor.core.BluePrintPropertiesService
+import org.onap.ccsdk.cds.blueprintsprocessor.core.BluePrintPropertyConfiguration
 import org.onap.ccsdk.cds.blueprintsprocessor.db.BluePrintDBLibConfiguration
 import org.onap.ccsdk.cds.blueprintsprocessor.designer.api.DesignerApiTestConfiguration
 import org.onap.ccsdk.cds.blueprintsprocessor.designer.api.domain.ResourceDictionary
@@ -37,7 +37,7 @@ import org.springframework.transaction.annotation.Transactional
 
 @RunWith(SpringRunner::class)
 @ContextConfiguration(classes = [DesignerApiTestConfiguration::class,
-    BlueprintPropertyConfiguration::class, BluePrintProperties::class, BluePrintDBLibConfiguration::class])
+    BluePrintPropertyConfiguration::class, BluePrintPropertiesService::class, BluePrintDBLibConfiguration::class])
 @TestPropertySource(locations = ["classpath:application-test.properties"])
 @FixMethodOrder(MethodSorters.NAME_ASCENDING)
 class ResourceDictionaryReactRepositoryTest {
index 7d43f53..01199c1 100644 (file)
@@ -22,8 +22,8 @@ import kotlinx.coroutines.delay
 import kotlinx.coroutines.launch
 import kotlinx.coroutines.runBlocking
 import org.junit.runner.RunWith
-import org.onap.ccsdk.cds.blueprintsprocessor.core.BluePrintProperties
-import org.onap.ccsdk.cds.blueprintsprocessor.core.BlueprintPropertyConfiguration
+import org.onap.ccsdk.cds.blueprintsprocessor.core.BluePrintPropertiesService
+import org.onap.ccsdk.cds.blueprintsprocessor.core.BluePrintPropertyConfiguration
 import org.onap.ccsdk.cds.blueprintsprocessor.message.BluePrintMessageLibConfiguration
 import org.onap.ccsdk.cds.blueprintsprocessor.message.service.BluePrintMessageLibPropertyService
 import org.springframework.beans.factory.annotation.Autowired
@@ -35,7 +35,7 @@ import kotlin.test.assertNotNull
 
 @RunWith(SpringRunner::class)
 @ContextConfiguration(classes = [BluePrintMessageLibConfiguration::class,
-    BlueprintPropertyConfiguration::class, BluePrintProperties::class])
+    BluePrintPropertyConfiguration::class, BluePrintPropertiesService::class])
 @TestPropertySource(locations = ["classpath:application-test.properties"])
 class BluePrintProcessingKafkaConsumerTest {