File tree 2 files changed +4
-4
lines changed
src/TestableIO.System.IO.Abstractions.TestingHelpers
tests/TestableIO.System.IO.Abstractions.TestingHelpers.Tests
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)
118
118
// Perform directory name generation in a loop, just in case the randomly generated name already exists.
119
119
do
120
120
{
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 ) ;
123
123
} while ( Exists ( potentialTempDirectory ) ) ;
124
124
125
125
return CreateDirectoryInternal ( potentialTempDirectory ) ;
Original file line number Diff line number Diff line change @@ -862,7 +862,7 @@ public void MockDirectory_CreateTempSubdirectory_ShouldCreateSubdirectoryInTempD
862
862
863
863
// Assert
864
864
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 ( ) ) ) ;
866
866
}
867
867
868
868
[ Test ]
@@ -877,7 +877,7 @@ public void MockDirectory_CreateTempSubdirectoryWithPrefix_ShouldCreateDirectory
877
877
// Assert
878
878
Assert . That ( fileSystem . Directory . Exists ( result . FullName ) , Is . True ) ;
879
879
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 ) ;
881
881
}
882
882
#endif
883
883
You can’t perform that action at this time.
0 commit comments