ArenaNet.Sprout.IoC.ContextTest.TestScanWithCyclicInjection C# (CSharp) Method

TestScanWithCyclicInjection() private method

private TestScanWithCyclicInjection ( ) : void
return void
        public void TestScanWithCyclicInjection()
        {
            using (Context context = new Context())
            {
                context.Scan("TestCyclic.Namespace")
                        .Start();

                Assert.AreEqual(ContextState.Started, context.State);

                Assert.AreEqual(2, context.GetComponents().Count);
                Assert.IsNotNull(context.GetComponent<TestCyclicClass1>());
                Assert.IsNotNull(context.GetComponent<TestCyclicClass2>());
                Assert.AreEqual(context.GetComponent<TestCyclicClass1>().ReferencedTestClass, context.GetComponent<TestCyclicClass2>());
                Assert.AreEqual(context.GetComponent<TestCyclicClass2>().ReferencedTestClass, context.GetComponent<TestCyclicClass1>());
            }
        }