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

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

Issue 3003493002: Api-Roll 53: 2017-08-21 (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.firebaserules.v1.test; 1 library googleapis.firebaserules.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:test/test.dart' as unittest; 10 import 'package:test/test.dart' as unittest;
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 checkFile(api.File o) { 105 checkFile(api.File o) {
106 buildCounterFile++; 106 buildCounterFile++;
107 if (buildCounterFile < 3) { 107 if (buildCounterFile < 3) {
108 unittest.expect(o.content, unittest.equals('foo')); 108 unittest.expect(o.content, unittest.equals('foo'));
109 unittest.expect(o.fingerprint, unittest.equals('foo')); 109 unittest.expect(o.fingerprint, unittest.equals('foo'));
110 unittest.expect(o.name, unittest.equals('foo')); 110 unittest.expect(o.name, unittest.equals('foo'));
111 } 111 }
112 buildCounterFile--; 112 buildCounterFile--;
113 } 113 }
114 114
115 buildUnnamed3058() { 115 buildUnnamed3079() {
116 var o = new core.List<core.Object>(); 116 var o = new core.List<core.Object>();
117 o.add({'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}); 117 o.add({'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'});
118 o.add({'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}); 118 o.add({'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'});
119 return o; 119 return o;
120 } 120 }
121 121
122 checkUnnamed3058(core.List<core.Object> o) { 122 checkUnnamed3079(core.List<core.Object> o) {
123 unittest.expect(o, unittest.hasLength(2)); 123 unittest.expect(o, unittest.hasLength(2));
124 var casted2 = (o[0]) as core.Map; unittest.expect(casted2, unittest.hasLength( 3)); unittest.expect(casted2["list"], unittest.equals([1, 2, 3])); unittest.expe ct(casted2["bool"], unittest.equals(true)); unittest.expect(casted2["string"], u nittest.equals('foo')); 124 var casted2 = (o[0]) as core.Map; unittest.expect(casted2, unittest.hasLength( 3)); unittest.expect(casted2["list"], unittest.equals([1, 2, 3])); unittest.expe ct(casted2["bool"], unittest.equals(true)); unittest.expect(casted2["string"], u nittest.equals('foo'));
125 var casted3 = (o[1]) as core.Map; unittest.expect(casted3, unittest.hasLength( 3)); unittest.expect(casted3["list"], unittest.equals([1, 2, 3])); unittest.expe ct(casted3["bool"], unittest.equals(true)); unittest.expect(casted3["string"], u nittest.equals('foo')); 125 var casted3 = (o[1]) as core.Map; unittest.expect(casted3, unittest.hasLength( 3)); unittest.expect(casted3["list"], unittest.equals([1, 2, 3])); unittest.expe ct(casted3["bool"], unittest.equals(true)); unittest.expect(casted3["string"], u nittest.equals('foo'));
126 } 126 }
127 127
128 core.int buildCounterFunctionCall = 0; 128 core.int buildCounterFunctionCall = 0;
129 buildFunctionCall() { 129 buildFunctionCall() {
130 var o = new api.FunctionCall(); 130 var o = new api.FunctionCall();
131 buildCounterFunctionCall++; 131 buildCounterFunctionCall++;
132 if (buildCounterFunctionCall < 3) { 132 if (buildCounterFunctionCall < 3) {
133 o.args = buildUnnamed3058(); 133 o.args = buildUnnamed3079();
134 o.function = "foo"; 134 o.function = "foo";
135 } 135 }
136 buildCounterFunctionCall--; 136 buildCounterFunctionCall--;
137 return o; 137 return o;
138 } 138 }
139 139
140 checkFunctionCall(api.FunctionCall o) { 140 checkFunctionCall(api.FunctionCall o) {
141 buildCounterFunctionCall++; 141 buildCounterFunctionCall++;
142 if (buildCounterFunctionCall < 3) { 142 if (buildCounterFunctionCall < 3) {
143 checkUnnamed3058(o.args); 143 checkUnnamed3079(o.args);
144 unittest.expect(o.function, unittest.equals('foo')); 144 unittest.expect(o.function, unittest.equals('foo'));
145 } 145 }
146 buildCounterFunctionCall--; 146 buildCounterFunctionCall--;
147 } 147 }
148 148
149 buildUnnamed3059() { 149 buildUnnamed3080() {
150 var o = new core.List<api.Arg>(); 150 var o = new core.List<api.Arg>();
151 o.add(buildArg()); 151 o.add(buildArg());
152 o.add(buildArg()); 152 o.add(buildArg());
153 return o; 153 return o;
154 } 154 }
155 155
156 checkUnnamed3059(core.List<api.Arg> o) { 156 checkUnnamed3080(core.List<api.Arg> o) {
157 unittest.expect(o, unittest.hasLength(2)); 157 unittest.expect(o, unittest.hasLength(2));
158 checkArg(o[0]); 158 checkArg(o[0]);
159 checkArg(o[1]); 159 checkArg(o[1]);
160 } 160 }
161 161
162 core.int buildCounterFunctionMock = 0; 162 core.int buildCounterFunctionMock = 0;
163 buildFunctionMock() { 163 buildFunctionMock() {
164 var o = new api.FunctionMock(); 164 var o = new api.FunctionMock();
165 buildCounterFunctionMock++; 165 buildCounterFunctionMock++;
166 if (buildCounterFunctionMock < 3) { 166 if (buildCounterFunctionMock < 3) {
167 o.args = buildUnnamed3059(); 167 o.args = buildUnnamed3080();
168 o.function = "foo"; 168 o.function = "foo";
169 o.result = buildResult(); 169 o.result = buildResult();
170 } 170 }
171 buildCounterFunctionMock--; 171 buildCounterFunctionMock--;
172 return o; 172 return o;
173 } 173 }
174 174
175 checkFunctionMock(api.FunctionMock o) { 175 checkFunctionMock(api.FunctionMock o) {
176 buildCounterFunctionMock++; 176 buildCounterFunctionMock++;
177 if (buildCounterFunctionMock < 3) { 177 if (buildCounterFunctionMock < 3) {
178 checkUnnamed3059(o.args); 178 checkUnnamed3080(o.args);
179 unittest.expect(o.function, unittest.equals('foo')); 179 unittest.expect(o.function, unittest.equals('foo'));
180 checkResult(o.result); 180 checkResult(o.result);
181 } 181 }
182 buildCounterFunctionMock--; 182 buildCounterFunctionMock--;
183 } 183 }
184 184
185 core.int buildCounterIssue = 0; 185 core.int buildCounterIssue = 0;
186 buildIssue() { 186 buildIssue() {
187 var o = new api.Issue(); 187 var o = new api.Issue();
188 buildCounterIssue++; 188 buildCounterIssue++;
189 if (buildCounterIssue < 3) { 189 if (buildCounterIssue < 3) {
190 o.description = "foo"; 190 o.description = "foo";
191 o.severity = "foo"; 191 o.severity = "foo";
192 o.sourcePosition = buildSourcePosition(); 192 o.sourcePosition = buildSourcePosition();
193 } 193 }
194 buildCounterIssue--; 194 buildCounterIssue--;
195 return o; 195 return o;
196 } 196 }
197 197
198 checkIssue(api.Issue o) { 198 checkIssue(api.Issue o) {
199 buildCounterIssue++; 199 buildCounterIssue++;
200 if (buildCounterIssue < 3) { 200 if (buildCounterIssue < 3) {
201 unittest.expect(o.description, unittest.equals('foo')); 201 unittest.expect(o.description, unittest.equals('foo'));
202 unittest.expect(o.severity, unittest.equals('foo')); 202 unittest.expect(o.severity, unittest.equals('foo'));
203 checkSourcePosition(o.sourcePosition); 203 checkSourcePosition(o.sourcePosition);
204 } 204 }
205 buildCounterIssue--; 205 buildCounterIssue--;
206 } 206 }
207 207
208 buildUnnamed3060() { 208 buildUnnamed3081() {
209 var o = new core.List<api.Release>(); 209 var o = new core.List<api.Release>();
210 o.add(buildRelease()); 210 o.add(buildRelease());
211 o.add(buildRelease()); 211 o.add(buildRelease());
212 return o; 212 return o;
213 } 213 }
214 214
215 checkUnnamed3060(core.List<api.Release> o) { 215 checkUnnamed3081(core.List<api.Release> o) {
216 unittest.expect(o, unittest.hasLength(2)); 216 unittest.expect(o, unittest.hasLength(2));
217 checkRelease(o[0]); 217 checkRelease(o[0]);
218 checkRelease(o[1]); 218 checkRelease(o[1]);
219 } 219 }
220 220
221 core.int buildCounterListReleasesResponse = 0; 221 core.int buildCounterListReleasesResponse = 0;
222 buildListReleasesResponse() { 222 buildListReleasesResponse() {
223 var o = new api.ListReleasesResponse(); 223 var o = new api.ListReleasesResponse();
224 buildCounterListReleasesResponse++; 224 buildCounterListReleasesResponse++;
225 if (buildCounterListReleasesResponse < 3) { 225 if (buildCounterListReleasesResponse < 3) {
226 o.nextPageToken = "foo"; 226 o.nextPageToken = "foo";
227 o.releases = buildUnnamed3060(); 227 o.releases = buildUnnamed3081();
228 } 228 }
229 buildCounterListReleasesResponse--; 229 buildCounterListReleasesResponse--;
230 return o; 230 return o;
231 } 231 }
232 232
233 checkListReleasesResponse(api.ListReleasesResponse o) { 233 checkListReleasesResponse(api.ListReleasesResponse o) {
234 buildCounterListReleasesResponse++; 234 buildCounterListReleasesResponse++;
235 if (buildCounterListReleasesResponse < 3) { 235 if (buildCounterListReleasesResponse < 3) {
236 unittest.expect(o.nextPageToken, unittest.equals('foo')); 236 unittest.expect(o.nextPageToken, unittest.equals('foo'));
237 checkUnnamed3060(o.releases); 237 checkUnnamed3081(o.releases);
238 } 238 }
239 buildCounterListReleasesResponse--; 239 buildCounterListReleasesResponse--;
240 } 240 }
241 241
242 buildUnnamed3061() { 242 buildUnnamed3082() {
243 var o = new core.List<api.Ruleset>(); 243 var o = new core.List<api.Ruleset>();
244 o.add(buildRuleset()); 244 o.add(buildRuleset());
245 o.add(buildRuleset()); 245 o.add(buildRuleset());
246 return o; 246 return o;
247 } 247 }
248 248
249 checkUnnamed3061(core.List<api.Ruleset> o) { 249 checkUnnamed3082(core.List<api.Ruleset> o) {
250 unittest.expect(o, unittest.hasLength(2)); 250 unittest.expect(o, unittest.hasLength(2));
251 checkRuleset(o[0]); 251 checkRuleset(o[0]);
252 checkRuleset(o[1]); 252 checkRuleset(o[1]);
253 } 253 }
254 254
255 core.int buildCounterListRulesetsResponse = 0; 255 core.int buildCounterListRulesetsResponse = 0;
256 buildListRulesetsResponse() { 256 buildListRulesetsResponse() {
257 var o = new api.ListRulesetsResponse(); 257 var o = new api.ListRulesetsResponse();
258 buildCounterListRulesetsResponse++; 258 buildCounterListRulesetsResponse++;
259 if (buildCounterListRulesetsResponse < 3) { 259 if (buildCounterListRulesetsResponse < 3) {
260 o.nextPageToken = "foo"; 260 o.nextPageToken = "foo";
261 o.rulesets = buildUnnamed3061(); 261 o.rulesets = buildUnnamed3082();
262 } 262 }
263 buildCounterListRulesetsResponse--; 263 buildCounterListRulesetsResponse--;
264 return o; 264 return o;
265 } 265 }
266 266
267 checkListRulesetsResponse(api.ListRulesetsResponse o) { 267 checkListRulesetsResponse(api.ListRulesetsResponse o) {
268 buildCounterListRulesetsResponse++; 268 buildCounterListRulesetsResponse++;
269 if (buildCounterListRulesetsResponse < 3) { 269 if (buildCounterListRulesetsResponse < 3) {
270 unittest.expect(o.nextPageToken, unittest.equals('foo')); 270 unittest.expect(o.nextPageToken, unittest.equals('foo'));
271 checkUnnamed3061(o.rulesets); 271 checkUnnamed3082(o.rulesets);
272 } 272 }
273 buildCounterListRulesetsResponse--; 273 buildCounterListRulesetsResponse--;
274 } 274 }
275 275
276 core.int buildCounterRelease = 0; 276 core.int buildCounterRelease = 0;
277 buildRelease() { 277 buildRelease() {
278 var o = new api.Release(); 278 var o = new api.Release();
279 buildCounterRelease++; 279 buildCounterRelease++;
280 if (buildCounterRelease < 3) { 280 if (buildCounterRelease < 3) {
281 o.createTime = "foo"; 281 o.createTime = "foo";
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
335 checkRuleset(api.Ruleset o) { 335 checkRuleset(api.Ruleset o) {
336 buildCounterRuleset++; 336 buildCounterRuleset++;
337 if (buildCounterRuleset < 3) { 337 if (buildCounterRuleset < 3) {
338 unittest.expect(o.createTime, unittest.equals('foo')); 338 unittest.expect(o.createTime, unittest.equals('foo'));
339 unittest.expect(o.name, unittest.equals('foo')); 339 unittest.expect(o.name, unittest.equals('foo'));
340 checkSource(o.source); 340 checkSource(o.source);
341 } 341 }
342 buildCounterRuleset--; 342 buildCounterRuleset--;
343 } 343 }
344 344
345 buildUnnamed3062() { 345 buildUnnamed3083() {
346 var o = new core.List<api.File>(); 346 var o = new core.List<api.File>();
347 o.add(buildFile()); 347 o.add(buildFile());
348 o.add(buildFile()); 348 o.add(buildFile());
349 return o; 349 return o;
350 } 350 }
351 351
352 checkUnnamed3062(core.List<api.File> o) { 352 checkUnnamed3083(core.List<api.File> o) {
353 unittest.expect(o, unittest.hasLength(2)); 353 unittest.expect(o, unittest.hasLength(2));
354 checkFile(o[0]); 354 checkFile(o[0]);
355 checkFile(o[1]); 355 checkFile(o[1]);
356 } 356 }
357 357
358 core.int buildCounterSource = 0; 358 core.int buildCounterSource = 0;
359 buildSource() { 359 buildSource() {
360 var o = new api.Source(); 360 var o = new api.Source();
361 buildCounterSource++; 361 buildCounterSource++;
362 if (buildCounterSource < 3) { 362 if (buildCounterSource < 3) {
363 o.files = buildUnnamed3062(); 363 o.files = buildUnnamed3083();
364 } 364 }
365 buildCounterSource--; 365 buildCounterSource--;
366 return o; 366 return o;
367 } 367 }
368 368
369 checkSource(api.Source o) { 369 checkSource(api.Source o) {
370 buildCounterSource++; 370 buildCounterSource++;
371 if (buildCounterSource < 3) { 371 if (buildCounterSource < 3) {
372 checkUnnamed3062(o.files); 372 checkUnnamed3083(o.files);
373 } 373 }
374 buildCounterSource--; 374 buildCounterSource--;
375 } 375 }
376 376
377 core.int buildCounterSourcePosition = 0; 377 core.int buildCounterSourcePosition = 0;
378 buildSourcePosition() { 378 buildSourcePosition() {
379 var o = new api.SourcePosition(); 379 var o = new api.SourcePosition();
380 buildCounterSourcePosition++; 380 buildCounterSourcePosition++;
381 if (buildCounterSourcePosition < 3) { 381 if (buildCounterSourcePosition < 3) {
382 o.column = 42; 382 o.column = 42;
383 o.fileName = "foo"; 383 o.fileName = "foo";
384 o.line = 42; 384 o.line = 42;
385 } 385 }
386 buildCounterSourcePosition--; 386 buildCounterSourcePosition--;
387 return o; 387 return o;
388 } 388 }
389 389
390 checkSourcePosition(api.SourcePosition o) { 390 checkSourcePosition(api.SourcePosition o) {
391 buildCounterSourcePosition++; 391 buildCounterSourcePosition++;
392 if (buildCounterSourcePosition < 3) { 392 if (buildCounterSourcePosition < 3) {
393 unittest.expect(o.column, unittest.equals(42)); 393 unittest.expect(o.column, unittest.equals(42));
394 unittest.expect(o.fileName, unittest.equals('foo')); 394 unittest.expect(o.fileName, unittest.equals('foo'));
395 unittest.expect(o.line, unittest.equals(42)); 395 unittest.expect(o.line, unittest.equals(42));
396 } 396 }
397 buildCounterSourcePosition--; 397 buildCounterSourcePosition--;
398 } 398 }
399 399
400 buildUnnamed3063() { 400 buildUnnamed3084() {
401 var o = new core.List<api.FunctionMock>(); 401 var o = new core.List<api.FunctionMock>();
402 o.add(buildFunctionMock()); 402 o.add(buildFunctionMock());
403 o.add(buildFunctionMock()); 403 o.add(buildFunctionMock());
404 return o; 404 return o;
405 } 405 }
406 406
407 checkUnnamed3063(core.List<api.FunctionMock> o) { 407 checkUnnamed3084(core.List<api.FunctionMock> o) {
408 unittest.expect(o, unittest.hasLength(2)); 408 unittest.expect(o, unittest.hasLength(2));
409 checkFunctionMock(o[0]); 409 checkFunctionMock(o[0]);
410 checkFunctionMock(o[1]); 410 checkFunctionMock(o[1]);
411 } 411 }
412 412
413 core.int buildCounterTestCase = 0; 413 core.int buildCounterTestCase = 0;
414 buildTestCase() { 414 buildTestCase() {
415 var o = new api.TestCase(); 415 var o = new api.TestCase();
416 buildCounterTestCase++; 416 buildCounterTestCase++;
417 if (buildCounterTestCase < 3) { 417 if (buildCounterTestCase < 3) {
418 o.expectation = "foo"; 418 o.expectation = "foo";
419 o.functionMocks = buildUnnamed3063(); 419 o.functionMocks = buildUnnamed3084();
420 o.request = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; 420 o.request = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'};
421 o.resource = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; 421 o.resource = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'};
422 } 422 }
423 buildCounterTestCase--; 423 buildCounterTestCase--;
424 return o; 424 return o;
425 } 425 }
426 426
427 checkTestCase(api.TestCase o) { 427 checkTestCase(api.TestCase o) {
428 buildCounterTestCase++; 428 buildCounterTestCase++;
429 if (buildCounterTestCase < 3) { 429 if (buildCounterTestCase < 3) {
430 unittest.expect(o.expectation, unittest.equals('foo')); 430 unittest.expect(o.expectation, unittest.equals('foo'));
431 checkUnnamed3063(o.functionMocks); 431 checkUnnamed3084(o.functionMocks);
432 var casted5 = (o.request) as core.Map; unittest.expect(casted5, unittest.has Length(3)); unittest.expect(casted5["list"], unittest.equals([1, 2, 3])); unitte st.expect(casted5["bool"], unittest.equals(true)); unittest.expect(casted5["stri ng"], unittest.equals('foo')); 432 var casted5 = (o.request) as core.Map; unittest.expect(casted5, unittest.has Length(3)); unittest.expect(casted5["list"], unittest.equals([1, 2, 3])); unitte st.expect(casted5["bool"], unittest.equals(true)); unittest.expect(casted5["stri ng"], unittest.equals('foo'));
433 var casted6 = (o.resource) as core.Map; unittest.expect(casted6, unittest.ha sLength(3)); unittest.expect(casted6["list"], unittest.equals([1, 2, 3])); unitt est.expect(casted6["bool"], unittest.equals(true)); unittest.expect(casted6["str ing"], unittest.equals('foo')); 433 var casted6 = (o.resource) as core.Map; unittest.expect(casted6, unittest.ha sLength(3)); unittest.expect(casted6["list"], unittest.equals([1, 2, 3])); unitt est.expect(casted6["bool"], unittest.equals(true)); unittest.expect(casted6["str ing"], unittest.equals('foo'));
434 } 434 }
435 buildCounterTestCase--; 435 buildCounterTestCase--;
436 } 436 }
437 437
438 buildUnnamed3064() { 438 buildUnnamed3085() {
439 var o = new core.List<core.String>(); 439 var o = new core.List<core.String>();
440 o.add("foo"); 440 o.add("foo");
441 o.add("foo"); 441 o.add("foo");
442 return o; 442 return o;
443 } 443 }
444 444
445 checkUnnamed3064(core.List<core.String> o) { 445 checkUnnamed3085(core.List<core.String> o) {
446 unittest.expect(o, unittest.hasLength(2)); 446 unittest.expect(o, unittest.hasLength(2));
447 unittest.expect(o[0], unittest.equals('foo')); 447 unittest.expect(o[0], unittest.equals('foo'));
448 unittest.expect(o[1], unittest.equals('foo')); 448 unittest.expect(o[1], unittest.equals('foo'));
449 } 449 }
450 450
451 buildUnnamed3065() { 451 buildUnnamed3086() {
452 var o = new core.List<api.FunctionCall>(); 452 var o = new core.List<api.FunctionCall>();
453 o.add(buildFunctionCall()); 453 o.add(buildFunctionCall());
454 o.add(buildFunctionCall()); 454 o.add(buildFunctionCall());
455 return o; 455 return o;
456 } 456 }
457 457
458 checkUnnamed3065(core.List<api.FunctionCall> o) { 458 checkUnnamed3086(core.List<api.FunctionCall> o) {
459 unittest.expect(o, unittest.hasLength(2)); 459 unittest.expect(o, unittest.hasLength(2));
460 checkFunctionCall(o[0]); 460 checkFunctionCall(o[0]);
461 checkFunctionCall(o[1]); 461 checkFunctionCall(o[1]);
462 } 462 }
463 463
464 core.int buildCounterTestResult = 0; 464 core.int buildCounterTestResult = 0;
465 buildTestResult() { 465 buildTestResult() {
466 var o = new api.TestResult(); 466 var o = new api.TestResult();
467 buildCounterTestResult++; 467 buildCounterTestResult++;
468 if (buildCounterTestResult < 3) { 468 if (buildCounterTestResult < 3) {
469 o.debugMessages = buildUnnamed3064(); 469 o.debugMessages = buildUnnamed3085();
470 o.errorPosition = buildSourcePosition(); 470 o.errorPosition = buildSourcePosition();
471 o.functionCalls = buildUnnamed3065(); 471 o.functionCalls = buildUnnamed3086();
472 o.state = "foo"; 472 o.state = "foo";
473 } 473 }
474 buildCounterTestResult--; 474 buildCounterTestResult--;
475 return o; 475 return o;
476 } 476 }
477 477
478 checkTestResult(api.TestResult o) { 478 checkTestResult(api.TestResult o) {
479 buildCounterTestResult++; 479 buildCounterTestResult++;
480 if (buildCounterTestResult < 3) { 480 if (buildCounterTestResult < 3) {
481 checkUnnamed3064(o.debugMessages); 481 checkUnnamed3085(o.debugMessages);
482 checkSourcePosition(o.errorPosition); 482 checkSourcePosition(o.errorPosition);
483 checkUnnamed3065(o.functionCalls); 483 checkUnnamed3086(o.functionCalls);
484 unittest.expect(o.state, unittest.equals('foo')); 484 unittest.expect(o.state, unittest.equals('foo'));
485 } 485 }
486 buildCounterTestResult--; 486 buildCounterTestResult--;
487 } 487 }
488 488
489 core.int buildCounterTestRulesetRequest = 0; 489 core.int buildCounterTestRulesetRequest = 0;
490 buildTestRulesetRequest() { 490 buildTestRulesetRequest() {
491 var o = new api.TestRulesetRequest(); 491 var o = new api.TestRulesetRequest();
492 buildCounterTestRulesetRequest++; 492 buildCounterTestRulesetRequest++;
493 if (buildCounterTestRulesetRequest < 3) { 493 if (buildCounterTestRulesetRequest < 3) {
494 o.source = buildSource(); 494 o.source = buildSource();
495 o.testSuite = buildTestSuite(); 495 o.testSuite = buildTestSuite();
496 } 496 }
497 buildCounterTestRulesetRequest--; 497 buildCounterTestRulesetRequest--;
498 return o; 498 return o;
499 } 499 }
500 500
501 checkTestRulesetRequest(api.TestRulesetRequest o) { 501 checkTestRulesetRequest(api.TestRulesetRequest o) {
502 buildCounterTestRulesetRequest++; 502 buildCounterTestRulesetRequest++;
503 if (buildCounterTestRulesetRequest < 3) { 503 if (buildCounterTestRulesetRequest < 3) {
504 checkSource(o.source); 504 checkSource(o.source);
505 checkTestSuite(o.testSuite); 505 checkTestSuite(o.testSuite);
506 } 506 }
507 buildCounterTestRulesetRequest--; 507 buildCounterTestRulesetRequest--;
508 } 508 }
509 509
510 buildUnnamed3066() { 510 buildUnnamed3087() {
511 var o = new core.List<api.Issue>(); 511 var o = new core.List<api.Issue>();
512 o.add(buildIssue()); 512 o.add(buildIssue());
513 o.add(buildIssue()); 513 o.add(buildIssue());
514 return o; 514 return o;
515 } 515 }
516 516
517 checkUnnamed3066(core.List<api.Issue> o) { 517 checkUnnamed3087(core.List<api.Issue> o) {
518 unittest.expect(o, unittest.hasLength(2)); 518 unittest.expect(o, unittest.hasLength(2));
519 checkIssue(o[0]); 519 checkIssue(o[0]);
520 checkIssue(o[1]); 520 checkIssue(o[1]);
521 } 521 }
522 522
523 buildUnnamed3067() { 523 buildUnnamed3088() {
524 var o = new core.List<api.TestResult>(); 524 var o = new core.List<api.TestResult>();
525 o.add(buildTestResult()); 525 o.add(buildTestResult());
526 o.add(buildTestResult()); 526 o.add(buildTestResult());
527 return o; 527 return o;
528 } 528 }
529 529
530 checkUnnamed3067(core.List<api.TestResult> o) { 530 checkUnnamed3088(core.List<api.TestResult> o) {
531 unittest.expect(o, unittest.hasLength(2)); 531 unittest.expect(o, unittest.hasLength(2));
532 checkTestResult(o[0]); 532 checkTestResult(o[0]);
533 checkTestResult(o[1]); 533 checkTestResult(o[1]);
534 } 534 }
535 535
536 core.int buildCounterTestRulesetResponse = 0; 536 core.int buildCounterTestRulesetResponse = 0;
537 buildTestRulesetResponse() { 537 buildTestRulesetResponse() {
538 var o = new api.TestRulesetResponse(); 538 var o = new api.TestRulesetResponse();
539 buildCounterTestRulesetResponse++; 539 buildCounterTestRulesetResponse++;
540 if (buildCounterTestRulesetResponse < 3) { 540 if (buildCounterTestRulesetResponse < 3) {
541 o.issues = buildUnnamed3066(); 541 o.issues = buildUnnamed3087();
542 o.testResults = buildUnnamed3067(); 542 o.testResults = buildUnnamed3088();
543 } 543 }
544 buildCounterTestRulesetResponse--; 544 buildCounterTestRulesetResponse--;
545 return o; 545 return o;
546 } 546 }
547 547
548 checkTestRulesetResponse(api.TestRulesetResponse o) { 548 checkTestRulesetResponse(api.TestRulesetResponse o) {
549 buildCounterTestRulesetResponse++; 549 buildCounterTestRulesetResponse++;
550 if (buildCounterTestRulesetResponse < 3) { 550 if (buildCounterTestRulesetResponse < 3) {
551 checkUnnamed3066(o.issues); 551 checkUnnamed3087(o.issues);
552 checkUnnamed3067(o.testResults); 552 checkUnnamed3088(o.testResults);
553 } 553 }
554 buildCounterTestRulesetResponse--; 554 buildCounterTestRulesetResponse--;
555 } 555 }
556 556
557 buildUnnamed3068() { 557 buildUnnamed3089() {
558 var o = new core.List<api.TestCase>(); 558 var o = new core.List<api.TestCase>();
559 o.add(buildTestCase()); 559 o.add(buildTestCase());
560 o.add(buildTestCase()); 560 o.add(buildTestCase());
561 return o; 561 return o;
562 } 562 }
563 563
564 checkUnnamed3068(core.List<api.TestCase> o) { 564 checkUnnamed3089(core.List<api.TestCase> o) {
565 unittest.expect(o, unittest.hasLength(2)); 565 unittest.expect(o, unittest.hasLength(2));
566 checkTestCase(o[0]); 566 checkTestCase(o[0]);
567 checkTestCase(o[1]); 567 checkTestCase(o[1]);
568 } 568 }
569 569
570 core.int buildCounterTestSuite = 0; 570 core.int buildCounterTestSuite = 0;
571 buildTestSuite() { 571 buildTestSuite() {
572 var o = new api.TestSuite(); 572 var o = new api.TestSuite();
573 buildCounterTestSuite++; 573 buildCounterTestSuite++;
574 if (buildCounterTestSuite < 3) { 574 if (buildCounterTestSuite < 3) {
575 o.testCases = buildUnnamed3068(); 575 o.testCases = buildUnnamed3089();
576 } 576 }
577 buildCounterTestSuite--; 577 buildCounterTestSuite--;
578 return o; 578 return o;
579 } 579 }
580 580
581 checkTestSuite(api.TestSuite o) { 581 checkTestSuite(api.TestSuite o) {
582 buildCounterTestSuite++; 582 buildCounterTestSuite++;
583 if (buildCounterTestSuite < 3) { 583 if (buildCounterTestSuite < 3) {
584 checkUnnamed3068(o.testCases); 584 checkUnnamed3089(o.testCases);
585 } 585 }
586 buildCounterTestSuite--; 586 buildCounterTestSuite--;
587 } 587 }
588 588
589 589
590 main() { 590 main() {
591 unittest.group("obj-schema-Arg", () { 591 unittest.group("obj-schema-Arg", () {
592 unittest.test("to-json--from-json", () { 592 unittest.test("to-json--from-json", () {
593 var o = buildArg(); 593 var o = buildArg();
594 var od = new api.Arg.fromJson(o.toJson()); 594 var od = new api.Arg.fromJson(o.toJson());
(...skipping 346 matching lines...) Expand 10 before | Expand all | Expand 10 after
941 res.get(arg_name).then(unittest.expectAsync1(((api.Release response) { 941 res.get(arg_name).then(unittest.expectAsync1(((api.Release response) {
942 checkRelease(response); 942 checkRelease(response);
943 }))); 943 })));
944 }); 944 });
945 945
946 unittest.test("method--list", () { 946 unittest.test("method--list", () {
947 947
948 var mock = new HttpServerMock(); 948 var mock = new HttpServerMock();
949 api.ProjectsReleasesResourceApi res = new api.FirebaserulesApi(mock).proje cts.releases; 949 api.ProjectsReleasesResourceApi res = new api.FirebaserulesApi(mock).proje cts.releases;
950 var arg_name = "foo"; 950 var arg_name = "foo";
951 var arg_filter = "foo";
951 var arg_pageToken = "foo"; 952 var arg_pageToken = "foo";
952 var arg_pageSize = 42; 953 var arg_pageSize = 42;
953 var arg_filter = "foo";
954 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { 954 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
955 var path = (req.url).path; 955 var path = (req.url).path;
956 var pathOffset = 0; 956 var pathOffset = 0;
957 var index; 957 var index;
958 var subPart; 958 var subPart;
959 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 959 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
960 pathOffset += 1; 960 pathOffset += 1;
961 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ als("v1/")); 961 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ als("v1/"));
962 pathOffset += 3; 962 pathOffset += 3;
963 // NOTE: We cannot test reserved expansions due to the inability to reve rse the operation; 963 // NOTE: We cannot test reserved expansions due to the inability to reve rse the operation;
964 964
965 var query = (req.url).query; 965 var query = (req.url).query;
966 var queryOffset = 0; 966 var queryOffset = 0;
967 var queryMap = {}; 967 var queryMap = {};
968 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); 968 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
969 parseBool(n) { 969 parseBool(n) {
970 if (n == "true") return true; 970 if (n == "true") return true;
971 if (n == "false") return false; 971 if (n == "false") return false;
972 if (n == null) return null; 972 if (n == null) return null;
973 throw new core.ArgumentError("Invalid boolean: $n"); 973 throw new core.ArgumentError("Invalid boolean: $n");
974 } 974 }
975 if (query.length > 0) { 975 if (query.length > 0) {
976 for (var part in query.split("&")) { 976 for (var part in query.split("&")) {
977 var keyvalue = part.split("="); 977 var keyvalue = part.split("=");
978 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1])); 978 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1]));
979 } 979 }
980 } 980 }
981 unittest.expect(queryMap["filter"].first, unittest.equals(arg_filter));
981 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok en)); 982 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok en));
982 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ als(arg_pageSize)); 983 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ als(arg_pageSize));
983 unittest.expect(queryMap["filter"].first, unittest.equals(arg_filter));
984 984
985 985
986 var h = { 986 var h = {
987 "content-type" : "application/json; charset=utf-8", 987 "content-type" : "application/json; charset=utf-8",
988 }; 988 };
989 var resp = convert.JSON.encode(buildListReleasesResponse()); 989 var resp = convert.JSON.encode(buildListReleasesResponse());
990 return new async.Future.value(stringResponse(200, h, resp)); 990 return new async.Future.value(stringResponse(200, h, resp));
991 }), true); 991 }), true);
992 res.list(arg_name, pageToken: arg_pageToken, pageSize: arg_pageSize, filte r: arg_filter).then(unittest.expectAsync1(((api.ListReleasesResponse response) { 992 res.list(arg_name, filter: arg_filter, pageToken: arg_pageToken, pageSize: arg_pageSize).then(unittest.expectAsync1(((api.ListReleasesResponse response) {
993 checkListReleasesResponse(response); 993 checkListReleasesResponse(response);
994 }))); 994 })));
995 }); 995 });
996 996
997 unittest.test("method--update", () { 997 unittest.test("method--update", () {
998 998
999 var mock = new HttpServerMock(); 999 var mock = new HttpServerMock();
1000 api.ProjectsReleasesResourceApi res = new api.FirebaserulesApi(mock).proje cts.releases; 1000 api.ProjectsReleasesResourceApi res = new api.FirebaserulesApi(mock).proje cts.releases;
1001 var arg_request = buildRelease(); 1001 var arg_request = buildRelease();
1002 var arg_name = "foo"; 1002 var arg_name = "foo";
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
1184 res.get(arg_name).then(unittest.expectAsync1(((api.Ruleset response) { 1184 res.get(arg_name).then(unittest.expectAsync1(((api.Ruleset response) {
1185 checkRuleset(response); 1185 checkRuleset(response);
1186 }))); 1186 })));
1187 }); 1187 });
1188 1188
1189 unittest.test("method--list", () { 1189 unittest.test("method--list", () {
1190 1190
1191 var mock = new HttpServerMock(); 1191 var mock = new HttpServerMock();
1192 api.ProjectsRulesetsResourceApi res = new api.FirebaserulesApi(mock).proje cts.rulesets; 1192 api.ProjectsRulesetsResourceApi res = new api.FirebaserulesApi(mock).proje cts.rulesets;
1193 var arg_name = "foo"; 1193 var arg_name = "foo";
1194 var arg_filter = "foo";
1195 var arg_pageToken = "foo"; 1194 var arg_pageToken = "foo";
1196 var arg_pageSize = 42; 1195 var arg_pageSize = 42;
1196 var arg_filter = "foo";
1197 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { 1197 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
1198 var path = (req.url).path; 1198 var path = (req.url).path;
1199 var pathOffset = 0; 1199 var pathOffset = 0;
1200 var index; 1200 var index;
1201 var subPart; 1201 var subPart;
1202 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 1202 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
1203 pathOffset += 1; 1203 pathOffset += 1;
1204 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ als("v1/")); 1204 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ als("v1/"));
1205 pathOffset += 3; 1205 pathOffset += 3;
1206 // NOTE: We cannot test reserved expansions due to the inability to reve rse the operation; 1206 // NOTE: We cannot test reserved expansions due to the inability to reve rse the operation;
1207 1207
1208 var query = (req.url).query; 1208 var query = (req.url).query;
1209 var queryOffset = 0; 1209 var queryOffset = 0;
1210 var queryMap = {}; 1210 var queryMap = {};
1211 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); 1211 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
1212 parseBool(n) { 1212 parseBool(n) {
1213 if (n == "true") return true; 1213 if (n == "true") return true;
1214 if (n == "false") return false; 1214 if (n == "false") return false;
1215 if (n == null) return null; 1215 if (n == null) return null;
1216 throw new core.ArgumentError("Invalid boolean: $n"); 1216 throw new core.ArgumentError("Invalid boolean: $n");
1217 } 1217 }
1218 if (query.length > 0) { 1218 if (query.length > 0) {
1219 for (var part in query.split("&")) { 1219 for (var part in query.split("&")) {
1220 var keyvalue = part.split("="); 1220 var keyvalue = part.split("=");
1221 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1])); 1221 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1]));
1222 } 1222 }
1223 } 1223 }
1224 unittest.expect(queryMap["filter"].first, unittest.equals(arg_filter));
1225 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok en)); 1224 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok en));
1226 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ als(arg_pageSize)); 1225 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ als(arg_pageSize));
1226 unittest.expect(queryMap["filter"].first, unittest.equals(arg_filter));
1227 1227
1228 1228
1229 var h = { 1229 var h = {
1230 "content-type" : "application/json; charset=utf-8", 1230 "content-type" : "application/json; charset=utf-8",
1231 }; 1231 };
1232 var resp = convert.JSON.encode(buildListRulesetsResponse()); 1232 var resp = convert.JSON.encode(buildListRulesetsResponse());
1233 return new async.Future.value(stringResponse(200, h, resp)); 1233 return new async.Future.value(stringResponse(200, h, resp));
1234 }), true); 1234 }), true);
1235 res.list(arg_name, filter: arg_filter, pageToken: arg_pageToken, pageSize: arg_pageSize).then(unittest.expectAsync1(((api.ListRulesetsResponse response) { 1235 res.list(arg_name, pageToken: arg_pageToken, pageSize: arg_pageSize, filte r: arg_filter).then(unittest.expectAsync1(((api.ListRulesetsResponse response) {
1236 checkListRulesetsResponse(response); 1236 checkListRulesetsResponse(response);
1237 }))); 1237 })));
1238 }); 1238 });
1239 1239
1240 }); 1240 });
1241 1241
1242 1242
1243 } 1243 }
1244 1244
OLDNEW
« no previous file with comments | « generated/googleapis/test/firebasedynamiclinks/v1_test.dart ('k') | generated/googleapis/test/fusiontables/v1_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698