From d425c6319a995402163c8868e9fe40f3d88f02ea Mon Sep 17 00:00:00 2001 From: Brinda Santh Date: Sat, 9 Nov 2019 20:35:47 -0500 Subject: Convert component functions IT to UT. Issue-ID: CCSDK-1735 Convert Netconf and Restconf Executor IT to UT. Remove duplicate BluePrintProperties. Signed-off-by: Brinda Santh Change-Id: I2eafdbabb17a4df72541ab93c46e7fc9eb0fe8d7 --- .../core/BluePrintCoreConfiguration.kt | 6 ++--- .../core/BluePrintProperties.kt | 29 ---------------------- 2 files changed, 3 insertions(+), 32 deletions(-) delete mode 100644 ms/blueprintsprocessor/modules/commons/processor-core/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/core/BluePrintProperties.kt (limited to 'ms/blueprintsprocessor/modules/commons/processor-core') diff --git a/ms/blueprintsprocessor/modules/commons/processor-core/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/core/BluePrintCoreConfiguration.kt b/ms/blueprintsprocessor/modules/commons/processor-core/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/core/BluePrintCoreConfiguration.kt index 9980b9efb..62dc933f1 100644 --- a/ms/blueprintsprocessor/modules/commons/processor-core/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/core/BluePrintCoreConfiguration.kt +++ b/ms/blueprintsprocessor/modules/commons/processor-core/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/core/BluePrintCoreConfiguration.kt @@ -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 propertyBeanType(prefix: String, type: Class): 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 index e2a4808a6..000000000 --- a/ms/blueprintsprocessor/modules/commons/processor-core/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/core/BluePrintProperties.kt +++ /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 propertyBeanType(prefix: String, type: Class): T { - return bluePrintPropertyBinder.bind(prefix, Bindable.of(type)).get() - } -} \ No newline at end of file -- cgit 1.2.3-korg