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

            container.RegisterType <TestObject>();

            OptionalConstParameterClass1 result = container.Resolve <OptionalConstParameterClass1>();

            Assert.IsNotNull(result.TestObject);
        }
        public void OptionalParametersResolvedIfTypeRegisteredInParent()
        {
            IUnityContainer parent = new UnityContainer();
            IUnityContainer child  = parent.CreateChildContainer();

            parent.RegisterType <TestObject>();

            OptionalConstParameterClass1 result = child.Resolve <OptionalConstParameterClass1>();

            Assert.IsNotNull(result.TestObject);
        }