Exemplo n.º 1
0
        public void TestInjectPostConstruct()
        {
            var instance = new MockClassWithPostConstructInject();

            instance = this.containerIdentifierTests.Inject<MockClassWithPostConstructInject>(instance);

            Assert.AreEqual(typeof(MockIClassWithAttributes), instance.propertyMock1.GetType());
            Assert.AreEqual(typeof(MockClassToDepend), instance.propertyMock2.GetType());
            Assert.AreEqual("MockClass3", instance.propertyMock1.property1);
        }
Exemplo n.º 2
0
        public void TestInjectPostConstruct()
        {
            var instance = new MockClassWithPostConstructInject();

            instance = this.containerIdentifierTests.Inject <MockClassWithPostConstructInject>(instance);

            Assert.AreEqual(typeof(MockIClassWithAttributes), instance.propertyMock1.GetType());
            Assert.AreEqual(typeof(MockClassToDepend), instance.propertyMock2.GetType());
            Assert.AreEqual("MockClass3", instance.propertyMock1.property1);
        }