public void Import_from_gets_all_interceptors_and_resets_the_type_filter()
        {
            var sourceLibrary = new InterceptorLibrary();

            sourceLibrary.AddInterceptor(new MockTypeInterceptor(typeof(string)));
            sourceLibrary.FindInterceptor(typeof(string));

            var destinationLibrary = new InterceptorLibrary();

            destinationLibrary.AddInterceptor(new MockTypeInterceptor(typeof(string)));

            destinationLibrary.ImportFrom(sourceLibrary);

            InstanceInterceptor[] interceptors = destinationLibrary.FindInterceptors(typeof(string));
            Assert.AreEqual(2, interceptors.Length);
        }
        public void Find_All_Of_The_Interceptors_For_A_Type_On_Multiple_Passes()
        {
            Assert.AreEqual(new TypeInterceptor[] { _interceptor1, _interceptor3, _interceptor4 },
                            _library.FindInterceptors(typeof(string)));
            Assert.AreEqual(new TypeInterceptor[] { _interceptor2, _interceptor4 },
                            _library.FindInterceptors(typeof(double)));
            Assert.AreEqual(new TypeInterceptor[] { _interceptor2 }, _library.FindInterceptors(typeof(int)));
            Assert.AreEqual(new TypeInterceptor[] { _interceptor3 }, _library.FindInterceptors(typeof(bool)));

            Assert.AreEqual(new TypeInterceptor[] { _interceptor1, _interceptor3, _interceptor4 },
                            _library.FindInterceptors(typeof(string)));
            Assert.AreEqual(new TypeInterceptor[] { _interceptor2, _interceptor4 },
                            _library.FindInterceptors(typeof(double)));
            Assert.AreEqual(new TypeInterceptor[] { _interceptor2 }, _library.FindInterceptors(typeof(int)));
            Assert.AreEqual(new TypeInterceptor[] { _interceptor3 }, _library.FindInterceptors(typeof(bool)));

            Assert.AreEqual(new TypeInterceptor[] { _interceptor1, _interceptor3, _interceptor4 },
                            _library.FindInterceptors(typeof(string)));
            Assert.AreEqual(new TypeInterceptor[] { _interceptor2, _interceptor4 },
                            _library.FindInterceptors(typeof(double)));
            Assert.AreEqual(new TypeInterceptor[] { _interceptor2 }, _library.FindInterceptors(typeof(int)));
            Assert.AreEqual(new TypeInterceptor[] { _interceptor3 }, _library.FindInterceptors(typeof(bool)));

            Assert.AreEqual(new TypeInterceptor[] { _interceptor1, _interceptor3, _interceptor4 },
                            _library.FindInterceptors(typeof(string)));
            Assert.AreEqual(new TypeInterceptor[] { _interceptor2, _interceptor4 },
                            _library.FindInterceptors(typeof(double)));
            Assert.AreEqual(new TypeInterceptor[] { _interceptor2 }, _library.FindInterceptors(typeof(int)));
            Assert.AreEqual(new TypeInterceptor[] { _interceptor3 }, _library.FindInterceptors(typeof(bool)));
        }