Skip to content

Commit a049751

Browse files
committed
test(FileSystem.Exists): Add front slash test
1 parent 02b74d1 commit a049751

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

tests/TestableIO.System.IO.Abstractions.Wrappers.Tests/DirectoryWrapperTests.cs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,4 +47,17 @@ public async Task GetParent_ForSimpleFilePath_ShouldReturnSubfolder()
4747
// Assert
4848
await That(result.FullName).IsEqualTo(subfolder);
4949
}
50+
51+
[Test]
52+
public async Task Exists_RootDirectoryFrontSlash_ShouldBeTrue()
53+
{
54+
// Arrange
55+
var wrapperFilesystem = new FileSystem();
56+
57+
// Act
58+
var result = wrapperFilesystem.Directory.Exists("/");
59+
60+
// Assert
61+
await That(result).IsTrue();
62+
}
5063
}

0 commit comments

Comments
 (0)