protected void VerifyFilePathsCollection(IEnumerable <string> actualFiles, params string[] expectFiles) { var expectFilesInFullpath = expectFiles.Select(relativePath => Path.GetFullPath(Path.Combine(_context.RootPath, relativePath))); var actualFilesInFullpath = actualFiles.Select(filePath => Path.GetFullPath(filePath)); AssertHelpers.SortAndEqual(expectFilesInFullpath, actualFilesInFullpath, StringComparer.InvariantCultureIgnoreCase); }
private void ExecuteAndVerify(Matcher matcher, string directoryPath, params string[] expectFiles) { directoryPath = Path.Combine(_context.RootPath, directoryPath); var results = matcher.Execute(new DirectoryInfoWrapper(new DirectoryInfo(directoryPath))); var actual = results.Files.Select(relativePath => Path.GetFullPath(Path.Combine(_context.RootPath, directoryPath, relativePath))); var expect = expectFiles.Select(relativePath => Path.GetFullPath(Path.Combine(_context.RootPath, relativePath))); AssertHelpers.SortAndEqual(expect, actual, StringComparer.OrdinalIgnoreCase); }