Skip to content

Commit 45263ff

Browse files
authored
refactor: add test to ensure, that GetTempPath ends with a directory separator (#675)
Add test to ensure, that `GetTempPath` ends with a directory separator
1 parent cb6b669 commit 45263ff

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

Tests/Testably.Abstractions.Tests/FileSystem/Path/GetTempPathTests.cs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,16 @@ public void GetTempPath_MacOs_ShouldBeTmp()
2525
result.Should().Match("/var/folders/??/*/T/");
2626
}
2727

28+
[SkippableFact]
29+
public void GetTempPath_ShouldEndWithDirectorySeparator()
30+
{
31+
string directorySeparator = FileSystem.Path.DirectorySeparatorChar.ToString();
32+
33+
string result = FileSystem.Path.GetTempPath();
34+
35+
result.Should().EndWith(directorySeparator);
36+
}
37+
2838
[SkippableFact]
2939
public void GetTempPath_ShouldRemainTheSame()
3040
{

0 commit comments

Comments
 (0)