@@ -8,7 +8,7 @@ import XCTest
8
8
9
9
class InAppHelperTests : XCTestCase {
10
10
func testGetInAppMessagesWithNoError( ) {
11
- class MyApiClient : MockApiClient {
11
+ class MyApiClient : BlankApiClient {
12
12
override func getInAppMessages( _: NSNumber ) -> Pending < SendRequestValue , SendRequestError > {
13
13
let payload = TestInAppPayloadGenerator . createPayloadWithUrl ( numMessages: 3 )
14
14
return Fulfill < SendRequestValue , SendRequestError > ( value: payload)
@@ -28,7 +28,7 @@ class InAppHelperTests: XCTestCase {
28
28
// the second message should be consumed because it has a message id
29
29
let expectation1 = expectation ( description: " in app consume is called for message with error " )
30
30
31
- class MyApiClient : MockApiClient {
31
+ class MyApiClient : BlankApiClient {
32
32
let expectation : XCTestExpectation
33
33
34
34
init ( expectation: XCTestExpectation ) {
@@ -92,87 +92,4 @@ class InAppHelperTests: XCTestCase {
92
92
XCTFail ( " expected regular url " )
93
93
}
94
94
}
95
-
96
- private class MockApiClient : ApiClientProtocol {
97
- func register( registerTokenInfo _: RegisterTokenInfo ,
98
- notificationsEnabled _: Bool ) -> Pending < SendRequestValue , SendRequestError > {
99
- fatalError ( )
100
- }
101
-
102
- func updateUser( _: [ AnyHashable : Any ] , mergeNestedObjects _: Bool ) -> Pending < SendRequestValue , SendRequestError > {
103
- fatalError ( )
104
- }
105
-
106
- func updateEmail( newEmail _: String ) -> Pending < SendRequestValue , SendRequestError > {
107
- fatalError ( )
108
- }
109
-
110
- func updateCart( items: [ CommerceItem ] ) -> Pending < SendRequestValue , SendRequestError > {
111
- fatalError ( )
112
- }
113
-
114
- func track( purchase _: NSNumber , items _: [ CommerceItem ] , dataFields _: [ AnyHashable : Any ] ? , campaignId _: NSNumber ? , templateId _: NSNumber ? ) -> Pending < SendRequestValue , SendRequestError > {
115
- fatalError ( )
116
- }
117
-
118
- func track( pushOpen _: NSNumber , templateId _: NSNumber ? , messageId _: String , appAlreadyRunning _: Bool , dataFields _: [ AnyHashable : Any ] ? ) -> Pending < SendRequestValue , SendRequestError > {
119
- fatalError ( )
120
- }
121
-
122
- func track( event _: String , dataFields _: [ AnyHashable : Any ] ? ) -> Pending < SendRequestValue , SendRequestError > {
123
- fatalError ( )
124
- }
125
-
126
- func updateSubscriptions( _: [ NSNumber ] ? , unsubscribedChannelIds _: [ NSNumber ] ? , unsubscribedMessageTypeIds _: [ NSNumber ] ? , subscribedMessageTypeIds _: [ NSNumber ] ? , campaignId _: NSNumber ? , templateId _: NSNumber ? ) -> Pending < SendRequestValue , SendRequestError > {
127
- fatalError ( )
128
- }
129
-
130
- func getInAppMessages( _: NSNumber ) -> Pending < SendRequestValue , SendRequestError > {
131
- fatalError ( )
132
- }
133
-
134
- func track( inAppOpen _: String ) -> Pending < SendRequestValue , SendRequestError > {
135
- fatalError ( )
136
- }
137
-
138
- func track( inAppOpen _: InAppMessageContext ) -> Pending < SendRequestValue , SendRequestError > {
139
- fatalError ( )
140
- }
141
-
142
- func track( inAppClick _: String , clickedUrl _: String ) -> Pending < SendRequestValue , SendRequestError > {
143
- fatalError ( )
144
- }
145
-
146
- func track( inAppClick _: InAppMessageContext , clickedUrl _: String ) -> Pending < SendRequestValue , SendRequestError > {
147
- fatalError ( )
148
- }
149
-
150
- func track( inAppClose _: InAppMessageContext , source _: InAppCloseSource ? , clickedUrl _: String ? ) -> Pending < SendRequestValue , SendRequestError > {
151
- fatalError ( )
152
- }
153
-
154
- func track( inAppDelivery _: InAppMessageContext ) -> Pending < SendRequestValue , SendRequestError > {
155
- fatalError ( )
156
- }
157
-
158
- func inAppConsume( messageId _: String ) -> Pending < SendRequestValue , SendRequestError > {
159
- fatalError ( )
160
- }
161
-
162
- func inAppConsume( inAppMessageContext _: InAppMessageContext , source _: InAppDeleteSource ? ) -> Pending < SendRequestValue , SendRequestError > {
163
- fatalError ( )
164
- }
165
-
166
- func track( inboxSession _: IterableInboxSession ) -> Pending < SendRequestValue , SendRequestError > {
167
- fatalError ( )
168
- }
169
-
170
- func disableDevice( forAllUsers _: Bool , hexToken _: String ) -> Pending < SendRequestValue , SendRequestError > {
171
- fatalError ( )
172
- }
173
-
174
- func getRemoteConfiguration( ) -> Pending < RemoteConfiguration , SendRequestError > {
175
- fatalError ( )
176
- }
177
- }
178
95
}
0 commit comments