Rational Dev

Testing In JUnit With Mock Objects

Mock objects are created for use in a test testing framework such as JUnit, NUnit or whatever.

Mock objects are created specifically for testing and simulate objects that would be used in realtime. This means you can test logic of your code and perhaps not require a database.

This is a chapter from the book JUnit In Action called Testing in isolation with mock objects with further details on using mock objects.

Posted On: February 1, 2007 - 5:02pm by Rational
Google

Navigation