Type Method

waitForExpectations:timeout:enforceOrder:

Creates a waiter that waits on a group of expectations for up to the specified timeout, optionally enforcing their order of fulfillment.

Declaration

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

Parameters

expectations

The expectations to wait for.

seconds

The amount of time within which all expectations must be fulfilled.

enforceOrderOfFulfillment

Determines if expectations must be fulfilled in the order they appear in the expectations array.

Discussion

Expectations can appear in the expectations array only once. The waiter is discarded when the wait completes.

See Also

Waiting for Expectations

- waitForExpectations:timeout:

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

- waitForExpectations:timeout:enforceOrder:

Waits on a group of expectations for up to the specified timeout, optionally enforcing their order of fulfillment.

+ waitForExpectations:timeout:

Creates a waiter that waits on a group of expectations for up to the specified timeout.

XCTWaiterResult

Result states returned by a waiter when it completes, times out, fails, or is interrupted.