gambard | d8d4403 | 2017-02-09 15:41:46 | [diff] [blame] | 1 | /* |
Marijn Kruisselbrink | 1b7c4895 | 2023-08-31 16:58:34 | [diff] [blame] | 2 | * Copyright (c) 2014-2021 Erik Doernenburg and contributors |
gambard | d8d4403 | 2017-02-09 15:41:46 | [diff] [blame] | 3 | * |
| 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 | */ |
| 16 | |
| 17 | #import <Foundation/Foundation.h> |
| 18 | |
| 19 | @class OCMockObject; |
| 20 | @class OCMInvocationMatcher; |
| 21 | |
| 22 | |
| 23 | @interface OCMRecorder : NSProxy |
| 24 | { |
| 25 | OCMockObject *mockObject; |
| 26 | OCMInvocationMatcher *invocationMatcher; |
Marijn Kruisselbrink | 1b7c4895 | 2023-08-31 16:58:34 | [diff] [blame] | 27 | BOOL didRecordInvocation; |
| 28 | BOOL shouldReturnMockFromInit; |
gambard | d8d4403 | 2017-02-09 15:41:46 | [diff] [blame] | 29 | } |
| 30 | |
| 31 | - (instancetype)init; |
| 32 | - (instancetype)initWithMockObject:(OCMockObject *)aMockObject; |
| 33 | |
| 34 | - (void)setMockObject:(OCMockObject *)aMockObject; |
Marijn Kruisselbrink | 1b7c4895 | 2023-08-31 16:58:34 | [diff] [blame] | 35 | - (void)setShouldReturnMockFromInit:(BOOL)flag; |
gambard | d8d4403 | 2017-02-09 15:41:46 | [diff] [blame] | 36 | |
| 37 | - (OCMInvocationMatcher *)invocationMatcher; |
Marijn Kruisselbrink | 1b7c4895 | 2023-08-31 16:58:34 | [diff] [blame] | 38 | - (BOOL)didRecordInvocation; |
gambard | d8d4403 | 2017-02-09 15:41:46 | [diff] [blame] | 39 | |
| 40 | - (id)classMethod; |
| 41 | - (id)ignoringNonObjectArgs; |
| 42 | |
| 43 | @end |
Marijn Kruisselbrink | 1b7c4895 | 2023-08-31 16:58:34 | [diff] [blame] | 44 | |
| 45 | @interface OCMRecorder (Properties) |
| 46 | |
| 47 | #define ignoringNonObjectArgs() _ignoringNonObjectArgs() |
| 48 | @property(nonatomic, readonly) OCMRecorder * (^_ignoringNonObjectArgs)(void); |
| 49 | |
| 50 | @end |