- def 'Create child data node.'() {
- given: 'json data and xpath'
- def jsonData = 'some json'
- def xpath = '/test-node'
- when: 'create data node is invoked'
- objectUnderTest.createDataNode(cmHandle, xpath, jsonData)
- then: 'save data is invoked once with the expected parameters'
- 1 * mockCpsDataService.saveData(expectedDataspaceName, cmHandle, xpath, jsonData, noTimestamp)
- }
-
- def 'Add list-node elements.'() {
- given: 'json data and xpath'
- def jsonData = 'some json'
- def xpath = '/test-node'
- when: 'add list node element is invoked'
- objectUnderTest.addListNodeElements(cmHandle, xpath, jsonData)
- then: 'the save list elements is invoked once with the expected parameters'
- 1 * mockCpsDataService.saveListElements(expectedDataspaceName, cmHandle, xpath, jsonData, noTimestamp)
- }