-
Notifications
You must be signed in to change notification settings - Fork 263
MockFileSystem does not support Root directories #702
Copy link
Copy link
Closed
Labels
area: testinghelpersIssues that address the testing helpersIssues that address the testing helpersstate: ready to pickIssues that are ready for being worked onIssues that are ready for being worked onstate: releasedIssues that are releasedIssues that are releasedtype: bugIssues that describe misbehaving functionalityIssues that describe misbehaving functionality
Description
Describe the bug
Including a Root drive/directory in a MockFileSystem causes ArgumentNullException at line 82 of MockFileSystem.cs
To Reproduce
To recreate, execute the following line of code:
var fileSystem = new MockFileSystem(new Dictionary<string, MockFileData>
{
{ @"c:\demo", new MockDirectoryData() },
{ @"z:\", new MockDirectoryData() },
{ @"Z:\foo", new MockDirectoryData() }
});Expected behavior
"Z:" should be a valid directory.
Additional context
var fileSystem = new MockFileSystem(new Dictionary<string, MockFileData>
{
{ @"c:\demo", new MockDirectoryData() },
//{ @"z:\", new MockDirectoryData() },
{ @"Z:\foo", new MockDirectoryData() }
}); //This produces no exception
var fileSystem = new MockFileSystem(new Dictionary<string, MockFileData>
{
{ @"c:\demo", new MockDirectoryData() },
//{ @"z:\", new MockDirectoryData() },
{ @"Z:\foo", new MockDirectoryData() }
}); //This produces an exception.Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
area: testinghelpersIssues that address the testing helpersIssues that address the testing helpersstate: ready to pickIssues that are ready for being worked onIssues that are ready for being worked onstate: releasedIssues that are releasedIssues that are releasedtype: bugIssues that describe misbehaving functionalityIssues that describe misbehaving functionality