import kotlinx.coroutines.runBlocking
import org.junit.Test
import org.onap.ccsdk.cds.controllerblueprints.core.TestConstants
-import org.onap.ccsdk.cds.controllerblueprints.core.utils.BluePrintMetadataUtils
+import org.onap.ccsdk.cds.controllerblueprints.core.utils.BlueprintMetadataUtils
import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonUtils
import kotlin.test.BeforeTest
import kotlin.test.assertEquals
import kotlin.test.assertNotNull
-class BluePrintTemplateServiceTest {
+class BlueprintTemplateServiceTest {
- lateinit var blueprintRuntime: BluePrintRuntimeService<*>
+ lateinit var blueprintRuntime: BlueprintRuntimeService<*>
@BeforeTest
fun setup() {
val blueprintBasePath = TestConstants.PATH_TEST_BLUEPRINTS_BASECONFIG
- blueprintRuntime = BluePrintMetadataUtils.bluePrintRuntime("1234", blueprintBasePath)
+ blueprintRuntime = BlueprintMetadataUtils.bluePrintRuntime("1234", blueprintBasePath)
}
@Test
val template = JacksonUtils.getClassPathFileContent("templates/base-config-velocity-template.vtl")
val json = JacksonUtils.getClassPathFileContent("templates/base-config-data-velocity.json")
- val content = BluePrintVelocityTemplateService.generateContent(template, json)
+ val content = BlueprintVelocityTemplateService.generateContent(template, json)
assertNotNull(content, "failed to generate content for velocity template")
}
}
hashMapOf("name" to "Element2", "location" to "Region1")
)
- val content = BluePrintJinjaTemplateService.generateContent(template, json, false, element)
+ val content = BlueprintJinjaTemplateService.generateContent(template, json, false, element)
assertNotNull(content, "failed to generate content for velocity template")
}
}
JacksonUtils.getClassPathFileContent("templates/default-variable-value-velocity-template.vtl")
val json = JacksonUtils.getClassPathFileContent("templates/default-variable-value-data.json")
- val content = BluePrintVelocityTemplateService.generateContent(template, json)
+ val content = BlueprintVelocityTemplateService.generateContent(template, json)
// first line represents a variable whose value was successfully retrieved, second line contains a variable
// whose value could not be evaluated
val expected = "sample-hostname\n\${node0_backup_router_address}"