public void AddOrder_ContainsOrder() { var order = new Order("Darren", "0000000000", 6, 12); _port.AddOrder(order); Assert.Equal(1, _port.OrderListSize); }
/// <summary> /// Adds a new order at a random location /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void btnAddOrder_Click(object sender, RoutedEventArgs e) { _temp_number++; var clientName = $"Client_{_temp_number}"; var clientNumber = $"{_temp_number}{_temp_number}{_temp_number}{_temp_number}{_temp_number}{_temp_number}{_temp_number}"; var order = new Order(clientName, clientNumber, _random.Next(0, _mainWindowViewModel.GridWidth), _random.Next(0, _mainWindowViewModel.GridHeight)); _port.AddOrder(order); }
public void CompleteOrder_SetsOrderStatusCompleted_AfterQuery() { IOrder order = new Order("Darren", "00000000", 23, 56); IPort port = new Port("Management Port", _gridMap, 0, 0); var orderId = port.AddOrder(order); port.CompleteOrder(orderId); Assert.Equal(OrderStatus.Completed, order.Status); IOrder foundOrder = port.GetOrderById(orderId); Assert.Equal(OrderStatus.Completed, foundOrder.Status); }