expectedException(params: ParamListType);
The expectedException method of the JadeTestCase class is invoked by a user test method to register exceptions that are expected during execution of the test method.
A test method that encounters an exception is considered to have failed, unless the exception is registered as an expected exception.
The params parameter specifies expected exceptions by the class of the exception or the
In the following example, a
someTest() unitTest; begin expectedException(1035, FileException, 5011); // test instructions omitted end;
You can also register expected exceptions by calling the expectedException method a number of times, as shown in the following code fragment.
expectedException(1035); expectedException(FileException); expectedException(5011);