X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=cps-nf-proxy-service%2Fsrc%2Ftest%2Fgroovy%2Forg%2Fonap%2Fcps%2Fapi%2Fimpl%2FNfProxyDataServiceImplSpec.groovy;h=24549aec83dc9aaf35845e7a68dbd98bfe08b869;hb=32446dce35b5bf9d2c84751718cb4ece7f96fa72;hp=f89f80e301555fadbdbec0cd5b0755314977b893;hpb=7c981df521c9d8eb6f340b2b118491eeeb21ae59;p=cps.git diff --git a/cps-nf-proxy-service/src/test/groovy/org/onap/cps/api/impl/NfProxyDataServiceImplSpec.groovy b/cps-nf-proxy-service/src/test/groovy/org/onap/cps/api/impl/NfProxyDataServiceImplSpec.groovy index f89f80e301..24549aec83 100644 --- a/cps-nf-proxy-service/src/test/groovy/org/onap/cps/api/impl/NfProxyDataServiceImplSpec.groovy +++ b/cps-nf-proxy-service/src/test/groovy/org/onap/cps/api/impl/NfProxyDataServiceImplSpec.groovy @@ -22,6 +22,7 @@ package org.onap.cps.api.impl import org.onap.cps.api.CpsDataService import org.onap.cps.api.CpsQueryService import org.onap.cps.nfproxy.api.impl.NfProxyDataServiceImpl +import org.onap.cps.spi.FetchDescendantsOption import spock.lang.Specification class NfProxyDataServiceImplSpec extends Specification { @@ -37,13 +38,15 @@ class NfProxyDataServiceImplSpec extends Specification { def cmHandle = 'some handle' def expectedDataspaceName = 'NFP-Operational' - def 'Query data nodes by cps path.'() { + def 'Query data nodes by cps path with #fetchDescendantsOption.'() { given: 'a cm Handle and a cps path' def cpsPath = '/cps-path' when: 'queryDataNodes is invoked' - objectUnderTest.queryDataNodes(cmHandle, cpsPath) + objectUnderTest.queryDataNodes(cmHandle, cpsPath, fetchDescendantsOption) then: 'the persistence service is called once with the correct parameters' - 1 * mockcpsQueryService.queryDataNodes(expectedDataspaceName, cmHandle, cpsPath) + 1 * mockcpsQueryService.queryDataNodes(expectedDataspaceName, cmHandle, cpsPath, fetchDescendantsOption) + where: 'all fetch descendants options are supported' + fetchDescendantsOption << FetchDescendantsOption.values() } def 'Update data node leaves.'() {