public void ClassWithOneParameterConstructorCreation() { SimpleContainer c = new SimpleContainer(); ClassWithSimpleField a = c.Resolve <ClassWithSimpleField>(); Assert.IsNotNull(a.foo); }
public void ClassWithConstructorParameterRegistredAsSingleton() { SimpleContainer c = new SimpleContainer(); c.RegisterType <Foo>(true); ClassWithSimpleField a1 = c.Resolve <ClassWithSimpleField>(); ClassWithSimpleField a2 = c.Resolve <ClassWithSimpleField>(); Assert.IsNotNull(a1.foo); Assert.AreEqual(a1.foo, a2.foo); }