PAN-46 Wrote unit tests for the ExceptionHandlingController

This commit is contained in:
2019-04-07 21:56:23 -06:00
parent c5727c8d1a
commit 93774e7e11
@@ -0,0 +1,54 @@
package edu.msudenver.tsp.persistence.controller;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.Mock;
import org.mockito.runners.MockitoJUnitRunner;
import static org.mockito.Matchers.any;
@RunWith(MockitoJUnitRunner.class)
public class ExceptionHandlingControllerTest {
@Mock
ExceptionHandlingController exceptionHandlingController;
@Test
public void testHandleMessageNotReadableException() {
exceptionHandlingController.handleMessageNotReadableException(any(), any());
}
@Test
public void testHandleMessageInvalidRequestException() {
exceptionHandlingController.handleMessageInvalidRequest(any(), any());
}
@Test
public void testHandleHttpRequestMethodNotSupportedException() {
exceptionHandlingController.handleHttpRequestMethodNotSupported(any());
}
@Test
public void testHandleHttpMediaTypeNotSupportedException() {
exceptionHandlingController.handleHttpMediaTypeNotSupportedException(any(), any());
}
@Test
public void testHandleException() {
exceptionHandlingController.handleException(any(), any());
}
@Test
public void testHandleMethodArgumentNotValidException() {
exceptionHandlingController.handleMethodArgumentNotValidException(any());
}
@Test
public void testHandleBadRequestException() {
exceptionHandlingController.handleBadRequestException(any());
}
@Test
public void testHandleUnprocessableEntityException() {
exceptionHandlingController.handleUnprocessableEntityException(any());
}
}