use of ca.corefacility.bioinformatics.irida.web.controller.api.exception.ErrorResponse in project irida by phac-nml.
the class ControllerExceptionHandlerTest method testHandleOtherExceptions.
@Test
public void testHandleOtherExceptions() {
ResponseEntity<ErrorResponse> response = controller.handleAllOtherExceptions(new Exception("exception"));
assertEquals(HttpStatus.INTERNAL_SERVER_ERROR, response.getStatusCode());
}
use of ca.corefacility.bioinformatics.irida.web.controller.api.exception.ErrorResponse in project irida by phac-nml.
the class ControllerExceptionHandlerTest method testHandleExistsException.
@Test
public void testHandleExistsException() {
ResponseEntity<ErrorResponse> response = controller.handleExistsException(new EntityExistsException("exists"));
assertEquals(HttpStatus.CONFLICT, response.getStatusCode());
}
use of ca.corefacility.bioinformatics.irida.web.controller.api.exception.ErrorResponse in project irida by phac-nml.
the class ControllerExceptionHandlerTest method testHandleInvalidPropertyException.
@Test
public void testHandleInvalidPropertyException() {
ResponseEntity<ErrorResponse> response = controller.handleInvalidPropertyException(new InvalidPropertyException("invalid property"));
assertEquals(HttpStatus.BAD_REQUEST, response.getStatusCode());
}
use of ca.corefacility.bioinformatics.irida.web.controller.api.exception.ErrorResponse in project irida by phac-nml.
the class ControllerExceptionHandlerTest method testHandleNotFoundException.
@Test
public void testHandleNotFoundException() {
ResponseEntity<ErrorResponse> response = controller.handleNotFoundException(new EntityNotFoundException("not found"));
assertEquals(HttpStatus.NOT_FOUND, response.getStatusCode());
}
Aggregations