Esempio n. 1
0
        public void Factory_SingletonInstanceShouldBeSingletonAcrossContainer()
        {
            var container      = new TestContainer();
            var factory        = container.CreateIExampleFactory();
            var singleton      = factory.CreateSingletonClass();
            var otherSingleton = container.CreateISingletonClass();

            singleton.Should().Be(otherSingleton);
        }
Esempio n. 2
0
 public void FactoryWorks()
 {
     var container    = new TestContainer();
     var factory      = container.CreateIExampleFactory();
     var createdClass = factory.CreateDependencyClass();
 }