KWAsyncVerifier.h 996 B

1234567891011121314151617181920212223242526272829303132333435
  1. //
  2. // KWAsyncVerifier.h
  3. // iOSFalconCore
  4. //
  5. // Created by Luke Redpath on 13/01/2011.
  6. // Copyright 2011 LJR Software Limited. All rights reserved.
  7. //
  8. #import <Foundation/Foundation.h>
  9. #import "KWMatchVerifier.h"
  10. #import "KWProbe.h"
  11. #define kKW_DEFAULT_PROBE_TIMEOUT 1.0
  12. @class KWAsyncMatcherProbe;
  13. @interface KWAsyncVerifier : KWMatchVerifier
  14. @property (nonatomic, assign) NSTimeInterval timeout;
  15. @property (nonatomic, assign) BOOL shouldWait;
  16. + (id)asyncVerifierWithExpectationType:(KWExpectationType)anExpectationType callSite:(KWCallSite *)aCallSite matcherFactory:(KWMatcherFactory *)aMatcherFactory reporter:(id<KWReporting>)aReporter probeTimeout:(NSTimeInterval)probeTimeout shouldWait:(BOOL)shouldWait;
  17. - (void)verifyWithProbe:(KWAsyncMatcherProbe *)aProbe;
  18. @end
  19. @interface KWAsyncMatcherProbe : NSObject <KWProbe>
  20. @property (nonatomic, assign) BOOL matchResult;
  21. @property (nonatomic, readonly) id<KWMatching> matcher;
  22. - (id)initWithMatcher:(id<KWMatching>)aMatcher;
  23. @end