Ejemplo n.º 1
0
 public TestClass7(TestClass6 t)
 {
     this.t = t;
 }
Ejemplo n.º 2
0
        public void Should_resolve_cycle_if_instance_is_supplied()
        {
            IContainer c = new Container();
            TestClass6 cls = new TestClass6(new TestClass7());
            c.RegisterInstance<TestClass6>(cls);
            c.RegisterType<TestClass7>(false);

            var result = c.Resolve<TestClass7>();

            Assert.IsInstanceOf<TestClass7>(result);
            Assert.AreSame(cls, result.t);
        }