GREYAssertionBlock
@interface GREYAssertionBlock : NSObject <GREYAssertion>
An interface to create GREYAssertions from blocks.
-
Creates an assertion with the given @c name and @c block that is executed when GREYAssertion::assert:error: selector is performed on the assertion.
Declaration
Objective-C
+ (instancetype)assertionWithName:(NSString *)name assertionBlockWithError:(GREYCheckBlockWithError)block;
Swift
class func assertion(withName name: Any!, assertionBlockWithError block: Any!) -> Self!
Parameters
name
The assertion name.
block
The block that will be invoked to perform the assertion.
Return Value
A new block-based assertion object.
-
@remark init is not an available initializer. Use the other initializers.
Declaration
Objective-C
- (instancetype)init;
Swift
init!()
-
Initializes an assertion with the given @c name and @c block that is executed when GREYAssertion::assert:error: selector is performed on the assertion.
Declaration
Objective-C
- (instancetype)initWithName:(NSString *)name assertionBlockWithError:(GREYCheckBlockWithError)block;
Swift
init!(name: Any!, assertionBlockWithError block: Any!)
Parameters
name
The assertion name.
block
The block that will be invoked to perform the assertion.
Return Value
The initialized assertion object.