public void FileNameComparer_Equals_ReturnsTrueForEqualFiles() { var comparer = new FileNameComparer(); Assert.True(comparer.Equals(@"aa.txt", @"aa.txt")); Assert.True(comparer.Equals(@"./aa.txt", @"./aa/../aa.txt")); // Path.GetFullPath can properly normalize path on linux only if it contains forward slashes. On Windows, any slashes work fine. }
public void FileNameComparer_Equals_ReturnsTrueForEqualFiles() { var comparer = new FileNameComparer(); Assert.IsTrue(comparer.Equals(@"aa.txt", @"aa.txt")); Assert.IsTrue(comparer.Equals(@".\aa.txt", @".\aa\..\aa.txt")); }
public void FileNameComparer_Equals_ReturnsTrueIfBothEmpty() { var comparer = new FileNameComparer(); Assert.True(comparer.Equals("", "")); Assert.True(comparer.Equals(" ", "")); Assert.True(comparer.Equals("", " ")); Assert.True(comparer.Equals(null, "")); Assert.True(comparer.Equals("", null)); Assert.False(comparer.Equals("", "something")); Assert.False(comparer.Equals("something", "")); }
public void FileNameComparer_Equals_IsCaseInsensitive() { var comparer = new FileNameComparer(); Assert.True(comparer.Equals(@"aa.txt", @"AA.txt")); }