Type Method

waitForExpectations:timeout:

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

Declaration

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

Parameters

expectations

The expectations to wait for.

seconds

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

Discussion

May return early based on fulfillment of the waited on expectations. 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:enforceOrder:

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

XCTWaiterResult

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