public void WhenDenpendencyOverridesOccursOnPropertyWithPrivateSetter()
        {
            ClassWithPrivateSetterDependency defaultValue = new ClassWithPrivateSetterDependency();

            IUnityContainer container = new UnityContainer();
            container.RegisterType<ClassWithPrivateSetterDependency>();

            try
            {
                var result = container.Resolve<ClassWithPrivateSetterDependency>(new DependencyOverride(typeof(string), "value"));
                Assert.Fail("Should have failed");
            }
            catch (ResolutionFailedException resolutionFailedException)
            {
                Assert.AreEqual(typeof(InvalidOperationException), resolutionFailedException.InnerException.GetType());
            }
        }
        public void WhenDenpendencyOverridesOccursOnPropertyWithPrivateSetter()
        {
            ClassWithPrivateSetterDependency defaultValue = new ClassWithPrivateSetterDependency();

            IUnityContainer container = new UnityContainer();

            container.RegisterType <ClassWithPrivateSetterDependency>();

            try
            {
                var result = container.Resolve <ClassWithPrivateSetterDependency>(new DependencyOverride(typeof(string), "value"));
                Assert.Fail("Should have failed");
            }
            catch (ResolutionFailedException resolutionFailedException)
            {
                Assert.AreEqual(typeof(InvalidOperationException), resolutionFailedException.InnerException.GetType());
            }
        }