Commit 67108a20 authored by Noel Alonso's avatar Noel Alonso
Browse files

Merge branch 'dev' into 'master'

Añade excepción para consultas sin resultados

See merge request redmic-project/server/library/exceptions!4
parents e996aeb8 6f8243db
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -109,7 +109,9 @@ public enum ExceptionType implements ExceptionTypeItfc {
	JOB_RUNNING_STEP_NOT_ALLOWED(Constants.JOB_RUNNING_STEP_NOT_ALLOWED),
	JOB_COMPLETED_STEP_NOT_ALLOWED(Constants.JOB_COMPLETED_STEP_NOT_ALLOWED),
	
	REPORT_ERROR(Constants.REPORT_ERROR);
	REPORT_ERROR(Constants.REPORT_ERROR),
	
	NO_CONTENT(Constants.NO_CONTENT);
	
	// @formatter:on

@@ -244,7 +246,9 @@ public enum ExceptionType implements ExceptionTypeItfc {
			JOB_RUNNING_STEP_NOT_ALLOWED = "JobRunningStepNotAllowed",
			JOB_COMPLETED_STEP_NOT_ALLOWED = "JobCompletedStepNotAllowed",
			
			REPORT_ERROR = "ReportError";
			REPORT_ERROR = "ReportError",
		
			NO_CONTENT = "NoContentException";
		// @formatter:on
	}

+13 −0
Original line number Diff line number Diff line
package es.redmic.exception.common;

public class NoContentException extends BaseException {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	public NoContentException() {
		super(ExceptionType.NO_CONTENT);
	}
}
 No newline at end of file
+17 −0
Original line number Diff line number Diff line
package es.redmic.test.unit.exception.common;

import java.io.IOException;

import org.junit.Test;

import es.redmic.exception.common.ExceptionType;
import es.redmic.exception.common.NoContentException;

public class NoContentExceptionTest extends BaseExceptionTest {

	@Test
	public void checkPattern_IsEqualToMessage_WhenNoLocaleSet() throws IOException {

		checkMessage(new NoContentException(), ExceptionType.NO_CONTENT.toString(), null);
	}
}