Mock Object testing can cause trouble - here's why and possibly how to avoid it

My blog has moved. You can view this post at the following address: http://www.osherove.com/blog/2005/6/15/mock-object-testing-can-cause-trouble-heres-why-and-possibly.html
Published Wednesday, June 15, 2005 3:58 PM by RoyOsherove
Filed under:

Comments

Wednesday, June 15, 2005 10:09 PM by TrackBack

# Mock Objects vs.

Wednesday, June 15, 2005 10:53 PM by Scott Allen

# re: Mock Object testing can cause trouble - here's why and possibly how to avoid it

I particularly like the technique where a virtual method allows the unit tests to subclass and inject dependencies. I feel this is an elegant solution compared to dependency injection with constructors. I was wondering if you had rules of thumb on when to use one versus the other?
Thursday, June 16, 2005 5:09 AM by Roy Osherove

# re: Mock Object testing can cause trouble - here's why and possibly how to avoid it

Thursday, June 16, 2005 12:28 PM by Scott Allen

# re: Mock Object testing can cause trouble - here's why and possibly how to avoid it

Thanks, Roy