aboutsummaryrefslogtreecommitdiffstats
path: root/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/test/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/BluePrintErrorTest.kt
diff options
context:
space:
mode:
Diffstat (limited to 'ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/test/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/BluePrintErrorTest.kt')
-rw-r--r--ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/test/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/BluePrintErrorTest.kt33
1 files changed, 33 insertions, 0 deletions
diff --git a/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/test/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/BluePrintErrorTest.kt b/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/test/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/BluePrintErrorTest.kt
new file mode 100644
index 000000000..167c0381a
--- /dev/null
+++ b/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/test/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/BluePrintErrorTest.kt
@@ -0,0 +1,33 @@
+package org.onap.ccsdk.cds.controllerblueprints.core
+
+import org.junit.Test
+import kotlin.test.assertEquals
+import kotlin.test.assertTrue
+
+class BluePrintErrorTest {
+
+ @Test
+ fun testBluePrintErrorIsCreatedWithemptyList() {
+ val bluePrintError = BluePrintError()
+
+ assertTrue(bluePrintError.allErrors().isEmpty())
+ }
+
+ @Test
+ fun testAddErrorWith3Params() {
+ val bluePrintError = BluePrintError()
+
+ bluePrintError.addError("type", "name", "error", "step")
+
+ assertEquals("type : name : error", bluePrintError.stepErrors("step")!![0])
+ }
+
+ @Test
+ fun testAddErrorWith2Params() {
+ val bluePrintError = BluePrintError()
+
+ bluePrintError.addError("error", "step")
+
+ assertEquals("error", bluePrintError.stepErrors("step")!![0])
+ }
+}