Instance Method

waitForExpectations:timeout:enforceOrder:

Waits on an array of expectations and specifies whether they must be fulfilled in the given order.

Declaration

- (void)waitForExpectations:(NSArray<XCTestExpectation *> *)expectations timeout:(NSTimeInterval)seconds enforceOrder:(BOOL)enforceOrderOfFulfillment;

Parameters

expectations

An array of expectations that must be fulfilled.

seconds

The number of seconds within which all expectations must be fulfilled.

enforceOrderOfFulfillment

If YES, the expectations specified by the expectations parameter must be satisfied in the order they appear in the array.

See Also

Waiting for Expectations

- waitForExpectations:timeout:

Waits on a group of expectations for up to the specified timeout.

- waitForExpectationsWithTimeout:handler:

Waits until all expectations are fulfilled or the timeout is reached.

XCWaitCompletionHandler

A block to be called when a call to waitForExpectationsWithTimeout:handler: has all of its expectations fulfilled, or times out.

XCTestErrorCode

Error codes for errors that can occur while waiting for expectations to be fulfilled.

XCTestErrorDomain

Error domain for errors that can occur while waiting for expectations to be fulfilled.