public void should_instanciate_and_contain_iobjectbuilder_as_a_singleton() { var objectBoss = new ObjectBoss(); objectBoss.Configure(x => x.Add<SimpleObjectType>()); Assert.IsTrue(objectBoss.ContainsUsing<IObjectBuilder, ObjectBoss>()); Assert.IsTrue(objectBoss.GetSingletonCount() > 0); }
public void should_register_an_interface_using_a_concrete_class() { var objectBoss = new ObjectBoss(); objectBoss.Configure(x => x.AddUsing<ISimpleInterface, SimpleObjectType>()); Assert.IsTrue(objectBoss.ContainsUsing<ISimpleInterface, SimpleObjectType>()); }
public void should_instantiate_and_contain_itself_in_config_as_ibuildobjects() { var objectBoss = new ObjectBoss(); objectBoss.Configure(x => x.Add<SimpleObjectType>()); Assert.IsTrue(objectBoss.ContainsUsing<IObjectBuilder, ObjectBoss>()); }
public void should_contain_an_interface_using_a_derived_class() { var objectBoss = new ObjectBoss(); objectBoss.Configure(x => { x.AddUsing<ISimpleInterface, SimpleObjectType>(); }); Assert.IsTrue(objectBoss.ContainsUsing<ISimpleInterface, SimpleObjectType>()); }