File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
src/TestableIO.System.IO.Abstractions.TestingHelpers
tests/TestableIO.System.IO.Abstractions.TestingHelpers.Tests Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -118,8 +118,8 @@ public override IDirectoryInfo CreateTempSubdirectory(string prefix = null)
118118 // Perform directory name generation in a loop, just in case the randomly generated name already exists.
119119 do
120120 {
121- var randomDir = $ "{ prefix } { Path . GetRandomFileName ( ) } ";
122- potentialTempDirectory = Path . Combine ( Path . GetTempPath ( ) , randomDir ) ;
121+ var randomDir = $ "{ prefix } { FileSystem . Path . GetRandomFileName ( ) } ";
122+ potentialTempDirectory = Path . Combine ( FileSystem . Path . GetTempPath ( ) , randomDir ) ;
123123 } while ( Exists ( potentialTempDirectory ) ) ;
124124
125125 return CreateDirectoryInternal ( potentialTempDirectory ) ;
Original file line number Diff line number Diff line change @@ -862,7 +862,7 @@ public void MockDirectory_CreateTempSubdirectory_ShouldCreateSubdirectoryInTempD
862862
863863 // Assert
864864 Assert . That ( fileSystem . Directory . Exists ( result . FullName ) , Is . True ) ;
865- Assert . That ( result . FullName . Contains ( Path . GetTempPath ( ) ) , Is . True ) ;
865+ Assert . That ( result . FullName , Does . StartWith ( fileSystem . Path . GetTempPath ( ) ) ) ;
866866 }
867867
868868 [ Test ]
@@ -877,7 +877,7 @@ public void MockDirectory_CreateTempSubdirectoryWithPrefix_ShouldCreateDirectory
877877 // Assert
878878 Assert . That ( fileSystem . Directory . Exists ( result . FullName ) , Is . True ) ;
879879 Assert . That ( Path . GetFileName ( result . FullName ) . StartsWith ( "foo-" ) , Is . True ) ;
880- Assert . That ( result . FullName . Contains ( Path . GetTempPath ( ) ) , Is . True ) ;
880+ Assert . That ( result . FullName . Contains ( fileSystem . Path . GetTempPath ( ) ) , Is . True ) ;
881881 }
882882#endif
883883
You can’t perform that action at this time.
0 commit comments