KWExampleSuiteBuilder.h 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  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 "KWBlock.h"
  8. @class KWCallSite;
  9. @class KWExample;
  10. @class KWExampleSuite;
  11. @class KWContextNode;
  12. @interface KWExampleSuiteBuilder : NSObject
  13. #pragma mark - Initializing
  14. + (id)sharedExampleSuiteBuilder;
  15. #pragma mark - Building Example Groups
  16. @property (nonatomic, readonly) BOOL isBuildingExampleSuite;
  17. @property (nonatomic, strong, readonly) KWExampleSuite *currentExampleSuite;
  18. @property (nonatomic, strong) KWExample *currentExample;
  19. @property (nonatomic, strong) KWCallSite *focusedCallSite;
  20. //spec file name:line number of callsite
  21. - (void)focusWithURI:(NSString *)nodeUrl;
  22. - (KWExampleSuite *)buildExampleSuite:(void (^)(void))buildingBlock;
  23. - (void)pushContextNodeWithCallSite:(KWCallSite *)aCallSite description:(NSString *)aDescription;
  24. - (void)popContextNode;
  25. - (void)setRegisterMatchersNodeWithCallSite:(KWCallSite *)aCallSite namespacePrefix:(NSString *)aNamespacePrefix;
  26. - (void)setBeforeAllNodeWithCallSite:(KWCallSite *)aCallSite block:(void (^)(void))block;
  27. - (void)setAfterAllNodeWithCallSite:(KWCallSite *)aCallSite block:(void (^)(void))block;
  28. - (void)setBeforeEachNodeWithCallSite:(KWCallSite *)aCallSite block:(void (^)(void))block;
  29. - (void)setAfterEachNodeWithCallSite:(KWCallSite *)aCallSite block:(void (^)(void))block;
  30. - (void)addLetNodeWithCallSite:(KWCallSite *)aCallSite objectRef:(id *)anObjectRef symbolName:(NSString *)aSymbolName block:(id (^)(void))block;
  31. - (void)addItNodeWithCallSite:(KWCallSite *)aCallSite description:(NSString *)aDescription block:(void (^)(void))block;
  32. - (void)addPendingNodeWithCallSite:(KWCallSite *)aCallSite description:(NSString *)aDescription;
  33. - (BOOL)isFocused;
  34. - (BOOL)foundFocus;
  35. @end