Component Jython Executor Test Junit Test Case enhancement
Change-Id: I5cb845d4c56d2b9e15a7eedf5095bb754c5b63ac
Issue-ID: CCSDK-993
Signed-off-by: Singal, Kapil (ks220y) <ks220y@att.com>
import org.onap.ccsdk.apps.controllerblueprints.core.asJsonNode
import org.onap.ccsdk.apps.controllerblueprints.core.putJsonElement
import org.onap.ccsdk.apps.controllerblueprints.core.utils.BluePrintMetadataUtils
import org.onap.ccsdk.apps.controllerblueprints.core.asJsonNode
import org.onap.ccsdk.apps.controllerblueprints.core.putJsonElement
import org.onap.ccsdk.apps.controllerblueprints.core.utils.BluePrintMetadataUtils
+import org.onap.ccsdk.apps.controllerblueprints.core.utils.JacksonUtils
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.test.context.ContextConfiguration
import org.springframework.test.context.TestPropertySource
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.test.context.ContextConfiguration
import org.springframework.test.context.TestPropertySource
@Test
fun testPythonComponentInjection() {
@Test
fun testPythonComponentInjection() {
val executionServiceInput = ExecutionServiceInput()
executionServiceInput.payload = JsonNodeFactory.instance.objectNode()
val executionServiceInput = ExecutionServiceInput()
executionServiceInput.payload = JsonNodeFactory.instance.objectNode()
actionIdentifiers.actionName = "activate"
executionServiceInput.actionIdentifiers = actionIdentifiers
actionIdentifiers.actionName = "activate"
executionServiceInput.actionIdentifiers = actionIdentifiers
- val bluePrintRuntimeService = BluePrintMetadataUtils.getBluePrintRuntime(commonHeader.requestId,
+ val executionServiceInput = JacksonUtils.readValueFromClassPathFile("payload/requests/sample-activate-request.json",
+ ExecutionServiceInput::class.java)!!
+
+ val bluePrintRuntimeService = BluePrintMetadataUtils.getBluePrintRuntime("1234",
"./../../../../components/model-catalog/blueprint-model/starter-blueprint/baseconfiguration")
val stepMetaData: MutableMap<String, JsonNode> = hashMapOf()
"./../../../../components/model-catalog/blueprint-model/starter-blueprint/baseconfiguration")
val stepMetaData: MutableMap<String, JsonNode> = hashMapOf()