KWMessageTracker.h 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. //
  2. // Licensed under the terms in License.txt
  3. //
  4. // Copyright 2010 Allen Ding. All rights reserved.
  5. //
  6. #import "KiwiConfiguration.h"
  7. #import "KWCountType.h"
  8. #import "KWMessageSpying.h"
  9. @class KWMessagePattern;
  10. @interface KWMessageTracker : NSObject<KWMessageSpying>
  11. #pragma mark - Initializing
  12. - (id)initWithSubject:(id)anObject messagePattern:(KWMessagePattern *)aMessagePattern countType:(KWCountType)aCountType count:(NSUInteger)aCount;
  13. + (id)messageTrackerWithSubject:(id)anObject messagePattern:(KWMessagePattern *)aMessagePattern countType:(KWCountType)aCountType count:(NSUInteger)aCount;
  14. #pragma mark - Properties
  15. @property (nonatomic, readonly) id subject;
  16. @property (nonatomic, readonly) KWMessagePattern *messagePattern;
  17. @property (nonatomic, readonly) KWCountType countType;
  18. @property (nonatomic, readonly) NSUInteger count;
  19. #pragma mark - Stopping Tracking
  20. - (void)stopTracking;
  21. #pragma mark - Getting Message Tracker Status
  22. - (BOOL)succeeded;
  23. #pragma mark - Getting Phrases
  24. - (NSString *)expectedCountPhrase;
  25. - (NSString *)receivedCountPhrase;
  26. @end