XCTWaiterDelegate

Trait XCTWaiterDelegate 

Source
pub unsafe trait XCTWaiterDelegate: NSObjectProtocol {
    // Provided methods
    fn waiter_didTimeoutWithUnfulfilledExpectations(
        &self,
        waiter: &XCTWaiter,
        unfulfilled_expectations: &NSArray<XCTestExpectation>,
    )
       where Self: Sized + Message { ... }
    fn waiter_fulfillmentDidViolateOrderingConstraintsForExpectation_requiredExpectation(
        &self,
        waiter: &XCTWaiter,
        expectation: &XCTestExpectation,
        required_expectation: &XCTestExpectation,
    )
       where Self: Sized + Message { ... }
    fn waiter_didFulfillInvertedExpectation(
        &self,
        waiter: &XCTWaiter,
        expectation: &XCTestExpectation,
    )
       where Self: Sized + Message { ... }
    fn nestedWaiter_wasInterruptedByTimedOutWaiter(
        &self,
        waiter: &XCTWaiter,
        outer_waiter: &XCTWaiter,
    )
       where Self: Sized + Message { ... }
}
Expand description

Events are reported to the waiter’s delegate via these methods. XCTestCase conforms to the delegate protocol and will automatically report timeouts and other unexpected events as test failures.

Note: These methods are invoked on an arbitrary queue.

See also Apple’s documentation

Provided Methods§

Source

fn waiter_didTimeoutWithUnfulfilledExpectations( &self, waiter: &XCTWaiter, unfulfilled_expectations: &NSArray<XCTestExpectation>, )
where Self: Sized + Message,

Invoked when not all waited on expectations are fulfilled during the timeout period. If the delegate is an XCTestCase instance, this will be reported as a test failure.

Source

fn waiter_fulfillmentDidViolateOrderingConstraintsForExpectation_requiredExpectation( &self, waiter: &XCTWaiter, expectation: &XCTestExpectation, required_expectation: &XCTestExpectation, )
where Self: Sized + Message,

Invoked when the -wait call has specified that fulfillment order should be enforced and an expectation has been fulfilled in the wrong order. If the delegate is an XCTestCase instance, this will be reported as a test failure.

Source

fn waiter_didFulfillInvertedExpectation( &self, waiter: &XCTWaiter, expectation: &XCTestExpectation, )
where Self: Sized + Message,

Invoked when an expectation marked as inverted (/see inverted) is fulfilled. If the delegate is an XCTestCase instance, this will be reported as a test failure.

Source

fn nestedWaiter_wasInterruptedByTimedOutWaiter( &self, waiter: &XCTWaiter, outer_waiter: &XCTWaiter, )
where Self: Sized + Message,

Invoked when the waiter is interrupted prior to its expectations being fulfilled or timing out. This occurs when an “outer” waiter times out, resulting in any waiters nested inside it being interrupted to allow the call stack to quickly unwind.

Trait Implementations§

Source§

impl ProtocolType for dyn XCTWaiterDelegate

Source§

const NAME: &'static str = "XCTWaiterDelegate"

The name of the Objective-C protocol that this type represents. Read more
Source§

fn protocol() -> Option<&'static AnyProtocol>

Get a reference to the Objective-C protocol object that this type represents. Read more
Source§

impl<T> ImplementedBy<T> for dyn XCTWaiterDelegate

Implementations on Foreign Types§

Source§

impl<T> XCTWaiterDelegate for ProtocolObject<T>

Implementors§