Reputation: 1794
In order to write Unit Tests, I need to integrate a mocking framework for my WinRT based application and decide on which mocking framework would be a best fit. I ended up comparing JustMock (licensed version) and Moq. I could not find a detailed comparison between the two. However, some of the articles say that Moq is a little better as far as performance is concerned. Any suggestion or any useful links where I can go through the detailed comparison of the two?
Upvotes: 2
Views: 7454
Reputation: 1488
Both are good testing frameworks. Both have similar syntax. Not sure about performance, but neither is horribly slow. To some extent it is a matter of personal preference. I recommend giving each one a test drive and seeing which one you prefer. Below are some links for additional reading.
JustMockLite vs Moq vs RhinoMocks
NSubstitute-vs-Moq-vs-FakeItEasy-vs-Rhino
Although it wasn't one of the frameworks you were asking about NSubstitute looks to be slightly easier to use. See this link
MoqaLate is a newer mock framework for Windows Phone and Windows Store Apps. I haven't tried it myself, but it looks promising. See this link
Upvotes: 8
Reputation: 989
Moq won't work for your WinRT based application (that is, WP8.1 and W8.1, it might work in 8), unless you place your testable code in a PCL that targets .NET in addition to your other targets.
There is some useful explanation in this thread, also a post on why WinRT broke most existing mocking frameworks.
As far as I can tell JustMock is the only mocking framework available for WinRT that isn't in alpha stage.
Upvotes: 1