Skip to content

Commit

Permalink
Order results of dir enumeration tests
Browse files Browse the repository at this point in the history
  • Loading branch information
carlossanlop committed May 29, 2023
1 parent 660cf87 commit 42097ce
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -329,8 +329,8 @@ public static void DirsEqual(string actual, string expected)

public static void DirFileNamesEqual(string actual, string expected)
{
IEnumerable<string> actualEntries = Directory.EnumerateFileSystemEntries(actual, "*", SearchOption.AllDirectories);
IEnumerable<string> expectedEntries = Directory.EnumerateFileSystemEntries(expected, "*", SearchOption.AllDirectories);
IOrderedEnumerable<string> actualEntries = Directory.EnumerateFileSystemEntries(actual, "*", SearchOption.AllDirectories).Order();
IOrderedEnumerable<string> expectedEntries = Directory.EnumerateFileSystemEntries(expected, "*", SearchOption.AllDirectories).Order();
AssertExtensions.SequenceEqual(expectedEntries.Select(Path.GetFileName).ToArray(), actualEntries.Select(Path.GetFileName).ToArray());
}

Expand Down

0 comments on commit 42097ce

Please sign in to comment.