Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ namespace System.IO.Abstractions.TestingHelpers
public class MockFileSystem : FileSystemBase, IMockFileDataAccessor
{
private const string DEFAULT_CURRENT_DIRECTORY = @"C:\";
private const string TEMP_DIRECTORY = @"C:\temp";
private const string TEMP_DIRECTORY = @"C:\temp\";

private readonly IDictionary<string, FileSystemEntry> files;
private readonly IDictionary<string, MockDriveData> drives;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -382,6 +382,20 @@ public void GetTempPath_Called_ReturnsStringLengthGreaterThanZero()
Assert.That(result.Length > 0, Is.True);
}

[Test]
public void GetTempPath_ShouldEndWithDirectorySeparator()
{
//Arrange
var mockPath = new MockFileSystem().Path;
var directorySeparator = mockPath.DirectorySeparatorChar.ToString();

//Act
var result = mockPath.GetTempPath();

//Assert
Assert.That(result, Does.EndWith(directorySeparator));
}

[Test]
[TestCase(null)]
[TestCase("")]
Expand Down
Loading