public void WhenProxyAnInterfaceShouldInterceptEquals()
		{
			var proxyFactory = new ProxyFactory();
			var interceptor = new InterceptedMethodsExposer();
			var proxy = proxyFactory.CreateProxy(typeof(IHasSomething), interceptor, null);
			proxy.Equals(null);
			Assert.That(interceptor.InterceptedMethods, Contains.Item("Equals"));
		}
Esempio n. 2
0
        public void WhenProxyAnInterfaceShouldInterceptEquals()
        {
            var proxyFactory = new ProxyFactory();
            var interceptor  = new InterceptedMethodsExposer();
            var proxy        = proxyFactory.CreateProxy(typeof(IHasSomething), interceptor, null);

            proxy.Equals(null);
            Assert.That(interceptor.InterceptedMethods, Contains.Item("Equals"));
        }