Closed nhart12 closed 7 years ago
Hi,
This code does not pass the test, but actually Windsor is calling Dispose method of MyTestClass3. You can add a breakpoint to it's Dispose method and see.
So, why unit test fails? Simple.. Because unit test is not designed to handle proxied types. When you add interceptor, Windsor replaces MyTestClass3 with MyTestClass3Proxy and disposes it. But unit test checks if an object of type MyTestClass3 disposed.
So, there is no problem on that.
I added the following test to your WindsorSpecificationTests and noticed it doesn't call Dispose on objects that get intercepted.