summaryrefslogtreecommitdiffstats
path: root/cps-service/src/test/groovy
diff options
context:
space:
mode:
authorToine Siebelink <toine.siebelink@est.tech>2023-08-01 12:20:51 +0000
committerGerrit Code Review <gerrit@onap.org>2023-08-01 12:20:51 +0000
commit2a1e576e6d12456e43c47d4cd81be7f88d1a2a2b (patch)
tree5a0769d1520906c487cd3ce015b9ee2b55812201 /cps-service/src/test/groovy
parent77ef0b4e4ab1330a6e86ddb0ec57cafad0d6e513 (diff)
parent61f5e14c5cdebe659dfae0c7143a07d6f81cb06c (diff)
Merge "Fix: Make bookstore data consistent"
Diffstat (limited to 'cps-service/src/test/groovy')
-rw-r--r--cps-service/src/test/groovy/org/onap/cps/api/impl/CpsDataServiceImplSpec.groovy4
1 files changed, 2 insertions, 2 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 cb95fb6bfd..b4ac7a68f3 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
@@ -118,7 +118,7 @@ class CpsDataServiceImplSpec extends Specification {
given: 'schema set for given anchor and dataspace references bookstore model'
setupSchemaSetMocks('bookstore.yang')
when: 'save data method is invoked with list element json data'
- def jsonData = '{"multiple-data-tree:invoice": [{"ProductID": "2","ProductName": "Banana","price": "100","stock": True}]}'
+ def jsonData = '{"bookstore-address":[{"bookstore-name":"Easons","address":"Dublin,Ireland","postal-code":"D02HA21"}]}'
objectUnderTest.saveListElements(dataspaceName, anchorName, '/', jsonData, observedTimestamp)
then: 'the persistence service method is invoked with correct parameters'
1 * mockCpsDataPersistenceService.storeDataNodes(dataspaceName, anchorName,
@@ -126,7 +126,7 @@ class CpsDataServiceImplSpec extends Specification {
{
assert dataNodeCollection.size() == 1
assert dataNodeCollection.collect { it.getXpath() }
- .containsAll(['/invoice[@ProductID=\'2\']'])
+ .containsAll(['/bookstore-address[@bookstore-name=\'Easons\']'])
}
}
)