I am searching for a mocking framework for a large C++ project. I've tentatively chosen GoogleTest as the testing framework so I first looked at GoogleMocks. However, I then discovered TypeMock's Isolator++ which has two features I very much liked:
The drawback is that Isolator++ is a commercial product. I worry about vendor lock-in & such. Are there other frameworks which have the same capabilities? Perhaps something open source?
Let me also preclude a common criticism I've observed in other posts: "TypeMock encourages bad design. You should improve your design rather than use a tool which supports bad habits." (my paraphrase)
My response is this: I do want to improve design. I also want to add test coverage BEFORE refactoring. To that end, the ability to add tests with zero code changes is very attractive.
Well, I suppose this post could also be titled: "Does TypeMock Isolator++ have any competitors"? As far as I can tell, the answer is no.
For C# code, TypeMock Isolator does have a couple competitors: Telerik JustMock & Microsoft Fakes. However for C++, TypeMock Isolator++ is the only one I've found.
For anyone in this situation, I also suggest a reading of Michael Feather's book "Working Effectively with Legacy Code". It offers many practical tips for getting tests in place without needing to mock live objects as Isolator lets you do. That said, there are cases where the necessary changes are simply too invasive in my opinion. They introduce too much risk while getting tests in place. So, perhaps Isolator++ might be worth the money. We'll see...