Skip to content

Commit

Permalink
checkstyle
Browse files Browse the repository at this point in the history
  • Loading branch information
DeclanClarkeCGI committed Sep 5, 2024
1 parent 4ca66a3 commit 910a802
Showing 1 changed file with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,10 @@ void testHandleInvalidDataAccessApiUsageException() {

@Test
void handleInvalidDataAccessResourceUsageException_ShouldReturnInternalServerError() {
InvalidDataAccessResourceUsageException exception = new InvalidDataAccessResourceUsageException("Invalid resource usage");
ResponseEntity<Map<String, String>> response = globalExceptionHandler.handleInvalidDataAccessResourceUsageException(exception);
InvalidDataAccessResourceUsageException exception =
new InvalidDataAccessResourceUsageException("Invalid resource usage");
ResponseEntity<Map<String, String>> response = globalExceptionHandler
.handleInvalidDataAccessResourceUsageException(exception);

assertEquals(HttpStatus.INTERNAL_SERVER_ERROR, response.getStatusCode());
assertEquals("Invalid resource usage", response.getBody().get("error"));
Expand Down Expand Up @@ -191,7 +193,8 @@ void testHandlePsqlException_serviceUnavailable() {

@Test
void handlePsqlException_WithOtherCause_ShouldReturnInternalServerError() {
PSQLException exception = new PSQLException("PSQL Exception", PSQLState.UNEXPECTED_ERROR, new Throwable("Unexpected error"));
PSQLException exception = new PSQLException("PSQL Exception", PSQLState.UNEXPECTED_ERROR,
new Throwable("Unexpected error"));
ResponseEntity<Map<String, String>> response = globalExceptionHandler.handlePsqlException(exception);

assertEquals(HttpStatus.INTERNAL_SERVER_ERROR, response.getStatusCode());
Expand Down

0 comments on commit 910a802

Please sign in to comment.