Home

 

Configuring the RAD75JUnit project

The RAD75JUnit project must be configured, so it can be used to run JPA entity unit tests. Do the following steps, to configure the RAD75JUnit project properly:

In the Package Explorer, right-click the RAD75JUnit project and select Properties.

Select Java Build Path in the tree and select the Libraries tab.

Click Add Variable, select ECLIPSE_HOME and click Extend. Select runtimes/base_v7/derbylib/derby.jar and click OK.
Click Add Variable, select ECLIPSE_HOME and click Extend. Select runtimes/base_v7/runtimes/com.ibm.ws.jpa.thinclient_7.0.0.jar and click OK.

Select the Projects tab.

Click Add, select the RAD75JPA project and click OK.

Select the Source tab.

In the Default Output Folder field, type RAD75JUnit/src (overwriting RAD75JUnit/bin).

Note: This change is necessary so that the persistence.xml file, which we create later in the RAD75JUnit/src/META-INF folder, will be found while executing the test case.

Click OK. In the Setting Build Path dialog, click Yes to delete the RAD75JUnit\bin folder.

The RAD75JUnit project is now properly configured for JPA unit testing.

ibm.com/redbooks