assertMessageQueueContains (assert job log contains message)

Syntax:

assertMessageQueueContains( userOrQueue : library : [msgId : [msgText : [msgHelp : timeLimit );

Description:

Checks whether a given message queue contains the specified message between NOW and timeLimit. The message is identified by any combination of ID, message text or message help. Unused selection parameters must be omitted.

Message ID can be set to *EMPTY to test whether a message queue is empty. All other parameters must be omitted.
Message text and message help can be specified as *generic* strings values.
The value of timeLimit should be created with getFullTimeStamp().

Return value:

void

Example 1:

testStartTime = getFullTimeStamp();
// run the test, that is expected to add the message to the message queue
assertMessageQueueContains( 'QMSGQT' : 'QTEMP' : *omit : 'MSGQT - iRPGUnit' : *omit : testStartTime );

Example 2:

testStartTime = getFullTimeStamp();
// run the test, that is expected to add no messages to the message queue
assertMessageQueueContains( 'QMSGQT' : 'QTEMP' : '*EMPTY' : *omit : *omit : testStartTime );