static void Main(string[] args) { Network net = new Network("..\\..\\..\\test.txt", RandNext); net.Show(); net.Step(); net.Step(); net.Step(); net.Show(); Console.ReadKey(); }
public void TestStep() { Network net = new Network("..\\..\\..\\test.txt", RandNext); net.Step(); net.Step(); net.Step(); foreach (var x in net.ListOfComputers) { if (x.Virus) Console.Write("true "); else Console.Write("false "); } Assert.AreEqual(net.ListOfComputers[0].Virus, true); Assert.AreEqual(net.ListOfComputers[1].Virus, false); Assert.AreEqual(net.ListOfComputers[2].Virus, true); Assert.AreEqual(net.ListOfComputers[3].Virus, true); Assert.AreEqual(net.ListOfComputers[4].Virus, true); }