2
2
// in instabug_flutter/test/network_logger_test.dart.
3
3
// Do not manually edit this file.
4
4
5
- import 'dart:_http' as _i2;
6
- import 'dart:async' as _i3;
7
- import 'dart:io' as _i4;
5
+ import 'dart:async' as _i4;
6
+ import 'dart:io' as _i3;
8
7
9
8
import 'package:instabug_flutter/models/network_data.dart' as _i6;
10
9
import 'package:instabug_flutter/utils/http_client_logger.dart' as _i5;
@@ -19,13 +18,22 @@ import 'package:mockito/mockito.dart' as _i1;
19
18
20
19
class _FakeDuration extends _i1.Fake implements Duration {}
21
20
22
- class _FakeHttpClientRequest extends _i1.Fake implements _i2 .HttpClientRequest {
21
+ class _FakeHttpClientRequest extends _i1.Fake implements _i3 .HttpClientRequest {
23
22
}
24
23
24
+ class _FakeUri extends _i1.Fake implements Uri {}
25
+
26
+ class _FakeHttpHeaders extends _i1.Fake implements _i3.HttpHeaders {}
27
+
28
+ class _FakeHttpClientResponse extends _i1.Fake
29
+ implements _i3.HttpClientResponse {}
30
+
31
+ class _FakeSocket extends _i1.Fake implements _i3.Socket {}
32
+
25
33
/// A class which mocks [HttpClient] .
26
34
///
27
35
/// See the documentation for Mockito's code generation for more information.
28
- class MockHttpClient extends _i1.Mock implements _i2 .HttpClient {
36
+ class MockHttpClient extends _i1.Mock implements _i3 .HttpClient {
29
37
MockHttpClient () {
30
38
_i1.throwOnMissingStub (this );
31
39
}
@@ -59,7 +67,7 @@ class MockHttpClient extends _i1.Mock implements _i2.HttpClient {
59
67
super .noSuchMethod (Invocation .setter (#userAgent, _userAgent),
60
68
returnValueForMissingStub: null );
61
69
@override
62
- set authenticate (_i3 .Future <bool > Function (Uri , String , String )? f) =>
70
+ set authenticate (_i4 .Future <bool > Function (Uri , String , String )? f) =>
63
71
super .noSuchMethod (Invocation .setter (#authenticate, f),
64
72
returnValueForMissingStub: null );
65
73
@override
@@ -68,114 +76,114 @@ class MockHttpClient extends _i1.Mock implements _i2.HttpClient {
68
76
returnValueForMissingStub: null );
69
77
@override
70
78
set authenticateProxy (
71
- _i3 .Future <bool > Function (String , int , String , String )? f) =>
79
+ _i4 .Future <bool > Function (String , int , String , String )? f) =>
72
80
super .noSuchMethod (Invocation .setter (#authenticateProxy, f),
73
81
returnValueForMissingStub: null );
74
82
@override
75
83
set badCertificateCallback (
76
- bool Function (_i4 .X509Certificate , String , int )? callback) =>
84
+ bool Function (_i3 .X509Certificate , String , int )? callback) =>
77
85
super .noSuchMethod (Invocation .setter (#badCertificateCallback, callback),
78
86
returnValueForMissingStub: null );
79
87
@override
80
- _i3 .Future <_i2 .HttpClientRequest > open (
88
+ _i4 .Future <_i3 .HttpClientRequest > open (
81
89
String ? method, String ? host, int ? port, String ? path) =>
82
90
(super .noSuchMethod (Invocation .method (#open, [method, host, port, path]),
83
91
returnValue:
84
- Future <_i2 .HttpClientRequest >.value (_FakeHttpClientRequest ()))
85
- as _i3 .Future <_i2 .HttpClientRequest >);
92
+ Future <_i3 .HttpClientRequest >.value (_FakeHttpClientRequest ()))
93
+ as _i4 .Future <_i3 .HttpClientRequest >);
86
94
@override
87
- _i3 .Future <_i2 .HttpClientRequest > openUrl (String ? method, Uri ? url) =>
95
+ _i4 .Future <_i3 .HttpClientRequest > openUrl (String ? method, Uri ? url) =>
88
96
(super .noSuchMethod (Invocation .method (#openUrl, [method, url]),
89
97
returnValue:
90
- Future <_i2 .HttpClientRequest >.value (_FakeHttpClientRequest ()))
91
- as _i3 .Future <_i2 .HttpClientRequest >);
98
+ Future <_i3 .HttpClientRequest >.value (_FakeHttpClientRequest ()))
99
+ as _i4 .Future <_i3 .HttpClientRequest >);
92
100
@override
93
- _i3 .Future <_i2 .HttpClientRequest > get (
101
+ _i4 .Future <_i3 .HttpClientRequest > get (
94
102
String ? host, int ? port, String ? path) =>
95
103
(super .noSuchMethod (Invocation .method (#get , [host, port, path]),
96
104
returnValue:
97
- Future <_i2 .HttpClientRequest >.value (_FakeHttpClientRequest ()))
98
- as _i3 .Future <_i2 .HttpClientRequest >);
105
+ Future <_i3 .HttpClientRequest >.value (_FakeHttpClientRequest ()))
106
+ as _i4 .Future <_i3 .HttpClientRequest >);
99
107
@override
100
- _i3 .Future <_i2 .HttpClientRequest > getUrl (Uri ? url) =>
108
+ _i4 .Future <_i3 .HttpClientRequest > getUrl (Uri ? url) =>
101
109
(super .noSuchMethod (Invocation .method (#getUrl, [url]),
102
110
returnValue:
103
- Future <_i2 .HttpClientRequest >.value (_FakeHttpClientRequest ()))
104
- as _i3 .Future <_i2 .HttpClientRequest >);
111
+ Future <_i3 .HttpClientRequest >.value (_FakeHttpClientRequest ()))
112
+ as _i4 .Future <_i3 .HttpClientRequest >);
105
113
@override
106
- _i3 .Future <_i2 .HttpClientRequest > post (
114
+ _i4 .Future <_i3 .HttpClientRequest > post (
107
115
String ? host, int ? port, String ? path) =>
108
116
(super .noSuchMethod (Invocation .method (#post, [host, port, path]),
109
117
returnValue:
110
- Future <_i2 .HttpClientRequest >.value (_FakeHttpClientRequest ()))
111
- as _i3 .Future <_i2 .HttpClientRequest >);
118
+ Future <_i3 .HttpClientRequest >.value (_FakeHttpClientRequest ()))
119
+ as _i4 .Future <_i3 .HttpClientRequest >);
112
120
@override
113
- _i3 .Future <_i2 .HttpClientRequest > postUrl (Uri ? url) =>
121
+ _i4 .Future <_i3 .HttpClientRequest > postUrl (Uri ? url) =>
114
122
(super .noSuchMethod (Invocation .method (#postUrl, [url]),
115
123
returnValue:
116
- Future <_i2 .HttpClientRequest >.value (_FakeHttpClientRequest ()))
117
- as _i3 .Future <_i2 .HttpClientRequest >);
124
+ Future <_i3 .HttpClientRequest >.value (_FakeHttpClientRequest ()))
125
+ as _i4 .Future <_i3 .HttpClientRequest >);
118
126
@override
119
- _i3 .Future <_i2 .HttpClientRequest > put (
127
+ _i4 .Future <_i3 .HttpClientRequest > put (
120
128
String ? host, int ? port, String ? path) =>
121
129
(super .noSuchMethod (Invocation .method (#put, [host, port, path]),
122
130
returnValue:
123
- Future <_i2 .HttpClientRequest >.value (_FakeHttpClientRequest ()))
124
- as _i3 .Future <_i2 .HttpClientRequest >);
131
+ Future <_i3 .HttpClientRequest >.value (_FakeHttpClientRequest ()))
132
+ as _i4 .Future <_i3 .HttpClientRequest >);
125
133
@override
126
- _i3 .Future <_i2 .HttpClientRequest > putUrl (Uri ? url) =>
134
+ _i4 .Future <_i3 .HttpClientRequest > putUrl (Uri ? url) =>
127
135
(super .noSuchMethod (Invocation .method (#putUrl, [url]),
128
136
returnValue:
129
- Future <_i2 .HttpClientRequest >.value (_FakeHttpClientRequest ()))
130
- as _i3 .Future <_i2 .HttpClientRequest >);
137
+ Future <_i3 .HttpClientRequest >.value (_FakeHttpClientRequest ()))
138
+ as _i4 .Future <_i3 .HttpClientRequest >);
131
139
@override
132
- _i3 .Future <_i2 .HttpClientRequest > delete (
140
+ _i4 .Future <_i3 .HttpClientRequest > delete (
133
141
String ? host, int ? port, String ? path) =>
134
142
(super .noSuchMethod (Invocation .method (#delete, [host, port, path]),
135
143
returnValue:
136
- Future <_i2 .HttpClientRequest >.value (_FakeHttpClientRequest ()))
137
- as _i3 .Future <_i2 .HttpClientRequest >);
144
+ Future <_i3 .HttpClientRequest >.value (_FakeHttpClientRequest ()))
145
+ as _i4 .Future <_i3 .HttpClientRequest >);
138
146
@override
139
- _i3 .Future <_i2 .HttpClientRequest > deleteUrl (Uri ? url) =>
147
+ _i4 .Future <_i3 .HttpClientRequest > deleteUrl (Uri ? url) =>
140
148
(super .noSuchMethod (Invocation .method (#deleteUrl, [url]),
141
149
returnValue:
142
- Future <_i2 .HttpClientRequest >.value (_FakeHttpClientRequest ()))
143
- as _i3 .Future <_i2 .HttpClientRequest >);
150
+ Future <_i3 .HttpClientRequest >.value (_FakeHttpClientRequest ()))
151
+ as _i4 .Future <_i3 .HttpClientRequest >);
144
152
@override
145
- _i3 .Future <_i2 .HttpClientRequest > patch (
153
+ _i4 .Future <_i3 .HttpClientRequest > patch (
146
154
String ? host, int ? port, String ? path) =>
147
155
(super .noSuchMethod (Invocation .method (#patch, [host, port, path]),
148
156
returnValue:
149
- Future <_i2 .HttpClientRequest >.value (_FakeHttpClientRequest ()))
150
- as _i3 .Future <_i2 .HttpClientRequest >);
157
+ Future <_i3 .HttpClientRequest >.value (_FakeHttpClientRequest ()))
158
+ as _i4 .Future <_i3 .HttpClientRequest >);
151
159
@override
152
- _i3 .Future <_i2 .HttpClientRequest > patchUrl (Uri ? url) =>
160
+ _i4 .Future <_i3 .HttpClientRequest > patchUrl (Uri ? url) =>
153
161
(super .noSuchMethod (Invocation .method (#patchUrl, [url]),
154
162
returnValue:
155
- Future <_i2 .HttpClientRequest >.value (_FakeHttpClientRequest ()))
156
- as _i3 .Future <_i2 .HttpClientRequest >);
163
+ Future <_i3 .HttpClientRequest >.value (_FakeHttpClientRequest ()))
164
+ as _i4 .Future <_i3 .HttpClientRequest >);
157
165
@override
158
- _i3 .Future <_i2 .HttpClientRequest > head (
166
+ _i4 .Future <_i3 .HttpClientRequest > head (
159
167
String ? host, int ? port, String ? path) =>
160
168
(super .noSuchMethod (Invocation .method (#head, [host, port, path]),
161
169
returnValue:
162
- Future <_i2 .HttpClientRequest >.value (_FakeHttpClientRequest ()))
163
- as _i3 .Future <_i2 .HttpClientRequest >);
170
+ Future <_i3 .HttpClientRequest >.value (_FakeHttpClientRequest ()))
171
+ as _i4 .Future <_i3 .HttpClientRequest >);
164
172
@override
165
- _i3 .Future <_i2 .HttpClientRequest > headUrl (Uri ? url) =>
173
+ _i4 .Future <_i3 .HttpClientRequest > headUrl (Uri ? url) =>
166
174
(super .noSuchMethod (Invocation .method (#headUrl, [url]),
167
175
returnValue:
168
- Future <_i2 .HttpClientRequest >.value (_FakeHttpClientRequest ()))
169
- as _i3 .Future <_i2 .HttpClientRequest >);
176
+ Future <_i3 .HttpClientRequest >.value (_FakeHttpClientRequest ()))
177
+ as _i4 .Future <_i3 .HttpClientRequest >);
170
178
@override
171
179
void addCredentials (
172
- Uri ? url, String ? realm, _i2 .HttpClientCredentials ? credentials) =>
180
+ Uri ? url, String ? realm, _i3 .HttpClientCredentials ? credentials) =>
173
181
super .noSuchMethod (
174
182
Invocation .method (#addCredentials, [url, realm, credentials]),
175
183
returnValueForMissingStub: null );
176
184
@override
177
185
void addProxyCredentials (String ? host, int ? port, String ? realm,
178
- _i2 .HttpClientCredentials ? credentials) =>
186
+ _i3 .HttpClientCredentials ? credentials) =>
179
187
super .noSuchMethod (
180
188
Invocation .method (
181
189
#addProxyCredentials, [host, port, realm, credentials]),
@@ -199,16 +207,165 @@ class MockHttpClientLogger extends _i1.Mock implements _i5.HttpClientLogger {
199
207
(super .noSuchMethod (Invocation .getter (#requests),
200
208
returnValue: < int , _i6.NetworkData > {}) as Map <int , _i6.NetworkData >);
201
209
@override
202
- void onRequest (_i2 .HttpClientRequest ? request, {dynamic requestBody}) =>
210
+ void onRequest (_i3 .HttpClientRequest ? request, {dynamic requestBody}) =>
203
211
super .noSuchMethod (
204
212
Invocation .method (#onRequest, [request], {#requestBody: requestBody}),
205
213
returnValueForMissingStub: null );
206
214
@override
207
215
void onResponse (
208
- _i2 .HttpClientResponse ? response, _i2 .HttpClientRequest ? request,
216
+ _i3 .HttpClientResponse ? response, _i3 .HttpClientRequest ? request,
209
217
{dynamic responseBody}) =>
210
218
super .noSuchMethod (
211
219
Invocation .method (
212
220
#onResponse, [response, request], {#responseBody: responseBody}),
213
221
returnValueForMissingStub: null );
214
222
}
223
+
224
+ /// A class which mocks [HttpClientRequest] .
225
+ ///
226
+ /// See the documentation for Mockito's code generation for more information.
227
+ class MockHttpClientRequest extends _i1.Mock implements _i3.HttpClientRequest {
228
+ MockHttpClientRequest () {
229
+ _i1.throwOnMissingStub (this );
230
+ }
231
+
232
+ @override
233
+ bool get persistentConnection =>
234
+ (super .noSuchMethod (Invocation .getter (#persistentConnection),
235
+ returnValue: false ) as bool );
236
+ @override
237
+ set persistentConnection (bool ? _persistentConnection) => super .noSuchMethod (
238
+ Invocation .setter (#persistentConnection, _persistentConnection),
239
+ returnValueForMissingStub: null );
240
+ @override
241
+ bool get followRedirects => (super
242
+ .noSuchMethod (Invocation .getter (#followRedirects), returnValue: false )
243
+ as bool );
244
+ @override
245
+ set followRedirects (bool ? _followRedirects) =>
246
+ super .noSuchMethod (Invocation .setter (#followRedirects, _followRedirects),
247
+ returnValueForMissingStub: null );
248
+ @override
249
+ int get maxRedirects =>
250
+ (super .noSuchMethod (Invocation .getter (#maxRedirects), returnValue: 0 )
251
+ as int );
252
+ @override
253
+ set maxRedirects (int ? _maxRedirects) =>
254
+ super .noSuchMethod (Invocation .setter (#maxRedirects, _maxRedirects),
255
+ returnValueForMissingStub: null );
256
+ @override
257
+ int get contentLength =>
258
+ (super .noSuchMethod (Invocation .getter (#contentLength), returnValue: 0 )
259
+ as int );
260
+ @override
261
+ set contentLength (int ? _contentLength) =>
262
+ super .noSuchMethod (Invocation .setter (#contentLength, _contentLength),
263
+ returnValueForMissingStub: null );
264
+ @override
265
+ bool get bufferOutput =>
266
+ (super .noSuchMethod (Invocation .getter (#bufferOutput), returnValue: false )
267
+ as bool );
268
+ @override
269
+ set bufferOutput (bool ? _bufferOutput) =>
270
+ super .noSuchMethod (Invocation .setter (#bufferOutput, _bufferOutput),
271
+ returnValueForMissingStub: null );
272
+ @override
273
+ String get method =>
274
+ (super .noSuchMethod (Invocation .getter (#method), returnValue: '' )
275
+ as String );
276
+ @override
277
+ Uri get uri =>
278
+ (super .noSuchMethod (Invocation .getter (#uri), returnValue: _FakeUri ())
279
+ as Uri );
280
+ @override
281
+ _i3.HttpHeaders get headers =>
282
+ (super .noSuchMethod (Invocation .getter (#headers),
283
+ returnValue: _FakeHttpHeaders ()) as _i3.HttpHeaders );
284
+ @override
285
+ List <_i3.Cookie > get cookies =>
286
+ (super .noSuchMethod (Invocation .getter (#cookies),
287
+ returnValue: < _i3.Cookie > []) as List <_i3.Cookie >);
288
+ @override
289
+ _i4.Future <_i3.HttpClientResponse > get done => (super .noSuchMethod (
290
+ Invocation .getter (#done),
291
+ returnValue:
292
+ Future <_i3.HttpClientResponse >.value (_FakeHttpClientResponse ()))
293
+ as _i4.Future <_i3.HttpClientResponse >);
294
+ @override
295
+ _i4.Future <_i3.HttpClientResponse > close () async => MockHttpClientResponse ();
296
+ @override
297
+ void abort ([Object ? exception, StackTrace ? stackTrace]) =>
298
+ super .noSuchMethod (Invocation .method (#abort, [exception, stackTrace]),
299
+ returnValueForMissingStub: null );
300
+ }
301
+
302
+ /// A class which mocks [HttpClientResponse] .
303
+ ///
304
+ /// See the documentation for Mockito's code generation for more information.
305
+ class MockHttpClientResponse extends _i1.Mock
306
+ implements _i3.HttpClientResponse {
307
+ MockHttpClientResponse () {
308
+ _i1.throwOnMissingStub (this );
309
+ }
310
+
311
+ @override
312
+ int get statusCode =>
313
+ (super .noSuchMethod (Invocation .getter (#statusCode), returnValue: 0 )
314
+ as int );
315
+ @override
316
+ String get reasonPhrase =>
317
+ (super .noSuchMethod (Invocation .getter (#reasonPhrase), returnValue: '' )
318
+ as String );
319
+ @override
320
+ int get contentLength =>
321
+ (super .noSuchMethod (Invocation .getter (#contentLength), returnValue: 0 )
322
+ as int );
323
+ @override
324
+ _i3.HttpClientResponseCompressionState get compressionState =>
325
+ (super .noSuchMethod (Invocation .getter (#compressionState),
326
+ returnValue: _i3.HttpClientResponseCompressionState .notCompressed)
327
+ as _i3.HttpClientResponseCompressionState );
328
+ @override
329
+ bool get persistentConnection =>
330
+ (super .noSuchMethod (Invocation .getter (#persistentConnection),
331
+ returnValue: false ) as bool );
332
+ @override
333
+ bool get isRedirect =>
334
+ (super .noSuchMethod (Invocation .getter (#isRedirect), returnValue: false )
335
+ as bool );
336
+ @override
337
+ List <_i3.RedirectInfo > get redirects =>
338
+ (super .noSuchMethod (Invocation .getter (#redirects),
339
+ returnValue: < _i3.RedirectInfo > []) as List <_i3.RedirectInfo >);
340
+ @override
341
+ _i3.HttpHeaders get headers =>
342
+ (super .noSuchMethod (Invocation .getter (#headers),
343
+ returnValue: _FakeHttpHeaders ()) as _i3.HttpHeaders );
344
+ @override
345
+ List <_i3.Cookie > get cookies =>
346
+ (super .noSuchMethod (Invocation .getter (#cookies),
347
+ returnValue: < _i3.Cookie > []) as List <_i3.Cookie >);
348
+ @override
349
+ _i4.Future <_i3.HttpClientResponse > redirect (
350
+ [String ? method, Uri ? url, bool ? followLoops]) =>
351
+ (super .noSuchMethod (
352
+ Invocation .method (#redirect, [method, url, followLoops]),
353
+ returnValue: Future <_i3.HttpClientResponse >.value (
354
+ _FakeHttpClientResponse ()))
355
+ as _i4.Future <_i3.HttpClientResponse >);
356
+ @override
357
+ _i4.Future <_i3.Socket > detachSocket () =>
358
+ (super .noSuchMethod (Invocation .method (#detachSocket, []),
359
+ returnValue: Future <_i3.Socket >.value (_FakeSocket ()))
360
+ as _i4.Future <_i3.Socket >);
361
+ }
362
+
363
+ /// A class which mocks [HttpClientCredentials] .
364
+ ///
365
+ /// See the documentation for Mockito's code generation for more information.
366
+ class MockHttpClientCredentials extends _i1.Mock
367
+ implements _i3.HttpClientCredentials {
368
+ MockHttpClientCredentials () {
369
+ _i1.throwOnMissingStub (this );
370
+ }
371
+ }
0 commit comments