
Chapter 4 Generating Hibernate Persistent Objects and JSF Pages
Unit Test Classes
For each persistent class, PowerDesigner generates a unit test class.
There are three categories of functions:
- The pre test is responsible for some preparation tasks, such as creating persistent object.
- The do test performs the corresponding database access operation.
- The after test will perform some assertions to verify the correctness of the test.
You can customize these functions.
The generated test cases are:
- Insert test method - to test instance insert.
- Update test method - to test instance update.
- Delete test method - to test instance delete.
- Property finder test method - to test every property finder method defined in Dao.
- Get all instance list test method - to test the get<ClassCode>List defined in Dao.
- Navigation test method - to test association mapping. Tests if the associated classed can be saved and queried correctly.
- Inheritance test method - to test inheritance mapping. Tests if the subclasses can be saved and queried correctly.
- User defined operation test methods - skeleton methods to test user defined functions. These are generated only when the Generate test method extended attribute of the operation is set to true.
|
Copyright (C) 2005. Sybase Inc. All rights reserved.
|
|