jcansdale / TestDriven.Net-Issues

Issue tracking for TestDriven.Net
https://github.com/jcansdale/TestDriven.Net-Issues/issues
24 stars 2 forks source link

Include local exports when targeting a MEF component #138

Closed jcansdale closed 5 years ago

jcansdale commented 5 years ago

When running ad-hoc tests on a VS SDK MEF component, make it so that locally defined MEF components are visible to the ImportingConstructor of the target component.

For example, executing the Go method below using Test With > In-Proc (VS SDK) should output the ExportedComponent:

    [Export]
    public class ComponentWithImport
    {
        ExportedComponent component;

        [ImportingConstructor]
        public Foo(ExportedComponent component)
        {
            this.component = component;
        }

        public void Go()
        {
            Console.WriteLine(component);
        }
    }

    [Export]
    public class ExportedComponent
    {
    }
jcansdale commented 5 years ago

Dupe of #132