assertNotNull

assertNotNull(object: Object);

The assertNotNull method of the JadeTestCase class is invoked by a user test method to confirm that the object specified by the object parameter exists (that is, it is not a null reference).

If the test fails, indicated by the object parameter being a null reference, the following message is generated to describe the failure.

assertNotNull - object is null

The following code example shows the use of the assertNotNull method in a user test method.

calculatorSetup() unitTest;
begin
    create calculator transient;
    assertNotNull(calculator);
end;

A failure in the test method results in the testFailure method being executed by an object implementing the JadeTestListenerIF interface. For details, see "Using the JADE Testing Framework", in Chapter 17 of the JADE Developer’s Reference.