diff options
author | Muthuramalingam, Brinda Santh <brindasanth@in.ibm.com> | 2019-02-22 10:14:24 -0500 |
---|---|---|
committer | Muthuramalingam, Brinda Santh <brindasanth@in.ibm.com> | 2019-02-25 16:11:52 -0500 |
commit | fb0dea26c8db442173b7d93eddf514f33caa15dd (patch) | |
tree | 62ee6c17704ae9def952482c48be3d9846946dc1 /ms/controllerblueprints/modules/blueprint-validation/src/test | |
parent | e9d20bd21789fd0bcf5649fbbb0d388f68a3c063 (diff) |
Add extension validation framework
Change-Id: I5674e8da70cc4d20899f6fe2163a595b28861036
Issue-ID: CCSDK-1103
Signed-off-by: Muthuramalingam, Brinda Santh <brindasanth@in.ibm.com>
Diffstat (limited to 'ms/controllerblueprints/modules/blueprint-validation/src/test')
-rw-r--r-- | ms/controllerblueprints/modules/blueprint-validation/src/test/kotlin/org/onap/ccsdk/apps/controllerblueprints/validation/BluePrintDesignTimeValidatorServiceTest.kt (renamed from ms/controllerblueprints/modules/blueprint-validation/src/test/kotlin/org/onap/ccsdk/apps/controllerblueprints/validation/BluePrintValidatorServiceImplTest.kt) | 4 | ||||
-rw-r--r-- | ms/controllerblueprints/modules/blueprint-validation/src/test/kotlin/org/onap/ccsdk/apps/controllerblueprints/validation/MockBluePrintTypeValidatorService.kt | 17 |
2 files changed, 19 insertions, 2 deletions
diff --git a/ms/controllerblueprints/modules/blueprint-validation/src/test/kotlin/org/onap/ccsdk/apps/controllerblueprints/validation/BluePrintValidatorServiceImplTest.kt b/ms/controllerblueprints/modules/blueprint-validation/src/test/kotlin/org/onap/ccsdk/apps/controllerblueprints/validation/BluePrintDesignTimeValidatorServiceTest.kt index f5d157dd..43c3e0e3 100644 --- a/ms/controllerblueprints/modules/blueprint-validation/src/test/kotlin/org/onap/ccsdk/apps/controllerblueprints/validation/BluePrintValidatorServiceImplTest.kt +++ b/ms/controllerblueprints/modules/blueprint-validation/src/test/kotlin/org/onap/ccsdk/apps/controllerblueprints/validation/BluePrintDesignTimeValidatorServiceTest.kt @@ -30,12 +30,12 @@ import org.onap.ccsdk.apps.controllerblueprints.core.utils.BluePrintMetadataUtil import kotlin.test.assertEquals import kotlin.test.assertTrue -class BluePrintValidatorServiceImplTest { +class BluePrintDesignTimeValidatorServiceTest { private val blueprintBasePath: String = ("./../../../../components/model-catalog/blueprint-model/test-blueprint/baseconfiguration") private val bluePrintRuntime = BluePrintMetadataUtils.getBluePrintRuntime("1234", blueprintBasePath) private val mockBluePrintTypeValidatorService = MockBluePrintTypeValidatorService() - private val defaultBluePrintValidatorService = BluePrintValidatorServiceImpl(mockBluePrintTypeValidatorService) + private val defaultBluePrintValidatorService = BluePrintDesignTimeValidatorService(mockBluePrintTypeValidatorService) private val workflowValidator = BluePrintWorkflowValidatorImpl(mockBluePrintTypeValidatorService) @Test diff --git a/ms/controllerblueprints/modules/blueprint-validation/src/test/kotlin/org/onap/ccsdk/apps/controllerblueprints/validation/MockBluePrintTypeValidatorService.kt b/ms/controllerblueprints/modules/blueprint-validation/src/test/kotlin/org/onap/ccsdk/apps/controllerblueprints/validation/MockBluePrintTypeValidatorService.kt index 971099ca..65574c22 100644 --- a/ms/controllerblueprints/modules/blueprint-validation/src/test/kotlin/org/onap/ccsdk/apps/controllerblueprints/validation/MockBluePrintTypeValidatorService.kt +++ b/ms/controllerblueprints/modules/blueprint-validation/src/test/kotlin/org/onap/ccsdk/apps/controllerblueprints/validation/MockBluePrintTypeValidatorService.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. @@ -20,6 +21,18 @@ import org.onap.ccsdk.apps.controllerblueprints.core.interfaces.* class MockBluePrintTypeValidatorService : BluePrintTypeValidatorService { + override fun <T : BluePrintValidator<*>> bluePrintValidator(referenceName: String, classType: Class<T>): T? { + return null + } + + override fun <T : BluePrintValidator<*>> bluePrintValidators(referenceNamePrefix: String, classType: Class<T>): List<T>? { + return null + } + + override fun <T : BluePrintValidator<*>> bluePrintValidators(classType: Class<T>): List<T>? { + return null + } + override fun getServiceTemplateValidators(): List<BluePrintServiceTemplateValidator> { return listOf(BluePrintServiceTemplateValidatorImpl(this)) } @@ -32,6 +45,10 @@ class MockBluePrintTypeValidatorService : BluePrintTypeValidatorService { return listOf(BluePrintArtifactTypeValidatorImpl(this)) } + override fun getArtifactDefinitionsValidators(): List<BluePrintArtifactDefinitionValidator> { + return listOf(BluePrintArtifactDefinitionValidatorImpl(this)) + } + override fun getNodeTypeValidators(): List<BluePrintNodeTypeValidator> { return listOf(BluePrintNodeTypeValidatorImpl(this)) } |