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?
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.
telerik-justmock-free-vs-moq
JustMockLite vs Moq vs RhinoMocks
JustMock documentation
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
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With