From 228f1a54b8cebc35aaa039f10ea1e3dbc8b10784 Mon Sep 17 00:00:00 2001 From: "manuele.simi" Date: Tue, 26 Dec 2017 12:13:55 +0000 Subject: [PATCH] Adjust test in error. git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/resource-management/resource-manager@161907 82a268e6-3cf1-43bd-a215-b396298e98cf --- .../manager/io/exceptions/RMException.java | 6 +++--- .../manager/io/exceptions/CodeExceptionTest.java | 2 +- .../manager/io/exceptions/package-info.java | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/io/src/main/java/org/gcube/resourcemanagement/manager/io/exceptions/RMException.java b/io/src/main/java/org/gcube/resourcemanagement/manager/io/exceptions/RMException.java index 466f9ad..ecf19eb 100644 --- a/io/src/main/java/org/gcube/resourcemanagement/manager/io/exceptions/RMException.java +++ b/io/src/main/java/org/gcube/resourcemanagement/manager/io/exceptions/RMException.java @@ -1,4 +1,4 @@ -package org.gcube.resourcemanagement.manager.exception; +package org.gcube.resourcemanagement.manager.io.exceptions; /** * Exception returned by the Resource Manager. @@ -13,8 +13,8 @@ public class RMException extends Exception { private final int errorCode; private final String errorMsg; - public RMException(ExceptionCode code) { - this.errorMsg = code.getMsg(); + public RMException(RMCode code) { + this.errorMsg = code.getMessage(); this.errorCode = code.getId(); } diff --git a/io/src/test/java/org/gcube/resourcemanagement/manager/io/exceptions/CodeExceptionTest.java b/io/src/test/java/org/gcube/resourcemanagement/manager/io/exceptions/CodeExceptionTest.java index 5d49ec6..36409a7 100644 --- a/io/src/test/java/org/gcube/resourcemanagement/manager/io/exceptions/CodeExceptionTest.java +++ b/io/src/test/java/org/gcube/resourcemanagement/manager/io/exceptions/CodeExceptionTest.java @@ -24,7 +24,7 @@ public class CodeExceptionTest { public void testCodeException() { CodeException exception = new CodeException(RMCode.CONTEXT_ALREADY_EXIST); assertTrue("Unexpected id", exception.getErrorCode() == RMCode.CONTEXT_ALREADY_EXIST.getId()); - assertTrue("Unexpected message", exception.getMessage().equals(RMCode.CONTEXT_ALREADY_EXIST.getMessage())); + assertTrue("Unexpected message", exception.getErrorMsg().equals(RMCode.CONTEXT_ALREADY_EXIST.getMessage())); } diff --git a/io/src/test/java/org/gcube/resourcemanagement/manager/io/exceptions/package-info.java b/io/src/test/java/org/gcube/resourcemanagement/manager/io/exceptions/package-info.java index dbf5881..b5c5481 100644 --- a/io/src/test/java/org/gcube/resourcemanagement/manager/io/exceptions/package-info.java +++ b/io/src/test/java/org/gcube/resourcemanagement/manager/io/exceptions/package-info.java @@ -3,4 +3,4 @@ * @author Manuele Simi (ISTI - CNR) * */ -package org.gcube.resourcemanagement.manager.io.exceptions;: +package org.gcube.resourcemanagement.manager.io.exceptions;