Protocol

XCTWaiterDelegate

Defines methods that are called when XCTWaiter expectations are fulfilled correctly or incorrectly.

Declaration

@protocol XCTWaiterDelegate

Overview

XCTestCase instances automatically conform to the XCTWaiterDelegate protocol. If you pass a test case instance as the delegate property of XCTWaiter's initWithDelegate: initializer, that test case will automatically report timeouts and other unexpected events as test failures.

Topics

Timeout Events

- waiter:didTimeoutWithUnfulfilledExpectations:

Invoked when not all waited on expectations are fulfilled during the timeout period.

Required.

- nestedWaiter:wasInterruptedByTimedOutWaiter:

Invoked when the waiter is interrupted prior to its expectations being fulfilled or timing out.

Required.

Order of Fulfillment Events

- waiter:fulfillmentDidViolateOrderingConstraintsForExpectation:requiredExpectation:

Invoked when a waiter is enforcing fulfillment order and an expectation is fulfilled in the wrong order.

Required.

Inverted Expectation Events

- waiter:didFulfillInvertedExpectation:

Invoked when an expectation whose inverted property is set to YES is fulfilled.

Required.

Relationships

Inherits From

See Also

Responding to Expectation Fulfilment

delegate

The delegate to which expectation fulfillment events will be reported.

fulfilledExpectations

An array of expectations that were fulfilled, in order, up until the waiter stopped waiting.