public void ApiController_InternalServerError() { // Arrange var controller = new ConcreteApiController(); // Act var result = controller.InternalServerError(); // Assert Assert.Equal(StatusCodes.Status500InternalServerError, Assert.IsType <InternalServerErrorResult>(result).StatusCode); }
public void ApiController_InternalServerError_Exception() { // Arrange var controller = new ConcreteApiController(); var exception = new ArgumentException(); // Act var result = controller.InternalServerError(exception); // Assert var exceptionResult = Assert.IsType <ExceptionResult>(result); Assert.Same(exception, exceptionResult.Exception); }
public void ApiController_InternalServerError_Exception() { // Arrange var controller = new ConcreteApiController(); var exception = new ArgumentException(); // Act var result = controller.InternalServerError(exception); // Assert var exceptionResult = Assert.IsType<ExceptionResult>(result); Assert.Same(exception, exceptionResult.Exception); }
public void ApiController_InternalServerError() { // Arrange var controller = new ConcreteApiController(); // Act var result = controller.InternalServerError(); // Assert Assert.Equal(StatusCodes.Status500InternalServerError, Assert.IsType<InternalServerErrorResult>(result).StatusCode); }