public void TopologicalSort_Test() { var G = new Digraph(4); G.AddEdge(3, 2); G.AddEdge(3, 1); G.AddEdge(1, 0); G.AddEdge(2, 0); var DFO = new TopologicalSort(G); var actual = new List <int>(DFO.GetTopologicalySorted()); Assert.AreEqual(3, actual[0]); Assert.AreEqual(0, actual[3]); }