private List <Order> GetOrderActionFromIndex(int index) { switch (index) { case 0: return(ordersViewModel.GetAllOrders()); case 1: return(ordersViewModel.GetSubmittedOrders()); case 2: return(ordersViewModel.GetUnsubmittedOrders()); default: return(ordersViewModel.GetAllOrders()); } }
public void GetUnSubmittedOrders_ReturnsUnsubmittedOrders() { var ordersViewModel = new OrdersViewModel(); List <Order> orders = ordersViewModel.GetUnsubmittedOrders(); // Leave test if no results returned if (orders.Count < 1) { return; } string actual = orders[0].Status; string expected = "open"; Assert.AreEqual(expected, actual); }