main
 1//
 2// Licensed under the terms in License.txt
 3//
 4// Copyright 2010 Allen Ding. All rights reserved.
 5//
 6
 7#import "KiwiConfiguration.h"
 8#import "KWBlock.h"
 9
10@class KWCallSite;
11@class KWExample;
12@class KWExampleSuite;
13
14@interface KWExampleGroupBuilder : NSObject {
15@private
16    NSMutableArray *contextNodeStack;
17    NSMutableSet *suites;
18}
19
20#pragma mark -
21#pragma mark Initializing
22
23+ (id)sharedExampleGroupBuilder;
24
25#pragma mark -
26#pragma mark Building Example Groups
27
28@property (nonatomic, readonly) BOOL isBuildingExampleGroup;
29@property (nonatomic, retain, readonly) KWExampleSuite *exampleSuite;
30@property (nonatomic, retain) KWExample *currentExample;
31
32- (KWExampleSuite *)buildExampleGroups:(void (^)(void))buildingBlock;
33- (KWExample *)currentExample;
34
35- (void)pushContextNodeWithCallSite:(KWCallSite *)aCallSite description:(NSString *)aDescription;
36- (void)popContextNode;
37- (void)setRegisterMatchersNodeWithCallSite:(KWCallSite *)aCallSite namespacePrefix:(NSString *)aNamespacePrefix;
38- (void)setBeforeAllNodeWithCallSite:(KWCallSite *)aCallSite block:(KWVoidBlock)aBlock;
39- (void)setAfterAllNodeWithCallSite:(KWCallSite *)aCallSite block:(KWVoidBlock)aBlock;
40- (void)setBeforeEachNodeWithCallSite:(KWCallSite *)aCallSite block:(KWVoidBlock)aBlock;
41- (void)setAfterEachNodeWithCallSite:(KWCallSite *)aCallSite block:(KWVoidBlock)aBlock;
42- (void)addItNodeWithCallSite:(KWCallSite *)aCallSite description:(NSString *)aDescription block:(KWVoidBlock)aBlock;
43- (void)addPendingNodeWithCallSite:(KWCallSite *)aCallSite description:(NSString *)aDescription;
44
45@end