X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=cps-ncmp-service%2Fsrc%2Ftest%2Fgroovy%2Forg%2Fonap%2Fcps%2Fncmp%2Fapi%2Finventory%2FInventoryPersistenceImplSpec.groovy;h=efe6f00bcafa2f8b20f5bf8ef70ad5115ab7658a;hb=7cd5edbfd38ec8a500cbaf74618178955f7a6dd2;hp=4a98526b480167c3d1c307f348cfbf319125574e;hpb=0bd192ca12ac2f768e44d0d3482785c79a881904;p=cps.git diff --git a/cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/api/inventory/InventoryPersistenceImplSpec.groovy b/cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/api/inventory/InventoryPersistenceImplSpec.groovy index 4a98526b4..efe6f00bc 100644 --- a/cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/api/inventory/InventoryPersistenceImplSpec.groovy +++ b/cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/api/inventory/InventoryPersistenceImplSpec.groovy @@ -243,10 +243,19 @@ class InventoryPersistenceImplSpec extends Specification { objectUnderTest.deleteSchemaSetWithCascade('validSchemaSetName') then: 'the module service to delete schemaSet is invoked once' 1 * mockCpsModuleService.deleteSchemaSet('NFP-Operational', 'validSchemaSetName', CascadeDeleteAllowed.CASCADE_DELETE_ALLOWED) - and: 'the CM Handle ID is validated' + and: 'the schema set name is validated' 1 * mockCpsValidator.validateNameCharacters('validSchemaSetName') } + def 'Delete multiple schema sets with valid schema set names'() { + when: 'the method to delete schema sets is called with valid schema set names' + objectUnderTest.deleteSchemaSetsWithCascade(['validSchemaSetName1', 'validSchemaSetName2']) + then: 'the module service to delete schema sets is invoked once' + 1 * mockCpsModuleService.deleteSchemaSetsWithCascade('NFP-Operational', ['validSchemaSetName1', 'validSchemaSetName2']) + and: 'the schema set names are validated' + 1 * mockCpsValidator.validateNameCharacters(['validSchemaSetName1', 'validSchemaSetName2']) + } + def 'Get data node via xPath'() { when: 'the method to get data nodes is called' objectUnderTest.getDataNode('sample xPath')