
Chapter 4 Generating Hibernate Persistent Objects and JSF Pages
Test helper classes
Test helper classes provide some utility functions for unit test classes.
A test helper class contains:
- a method to create new instance.
- a method to modify the instance to be used in update test.
- an instance save method. Instances of some classes should be saved first to fulfill foreign key constraints.
- an instance delete method. If cascade type properties on both sides of the association are all set to save-update, instances reference should be removed from the class of the other side before deleting them by Hibernate.
- a get instance by primary key method.
Copyright (C) 2005. Sybase Inc. All rights reserved.
|
|