Beispiel #1
0
        public void Inject_SingleViaManualInject([Values("TestID")] string id)
        {
            DIContainer      container = new DIContainer();
            InjectTestClassA testClass = new InjectTestClassA();

            container.Bind(id);
            container.Inject(testClass);

            Assert.AreEqual(testClass.ID, id);
        }
Beispiel #2
0
        public void Inject_SingleViaInjectQueue([Values("TestID")] string id)
        {
            DIContainer      container = new DIContainer();
            InjectTestClassA testClass = new InjectTestClassA();

            container.Bind(id);
            container.QueueForInject(testClass);
            container.FlushInjectQueue();

            Assert.AreEqual(testClass.ID, id);
        }