use of gov.cms.qpp.conversion.api.exceptions.InvalidFileTypeException in project qpp-conversion-tool by CMSgov.
the class ExceptionHandlerControllerV1Test method testInvalidFileTypeExceptionStatusCode.
@Test
void testInvalidFileTypeExceptionStatusCode() {
InvalidFileTypeException exception = new InvalidFileTypeException(CpcFileServiceImpl.FILE_NOT_FOUND);
ResponseEntity<String> responseEntity = objectUnderTest.handleInvalidFileTypeException(exception);
assertWithMessage("The response entity's status code must be 422.").that(responseEntity.getStatusCode()).isEquivalentAccordingToCompareTo(HttpStatus.NOT_FOUND);
}
use of gov.cms.qpp.conversion.api.exceptions.InvalidFileTypeException in project qpp-conversion-tool by CMSgov.
the class ExceptionHandlerControllerV1Test method testInvalidFileTypeExceptionBody.
@Test
void testInvalidFileTypeExceptionBody() {
InvalidFileTypeException exception = new InvalidFileTypeException(CpcFileServiceImpl.FILE_NOT_FOUND);
ResponseEntity<String> responseEntity = objectUnderTest.handleInvalidFileTypeException(exception);
assertThat(responseEntity.getBody()).isEqualTo(CpcFileServiceImpl.FILE_NOT_FOUND);
}
Aggregations