We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 377312f commit 02b74d1Copy full SHA for 02b74d1
tests/TestableIO.System.IO.Abstractions.TestingHelpers.Tests/MockDirectoryInfoTests.cs
@@ -721,4 +721,18 @@ public async Task MockDirectoryInfo_LastWriteTimeUtc_SetterShouldThrowDirectoryN
721
await That(() => directoryInfo.LastWriteTime = newTime).Throws<DirectoryNotFoundException>();
722
}
723
724
+ [Test]
725
+ public async Task MockDirectoryInfo_Exists_ShouldReturnTrue_IfArgIsFrontSlashAndRootDirExists()
726
+ {
727
+ string testDir = XFS.Path(@"c:\foo\bar\");
728
+ var fileSystem = new MockFileSystem(new Dictionary<string, MockFileData>
729
730
+ { testDir, new MockDirectoryData() }
731
+ });
732
+
733
+ var dirInfo = fileSystem.DirectoryInfo.New("/");
734
735
+ await That(dirInfo.Exists).IsEqualTo(true);
736
+ }
737
738
0 commit comments