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

Side by Side Diff: generated/googleapis/test/customsearch/v1_test.dart

Issue 595873002: Api roll 1: 2014-09-23 (Closed) Base URL: git@github.com:dart-lang/googleapis.git@master
Patch Set: Created 6 years, 3 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.customsearch.v1.test; 1 library googleapis.customsearch.v1.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 21 matching lines...) Expand all
32 checkContextFacets(api.ContextFacets o) { 32 checkContextFacets(api.ContextFacets o) {
33 buildCounterContextFacets++; 33 buildCounterContextFacets++;
34 if (buildCounterContextFacets < 3) { 34 if (buildCounterContextFacets < 3) {
35 unittest.expect(o.anchor, unittest.equals('foo')); 35 unittest.expect(o.anchor, unittest.equals('foo'));
36 unittest.expect(o.label, unittest.equals('foo')); 36 unittest.expect(o.label, unittest.equals('foo'));
37 unittest.expect(o.labelWithOp, unittest.equals('foo')); 37 unittest.expect(o.labelWithOp, unittest.equals('foo'));
38 } 38 }
39 buildCounterContextFacets--; 39 buildCounterContextFacets--;
40 } 40 }
41 41
42 buildUnnamed288() { 42 buildUnnamed291() {
43 var o = new core.List<api.ContextFacets>(); 43 var o = new core.List<api.ContextFacets>();
44 o.add(buildContextFacets()); 44 o.add(buildContextFacets());
45 o.add(buildContextFacets()); 45 o.add(buildContextFacets());
46 return o; 46 return o;
47 } 47 }
48 48
49 checkUnnamed288(core.List<api.ContextFacets> o) { 49 checkUnnamed291(core.List<api.ContextFacets> o) {
50 unittest.expect(o, unittest.hasLength(2)); 50 unittest.expect(o, unittest.hasLength(2));
51 checkContextFacets(o[0]); 51 checkContextFacets(o[0]);
52 checkContextFacets(o[1]); 52 checkContextFacets(o[1]);
53 } 53 }
54 54
55 buildUnnamed289() { 55 buildUnnamed292() {
56 var o = new core.List<core.List<api.ContextFacets>>(); 56 var o = new core.List<core.List<api.ContextFacets>>();
57 o.add(buildUnnamed288()); 57 o.add(buildUnnamed291());
58 o.add(buildUnnamed288()); 58 o.add(buildUnnamed291());
59 return o; 59 return o;
60 } 60 }
61 61
62 checkUnnamed289(core.List<core.List<api.ContextFacets>> o) { 62 checkUnnamed292(core.List<core.List<api.ContextFacets>> o) {
63 unittest.expect(o, unittest.hasLength(2)); 63 unittest.expect(o, unittest.hasLength(2));
64 checkUnnamed288(o[0]); 64 checkUnnamed291(o[0]);
65 checkUnnamed288(o[1]); 65 checkUnnamed291(o[1]);
66 } 66 }
67 67
68 core.int buildCounterContext = 0; 68 core.int buildCounterContext = 0;
69 buildContext() { 69 buildContext() {
70 var o = new api.Context(); 70 var o = new api.Context();
71 buildCounterContext++; 71 buildCounterContext++;
72 if (buildCounterContext < 3) { 72 if (buildCounterContext < 3) {
73 o.facets = buildUnnamed289(); 73 o.facets = buildUnnamed292();
74 o.title = "foo"; 74 o.title = "foo";
75 } 75 }
76 buildCounterContext--; 76 buildCounterContext--;
77 return o; 77 return o;
78 } 78 }
79 79
80 checkContext(api.Context o) { 80 checkContext(api.Context o) {
81 buildCounterContext++; 81 buildCounterContext++;
82 if (buildCounterContext < 3) { 82 if (buildCounterContext < 3) {
83 checkUnnamed289(o.facets); 83 checkUnnamed292(o.facets);
84 unittest.expect(o.title, unittest.equals('foo')); 84 unittest.expect(o.title, unittest.equals('foo'));
85 } 85 }
86 buildCounterContext--; 86 buildCounterContext--;
87 } 87 }
88 88
89 core.int buildCounterPromotionBodyLines = 0; 89 core.int buildCounterPromotionBodyLines = 0;
90 buildPromotionBodyLines() { 90 buildPromotionBodyLines() {
91 var o = new api.PromotionBodyLines(); 91 var o = new api.PromotionBodyLines();
92 buildCounterPromotionBodyLines++; 92 buildCounterPromotionBodyLines++;
93 if (buildCounterPromotionBodyLines < 3) { 93 if (buildCounterPromotionBodyLines < 3) {
(...skipping 10 matching lines...) Expand all
104 buildCounterPromotionBodyLines++; 104 buildCounterPromotionBodyLines++;
105 if (buildCounterPromotionBodyLines < 3) { 105 if (buildCounterPromotionBodyLines < 3) {
106 unittest.expect(o.htmlTitle, unittest.equals('foo')); 106 unittest.expect(o.htmlTitle, unittest.equals('foo'));
107 unittest.expect(o.link, unittest.equals('foo')); 107 unittest.expect(o.link, unittest.equals('foo'));
108 unittest.expect(o.title, unittest.equals('foo')); 108 unittest.expect(o.title, unittest.equals('foo'));
109 unittest.expect(o.url, unittest.equals('foo')); 109 unittest.expect(o.url, unittest.equals('foo'));
110 } 110 }
111 buildCounterPromotionBodyLines--; 111 buildCounterPromotionBodyLines--;
112 } 112 }
113 113
114 buildUnnamed290() { 114 buildUnnamed293() {
115 var o = new core.List<api.PromotionBodyLines>(); 115 var o = new core.List<api.PromotionBodyLines>();
116 o.add(buildPromotionBodyLines()); 116 o.add(buildPromotionBodyLines());
117 o.add(buildPromotionBodyLines()); 117 o.add(buildPromotionBodyLines());
118 return o; 118 return o;
119 } 119 }
120 120
121 checkUnnamed290(core.List<api.PromotionBodyLines> o) { 121 checkUnnamed293(core.List<api.PromotionBodyLines> o) {
122 unittest.expect(o, unittest.hasLength(2)); 122 unittest.expect(o, unittest.hasLength(2));
123 checkPromotionBodyLines(o[0]); 123 checkPromotionBodyLines(o[0]);
124 checkPromotionBodyLines(o[1]); 124 checkPromotionBodyLines(o[1]);
125 } 125 }
126 126
127 core.int buildCounterPromotionImage = 0; 127 core.int buildCounterPromotionImage = 0;
128 buildPromotionImage() { 128 buildPromotionImage() {
129 var o = new api.PromotionImage(); 129 var o = new api.PromotionImage();
130 buildCounterPromotionImage++; 130 buildCounterPromotionImage++;
131 if (buildCounterPromotionImage < 3) { 131 if (buildCounterPromotionImage < 3) {
(...skipping 13 matching lines...) Expand all
145 unittest.expect(o.width, unittest.equals(42)); 145 unittest.expect(o.width, unittest.equals(42));
146 } 146 }
147 buildCounterPromotionImage--; 147 buildCounterPromotionImage--;
148 } 148 }
149 149
150 core.int buildCounterPromotion = 0; 150 core.int buildCounterPromotion = 0;
151 buildPromotion() { 151 buildPromotion() {
152 var o = new api.Promotion(); 152 var o = new api.Promotion();
153 buildCounterPromotion++; 153 buildCounterPromotion++;
154 if (buildCounterPromotion < 3) { 154 if (buildCounterPromotion < 3) {
155 o.bodyLines = buildUnnamed290(); 155 o.bodyLines = buildUnnamed293();
156 o.displayLink = "foo"; 156 o.displayLink = "foo";
157 o.htmlTitle = "foo"; 157 o.htmlTitle = "foo";
158 o.image = buildPromotionImage(); 158 o.image = buildPromotionImage();
159 o.link = "foo"; 159 o.link = "foo";
160 o.title = "foo"; 160 o.title = "foo";
161 } 161 }
162 buildCounterPromotion--; 162 buildCounterPromotion--;
163 return o; 163 return o;
164 } 164 }
165 165
166 checkPromotion(api.Promotion o) { 166 checkPromotion(api.Promotion o) {
167 buildCounterPromotion++; 167 buildCounterPromotion++;
168 if (buildCounterPromotion < 3) { 168 if (buildCounterPromotion < 3) {
169 checkUnnamed290(o.bodyLines); 169 checkUnnamed293(o.bodyLines);
170 unittest.expect(o.displayLink, unittest.equals('foo')); 170 unittest.expect(o.displayLink, unittest.equals('foo'));
171 unittest.expect(o.htmlTitle, unittest.equals('foo')); 171 unittest.expect(o.htmlTitle, unittest.equals('foo'));
172 checkPromotionImage(o.image); 172 checkPromotionImage(o.image);
173 unittest.expect(o.link, unittest.equals('foo')); 173 unittest.expect(o.link, unittest.equals('foo'));
174 unittest.expect(o.title, unittest.equals('foo')); 174 unittest.expect(o.title, unittest.equals('foo'));
175 } 175 }
176 buildCounterPromotion--; 176 buildCounterPromotion--;
177 } 177 }
178 178
179 core.int buildCounterQuery = 0; 179 core.int buildCounterQuery = 0;
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
314 checkResultLabels(api.ResultLabels o) { 314 checkResultLabels(api.ResultLabels o) {
315 buildCounterResultLabels++; 315 buildCounterResultLabels++;
316 if (buildCounterResultLabels < 3) { 316 if (buildCounterResultLabels < 3) {
317 unittest.expect(o.displayName, unittest.equals('foo')); 317 unittest.expect(o.displayName, unittest.equals('foo'));
318 unittest.expect(o.labelWithOp, unittest.equals('foo')); 318 unittest.expect(o.labelWithOp, unittest.equals('foo'));
319 unittest.expect(o.name, unittest.equals('foo')); 319 unittest.expect(o.name, unittest.equals('foo'));
320 } 320 }
321 buildCounterResultLabels--; 321 buildCounterResultLabels--;
322 } 322 }
323 323
324 buildUnnamed291() { 324 buildUnnamed294() {
325 var o = new core.List<api.ResultLabels>(); 325 var o = new core.List<api.ResultLabels>();
326 o.add(buildResultLabels()); 326 o.add(buildResultLabels());
327 o.add(buildResultLabels()); 327 o.add(buildResultLabels());
328 return o; 328 return o;
329 } 329 }
330 330
331 checkUnnamed291(core.List<api.ResultLabels> o) { 331 checkUnnamed294(core.List<api.ResultLabels> o) {
332 unittest.expect(o, unittest.hasLength(2)); 332 unittest.expect(o, unittest.hasLength(2));
333 checkResultLabels(o[0]); 333 checkResultLabels(o[0]);
334 checkResultLabels(o[1]); 334 checkResultLabels(o[1]);
335 } 335 }
336 336
337 buildUnnamed292() { 337 buildUnnamed295() {
338 var o = new core.Map<core.String, core.Object>(); 338 var o = new core.Map<core.String, core.Object>();
339 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; 339 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'};
340 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; 340 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'};
341 return o; 341 return o;
342 } 342 }
343 343
344 checkUnnamed292(core.Map<core.String, core.Object> o) { 344 checkUnnamed295(core.Map<core.String, core.Object> o) {
345 unittest.expect(o, unittest.hasLength(2)); 345 unittest.expect(o, unittest.hasLength(2));
346 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')); 346 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'));
347 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')); 347 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'));
348 } 348 }
349 349
350 buildUnnamed293() { 350 buildUnnamed296() {
351 var o = new core.List<core.Map<core.String, core.Object>>(); 351 var o = new core.List<core.Map<core.String, core.Object>>();
352 o.add(buildUnnamed292()); 352 o.add(buildUnnamed295());
353 o.add(buildUnnamed292()); 353 o.add(buildUnnamed295());
354 return o; 354 return o;
355 } 355 }
356 356
357 checkUnnamed293(core.List<core.Map<core.String, core.Object>> o) { 357 checkUnnamed296(core.List<core.Map<core.String, core.Object>> o) {
358 unittest.expect(o, unittest.hasLength(2)); 358 unittest.expect(o, unittest.hasLength(2));
359 checkUnnamed292(o[0]); 359 checkUnnamed295(o[0]);
360 checkUnnamed292(o[1]); 360 checkUnnamed295(o[1]);
361 } 361 }
362 362
363 buildUnnamed294() { 363 buildUnnamed297() {
364 var o = new core.Map<core.String, core.List<core.Map<core.String, core.Object> >>(); 364 var o = new core.Map<core.String, core.List<core.Map<core.String, core.Object> >>();
365 o["x"] = buildUnnamed293(); 365 o["x"] = buildUnnamed296();
366 o["y"] = buildUnnamed293(); 366 o["y"] = buildUnnamed296();
367 return o; 367 return o;
368 } 368 }
369 369
370 checkUnnamed294(core.Map<core.String, core.List<core.Map<core.String, core.Objec t>>> o) { 370 checkUnnamed297(core.Map<core.String, core.List<core.Map<core.String, core.Objec t>>> o) {
371 unittest.expect(o, unittest.hasLength(2)); 371 unittest.expect(o, unittest.hasLength(2));
372 checkUnnamed293(o["x"]); 372 checkUnnamed296(o["x"]);
373 checkUnnamed293(o["y"]); 373 checkUnnamed296(o["y"]);
374 } 374 }
375 375
376 core.int buildCounterResult = 0; 376 core.int buildCounterResult = 0;
377 buildResult() { 377 buildResult() {
378 var o = new api.Result(); 378 var o = new api.Result();
379 buildCounterResult++; 379 buildCounterResult++;
380 if (buildCounterResult < 3) { 380 if (buildCounterResult < 3) {
381 o.cacheId = "foo"; 381 o.cacheId = "foo";
382 o.displayLink = "foo"; 382 o.displayLink = "foo";
383 o.fileFormat = "foo"; 383 o.fileFormat = "foo";
384 o.formattedUrl = "foo"; 384 o.formattedUrl = "foo";
385 o.htmlFormattedUrl = "foo"; 385 o.htmlFormattedUrl = "foo";
386 o.htmlSnippet = "foo"; 386 o.htmlSnippet = "foo";
387 o.htmlTitle = "foo"; 387 o.htmlTitle = "foo";
388 o.image = buildResultImage(); 388 o.image = buildResultImage();
389 o.kind = "foo"; 389 o.kind = "foo";
390 o.labels = buildUnnamed291(); 390 o.labels = buildUnnamed294();
391 o.link = "foo"; 391 o.link = "foo";
392 o.mime = "foo"; 392 o.mime = "foo";
393 o.pagemap = buildUnnamed294(); 393 o.pagemap = buildUnnamed297();
394 o.snippet = "foo"; 394 o.snippet = "foo";
395 o.title = "foo"; 395 o.title = "foo";
396 } 396 }
397 buildCounterResult--; 397 buildCounterResult--;
398 return o; 398 return o;
399 } 399 }
400 400
401 checkResult(api.Result o) { 401 checkResult(api.Result o) {
402 buildCounterResult++; 402 buildCounterResult++;
403 if (buildCounterResult < 3) { 403 if (buildCounterResult < 3) {
404 unittest.expect(o.cacheId, unittest.equals('foo')); 404 unittest.expect(o.cacheId, unittest.equals('foo'));
405 unittest.expect(o.displayLink, unittest.equals('foo')); 405 unittest.expect(o.displayLink, unittest.equals('foo'));
406 unittest.expect(o.fileFormat, unittest.equals('foo')); 406 unittest.expect(o.fileFormat, unittest.equals('foo'));
407 unittest.expect(o.formattedUrl, unittest.equals('foo')); 407 unittest.expect(o.formattedUrl, unittest.equals('foo'));
408 unittest.expect(o.htmlFormattedUrl, unittest.equals('foo')); 408 unittest.expect(o.htmlFormattedUrl, unittest.equals('foo'));
409 unittest.expect(o.htmlSnippet, unittest.equals('foo')); 409 unittest.expect(o.htmlSnippet, unittest.equals('foo'));
410 unittest.expect(o.htmlTitle, unittest.equals('foo')); 410 unittest.expect(o.htmlTitle, unittest.equals('foo'));
411 checkResultImage(o.image); 411 checkResultImage(o.image);
412 unittest.expect(o.kind, unittest.equals('foo')); 412 unittest.expect(o.kind, unittest.equals('foo'));
413 checkUnnamed291(o.labels); 413 checkUnnamed294(o.labels);
414 unittest.expect(o.link, unittest.equals('foo')); 414 unittest.expect(o.link, unittest.equals('foo'));
415 unittest.expect(o.mime, unittest.equals('foo')); 415 unittest.expect(o.mime, unittest.equals('foo'));
416 checkUnnamed294(o.pagemap); 416 checkUnnamed297(o.pagemap);
417 unittest.expect(o.snippet, unittest.equals('foo')); 417 unittest.expect(o.snippet, unittest.equals('foo'));
418 unittest.expect(o.title, unittest.equals('foo')); 418 unittest.expect(o.title, unittest.equals('foo'));
419 } 419 }
420 buildCounterResult--; 420 buildCounterResult--;
421 } 421 }
422 422
423 buildUnnamed295() { 423 buildUnnamed298() {
424 var o = new core.List<api.Result>(); 424 var o = new core.List<api.Result>();
425 o.add(buildResult()); 425 o.add(buildResult());
426 o.add(buildResult()); 426 o.add(buildResult());
427 return o; 427 return o;
428 } 428 }
429 429
430 checkUnnamed295(core.List<api.Result> o) { 430 checkUnnamed298(core.List<api.Result> o) {
431 unittest.expect(o, unittest.hasLength(2)); 431 unittest.expect(o, unittest.hasLength(2));
432 checkResult(o[0]); 432 checkResult(o[0]);
433 checkResult(o[1]); 433 checkResult(o[1]);
434 } 434 }
435 435
436 buildUnnamed296() { 436 buildUnnamed299() {
437 var o = new core.List<api.Promotion>(); 437 var o = new core.List<api.Promotion>();
438 o.add(buildPromotion()); 438 o.add(buildPromotion());
439 o.add(buildPromotion()); 439 o.add(buildPromotion());
440 return o; 440 return o;
441 } 441 }
442 442
443 checkUnnamed296(core.List<api.Promotion> o) { 443 checkUnnamed299(core.List<api.Promotion> o) {
444 unittest.expect(o, unittest.hasLength(2)); 444 unittest.expect(o, unittest.hasLength(2));
445 checkPromotion(o[0]); 445 checkPromotion(o[0]);
446 checkPromotion(o[1]); 446 checkPromotion(o[1]);
447 } 447 }
448 448
449 buildUnnamed297() { 449 buildUnnamed300() {
450 var o = new core.List<api.Query>(); 450 var o = new core.List<api.Query>();
451 o.add(buildQuery()); 451 o.add(buildQuery());
452 o.add(buildQuery()); 452 o.add(buildQuery());
453 return o; 453 return o;
454 } 454 }
455 455
456 checkUnnamed297(core.List<api.Query> o) { 456 checkUnnamed300(core.List<api.Query> o) {
457 unittest.expect(o, unittest.hasLength(2)); 457 unittest.expect(o, unittest.hasLength(2));
458 checkQuery(o[0]); 458 checkQuery(o[0]);
459 checkQuery(o[1]); 459 checkQuery(o[1]);
460 } 460 }
461 461
462 buildUnnamed298() { 462 buildUnnamed301() {
463 var o = new core.Map<core.String, core.List<api.Query>>(); 463 var o = new core.Map<core.String, core.List<api.Query>>();
464 o["x"] = buildUnnamed297(); 464 o["x"] = buildUnnamed300();
465 o["y"] = buildUnnamed297(); 465 o["y"] = buildUnnamed300();
466 return o; 466 return o;
467 } 467 }
468 468
469 checkUnnamed298(core.Map<core.String, core.List<api.Query>> o) { 469 checkUnnamed301(core.Map<core.String, core.List<api.Query>> o) {
470 unittest.expect(o, unittest.hasLength(2)); 470 unittest.expect(o, unittest.hasLength(2));
471 checkUnnamed297(o["x"]); 471 checkUnnamed300(o["x"]);
472 checkUnnamed297(o["y"]); 472 checkUnnamed300(o["y"]);
473 } 473 }
474 474
475 core.int buildCounterSearchSearchInformation = 0; 475 core.int buildCounterSearchSearchInformation = 0;
476 buildSearchSearchInformation() { 476 buildSearchSearchInformation() {
477 var o = new api.SearchSearchInformation(); 477 var o = new api.SearchSearchInformation();
478 buildCounterSearchSearchInformation++; 478 buildCounterSearchSearchInformation++;
479 if (buildCounterSearchSearchInformation < 3) { 479 if (buildCounterSearchSearchInformation < 3) {
480 o.formattedSearchTime = "foo"; 480 o.formattedSearchTime = "foo";
481 o.formattedTotalResults = "foo"; 481 o.formattedTotalResults = "foo";
482 o.searchTime = 42.0; 482 o.searchTime = 42.0;
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
538 } 538 }
539 buildCounterSearchUrl--; 539 buildCounterSearchUrl--;
540 } 540 }
541 541
542 core.int buildCounterSearch = 0; 542 core.int buildCounterSearch = 0;
543 buildSearch() { 543 buildSearch() {
544 var o = new api.Search(); 544 var o = new api.Search();
545 buildCounterSearch++; 545 buildCounterSearch++;
546 if (buildCounterSearch < 3) { 546 if (buildCounterSearch < 3) {
547 o.context = buildContext(); 547 o.context = buildContext();
548 o.items = buildUnnamed295(); 548 o.items = buildUnnamed298();
549 o.kind = "foo"; 549 o.kind = "foo";
550 o.promotions = buildUnnamed296(); 550 o.promotions = buildUnnamed299();
551 o.queries = buildUnnamed298(); 551 o.queries = buildUnnamed301();
552 o.searchInformation = buildSearchSearchInformation(); 552 o.searchInformation = buildSearchSearchInformation();
553 o.spelling = buildSearchSpelling(); 553 o.spelling = buildSearchSpelling();
554 o.url = buildSearchUrl(); 554 o.url = buildSearchUrl();
555 } 555 }
556 buildCounterSearch--; 556 buildCounterSearch--;
557 return o; 557 return o;
558 } 558 }
559 559
560 checkSearch(api.Search o) { 560 checkSearch(api.Search o) {
561 buildCounterSearch++; 561 buildCounterSearch++;
562 if (buildCounterSearch < 3) { 562 if (buildCounterSearch < 3) {
563 checkContext(o.context); 563 checkContext(o.context);
564 checkUnnamed295(o.items); 564 checkUnnamed298(o.items);
565 unittest.expect(o.kind, unittest.equals('foo')); 565 unittest.expect(o.kind, unittest.equals('foo'));
566 checkUnnamed296(o.promotions); 566 checkUnnamed299(o.promotions);
567 checkUnnamed298(o.queries); 567 checkUnnamed301(o.queries);
568 checkSearchSearchInformation(o.searchInformation); 568 checkSearchSearchInformation(o.searchInformation);
569 checkSearchSpelling(o.spelling); 569 checkSearchSpelling(o.spelling);
570 checkSearchUrl(o.url); 570 checkSearchUrl(o.url);
571 } 571 }
572 buildCounterSearch--; 572 buildCounterSearch--;
573 } 573 }
574 574
575 575
576 main() { 576 main() {
577 unittest.group("obj-schema-ContextFacets", () { 577 unittest.group("obj-schema-ContextFacets", () {
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
726 var arg_searchType = "foo"; 726 var arg_searchType = "foo";
727 var arg_siteSearch = "foo"; 727 var arg_siteSearch = "foo";
728 var arg_siteSearchFilter = "foo"; 728 var arg_siteSearchFilter = "foo";
729 var arg_sort = "foo"; 729 var arg_sort = "foo";
730 var arg_start = 42; 730 var arg_start = 42;
731 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 731 mock.register(unittest.expectAsync((http.BaseRequest req, json) {
732 var path = (req.url).path; 732 var path = (req.url).path;
733 var pathOffset = 0; 733 var pathOffset = 0;
734 var index; 734 var index;
735 var subPart; 735 var subPart;
736 unittest.expect(path.substring(pathOffset, pathOffset + 14), unittest.eq uals("/customsearch/")); 736 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
737 pathOffset += 14; 737 pathOffset += 1;
738 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq uals("customsearch/"));
739 pathOffset += 13;
738 unittest.expect(path.substring(pathOffset, pathOffset + 2), unittest.equ als("v1")); 740 unittest.expect(path.substring(pathOffset, pathOffset + 2), unittest.equ als("v1"));
739 pathOffset += 2; 741 pathOffset += 2;
740 742
741 var query = (req.url).query; 743 var query = (req.url).query;
742 var queryOffset = 0; 744 var queryOffset = 0;
743 var queryMap = {}; 745 var queryMap = {};
744 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); 746 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
745 parseBool(n) { 747 parseBool(n) {
746 if (n == "true") return true; 748 if (n == "true") return true;
747 if (n == "false") return false; 749 if (n == "false") return false;
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
797 res.list(arg_q, c2coff: arg_c2coff, cr: arg_cr, cref: arg_cref, cx: arg_cx , dateRestrict: arg_dateRestrict, exactTerms: arg_exactTerms, excludeTerms: arg_ excludeTerms, fileType: arg_fileType, filter: arg_filter, gl: arg_gl, googlehost : arg_googlehost, highRange: arg_highRange, hl: arg_hl, hq: arg_hq, imgColorType : arg_imgColorType, imgDominantColor: arg_imgDominantColor, imgSize: arg_imgSize , imgType: arg_imgType, linkSite: arg_linkSite, lowRange: arg_lowRange, lr: arg_ lr, num: arg_num, orTerms: arg_orTerms, relatedSite: arg_relatedSite, rights: ar g_rights, safe: arg_safe, searchType: arg_searchType, siteSearch: arg_siteSearch , siteSearchFilter: arg_siteSearchFilter, sort: arg_sort, start: arg_start).then (unittest.expectAsync(((api.Search response) { 799 res.list(arg_q, c2coff: arg_c2coff, cr: arg_cr, cref: arg_cref, cx: arg_cx , dateRestrict: arg_dateRestrict, exactTerms: arg_exactTerms, excludeTerms: arg_ excludeTerms, fileType: arg_fileType, filter: arg_filter, gl: arg_gl, googlehost : arg_googlehost, highRange: arg_highRange, hl: arg_hl, hq: arg_hq, imgColorType : arg_imgColorType, imgDominantColor: arg_imgDominantColor, imgSize: arg_imgSize , imgType: arg_imgType, linkSite: arg_linkSite, lowRange: arg_lowRange, lr: arg_ lr, num: arg_num, orTerms: arg_orTerms, relatedSite: arg_relatedSite, rights: ar g_rights, safe: arg_safe, searchType: arg_searchType, siteSearch: arg_siteSearch , siteSearchFilter: arg_siteSearchFilter, sort: arg_sort, start: arg_start).then (unittest.expectAsync(((api.Search response) {
798 checkSearch(response); 800 checkSearch(response);
799 }))); 801 })));
800 }); 802 });
801 803
802 }); 804 });
803 805
804 806
805 } 807 }
806 808
OLDNEW
« no previous file with comments | « generated/googleapis/test/coordinate/v1_test.dart ('k') | generated/googleapis/test/dfareporting/v1_3_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698