blob: f40cb7ce67b8053b42c496ec27804cf793a3c7e7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
//---------------------------------------------------------------------------------------
// $Id$
// Copyright (c) 2009-2010 by Mulle Kybernetik. See License file for details.
//---------------------------------------------------------------------------------------
#import "OCPartialMockObject.h"
#import "OCMRealObjectForwarder.h"
#import "OCPartialMockRecorder.h"
@implementation OCPartialMockRecorder
- (id)andForwardToRealObject
{
[invocationHandlers addObject:[[[OCMRealObjectForwarder alloc] init] autorelease]];
return self;
}
- (void)forwardInvocation:(NSInvocation *)anInvocation
{
[super forwardInvocation:anInvocation];
// not as clean as I'd wish...
[(OCPartialMockObject *)signatureResolver setupForwarderForSelector:[anInvocation selector]];
}
@end
|