]> git.saurik.com Git - apple/security.git/blob - SharedMocks/NSXPCConnectionMock.m
Security-59754.80.3.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 if ((self = [super init])) {
18 _reality = reality;
19 }
20 return self;
21 }
22 - (id)remoteObjectProxyWithErrorHandler:(void(^)(NSError * _Nonnull error))failureHandler
23 {
24 (void)failureHandler;
25 return _reality;
26 }
27 - (id)synchronousRemoteObjectProxyWithErrorHandler:(void(^)(NSError * _Nonnull error))failureHandler
28 {
29 (void)failureHandler;
30 return _reality;
31 }
32
33 @end