The database is an integral part of many applications and writing queries is often hard. For that reason I have always written integration tests for the data access objects or DAO’s that I use to access the database. The way I write my DAO tests has changed a lot over the years and in this […]
EasyMock2 is a library that provides an easy way to create on-the-fly mock objects based on interfaces. It can be used in combination with JUnit to create simple and powerful unit tests. Here’s an overview of the basic EasyMock flow, followed by a brief example that demonstrates a new feature in EasyMock 2.4: capturing arguments passed to MockObjects.
The essential tool for unit testing, EasyMock, has come to a new level. This blog entry introduces the new EasyMock2 release. While it is still in pre-release stage, I do recommend using EasyMock2 for all your Java 5 projects. To quote Tammo Freese (Project Founder) from the EasyMock project: ‘I plan no modifications other than […]