aboutsummaryrefslogtreecommitdiffstats
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.groovy2
-rw-r--r--cps-service/src/test/groovy/org/onap/cps/utils/CpsValidatorSpec.groovy14
2 files changed, 1 insertions, 15 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 ab960df6a..3f28f0ac8 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
@@ -143,7 +143,7 @@ class CpsDataServiceImplSpec extends Specification {
def jsonData = '{"branch": [{"name": "A"}, {"name": "B"}]}'
objectUnderTest.saveListElementsBatch(dataspaceName, anchorName, '/test-tree', [jsonData], observedTimestamp)
then: 'the persistence service method is invoked with correct parameters'
- 1 * mockCpsDataPersistenceService.addListElementsBatch(dataspaceName, anchorName, '/test-tree',_) >> {
+ 1 * mockCpsDataPersistenceService.addMultipleLists(dataspaceName, anchorName, '/test-tree',_) >> {
args -> {
def listElementsCollection = args[3] as Collection<Collection<DataNode>>
assert listElementsCollection.size() == 1
diff --git a/cps-service/src/test/groovy/org/onap/cps/utils/CpsValidatorSpec.groovy b/cps-service/src/test/groovy/org/onap/cps/utils/CpsValidatorSpec.groovy
index ce728ef1c..ea7a5d6d1 100644
--- a/cps-service/src/test/groovy/org/onap/cps/utils/CpsValidatorSpec.groovy
+++ b/cps-service/src/test/groovy/org/onap/cps/utils/CpsValidatorSpec.groovy
@@ -25,7 +25,6 @@ import spock.lang.Specification
class CpsValidatorSpec extends Specification {
-
def 'Validating a valid string.'() {
when: 'the string is validated using a valid name'
CpsValidator.validateNameCharacters('name-with-no-spaces')
@@ -46,17 +45,4 @@ class CpsValidatorSpec extends Specification {
'position 9' | 'nameWith Space' || 'nameWith Space invalid token encountered at position 9'
}
- def 'Validating topic names.'() {
- when: 'the topic name is validated'
- def isValidTopicName = CpsValidator.validateTopicName(topicName)
- then: 'boolean response will be returned for #scenario'
- assert isValidTopicName == booleanResponse
- where: 'the following names are used'
- scenario | topicName || booleanResponse
- 'valid topic' | 'my-topic-name' || true
- 'empty topic' | '' || false
- 'blank topic' | ' ' || false
- 'null topic' | null || false
- 'invalid non empty topic' | '1_5_*_#' || false
- }
}