Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Rhino Mocks vs Moq for Silverlight

We are Silverlight Unit Test Framework for testing.

Which one will be better for my team? Rhino Mocks or Moq. No one has any experience with using a framework like this.

What are the pros and cons of using each framework in this environment?

like image 396
zachary Avatar asked Mar 01 '23 05:03

zachary


2 Answers

Take a look at both, and see which syntax suites you and your teams skillset.

Rhino Mocks has been around for nearly 4 years, and supports a couple different symantics. The record/playback is the oldest, and the Arrange Act Assert (AAA) is the newest. I would say that in the community, Rhino Mocks is the standard framework due to how long it has been around, and how easy it is to find examples, documentation, and help with.

Moq is really about 1 year old, and relies heavily on .Net 3.5 syntax, like lambdas. I think because of how new it is, it might be harder to find people who have used it, and get help with it.

More important than the framework you choose, is getting an understanding of how mocks help you test, and also how they can change the way you think about designing systems for testability. In the end, the framework doesn't matter, the experience and knowledge matters.

like image 93
NerdFury Avatar answered Mar 07 '23 10:03

NerdFury


There's not much impact of Silverlight itself on the frameworks, and using them is not much different than doing so in full .NET

RM is said to have steeper learning curve, and MoQ allegedly has cleaner API, but RM on the other hand, has been around for much longer, and probably supports more corner-case scenarios.

I'd suggest to spike with both, and choose whichever you find suits you better.

like image 37
Krzysztof Kozmic Avatar answered Mar 07 '23 12:03

Krzysztof Kozmic