File tree Expand file tree Collapse file tree
System.IO.Abstractions.TestingHelpers.Tests
System.IO.Abstractions.TestingHelpers Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -9,6 +9,17 @@ namespace System.IO.Abstractions.TestingHelpers.Tests
99 [ TestFixture ]
1010 public class MockFileInfoTests
1111 {
12+ [ Test ]
13+ public void MockFileInfo_NullPath_ThrowArgumentNullException ( )
14+ {
15+ var fileSystem = new MockFileSystem ( ) ;
16+
17+ TestDelegate action = ( ) => new MockFileInfo ( fileSystem , null ) ;
18+
19+ Assert . Throws < ArgumentNullException > ( action ) ;
20+
21+ }
22+
1223 [ Test ]
1324 public void MockFileInfo_Exists_ShouldReturnTrueIfFileExistsInMemoryFileSystem ( )
1425 {
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ public class MockFileInfo : FileInfoBase
1111 public MockFileInfo ( IMockFileDataAccessor mockFileSystem , string path )
1212 {
1313 this . mockFileSystem = mockFileSystem ?? throw new ArgumentNullException ( nameof ( mockFileSystem ) ) ;
14- this . path = path ;
14+ this . path = path ?? throw new ArgumentNullException ( nameof ( path ) ) ;
1515 }
1616
1717 MockFileData MockFileData
You can’t perform that action at this time.
0 commit comments