File tree Expand file tree Collapse file tree 2 files changed +15
-1
lines changed
src/TestableIO.System.IO.Abstractions.TestingHelpers
tests/TestableIO.System.IO.Abstractions.TestingHelpers.Tests Expand file tree Collapse file tree 2 files changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ namespace System.IO.Abstractions.TestingHelpers
1414 public class MockFileSystem : FileSystemBase , IMockFileDataAccessor
1515 {
1616 private const string DEFAULT_CURRENT_DIRECTORY = @"C:\" ;
17- private const string TEMP_DIRECTORY = @"C:\temp" ;
17+ private const string TEMP_DIRECTORY = @"C:\temp\ " ;
1818
1919 private readonly IDictionary < string , FileSystemEntry > files ;
2020 private readonly IDictionary < string , MockDriveData > drives ;
Original file line number Diff line number Diff line change @@ -382,6 +382,20 @@ public void GetTempPath_Called_ReturnsStringLengthGreaterThanZero()
382382 Assert . That ( result . Length > 0 , Is . True ) ;
383383 }
384384
385+ [ Test ]
386+ public void GetTempPath_ShouldEndWithDirectorySeparator ( )
387+ {
388+ //Arrange
389+ var mockPath = new MockFileSystem ( ) . Path ;
390+ var directorySeparator = mockPath . DirectorySeparatorChar . ToString ( ) ;
391+
392+ //Act
393+ var result = mockPath . GetTempPath ( ) ;
394+
395+ //Assert
396+ Assert . That ( result , Does . EndWith ( directorySeparator ) ) ;
397+ }
398+
385399 [ Test ]
386400 [ TestCase ( null ) ]
387401 [ TestCase ( "" ) ]
You can’t perform that action at this time.
0 commit comments