public void GetVisitedVerticesList_NotSuportedCode_ThrowsNotSupportedCountryCodeException(string source, string destination) { IMapBuilderOutput mapBuilderOutput = new MockMapBuilderOutput(); BfsShortestPathFinder pathFinder = new BfsShortestPathFinder(mapBuilderOutput); Assert.Throws <NotSupportedCountryCodeException>(() => pathFinder.GetVisitedTerritoriesCodesList(source, destination)); }
public void GetVisitedVerticesList_AlwaysFindsShortestPath(string source, string destination, string[] expectedOutput) { IMapBuilderOutput mapBuilderOutput = new MockMapBuilderOutput(); BfsShortestPathFinder pathFinder = new BfsShortestPathFinder(mapBuilderOutput); string[] shortestPath = pathFinder.GetVisitedTerritoriesCodesList(source, destination).ToArray(); Assert.Equal(expectedOutput, shortestPath); }