diff options
Diffstat (limited to 'cps-ncmp-service/src/test/groovy/org/onap')
-rw-r--r-- | cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/impl/inventory/NetworkCmProxyInventoryFacadeSpec.groovy | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/impl/inventory/NetworkCmProxyInventoryFacadeSpec.groovy b/cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/impl/inventory/NetworkCmProxyInventoryFacadeSpec.groovy index 3352c264a2..be2bf87df0 100644 --- a/cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/impl/inventory/NetworkCmProxyInventoryFacadeSpec.groovy +++ b/cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/impl/inventory/NetworkCmProxyInventoryFacadeSpec.groovy @@ -51,7 +51,6 @@ class NetworkCmProxyInventoryFacadeSpec extends Specification { def mockTrustLevelManager = Mock(TrustLevelManager) def mockAlternateIdMatcher = Mock(AlternateIdMatcher) def objectUnderTest = new NetworkCmProxyInventoryFacade(mockCmHandleRegistrationService, mockCmHandleQueryService, mockParameterizedCmHandleQueryService, mockInventoryPersistence, spiedJsonObjectMapper, mockTrustLevelManager, mockAlternateIdMatcher) - def trustLevelPerCmHandle = [:] def 'Update DMI Registration'() { given: 'an (updated) dmi plugin registration' @@ -90,11 +89,17 @@ class NetworkCmProxyInventoryFacadeSpec extends Specification { assert result.containsAll('cm-handle-1','cm-handle-2') } - def 'Getting Yang Resources.'() { + def 'Getting Yang Resources for a given #scenario'() { when: 'yang resources is called' - objectUnderTest.getYangResourcesModuleReferences('some-cm-handle') - then: 'CPS module services is invoked for the correct dataspace and cm handle' + objectUnderTest.getYangResourcesModuleReferences(cmHandleRef) + then: 'alternate id matcher is called' + mockAlternateIdMatcher.getCmHandleId(cmHandleRef) >> 'some-cm-handle' + and: 'CPS module services is invoked for the correct cm handle' 1 * mockInventoryPersistence.getYangResourcesModuleReferences('some-cm-handle') + where: 'following cm handle reference is used' + scenario | cmHandleRef + 'Cm Handle Reference as cm handle-id' | 'some-cm-handle' + 'Cm Handle Reference as alternate-id' | 'some-alternate-id' } def 'Get a cm handle.'() { |