コード例 #1
0
        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);
        }
コード例 #2
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>());
 }
コード例 #3
0
 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>());
 }
コード例 #4
0
        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>());
        }