public async Task FindPathsBetweenMethods_FindsAllPaths(IAssemblyGraphAnalyzer graphAnalyzer, Method start, Method end, IList <CodePath> expectedList) { // arrange var sut = new DepthFirstCodePathFinder(graphAnalyzer); var cts = new CancellationTokenSource(); // act var actualList = await sut.FindPathsBetweenMethods(start, end, cts.Token); // assert Assert.Equal(expectedList.Count, actualList.Count); foreach (var path in actualList) { expectedList.Remove(path); } Assert.Empty(expectedList); }
/// <summary> /// Initializes a new instance of the <see cref="DepthFirstCodePathFinder" /> class /// </summary> /// <param name="analyzer">The assembly analyzer to use</param> /// <param name="numThreads">the number of search threads</param> public DepthFirstCodePathFinder(IAssemblyGraphAnalyzer analyzer) { this.analyzer = analyzer; }