Does anybody know what's missing to make this test work? It's a pitty that it doesn't work out of the box.
class A { }
class B { public B(A a) { } }
class C { public C(B b) { } }
[Test]
public void SuperFactoryResolutionTest()
{
var builder = new ContainerBuilder();
builder.RegisterType<B>();
builder.RegisterType<C>();
using (var container = builder.Build())
{
Assert.DoesNotThrow(() =>
{
var factory = container.Resolve<Func<A, C>>();
var x = factory(new A());
});
}
}