Exemplo n.º 1
0
        public void ChangeOrderStatus_WhenCalled_ReturnsObjectResult(Order order, string status, IActionResult expectedObjectResult)
        {
            var controller = new OrdersController();
            var orders     = Orders.GetOrders();

            orders.Queue.Clear();
            orders.Queue.Add(order);
            controller.Orders = orders;

            var actual   = controller.ChangeOrderStatus(1, status);
            var expected = expectedObjectResult.GetType();

            Assert.IsInstanceOfType(actual, expected);
        }