- def 'Update data node leaves.'() {
- given: 'json data and xpath'
- def jsonData = 'some json'
- def xpath = '/xpath'
- when: 'update node leaves is invoked'
- objectUnderTest.updateNodeLeaves(cmHandle, xpath, jsonData)
- then: 'the persistence service is called once with the correct parameters'
- 1 * mockCpsDataService.updateNodeLeaves(expectedDataspaceName, cmHandle, xpath, jsonData, noTimestamp)
- }
-
- def 'Replace data node tree.'() {
- given: 'json data and xpath'
- def jsonData = 'some json'
- def xpath = '/xpath'
- when: 'replace node tree is invoked'
- objectUnderTest.replaceNodeTree(cmHandle, xpath, jsonData)
- then: 'the persistence service is called once with the correct parameters'
- 1 * mockCpsDataService.replaceNodeTree(expectedDataspaceName, cmHandle, xpath, jsonData, noTimestamp)
- }
-
- def 'Update resource data for passthrough running from dmi using POST #scenario cm handle properties.'() {
- given: 'a data node'
- def dataNode = getDataNode(includeCmHandleProperties)
- and: 'cpsDataService returns valid datanode'