Exemple #1
0
        public void CreateContainerShouldInitializeContainer()
        {
            var bootstrapper = new DefaultUnityBootstrapper();

            IUnityContainer container = bootstrapper.CallCreateContainer();

            Assert.IsNotNull(container);
            Assert.IsInstanceOfType(container, typeof(IUnityContainer));
        }
        public void RunAddsCompositionContainerToContainer()
        {
            var bootstrapper = new DefaultUnityBootstrapper();

            var createdContainer  = bootstrapper.CallCreateContainer();
            var returnedContainer = createdContainer.Resolve <IUnityContainer>();

            Assert.IsNotNull(returnedContainer);
            Assert.AreEqual(typeof(UnityContainer), returnedContainer.GetType());
        }