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
This commit is contained in:
parent
8fc30f39c6
commit
228f1a54b8
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
|
@ -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()));
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -3,4 +3,4 @@
|
|||
* @author Manuele Simi (ISTI - CNR)
|
||||
*
|
||||
*/
|
||||
package org.gcube.resourcemanagement.manager.io.exceptions;:
|
||||
package org.gcube.resourcemanagement.manager.io.exceptions;
|
||||
|
|
Reference in New Issue