public void performTimeEventTest() { testList.Add(0); testNode = new Node(1, 1, 2, 2, testList); testNode.insertCustomer(); testNode.insertCustomer(); testNode.performTimeEvent(); testNode.performTimeEvent(); Assert.AreEqual(1, testNode.getNumberOfCheckouts()); }
public void insertCustomerTest() { testList.Add(0); testNode = new Node(1, 1, 2, 2, testList); Assert.AreEqual(0, testNode.customerCount); testNode.insertCustomer(); Assert.AreEqual(1, testNode.customerCount); testNode.insertCustomer(); testNode.insertCustomer(); Assert.AreEqual(3, testNode.customerCount); testNode.insertCustomer(); Assert.AreEqual(3, testNode.customerCount); }
private void BT_Run_Click(object sender, RoutedEventArgs e) { nodes = new List<Node>(); foreach (var model in (App.Current as App).displaymodelList) { Node node = new Node(model.id, model.serviceChannelsNumber, model.queueMaxSize, model.checkoutTime, StringToIntList(model.systems)); nodes.Add(node); } (App.Current as App).network = new Network(nodes); (App.Current as App).network.alpha = Convert.ToSingle(alpha); (App.Current as App).network.gamma = Convert.ToSingle(gamma); (App.Current as App).percentage = percentLocal; Window1 win1 = new Window1(); win1.Show(); }