Selecting an expected exception

In a test data table, you can select the expected exception from a list of exceptions that are known to the test project.

To select an expected exception:
  1. Right-click in the Expected column of the exception you want to define.
  2. Click Browse to display a list containing all of the exceptions known by the current project.
  3. Type the name of the exception or enter a partial name using wildcards such as a question mark (?) and asterisk (*).
  4. Select the desired exception from the list of matching exceptions.
  5. If the selected exception exists in more than one package, select the preferred package from the Qualifier list.
  6. Click OK.
The selected exception appears in the table cell.
Note: In stub data tables, you need to specify a behavior that will throw an exception by writing the actual expression, not just the type of the expression, for example "new java.lang.RuntimeException("Outchhhh").

Related concepts
Test data tables

Terms of use | Feedback
(C) Copyright IBM Corporation 2000, 2005. All Rights Reserved.