| OLD | NEW |
| 1 //------------------------------------------------------------------------------
--------- | 1 /* |
| 2 // $Id$ | 2 * Copyright (c) 2004-2015 Erik Doernenburg and contributors |
| 3 // Copyright (c) 2004-2008 by Mulle Kybernetik. See License file for details. | 3 * |
| 4 //------------------------------------------------------------------------------
--------- | 4 * Licensed under the Apache License, Version 2.0 (the "License"); you may |
| 5 * not use these files except in compliance with the License. You may obtain |
| 6 * a copy of the License at |
| 7 * |
| 8 * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 * |
| 10 * Unless required by applicable law or agreed to in writing, software |
| 11 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT |
| 12 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the |
| 13 * License for the specific language governing permissions and limitations |
| 14 * under the License. |
| 15 */ |
| 5 | 16 |
| 6 #import <Foundation/Foundation.h> | 17 #import <Foundation/Foundation.h> |
| 7 | 18 |
| 19 @class OCMLocation; |
| 20 @class OCMInvocationStub; |
| 21 @class OCMStubRecorder; |
| 22 @class OCMInvocationMatcher; |
| 23 @class OCMInvocationExpectation; |
| 24 |
| 8 @interface OCMockObject : NSProxy | 25 @interface OCMockObject : NSProxy |
| 9 { | 26 { |
| 10 BOOL isNice; | 27 BOOL isNice; |
| 11 BOOL expectationOrderMatters; | 28 BOOL expectationOrderMatters; |
| 12 » NSMutableArray» *recorders; | 29 NSMutableArray* stubs; |
| 13 » NSMutableArray» *expectations; | 30 NSMutableArray* expectations; |
| 14 » NSMutableArray» *rejections; | 31 NSMutableArray» *exceptions; |
| 15 » NSMutableArray» *exceptions; | 32 NSMutableArray* invocations; |
| 16 } | 33 } |
| 17 | 34 |
| 18 + (id)mockForClass:(Class)aClass; | 35 + (id)mockForClass:(Class)aClass; |
| 19 + (id)mockForProtocol:(Protocol *)aProtocol; | 36 + (id)mockForProtocol:(Protocol *)aProtocol; |
| 20 + (id)partialMockForObject:(NSObject *)anObject; | 37 + (id)partialMockForObject:(NSObject *)anObject; |
| 21 | 38 |
| 22 + (id)niceMockForClass:(Class)aClass; | 39 + (id)niceMockForClass:(Class)aClass; |
| 23 + (id)niceMockForProtocol:(Protocol *)aProtocol; | 40 + (id)niceMockForProtocol:(Protocol *)aProtocol; |
| 24 | 41 |
| 25 + (id)observerMock; | 42 + (id)observerMock; |
| 26 | 43 |
| 27 - (id)init; | 44 - (instancetype)init; |
| 28 | 45 |
| 29 - (void)setExpectationOrderMatters:(BOOL)flag; | 46 - (void)setExpectationOrderMatters:(BOOL)flag; |
| 30 | 47 |
| 31 - (id)stub; | 48 - (id)stub; |
| 32 - (id)expect; | 49 - (id)expect; |
| 33 - (id)reject; | 50 - (id)reject; |
| 34 | 51 |
| 35 - (void)verify; | 52 - (id)verify; |
| 53 - (id)verifyAtLocation:(OCMLocation*)location; |
| 54 |
| 55 - (void)verifyWithDelay:(NSTimeInterval)delay; |
| 56 - (void)verifyWithDelay:(NSTimeInterval)delay atLocation:(OCMLocation*)location; |
| 57 |
| 58 - (void)stopMocking; |
| 36 | 59 |
| 37 // internal use only | 60 // internal use only |
| 38 | 61 |
| 39 - (id)getNewRecorder; | 62 - (void)addStub:(OCMInvocationStub*)aStub; |
| 63 - (void)addExpectation:(OCMInvocationExpectation*)anExpectation; |
| 64 |
| 40 - (BOOL)handleInvocation:(NSInvocation *)anInvocation; | 65 - (BOOL)handleInvocation:(NSInvocation *)anInvocation; |
| 41 - (void)handleUnRecordedInvocation:(NSInvocation *)anInvocation; | 66 - (void)handleUnRecordedInvocation:(NSInvocation *)anInvocation; |
| 67 - (BOOL)handleSelector:(SEL)sel; |
| 68 |
| 69 - (void)verifyInvocation:(OCMInvocationMatcher*)matcher; |
| 70 - (void)verifyInvocation:(OCMInvocationMatcher*)matcher |
| 71 atLocation:(OCMLocation*)location; |
| 42 | 72 |
| 43 @end | 73 @end |
| OLD | NEW |