Example #1
0
        public void DoesNotAllowConstructorCircularDependency()
        {
            Container container = new Container();

            // Transient & Singleton binding...
            container.Bind <ISomeTypeThree>().To <SomeTypeThree>();
            container.Bind <ISomeTypeFour>().To <SomeTypeFour>();

            // Resolve three... should be injected, but not crash due to circular dependency
            ISomeTypeThree three = container.Resolve <ISomeTypeThree>();

            Assert.IsNotNull(three);

            container = null;
        }
Example #2
0
 SomeTypeFour(ISomeTypeThree three)
 {
 }