From 64a168d7d9a86e5cbdf4e01718066e93ca0592da Mon Sep 17 00:00:00 2001
From: Alexis de Talhouët <adetalhouet89@gmail.com>
Date: Tue, 12 Mar 2019 16:49:54 -0400
Subject: Add intial test CBA
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Change-Id: If7c18e8ad472cebc3e36858fcb0cdf4c7ef6d52d
Issue-ID: CCSDK-1149
Signed-off-by: Alexis de Talhouët <adetalhouet89@gmail.com>
---
 .../enhancer/BluePrintEnhancerServiceImplTest.kt        | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

(limited to 'ms')

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 3bfb3d2b..919d202f 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
@@ -55,6 +55,7 @@ class BluePrintEnhancerServiceImplTest {
         runBlocking {
             modelTypeLoadService.loadPathModelType("./../../../../components/model-catalog/definition-type/starter-type")
             resourceDictionaryLoadService.loadPathResourceDictionary("./../../../../components/model-catalog/resource-dictionary/starter-dictionary")
+            resourceDictionaryLoadService.loadPathResourceDictionary("./../../../../components/model-catalog/resource-dictionary/test-dictionary")
         }
     }
 
@@ -73,4 +74,20 @@ class BluePrintEnhancerServiceImplTest {
         val valid = bluePrintValidatorService.validateBluePrints(targetPath)
         Assert.assertTrue("blueprint validation failed ", valid)
     }
+
+    @Test
+    @Throws(Exception::class)
+    fun testEnhancementAndValidation2() {
+
+        val basePath = "./../../../../components/model-catalog/blueprint-model/test-blueprint/golden"
+
+        val targetPath = Paths.get("target", "bp-enhance").toUri().path
+
+        val bluePrintContext = bluePrintEnhancerService.enhance(basePath, targetPath)
+        Assert.assertNotNull("failed to get blueprintContext ", bluePrintContext)
+
+        // Validate the Generated BluePrints
+        val valid = bluePrintValidatorService.validateBluePrints(targetPath)
+        Assert.assertTrue("blueprint validation failed ", valid)
+    }
 }
\ No newline at end of file
-- 
cgit