public void TestInjectIntoSubClasses() { var receiver = new Receiver4(); BaseObject testObject; createDependencies(testObject = new BaseObject()).Inject(receiver); Assert.AreEqual(testObject, receiver.Obj); Assert.AreEqual(testObject, receiver.Obj2); }
public void TestInjectIntoSubClasses() { var testObject = new BaseObject(); var dependencies = new DependencyContainer(); dependencies.Cache(testObject); var receiver = new Receiver4(); dependencies.Inject(receiver); Assert.AreEqual(testObject, receiver.Obj); Assert.AreEqual(testObject, receiver.Obj2); }