diff options
author | danielhanrahan <daniel.hanrahan@est.tech> | 2023-06-30 12:14:07 +0100 |
---|---|---|
committer | danielhanrahan <daniel.hanrahan@est.tech> | 2023-07-11 11:48:28 +0100 |
commit | 9cfc03f3af00d0128a5b22e32cc5ba439de627b6 (patch) | |
tree | 591da6d42a571882219e6df207e5ad3cd1167566 /cps-service/src/test | |
parent | 0ed77bfc78fbb1f33fe6708234759dab2413e0f7 (diff) |
Combine alreadyDefinedException classes
Issue-ID: CPS-1774
Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech>
Change-Id: I52ff9074a9f8188e8635a811b0d2713a97cb4b10
Diffstat (limited to 'cps-service/src/test')
-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 5bd3678346..8db1063340 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.'() { |