public void TestAddRoutingRecord() { RoutingRecord record = new RoutingRecord(); record.SetParameters("192.168.1.2", "255.255.255.0", "3.3.3.3", 12); router.AddRoutingRecord(record); Assert.AreEqual(((TestRoutingTable)routingTable).table.Count, 3); }
public void TestDelRoutingRecord() { RoutingRecord record = new RoutingRecord(); record.SetParameters("5.5.5.5", "255.0.0.0", "2.2.2.2", 7); router.DeleteRoutingRecord(record); Assert.AreEqual(((TestRoutingTable)routingTable).table.Count, 1); }
public void Load() { table = new List <RoutingRecord>(); RoutingRecord record = new RoutingRecord(); record.SetParameters("192.168.1.1", "255.255.255.0", "1.1.2.1", 6); table.Add(record); record = new RoutingRecord(); record.SetParameters("5.5.5.5", "255.0.0.0", "2.2.2.2", 7); table.Add(record); }