Enterprise Java Development@TOPIC@

Chapter 19. Project 1 Testing

Note

The end-to-end scenario will test your business logic, DAO, and BOs in a "happy path" scenario. Any white-box or black-box testing of alternate and error paths would be appropriate to put in the separate unit tests.

  1. Provide a JUnit test for your business objects (BOs) that test the manipulation of the data. An example test might be to try adding a bid to a closed auction. These tests should be packaged with the BOs. There should be a separate project and test for both eSales and eBidbot. It is anticipated that these tests will be a minimal demonstration of understanding.

  2. Provide a JUnit test for your eSales and eBidbot JPA DAOs. This should test the implementation for the required CRUD operations for each type of object. It is understood that some of the operations will be handled by cascades, so you might not have a set of methods handling each type of business object. This test should be packaged with the DAOs.

  3. Provide a JUnit test for your business logic to test the basic functionality of your business logic design, including ingest. The ingestor test should be able to reference a known data file and ingest records into the database using the DAOs. These tests should be packaged with the business logic implementation.

  4. Provide a set of JUnit test programs to verify the following end-to-end scenario in eSales. This test should be implemented as a JUnit test and packaged with the business logic implementation.

  5. Provide a set of JUnit test programs to verify the following end-to-end scenario in eBidbot. This test should be implemented as a JUnit test and packaged with the business logic implementation.