public void BuildAbstractBaseAndChildObject2() { UnityContainer uc = new UnityContainer(); ConcreteChild objChild = new ConcreteChild(); Assert.IsNotNull(objChild); Assert.IsNull(objChild.AbsBaseProp); Assert.IsNull(objChild.ChildProp); uc.BuildUp(typeof(ConcreteChild), objChild); Assert.IsNotNull(objChild.AbsBaseProp); Assert.IsNotNull(objChild.ChildProp); //ChildProp get created }
public void BuildAbstractBaseAndChildObject1() { // Setup ConcreteChild objChild = new ConcreteChild(); Assert.IsNotNull(objChild); Assert.IsNull(objChild.AbsBaseProp); Assert.IsNull(objChild.ChildProp); // Act Container.BuildUp(typeof(AbstractBase), objChild); // Verify Assert.IsNotNull(objChild.AbsBaseProp); Assert.IsNull(objChild.ChildProp); }
public void BuildAbstractBaseAndChildObject2() { UnityContainer uc = new UnityContainer(); ConcreteChild objChild = new ConcreteChild(); Assert.IsNotNull(objChild); Assert.IsNull(objChild.AbsBaseProp); Assert.IsNull(objChild.ChildProp); uc.BuildUp(typeof(ConcreteChild), objChild); Assert.IsNotNull(objChild.AbsBaseProp); Assert.IsNotNull(objChild.ChildProp); //ChildProp get created }