private void TestProgrammaticallyGeneratedGraph( int numberOfVertices, int numberOfPathsToFind ) { IList <Edge> edgesForBigGraph = CreateEdgesForBigGraph(numberOfVertices); Vertex startVertex = edgesForBigGraph[0].StartVertex; Vertex endVertex = edgesForBigGraph[edgesForBigGraph.Count - 1].EndVertex; IList <PathFinderFactory> pathFinderFactories = PathFinderFactories.CreatePathFinderFactories(); GraphShortestPathAssertionHelper graphShortestPathAssertionHelper = new GraphShortestPathAssertionHelper(isExecutingThroughTheMainMethod); graphShortestPathAssertionHelper.TestResultsWithImplementationsAgainstEachOther(edgesForBigGraph, startVertex, endVertex, numberOfPathsToFind, pathFinderFactories); }
public void SetUp() { edgeUtility = EdgeUtility <Edge, Vertex, Weight> .Create <Edge, Vertex, Weight>(); //fileReaderForGraphTestData = FileReaderForGraphEdges<Edge, Vertex, Weight>.CreateFileReaderForGraphEdges(new EdgeFactoryDefault()); graphShortestPathAssertionHelper = new GraphShortestPathAssertionHelper(false); xmlFileReader = new XmlFileReader(); resourceReader = new ResourceReader(); edgeParser = EdgeParser <Edge, Vertex, Weight> .CreateEdgeParserDefault(); pathFinderFactoriesForAllImplementations = PathFinderFactories.CreatePathFinderFactories(); pathFinderFactories = new List <PathFinderFactory>(); // set to empty here before each test, so add to the list if it needs to be used pathsToResourcesFoldersWithXmlTestFiles = new List <string> { DIRECTORY_FOR_XML_TEST_FILES_FROM_BSMOCK, DIRECTORY_FOR_XML_TEST_FILES_FROM_YANQI, BASE_DIRECTORY_FOR_XML_TEST_FILES // yes the base directory itself also currently has some xml test files }; graphShortestPathAssertionHelper.SetConsoleOutputDesired(ConsoleOutputDesired.NONE); }