File tree Expand file tree Collapse file tree 2 files changed +11
-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 +11
-1
lines changed Original file line number Diff line number Diff line change @@ -39,7 +39,7 @@ public override string GetFullPath(string path)
3939 throw new ArgumentNullException ( nameof ( path ) , StringResources . Manager . GetString ( "VALUE_CANNOT_BE_NULL" ) ) ;
4040 }
4141
42- if ( path . Length == 0 )
42+ if ( string . IsNullOrWhiteSpace ( path ) )
4343 {
4444 throw CommonExceptions . PathIsNotOfALegalForm ( nameof ( path ) ) ;
4545 }
Original file line number Diff line number Diff line change @@ -266,6 +266,16 @@ public void GetFullPath_EmptyValue_ShouldThrowArgumentException()
266266 Assert . Throws < ArgumentException > ( action ) ;
267267 }
268268
269+ [ Test ]
270+ public void GetFullPath_WithWhiteSpace_ShouldThrowArgumentException ( )
271+ {
272+ var mockFileSystem = new MockFileSystem ( ) ;
273+
274+ TestDelegate action = ( ) => mockFileSystem . Path . GetFullPath ( " " ) ;
275+
276+ Assert . Throws < ArgumentException > ( action ) ;
277+ }
278+
269279 [ Test ]
270280 public void GetFullPath_WithMultipleDirectorySeparators_ShouldReturnTheNormalizedForm ( )
271281 {
You can’t perform that action at this time.
0 commit comments