]> git.saurik.com Git - apple/security.git/blob - SharedMocks/NSXPCConnectionMock.m
Security-59306.11.20.tar.gz
[apple/security.git] / SharedMocks / NSXPCConnectionMock.m
1 //
2 // NSXPCConnectionMock.m
3 // Security_ios
4 //
5 // Created by Love Hörnquist Åstrand on 12/16/18.
6 //
7
8 #import "NSXPCConnectionMock.h"
9
10 @interface NSXPCConnectionMock ()
11 @property id reality;
12 @end
13
14 @implementation NSXPCConnectionMock
15 - (instancetype) initWithRealObject:(id)reality
16 {
17 self = [super init];
18 if (self) {
19 _reality = reality;
20 }
21 return self;
22 }
23 - (id)remoteObjectProxyWithErrorHandler:(void(^)(NSError * _Nonnull error))failureHandler
24 {
25 (void)failureHandler;
26 return _reality;
27 }
28 - (id)synchronousRemoteObjectProxyWithErrorHandler:(void(^)(NSError * _Nonnull error))failureHandler
29 {
30 (void)failureHandler;
31 return _reality;
32 }
33
34 @end