public bool FileNameMatch(string otherFileName) { return !string.IsNullOrEmpty(otherFileName) && Path.GetFullPath(otherFileName).Equals(Path.GetFullPath(this.FileName), StringComparison.InvariantCultureIgnoreCase); }
public void FileNameMatch() { var file = new FileWithPosition(@"C:\Progra~1\someprogram\somelog.txt"); Assert.That(file.FileNameMatch(@"C:\Program Files\someprogram\somelog.txt")); }