示例#1
0
        public void Register_Constructor_DI_Test()
        {
            var container = new SimplestContainer();

            container.Register <TestStub>();
            container.Register <TestStubDependency>();

            var result = container.Create <TestStubDependency>();

            Assert.IsInstanceOfType(result.Stub, typeof(TestStub));
        }
示例#2
0
        public void Register_Test()
        {
            var container = new SimplestContainer();

            container.Register <TestStub>();

            var result = container.Create <TestStub>();

            Assert.IsInstanceOfType(result, typeof(TestStub));
        }