Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(14)

Side by Side Diff: generated/googleapis_beta/test/proximitybeacon/v1beta1_test.dart

Issue 2987103002: Api-Roll 52: 2017-07-31 (Closed)
Patch Set: Created 3 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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 buildUnnamed3430() { 96 buildUnnamed3427() {
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 checkUnnamed3430(core.Map<core.String, core.String> o) { 103 checkUnnamed3427(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 = buildUnnamed3430(); 122 o.properties = buildUnnamed3427();
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 checkUnnamed3430(o.properties); 141 checkUnnamed3427(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
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 buildUnnamed3431() { 173 buildUnnamed3428() {
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 checkUnnamed3431(core.List<api.AttachmentInfo> o) { 180 checkUnnamed3428(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 = buildUnnamed3431(); 192 o.attachments = buildUnnamed3428();
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 checkUnnamed3431(o.attachments); 203 checkUnnamed3428(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
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 buildUnnamed3432() { 251 buildUnnamed3429() {
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 checkUnnamed3432(core.List<core.String> o) { 258 checkUnnamed3429(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 = buildUnnamed3432(); 269 o.alerts = buildUnnamed3429();
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 checkUnnamed3432(o.alerts); 280 checkUnnamed3429(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
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 buildUnnamed3433() { 356 buildUnnamed3430() {
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 checkUnnamed3433(core.List<core.String> o) { 363 checkUnnamed3430(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 buildUnnamed3434() { 369 buildUnnamed3431() {
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 checkUnnamed3434(core.List<api.Observation> o) { 376 checkUnnamed3431(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 = buildUnnamed3433(); 387 o.namespacedTypes = buildUnnamed3430();
388 o.observations = buildUnnamed3434(); 388 o.observations = buildUnnamed3431();
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 checkUnnamed3433(o.namespacedTypes); 397 checkUnnamed3430(o.namespacedTypes);
398 checkUnnamed3434(o.observations); 398 checkUnnamed3431(o.observations);
399 } 399 }
400 buildCounterGetInfoForObservedBeaconsRequest--; 400 buildCounterGetInfoForObservedBeaconsRequest--;
401 } 401 }
402 402
403 buildUnnamed3435() { 403 buildUnnamed3432() {
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 checkUnnamed3435(core.List<api.BeaconInfo> o) { 410 checkUnnamed3432(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 = buildUnnamed3435(); 421 o.beacons = buildUnnamed3432();
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 checkUnnamed3435(o.beacons); 430 checkUnnamed3432(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
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 buildUnnamed3436() { 475 buildUnnamed3433() {
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 checkUnnamed3436(core.List<api.BeaconAttachment> o) { 482 checkUnnamed3433(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 = buildUnnamed3436(); 493 o.attachments = buildUnnamed3433();
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 checkUnnamed3436(o.attachments); 502 checkUnnamed3433(o.attachments);
503 } 503 }
504 buildCounterListBeaconAttachmentsResponse--; 504 buildCounterListBeaconAttachmentsResponse--;
505 } 505 }
506 506
507 buildUnnamed3437() { 507 buildUnnamed3434() {
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 checkUnnamed3437(core.List<api.Beacon> o) { 514 checkUnnamed3434(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 = buildUnnamed3437(); 525 o.beacons = buildUnnamed3434();
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 checkUnnamed3437(o.beacons); 536 checkUnnamed3434(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 buildUnnamed3438() { 543 buildUnnamed3435() {
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 checkUnnamed3438(core.List<api.Diagnostics> o) { 550 checkUnnamed3435(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 = buildUnnamed3438(); 561 o.diagnostics = buildUnnamed3435();
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 checkUnnamed3438(o.diagnostics); 571 checkUnnamed3435(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 buildUnnamed3439() { 577 buildUnnamed3436() {
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 checkUnnamed3439(core.List<api.Namespace> o) { 584 checkUnnamed3436(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 = buildUnnamed3439(); 595 o.namespaces = buildUnnamed3436();
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 checkUnnamed3439(o.namespaces); 604 checkUnnamed3436(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 666 matching lines...) Expand 10 before | Expand all | Expand 10 after
1281 1281
1282 }); 1282 });
1283 1283
1284 1284
1285 unittest.group("resource-BeaconsAttachmentsResourceApi", () { 1285 unittest.group("resource-BeaconsAttachmentsResourceApi", () {
1286 unittest.test("method--batchDelete", () { 1286 unittest.test("method--batchDelete", () {
1287 1287
1288 var mock = new HttpServerMock(); 1288 var mock = new HttpServerMock();
1289 api.BeaconsAttachmentsResourceApi res = new api.ProximitybeaconApi(mock).b eacons.attachments; 1289 api.BeaconsAttachmentsResourceApi res = new api.ProximitybeaconApi(mock).b eacons.attachments;
1290 var arg_beaconName = "foo"; 1290 var arg_beaconName = "foo";
1291 var arg_projectId = "foo";
1291 var arg_namespacedType = "foo"; 1292 var arg_namespacedType = "foo";
1292 var arg_projectId = "foo";
1293 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { 1293 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
1294 var path = (req.url).path; 1294 var path = (req.url).path;
1295 var pathOffset = 0; 1295 var pathOffset = 0;
1296 var index; 1296 var index;
1297 var subPart; 1297 var subPart;
1298 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 1298 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
1299 pathOffset += 1; 1299 pathOffset += 1;
1300 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ als("v1beta1/")); 1300 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ als("v1beta1/"));
1301 pathOffset += 8; 1301 pathOffset += 8;
1302 // NOTE: We cannot test reserved expansions due to the inability to reve rse the operation; 1302 // NOTE: We cannot test reserved expansions due to the inability to reve rse the operation;
1303 1303
1304 var query = (req.url).query; 1304 var query = (req.url).query;
1305 var queryOffset = 0; 1305 var queryOffset = 0;
1306 var queryMap = {}; 1306 var queryMap = {};
1307 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); 1307 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
1308 parseBool(n) { 1308 parseBool(n) {
1309 if (n == "true") return true; 1309 if (n == "true") return true;
1310 if (n == "false") return false; 1310 if (n == "false") return false;
1311 if (n == null) return null; 1311 if (n == null) return null;
1312 throw new core.ArgumentError("Invalid boolean: $n"); 1312 throw new core.ArgumentError("Invalid boolean: $n");
1313 } 1313 }
1314 if (query.length > 0) { 1314 if (query.length > 0) {
1315 for (var part in query.split("&")) { 1315 for (var part in query.split("&")) {
1316 var keyvalue = part.split("="); 1316 var keyvalue = part.split("=");
1317 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1])); 1317 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1]));
1318 } 1318 }
1319 } 1319 }
1320 unittest.expect(queryMap["projectId"].first, unittest.equals(arg_project Id));
1320 unittest.expect(queryMap["namespacedType"].first, unittest.equals(arg_na mespacedType)); 1321 unittest.expect(queryMap["namespacedType"].first, unittest.equals(arg_na mespacedType));
1321 unittest.expect(queryMap["projectId"].first, unittest.equals(arg_project Id));
1322 1322
1323 1323
1324 var h = { 1324 var h = {
1325 "content-type" : "application/json; charset=utf-8", 1325 "content-type" : "application/json; charset=utf-8",
1326 }; 1326 };
1327 var resp = convert.JSON.encode(buildDeleteAttachmentsResponse()); 1327 var resp = convert.JSON.encode(buildDeleteAttachmentsResponse());
1328 return new async.Future.value(stringResponse(200, h, resp)); 1328 return new async.Future.value(stringResponse(200, h, resp));
1329 }), true); 1329 }), true);
1330 res.batchDelete(arg_beaconName, namespacedType: arg_namespacedType, projec tId: arg_projectId).then(unittest.expectAsync1(((api.DeleteAttachmentsResponse r esponse) { 1330 res.batchDelete(arg_beaconName, projectId: arg_projectId, namespacedType: arg_namespacedType).then(unittest.expectAsync1(((api.DeleteAttachmentsResponse r esponse) {
1331 checkDeleteAttachmentsResponse(response); 1331 checkDeleteAttachmentsResponse(response);
1332 }))); 1332 })));
1333 }); 1333 });
1334 1334
1335 unittest.test("method--create", () { 1335 unittest.test("method--create", () {
1336 1336
1337 var mock = new HttpServerMock(); 1337 var mock = new HttpServerMock();
1338 api.BeaconsAttachmentsResourceApi res = new api.ProximitybeaconApi(mock).b eacons.attachments; 1338 api.BeaconsAttachmentsResourceApi res = new api.ProximitybeaconApi(mock).b eacons.attachments;
1339 var arg_request = buildBeaconAttachment(); 1339 var arg_request = buildBeaconAttachment();
1340 var arg_beaconName = "foo"; 1340 var arg_beaconName = "foo";
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
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_namespacedType = "foo";
1438 var arg_projectId = "foo"; 1439 var arg_projectId = "foo";
1439 var arg_namespacedType = "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["namespacedType"].first, unittest.equals(arg_na mespacedType));
1467 unittest.expect(queryMap["projectId"].first, unittest.equals(arg_project Id)); 1468 unittest.expect(queryMap["projectId"].first, unittest.equals(arg_project Id));
1468 unittest.expect(queryMap["namespacedType"].first, unittest.equals(arg_na mespacedType));
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, projectId: arg_projectId, namespacedType: arg_nam espacedType).then(unittest.expectAsync1(((api.ListBeaconAttachmentsResponse resp onse) { 1477 res.list(arg_beaconName, namespacedType: arg_namespacedType, projectId: ar g_projectId).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
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
OLDNEW
« no previous file with comments | « generated/googleapis_beta/test/oslogin/v1alpha_test.dart ('k') | generated/googleapis_beta/test/pubsub/v1beta2_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698