summaryrefslogtreecommitdiffstats
path: root/cps-service/src/test
diff options
context:
space:
mode:
Diffstat (limited to 'cps-service/src/test')
-rw-r--r--cps-service/src/test/groovy/org/onap/cps/api/impl/CpsDataServiceImplSpec.groovy11
1 files changed, 11 insertions, 0 deletions
diff --git a/cps-service/src/test/groovy/org/onap/cps/api/impl/CpsDataServiceImplSpec.groovy b/cps-service/src/test/groovy/org/onap/cps/api/impl/CpsDataServiceImplSpec.groovy
index faa5d2edbd..be397b92cd 100644
--- a/cps-service/src/test/groovy/org/onap/cps/api/impl/CpsDataServiceImplSpec.groovy
+++ b/cps-service/src/test/groovy/org/onap/cps/api/impl/CpsDataServiceImplSpec.groovy
@@ -240,6 +240,17 @@ class CpsDataServiceImplSpec extends Specification {
'one leaf' | '{"name": "some-name"}'
}
+ def 'Update multiple data nodes' () {
+ given: 'schema set for given dataspace and anchor refers multipleDataTree model'
+ setupSchemaSetMocks('multipleDataTree.yang')
+ and: 'json string with multiple data trees'
+ def updatedJsonData = '{"first-container":{"a-leaf":"a-new-Value"},"last-container":{"x-leaf":"x-new-value"}}'
+ when: 'update operation is performed on multiple data nodes'
+ objectUnderTest.updateNodeLeaves(dataspaceName, anchorName, '/', updatedJsonData, observedTimestamp)
+ then: 'expected exception is thrown'
+ thrown(DataValidationException)
+ }
+
def 'Update Bookstore node leaves' () {
given: 'a DMI registry model'
setupSchemaSetMocks('bookstore.yang')