public void InjectProperties_RecursiveDependency_ThrowsException()
        {
            var container = CreateContainer();

            container.Register <IFoo, FooWithRecursiveDependency>();

            var barWithPropertyDependency = new BarWithPropertyDependency();

            ExceptionAssert.Throws <InvalidOperationException>(
                () => container.InjectProperties(barWithPropertyDependency), ErrorMessages.RecursivePropertyDependency);
        }
        public void InjectProperties_RecursiveDependency_ThrowsException()
        {
            var container = CreateContainer();
            container.Register<IFoo, FooWithRecursiveDependency>();

            var barWithPropertyDependency = new BarWithPropertyDependency();

            ExceptionAssert.Throws<InvalidOperationException>(
                () => container.InjectProperties(barWithPropertyDependency), ErrorMessages.RecursivePropertyDependency);
        }