Author Rob van Maris

2 OptimalJ impressions

I recently attended a three-day training workshop for OptimalJ (the Architect Edition). OptimalJ promises to provide a complete MDA solution,…

1 JUnit testing with EasyMock

Mockobjects are the classic solution to the even more classic problem of how to test code in isolation, when that code needs other objects to perform its tasks. The problem is we want to test classes individually, without introducing too many other objects that may make our tests too complex.
In this article I hope to wet your appetite for this technique. First I will illustrate the problem with a simple example. Then I will demonstrate a solution, using EasyMock to create mockobjects with minimal coding effort.