forked from kiwi-bdd/Kiwi
/
KWReceiveMatcher.h
63 lines (51 loc) · 2.61 KB
/
KWReceiveMatcher.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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
//
// Licensed under the terms in License.txt
//
// Copyright 2010 Allen Ding. All rights reserved.
//
#import "KiwiConfiguration.h"
#import "KWCountType.h"
#import "KWMatcher.h"
#import "KWMatchVerifier.h"
@class KWMessagePattern;
@class KWMessageTracker;
@interface KWReceiveMatcher : KWMatcher {
@private
KWMessageTracker *messageTracker;
BOOL willEvaluateMultipleTimes;
}
@property (nonatomic, assign) BOOL willEvaluateMultipleTimes;
#pragma mark -
#pragma mark Configuring Matchers
- (void)receive:(SEL)aSelector;
- (void)receive:(SEL)aSelector withCount:(NSUInteger)aCount;
- (void)receive:(SEL)aSelector withCountAtLeast:(NSUInteger)aCount;
- (void)receive:(SEL)aSelector withCountAtMost:(NSUInteger)aCount;
- (void)receive:(SEL)aSelector andReturn:(id)aValue;
- (void)receive:(SEL)aSelector andReturn:(id)aValue withCount:(NSUInteger)aCount;
- (void)receive:(SEL)aSelector andReturn:(id)aValue withCountAtLeast:(NSUInteger)aCount;
- (void)receive:(SEL)aSelector andReturn:(id)aValue withCountAtMost:(NSUInteger)aCount;
- (void)receiveMessagePattern:(KWMessagePattern *)aMessagePattern countType:(KWCountType)aCountType count:(NSUInteger)aCount;
- (void)receiveMessagePattern:(KWMessagePattern *)aMessagePattern andReturn:(id)aValue countType:(KWCountType)aCountType count:(NSUInteger)aCount;
@end
@interface KWMatchVerifier(KWReceiveMatcherAdditions)
#pragma mark -
#pragma mark Verifying
- (void)receive:(SEL)aSelector withArguments:(id)firstArgument, ...;
- (void)receive:(SEL)aSelector withCount:(NSUInteger)aCount arguments:(id)firstArgument, ...;
- (void)receive:(SEL)aSelector withCountAtLeast:(NSUInteger)aCount arguments:(id)firstArgument, ...;
- (void)receive:(SEL)aSelector withCountAtMost:(NSUInteger)aCount arguments:(id)firstArgument, ...;
- (void)receive:(SEL)aSelector andReturn:(id)aValue withArguments:(id)firstArgument, ...;
- (void)receive:(SEL)aSelector andReturn:(id)aValue withCount:(NSUInteger)aCount arguments:(id)firstArgument, ...;
- (void)receive:(SEL)aSelector andReturn:(id)aValue withCountAtLeast:(NSUInteger)aCount arguments:(id)firstArgument, ...;
- (void)receive:(SEL)aSelector andReturn:(id)aValue withCountAtMost:(NSUInteger)aCount arguments:(id)firstArgument, ...;
#pragma mark Invocation Capturing Methods
- (id)receive;
- (id)receiveWithCount:(NSUInteger)aCount;
- (id)receiveWithCountAtLeast:(NSUInteger)aCount;
- (id)receiveWithCountAtMost:(NSUInteger)aCount;
- (id)receiveAndReturn:(id)aValue;
- (id)receiveAndReturn:(id)aValue withCount:(NSUInteger)aCount;
- (id)receiveAndReturn:(id)aValue withCountAtLeast:(NSUInteger)aCount;
- (id)receiveAndReturn:(id)aValue withCountAtMost:(NSUInteger)aCount;
@end