public void TestMayInjectMembersEvenIfConstructorLoops() { var injector = new Injector(); injector.Register(Binding.For <LoopingConstructorOnly> ()); bool caughtEx = false; try { injector.Resolve <LoopingConstructorOnly>(); } catch (InjectorException) { caughtEx = true; } Assert.IsTrue(caughtEx); var val = new LoopingConstructorOnly(); injector.InjectMembers(val); Assert.IsNotNull(val.MCls); }
public LoopingConstructorOnly(LoopingConstructorOnly c) { }