Class

XCTNSPredicateExpectation

An expectation that is fulfilled when an NSPredicate is satisfied.

Declaration

@interface XCTNSPredicateExpectation : XCTestExpectation

Topics

Creating a Predicate-Based Expectation

- initWithPredicate:object:

Creates an expectation that is fulfilled when an NSPredicate instance returns YES, optionally for a provided object.

Expectation Properties

predicate

The predicate that is evaluated by the expectation.

object

An optional object against which the predicate is evaluated.

Handling Predicate Resolution

handler

An optional handler that performs custom evaluation when predicate evaluates as YES.

XCPredicateExpectationHandler

A handler to be called when evaluating the predicate returns YES.

Relationships

Inherits From