private void ProxyTestObjectAndExposeProxy() { TestAopContextInterceptor interceptor = new TestAopContextInterceptor(); ITestObject proxy = CreateProxyChain(interceptor, true); Assert.IsFalse(AopContext.IsActive); Assert.AreEqual(this, proxy.DoSomething(this), "Incorrect return value"); Assert.IsFalse(AopContext.IsActive); Assert.AreEqual(2, interceptor.Calls); // 2 interceptions on the way }