diff options
Diffstat (limited to 'cps-service/src/test/groovy/org/onap/cps/spi/exceptions/CpsExceptionsSpec.groovy')
-rwxr-xr-x | cps-service/src/test/groovy/org/onap/cps/spi/exceptions/CpsExceptionsSpec.groovy | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/cps-service/src/test/groovy/org/onap/cps/spi/exceptions/CpsExceptionsSpec.groovy b/cps-service/src/test/groovy/org/onap/cps/spi/exceptions/CpsExceptionsSpec.groovy index 5bd367834..8db106334 100755 --- a/cps-service/src/test/groovy/org/onap/cps/spi/exceptions/CpsExceptionsSpec.groovy +++ b/cps-service/src/test/groovy/org/onap/cps/spi/exceptions/CpsExceptionsSpec.groovy @@ -1,6 +1,6 @@ /* * ============LICENSE_START======================================================= - * Copyright (C) 2021 Nordix Foundation + * Copyright (C) 2021-2023 Nordix Foundation * Modifications Copyright (C) 2021 Pantheon.tech * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); @@ -18,6 +18,7 @@ * SPDX-License-Identifier: Apache-2.0 * ============LICENSE_END========================================================= */ + package org.onap.cps.spi.exceptions import spock.lang.Specification @@ -152,10 +153,10 @@ class CpsExceptionsSpec extends Specification { == "Anchor with name ${anchorName} already exists for ${dataspaceName}." } - def 'Creating a exception that a data node already exists.'() { + def 'Creating a exception that data nodes already exist.'() { expect: 'the exception details contains the correct message with xpath and dataspace name.' - (AlreadyDefinedException.forDataNode(xpath, dataspaceName, rootCause)).details - == "Data node with name ${xpath} already exists for ${dataspaceName}." + (AlreadyDefinedException.forDataNodes([xpath], anchorName)).details + == "1 data node(s) already exist for ${anchorName}." } def 'Creating a exception that a schema set already exists.'() { |