Пример #1
0
 public void should_get_multiple_instances_of_objects_that_are_not_defined_as_singleton()
 {
     var objectBoss = new ObjectBoss();
     objectBoss.Configure(x => x.Add<SimpleObjectType>());
     var simpleObject1 = objectBoss.GetInstance<SimpleObjectType>();
     var simpleObject2 = objectBoss.GetInstance<SimpleObjectType>();
     Assert.IsTrue(objectBoss.GetRegisteredClassCount() == 2);
     Assert.IsNotNull(simpleObject1);
     Assert.IsNotNull(simpleObject2);
     Assert.IsTrue(simpleObject1.Id != simpleObject2.Id);
 }