public void ApplicationContext_GetComponentProtoypeIsPrototype()
        {
            childComponentPrototype = (IChildComponent)applicationContext.GetComponent("prototypeComponent");
            IChildComponent otherObject = (IChildComponent)applicationContext.GetComponent("prototypeComponent");

            Assert.NotSame(childComponentPrototype, otherObject);
        }
        public void ApplicationContext_GetComponentSingletonIsSingleton()
        {
            childComponentSingleton = (IChildComponent)applicationContext.GetComponent("singletonComponent");
            IChildComponent sameObject = (IChildComponent)applicationContext.GetComponent("singletonComponent");

            Assert.Same(childComponentSingleton, sameObject);
        }
 public ParentComponentWithConstructorThatRequiresChildAndOtherField(IChildComponent childComponent)
 {
     this.childComponent = childComponent;
     doSomething();
 }
 public ParentComponentWithConstructorThatRequiresChildAndOtherField(IChildComponent childComponent, string bogus)
 {
     this.childComponent = childComponent;
 }
 public void ApplicationContext_GetComponentProtoype()
 {
     childComponentPrototype = (IChildComponent)applicationContext.GetComponent("prototypeComponent");
     Assert.NotNull(childComponentPrototype);
 }
 public void ApplicationContext_GetComponentSingleton()
 {
     childComponentSingleton = (IChildComponent)applicationContext.GetComponent("singletonComponent");
     Assert.NotNull(childComponentSingleton);
 }
Ejemplo n.º 7
0
 public ParentComponentWithConstructorThatRequiresChildWithNoField(IChildComponent childComponent)
 {
     this.componentText = childComponent.ToString();
     doSomething();
 }