public void ConstructingWithMethodInjectionAnDependencyArrayWithNoRegisteredElementsSucceeds()
        {
            IUnityContainer container = new UnityContainer();

            TestClassWithDependencyArrayMethod resolved = container.Resolve <TestClassWithDependencyArrayMethod>();

            Assert.AreEqual(0, resolved.Dependency.Length);
        }
        public void ConstructingWithMethodInjectionAnDependencyArrayWithRegisteredElementsSucceeds()
        {
            IUnityContainer container = new UnityContainer();

            container.RegisterType <TestClass>("Element1", new ContainerControlledLifetimeManager());
            container.RegisterType <TestClass>("Element2", new ContainerControlledLifetimeManager());
            container.RegisterType <TestClass>("Element3", new ContainerControlledLifetimeManager());

            TestClassWithDependencyArrayMethod resolved = container.Resolve <TestClassWithDependencyArrayMethod>();

            Assert.AreEqual(3, resolved.Dependency.Length);
        }