public void ReturnsDefaultDependencyResolverForNonRegisteredInstance()
            {
                var dependencyResolverManager = new DependencyResolverManager();
                var myObject = new object();

                var resolvedDependencyResolver = dependencyResolverManager.GetDependencyResolverForInstance(myObject);

                Assert.IsTrue(ReferenceEquals(dependencyResolverManager.DefaultDependencyResolver, resolvedDependencyResolver));
            }
            public void ReturnsRegisteredDependencyResolverForRegisteredType()
            {
                var dependencyResolverManager = new DependencyResolverManager();
                var dependencyResolver = new CatelDependencyResolver(new ServiceLocator());
                var myObject = new object();

                dependencyResolverManager.RegisterDependencyResolverForType(typeof(object), dependencyResolver);

                var resolvedDependencyResolver = dependencyResolverManager.GetDependencyResolverForInstance(myObject);

                Assert.IsTrue(ReferenceEquals(dependencyResolver, resolvedDependencyResolver));
            }
            public void ThrowsArgumentNullExceptionForNullInstance()
            {
                var dependencyResolverManager = new DependencyResolverManager();

                ExceptionTester.CallMethodAndExpectException<ArgumentNullException>(() => dependencyResolverManager.GetDependencyResolverForInstance(null));
            }