Thank you for bringing this question.
I can not think of a scenario where both tools help each other. As the integration between them is possible, I believe, you should choose only one of them and stick to it. Otherwise, you will introduce two completely different approaches of doing the same thing (different workflows and different syntax), which can lead to a lot of overhead.
I made a little investigation and managed to find the main differences between both JustMock and Mickrosft Fakes:
- Fakes statically creates shims and stubs of the mocked members while JustMock instruments them dynamically with its profiler. As Fakes can be a bit faster, the disadvantages are that the shims/stubs are put in a different library which must be referred to the test project. Also, any refactoring to the system under test won't be applied to this library automatically.
- In JustMock, we have implemented a lot of features that should help you write faster and cleaner unit tests (e.g., CreateLike, Matchers, Occurs, Sequential mocking, automocking, etc...). In Fakes you have to implement this logic by yourself with code inside the arrangements.
- JustMock provides support for mocking inside Silverlight runtime, and mocking DllImport, which I was not able to find in Fakes.
- If you have Visual Studio Premium or above, Microsoft Fakes comes free with it. The JustMock license for its commercial version is paid.
As final words, I would recommend you to try both and see for yourself which suits you most and which satisfies your needs best. Then, you should know if both tools have place in the same project :).
I hope this had helped you.
Share what you think about JustTrace & JustMock with us, so we can become even better! You can use the built-in feedback tool inside JustTrace, our forums
, or our JustTrace