public void Graph1_BellmanFord()
        {
            var graph       = GraphGenerator.Graph1();
            var bellmanFord = new BellmanFord(graph);
            var result      = bellmanFord.Work(false);

            int[] excected = { 0, 1 };
            Assert.AreEqual(true, ArrayComparer.Compare(excected, result));
        }
Esempio n. 2
0
        public void Graph1_Dijkstra()
        {
            var graph    = GraphGenerator.Graph1();
            var dijkstra = new Dijkstra(graph);
            var result   = dijkstra.Work(false);

            int[] excected = { 0, 1 };
            Assert.AreEqual(true, ArrayComparer.Compare(excected, result));
        }