diff options
author | 2019-12-31 10:53:59 -0500 | |
---|---|---|
committer | 2019-12-31 10:53:59 -0500 | |
commit | ba75d2fad2b0111a510f4ee4cc87e658fb32ac4b (patch) | |
tree | 92c50b5bea79bb6c424aab6b0ac2e805a9e36e07 /ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/test/kotlin | |
parent | 1fdaf4953daf15970afe6ee10491dfa2d0a76753 (diff) |
Flexible DSL Types and Templates definition.
Easy search definitions Types and Templates inside ServiceTemplate DSL builder.
Unit test modifications to support this change.
Issue-ID: CCSDK-1054
Signed-off-by: Brinda Santh <bs2796@att.com>
Change-Id: Ie944ff5f75f80c852555306e1a4e0fa7f5b803d7
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/dsl/BluePrintDSLTest.kt | 27 |
1 files changed, 24 insertions, 3 deletions
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 c2d764bd6..bf16ea93a 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 @@ -100,6 +100,21 @@ class BluePrintDSLTest { import("Definition/data_types.json") dsl("rest-endpoint", """{ "selector" : "odl-selector"}""") dsl("db-endpoint", """{ "selector" : "db-selector"}""") + + nodeTypeComponent() + nodeTypeResourceSource() + nodeTypeVnf() + + artifactTypeTemplateVelocity() + artifactTypeTempleJinja() + artifactTypeScriptKotlin() + artifactTypeMappingResource() + artifactTypeComponentJar() + + relationshipTypeConnectsTo() + relationshipTypeDependsOn() + relationshipTypeHostedOn() + topologyTemplate { nodeTemplateOperation( nodeTemplateName = "activate", type = "sample-node-type", interfaceName = "RestconfExecutor", @@ -162,10 +177,16 @@ class BluePrintDSLTest { } } + // println(serviceTemplate.asJsonString(true)) + assertNotNull(serviceTemplate.artifactTypes, "failed to get artifactTypes") + assertNotNull(serviceTemplate.nodeTypes, "failed to get nodeTypes") + assertNotNull(serviceTemplate.relationshipTypes, "failed to get relationshipTypes") assertNotNull(serviceTemplate.topologyTemplate, "failed to get topology template") assertNotNull(serviceTemplate.topologyTemplate?.nodeTemplates, "failed to get nodeTypes") - assertNotNull(serviceTemplate.topologyTemplate?.nodeTemplates!!["activate"], "failed to get nodeTypes(activate)") - // println(serviceTemplate.asJsonString(true)) + assertNotNull( + serviceTemplate.topologyTemplate?.nodeTemplates!!["activate"], + "failed to get nodeTypes(activate)" + ) } @Test @@ -254,7 +275,7 @@ fun BluePrintTypes.nodeTemplateComponentTestExecutor( description: String, block: TestNodeTemplateOperationImplBuilder.() -> Unit ): - NodeTemplate { + NodeTemplate { return TestNodeTemplateOperationImplBuilder(id, description).apply(block).build() } |