Search The Blog
About this site

Subscribe!

This site aims to connect all the dots of my online activities - from tools, books blogs and twitter accounts, to upcoming conferences, engagements and user group talks.

from 5whys.com
Twitter: @RoyOsherove
My Books

New:

 

The Art of Unit Testing

Buy PDF or Print book at Manning

Buy on Amazon

Latest Posts
« Introducing Audibler: Download your audible audio books DRM free (and into Zune as well) | Main | Extending Depender with your own custom dependency rules »
Sunday
Jul062008

Is Moq too poweful?

It's interesting to see the other mocking frameworks as they grow into maturity. Especially Moq which has been getting loads of new features recently. The latest one is something which makes me feel a bit weird after reading all the things people fear in Typemock Isolator:It seems that  Moq now allows mocking protected fields.

What's really interesting is that Daniel has chosen to actively allow this, and hide the feature at the same time, as well as put it under a strict optional request:

you have to opt in for each code file where you'd like this ability by adding a special imports statement.

So, the questions I have are:

  • What happened to "if it's not testable it's a design smell"? Is this a compromise or have people figured out that good design can take many forms, with tools being left to do the hard lifting?
  • If you're going to add powerful "non classic" mocking ability to a framework, does adding it as a special "opt-in" feature make it OK? (this is what we are talking about doing with Typemock Isolator)
  • If tomorrow Rhino.Mocks were to add the same feature or something even more powerful (statics?) how would people treat that?

PrintView Printer Friendly Version

Reader Comments

There are no comments for this journal entry. To create a new comment, use the form below.

PostPost a New Comment

Enter your information below to add a new comment.

My response is on my own website »
Author Email (optional):
Author URL (optional):
Post:
 
Some HTML allowed: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>
Web Analytics