From e1f73e264e2dca1f10c273620653f541c2f25d69 Mon Sep 17 00:00:00 2001 From: emaclee Date: Fri, 17 Jun 2022 17:42:56 +0100 Subject: Add method to get YANG module sources for CM handle - part of this commit includes renaming the enum SyncState to DataStoreSyncState Issue-ID: CPS-1064 Signed-off-by: emaclee Change-Id: I6bf419141a1b33f09871946445cdfff422c8c354 --- .../groovy/org/onap/cps/api/impl/CpsModuleServiceImplSpec.groovy | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'cps-service/src/test/groovy') diff --git a/cps-service/src/test/groovy/org/onap/cps/api/impl/CpsModuleServiceImplSpec.groovy b/cps-service/src/test/groovy/org/onap/cps/api/impl/CpsModuleServiceImplSpec.groovy index 95d731478f..429de7d51b 100644 --- a/cps-service/src/test/groovy/org/onap/cps/api/impl/CpsModuleServiceImplSpec.groovy +++ b/cps-service/src/test/groovy/org/onap/cps/api/impl/CpsModuleServiceImplSpec.groovy @@ -24,7 +24,6 @@ package org.onap.cps.api.impl import org.onap.cps.TestUtils import org.onap.cps.api.CpsAdminService -import org.onap.cps.spi.CascadeDeleteAllowed import org.onap.cps.spi.CpsModulePersistenceService import org.onap.cps.spi.exceptions.DataValidationException import org.onap.cps.spi.exceptions.ModelValidationException @@ -243,4 +242,11 @@ class CpsModuleServiceImplSpec extends Specification { then: 'cps module persistence service is called with module references to check' 1 * mockCpsModulePersistenceService.identifyNewModuleReferences(moduleReferencesToCheck); } + + def 'Getting module definitions.'() { + when: 'get module definitions method is called with a valid dataspace and anchor name' + objectUnderTest.getModuleDefinitionsByAnchorName('some-dataspace-name', 'some-anchor-name') + then: 'CPS module persistence service is invoked the correct number of times' + 1 * mockCpsModulePersistenceService.getYangResourceDefinitions('some-dataspace-name', 'some-anchor-name') + } } -- cgit 1.2.3-korg