Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure all expected paths are logged on test failure #65666

Merged
merged 3 commits into from
Feb 22, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Apply suggestions from code review
Co-authored-by: Stephen Toub <stoub@microsoft.com>
  • Loading branch information
adamsitnik and stephentoub committed Feb 22, 2022
commit 3a9ecaf60b5244cf213f71df1d3bbfa03759a05c
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ private static void VerifyExpectedPaths(string[] expectedPaths, FileSystemEventA
if (expectedPaths is not null && !expectedPaths.Contains(fullPath))
{
// Assert.Contains does not print a full content of collection which makes it hard to diagnose issues like #65601
throw new XunitException($"Expected path(s): {Environment.NewLine}"
throw new XunitException($"Expected path(s):{Environment.NewLine}"
+ string.Join(Environment.NewLine, expectedPaths)
+ $"{Environment.NewLine}Actual path: {fullPath}");
}
Expand Down