OLD | NEW |
1 library googleapis_beta.dlp.v2beta1.test; | 1 library googleapis_beta.dlp.v2beta1.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:unittest/unittest.dart' as unittest; | 10 import 'package:unittest/unittest.dart' as unittest; |
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
185 } | 185 } |
186 | 186 |
187 checkDatastoreKey(api.DatastoreKey o) { | 187 checkDatastoreKey(api.DatastoreKey o) { |
188 buildCounterDatastoreKey++; | 188 buildCounterDatastoreKey++; |
189 if (buildCounterDatastoreKey < 3) { | 189 if (buildCounterDatastoreKey < 3) { |
190 checkKey(o.entityKey); | 190 checkKey(o.entityKey); |
191 } | 191 } |
192 buildCounterDatastoreKey--; | 192 buildCounterDatastoreKey--; |
193 } | 193 } |
194 | 194 |
195 buildUnnamed3326() { | 195 buildUnnamed3332() { |
196 var o = new core.List<api.Projection>(); | 196 var o = new core.List<api.Projection>(); |
197 o.add(buildProjection()); | 197 o.add(buildProjection()); |
198 o.add(buildProjection()); | 198 o.add(buildProjection()); |
199 return o; | 199 return o; |
200 } | 200 } |
201 | 201 |
202 checkUnnamed3326(core.List<api.Projection> o) { | 202 checkUnnamed3332(core.List<api.Projection> o) { |
203 unittest.expect(o, unittest.hasLength(2)); | 203 unittest.expect(o, unittest.hasLength(2)); |
204 checkProjection(o[0]); | 204 checkProjection(o[0]); |
205 checkProjection(o[1]); | 205 checkProjection(o[1]); |
206 } | 206 } |
207 | 207 |
208 core.int buildCounterDatastoreOptions = 0; | 208 core.int buildCounterDatastoreOptions = 0; |
209 buildDatastoreOptions() { | 209 buildDatastoreOptions() { |
210 var o = new api.DatastoreOptions(); | 210 var o = new api.DatastoreOptions(); |
211 buildCounterDatastoreOptions++; | 211 buildCounterDatastoreOptions++; |
212 if (buildCounterDatastoreOptions < 3) { | 212 if (buildCounterDatastoreOptions < 3) { |
213 o.kind = buildKindExpression(); | 213 o.kind = buildKindExpression(); |
214 o.partitionId = buildPartitionId(); | 214 o.partitionId = buildPartitionId(); |
215 o.projection = buildUnnamed3326(); | 215 o.projection = buildUnnamed3332(); |
216 } | 216 } |
217 buildCounterDatastoreOptions--; | 217 buildCounterDatastoreOptions--; |
218 return o; | 218 return o; |
219 } | 219 } |
220 | 220 |
221 checkDatastoreOptions(api.DatastoreOptions o) { | 221 checkDatastoreOptions(api.DatastoreOptions o) { |
222 buildCounterDatastoreOptions++; | 222 buildCounterDatastoreOptions++; |
223 if (buildCounterDatastoreOptions < 3) { | 223 if (buildCounterDatastoreOptions < 3) { |
224 checkKindExpression(o.kind); | 224 checkKindExpression(o.kind); |
225 checkPartitionId(o.partitionId); | 225 checkPartitionId(o.partitionId); |
226 checkUnnamed3326(o.projection); | 226 checkUnnamed3332(o.projection); |
227 } | 227 } |
228 buildCounterDatastoreOptions--; | 228 buildCounterDatastoreOptions--; |
229 } | 229 } |
230 | 230 |
231 core.int buildCounterEmpty = 0; | 231 core.int buildCounterEmpty = 0; |
232 buildEmpty() { | 232 buildEmpty() { |
233 var o = new api.Empty(); | 233 var o = new api.Empty(); |
234 buildCounterEmpty++; | 234 buildCounterEmpty++; |
235 if (buildCounterEmpty < 3) { | 235 if (buildCounterEmpty < 3) { |
236 } | 236 } |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
347 } | 347 } |
348 | 348 |
349 checkInfoType(api.InfoType o) { | 349 checkInfoType(api.InfoType o) { |
350 buildCounterInfoType++; | 350 buildCounterInfoType++; |
351 if (buildCounterInfoType < 3) { | 351 if (buildCounterInfoType < 3) { |
352 unittest.expect(o.name, unittest.equals('foo')); | 352 unittest.expect(o.name, unittest.equals('foo')); |
353 } | 353 } |
354 buildCounterInfoType--; | 354 buildCounterInfoType--; |
355 } | 355 } |
356 | 356 |
357 buildUnnamed3327() { | 357 buildUnnamed3333() { |
358 var o = new core.List<api.CategoryDescription>(); | 358 var o = new core.List<api.CategoryDescription>(); |
359 o.add(buildCategoryDescription()); | 359 o.add(buildCategoryDescription()); |
360 o.add(buildCategoryDescription()); | 360 o.add(buildCategoryDescription()); |
361 return o; | 361 return o; |
362 } | 362 } |
363 | 363 |
364 checkUnnamed3327(core.List<api.CategoryDescription> o) { | 364 checkUnnamed3333(core.List<api.CategoryDescription> o) { |
365 unittest.expect(o, unittest.hasLength(2)); | 365 unittest.expect(o, unittest.hasLength(2)); |
366 checkCategoryDescription(o[0]); | 366 checkCategoryDescription(o[0]); |
367 checkCategoryDescription(o[1]); | 367 checkCategoryDescription(o[1]); |
368 } | 368 } |
369 | 369 |
370 core.int buildCounterInfoTypeDescription = 0; | 370 core.int buildCounterInfoTypeDescription = 0; |
371 buildInfoTypeDescription() { | 371 buildInfoTypeDescription() { |
372 var o = new api.InfoTypeDescription(); | 372 var o = new api.InfoTypeDescription(); |
373 buildCounterInfoTypeDescription++; | 373 buildCounterInfoTypeDescription++; |
374 if (buildCounterInfoTypeDescription < 3) { | 374 if (buildCounterInfoTypeDescription < 3) { |
375 o.categories = buildUnnamed3327(); | 375 o.categories = buildUnnamed3333(); |
376 o.displayName = "foo"; | 376 o.displayName = "foo"; |
377 o.name = "foo"; | 377 o.name = "foo"; |
378 } | 378 } |
379 buildCounterInfoTypeDescription--; | 379 buildCounterInfoTypeDescription--; |
380 return o; | 380 return o; |
381 } | 381 } |
382 | 382 |
383 checkInfoTypeDescription(api.InfoTypeDescription o) { | 383 checkInfoTypeDescription(api.InfoTypeDescription o) { |
384 buildCounterInfoTypeDescription++; | 384 buildCounterInfoTypeDescription++; |
385 if (buildCounterInfoTypeDescription < 3) { | 385 if (buildCounterInfoTypeDescription < 3) { |
386 checkUnnamed3327(o.categories); | 386 checkUnnamed3333(o.categories); |
387 unittest.expect(o.displayName, unittest.equals('foo')); | 387 unittest.expect(o.displayName, unittest.equals('foo')); |
388 unittest.expect(o.name, unittest.equals('foo')); | 388 unittest.expect(o.name, unittest.equals('foo')); |
389 } | 389 } |
390 buildCounterInfoTypeDescription--; | 390 buildCounterInfoTypeDescription--; |
391 } | 391 } |
392 | 392 |
393 buildUnnamed3328() { | 393 buildUnnamed3334() { |
394 var o = new core.List<api.InfoType>(); | 394 var o = new core.List<api.InfoType>(); |
395 o.add(buildInfoType()); | 395 o.add(buildInfoType()); |
396 o.add(buildInfoType()); | 396 o.add(buildInfoType()); |
397 return o; | 397 return o; |
398 } | 398 } |
399 | 399 |
400 checkUnnamed3328(core.List<api.InfoType> o) { | 400 checkUnnamed3334(core.List<api.InfoType> o) { |
401 unittest.expect(o, unittest.hasLength(2)); | 401 unittest.expect(o, unittest.hasLength(2)); |
402 checkInfoType(o[0]); | 402 checkInfoType(o[0]); |
403 checkInfoType(o[1]); | 403 checkInfoType(o[1]); |
404 } | 404 } |
405 | 405 |
406 core.int buildCounterInspectConfig = 0; | 406 core.int buildCounterInspectConfig = 0; |
407 buildInspectConfig() { | 407 buildInspectConfig() { |
408 var o = new api.InspectConfig(); | 408 var o = new api.InspectConfig(); |
409 buildCounterInspectConfig++; | 409 buildCounterInspectConfig++; |
410 if (buildCounterInspectConfig < 3) { | 410 if (buildCounterInspectConfig < 3) { |
411 o.excludeTypes = true; | 411 o.excludeTypes = true; |
412 o.includeQuote = true; | 412 o.includeQuote = true; |
413 o.infoTypes = buildUnnamed3328(); | 413 o.infoTypes = buildUnnamed3334(); |
414 o.maxFindings = 42; | 414 o.maxFindings = 42; |
415 o.minLikelihood = "foo"; | 415 o.minLikelihood = "foo"; |
416 } | 416 } |
417 buildCounterInspectConfig--; | 417 buildCounterInspectConfig--; |
418 return o; | 418 return o; |
419 } | 419 } |
420 | 420 |
421 checkInspectConfig(api.InspectConfig o) { | 421 checkInspectConfig(api.InspectConfig o) { |
422 buildCounterInspectConfig++; | 422 buildCounterInspectConfig++; |
423 if (buildCounterInspectConfig < 3) { | 423 if (buildCounterInspectConfig < 3) { |
424 unittest.expect(o.excludeTypes, unittest.isTrue); | 424 unittest.expect(o.excludeTypes, unittest.isTrue); |
425 unittest.expect(o.includeQuote, unittest.isTrue); | 425 unittest.expect(o.includeQuote, unittest.isTrue); |
426 checkUnnamed3328(o.infoTypes); | 426 checkUnnamed3334(o.infoTypes); |
427 unittest.expect(o.maxFindings, unittest.equals(42)); | 427 unittest.expect(o.maxFindings, unittest.equals(42)); |
428 unittest.expect(o.minLikelihood, unittest.equals('foo')); | 428 unittest.expect(o.minLikelihood, unittest.equals('foo')); |
429 } | 429 } |
430 buildCounterInspectConfig--; | 430 buildCounterInspectConfig--; |
431 } | 431 } |
432 | 432 |
433 buildUnnamed3329() { | 433 buildUnnamed3335() { |
434 var o = new core.List<api.ContentItem>(); | 434 var o = new core.List<api.ContentItem>(); |
435 o.add(buildContentItem()); | 435 o.add(buildContentItem()); |
436 o.add(buildContentItem()); | 436 o.add(buildContentItem()); |
437 return o; | 437 return o; |
438 } | 438 } |
439 | 439 |
440 checkUnnamed3329(core.List<api.ContentItem> o) { | 440 checkUnnamed3335(core.List<api.ContentItem> o) { |
441 unittest.expect(o, unittest.hasLength(2)); | 441 unittest.expect(o, unittest.hasLength(2)); |
442 checkContentItem(o[0]); | 442 checkContentItem(o[0]); |
443 checkContentItem(o[1]); | 443 checkContentItem(o[1]); |
444 } | 444 } |
445 | 445 |
446 core.int buildCounterInspectContentRequest = 0; | 446 core.int buildCounterInspectContentRequest = 0; |
447 buildInspectContentRequest() { | 447 buildInspectContentRequest() { |
448 var o = new api.InspectContentRequest(); | 448 var o = new api.InspectContentRequest(); |
449 buildCounterInspectContentRequest++; | 449 buildCounterInspectContentRequest++; |
450 if (buildCounterInspectContentRequest < 3) { | 450 if (buildCounterInspectContentRequest < 3) { |
451 o.inspectConfig = buildInspectConfig(); | 451 o.inspectConfig = buildInspectConfig(); |
452 o.items = buildUnnamed3329(); | 452 o.items = buildUnnamed3335(); |
453 } | 453 } |
454 buildCounterInspectContentRequest--; | 454 buildCounterInspectContentRequest--; |
455 return o; | 455 return o; |
456 } | 456 } |
457 | 457 |
458 checkInspectContentRequest(api.InspectContentRequest o) { | 458 checkInspectContentRequest(api.InspectContentRequest o) { |
459 buildCounterInspectContentRequest++; | 459 buildCounterInspectContentRequest++; |
460 if (buildCounterInspectContentRequest < 3) { | 460 if (buildCounterInspectContentRequest < 3) { |
461 checkInspectConfig(o.inspectConfig); | 461 checkInspectConfig(o.inspectConfig); |
462 checkUnnamed3329(o.items); | 462 checkUnnamed3335(o.items); |
463 } | 463 } |
464 buildCounterInspectContentRequest--; | 464 buildCounterInspectContentRequest--; |
465 } | 465 } |
466 | 466 |
467 buildUnnamed3330() { | 467 buildUnnamed3336() { |
468 var o = new core.List<api.InspectResult>(); | 468 var o = new core.List<api.InspectResult>(); |
469 o.add(buildInspectResult()); | 469 o.add(buildInspectResult()); |
470 o.add(buildInspectResult()); | 470 o.add(buildInspectResult()); |
471 return o; | 471 return o; |
472 } | 472 } |
473 | 473 |
474 checkUnnamed3330(core.List<api.InspectResult> o) { | 474 checkUnnamed3336(core.List<api.InspectResult> o) { |
475 unittest.expect(o, unittest.hasLength(2)); | 475 unittest.expect(o, unittest.hasLength(2)); |
476 checkInspectResult(o[0]); | 476 checkInspectResult(o[0]); |
477 checkInspectResult(o[1]); | 477 checkInspectResult(o[1]); |
478 } | 478 } |
479 | 479 |
480 core.int buildCounterInspectContentResponse = 0; | 480 core.int buildCounterInspectContentResponse = 0; |
481 buildInspectContentResponse() { | 481 buildInspectContentResponse() { |
482 var o = new api.InspectContentResponse(); | 482 var o = new api.InspectContentResponse(); |
483 buildCounterInspectContentResponse++; | 483 buildCounterInspectContentResponse++; |
484 if (buildCounterInspectContentResponse < 3) { | 484 if (buildCounterInspectContentResponse < 3) { |
485 o.results = buildUnnamed3330(); | 485 o.results = buildUnnamed3336(); |
486 } | 486 } |
487 buildCounterInspectContentResponse--; | 487 buildCounterInspectContentResponse--; |
488 return o; | 488 return o; |
489 } | 489 } |
490 | 490 |
491 checkInspectContentResponse(api.InspectContentResponse o) { | 491 checkInspectContentResponse(api.InspectContentResponse o) { |
492 buildCounterInspectContentResponse++; | 492 buildCounterInspectContentResponse++; |
493 if (buildCounterInspectContentResponse < 3) { | 493 if (buildCounterInspectContentResponse < 3) { |
494 checkUnnamed3330(o.results); | 494 checkUnnamed3336(o.results); |
495 } | 495 } |
496 buildCounterInspectContentResponse--; | 496 buildCounterInspectContentResponse--; |
497 } | 497 } |
498 | 498 |
499 buildUnnamed3331() { | 499 buildUnnamed3337() { |
500 var o = new core.List<api.Finding>(); | 500 var o = new core.List<api.Finding>(); |
501 o.add(buildFinding()); | 501 o.add(buildFinding()); |
502 o.add(buildFinding()); | 502 o.add(buildFinding()); |
503 return o; | 503 return o; |
504 } | 504 } |
505 | 505 |
506 checkUnnamed3331(core.List<api.Finding> o) { | 506 checkUnnamed3337(core.List<api.Finding> o) { |
507 unittest.expect(o, unittest.hasLength(2)); | 507 unittest.expect(o, unittest.hasLength(2)); |
508 checkFinding(o[0]); | 508 checkFinding(o[0]); |
509 checkFinding(o[1]); | 509 checkFinding(o[1]); |
510 } | 510 } |
511 | 511 |
512 core.int buildCounterInspectResult = 0; | 512 core.int buildCounterInspectResult = 0; |
513 buildInspectResult() { | 513 buildInspectResult() { |
514 var o = new api.InspectResult(); | 514 var o = new api.InspectResult(); |
515 buildCounterInspectResult++; | 515 buildCounterInspectResult++; |
516 if (buildCounterInspectResult < 3) { | 516 if (buildCounterInspectResult < 3) { |
517 o.findings = buildUnnamed3331(); | 517 o.findings = buildUnnamed3337(); |
518 o.findingsTruncated = true; | 518 o.findingsTruncated = true; |
519 } | 519 } |
520 buildCounterInspectResult--; | 520 buildCounterInspectResult--; |
521 return o; | 521 return o; |
522 } | 522 } |
523 | 523 |
524 checkInspectResult(api.InspectResult o) { | 524 checkInspectResult(api.InspectResult o) { |
525 buildCounterInspectResult++; | 525 buildCounterInspectResult++; |
526 if (buildCounterInspectResult < 3) { | 526 if (buildCounterInspectResult < 3) { |
527 checkUnnamed3331(o.findings); | 527 checkUnnamed3337(o.findings); |
528 unittest.expect(o.findingsTruncated, unittest.isTrue); | 528 unittest.expect(o.findingsTruncated, unittest.isTrue); |
529 } | 529 } |
530 buildCounterInspectResult--; | 530 buildCounterInspectResult--; |
531 } | 531 } |
532 | 532 |
533 buildUnnamed3332() { | 533 buildUnnamed3338() { |
534 var o = new core.List<api.PathElement>(); | 534 var o = new core.List<api.PathElement>(); |
535 o.add(buildPathElement()); | 535 o.add(buildPathElement()); |
536 o.add(buildPathElement()); | 536 o.add(buildPathElement()); |
537 return o; | 537 return o; |
538 } | 538 } |
539 | 539 |
540 checkUnnamed3332(core.List<api.PathElement> o) { | 540 checkUnnamed3338(core.List<api.PathElement> o) { |
541 unittest.expect(o, unittest.hasLength(2)); | 541 unittest.expect(o, unittest.hasLength(2)); |
542 checkPathElement(o[0]); | 542 checkPathElement(o[0]); |
543 checkPathElement(o[1]); | 543 checkPathElement(o[1]); |
544 } | 544 } |
545 | 545 |
546 core.int buildCounterKey = 0; | 546 core.int buildCounterKey = 0; |
547 buildKey() { | 547 buildKey() { |
548 var o = new api.Key(); | 548 var o = new api.Key(); |
549 buildCounterKey++; | 549 buildCounterKey++; |
550 if (buildCounterKey < 3) { | 550 if (buildCounterKey < 3) { |
551 o.partitionId = buildPartitionId(); | 551 o.partitionId = buildPartitionId(); |
552 o.path = buildUnnamed3332(); | 552 o.path = buildUnnamed3338(); |
553 } | 553 } |
554 buildCounterKey--; | 554 buildCounterKey--; |
555 return o; | 555 return o; |
556 } | 556 } |
557 | 557 |
558 checkKey(api.Key o) { | 558 checkKey(api.Key o) { |
559 buildCounterKey++; | 559 buildCounterKey++; |
560 if (buildCounterKey < 3) { | 560 if (buildCounterKey < 3) { |
561 checkPartitionId(o.partitionId); | 561 checkPartitionId(o.partitionId); |
562 checkUnnamed3332(o.path); | 562 checkUnnamed3338(o.path); |
563 } | 563 } |
564 buildCounterKey--; | 564 buildCounterKey--; |
565 } | 565 } |
566 | 566 |
567 core.int buildCounterKindExpression = 0; | 567 core.int buildCounterKindExpression = 0; |
568 buildKindExpression() { | 568 buildKindExpression() { |
569 var o = new api.KindExpression(); | 569 var o = new api.KindExpression(); |
570 buildCounterKindExpression++; | 570 buildCounterKindExpression++; |
571 if (buildCounterKindExpression < 3) { | 571 if (buildCounterKindExpression < 3) { |
572 o.name = "foo"; | 572 o.name = "foo"; |
573 } | 573 } |
574 buildCounterKindExpression--; | 574 buildCounterKindExpression--; |
575 return o; | 575 return o; |
576 } | 576 } |
577 | 577 |
578 checkKindExpression(api.KindExpression o) { | 578 checkKindExpression(api.KindExpression o) { |
579 buildCounterKindExpression++; | 579 buildCounterKindExpression++; |
580 if (buildCounterKindExpression < 3) { | 580 if (buildCounterKindExpression < 3) { |
581 unittest.expect(o.name, unittest.equals('foo')); | 581 unittest.expect(o.name, unittest.equals('foo')); |
582 } | 582 } |
583 buildCounterKindExpression--; | 583 buildCounterKindExpression--; |
584 } | 584 } |
585 | 585 |
586 buildUnnamed3333() { | 586 buildUnnamed3339() { |
587 var o = new core.List<api.InfoTypeDescription>(); | 587 var o = new core.List<api.InfoTypeDescription>(); |
588 o.add(buildInfoTypeDescription()); | 588 o.add(buildInfoTypeDescription()); |
589 o.add(buildInfoTypeDescription()); | 589 o.add(buildInfoTypeDescription()); |
590 return o; | 590 return o; |
591 } | 591 } |
592 | 592 |
593 checkUnnamed3333(core.List<api.InfoTypeDescription> o) { | 593 checkUnnamed3339(core.List<api.InfoTypeDescription> o) { |
594 unittest.expect(o, unittest.hasLength(2)); | 594 unittest.expect(o, unittest.hasLength(2)); |
595 checkInfoTypeDescription(o[0]); | 595 checkInfoTypeDescription(o[0]); |
596 checkInfoTypeDescription(o[1]); | 596 checkInfoTypeDescription(o[1]); |
597 } | 597 } |
598 | 598 |
599 core.int buildCounterListInfoTypesResponse = 0; | 599 core.int buildCounterListInfoTypesResponse = 0; |
600 buildListInfoTypesResponse() { | 600 buildListInfoTypesResponse() { |
601 var o = new api.ListInfoTypesResponse(); | 601 var o = new api.ListInfoTypesResponse(); |
602 buildCounterListInfoTypesResponse++; | 602 buildCounterListInfoTypesResponse++; |
603 if (buildCounterListInfoTypesResponse < 3) { | 603 if (buildCounterListInfoTypesResponse < 3) { |
604 o.infoTypes = buildUnnamed3333(); | 604 o.infoTypes = buildUnnamed3339(); |
605 } | 605 } |
606 buildCounterListInfoTypesResponse--; | 606 buildCounterListInfoTypesResponse--; |
607 return o; | 607 return o; |
608 } | 608 } |
609 | 609 |
610 checkListInfoTypesResponse(api.ListInfoTypesResponse o) { | 610 checkListInfoTypesResponse(api.ListInfoTypesResponse o) { |
611 buildCounterListInfoTypesResponse++; | 611 buildCounterListInfoTypesResponse++; |
612 if (buildCounterListInfoTypesResponse < 3) { | 612 if (buildCounterListInfoTypesResponse < 3) { |
613 checkUnnamed3333(o.infoTypes); | 613 checkUnnamed3339(o.infoTypes); |
614 } | 614 } |
615 buildCounterListInfoTypesResponse--; | 615 buildCounterListInfoTypesResponse--; |
616 } | 616 } |
617 | 617 |
618 core.int buildCounterListInspectFindingsResponse = 0; | 618 core.int buildCounterListInspectFindingsResponse = 0; |
619 buildListInspectFindingsResponse() { | 619 buildListInspectFindingsResponse() { |
620 var o = new api.ListInspectFindingsResponse(); | 620 var o = new api.ListInspectFindingsResponse(); |
621 buildCounterListInspectFindingsResponse++; | 621 buildCounterListInspectFindingsResponse++; |
622 if (buildCounterListInspectFindingsResponse < 3) { | 622 if (buildCounterListInspectFindingsResponse < 3) { |
623 o.nextPageToken = "foo"; | 623 o.nextPageToken = "foo"; |
624 o.result = buildInspectResult(); | 624 o.result = buildInspectResult(); |
625 } | 625 } |
626 buildCounterListInspectFindingsResponse--; | 626 buildCounterListInspectFindingsResponse--; |
627 return o; | 627 return o; |
628 } | 628 } |
629 | 629 |
630 checkListInspectFindingsResponse(api.ListInspectFindingsResponse o) { | 630 checkListInspectFindingsResponse(api.ListInspectFindingsResponse o) { |
631 buildCounterListInspectFindingsResponse++; | 631 buildCounterListInspectFindingsResponse++; |
632 if (buildCounterListInspectFindingsResponse < 3) { | 632 if (buildCounterListInspectFindingsResponse < 3) { |
633 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 633 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
634 checkInspectResult(o.result); | 634 checkInspectResult(o.result); |
635 } | 635 } |
636 buildCounterListInspectFindingsResponse--; | 636 buildCounterListInspectFindingsResponse--; |
637 } | 637 } |
638 | 638 |
639 buildUnnamed3334() { | 639 buildUnnamed3340() { |
640 var o = new core.List<api.Operation>(); | 640 var o = new core.List<api.Operation>(); |
641 o.add(buildOperation()); | 641 o.add(buildOperation()); |
642 o.add(buildOperation()); | 642 o.add(buildOperation()); |
643 return o; | 643 return o; |
644 } | 644 } |
645 | 645 |
646 checkUnnamed3334(core.List<api.Operation> o) { | 646 checkUnnamed3340(core.List<api.Operation> o) { |
647 unittest.expect(o, unittest.hasLength(2)); | 647 unittest.expect(o, unittest.hasLength(2)); |
648 checkOperation(o[0]); | 648 checkOperation(o[0]); |
649 checkOperation(o[1]); | 649 checkOperation(o[1]); |
650 } | 650 } |
651 | 651 |
652 core.int buildCounterListOperationsResponse = 0; | 652 core.int buildCounterListOperationsResponse = 0; |
653 buildListOperationsResponse() { | 653 buildListOperationsResponse() { |
654 var o = new api.ListOperationsResponse(); | 654 var o = new api.ListOperationsResponse(); |
655 buildCounterListOperationsResponse++; | 655 buildCounterListOperationsResponse++; |
656 if (buildCounterListOperationsResponse < 3) { | 656 if (buildCounterListOperationsResponse < 3) { |
657 o.nextPageToken = "foo"; | 657 o.nextPageToken = "foo"; |
658 o.operations = buildUnnamed3334(); | 658 o.operations = buildUnnamed3340(); |
659 } | 659 } |
660 buildCounterListOperationsResponse--; | 660 buildCounterListOperationsResponse--; |
661 return o; | 661 return o; |
662 } | 662 } |
663 | 663 |
664 checkListOperationsResponse(api.ListOperationsResponse o) { | 664 checkListOperationsResponse(api.ListOperationsResponse o) { |
665 buildCounterListOperationsResponse++; | 665 buildCounterListOperationsResponse++; |
666 if (buildCounterListOperationsResponse < 3) { | 666 if (buildCounterListOperationsResponse < 3) { |
667 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 667 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
668 checkUnnamed3334(o.operations); | 668 checkUnnamed3340(o.operations); |
669 } | 669 } |
670 buildCounterListOperationsResponse--; | 670 buildCounterListOperationsResponse--; |
671 } | 671 } |
672 | 672 |
673 buildUnnamed3335() { | 673 buildUnnamed3341() { |
674 var o = new core.List<api.CategoryDescription>(); | 674 var o = new core.List<api.CategoryDescription>(); |
675 o.add(buildCategoryDescription()); | 675 o.add(buildCategoryDescription()); |
676 o.add(buildCategoryDescription()); | 676 o.add(buildCategoryDescription()); |
677 return o; | 677 return o; |
678 } | 678 } |
679 | 679 |
680 checkUnnamed3335(core.List<api.CategoryDescription> o) { | 680 checkUnnamed3341(core.List<api.CategoryDescription> o) { |
681 unittest.expect(o, unittest.hasLength(2)); | 681 unittest.expect(o, unittest.hasLength(2)); |
682 checkCategoryDescription(o[0]); | 682 checkCategoryDescription(o[0]); |
683 checkCategoryDescription(o[1]); | 683 checkCategoryDescription(o[1]); |
684 } | 684 } |
685 | 685 |
686 core.int buildCounterListRootCategoriesResponse = 0; | 686 core.int buildCounterListRootCategoriesResponse = 0; |
687 buildListRootCategoriesResponse() { | 687 buildListRootCategoriesResponse() { |
688 var o = new api.ListRootCategoriesResponse(); | 688 var o = new api.ListRootCategoriesResponse(); |
689 buildCounterListRootCategoriesResponse++; | 689 buildCounterListRootCategoriesResponse++; |
690 if (buildCounterListRootCategoriesResponse < 3) { | 690 if (buildCounterListRootCategoriesResponse < 3) { |
691 o.categories = buildUnnamed3335(); | 691 o.categories = buildUnnamed3341(); |
692 } | 692 } |
693 buildCounterListRootCategoriesResponse--; | 693 buildCounterListRootCategoriesResponse--; |
694 return o; | 694 return o; |
695 } | 695 } |
696 | 696 |
697 checkListRootCategoriesResponse(api.ListRootCategoriesResponse o) { | 697 checkListRootCategoriesResponse(api.ListRootCategoriesResponse o) { |
698 buildCounterListRootCategoriesResponse++; | 698 buildCounterListRootCategoriesResponse++; |
699 if (buildCounterListRootCategoriesResponse < 3) { | 699 if (buildCounterListRootCategoriesResponse < 3) { |
700 checkUnnamed3335(o.categories); | 700 checkUnnamed3341(o.categories); |
701 } | 701 } |
702 buildCounterListRootCategoriesResponse--; | 702 buildCounterListRootCategoriesResponse--; |
703 } | 703 } |
704 | 704 |
705 buildUnnamed3336() { | 705 buildUnnamed3342() { |
706 var o = new core.List<api.ImageLocation>(); | 706 var o = new core.List<api.ImageLocation>(); |
707 o.add(buildImageLocation()); | 707 o.add(buildImageLocation()); |
708 o.add(buildImageLocation()); | 708 o.add(buildImageLocation()); |
709 return o; | 709 return o; |
710 } | 710 } |
711 | 711 |
712 checkUnnamed3336(core.List<api.ImageLocation> o) { | 712 checkUnnamed3342(core.List<api.ImageLocation> o) { |
713 unittest.expect(o, unittest.hasLength(2)); | 713 unittest.expect(o, unittest.hasLength(2)); |
714 checkImageLocation(o[0]); | 714 checkImageLocation(o[0]); |
715 checkImageLocation(o[1]); | 715 checkImageLocation(o[1]); |
716 } | 716 } |
717 | 717 |
718 core.int buildCounterLocation = 0; | 718 core.int buildCounterLocation = 0; |
719 buildLocation() { | 719 buildLocation() { |
720 var o = new api.Location(); | 720 var o = new api.Location(); |
721 buildCounterLocation++; | 721 buildCounterLocation++; |
722 if (buildCounterLocation < 3) { | 722 if (buildCounterLocation < 3) { |
723 o.byteRange = buildRange(); | 723 o.byteRange = buildRange(); |
724 o.codepointRange = buildRange(); | 724 o.codepointRange = buildRange(); |
725 o.fieldId = buildFieldId(); | 725 o.fieldId = buildFieldId(); |
726 o.imageBoxes = buildUnnamed3336(); | 726 o.imageBoxes = buildUnnamed3342(); |
727 o.recordKey = buildRecordKey(); | 727 o.recordKey = buildRecordKey(); |
728 } | 728 } |
729 buildCounterLocation--; | 729 buildCounterLocation--; |
730 return o; | 730 return o; |
731 } | 731 } |
732 | 732 |
733 checkLocation(api.Location o) { | 733 checkLocation(api.Location o) { |
734 buildCounterLocation++; | 734 buildCounterLocation++; |
735 if (buildCounterLocation < 3) { | 735 if (buildCounterLocation < 3) { |
736 checkRange(o.byteRange); | 736 checkRange(o.byteRange); |
737 checkRange(o.codepointRange); | 737 checkRange(o.codepointRange); |
738 checkFieldId(o.fieldId); | 738 checkFieldId(o.fieldId); |
739 checkUnnamed3336(o.imageBoxes); | 739 checkUnnamed3342(o.imageBoxes); |
740 checkRecordKey(o.recordKey); | 740 checkRecordKey(o.recordKey); |
741 } | 741 } |
742 buildCounterLocation--; | 742 buildCounterLocation--; |
743 } | 743 } |
744 | 744 |
745 buildUnnamed3337() { | 745 buildUnnamed3343() { |
746 var o = new core.Map<core.String, core.Object>(); | 746 var o = new core.Map<core.String, core.Object>(); |
747 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 747 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; |
748 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 748 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; |
749 return o; | 749 return o; |
750 } | 750 } |
751 | 751 |
752 checkUnnamed3337(core.Map<core.String, core.Object> o) { | 752 checkUnnamed3343(core.Map<core.String, core.Object> o) { |
753 unittest.expect(o, unittest.hasLength(2)); | 753 unittest.expect(o, unittest.hasLength(2)); |
754 var casted1 = (o["x"]) as core.Map; unittest.expect(casted1, unittest.hasLengt
h(3)); unittest.expect(casted1["list"], unittest.equals([1, 2, 3])); unittest.ex
pect(casted1["bool"], unittest.equals(true)); unittest.expect(casted1["string"],
unittest.equals('foo')); | 754 var casted1 = (o["x"]) as core.Map; unittest.expect(casted1, unittest.hasLengt
h(3)); unittest.expect(casted1["list"], unittest.equals([1, 2, 3])); unittest.ex
pect(casted1["bool"], unittest.equals(true)); unittest.expect(casted1["string"],
unittest.equals('foo')); |
755 var casted2 = (o["y"]) as core.Map; unittest.expect(casted2, unittest.hasLengt
h(3)); unittest.expect(casted2["list"], unittest.equals([1, 2, 3])); unittest.ex
pect(casted2["bool"], unittest.equals(true)); unittest.expect(casted2["string"],
unittest.equals('foo')); | 755 var casted2 = (o["y"]) as core.Map; unittest.expect(casted2, unittest.hasLengt
h(3)); unittest.expect(casted2["list"], unittest.equals([1, 2, 3])); unittest.ex
pect(casted2["bool"], unittest.equals(true)); unittest.expect(casted2["string"],
unittest.equals('foo')); |
756 } | 756 } |
757 | 757 |
758 buildUnnamed3338() { | 758 buildUnnamed3344() { |
759 var o = new core.Map<core.String, core.Object>(); | 759 var o = new core.Map<core.String, core.Object>(); |
760 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 760 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; |
761 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 761 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; |
762 return o; | 762 return o; |
763 } | 763 } |
764 | 764 |
765 checkUnnamed3338(core.Map<core.String, core.Object> o) { | 765 checkUnnamed3344(core.Map<core.String, core.Object> o) { |
766 unittest.expect(o, unittest.hasLength(2)); | 766 unittest.expect(o, unittest.hasLength(2)); |
767 var casted3 = (o["x"]) as core.Map; unittest.expect(casted3, unittest.hasLengt
h(3)); unittest.expect(casted3["list"], unittest.equals([1, 2, 3])); unittest.ex
pect(casted3["bool"], unittest.equals(true)); unittest.expect(casted3["string"],
unittest.equals('foo')); | 767 var casted3 = (o["x"]) as core.Map; unittest.expect(casted3, unittest.hasLengt
h(3)); unittest.expect(casted3["list"], unittest.equals([1, 2, 3])); unittest.ex
pect(casted3["bool"], unittest.equals(true)); unittest.expect(casted3["string"],
unittest.equals('foo')); |
768 var casted4 = (o["y"]) as core.Map; unittest.expect(casted4, unittest.hasLengt
h(3)); unittest.expect(casted4["list"], unittest.equals([1, 2, 3])); unittest.ex
pect(casted4["bool"], unittest.equals(true)); unittest.expect(casted4["string"],
unittest.equals('foo')); | 768 var casted4 = (o["y"]) as core.Map; unittest.expect(casted4, unittest.hasLengt
h(3)); unittest.expect(casted4["list"], unittest.equals([1, 2, 3])); unittest.ex
pect(casted4["bool"], unittest.equals(true)); unittest.expect(casted4["string"],
unittest.equals('foo')); |
769 } | 769 } |
770 | 770 |
771 core.int buildCounterOperation = 0; | 771 core.int buildCounterOperation = 0; |
772 buildOperation() { | 772 buildOperation() { |
773 var o = new api.Operation(); | 773 var o = new api.Operation(); |
774 buildCounterOperation++; | 774 buildCounterOperation++; |
775 if (buildCounterOperation < 3) { | 775 if (buildCounterOperation < 3) { |
776 o.done = true; | 776 o.done = true; |
777 o.error = buildStatus(); | 777 o.error = buildStatus(); |
778 o.metadata = buildUnnamed3337(); | 778 o.metadata = buildUnnamed3343(); |
779 o.name = "foo"; | 779 o.name = "foo"; |
780 o.response = buildUnnamed3338(); | 780 o.response = buildUnnamed3344(); |
781 } | 781 } |
782 buildCounterOperation--; | 782 buildCounterOperation--; |
783 return o; | 783 return o; |
784 } | 784 } |
785 | 785 |
786 checkOperation(api.Operation o) { | 786 checkOperation(api.Operation o) { |
787 buildCounterOperation++; | 787 buildCounterOperation++; |
788 if (buildCounterOperation < 3) { | 788 if (buildCounterOperation < 3) { |
789 unittest.expect(o.done, unittest.isTrue); | 789 unittest.expect(o.done, unittest.isTrue); |
790 checkStatus(o.error); | 790 checkStatus(o.error); |
791 checkUnnamed3337(o.metadata); | 791 checkUnnamed3343(o.metadata); |
792 unittest.expect(o.name, unittest.equals('foo')); | 792 unittest.expect(o.name, unittest.equals('foo')); |
793 checkUnnamed3338(o.response); | 793 checkUnnamed3344(o.response); |
794 } | 794 } |
795 buildCounterOperation--; | 795 buildCounterOperation--; |
796 } | 796 } |
797 | 797 |
798 core.int buildCounterPartitionId = 0; | 798 core.int buildCounterPartitionId = 0; |
799 buildPartitionId() { | 799 buildPartitionId() { |
800 var o = new api.PartitionId(); | 800 var o = new api.PartitionId(); |
801 buildCounterPartitionId++; | 801 buildCounterPartitionId++; |
802 if (buildCounterPartitionId < 3) { | 802 if (buildCounterPartitionId < 3) { |
803 o.databaseId = "foo"; | 803 o.databaseId = "foo"; |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
914 | 914 |
915 checkRecordKey(api.RecordKey o) { | 915 checkRecordKey(api.RecordKey o) { |
916 buildCounterRecordKey++; | 916 buildCounterRecordKey++; |
917 if (buildCounterRecordKey < 3) { | 917 if (buildCounterRecordKey < 3) { |
918 checkCloudStorageKey(o.cloudStorageKey); | 918 checkCloudStorageKey(o.cloudStorageKey); |
919 checkDatastoreKey(o.datastoreKey); | 919 checkDatastoreKey(o.datastoreKey); |
920 } | 920 } |
921 buildCounterRecordKey--; | 921 buildCounterRecordKey--; |
922 } | 922 } |
923 | 923 |
924 buildUnnamed3339() { | 924 buildUnnamed3345() { |
925 var o = new core.List<api.ContentItem>(); | 925 var o = new core.List<api.ContentItem>(); |
926 o.add(buildContentItem()); | 926 o.add(buildContentItem()); |
927 o.add(buildContentItem()); | 927 o.add(buildContentItem()); |
928 return o; | 928 return o; |
929 } | 929 } |
930 | 930 |
931 checkUnnamed3339(core.List<api.ContentItem> o) { | 931 checkUnnamed3345(core.List<api.ContentItem> o) { |
932 unittest.expect(o, unittest.hasLength(2)); | 932 unittest.expect(o, unittest.hasLength(2)); |
933 checkContentItem(o[0]); | 933 checkContentItem(o[0]); |
934 checkContentItem(o[1]); | 934 checkContentItem(o[1]); |
935 } | 935 } |
936 | 936 |
937 buildUnnamed3340() { | 937 buildUnnamed3346() { |
938 var o = new core.List<api.ReplaceConfig>(); | 938 var o = new core.List<api.ReplaceConfig>(); |
939 o.add(buildReplaceConfig()); | 939 o.add(buildReplaceConfig()); |
940 o.add(buildReplaceConfig()); | 940 o.add(buildReplaceConfig()); |
941 return o; | 941 return o; |
942 } | 942 } |
943 | 943 |
944 checkUnnamed3340(core.List<api.ReplaceConfig> o) { | 944 checkUnnamed3346(core.List<api.ReplaceConfig> o) { |
945 unittest.expect(o, unittest.hasLength(2)); | 945 unittest.expect(o, unittest.hasLength(2)); |
946 checkReplaceConfig(o[0]); | 946 checkReplaceConfig(o[0]); |
947 checkReplaceConfig(o[1]); | 947 checkReplaceConfig(o[1]); |
948 } | 948 } |
949 | 949 |
950 core.int buildCounterRedactContentRequest = 0; | 950 core.int buildCounterRedactContentRequest = 0; |
951 buildRedactContentRequest() { | 951 buildRedactContentRequest() { |
952 var o = new api.RedactContentRequest(); | 952 var o = new api.RedactContentRequest(); |
953 buildCounterRedactContentRequest++; | 953 buildCounterRedactContentRequest++; |
954 if (buildCounterRedactContentRequest < 3) { | 954 if (buildCounterRedactContentRequest < 3) { |
955 o.inspectConfig = buildInspectConfig(); | 955 o.inspectConfig = buildInspectConfig(); |
956 o.items = buildUnnamed3339(); | 956 o.items = buildUnnamed3345(); |
957 o.replaceConfigs = buildUnnamed3340(); | 957 o.replaceConfigs = buildUnnamed3346(); |
958 } | 958 } |
959 buildCounterRedactContentRequest--; | 959 buildCounterRedactContentRequest--; |
960 return o; | 960 return o; |
961 } | 961 } |
962 | 962 |
963 checkRedactContentRequest(api.RedactContentRequest o) { | 963 checkRedactContentRequest(api.RedactContentRequest o) { |
964 buildCounterRedactContentRequest++; | 964 buildCounterRedactContentRequest++; |
965 if (buildCounterRedactContentRequest < 3) { | 965 if (buildCounterRedactContentRequest < 3) { |
966 checkInspectConfig(o.inspectConfig); | 966 checkInspectConfig(o.inspectConfig); |
967 checkUnnamed3339(o.items); | 967 checkUnnamed3345(o.items); |
968 checkUnnamed3340(o.replaceConfigs); | 968 checkUnnamed3346(o.replaceConfigs); |
969 } | 969 } |
970 buildCounterRedactContentRequest--; | 970 buildCounterRedactContentRequest--; |
971 } | 971 } |
972 | 972 |
973 buildUnnamed3341() { | 973 buildUnnamed3347() { |
974 var o = new core.List<api.ContentItem>(); | 974 var o = new core.List<api.ContentItem>(); |
975 o.add(buildContentItem()); | 975 o.add(buildContentItem()); |
976 o.add(buildContentItem()); | 976 o.add(buildContentItem()); |
977 return o; | 977 return o; |
978 } | 978 } |
979 | 979 |
980 checkUnnamed3341(core.List<api.ContentItem> o) { | 980 checkUnnamed3347(core.List<api.ContentItem> o) { |
981 unittest.expect(o, unittest.hasLength(2)); | 981 unittest.expect(o, unittest.hasLength(2)); |
982 checkContentItem(o[0]); | 982 checkContentItem(o[0]); |
983 checkContentItem(o[1]); | 983 checkContentItem(o[1]); |
984 } | 984 } |
985 | 985 |
986 core.int buildCounterRedactContentResponse = 0; | 986 core.int buildCounterRedactContentResponse = 0; |
987 buildRedactContentResponse() { | 987 buildRedactContentResponse() { |
988 var o = new api.RedactContentResponse(); | 988 var o = new api.RedactContentResponse(); |
989 buildCounterRedactContentResponse++; | 989 buildCounterRedactContentResponse++; |
990 if (buildCounterRedactContentResponse < 3) { | 990 if (buildCounterRedactContentResponse < 3) { |
991 o.items = buildUnnamed3341(); | 991 o.items = buildUnnamed3347(); |
992 } | 992 } |
993 buildCounterRedactContentResponse--; | 993 buildCounterRedactContentResponse--; |
994 return o; | 994 return o; |
995 } | 995 } |
996 | 996 |
997 checkRedactContentResponse(api.RedactContentResponse o) { | 997 checkRedactContentResponse(api.RedactContentResponse o) { |
998 buildCounterRedactContentResponse++; | 998 buildCounterRedactContentResponse++; |
999 if (buildCounterRedactContentResponse < 3) { | 999 if (buildCounterRedactContentResponse < 3) { |
1000 checkUnnamed3341(o.items); | 1000 checkUnnamed3347(o.items); |
1001 } | 1001 } |
1002 buildCounterRedactContentResponse--; | 1002 buildCounterRedactContentResponse--; |
1003 } | 1003 } |
1004 | 1004 |
1005 core.int buildCounterReplaceConfig = 0; | 1005 core.int buildCounterReplaceConfig = 0; |
1006 buildReplaceConfig() { | 1006 buildReplaceConfig() { |
1007 var o = new api.ReplaceConfig(); | 1007 var o = new api.ReplaceConfig(); |
1008 buildCounterReplaceConfig++; | 1008 buildCounterReplaceConfig++; |
1009 if (buildCounterReplaceConfig < 3) { | 1009 if (buildCounterReplaceConfig < 3) { |
1010 o.infoType = buildInfoType(); | 1010 o.infoType = buildInfoType(); |
1011 o.replaceWith = "foo"; | 1011 o.replaceWith = "foo"; |
1012 } | 1012 } |
1013 buildCounterReplaceConfig--; | 1013 buildCounterReplaceConfig--; |
1014 return o; | 1014 return o; |
1015 } | 1015 } |
1016 | 1016 |
1017 checkReplaceConfig(api.ReplaceConfig o) { | 1017 checkReplaceConfig(api.ReplaceConfig o) { |
1018 buildCounterReplaceConfig++; | 1018 buildCounterReplaceConfig++; |
1019 if (buildCounterReplaceConfig < 3) { | 1019 if (buildCounterReplaceConfig < 3) { |
1020 checkInfoType(o.infoType); | 1020 checkInfoType(o.infoType); |
1021 unittest.expect(o.replaceWith, unittest.equals('foo')); | 1021 unittest.expect(o.replaceWith, unittest.equals('foo')); |
1022 } | 1022 } |
1023 buildCounterReplaceConfig--; | 1023 buildCounterReplaceConfig--; |
1024 } | 1024 } |
1025 | 1025 |
1026 buildUnnamed3342() { | 1026 buildUnnamed3348() { |
1027 var o = new core.Map<core.String, core.Object>(); | 1027 var o = new core.Map<core.String, core.Object>(); |
1028 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 1028 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; |
1029 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 1029 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; |
1030 return o; | 1030 return o; |
1031 } | 1031 } |
1032 | 1032 |
1033 checkUnnamed3342(core.Map<core.String, core.Object> o) { | 1033 checkUnnamed3348(core.Map<core.String, core.Object> o) { |
1034 unittest.expect(o, unittest.hasLength(2)); | 1034 unittest.expect(o, unittest.hasLength(2)); |
1035 var casted5 = (o["x"]) as core.Map; unittest.expect(casted5, unittest.hasLengt
h(3)); unittest.expect(casted5["list"], unittest.equals([1, 2, 3])); unittest.ex
pect(casted5["bool"], unittest.equals(true)); unittest.expect(casted5["string"],
unittest.equals('foo')); | 1035 var casted5 = (o["x"]) as core.Map; unittest.expect(casted5, unittest.hasLengt
h(3)); unittest.expect(casted5["list"], unittest.equals([1, 2, 3])); unittest.ex
pect(casted5["bool"], unittest.equals(true)); unittest.expect(casted5["string"],
unittest.equals('foo')); |
1036 var casted6 = (o["y"]) as core.Map; unittest.expect(casted6, unittest.hasLengt
h(3)); unittest.expect(casted6["list"], unittest.equals([1, 2, 3])); unittest.ex
pect(casted6["bool"], unittest.equals(true)); unittest.expect(casted6["string"],
unittest.equals('foo')); | 1036 var casted6 = (o["y"]) as core.Map; unittest.expect(casted6, unittest.hasLengt
h(3)); unittest.expect(casted6["list"], unittest.equals([1, 2, 3])); unittest.ex
pect(casted6["bool"], unittest.equals(true)); unittest.expect(casted6["string"],
unittest.equals('foo')); |
1037 } | 1037 } |
1038 | 1038 |
1039 buildUnnamed3343() { | 1039 buildUnnamed3349() { |
1040 var o = new core.List<core.Map<core.String, core.Object>>(); | 1040 var o = new core.List<core.Map<core.String, core.Object>>(); |
1041 o.add(buildUnnamed3342()); | 1041 o.add(buildUnnamed3348()); |
1042 o.add(buildUnnamed3342()); | 1042 o.add(buildUnnamed3348()); |
1043 return o; | 1043 return o; |
1044 } | 1044 } |
1045 | 1045 |
1046 checkUnnamed3343(core.List<core.Map<core.String, core.Object>> o) { | 1046 checkUnnamed3349(core.List<core.Map<core.String, core.Object>> o) { |
1047 unittest.expect(o, unittest.hasLength(2)); | 1047 unittest.expect(o, unittest.hasLength(2)); |
1048 checkUnnamed3342(o[0]); | 1048 checkUnnamed3348(o[0]); |
1049 checkUnnamed3342(o[1]); | 1049 checkUnnamed3348(o[1]); |
1050 } | 1050 } |
1051 | 1051 |
1052 core.int buildCounterStatus = 0; | 1052 core.int buildCounterStatus = 0; |
1053 buildStatus() { | 1053 buildStatus() { |
1054 var o = new api.Status(); | 1054 var o = new api.Status(); |
1055 buildCounterStatus++; | 1055 buildCounterStatus++; |
1056 if (buildCounterStatus < 3) { | 1056 if (buildCounterStatus < 3) { |
1057 o.code = 42; | 1057 o.code = 42; |
1058 o.details = buildUnnamed3343(); | 1058 o.details = buildUnnamed3349(); |
1059 o.message = "foo"; | 1059 o.message = "foo"; |
1060 } | 1060 } |
1061 buildCounterStatus--; | 1061 buildCounterStatus--; |
1062 return o; | 1062 return o; |
1063 } | 1063 } |
1064 | 1064 |
1065 checkStatus(api.Status o) { | 1065 checkStatus(api.Status o) { |
1066 buildCounterStatus++; | 1066 buildCounterStatus++; |
1067 if (buildCounterStatus < 3) { | 1067 if (buildCounterStatus < 3) { |
1068 unittest.expect(o.code, unittest.equals(42)); | 1068 unittest.expect(o.code, unittest.equals(42)); |
1069 checkUnnamed3343(o.details); | 1069 checkUnnamed3349(o.details); |
1070 unittest.expect(o.message, unittest.equals('foo')); | 1070 unittest.expect(o.message, unittest.equals('foo')); |
1071 } | 1071 } |
1072 buildCounterStatus--; | 1072 buildCounterStatus--; |
1073 } | 1073 } |
1074 | 1074 |
1075 core.int buildCounterStorageConfig = 0; | 1075 core.int buildCounterStorageConfig = 0; |
1076 buildStorageConfig() { | 1076 buildStorageConfig() { |
1077 var o = new api.StorageConfig(); | 1077 var o = new api.StorageConfig(); |
1078 buildCounterStorageConfig++; | 1078 buildCounterStorageConfig++; |
1079 if (buildCounterStorageConfig < 3) { | 1079 if (buildCounterStorageConfig < 3) { |
(...skipping 640 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1720 res.get(arg_name).then(unittest.expectAsync(((api.Operation response) { | 1720 res.get(arg_name).then(unittest.expectAsync(((api.Operation response) { |
1721 checkOperation(response); | 1721 checkOperation(response); |
1722 }))); | 1722 }))); |
1723 }); | 1723 }); |
1724 | 1724 |
1725 unittest.test("method--list", () { | 1725 unittest.test("method--list", () { |
1726 | 1726 |
1727 var mock = new HttpServerMock(); | 1727 var mock = new HttpServerMock(); |
1728 api.InspectOperationsResourceApi res = new api.DlpApi(mock).inspect.operat
ions; | 1728 api.InspectOperationsResourceApi res = new api.DlpApi(mock).inspect.operat
ions; |
1729 var arg_name = "foo"; | 1729 var arg_name = "foo"; |
1730 var arg_pageSize = 42; | |
1731 var arg_filter = "foo"; | 1730 var arg_filter = "foo"; |
1732 var arg_pageToken = "foo"; | 1731 var arg_pageToken = "foo"; |
| 1732 var arg_pageSize = 42; |
1733 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1733 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
1734 var path = (req.url).path; | 1734 var path = (req.url).path; |
1735 var pathOffset = 0; | 1735 var pathOffset = 0; |
1736 var index; | 1736 var index; |
1737 var subPart; | 1737 var subPart; |
1738 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1738 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
1739 pathOffset += 1; | 1739 pathOffset += 1; |
1740 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("v2beta1/")); | 1740 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("v2beta1/")); |
1741 pathOffset += 8; | 1741 pathOffset += 8; |
1742 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; | 1742 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; |
1743 | 1743 |
1744 var query = (req.url).query; | 1744 var query = (req.url).query; |
1745 var queryOffset = 0; | 1745 var queryOffset = 0; |
1746 var queryMap = {}; | 1746 var queryMap = {}; |
1747 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 1747 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
1748 parseBool(n) { | 1748 parseBool(n) { |
1749 if (n == "true") return true; | 1749 if (n == "true") return true; |
1750 if (n == "false") return false; | 1750 if (n == "false") return false; |
1751 if (n == null) return null; | 1751 if (n == null) return null; |
1752 throw new core.ArgumentError("Invalid boolean: $n"); | 1752 throw new core.ArgumentError("Invalid boolean: $n"); |
1753 } | 1753 } |
1754 if (query.length > 0) { | 1754 if (query.length > 0) { |
1755 for (var part in query.split("&")) { | 1755 for (var part in query.split("&")) { |
1756 var keyvalue = part.split("="); | 1756 var keyvalue = part.split("="); |
1757 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 1757 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
1758 } | 1758 } |
1759 } | 1759 } |
1760 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ
als(arg_pageSize)); | |
1761 unittest.expect(queryMap["filter"].first, unittest.equals(arg_filter)); | 1760 unittest.expect(queryMap["filter"].first, unittest.equals(arg_filter)); |
1762 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | 1761 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); |
| 1762 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ
als(arg_pageSize)); |
1763 | 1763 |
1764 | 1764 |
1765 var h = { | 1765 var h = { |
1766 "content-type" : "application/json; charset=utf-8", | 1766 "content-type" : "application/json; charset=utf-8", |
1767 }; | 1767 }; |
1768 var resp = convert.JSON.encode(buildListOperationsResponse()); | 1768 var resp = convert.JSON.encode(buildListOperationsResponse()); |
1769 return new async.Future.value(stringResponse(200, h, resp)); | 1769 return new async.Future.value(stringResponse(200, h, resp)); |
1770 }), true); | 1770 }), true); |
1771 res.list(arg_name, pageSize: arg_pageSize, filter: arg_filter, pageToken:
arg_pageToken).then(unittest.expectAsync(((api.ListOperationsResponse response)
{ | 1771 res.list(arg_name, filter: arg_filter, pageToken: arg_pageToken, pageSize:
arg_pageSize).then(unittest.expectAsync(((api.ListOperationsResponse response)
{ |
1772 checkListOperationsResponse(response); | 1772 checkListOperationsResponse(response); |
1773 }))); | 1773 }))); |
1774 }); | 1774 }); |
1775 | 1775 |
1776 }); | 1776 }); |
1777 | 1777 |
1778 | 1778 |
1779 unittest.group("resource-InspectResultsFindingsResourceApi", () { | 1779 unittest.group("resource-InspectResultsFindingsResourceApi", () { |
1780 unittest.test("method--list", () { | 1780 unittest.test("method--list", () { |
1781 | 1781 |
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1924 res.list(arg_category, languageCode: arg_languageCode).then(unittest.expec
tAsync(((api.ListInfoTypesResponse response) { | 1924 res.list(arg_category, languageCode: arg_languageCode).then(unittest.expec
tAsync(((api.ListInfoTypesResponse response) { |
1925 checkListInfoTypesResponse(response); | 1925 checkListInfoTypesResponse(response); |
1926 }))); | 1926 }))); |
1927 }); | 1927 }); |
1928 | 1928 |
1929 }); | 1929 }); |
1930 | 1930 |
1931 | 1931 |
1932 } | 1932 } |
1933 | 1933 |
OLD | NEW |