From 86dc3b395c89773968d2737d52318a2f2090d8ce Mon Sep 17 00:00:00 2001 From: "Muthuramalingam, Brinda Santh" Date: Fri, 22 Feb 2019 10:14:24 -0500 Subject: Add extension validation framework Change-Id: I5674e8da70cc4d20899f6fe2163a595b28861036 Issue-ID: CCSDK-1103 Signed-off-by: Muthuramalingam, Brinda Santh --- .../enhancer/BluePrintEnhancerServiceImplTest.kt | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'ms/controllerblueprints/modules/service/src') diff --git a/ms/controllerblueprints/modules/service/src/test/kotlin/org/onap/ccsdk/apps/controllerblueprints/service/enhancer/BluePrintEnhancerServiceImplTest.kt b/ms/controllerblueprints/modules/service/src/test/kotlin/org/onap/ccsdk/apps/controllerblueprints/service/enhancer/BluePrintEnhancerServiceImplTest.kt index 8d32413f2..ccacee02b 100644 --- a/ms/controllerblueprints/modules/service/src/test/kotlin/org/onap/ccsdk/apps/controllerblueprints/service/enhancer/BluePrintEnhancerServiceImplTest.kt +++ b/ms/controllerblueprints/modules/service/src/test/kotlin/org/onap/ccsdk/apps/controllerblueprints/service/enhancer/BluePrintEnhancerServiceImplTest.kt @@ -1,5 +1,6 @@ /* * Copyright © 2017-2018 AT&T Intellectual Property. + * Modifications Copyright © 2018 IBM. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -38,22 +39,22 @@ import java.nio.file.Paths class BluePrintEnhancerServiceImplTest { @Autowired - private val modelTypeLoadService: ModelTypeLoadService? = null + lateinit var modelTypeLoadService: ModelTypeLoadService @Autowired - private val resourceDictionaryLoadService: ResourceDictionaryLoadService? = null + lateinit var resourceDictionaryLoadService: ResourceDictionaryLoadService @Autowired - private val bluePrintEnhancerService: BluePrintEnhancerService? = null + lateinit var bluePrintEnhancerService: BluePrintEnhancerService @Autowired - private val bluePrintValidatorService: BluePrintValidatorService? = null + lateinit var bluePrintValidatorService: BluePrintValidatorService @Before fun init() { runBlocking { - modelTypeLoadService!!.loadPathModelType("./../../../../components/model-catalog/definition-type/starter-type") - resourceDictionaryLoadService!!.loadPathResourceDictionary("./../../../../components/model-catalog/resource-dictionary/starter-dictionary") + modelTypeLoadService.loadPathModelType("./../../../../components/model-catalog/definition-type/starter-type") + resourceDictionaryLoadService.loadPathResourceDictionary("./../../../../components/model-catalog/resource-dictionary/starter-dictionary") } } @@ -65,11 +66,11 @@ class BluePrintEnhancerServiceImplTest { val targetPath = Paths.get("target", "bp-enhance").toUri().path - val bluePrintContext = bluePrintEnhancerService!!.enhance(basePath, targetPath) + val bluePrintContext = bluePrintEnhancerService.enhance(basePath, targetPath) Assert.assertNotNull("failed to get blueprintContext ", bluePrintContext) // Validate the Generated BluePrints - val valid = bluePrintValidatorService!!.validateBluePrints(targetPath) + val valid = bluePrintValidatorService.validateBluePrints(targetPath) Assert.assertTrue("blueprint validation failed ", valid) } } \ No newline at end of file -- cgit 1.2.3-korg