forked from kiwi-bdd/Kiwi
/
KWMessageTracker.h
53 lines (38 loc) · 1.26 KB
/
KWMessageTracker.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
//
// Licensed under the terms in License.txt
//
// Copyright 2010 Allen Ding. All rights reserved.
//
#import "KiwiConfiguration.h"
#import "KWCountType.h"
#import "KWMessageSpying.h"
@class KWMessagePattern;
@interface KWMessageTracker : NSObject<KWMessageSpying> {
@private
id subject;
KWMessagePattern *messagePattern;
KWCountType countType;
NSUInteger count;
NSUInteger receivedCount;
}
#pragma mark -
#pragma mark Initializing
- (id)initWithSubject:(id)anObject messagePattern:(KWMessagePattern *)aMessagePattern countType:(KWCountType)aCountType count:(NSUInteger)aCount;
+ (id)messageTrackerWithSubject:(id)anObject messagePattern:(KWMessagePattern *)aMessagePattern countType:(KWCountType)aCountType count:(NSUInteger)aCount;
#pragma mark -
#pragma mark Properties
@property (nonatomic, readonly) id subject;
@property (nonatomic, readonly) KWMessagePattern *messagePattern;
@property (nonatomic, readonly) KWCountType countType;
@property (nonatomic, readonly) NSUInteger count;
#pragma mark -
#pragma mark Stopping Tracking
- (void)stopTracking;
#pragma mark -
#pragma mark Getting Message Tracker Status
- (BOOL)succeeded;
#pragma mark -
#pragma mark Getting Phrases
- (NSString *)expectedCountPhrase;
- (NSString *)receivedCountPhrase;
@end