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)
39
39
throw new ArgumentNullException ( nameof ( path ) , StringResources . Manager . GetString ( "VALUE_CANNOT_BE_NULL" ) ) ;
40
40
}
41
41
42
- if ( path . Length == 0 )
42
+ if ( string . IsNullOrWhiteSpace ( path ) )
43
43
{
44
44
throw CommonExceptions . PathIsNotOfALegalForm ( nameof ( path ) ) ;
45
45
}
Original file line number Diff line number Diff line change @@ -266,6 +266,16 @@ public void GetFullPath_EmptyValue_ShouldThrowArgumentException()
266
266
Assert . Throws < ArgumentException > ( action ) ;
267
267
}
268
268
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
+
269
279
[ Test ]
270
280
public void GetFullPath_WithMultipleDirectorySeparators_ShouldReturnTheNormalizedForm ( )
271
281
{
You can’t perform that action at this time.
0 commit comments