public void ShortestPathWithFeature() { createContext(); var start = nodes[0]; var end = nodes[3]; var features = new FeatureType[] { ftypes[1] }; var shortestPath = new List<GraphObject>() { nodes[0], arcs[0], nodes[1], arcs[6], nodes[5], arcs[7], nodes[3] }; var pathFinder = new AStarPathFinder(); var path = pathFinder.FindPath(start, end, features); assertPathsEqual(shortestPath, path); }
public void SimpleShortestPath() { createContext(); var start = nodes[0]; var end = nodes[3]; var features = new FeatureType[0]; var shortestPath = new List<GraphObject>() { nodes[0], arcs[1], nodes[2], arcs[5], nodes[3] }; var pathFinder = new AStarPathFinder(); var path = pathFinder.FindPath(start, end, new List<FeatureType>()); assertPathsEqual(shortestPath, path); }