public void CircularReferenceIfInstancesProvided() { var container = new Container(); var c3 = new Circular3(null); var c2 = new Circular2(c3); var c1 = new Circular1(c2); container.AddInstance(c1); container.AddInstance(c2); container.AddInstance(c3); Assert.Same(c1, container.Resolve <Circular1>()); Assert.Same(c2, container.Resolve <Circular2>()); Assert.Same(c3, container.Resolve <Circular3>()); }
public Circular1(Circular2 c2) { }