// OCHamcrest by Jon Reid, https://qualitycoding.org/ // Copyright 2019 hamcrest.org. See LICENSE.txt #import NS_ASSUME_NONNULL_BEGIN /*! * @abstract Matches anything, capturing all values. * @discussion This matcher captures all values it was given to match, and always evaluates to * YES. Use it to capture argument values for further assertions. * * Unlike other matchers, this matcher is not idempotent. It should be created outside of any * expression so that it can be queried for the items it captured. */ @interface HCArgumentCaptor : HCIsAnything /*! * @abstract Returns the captured value. * @discussion If -matches: was called more than once then this property returns the * last captured value. * * If -matches: was never invoked and so no value was captured, this property returns * nil. But if nil was captured, this property returns NSNull. */ @property (nullable, nonatomic, readonly) id value; /*! * @abstract Returns all captured values. * @discussion Returns an array containing all captured values, in the order in which they were * captured. nil values are converted to NSNull. */ @property (nonatomic, readonly) NSArray *allValues; /*! * @abstract Determines whether subsequent matched values are captured. * @discussion YES by default. */ @property (nonatomic, assign) BOOL captureEnabled; @end NS_ASSUME_NONNULL_END