forked from specta/expecta
/
EXPExpect.h
47 lines (37 loc) · 1.44 KB
/
EXPExpect.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
// Expecta - EXPExpect.h
// Copyright (c) 2011 Peter Jihoon Kim
// Licensed under the MIT License.
#import <Foundation/Foundation.h>
typedef id (^EXPIdBlock)();
typedef BOOL (^EXPBoolBlock)();
typedef NSString *(^EXPStringBlock)();
@interface EXPExpect : NSObject {
EXPIdBlock _actualBlock;
id _testCase;
int _lineNumber;
char *_fileName;
BOOL _negative;
BOOL _asynchronous;
EXPBoolBlock _prerequisiteBlock;
EXPBoolBlock _matchBlock;
EXPStringBlock _failureMessageForToBlock;
EXPStringBlock _failureMessageForNotToBlock;
void (^prerequisite)(EXPBoolBlock block);
void (^match)(EXPBoolBlock block);
void (^failureMessageForTo)(EXPStringBlock block);
void (^failureMessageForNotTo)(EXPStringBlock block);
}
@property(nonatomic, copy) EXPIdBlock actualBlock;
@property(nonatomic, readonly) id actual;
@property(nonatomic, assign) id testCase;
@property(nonatomic) int lineNumber;
@property(nonatomic) char *fileName;
@property(nonatomic) BOOL negative;
@property(nonatomic) BOOL asynchronous;
@property(nonatomic, readonly) EXPExpect *Not;
@property(nonatomic, readonly) EXPExpect *isGoing;
@property(nonatomic, readonly) EXPExpect *isNotGoing;
- (id)initWithActualBlock:(id)actualBlock testCase:(id)testCase lineNumber:(int)lineNumber fileName:(char *)fileName;
+ (EXPExpect *)expectWithActualBlock:(id)actualBlock testCase:(id)testCase lineNumber:(int)lineNumber fileName:(char *)fileName;
- (void)applyMatcher:(NSObject **)actual;
@end