This project is read-only.

WHat would you build on top of CThru?

Coordinator
Feb 16, 2009 at 3:00 PM
Given CThru's power - what would you want to build that uses it?
Mar 5, 2009 at 6:09 PM
Roy,

I spent some more time trying to figure out what can be built with CThru. Actually I spent this time playing with TypeMock Decorator attribute that I overlooked in TypeMock and found in SilverUnit. I derived my own attribute from Decorator and placed there various fakes that are common for most of my test classes.

Now I ask myself (and you): what it is it that needs CThru and can't just use TypeMock Isolator?

Of course, for the time being TypeMock does not give as much power as CThru. It's not possible to fake all future instances, all already created instances, all static methods of a static class. With CThru you can achive that. But should/will it always be this way? I believe TypeMock has obvious shortcomings that need to be fixed. And when developers get such advanced methods like SwapAllInstances and WhenCalledAnyMethod (with possibility to filter on class or even namespace), then what will be left for CThru?

I think it will be helpful if you clarify better what are the use cases for CThru, and what will be in the future. And when CThru will be overkill and it's more efficient to configure common fakes in Decorator-derived attirbute using TypeMock (I am talking about future versions of TypeMock that will remove limitations I mentioned above).

Vagif
Developer
Apr 3, 2009 at 4:11 PM
I can't wait to use CThru in Ivonna. The shortcoming of the Isolator is that you need to know the mocked type before mocking it. In Ivonna, I'd like to introduce swapping of the HttpApplication instance (the one which is your global.asax). At runtime, I know just the base type but not the exact type, so doing it with Isolator seems impossible (well, unless I use the new Hooks namespace, but I might be using CThru as well).