summaryrefslogtreecommitdiffstats
path: root/cps-service
diff options
context:
space:
mode:
Diffstat (limited to 'cps-service')
-rw-r--r--cps-service/src/main/java/org/onap/cps/spi/exceptions/CpsPathException.java7
-rwxr-xr-xcps-service/src/test/groovy/org/onap/cps/spi/exceptions/CpsExceptionsSpec.groovy12
2 files changed, 9 insertions, 10 deletions
diff --git a/cps-service/src/main/java/org/onap/cps/spi/exceptions/CpsPathException.java b/cps-service/src/main/java/org/onap/cps/spi/exceptions/CpsPathException.java
index fde5566b1..f1e8dc525 100644
--- a/cps-service/src/main/java/org/onap/cps/spi/exceptions/CpsPathException.java
+++ b/cps-service/src/main/java/org/onap/cps/spi/exceptions/CpsPathException.java
@@ -23,13 +23,14 @@ public class CpsPathException extends CpsException {
private static final long serialVersionUID = 1006899957127327791L;
+ private static final String ERROR_MESSAGE = "Error while parsing cpsPath expression";
+
/**
* Constructor.
*
- * @param message the error message
* @param details the error details
*/
- public CpsPathException(final String message, final String details) {
- super(message, details);
+ public CpsPathException(final String details) {
+ super(ERROR_MESSAGE, details);
}
}
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 8592af908..b0bd62905 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
@@ -115,8 +115,8 @@ class CpsExceptionsSpec extends Specification {
def 'Creating an exception that the schema set being used and cannot be deleted.'() {
expect: 'the exception details contains the correct message with dataspace and schema set names'
(new SchemaSetInUseException(dataspaceName, schemaSetName)).details
- == ("Schema Set with name ${schemaSetName} in dataspace ${dataspaceName} is having "
- + "Anchor records associated.")
+ == ("Schema Set with name ${schemaSetName} in dataspace ${dataspaceName} is having" +
+ " Anchor records associated.")
}
def 'Creating a exception that a datanode with a specified xpath does not exist.'() {
@@ -157,10 +157,8 @@ class CpsExceptionsSpec extends Specification {
def 'Creating a cps path exception.'() {
given: 'a cps path exception is created'
- def exception = new CpsPathException(providedMessage, providedDetails)
- expect: 'the exception has the provided message'
- exception.message == providedMessage
- and: 'the exception has the provided details'
+ def exception = new CpsPathException(providedDetails)
+ expect: 'the exception has the provided details'
exception.details == providedDetails
}
-} \ No newline at end of file
+}