• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 //---------------------------------------------------------------------------------------
2 //  $Id$
3 //  Copyright (c) 2004-2008 by Mulle Kybernetik. See License file for details.
4 //---------------------------------------------------------------------------------------
5 
6 #import <Foundation/Foundation.h>
7 
8 @interface OCMockObject : NSProxy
9 {
10 	BOOL			isNice;
11 	BOOL			expectationOrderMatters;
12 	NSMutableArray	*recorders;
13 	NSMutableArray	*expectations;
14 	NSMutableArray	*rejections;
15 	NSMutableArray	*exceptions;
16 }
17 
18 + (id)mockForClass:(Class)aClass;
19 + (id)mockForProtocol:(Protocol *)aProtocol;
20 + (id)partialMockForObject:(NSObject *)anObject;
21 
22 + (id)niceMockForClass:(Class)aClass;
23 + (id)niceMockForProtocol:(Protocol *)aProtocol;
24 
25 + (id)observerMock;
26 
27 - (id)init;
28 
29 - (void)setExpectationOrderMatters:(BOOL)flag;
30 
31 - (id)stub;
32 - (id)expect;
33 - (id)reject;
34 
35 - (void)verify;
36 
37 // internal use only
38 
39 - (id)getNewRecorder;
40 - (BOOL)handleInvocation:(NSInvocation *)anInvocation;
41 - (void)handleUnRecordedInvocation:(NSInvocation *)anInvocation;
42 
43 @end
44