-
Notifications
You must be signed in to change notification settings - Fork 266
Open
Labels
area: testinghelpersIssues that address the testing helpersIssues that address the testing helpersstate: waiting for feedbackIssues that are waiting for feedbackIssues that are waiting for feedbacktype: bugIssues that describe misbehaving functionalityIssues that describe misbehaving functionality
Description
Given a project named "Test" with a "Files" folder within it, and within that folder there are 5 files included as embeddedResources, when I call the given code, it always throw an exception:
System.ArgumentException: 'Value cannot be null. (Parameter 'key')'
at System.ThrowHelper.ThrowArgumentNullException(ExceptionArgument argument)
at System.Collections.Generic.Dictionary`2.FindValue(TKey key)
at System.Collections.Generic.Dictionary`2.TryGetValue(TKey key, TValue& value)
at System.IO.Abstractions.TestingHelpers.MockFileSystem.DirectoryExistsWithoutFixingPath(String path)
at System.IO.Abstractions.TestingHelpers.MockFileSystem.AddFile(String path, MockFileData mockFile)
at System.IO.Abstractions.TestingHelpers.MockFileSystem.AddFilesFromEmbeddedNamespace(String path, Assembly resourceAssembly, String embeddedRresourcePath)
This is how I'm calling the code
MockFileSystem fileSystem = new();
fileSystem.AddFilesFromEmbeddedNamespace(@"\\Test.Files", typeof(MyClass).Assembly, "Test.Files" );
Metadata
Metadata
Assignees
Labels
area: testinghelpersIssues that address the testing helpersIssues that address the testing helpersstate: waiting for feedbackIssues that are waiting for feedbackIssues that are waiting for feedbacktype: bugIssues that describe misbehaving functionalityIssues that describe misbehaving functionality