summaryrefslogtreecommitdiffstats
path: root/ms/blueprintsprocessor/modules/commons/message-lib/src/main/kotlin
diff options
context:
space:
mode:
authorBrinda Santh <bs2796@att.com>2019-11-09 20:35:47 -0500
committerBrinda Santh <bs2796@att.com>2019-11-09 20:51:26 -0500
commitd425c6319a995402163c8868e9fe40f3d88f02ea (patch)
tree35136b666645b507d8f588dd7122ed19f57d7247 /ms/blueprintsprocessor/modules/commons/message-lib/src/main/kotlin
parent54eb2f2680d4f2447a4d48b612b2b83e37d90754 (diff)
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 <bs2796@att.com> Change-Id: I2eafdbabb17a4df72541ab93c46e7fc9eb0fe8d7
Diffstat (limited to 'ms/blueprintsprocessor/modules/commons/message-lib/src/main/kotlin')
-rw-r--r--ms/blueprintsprocessor/modules/commons/message-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/message/service/BluePrintMessageLibPropertyService.kt12
1 files changed, 6 insertions, 6 deletions
diff --git a/ms/blueprintsprocessor/modules/commons/message-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/message/service/BluePrintMessageLibPropertyService.kt b/ms/blueprintsprocessor/modules/commons/message-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/message/service/BluePrintMessageLibPropertyService.kt
index 7c56ea432..52413cc0e 100644
--- a/ms/blueprintsprocessor/modules/commons/message-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/message/service/BluePrintMessageLibPropertyService.kt
+++ b/ms/blueprintsprocessor/modules/commons/message-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/message/service/BluePrintMessageLibPropertyService.kt
@@ -17,14 +17,14 @@
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)
}