OLD | NEW |
1 library googleapis_beta.proximitybeacon.v1beta1.test; | 1 library googleapis_beta.proximitybeacon.v1beta1.test; |
2 | 2 |
3 import "dart:core" as core; | 3 import "dart:core" as core; |
4 import "dart:collection" as collection; | 4 import "dart:collection" as collection; |
5 import "dart:async" as async; | 5 import "dart:async" as async; |
6 import "dart:convert" as convert; | 6 import "dart:convert" as convert; |
7 | 7 |
8 import 'package:http/http.dart' as http; | 8 import 'package:http/http.dart' as http; |
9 import 'package:http/testing.dart' as http_testing; | 9 import 'package:http/testing.dart' as http_testing; |
10 import 'package:test/test.dart' as unittest; | 10 import 'package:test/test.dart' as unittest; |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
86 | 86 |
87 checkAttachmentInfo(api.AttachmentInfo o) { | 87 checkAttachmentInfo(api.AttachmentInfo o) { |
88 buildCounterAttachmentInfo++; | 88 buildCounterAttachmentInfo++; |
89 if (buildCounterAttachmentInfo < 3) { | 89 if (buildCounterAttachmentInfo < 3) { |
90 unittest.expect(o.data, unittest.equals('foo')); | 90 unittest.expect(o.data, unittest.equals('foo')); |
91 unittest.expect(o.namespacedType, unittest.equals('foo')); | 91 unittest.expect(o.namespacedType, unittest.equals('foo')); |
92 } | 92 } |
93 buildCounterAttachmentInfo--; | 93 buildCounterAttachmentInfo--; |
94 } | 94 } |
95 | 95 |
96 buildUnnamed3427() { | 96 buildUnnamed3459() { |
97 var o = new core.Map<core.String, core.String>(); | 97 var o = new core.Map<core.String, core.String>(); |
98 o["x"] = "foo"; | 98 o["x"] = "foo"; |
99 o["y"] = "foo"; | 99 o["y"] = "foo"; |
100 return o; | 100 return o; |
101 } | 101 } |
102 | 102 |
103 checkUnnamed3427(core.Map<core.String, core.String> o) { | 103 checkUnnamed3459(core.Map<core.String, core.String> o) { |
104 unittest.expect(o, unittest.hasLength(2)); | 104 unittest.expect(o, unittest.hasLength(2)); |
105 unittest.expect(o["x"], unittest.equals('foo')); | 105 unittest.expect(o["x"], unittest.equals('foo')); |
106 unittest.expect(o["y"], unittest.equals('foo')); | 106 unittest.expect(o["y"], unittest.equals('foo')); |
107 } | 107 } |
108 | 108 |
109 core.int buildCounterBeacon = 0; | 109 core.int buildCounterBeacon = 0; |
110 buildBeacon() { | 110 buildBeacon() { |
111 var o = new api.Beacon(); | 111 var o = new api.Beacon(); |
112 buildCounterBeacon++; | 112 buildCounterBeacon++; |
113 if (buildCounterBeacon < 3) { | 113 if (buildCounterBeacon < 3) { |
114 o.advertisedId = buildAdvertisedId(); | 114 o.advertisedId = buildAdvertisedId(); |
115 o.beaconName = "foo"; | 115 o.beaconName = "foo"; |
116 o.description = "foo"; | 116 o.description = "foo"; |
117 o.ephemeralIdRegistration = buildEphemeralIdRegistration(); | 117 o.ephemeralIdRegistration = buildEphemeralIdRegistration(); |
118 o.expectedStability = "foo"; | 118 o.expectedStability = "foo"; |
119 o.indoorLevel = buildIndoorLevel(); | 119 o.indoorLevel = buildIndoorLevel(); |
120 o.latLng = buildLatLng(); | 120 o.latLng = buildLatLng(); |
121 o.placeId = "foo"; | 121 o.placeId = "foo"; |
122 o.properties = buildUnnamed3427(); | 122 o.properties = buildUnnamed3459(); |
123 o.provisioningKey = "foo"; | 123 o.provisioningKey = "foo"; |
124 o.status = "foo"; | 124 o.status = "foo"; |
125 } | 125 } |
126 buildCounterBeacon--; | 126 buildCounterBeacon--; |
127 return o; | 127 return o; |
128 } | 128 } |
129 | 129 |
130 checkBeacon(api.Beacon o) { | 130 checkBeacon(api.Beacon o) { |
131 buildCounterBeacon++; | 131 buildCounterBeacon++; |
132 if (buildCounterBeacon < 3) { | 132 if (buildCounterBeacon < 3) { |
133 checkAdvertisedId(o.advertisedId); | 133 checkAdvertisedId(o.advertisedId); |
134 unittest.expect(o.beaconName, unittest.equals('foo')); | 134 unittest.expect(o.beaconName, unittest.equals('foo')); |
135 unittest.expect(o.description, unittest.equals('foo')); | 135 unittest.expect(o.description, unittest.equals('foo')); |
136 checkEphemeralIdRegistration(o.ephemeralIdRegistration); | 136 checkEphemeralIdRegistration(o.ephemeralIdRegistration); |
137 unittest.expect(o.expectedStability, unittest.equals('foo')); | 137 unittest.expect(o.expectedStability, unittest.equals('foo')); |
138 checkIndoorLevel(o.indoorLevel); | 138 checkIndoorLevel(o.indoorLevel); |
139 checkLatLng(o.latLng); | 139 checkLatLng(o.latLng); |
140 unittest.expect(o.placeId, unittest.equals('foo')); | 140 unittest.expect(o.placeId, unittest.equals('foo')); |
141 checkUnnamed3427(o.properties); | 141 checkUnnamed3459(o.properties); |
142 unittest.expect(o.provisioningKey, unittest.equals('foo')); | 142 unittest.expect(o.provisioningKey, unittest.equals('foo')); |
143 unittest.expect(o.status, unittest.equals('foo')); | 143 unittest.expect(o.status, unittest.equals('foo')); |
144 } | 144 } |
145 buildCounterBeacon--; | 145 buildCounterBeacon--; |
146 } | 146 } |
147 | 147 |
148 core.int buildCounterBeaconAttachment = 0; | 148 core.int buildCounterBeaconAttachment = 0; |
149 buildBeaconAttachment() { | 149 buildBeaconAttachment() { |
150 var o = new api.BeaconAttachment(); | 150 var o = new api.BeaconAttachment(); |
151 buildCounterBeaconAttachment++; | 151 buildCounterBeaconAttachment++; |
(...skipping 11 matching lines...) Expand all Loading... |
163 buildCounterBeaconAttachment++; | 163 buildCounterBeaconAttachment++; |
164 if (buildCounterBeaconAttachment < 3) { | 164 if (buildCounterBeaconAttachment < 3) { |
165 unittest.expect(o.attachmentName, unittest.equals('foo')); | 165 unittest.expect(o.attachmentName, unittest.equals('foo')); |
166 unittest.expect(o.creationTimeMs, unittest.equals('foo')); | 166 unittest.expect(o.creationTimeMs, unittest.equals('foo')); |
167 unittest.expect(o.data, unittest.equals('foo')); | 167 unittest.expect(o.data, unittest.equals('foo')); |
168 unittest.expect(o.namespacedType, unittest.equals('foo')); | 168 unittest.expect(o.namespacedType, unittest.equals('foo')); |
169 } | 169 } |
170 buildCounterBeaconAttachment--; | 170 buildCounterBeaconAttachment--; |
171 } | 171 } |
172 | 172 |
173 buildUnnamed3428() { | 173 buildUnnamed3460() { |
174 var o = new core.List<api.AttachmentInfo>(); | 174 var o = new core.List<api.AttachmentInfo>(); |
175 o.add(buildAttachmentInfo()); | 175 o.add(buildAttachmentInfo()); |
176 o.add(buildAttachmentInfo()); | 176 o.add(buildAttachmentInfo()); |
177 return o; | 177 return o; |
178 } | 178 } |
179 | 179 |
180 checkUnnamed3428(core.List<api.AttachmentInfo> o) { | 180 checkUnnamed3460(core.List<api.AttachmentInfo> o) { |
181 unittest.expect(o, unittest.hasLength(2)); | 181 unittest.expect(o, unittest.hasLength(2)); |
182 checkAttachmentInfo(o[0]); | 182 checkAttachmentInfo(o[0]); |
183 checkAttachmentInfo(o[1]); | 183 checkAttachmentInfo(o[1]); |
184 } | 184 } |
185 | 185 |
186 core.int buildCounterBeaconInfo = 0; | 186 core.int buildCounterBeaconInfo = 0; |
187 buildBeaconInfo() { | 187 buildBeaconInfo() { |
188 var o = new api.BeaconInfo(); | 188 var o = new api.BeaconInfo(); |
189 buildCounterBeaconInfo++; | 189 buildCounterBeaconInfo++; |
190 if (buildCounterBeaconInfo < 3) { | 190 if (buildCounterBeaconInfo < 3) { |
191 o.advertisedId = buildAdvertisedId(); | 191 o.advertisedId = buildAdvertisedId(); |
192 o.attachments = buildUnnamed3428(); | 192 o.attachments = buildUnnamed3460(); |
193 o.beaconName = "foo"; | 193 o.beaconName = "foo"; |
194 } | 194 } |
195 buildCounterBeaconInfo--; | 195 buildCounterBeaconInfo--; |
196 return o; | 196 return o; |
197 } | 197 } |
198 | 198 |
199 checkBeaconInfo(api.BeaconInfo o) { | 199 checkBeaconInfo(api.BeaconInfo o) { |
200 buildCounterBeaconInfo++; | 200 buildCounterBeaconInfo++; |
201 if (buildCounterBeaconInfo < 3) { | 201 if (buildCounterBeaconInfo < 3) { |
202 checkAdvertisedId(o.advertisedId); | 202 checkAdvertisedId(o.advertisedId); |
203 checkUnnamed3428(o.attachments); | 203 checkUnnamed3460(o.attachments); |
204 unittest.expect(o.beaconName, unittest.equals('foo')); | 204 unittest.expect(o.beaconName, unittest.equals('foo')); |
205 } | 205 } |
206 buildCounterBeaconInfo--; | 206 buildCounterBeaconInfo--; |
207 } | 207 } |
208 | 208 |
209 core.int buildCounterDate = 0; | 209 core.int buildCounterDate = 0; |
210 buildDate() { | 210 buildDate() { |
211 var o = new api.Date(); | 211 var o = new api.Date(); |
212 buildCounterDate++; | 212 buildCounterDate++; |
213 if (buildCounterDate < 3) { | 213 if (buildCounterDate < 3) { |
(...skipping 27 matching lines...) Expand all Loading... |
241 } | 241 } |
242 | 242 |
243 checkDeleteAttachmentsResponse(api.DeleteAttachmentsResponse o) { | 243 checkDeleteAttachmentsResponse(api.DeleteAttachmentsResponse o) { |
244 buildCounterDeleteAttachmentsResponse++; | 244 buildCounterDeleteAttachmentsResponse++; |
245 if (buildCounterDeleteAttachmentsResponse < 3) { | 245 if (buildCounterDeleteAttachmentsResponse < 3) { |
246 unittest.expect(o.numDeleted, unittest.equals(42)); | 246 unittest.expect(o.numDeleted, unittest.equals(42)); |
247 } | 247 } |
248 buildCounterDeleteAttachmentsResponse--; | 248 buildCounterDeleteAttachmentsResponse--; |
249 } | 249 } |
250 | 250 |
251 buildUnnamed3429() { | 251 buildUnnamed3461() { |
252 var o = new core.List<core.String>(); | 252 var o = new core.List<core.String>(); |
253 o.add("foo"); | 253 o.add("foo"); |
254 o.add("foo"); | 254 o.add("foo"); |
255 return o; | 255 return o; |
256 } | 256 } |
257 | 257 |
258 checkUnnamed3429(core.List<core.String> o) { | 258 checkUnnamed3461(core.List<core.String> o) { |
259 unittest.expect(o, unittest.hasLength(2)); | 259 unittest.expect(o, unittest.hasLength(2)); |
260 unittest.expect(o[0], unittest.equals('foo')); | 260 unittest.expect(o[0], unittest.equals('foo')); |
261 unittest.expect(o[1], unittest.equals('foo')); | 261 unittest.expect(o[1], unittest.equals('foo')); |
262 } | 262 } |
263 | 263 |
264 core.int buildCounterDiagnostics = 0; | 264 core.int buildCounterDiagnostics = 0; |
265 buildDiagnostics() { | 265 buildDiagnostics() { |
266 var o = new api.Diagnostics(); | 266 var o = new api.Diagnostics(); |
267 buildCounterDiagnostics++; | 267 buildCounterDiagnostics++; |
268 if (buildCounterDiagnostics < 3) { | 268 if (buildCounterDiagnostics < 3) { |
269 o.alerts = buildUnnamed3429(); | 269 o.alerts = buildUnnamed3461(); |
270 o.beaconName = "foo"; | 270 o.beaconName = "foo"; |
271 o.estimatedLowBatteryDate = buildDate(); | 271 o.estimatedLowBatteryDate = buildDate(); |
272 } | 272 } |
273 buildCounterDiagnostics--; | 273 buildCounterDiagnostics--; |
274 return o; | 274 return o; |
275 } | 275 } |
276 | 276 |
277 checkDiagnostics(api.Diagnostics o) { | 277 checkDiagnostics(api.Diagnostics o) { |
278 buildCounterDiagnostics++; | 278 buildCounterDiagnostics++; |
279 if (buildCounterDiagnostics < 3) { | 279 if (buildCounterDiagnostics < 3) { |
280 checkUnnamed3429(o.alerts); | 280 checkUnnamed3461(o.alerts); |
281 unittest.expect(o.beaconName, unittest.equals('foo')); | 281 unittest.expect(o.beaconName, unittest.equals('foo')); |
282 checkDate(o.estimatedLowBatteryDate); | 282 checkDate(o.estimatedLowBatteryDate); |
283 } | 283 } |
284 buildCounterDiagnostics--; | 284 buildCounterDiagnostics--; |
285 } | 285 } |
286 | 286 |
287 core.int buildCounterEmpty = 0; | 287 core.int buildCounterEmpty = 0; |
288 buildEmpty() { | 288 buildEmpty() { |
289 var o = new api.Empty(); | 289 var o = new api.Empty(); |
290 buildCounterEmpty++; | 290 buildCounterEmpty++; |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
346 checkEphemeralIdRegistrationParams(api.EphemeralIdRegistrationParams o) { | 346 checkEphemeralIdRegistrationParams(api.EphemeralIdRegistrationParams o) { |
347 buildCounterEphemeralIdRegistrationParams++; | 347 buildCounterEphemeralIdRegistrationParams++; |
348 if (buildCounterEphemeralIdRegistrationParams < 3) { | 348 if (buildCounterEphemeralIdRegistrationParams < 3) { |
349 unittest.expect(o.maxRotationPeriodExponent, unittest.equals(42)); | 349 unittest.expect(o.maxRotationPeriodExponent, unittest.equals(42)); |
350 unittest.expect(o.minRotationPeriodExponent, unittest.equals(42)); | 350 unittest.expect(o.minRotationPeriodExponent, unittest.equals(42)); |
351 unittest.expect(o.serviceEcdhPublicKey, unittest.equals('foo')); | 351 unittest.expect(o.serviceEcdhPublicKey, unittest.equals('foo')); |
352 } | 352 } |
353 buildCounterEphemeralIdRegistrationParams--; | 353 buildCounterEphemeralIdRegistrationParams--; |
354 } | 354 } |
355 | 355 |
356 buildUnnamed3430() { | 356 buildUnnamed3462() { |
357 var o = new core.List<core.String>(); | 357 var o = new core.List<core.String>(); |
358 o.add("foo"); | 358 o.add("foo"); |
359 o.add("foo"); | 359 o.add("foo"); |
360 return o; | 360 return o; |
361 } | 361 } |
362 | 362 |
363 checkUnnamed3430(core.List<core.String> o) { | 363 checkUnnamed3462(core.List<core.String> o) { |
364 unittest.expect(o, unittest.hasLength(2)); | 364 unittest.expect(o, unittest.hasLength(2)); |
365 unittest.expect(o[0], unittest.equals('foo')); | 365 unittest.expect(o[0], unittest.equals('foo')); |
366 unittest.expect(o[1], unittest.equals('foo')); | 366 unittest.expect(o[1], unittest.equals('foo')); |
367 } | 367 } |
368 | 368 |
369 buildUnnamed3431() { | 369 buildUnnamed3463() { |
370 var o = new core.List<api.Observation>(); | 370 var o = new core.List<api.Observation>(); |
371 o.add(buildObservation()); | 371 o.add(buildObservation()); |
372 o.add(buildObservation()); | 372 o.add(buildObservation()); |
373 return o; | 373 return o; |
374 } | 374 } |
375 | 375 |
376 checkUnnamed3431(core.List<api.Observation> o) { | 376 checkUnnamed3463(core.List<api.Observation> o) { |
377 unittest.expect(o, unittest.hasLength(2)); | 377 unittest.expect(o, unittest.hasLength(2)); |
378 checkObservation(o[0]); | 378 checkObservation(o[0]); |
379 checkObservation(o[1]); | 379 checkObservation(o[1]); |
380 } | 380 } |
381 | 381 |
382 core.int buildCounterGetInfoForObservedBeaconsRequest = 0; | 382 core.int buildCounterGetInfoForObservedBeaconsRequest = 0; |
383 buildGetInfoForObservedBeaconsRequest() { | 383 buildGetInfoForObservedBeaconsRequest() { |
384 var o = new api.GetInfoForObservedBeaconsRequest(); | 384 var o = new api.GetInfoForObservedBeaconsRequest(); |
385 buildCounterGetInfoForObservedBeaconsRequest++; | 385 buildCounterGetInfoForObservedBeaconsRequest++; |
386 if (buildCounterGetInfoForObservedBeaconsRequest < 3) { | 386 if (buildCounterGetInfoForObservedBeaconsRequest < 3) { |
387 o.namespacedTypes = buildUnnamed3430(); | 387 o.namespacedTypes = buildUnnamed3462(); |
388 o.observations = buildUnnamed3431(); | 388 o.observations = buildUnnamed3463(); |
389 } | 389 } |
390 buildCounterGetInfoForObservedBeaconsRequest--; | 390 buildCounterGetInfoForObservedBeaconsRequest--; |
391 return o; | 391 return o; |
392 } | 392 } |
393 | 393 |
394 checkGetInfoForObservedBeaconsRequest(api.GetInfoForObservedBeaconsRequest o) { | 394 checkGetInfoForObservedBeaconsRequest(api.GetInfoForObservedBeaconsRequest o) { |
395 buildCounterGetInfoForObservedBeaconsRequest++; | 395 buildCounterGetInfoForObservedBeaconsRequest++; |
396 if (buildCounterGetInfoForObservedBeaconsRequest < 3) { | 396 if (buildCounterGetInfoForObservedBeaconsRequest < 3) { |
397 checkUnnamed3430(o.namespacedTypes); | 397 checkUnnamed3462(o.namespacedTypes); |
398 checkUnnamed3431(o.observations); | 398 checkUnnamed3463(o.observations); |
399 } | 399 } |
400 buildCounterGetInfoForObservedBeaconsRequest--; | 400 buildCounterGetInfoForObservedBeaconsRequest--; |
401 } | 401 } |
402 | 402 |
403 buildUnnamed3432() { | 403 buildUnnamed3464() { |
404 var o = new core.List<api.BeaconInfo>(); | 404 var o = new core.List<api.BeaconInfo>(); |
405 o.add(buildBeaconInfo()); | 405 o.add(buildBeaconInfo()); |
406 o.add(buildBeaconInfo()); | 406 o.add(buildBeaconInfo()); |
407 return o; | 407 return o; |
408 } | 408 } |
409 | 409 |
410 checkUnnamed3432(core.List<api.BeaconInfo> o) { | 410 checkUnnamed3464(core.List<api.BeaconInfo> o) { |
411 unittest.expect(o, unittest.hasLength(2)); | 411 unittest.expect(o, unittest.hasLength(2)); |
412 checkBeaconInfo(o[0]); | 412 checkBeaconInfo(o[0]); |
413 checkBeaconInfo(o[1]); | 413 checkBeaconInfo(o[1]); |
414 } | 414 } |
415 | 415 |
416 core.int buildCounterGetInfoForObservedBeaconsResponse = 0; | 416 core.int buildCounterGetInfoForObservedBeaconsResponse = 0; |
417 buildGetInfoForObservedBeaconsResponse() { | 417 buildGetInfoForObservedBeaconsResponse() { |
418 var o = new api.GetInfoForObservedBeaconsResponse(); | 418 var o = new api.GetInfoForObservedBeaconsResponse(); |
419 buildCounterGetInfoForObservedBeaconsResponse++; | 419 buildCounterGetInfoForObservedBeaconsResponse++; |
420 if (buildCounterGetInfoForObservedBeaconsResponse < 3) { | 420 if (buildCounterGetInfoForObservedBeaconsResponse < 3) { |
421 o.beacons = buildUnnamed3432(); | 421 o.beacons = buildUnnamed3464(); |
422 } | 422 } |
423 buildCounterGetInfoForObservedBeaconsResponse--; | 423 buildCounterGetInfoForObservedBeaconsResponse--; |
424 return o; | 424 return o; |
425 } | 425 } |
426 | 426 |
427 checkGetInfoForObservedBeaconsResponse(api.GetInfoForObservedBeaconsResponse o)
{ | 427 checkGetInfoForObservedBeaconsResponse(api.GetInfoForObservedBeaconsResponse o)
{ |
428 buildCounterGetInfoForObservedBeaconsResponse++; | 428 buildCounterGetInfoForObservedBeaconsResponse++; |
429 if (buildCounterGetInfoForObservedBeaconsResponse < 3) { | 429 if (buildCounterGetInfoForObservedBeaconsResponse < 3) { |
430 checkUnnamed3432(o.beacons); | 430 checkUnnamed3464(o.beacons); |
431 } | 431 } |
432 buildCounterGetInfoForObservedBeaconsResponse--; | 432 buildCounterGetInfoForObservedBeaconsResponse--; |
433 } | 433 } |
434 | 434 |
435 core.int buildCounterIndoorLevel = 0; | 435 core.int buildCounterIndoorLevel = 0; |
436 buildIndoorLevel() { | 436 buildIndoorLevel() { |
437 var o = new api.IndoorLevel(); | 437 var o = new api.IndoorLevel(); |
438 buildCounterIndoorLevel++; | 438 buildCounterIndoorLevel++; |
439 if (buildCounterIndoorLevel < 3) { | 439 if (buildCounterIndoorLevel < 3) { |
440 o.name = "foo"; | 440 o.name = "foo"; |
(...skipping 24 matching lines...) Expand all Loading... |
465 | 465 |
466 checkLatLng(api.LatLng o) { | 466 checkLatLng(api.LatLng o) { |
467 buildCounterLatLng++; | 467 buildCounterLatLng++; |
468 if (buildCounterLatLng < 3) { | 468 if (buildCounterLatLng < 3) { |
469 unittest.expect(o.latitude, unittest.equals(42.0)); | 469 unittest.expect(o.latitude, unittest.equals(42.0)); |
470 unittest.expect(o.longitude, unittest.equals(42.0)); | 470 unittest.expect(o.longitude, unittest.equals(42.0)); |
471 } | 471 } |
472 buildCounterLatLng--; | 472 buildCounterLatLng--; |
473 } | 473 } |
474 | 474 |
475 buildUnnamed3433() { | 475 buildUnnamed3465() { |
476 var o = new core.List<api.BeaconAttachment>(); | 476 var o = new core.List<api.BeaconAttachment>(); |
477 o.add(buildBeaconAttachment()); | 477 o.add(buildBeaconAttachment()); |
478 o.add(buildBeaconAttachment()); | 478 o.add(buildBeaconAttachment()); |
479 return o; | 479 return o; |
480 } | 480 } |
481 | 481 |
482 checkUnnamed3433(core.List<api.BeaconAttachment> o) { | 482 checkUnnamed3465(core.List<api.BeaconAttachment> o) { |
483 unittest.expect(o, unittest.hasLength(2)); | 483 unittest.expect(o, unittest.hasLength(2)); |
484 checkBeaconAttachment(o[0]); | 484 checkBeaconAttachment(o[0]); |
485 checkBeaconAttachment(o[1]); | 485 checkBeaconAttachment(o[1]); |
486 } | 486 } |
487 | 487 |
488 core.int buildCounterListBeaconAttachmentsResponse = 0; | 488 core.int buildCounterListBeaconAttachmentsResponse = 0; |
489 buildListBeaconAttachmentsResponse() { | 489 buildListBeaconAttachmentsResponse() { |
490 var o = new api.ListBeaconAttachmentsResponse(); | 490 var o = new api.ListBeaconAttachmentsResponse(); |
491 buildCounterListBeaconAttachmentsResponse++; | 491 buildCounterListBeaconAttachmentsResponse++; |
492 if (buildCounterListBeaconAttachmentsResponse < 3) { | 492 if (buildCounterListBeaconAttachmentsResponse < 3) { |
493 o.attachments = buildUnnamed3433(); | 493 o.attachments = buildUnnamed3465(); |
494 } | 494 } |
495 buildCounterListBeaconAttachmentsResponse--; | 495 buildCounterListBeaconAttachmentsResponse--; |
496 return o; | 496 return o; |
497 } | 497 } |
498 | 498 |
499 checkListBeaconAttachmentsResponse(api.ListBeaconAttachmentsResponse o) { | 499 checkListBeaconAttachmentsResponse(api.ListBeaconAttachmentsResponse o) { |
500 buildCounterListBeaconAttachmentsResponse++; | 500 buildCounterListBeaconAttachmentsResponse++; |
501 if (buildCounterListBeaconAttachmentsResponse < 3) { | 501 if (buildCounterListBeaconAttachmentsResponse < 3) { |
502 checkUnnamed3433(o.attachments); | 502 checkUnnamed3465(o.attachments); |
503 } | 503 } |
504 buildCounterListBeaconAttachmentsResponse--; | 504 buildCounterListBeaconAttachmentsResponse--; |
505 } | 505 } |
506 | 506 |
507 buildUnnamed3434() { | 507 buildUnnamed3466() { |
508 var o = new core.List<api.Beacon>(); | 508 var o = new core.List<api.Beacon>(); |
509 o.add(buildBeacon()); | 509 o.add(buildBeacon()); |
510 o.add(buildBeacon()); | 510 o.add(buildBeacon()); |
511 return o; | 511 return o; |
512 } | 512 } |
513 | 513 |
514 checkUnnamed3434(core.List<api.Beacon> o) { | 514 checkUnnamed3466(core.List<api.Beacon> o) { |
515 unittest.expect(o, unittest.hasLength(2)); | 515 unittest.expect(o, unittest.hasLength(2)); |
516 checkBeacon(o[0]); | 516 checkBeacon(o[0]); |
517 checkBeacon(o[1]); | 517 checkBeacon(o[1]); |
518 } | 518 } |
519 | 519 |
520 core.int buildCounterListBeaconsResponse = 0; | 520 core.int buildCounterListBeaconsResponse = 0; |
521 buildListBeaconsResponse() { | 521 buildListBeaconsResponse() { |
522 var o = new api.ListBeaconsResponse(); | 522 var o = new api.ListBeaconsResponse(); |
523 buildCounterListBeaconsResponse++; | 523 buildCounterListBeaconsResponse++; |
524 if (buildCounterListBeaconsResponse < 3) { | 524 if (buildCounterListBeaconsResponse < 3) { |
525 o.beacons = buildUnnamed3434(); | 525 o.beacons = buildUnnamed3466(); |
526 o.nextPageToken = "foo"; | 526 o.nextPageToken = "foo"; |
527 o.totalCount = "foo"; | 527 o.totalCount = "foo"; |
528 } | 528 } |
529 buildCounterListBeaconsResponse--; | 529 buildCounterListBeaconsResponse--; |
530 return o; | 530 return o; |
531 } | 531 } |
532 | 532 |
533 checkListBeaconsResponse(api.ListBeaconsResponse o) { | 533 checkListBeaconsResponse(api.ListBeaconsResponse o) { |
534 buildCounterListBeaconsResponse++; | 534 buildCounterListBeaconsResponse++; |
535 if (buildCounterListBeaconsResponse < 3) { | 535 if (buildCounterListBeaconsResponse < 3) { |
536 checkUnnamed3434(o.beacons); | 536 checkUnnamed3466(o.beacons); |
537 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 537 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
538 unittest.expect(o.totalCount, unittest.equals('foo')); | 538 unittest.expect(o.totalCount, unittest.equals('foo')); |
539 } | 539 } |
540 buildCounterListBeaconsResponse--; | 540 buildCounterListBeaconsResponse--; |
541 } | 541 } |
542 | 542 |
543 buildUnnamed3435() { | 543 buildUnnamed3467() { |
544 var o = new core.List<api.Diagnostics>(); | 544 var o = new core.List<api.Diagnostics>(); |
545 o.add(buildDiagnostics()); | 545 o.add(buildDiagnostics()); |
546 o.add(buildDiagnostics()); | 546 o.add(buildDiagnostics()); |
547 return o; | 547 return o; |
548 } | 548 } |
549 | 549 |
550 checkUnnamed3435(core.List<api.Diagnostics> o) { | 550 checkUnnamed3467(core.List<api.Diagnostics> o) { |
551 unittest.expect(o, unittest.hasLength(2)); | 551 unittest.expect(o, unittest.hasLength(2)); |
552 checkDiagnostics(o[0]); | 552 checkDiagnostics(o[0]); |
553 checkDiagnostics(o[1]); | 553 checkDiagnostics(o[1]); |
554 } | 554 } |
555 | 555 |
556 core.int buildCounterListDiagnosticsResponse = 0; | 556 core.int buildCounterListDiagnosticsResponse = 0; |
557 buildListDiagnosticsResponse() { | 557 buildListDiagnosticsResponse() { |
558 var o = new api.ListDiagnosticsResponse(); | 558 var o = new api.ListDiagnosticsResponse(); |
559 buildCounterListDiagnosticsResponse++; | 559 buildCounterListDiagnosticsResponse++; |
560 if (buildCounterListDiagnosticsResponse < 3) { | 560 if (buildCounterListDiagnosticsResponse < 3) { |
561 o.diagnostics = buildUnnamed3435(); | 561 o.diagnostics = buildUnnamed3467(); |
562 o.nextPageToken = "foo"; | 562 o.nextPageToken = "foo"; |
563 } | 563 } |
564 buildCounterListDiagnosticsResponse--; | 564 buildCounterListDiagnosticsResponse--; |
565 return o; | 565 return o; |
566 } | 566 } |
567 | 567 |
568 checkListDiagnosticsResponse(api.ListDiagnosticsResponse o) { | 568 checkListDiagnosticsResponse(api.ListDiagnosticsResponse o) { |
569 buildCounterListDiagnosticsResponse++; | 569 buildCounterListDiagnosticsResponse++; |
570 if (buildCounterListDiagnosticsResponse < 3) { | 570 if (buildCounterListDiagnosticsResponse < 3) { |
571 checkUnnamed3435(o.diagnostics); | 571 checkUnnamed3467(o.diagnostics); |
572 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 572 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
573 } | 573 } |
574 buildCounterListDiagnosticsResponse--; | 574 buildCounterListDiagnosticsResponse--; |
575 } | 575 } |
576 | 576 |
577 buildUnnamed3436() { | 577 buildUnnamed3468() { |
578 var o = new core.List<api.Namespace>(); | 578 var o = new core.List<api.Namespace>(); |
579 o.add(buildNamespace()); | 579 o.add(buildNamespace()); |
580 o.add(buildNamespace()); | 580 o.add(buildNamespace()); |
581 return o; | 581 return o; |
582 } | 582 } |
583 | 583 |
584 checkUnnamed3436(core.List<api.Namespace> o) { | 584 checkUnnamed3468(core.List<api.Namespace> o) { |
585 unittest.expect(o, unittest.hasLength(2)); | 585 unittest.expect(o, unittest.hasLength(2)); |
586 checkNamespace(o[0]); | 586 checkNamespace(o[0]); |
587 checkNamespace(o[1]); | 587 checkNamespace(o[1]); |
588 } | 588 } |
589 | 589 |
590 core.int buildCounterListNamespacesResponse = 0; | 590 core.int buildCounterListNamespacesResponse = 0; |
591 buildListNamespacesResponse() { | 591 buildListNamespacesResponse() { |
592 var o = new api.ListNamespacesResponse(); | 592 var o = new api.ListNamespacesResponse(); |
593 buildCounterListNamespacesResponse++; | 593 buildCounterListNamespacesResponse++; |
594 if (buildCounterListNamespacesResponse < 3) { | 594 if (buildCounterListNamespacesResponse < 3) { |
595 o.namespaces = buildUnnamed3436(); | 595 o.namespaces = buildUnnamed3468(); |
596 } | 596 } |
597 buildCounterListNamespacesResponse--; | 597 buildCounterListNamespacesResponse--; |
598 return o; | 598 return o; |
599 } | 599 } |
600 | 600 |
601 checkListNamespacesResponse(api.ListNamespacesResponse o) { | 601 checkListNamespacesResponse(api.ListNamespacesResponse o) { |
602 buildCounterListNamespacesResponse++; | 602 buildCounterListNamespacesResponse++; |
603 if (buildCounterListNamespacesResponse < 3) { | 603 if (buildCounterListNamespacesResponse < 3) { |
604 checkUnnamed3436(o.namespaces); | 604 checkUnnamed3468(o.namespaces); |
605 } | 605 } |
606 buildCounterListNamespacesResponse--; | 606 buildCounterListNamespacesResponse--; |
607 } | 607 } |
608 | 608 |
609 core.int buildCounterNamespace = 0; | 609 core.int buildCounterNamespace = 0; |
610 buildNamespace() { | 610 buildNamespace() { |
611 var o = new api.Namespace(); | 611 var o = new api.Namespace(); |
612 buildCounterNamespace++; | 612 buildCounterNamespace++; |
613 if (buildCounterNamespace < 3) { | 613 if (buildCounterNamespace < 3) { |
614 o.namespaceName = "foo"; | 614 o.namespaceName = "foo"; |
(...skipping 510 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1125 }), true); | 1125 }), true); |
1126 res.get(arg_beaconName, projectId: arg_projectId).then(unittest.expectAsyn
c1(((api.Beacon response) { | 1126 res.get(arg_beaconName, projectId: arg_projectId).then(unittest.expectAsyn
c1(((api.Beacon response) { |
1127 checkBeacon(response); | 1127 checkBeacon(response); |
1128 }))); | 1128 }))); |
1129 }); | 1129 }); |
1130 | 1130 |
1131 unittest.test("method--list", () { | 1131 unittest.test("method--list", () { |
1132 | 1132 |
1133 var mock = new HttpServerMock(); | 1133 var mock = new HttpServerMock(); |
1134 api.BeaconsResourceApi res = new api.ProximitybeaconApi(mock).beacons; | 1134 api.BeaconsResourceApi res = new api.ProximitybeaconApi(mock).beacons; |
| 1135 var arg_projectId = "foo"; |
1135 var arg_pageToken = "foo"; | 1136 var arg_pageToken = "foo"; |
1136 var arg_pageSize = 42; | 1137 var arg_pageSize = 42; |
1137 var arg_q = "foo"; | 1138 var arg_q = "foo"; |
1138 var arg_projectId = "foo"; | |
1139 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 1139 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
1140 var path = (req.url).path; | 1140 var path = (req.url).path; |
1141 var pathOffset = 0; | 1141 var pathOffset = 0; |
1142 var index; | 1142 var index; |
1143 var subPart; | 1143 var subPart; |
1144 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1144 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
1145 pathOffset += 1; | 1145 pathOffset += 1; |
1146 unittest.expect(path.substring(pathOffset, pathOffset + 15), unittest.eq
uals("v1beta1/beacons")); | 1146 unittest.expect(path.substring(pathOffset, pathOffset + 15), unittest.eq
uals("v1beta1/beacons")); |
1147 pathOffset += 15; | 1147 pathOffset += 15; |
1148 | 1148 |
1149 var query = (req.url).query; | 1149 var query = (req.url).query; |
1150 var queryOffset = 0; | 1150 var queryOffset = 0; |
1151 var queryMap = {}; | 1151 var queryMap = {}; |
1152 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 1152 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
1153 parseBool(n) { | 1153 parseBool(n) { |
1154 if (n == "true") return true; | 1154 if (n == "true") return true; |
1155 if (n == "false") return false; | 1155 if (n == "false") return false; |
1156 if (n == null) return null; | 1156 if (n == null) return null; |
1157 throw new core.ArgumentError("Invalid boolean: $n"); | 1157 throw new core.ArgumentError("Invalid boolean: $n"); |
1158 } | 1158 } |
1159 if (query.length > 0) { | 1159 if (query.length > 0) { |
1160 for (var part in query.split("&")) { | 1160 for (var part in query.split("&")) { |
1161 var keyvalue = part.split("="); | 1161 var keyvalue = part.split("="); |
1162 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 1162 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
1163 } | 1163 } |
1164 } | 1164 } |
| 1165 unittest.expect(queryMap["projectId"].first, unittest.equals(arg_project
Id)); |
1165 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | 1166 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); |
1166 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ
als(arg_pageSize)); | 1167 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ
als(arg_pageSize)); |
1167 unittest.expect(queryMap["q"].first, unittest.equals(arg_q)); | 1168 unittest.expect(queryMap["q"].first, unittest.equals(arg_q)); |
1168 unittest.expect(queryMap["projectId"].first, unittest.equals(arg_project
Id)); | |
1169 | 1169 |
1170 | 1170 |
1171 var h = { | 1171 var h = { |
1172 "content-type" : "application/json; charset=utf-8", | 1172 "content-type" : "application/json; charset=utf-8", |
1173 }; | 1173 }; |
1174 var resp = convert.JSON.encode(buildListBeaconsResponse()); | 1174 var resp = convert.JSON.encode(buildListBeaconsResponse()); |
1175 return new async.Future.value(stringResponse(200, h, resp)); | 1175 return new async.Future.value(stringResponse(200, h, resp)); |
1176 }), true); | 1176 }), true); |
1177 res.list(pageToken: arg_pageToken, pageSize: arg_pageSize, q: arg_q, proje
ctId: arg_projectId).then(unittest.expectAsync1(((api.ListBeaconsResponse respon
se) { | 1177 res.list(projectId: arg_projectId, pageToken: arg_pageToken, pageSize: arg
_pageSize, q: arg_q).then(unittest.expectAsync1(((api.ListBeaconsResponse respon
se) { |
1178 checkListBeaconsResponse(response); | 1178 checkListBeaconsResponse(response); |
1179 }))); | 1179 }))); |
1180 }); | 1180 }); |
1181 | 1181 |
1182 unittest.test("method--register", () { | 1182 unittest.test("method--register", () { |
1183 | 1183 |
1184 var mock = new HttpServerMock(); | 1184 var mock = new HttpServerMock(); |
1185 api.BeaconsResourceApi res = new api.ProximitybeaconApi(mock).beacons; | 1185 api.BeaconsResourceApi res = new api.ProximitybeaconApi(mock).beacons; |
1186 var arg_request = buildBeacon(); | 1186 var arg_request = buildBeacon(); |
1187 var arg_projectId = "foo"; | 1187 var arg_projectId = "foo"; |
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1428 res.delete(arg_attachmentName, projectId: arg_projectId).then(unittest.exp
ectAsync1(((api.Empty response) { | 1428 res.delete(arg_attachmentName, projectId: arg_projectId).then(unittest.exp
ectAsync1(((api.Empty response) { |
1429 checkEmpty(response); | 1429 checkEmpty(response); |
1430 }))); | 1430 }))); |
1431 }); | 1431 }); |
1432 | 1432 |
1433 unittest.test("method--list", () { | 1433 unittest.test("method--list", () { |
1434 | 1434 |
1435 var mock = new HttpServerMock(); | 1435 var mock = new HttpServerMock(); |
1436 api.BeaconsAttachmentsResourceApi res = new api.ProximitybeaconApi(mock).b
eacons.attachments; | 1436 api.BeaconsAttachmentsResourceApi res = new api.ProximitybeaconApi(mock).b
eacons.attachments; |
1437 var arg_beaconName = "foo"; | 1437 var arg_beaconName = "foo"; |
| 1438 var arg_projectId = "foo"; |
1438 var arg_namespacedType = "foo"; | 1439 var arg_namespacedType = "foo"; |
1439 var arg_projectId = "foo"; | |
1440 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 1440 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
1441 var path = (req.url).path; | 1441 var path = (req.url).path; |
1442 var pathOffset = 0; | 1442 var pathOffset = 0; |
1443 var index; | 1443 var index; |
1444 var subPart; | 1444 var subPart; |
1445 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1445 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
1446 pathOffset += 1; | 1446 pathOffset += 1; |
1447 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("v1beta1/")); | 1447 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("v1beta1/")); |
1448 pathOffset += 8; | 1448 pathOffset += 8; |
1449 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; | 1449 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; |
1450 | 1450 |
1451 var query = (req.url).query; | 1451 var query = (req.url).query; |
1452 var queryOffset = 0; | 1452 var queryOffset = 0; |
1453 var queryMap = {}; | 1453 var queryMap = {}; |
1454 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 1454 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
1455 parseBool(n) { | 1455 parseBool(n) { |
1456 if (n == "true") return true; | 1456 if (n == "true") return true; |
1457 if (n == "false") return false; | 1457 if (n == "false") return false; |
1458 if (n == null) return null; | 1458 if (n == null) return null; |
1459 throw new core.ArgumentError("Invalid boolean: $n"); | 1459 throw new core.ArgumentError("Invalid boolean: $n"); |
1460 } | 1460 } |
1461 if (query.length > 0) { | 1461 if (query.length > 0) { |
1462 for (var part in query.split("&")) { | 1462 for (var part in query.split("&")) { |
1463 var keyvalue = part.split("="); | 1463 var keyvalue = part.split("="); |
1464 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 1464 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
1465 } | 1465 } |
1466 } | 1466 } |
| 1467 unittest.expect(queryMap["projectId"].first, unittest.equals(arg_project
Id)); |
1467 unittest.expect(queryMap["namespacedType"].first, unittest.equals(arg_na
mespacedType)); | 1468 unittest.expect(queryMap["namespacedType"].first, unittest.equals(arg_na
mespacedType)); |
1468 unittest.expect(queryMap["projectId"].first, unittest.equals(arg_project
Id)); | |
1469 | 1469 |
1470 | 1470 |
1471 var h = { | 1471 var h = { |
1472 "content-type" : "application/json; charset=utf-8", | 1472 "content-type" : "application/json; charset=utf-8", |
1473 }; | 1473 }; |
1474 var resp = convert.JSON.encode(buildListBeaconAttachmentsResponse()); | 1474 var resp = convert.JSON.encode(buildListBeaconAttachmentsResponse()); |
1475 return new async.Future.value(stringResponse(200, h, resp)); | 1475 return new async.Future.value(stringResponse(200, h, resp)); |
1476 }), true); | 1476 }), true); |
1477 res.list(arg_beaconName, namespacedType: arg_namespacedType, projectId: ar
g_projectId).then(unittest.expectAsync1(((api.ListBeaconAttachmentsResponse resp
onse) { | 1477 res.list(arg_beaconName, projectId: arg_projectId, namespacedType: arg_nam
espacedType).then(unittest.expectAsync1(((api.ListBeaconAttachmentsResponse resp
onse) { |
1478 checkListBeaconAttachmentsResponse(response); | 1478 checkListBeaconAttachmentsResponse(response); |
1479 }))); | 1479 }))); |
1480 }); | 1480 }); |
1481 | 1481 |
1482 }); | 1482 }); |
1483 | 1483 |
1484 | 1484 |
1485 unittest.group("resource-BeaconsDiagnosticsResourceApi", () { | 1485 unittest.group("resource-BeaconsDiagnosticsResourceApi", () { |
1486 unittest.test("method--list", () { | 1486 unittest.test("method--list", () { |
1487 | 1487 |
1488 var mock = new HttpServerMock(); | 1488 var mock = new HttpServerMock(); |
1489 api.BeaconsDiagnosticsResourceApi res = new api.ProximitybeaconApi(mock).b
eacons.diagnostics; | 1489 api.BeaconsDiagnosticsResourceApi res = new api.ProximitybeaconApi(mock).b
eacons.diagnostics; |
1490 var arg_beaconName = "foo"; | 1490 var arg_beaconName = "foo"; |
1491 var arg_pageToken = "foo"; | |
1492 var arg_alertFilter = "foo"; | 1491 var arg_alertFilter = "foo"; |
1493 var arg_pageSize = 42; | 1492 var arg_pageSize = 42; |
1494 var arg_projectId = "foo"; | 1493 var arg_projectId = "foo"; |
| 1494 var arg_pageToken = "foo"; |
1495 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 1495 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
1496 var path = (req.url).path; | 1496 var path = (req.url).path; |
1497 var pathOffset = 0; | 1497 var pathOffset = 0; |
1498 var index; | 1498 var index; |
1499 var subPart; | 1499 var subPart; |
1500 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1500 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
1501 pathOffset += 1; | 1501 pathOffset += 1; |
1502 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("v1beta1/")); | 1502 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("v1beta1/")); |
1503 pathOffset += 8; | 1503 pathOffset += 8; |
1504 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; | 1504 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; |
1505 | 1505 |
1506 var query = (req.url).query; | 1506 var query = (req.url).query; |
1507 var queryOffset = 0; | 1507 var queryOffset = 0; |
1508 var queryMap = {}; | 1508 var queryMap = {}; |
1509 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 1509 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
1510 parseBool(n) { | 1510 parseBool(n) { |
1511 if (n == "true") return true; | 1511 if (n == "true") return true; |
1512 if (n == "false") return false; | 1512 if (n == "false") return false; |
1513 if (n == null) return null; | 1513 if (n == null) return null; |
1514 throw new core.ArgumentError("Invalid boolean: $n"); | 1514 throw new core.ArgumentError("Invalid boolean: $n"); |
1515 } | 1515 } |
1516 if (query.length > 0) { | 1516 if (query.length > 0) { |
1517 for (var part in query.split("&")) { | 1517 for (var part in query.split("&")) { |
1518 var keyvalue = part.split("="); | 1518 var keyvalue = part.split("="); |
1519 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 1519 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
1520 } | 1520 } |
1521 } | 1521 } |
1522 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | |
1523 unittest.expect(queryMap["alertFilter"].first, unittest.equals(arg_alert
Filter)); | 1522 unittest.expect(queryMap["alertFilter"].first, unittest.equals(arg_alert
Filter)); |
1524 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ
als(arg_pageSize)); | 1523 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ
als(arg_pageSize)); |
1525 unittest.expect(queryMap["projectId"].first, unittest.equals(arg_project
Id)); | 1524 unittest.expect(queryMap["projectId"].first, unittest.equals(arg_project
Id)); |
| 1525 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); |
1526 | 1526 |
1527 | 1527 |
1528 var h = { | 1528 var h = { |
1529 "content-type" : "application/json; charset=utf-8", | 1529 "content-type" : "application/json; charset=utf-8", |
1530 }; | 1530 }; |
1531 var resp = convert.JSON.encode(buildListDiagnosticsResponse()); | 1531 var resp = convert.JSON.encode(buildListDiagnosticsResponse()); |
1532 return new async.Future.value(stringResponse(200, h, resp)); | 1532 return new async.Future.value(stringResponse(200, h, resp)); |
1533 }), true); | 1533 }), true); |
1534 res.list(arg_beaconName, pageToken: arg_pageToken, alertFilter: arg_alertF
ilter, pageSize: arg_pageSize, projectId: arg_projectId).then(unittest.expectAsy
nc1(((api.ListDiagnosticsResponse response) { | 1534 res.list(arg_beaconName, alertFilter: arg_alertFilter, pageSize: arg_pageS
ize, projectId: arg_projectId, pageToken: arg_pageToken).then(unittest.expectAsy
nc1(((api.ListDiagnosticsResponse response) { |
1535 checkListDiagnosticsResponse(response); | 1535 checkListDiagnosticsResponse(response); |
1536 }))); | 1536 }))); |
1537 }); | 1537 }); |
1538 | 1538 |
1539 }); | 1539 }); |
1540 | 1540 |
1541 | 1541 |
1542 unittest.group("resource-NamespacesResourceApi", () { | 1542 unittest.group("resource-NamespacesResourceApi", () { |
1543 unittest.test("method--list", () { | 1543 unittest.test("method--list", () { |
1544 | 1544 |
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1681 res.getEidparams().then(unittest.expectAsync1(((api.EphemeralIdRegistratio
nParams response) { | 1681 res.getEidparams().then(unittest.expectAsync1(((api.EphemeralIdRegistratio
nParams response) { |
1682 checkEphemeralIdRegistrationParams(response); | 1682 checkEphemeralIdRegistrationParams(response); |
1683 }))); | 1683 }))); |
1684 }); | 1684 }); |
1685 | 1685 |
1686 }); | 1686 }); |
1687 | 1687 |
1688 | 1688 |
1689 } | 1689 } |
1690 | 1690 |
OLD | NEW |