summaryrefslogtreecommitdiffstats
path: root/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/test/kotlin
diff options
context:
space:
mode:
authorSingal, Kapil (ks220y) <ks220y@att.com>2020-09-22 12:16:46 -0400
committerSingal, Kapil (ks220y) <ks220y@att.com>2020-09-22 13:49:05 -0400
commit1072867dfac0df993cbd3e44bcc11a5cac7465fd (patch)
tree4a821659cf3b50cf946cbb535d528be8508e9fff /ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/test/kotlin
parentd97021cd756d63402545fdc2e14ac7611c3da118 (diff)
Enabling Code Formatter
Code Formatter was turned off due to java 11 migation Issue-ID: CCSDK-2852 Signed-off-by: Singal, Kapil (ks220y) <ks220y@att.com> Change-Id: I3d02ed3cc7a93d7551fe25356512cfe8db1517d8
Diffstat (limited to 'ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/test/kotlin')
-rw-r--r--ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/test/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/FileExtensionFunctionTest.kt1
-rw-r--r--ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/test/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/MDCContextTest.kt2
-rw-r--r--ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/test/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/TestConstants.kt1
-rw-r--r--ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/test/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/dsl/BluePrintDSLTest.kt7
-rw-r--r--ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/test/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/scripts/BluePrintScriptsServiceImplTest.kt1
-rw-r--r--ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/test/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/service/BluePrintRuntimeServiceTest.kt20
-rw-r--r--ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/test/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/service/BluePrintWorkflowServiceTest.kt7
-rw-r--r--ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/test/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/utils/TopologicalSortingUtilsTest.kt1
8 files changed, 27 insertions, 13 deletions
diff --git a/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/test/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/FileExtensionFunctionTest.kt b/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/test/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/FileExtensionFunctionTest.kt
index 6383fb4a8..8aa295071 100644
--- a/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/test/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/FileExtensionFunctionTest.kt
+++ b/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/test/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/FileExtensionFunctionTest.kt
@@ -20,6 +20,7 @@ import org.junit.Test
import kotlin.test.assertTrue
class FileExtensionFunctionTest {
+
val blueprintBasePath = TestConstants.PATH_TEST_BLUEPRINTS_BASECONFIG
@Test
diff --git a/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/test/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/MDCContextTest.kt b/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/test/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/MDCContextTest.kt
index 498a85239..643549be0 100644
--- a/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/test/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/MDCContextTest.kt
+++ b/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/test/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/MDCContextTest.kt
@@ -26,7 +26,9 @@ import kotlin.test.Test
import kotlin.test.assertEquals
class MDCContextTest {
+
val log = logger(MDCContextTest::class)
+
@Before
fun setup() {
MDC.clear()
diff --git a/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/test/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/TestConstants.kt b/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/test/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/TestConstants.kt
index 4182a3fcd..d5c19c184 100644
--- a/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/test/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/TestConstants.kt
+++ b/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/test/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/TestConstants.kt
@@ -17,6 +17,7 @@
package org.onap.ccsdk.cds.controllerblueprints.core
object TestConstants {
+
const val PATH_TEST_BLUEPRINTS = "./../../../../../components/model-catalog/blueprint-model/test-blueprint"
const val PATH_TEST_BLUEPRINTS_BASECONFIG = "$PATH_TEST_BLUEPRINTS/baseconfiguration"
diff --git a/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/test/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/dsl/BluePrintDSLTest.kt b/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/test/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/dsl/BluePrintDSLTest.kt
index 824d7ddec..9aea47a9e 100644
--- a/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/test/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/dsl/BluePrintDSLTest.kt
+++ b/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/test/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/dsl/BluePrintDSLTest.kt
@@ -277,8 +277,8 @@ fun BluePrintTypes.nodeTemplateComponentTestExecutor(
block: TestNodeTemplateOperationImplBuilder.() -> Unit
):
NodeTemplate {
- return TestNodeTemplateOperationImplBuilder(id, description).apply(block).build()
-}
+ return TestNodeTemplateOperationImplBuilder(id, description).apply(block).build()
+ }
class TestNodeTemplateOperationImplBuilder(id: String, description: String) :
AbstractNodeTemplateOperationImplBuilder<TestProperty, TestInput, TestOutput>(
@@ -288,6 +288,7 @@ class TestNodeTemplateOperationImplBuilder(id: String, description: String) :
)
class TestProperty : PropertiesAssignmentBuilder() {
+
fun prop1(prop1: String) {
property("prop1", prop1.asJsonPrimitive())
}
@@ -298,12 +299,14 @@ class TestProperty : PropertiesAssignmentBuilder() {
}
class TestInput : PropertiesAssignmentBuilder() {
+
fun request(request: String) {
property("request", request.asJsonPrimitive())
}
}
class TestOutput : PropertiesAssignmentBuilder() {
+
fun response(response: String) {
response(response.asJsonPrimitive())
}
diff --git a/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/test/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/scripts/BluePrintScriptsServiceImplTest.kt b/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/test/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/scripts/BluePrintScriptsServiceImplTest.kt
index 60bef8a8d..0803d921b 100644
--- a/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/test/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/scripts/BluePrintScriptsServiceImplTest.kt
+++ b/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/test/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/scripts/BluePrintScriptsServiceImplTest.kt
@@ -55,6 +55,7 @@ class BluePrintScriptsServiceImplTest {
val bluePrintScriptsService = BluePrintScriptsServiceImpl()
val basePath = normalizedPathName("src/test/resources/compile")
+
/** Load the Definitions */
val bluePrintDefinitions = bluePrintScriptsService
.scriptInstance<BluePrintDefinitions>(
diff --git a/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/test/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/service/BluePrintRuntimeServiceTest.kt b/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/test/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/service/BluePrintRuntimeServiceTest.kt
index 79979b949..4fcbb2d98 100644
--- a/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/test/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/service/BluePrintRuntimeServiceTest.kt
+++ b/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/test/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/service/BluePrintRuntimeServiceTest.kt
@@ -240,8 +240,9 @@ class BluePrintRuntimeServiceTest {
val bluePrintRuntimeService = getBluePrintRuntimeService()
bluePrintRuntimeService.setNodeTemplateAttributeValue(
- "resource-assignment", "assignment-map",
- JacksonUtils.jsonNode("""
+ "resource-assignment", "assignment-map",
+ JacksonUtils.jsonNode(
+ """
{
"a-prefix":{
"an-object":{
@@ -249,13 +250,15 @@ class BluePrintRuntimeServiceTest {
}
}
}
- """.trimIndent())
+ """.trimIndent()
+ )
)
val propertyDefinitions = mutableMapOf<String, PropertyDefinition>(
- "resolution" to PropertyDefinition().apply {
- this.type = "json"
- this.value = JacksonUtils.jsonNode("""
+ "resolution" to PropertyDefinition().apply {
+ this.type = "json"
+ this.value = JacksonUtils.jsonNode(
+ """
{
"get_attribute":[
"resource-assignment",
@@ -266,8 +269,9 @@ class BluePrintRuntimeServiceTest {
"a-key"
]
}
- """.trimIndent())
- }
+ """.trimIndent()
+ )
+ }
)
val result = bluePrintRuntimeService.resolvePropertyDefinitions("workflow", "WORKFLOW", propertyDefinitions)
diff --git a/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/test/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/service/BluePrintWorkflowServiceTest.kt b/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/test/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/service/BluePrintWorkflowServiceTest.kt
index 72fa3e1eb..eb6246989 100644
--- a/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/test/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/service/BluePrintWorkflowServiceTest.kt
+++ b/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/test/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/service/BluePrintWorkflowServiceTest.kt
@@ -34,6 +34,7 @@ import org.onap.ccsdk.cds.controllerblueprints.core.toGraph
import kotlin.test.assertNotNull
class BluePrintWorkflowServiceTest {
+
@Test
fun testSimpleFlow() {
runBlocking {
@@ -210,9 +211,9 @@ class TestBluePrintWorkFlowService :
}
override suspend fun prepareNodeExecutionMessage(node: Graph.Node):
- NodeExecuteMessage<String, String> {
- return NodeExecuteMessage(node, "$node Input", "")
- }
+ NodeExecuteMessage<String, String> {
+ return NodeExecuteMessage(node, "$node Input", "")
+ }
override suspend fun executeNode(
node: Graph.Node,
diff --git a/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/test/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/utils/TopologicalSortingUtilsTest.kt b/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/test/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/utils/TopologicalSortingUtilsTest.kt
index fc11947de..4334bce2e 100644
--- a/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/test/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/utils/TopologicalSortingUtilsTest.kt
+++ b/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/test/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/utils/TopologicalSortingUtilsTest.kt
@@ -22,6 +22,7 @@ import org.slf4j.LoggerFactory
class TopologicalSortingUtilsTest {
private val log = LoggerFactory.getLogger(TopologicalSortingUtilsTest::class.java)
+
@Test
fun testSorting() {
val graph: TopologicalSortingUtils<String> = TopologicalSortingUtils()