public void CreateLifetimeManager_ImplementationIsASingleton_ReturnsTransientLifetimeManager()
        {
            var factory = new ConfigLifetimeManagerFactory(AutomapperConfig.Create().AndMapAsSingleton(typeof(ArrayList)));

            // Act
            var lifetimeManager = factory.CreateLifetimeManager(new TypeMapping(typeof(IEnumerable), typeof(ArrayList)));

            // Assert
            Assert.IsInstanceOfType(lifetimeManager, typeof(TransientLifetimeManager));
        }
        public void CreateLifetimeManager_InterfaceHasCustomLifetimeManager_ReturnsIt()
        {
            var factory = new ConfigLifetimeManagerFactory(AutomapperConfig.Create().AndMapWithLifetimeManager<HierarchicalLifetimeManager>(typeof(IEnumerable)));

            // Act
            var lifetimeManager = factory.CreateLifetimeManager(new TypeMapping(typeof(IEnumerable), typeof(ArrayList)));

            // Assert
            Assert.IsInstanceOfType(lifetimeManager, typeof(HierarchicalLifetimeManager));
        }
        public void CreateLifetimeManager_InterfaceIsASingleton_ReturnsContainerControlledLifetimeManager()
        {
            var factory = new ConfigLifetimeManagerFactory(AutomapperConfig.Create().AndMapAsSingleton(typeof(IEnumerable)));

            // Act
            var lifetimeManager = factory.CreateLifetimeManager(new TypeMapping(typeof(IEnumerable), typeof(ArrayList)));

            // Assert
            Assert.IsInstanceOfType(lifetimeManager, typeof(ContainerControlledLifetimeManager));
        }