Instance Method

waitForExpectations:timeout:

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 provided expectations.

See Also

Waiting for Expectations

- 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.

+ 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.