public void TestRegisterUsingType()
{
using (Context context = new Context())
{
context.Register(typeof(TestClass1))
.Register(typeof(TestClass2))
.Start();
Assert.AreEqual(ContextState.Started, context.State);
Assert.AreEqual(2, context.GetComponents().Count);
Assert.IsNotNull(context.GetComponent<TestClass1>());
Assert.IsNotNull(context.GetComponent<TestClass2>());
Assert.AreEqual(context.GetComponent<TestClass1>().ReferencedTestClass, context.GetComponent<TestClass2>());
}
}