- def 'Add list-node elements.'() {
- given: 'json data and parent node xpath'
- def jsonData = 'json data'
- def parentNodeXpath = 'parent node xpath'
- when: 'post request is performed'
- def response = mvc.perform(
- post("$ncmpBasePathV1/cm-handles/$cmHandle/list-node")
- .contentType(MediaType.APPLICATION_JSON)
- .content(jsonData)
- .param('xpath', parentNodeXpath)
- ).andReturn().response
- then: 'the service method is invoked once with expected parameters'
- 1 * mockNetworkCmProxyDataService.addListNodeElements(cmHandle, parentNodeXpath, jsonData)
- and: 'response status indicates success'
- response.status == HttpStatus.CREATED.value()
- }
-
- def 'Update data node leaves.'() {
- given: 'json data'
- def jsonData = 'json data'
- and: 'the query endpoint'
- def endpoint = "$ncmpBasePathV1/cm-handles/$cmHandle/nodes"
- when: 'patch request is performed'
- def response = mvc.perform(
- patch(endpoint)
- .contentType(MediaType.APPLICATION_JSON)
- .content(jsonData)
- .param('xpath', xpath)
- ).andReturn().response
- then: 'the service method is invoked once with expected parameters'
- 1 * mockNetworkCmProxyDataService.updateNodeLeaves(cmHandle, xpath, jsonData)
- and: 'response status indicates success'
- response.status == HttpStatus.OK.value()
- }
-
- def 'Replace data node tree.'() {
- given: 'json data'
- def jsonData = 'json data'
- and: 'the query endpoint'
- def endpoint = "$ncmpBasePathV1/cm-handles/$cmHandle/nodes"
- when: 'put request is performed'
+ def 'Get Resource Data from pass-through operational.'() {
+ given: 'resource data url'
+ def getUrl = "$ncmpBasePathV1/ch/testCmHandle/data/ds/ncmp-datastore:passthrough-operational" +
+ "?resourceIdentifier=parent/child&options=(a=1,b=2)"
+ when: 'get data resource request is performed'