public async Task InternalServerErrorResult_SetsStatusCode() { // Arrange var context = new ActionContext(GetHttpContext(), new RouteData(), new ActionDescriptor()); var result = new InternalServerErrorResult(); // Act await result.ExecuteResultAsync(context); // Assert Assert.Equal(StatusCodes.Status500InternalServerError, context.HttpContext.Response.StatusCode); }
public async Task InternalServerErrorResult_SetsStatusCode() { // Arrange var context = new ActionContext(new DefaultHttpContext(), new RouteData(), new ActionDescriptor()); var result = new InternalServerErrorResult(); // Act await result.ExecuteResultAsync(context); // Assert Assert.Equal(StatusCodes.Status500InternalServerError, context.HttpContext.Response.StatusCode); }