This post originated from an RSS feed registered with Java Buzz
by Jason Sankey.
Original Post: Four Simple Rules For Mocking
Feed Title: a little madness
Feed URL: http://www.alittlemadness.com/feed/
Feed Description: A man needs a little madness, or else he never dares cut the rope and be free. -Nikos Kazantzakis
Lately I’ve been thinking about how I approach mocking in my tests, and why it is that I like Mockito so much. I find that I follow a few simple rules:
Don’t Mock: where possible, I prefer to use real implementations rather than mocks. Using real implementations is usually easier, is closer to reality [...]