1 //--------------------------------------------------------------------------------------- 2 // $Id$ 3 // Copyright (c) 2005-2008 by Mulle Kybernetik. See License file for details. 4 //--------------------------------------------------------------------------------------- 5 6 #import "OCClassMockObject.h" 7 8 9 @implementation OCClassMockObject 10 11 #pragma mark Initialisers, description, accessors, etc. 12 13 - (id)initWithClass:(Class)aClass 14 { 15 [super init]; 16 mockedClass = aClass; 17 return self; 18 } 19 20 - (NSString *)description 21 { 22 return [NSString stringWithFormat:@"OCMockObject[%@]", NSStringFromClass(mockedClass)]; 23 } 24 25 - (Class)mockedClass 26 { 27 return mockedClass; 28 } 29 30 31 #pragma mark Proxy API 32 33 - (NSMethodSignature *)methodSignatureForSelector:(SEL)aSelector 34 { 35 return [mockedClass instanceMethodSignatureForSelector:aSelector]; 36 } 37 38 - (BOOL)respondsToSelector:(SEL)selector 39 { 40 return [mockedClass instancesRespondToSelector:selector]; 41 } 42 43 @end 44