From 1baf48d05be1cd32e22c065ebfec218da100d1f2 Mon Sep 17 00:00:00 2001 From: Ruslan Kashapov Date: Fri, 7 May 2021 10:46:27 +0300 Subject: Create list-node elements (part3): NCMP REST and service layers Issue-ID: CPS-360 Change-Id: Id8be89f19750d72bae334491aea4a59f21c7ecd6 Signed-off-by: Ruslan Kashapov --- .../onap/cps/api/impl/NetworkCmProxyDataServiceImplSpec.groovy | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'cps-ncmp-service/src/test') diff --git a/cps-ncmp-service/src/test/groovy/org/onap/cps/api/impl/NetworkCmProxyDataServiceImplSpec.groovy b/cps-ncmp-service/src/test/groovy/org/onap/cps/api/impl/NetworkCmProxyDataServiceImplSpec.groovy index 0a00e34f7..e67d4ad85 100644 --- a/cps-ncmp-service/src/test/groovy/org/onap/cps/api/impl/NetworkCmProxyDataServiceImplSpec.groovy +++ b/cps-ncmp-service/src/test/groovy/org/onap/cps/api/impl/NetworkCmProxyDataServiceImplSpec.groovy @@ -73,6 +73,16 @@ class NetworkCmProxyDataServiceImplSpec extends Specification { 1 * mockcpsDataService.saveData(expectedDataspaceName, cmHandle, xpath, jsonData) } + def 'Add list-node elements.'() { + given: 'a cm handle and parent node xpath' + def jsonData = 'some json' + def xpath = '/test-node' + when: 'addListNodeElements is invoked' + objectUnderTest.addListNodeElements(cmHandle, xpath, jsonData) + then: 'the CPS service method is invoked once with the expected parameters' + 1 * mockcpsDataService.saveListNodeData(expectedDataspaceName, cmHandle, xpath, jsonData) + } + def 'Update data node leaves.'() { given: 'a cm Handle and a cps path' def xpath = '/xpath' -- cgit 1.2.3-korg