A while ago, I blogged about using Test Data Builders as opposed to the Object Mother pattern. Here are some links to additional tips and tricks:
- Tricks with Test Data Builders: Defining Common State
- Tricks with Test Data Builders: Combining Builders
- Tricks with Test Data Builders: Emphase the Domain Model with Factory Methods
- Tricks with Test Data Builders: Refactoring Away Duplicated Logic Creates a Domain Specific Embedded Language for Testing
I'm making extensive use of Test Data Builders in my current project, and they have a tremendous effect on the readability of my unit tests.