public void TestWithHeuristics()
        {
            var tuple   = graphWithHeuristics;
            var search  = new DijkstrasAlgorithmWithHeuristics();
            var results = search.SearchForShortestPath(tuple.Item1, tuple.Item2);

            Assert.AreEqual(5, results.Count);
        }
        public void TestWithEmptyGraph()
        {
            var emptyGraph      = new Graph();
            var search          = new DijkstrasAlgorithmWithHeuristics();
            var someStartVertex = new Vertex("Z", 0, null, true);
            var results         = search.SearchForShortestPath(emptyGraph, someStartVertex);

            Assert.AreEqual(1, results.Count);
        }
 public void WrongStartVertexHeuristicGraph()
 {
     var tupleWithHeuristics = graphWithHeuristics;
     var goodVertex          = new Vertex("Z", 0, null, true);
     var badVertex           = new Vertex("OMEGALUL", 12, new List <Edge>()
     {
         new Edge(12, goodVertex)
     });
     var search  = new DijkstrasAlgorithmWithHeuristics();
     var results = search.SearchForShortestPath(tupleWithHeuristics.Item1, badVertex);
 }
        public void CheckOrderWithoutHeuristicTest()
        {
            var tuple   = graphWithoutHeuristics;
            var search  = new DijkstrasAlgorithmWithHeuristics();
            var results = search.SearchForShortestPath(tuple.Item1, tuple.Item2);

            Assert.AreEqual(3, results.Count);

            Assert.AreEqual("E", results[0].Name);
            Assert.AreEqual("G", results[1].Name);
            Assert.AreEqual("Z", results[2].Name);
        }
 public void NullStartNodeHeuristicGraph()
 {
     var tupleWithHeuristics = graphWithHeuristics;
     var search  = new DijkstrasAlgorithmWithHeuristics();
     var results = search.SearchForShortestPath(tupleWithHeuristics.Item1, null);
 }