Preferred insulation shell for .net testing

I used the RhinoMocks product for quite some time and was very pleased with the product - there was never a reason to look elsewhere. Recently, good people at TypeMock asked me to give their product a whirlwind and wondered what other developer opinions were about Typemock Isolator. Are there any other isolation / mocking frameworks that you would suggest and why?

+6
unit-testing mocking isolation-frameworks
source share
3 answers

Mok is what I used recently. It is worth a look; I especially like the lambda syntax. I do a lot in a very concise but readable manner.

Moq

+5
source share

I have been using TypeMock for over a year now and I cannot work on a project without it. I heard a lot of people saying that TypeMock is too strong, but what if this is so? Having all this power does not make me poorly program my code.

I messed up with other fake frameworks, but what I like about TypeMock is that it can mock anything without having to create interfaces everywhere, as some mocking frameworks can only mock an interface, not the actual object. This is emphasized by my current work, which develops code in SharePoint. Without TypeMock, I could not write good unit tests. I can't see Moq or RhinoMocks allowing me to mock SharePoint object model code. Correct me if I am mistaken in this question.

Another great plus with TypeMock is support from the company. Their developers are always active in company forums, so if you have a problem, they can quickly help you. This help can either come to a forum question that you may have posted, or actually contacted you by email, if your problem is more involved, then an answer to the forum can be provided.

The only point to merge with TypeMock is value; it is not a cheap product. However, the amount of time it saved me when testing (and the flexibility I get when writing my tests) made it a worthy purchase.

+3
source share

Actually, I use RhinoMocks, and I'm pretty happy with this mock map because they implemented the AAA template with lambda syntax.

I never used Typemock, but I read that this structure is very powerful and can mock almost everything. Someone thinks that this is not very good, because it does not force the developer to develop their classes for verification. Personally, I believe that TypeMock can be very useful if you have outdated code for testing, and you do not have the time and resources to refactor.

Other frameworks:

Moq

NMock

+2
source share

All Articles