コード例 #1
0
        public void TestCreateChildContainerReturns()
        {
            Mock<IRegistrationMap> mockRegistrationMap = new Mock<IRegistrationMap>();
              Mock<PickRegistrationStrategy> mockRegistrationChain = new Mock<PickRegistrationStrategy>();
              Mock<IResolverMap> mockResolverMap = new Mock<IResolverMap>();
              Mock<FindResolverStrategy> mockResolverChain = new Mock<FindResolverStrategy>();
              Mock<ILifetimeManagerMap> mockManagerMap = new Mock<ILifetimeManagerMap>();
              Mock<FindLifetimeManagerStrategy> mockManagerChain = new Mock<FindLifetimeManagerStrategy>();

              IocContainer testContainer = new IocContainer(mockRegistrationMap.Object,
                                                    mockRegistrationChain.Object,
                                                    mockResolverMap.Object,
                                                    mockResolverChain.Object,
                                                    mockManagerMap.Object,
                                                    mockManagerChain.Object);
              Assert.IsInstanceOfType(testContainer.CreateChildContainer(), typeof(IIocContainer));
        }