public void OrderController_ListAll_ReturnsStatusOkAndList() { IOrderManager orderManager = new OrderManager(); OrderAPI _controller = new OrderAPI(orderManager); IActionResult _response = _controller.ListAllOrders(); OkObjectResult _okObject = _response as OkObjectResult; List <Order> _results = _okObject.Value as List <Order>; Assert.NotNull(_response); Assert.Equal((int)HttpStatusCode.OK, _okObject.StatusCode); Assert.Equal(4, _results.Count); }