I recently did a presentation on Test-Driven Development (TDD) for a Java practice group here in Melbourne. We’ve put the presentation up on our website – you’ll find a link to it on this page.
The presentation contains a detailed step-by-step example. It starts from scratch, demonstrating how to use TDD to implement an algorithm for formatting timesheet data. It then explains how to use the EasyMock framework to mock-out a DAO that looks up timesheet data. Finally, it shows you how to test the real DAO against a database using Spring’s integration testing support.
