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

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

Issue 2734843002: Api-roll 46: 2017-03-06 (Closed)
Patch Set: Created 3 years, 9 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.cloudbuild.v1.test; 1 library googleapis.cloudbuild.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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 } 44 }
45 } 45 }
46 } 46 }
47 47
48 http.StreamedResponse stringResponse( 48 http.StreamedResponse stringResponse(
49 core.int status, core.Map headers, core.String body) { 49 core.int status, core.Map headers, core.String body) {
50 var stream = new async.Stream.fromIterable([convert.UTF8.encode(body)]); 50 var stream = new async.Stream.fromIterable([convert.UTF8.encode(body)]);
51 return new http.StreamedResponse(stream, status, headers: headers); 51 return new http.StreamedResponse(stream, status, headers: headers);
52 } 52 }
53 53
54 buildUnnamed1184() { 54 buildUnnamed1216() {
55 var o = new core.List<core.String>(); 55 var o = new core.List<core.String>();
56 o.add("foo"); 56 o.add("foo");
57 o.add("foo"); 57 o.add("foo");
58 return o; 58 return o;
59 } 59 }
60 60
61 checkUnnamed1184(core.List<core.String> o) { 61 checkUnnamed1216(core.List<core.String> o) {
62 unittest.expect(o, unittest.hasLength(2)); 62 unittest.expect(o, unittest.hasLength(2));
63 unittest.expect(o[0], unittest.equals('foo')); 63 unittest.expect(o[0], unittest.equals('foo'));
64 unittest.expect(o[1], unittest.equals('foo')); 64 unittest.expect(o[1], unittest.equals('foo'));
65 } 65 }
66 66
67 buildUnnamed1185() { 67 buildUnnamed1217() {
68 var o = new core.List<api.BuildStep>(); 68 var o = new core.List<api.BuildStep>();
69 o.add(buildBuildStep()); 69 o.add(buildBuildStep());
70 o.add(buildBuildStep()); 70 o.add(buildBuildStep());
71 return o; 71 return o;
72 } 72 }
73 73
74 checkUnnamed1185(core.List<api.BuildStep> o) { 74 checkUnnamed1217(core.List<api.BuildStep> o) {
75 unittest.expect(o, unittest.hasLength(2)); 75 unittest.expect(o, unittest.hasLength(2));
76 checkBuildStep(o[0]); 76 checkBuildStep(o[0]);
77 checkBuildStep(o[1]); 77 checkBuildStep(o[1]);
78 } 78 }
79 79
80 buildUnnamed1186() { 80 buildUnnamed1218() {
81 var o = new core.Map<core.String, core.String>(); 81 var o = new core.Map<core.String, core.String>();
82 o["x"] = "foo"; 82 o["x"] = "foo";
83 o["y"] = "foo"; 83 o["y"] = "foo";
84 return o; 84 return o;
85 } 85 }
86 86
87 checkUnnamed1186(core.Map<core.String, core.String> o) { 87 checkUnnamed1218(core.Map<core.String, core.String> o) {
88 unittest.expect(o, unittest.hasLength(2)); 88 unittest.expect(o, unittest.hasLength(2));
89 unittest.expect(o["x"], unittest.equals('foo')); 89 unittest.expect(o["x"], unittest.equals('foo'));
90 unittest.expect(o["y"], unittest.equals('foo')); 90 unittest.expect(o["y"], unittest.equals('foo'));
91 } 91 }
92 92
93 core.int buildCounterBuild = 0; 93 core.int buildCounterBuild = 0;
94 buildBuild() { 94 buildBuild() {
95 var o = new api.Build(); 95 var o = new api.Build();
96 buildCounterBuild++; 96 buildCounterBuild++;
97 if (buildCounterBuild < 3) { 97 if (buildCounterBuild < 3) {
98 o.buildTriggerId = "foo"; 98 o.buildTriggerId = "foo";
99 o.createTime = "foo"; 99 o.createTime = "foo";
100 o.finishTime = "foo"; 100 o.finishTime = "foo";
101 o.id = "foo"; 101 o.id = "foo";
102 o.images = buildUnnamed1184(); 102 o.images = buildUnnamed1216();
103 o.logUrl = "foo"; 103 o.logUrl = "foo";
104 o.logsBucket = "foo"; 104 o.logsBucket = "foo";
105 o.options = buildBuildOptions(); 105 o.options = buildBuildOptions();
106 o.projectId = "foo"; 106 o.projectId = "foo";
107 o.results = buildResults(); 107 o.results = buildResults();
108 o.source = buildSource(); 108 o.source = buildSource();
109 o.sourceProvenance = buildSourceProvenance(); 109 o.sourceProvenance = buildSourceProvenance();
110 o.startTime = "foo"; 110 o.startTime = "foo";
111 o.status = "foo"; 111 o.status = "foo";
112 o.statusDetail = "foo"; 112 o.statusDetail = "foo";
113 o.steps = buildUnnamed1185(); 113 o.steps = buildUnnamed1217();
114 o.substitutions = buildUnnamed1186(); 114 o.substitutions = buildUnnamed1218();
115 o.timeout = "foo"; 115 o.timeout = "foo";
116 } 116 }
117 buildCounterBuild--; 117 buildCounterBuild--;
118 return o; 118 return o;
119 } 119 }
120 120
121 checkBuild(api.Build o) { 121 checkBuild(api.Build o) {
122 buildCounterBuild++; 122 buildCounterBuild++;
123 if (buildCounterBuild < 3) { 123 if (buildCounterBuild < 3) {
124 unittest.expect(o.buildTriggerId, unittest.equals('foo')); 124 unittest.expect(o.buildTriggerId, unittest.equals('foo'));
125 unittest.expect(o.createTime, unittest.equals('foo')); 125 unittest.expect(o.createTime, unittest.equals('foo'));
126 unittest.expect(o.finishTime, unittest.equals('foo')); 126 unittest.expect(o.finishTime, unittest.equals('foo'));
127 unittest.expect(o.id, unittest.equals('foo')); 127 unittest.expect(o.id, unittest.equals('foo'));
128 checkUnnamed1184(o.images); 128 checkUnnamed1216(o.images);
129 unittest.expect(o.logUrl, unittest.equals('foo')); 129 unittest.expect(o.logUrl, unittest.equals('foo'));
130 unittest.expect(o.logsBucket, unittest.equals('foo')); 130 unittest.expect(o.logsBucket, unittest.equals('foo'));
131 checkBuildOptions(o.options); 131 checkBuildOptions(o.options);
132 unittest.expect(o.projectId, unittest.equals('foo')); 132 unittest.expect(o.projectId, unittest.equals('foo'));
133 checkResults(o.results); 133 checkResults(o.results);
134 checkSource(o.source); 134 checkSource(o.source);
135 checkSourceProvenance(o.sourceProvenance); 135 checkSourceProvenance(o.sourceProvenance);
136 unittest.expect(o.startTime, unittest.equals('foo')); 136 unittest.expect(o.startTime, unittest.equals('foo'));
137 unittest.expect(o.status, unittest.equals('foo')); 137 unittest.expect(o.status, unittest.equals('foo'));
138 unittest.expect(o.statusDetail, unittest.equals('foo')); 138 unittest.expect(o.statusDetail, unittest.equals('foo'));
139 checkUnnamed1185(o.steps); 139 checkUnnamed1217(o.steps);
140 checkUnnamed1186(o.substitutions); 140 checkUnnamed1218(o.substitutions);
141 unittest.expect(o.timeout, unittest.equals('foo')); 141 unittest.expect(o.timeout, unittest.equals('foo'));
142 } 142 }
143 buildCounterBuild--; 143 buildCounterBuild--;
144 } 144 }
145 145
146 core.int buildCounterBuildOperationMetadata = 0; 146 core.int buildCounterBuildOperationMetadata = 0;
147 buildBuildOperationMetadata() { 147 buildBuildOperationMetadata() {
148 var o = new api.BuildOperationMetadata(); 148 var o = new api.BuildOperationMetadata();
149 buildCounterBuildOperationMetadata++; 149 buildCounterBuildOperationMetadata++;
150 if (buildCounterBuildOperationMetadata < 3) { 150 if (buildCounterBuildOperationMetadata < 3) {
151 o.build = buildBuild(); 151 o.build = buildBuild();
152 } 152 }
153 buildCounterBuildOperationMetadata--; 153 buildCounterBuildOperationMetadata--;
154 return o; 154 return o;
155 } 155 }
156 156
157 checkBuildOperationMetadata(api.BuildOperationMetadata o) { 157 checkBuildOperationMetadata(api.BuildOperationMetadata o) {
158 buildCounterBuildOperationMetadata++; 158 buildCounterBuildOperationMetadata++;
159 if (buildCounterBuildOperationMetadata < 3) { 159 if (buildCounterBuildOperationMetadata < 3) {
160 checkBuild(o.build); 160 checkBuild(o.build);
161 } 161 }
162 buildCounterBuildOperationMetadata--; 162 buildCounterBuildOperationMetadata--;
163 } 163 }
164 164
165 buildUnnamed1187() { 165 buildUnnamed1219() {
166 var o = new core.List<core.String>(); 166 var o = new core.List<core.String>();
167 o.add("foo"); 167 o.add("foo");
168 o.add("foo"); 168 o.add("foo");
169 return o; 169 return o;
170 } 170 }
171 171
172 checkUnnamed1187(core.List<core.String> o) { 172 checkUnnamed1219(core.List<core.String> o) {
173 unittest.expect(o, unittest.hasLength(2)); 173 unittest.expect(o, unittest.hasLength(2));
174 unittest.expect(o[0], unittest.equals('foo')); 174 unittest.expect(o[0], unittest.equals('foo'));
175 unittest.expect(o[1], unittest.equals('foo')); 175 unittest.expect(o[1], unittest.equals('foo'));
176 } 176 }
177 177
178 core.int buildCounterBuildOptions = 0; 178 core.int buildCounterBuildOptions = 0;
179 buildBuildOptions() { 179 buildBuildOptions() {
180 var o = new api.BuildOptions(); 180 var o = new api.BuildOptions();
181 buildCounterBuildOptions++; 181 buildCounterBuildOptions++;
182 if (buildCounterBuildOptions < 3) { 182 if (buildCounterBuildOptions < 3) {
183 o.requestedVerifyOption = "foo"; 183 o.requestedVerifyOption = "foo";
184 o.sourceProvenanceHash = buildUnnamed1187(); 184 o.sourceProvenanceHash = buildUnnamed1219();
185 } 185 }
186 buildCounterBuildOptions--; 186 buildCounterBuildOptions--;
187 return o; 187 return o;
188 } 188 }
189 189
190 checkBuildOptions(api.BuildOptions o) { 190 checkBuildOptions(api.BuildOptions o) {
191 buildCounterBuildOptions++; 191 buildCounterBuildOptions++;
192 if (buildCounterBuildOptions < 3) { 192 if (buildCounterBuildOptions < 3) {
193 unittest.expect(o.requestedVerifyOption, unittest.equals('foo')); 193 unittest.expect(o.requestedVerifyOption, unittest.equals('foo'));
194 checkUnnamed1187(o.sourceProvenanceHash); 194 checkUnnamed1219(o.sourceProvenanceHash);
195 } 195 }
196 buildCounterBuildOptions--; 196 buildCounterBuildOptions--;
197 } 197 }
198 198
199 buildUnnamed1188() { 199 buildUnnamed1220() {
200 var o = new core.List<core.String>(); 200 var o = new core.List<core.String>();
201 o.add("foo"); 201 o.add("foo");
202 o.add("foo"); 202 o.add("foo");
203 return o; 203 return o;
204 } 204 }
205 205
206 checkUnnamed1188(core.List<core.String> o) { 206 checkUnnamed1220(core.List<core.String> o) {
207 unittest.expect(o, unittest.hasLength(2)); 207 unittest.expect(o, unittest.hasLength(2));
208 unittest.expect(o[0], unittest.equals('foo')); 208 unittest.expect(o[0], unittest.equals('foo'));
209 unittest.expect(o[1], unittest.equals('foo')); 209 unittest.expect(o[1], unittest.equals('foo'));
210 } 210 }
211 211
212 buildUnnamed1189() { 212 buildUnnamed1221() {
213 var o = new core.List<core.String>(); 213 var o = new core.List<core.String>();
214 o.add("foo"); 214 o.add("foo");
215 o.add("foo"); 215 o.add("foo");
216 return o; 216 return o;
217 } 217 }
218 218
219 checkUnnamed1189(core.List<core.String> o) { 219 checkUnnamed1221(core.List<core.String> o) {
220 unittest.expect(o, unittest.hasLength(2)); 220 unittest.expect(o, unittest.hasLength(2));
221 unittest.expect(o[0], unittest.equals('foo')); 221 unittest.expect(o[0], unittest.equals('foo'));
222 unittest.expect(o[1], unittest.equals('foo')); 222 unittest.expect(o[1], unittest.equals('foo'));
223 } 223 }
224 224
225 buildUnnamed1190() { 225 buildUnnamed1222() {
226 var o = new core.List<core.String>(); 226 var o = new core.List<core.String>();
227 o.add("foo"); 227 o.add("foo");
228 o.add("foo"); 228 o.add("foo");
229 return o; 229 return o;
230 } 230 }
231 231
232 checkUnnamed1190(core.List<core.String> o) { 232 checkUnnamed1222(core.List<core.String> o) {
233 unittest.expect(o, unittest.hasLength(2)); 233 unittest.expect(o, unittest.hasLength(2));
234 unittest.expect(o[0], unittest.equals('foo')); 234 unittest.expect(o[0], unittest.equals('foo'));
235 unittest.expect(o[1], unittest.equals('foo')); 235 unittest.expect(o[1], unittest.equals('foo'));
236 } 236 }
237 237
238 core.int buildCounterBuildStep = 0; 238 core.int buildCounterBuildStep = 0;
239 buildBuildStep() { 239 buildBuildStep() {
240 var o = new api.BuildStep(); 240 var o = new api.BuildStep();
241 buildCounterBuildStep++; 241 buildCounterBuildStep++;
242 if (buildCounterBuildStep < 3) { 242 if (buildCounterBuildStep < 3) {
243 o.args = buildUnnamed1188(); 243 o.args = buildUnnamed1220();
244 o.dir = "foo"; 244 o.dir = "foo";
245 o.entrypoint = "foo"; 245 o.entrypoint = "foo";
246 o.env = buildUnnamed1189(); 246 o.env = buildUnnamed1221();
247 o.id = "foo"; 247 o.id = "foo";
248 o.name = "foo"; 248 o.name = "foo";
249 o.waitFor = buildUnnamed1190(); 249 o.waitFor = buildUnnamed1222();
250 } 250 }
251 buildCounterBuildStep--; 251 buildCounterBuildStep--;
252 return o; 252 return o;
253 } 253 }
254 254
255 checkBuildStep(api.BuildStep o) { 255 checkBuildStep(api.BuildStep o) {
256 buildCounterBuildStep++; 256 buildCounterBuildStep++;
257 if (buildCounterBuildStep < 3) { 257 if (buildCounterBuildStep < 3) {
258 checkUnnamed1188(o.args); 258 checkUnnamed1220(o.args);
259 unittest.expect(o.dir, unittest.equals('foo')); 259 unittest.expect(o.dir, unittest.equals('foo'));
260 unittest.expect(o.entrypoint, unittest.equals('foo')); 260 unittest.expect(o.entrypoint, unittest.equals('foo'));
261 checkUnnamed1189(o.env); 261 checkUnnamed1221(o.env);
262 unittest.expect(o.id, unittest.equals('foo')); 262 unittest.expect(o.id, unittest.equals('foo'));
263 unittest.expect(o.name, unittest.equals('foo')); 263 unittest.expect(o.name, unittest.equals('foo'));
264 checkUnnamed1190(o.waitFor); 264 checkUnnamed1222(o.waitFor);
265 } 265 }
266 buildCounterBuildStep--; 266 buildCounterBuildStep--;
267 } 267 }
268 268
269 buildUnnamed1191() { 269 buildUnnamed1223() {
270 var o = new core.Map<core.String, core.String>(); 270 var o = new core.Map<core.String, core.String>();
271 o["x"] = "foo"; 271 o["x"] = "foo";
272 o["y"] = "foo"; 272 o["y"] = "foo";
273 return o; 273 return o;
274 } 274 }
275 275
276 checkUnnamed1191(core.Map<core.String, core.String> o) { 276 checkUnnamed1223(core.Map<core.String, core.String> o) {
277 unittest.expect(o, unittest.hasLength(2)); 277 unittest.expect(o, unittest.hasLength(2));
278 unittest.expect(o["x"], unittest.equals('foo')); 278 unittest.expect(o["x"], unittest.equals('foo'));
279 unittest.expect(o["y"], unittest.equals('foo')); 279 unittest.expect(o["y"], unittest.equals('foo'));
280 } 280 }
281 281
282 core.int buildCounterBuildTrigger = 0; 282 core.int buildCounterBuildTrigger = 0;
283 buildBuildTrigger() { 283 buildBuildTrigger() {
284 var o = new api.BuildTrigger(); 284 var o = new api.BuildTrigger();
285 buildCounterBuildTrigger++; 285 buildCounterBuildTrigger++;
286 if (buildCounterBuildTrigger < 3) { 286 if (buildCounterBuildTrigger < 3) {
287 o.build = buildBuild(); 287 o.build = buildBuild();
288 o.createTime = "foo"; 288 o.createTime = "foo";
289 o.description = "foo"; 289 o.description = "foo";
290 o.disabled = true; 290 o.disabled = true;
291 o.filename = "foo"; 291 o.filename = "foo";
292 o.id = "foo"; 292 o.id = "foo";
293 o.substitutions = buildUnnamed1191(); 293 o.substitutions = buildUnnamed1223();
294 o.triggerTemplate = buildRepoSource(); 294 o.triggerTemplate = buildRepoSource();
295 } 295 }
296 buildCounterBuildTrigger--; 296 buildCounterBuildTrigger--;
297 return o; 297 return o;
298 } 298 }
299 299
300 checkBuildTrigger(api.BuildTrigger o) { 300 checkBuildTrigger(api.BuildTrigger o) {
301 buildCounterBuildTrigger++; 301 buildCounterBuildTrigger++;
302 if (buildCounterBuildTrigger < 3) { 302 if (buildCounterBuildTrigger < 3) {
303 checkBuild(o.build); 303 checkBuild(o.build);
304 unittest.expect(o.createTime, unittest.equals('foo')); 304 unittest.expect(o.createTime, unittest.equals('foo'));
305 unittest.expect(o.description, unittest.equals('foo')); 305 unittest.expect(o.description, unittest.equals('foo'));
306 unittest.expect(o.disabled, unittest.isTrue); 306 unittest.expect(o.disabled, unittest.isTrue);
307 unittest.expect(o.filename, unittest.equals('foo')); 307 unittest.expect(o.filename, unittest.equals('foo'));
308 unittest.expect(o.id, unittest.equals('foo')); 308 unittest.expect(o.id, unittest.equals('foo'));
309 checkUnnamed1191(o.substitutions); 309 checkUnnamed1223(o.substitutions);
310 checkRepoSource(o.triggerTemplate); 310 checkRepoSource(o.triggerTemplate);
311 } 311 }
312 buildCounterBuildTrigger--; 312 buildCounterBuildTrigger--;
313 } 313 }
314 314
315 core.int buildCounterBuiltImage = 0; 315 core.int buildCounterBuiltImage = 0;
316 buildBuiltImage() { 316 buildBuiltImage() {
317 var o = new api.BuiltImage(); 317 var o = new api.BuiltImage();
318 buildCounterBuiltImage++; 318 buildCounterBuiltImage++;
319 if (buildCounterBuiltImage < 3) { 319 if (buildCounterBuiltImage < 3) {
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
377 return o; 377 return o;
378 } 378 }
379 379
380 checkEmpty(api.Empty o) { 380 checkEmpty(api.Empty o) {
381 buildCounterEmpty++; 381 buildCounterEmpty++;
382 if (buildCounterEmpty < 3) { 382 if (buildCounterEmpty < 3) {
383 } 383 }
384 buildCounterEmpty--; 384 buildCounterEmpty--;
385 } 385 }
386 386
387 buildUnnamed1192() { 387 buildUnnamed1224() {
388 var o = new core.List<api.Hash>(); 388 var o = new core.List<api.Hash>();
389 o.add(buildHash()); 389 o.add(buildHash());
390 o.add(buildHash()); 390 o.add(buildHash());
391 return o; 391 return o;
392 } 392 }
393 393
394 checkUnnamed1192(core.List<api.Hash> o) { 394 checkUnnamed1224(core.List<api.Hash> o) {
395 unittest.expect(o, unittest.hasLength(2)); 395 unittest.expect(o, unittest.hasLength(2));
396 checkHash(o[0]); 396 checkHash(o[0]);
397 checkHash(o[1]); 397 checkHash(o[1]);
398 } 398 }
399 399
400 core.int buildCounterFileHashes = 0; 400 core.int buildCounterFileHashes = 0;
401 buildFileHashes() { 401 buildFileHashes() {
402 var o = new api.FileHashes(); 402 var o = new api.FileHashes();
403 buildCounterFileHashes++; 403 buildCounterFileHashes++;
404 if (buildCounterFileHashes < 3) { 404 if (buildCounterFileHashes < 3) {
405 o.fileHash = buildUnnamed1192(); 405 o.fileHash = buildUnnamed1224();
406 } 406 }
407 buildCounterFileHashes--; 407 buildCounterFileHashes--;
408 return o; 408 return o;
409 } 409 }
410 410
411 checkFileHashes(api.FileHashes o) { 411 checkFileHashes(api.FileHashes o) {
412 buildCounterFileHashes++; 412 buildCounterFileHashes++;
413 if (buildCounterFileHashes < 3) { 413 if (buildCounterFileHashes < 3) {
414 checkUnnamed1192(o.fileHash); 414 checkUnnamed1224(o.fileHash);
415 } 415 }
416 buildCounterFileHashes--; 416 buildCounterFileHashes--;
417 } 417 }
418 418
419 core.int buildCounterHash = 0; 419 core.int buildCounterHash = 0;
420 buildHash() { 420 buildHash() {
421 var o = new api.Hash(); 421 var o = new api.Hash();
422 buildCounterHash++; 422 buildCounterHash++;
423 if (buildCounterHash < 3) { 423 if (buildCounterHash < 3) {
424 o.type = "foo"; 424 o.type = "foo";
425 o.value = "foo"; 425 o.value = "foo";
426 } 426 }
427 buildCounterHash--; 427 buildCounterHash--;
428 return o; 428 return o;
429 } 429 }
430 430
431 checkHash(api.Hash o) { 431 checkHash(api.Hash o) {
432 buildCounterHash++; 432 buildCounterHash++;
433 if (buildCounterHash < 3) { 433 if (buildCounterHash < 3) {
434 unittest.expect(o.type, unittest.equals('foo')); 434 unittest.expect(o.type, unittest.equals('foo'));
435 unittest.expect(o.value, unittest.equals('foo')); 435 unittest.expect(o.value, unittest.equals('foo'));
436 } 436 }
437 buildCounterHash--; 437 buildCounterHash--;
438 } 438 }
439 439
440 buildUnnamed1193() { 440 buildUnnamed1225() {
441 var o = new core.List<api.BuildTrigger>(); 441 var o = new core.List<api.BuildTrigger>();
442 o.add(buildBuildTrigger()); 442 o.add(buildBuildTrigger());
443 o.add(buildBuildTrigger()); 443 o.add(buildBuildTrigger());
444 return o; 444 return o;
445 } 445 }
446 446
447 checkUnnamed1193(core.List<api.BuildTrigger> o) { 447 checkUnnamed1225(core.List<api.BuildTrigger> o) {
448 unittest.expect(o, unittest.hasLength(2)); 448 unittest.expect(o, unittest.hasLength(2));
449 checkBuildTrigger(o[0]); 449 checkBuildTrigger(o[0]);
450 checkBuildTrigger(o[1]); 450 checkBuildTrigger(o[1]);
451 } 451 }
452 452
453 core.int buildCounterListBuildTriggersResponse = 0; 453 core.int buildCounterListBuildTriggersResponse = 0;
454 buildListBuildTriggersResponse() { 454 buildListBuildTriggersResponse() {
455 var o = new api.ListBuildTriggersResponse(); 455 var o = new api.ListBuildTriggersResponse();
456 buildCounterListBuildTriggersResponse++; 456 buildCounterListBuildTriggersResponse++;
457 if (buildCounterListBuildTriggersResponse < 3) { 457 if (buildCounterListBuildTriggersResponse < 3) {
458 o.triggers = buildUnnamed1193(); 458 o.triggers = buildUnnamed1225();
459 } 459 }
460 buildCounterListBuildTriggersResponse--; 460 buildCounterListBuildTriggersResponse--;
461 return o; 461 return o;
462 } 462 }
463 463
464 checkListBuildTriggersResponse(api.ListBuildTriggersResponse o) { 464 checkListBuildTriggersResponse(api.ListBuildTriggersResponse o) {
465 buildCounterListBuildTriggersResponse++; 465 buildCounterListBuildTriggersResponse++;
466 if (buildCounterListBuildTriggersResponse < 3) { 466 if (buildCounterListBuildTriggersResponse < 3) {
467 checkUnnamed1193(o.triggers); 467 checkUnnamed1225(o.triggers);
468 } 468 }
469 buildCounterListBuildTriggersResponse--; 469 buildCounterListBuildTriggersResponse--;
470 } 470 }
471 471
472 buildUnnamed1194() { 472 buildUnnamed1226() {
473 var o = new core.List<api.Build>(); 473 var o = new core.List<api.Build>();
474 o.add(buildBuild()); 474 o.add(buildBuild());
475 o.add(buildBuild()); 475 o.add(buildBuild());
476 return o; 476 return o;
477 } 477 }
478 478
479 checkUnnamed1194(core.List<api.Build> o) { 479 checkUnnamed1226(core.List<api.Build> o) {
480 unittest.expect(o, unittest.hasLength(2)); 480 unittest.expect(o, unittest.hasLength(2));
481 checkBuild(o[0]); 481 checkBuild(o[0]);
482 checkBuild(o[1]); 482 checkBuild(o[1]);
483 } 483 }
484 484
485 core.int buildCounterListBuildsResponse = 0; 485 core.int buildCounterListBuildsResponse = 0;
486 buildListBuildsResponse() { 486 buildListBuildsResponse() {
487 var o = new api.ListBuildsResponse(); 487 var o = new api.ListBuildsResponse();
488 buildCounterListBuildsResponse++; 488 buildCounterListBuildsResponse++;
489 if (buildCounterListBuildsResponse < 3) { 489 if (buildCounterListBuildsResponse < 3) {
490 o.builds = buildUnnamed1194(); 490 o.builds = buildUnnamed1226();
491 o.nextPageToken = "foo"; 491 o.nextPageToken = "foo";
492 } 492 }
493 buildCounterListBuildsResponse--; 493 buildCounterListBuildsResponse--;
494 return o; 494 return o;
495 } 495 }
496 496
497 checkListBuildsResponse(api.ListBuildsResponse o) { 497 checkListBuildsResponse(api.ListBuildsResponse o) {
498 buildCounterListBuildsResponse++; 498 buildCounterListBuildsResponse++;
499 if (buildCounterListBuildsResponse < 3) { 499 if (buildCounterListBuildsResponse < 3) {
500 checkUnnamed1194(o.builds); 500 checkUnnamed1226(o.builds);
501 unittest.expect(o.nextPageToken, unittest.equals('foo')); 501 unittest.expect(o.nextPageToken, unittest.equals('foo'));
502 } 502 }
503 buildCounterListBuildsResponse--; 503 buildCounterListBuildsResponse--;
504 } 504 }
505 505
506 buildUnnamed1195() { 506 buildUnnamed1227() {
507 var o = new core.List<api.Operation>(); 507 var o = new core.List<api.Operation>();
508 o.add(buildOperation()); 508 o.add(buildOperation());
509 o.add(buildOperation()); 509 o.add(buildOperation());
510 return o; 510 return o;
511 } 511 }
512 512
513 checkUnnamed1195(core.List<api.Operation> o) { 513 checkUnnamed1227(core.List<api.Operation> o) {
514 unittest.expect(o, unittest.hasLength(2)); 514 unittest.expect(o, unittest.hasLength(2));
515 checkOperation(o[0]); 515 checkOperation(o[0]);
516 checkOperation(o[1]); 516 checkOperation(o[1]);
517 } 517 }
518 518
519 core.int buildCounterListOperationsResponse = 0; 519 core.int buildCounterListOperationsResponse = 0;
520 buildListOperationsResponse() { 520 buildListOperationsResponse() {
521 var o = new api.ListOperationsResponse(); 521 var o = new api.ListOperationsResponse();
522 buildCounterListOperationsResponse++; 522 buildCounterListOperationsResponse++;
523 if (buildCounterListOperationsResponse < 3) { 523 if (buildCounterListOperationsResponse < 3) {
524 o.nextPageToken = "foo"; 524 o.nextPageToken = "foo";
525 o.operations = buildUnnamed1195(); 525 o.operations = buildUnnamed1227();
526 } 526 }
527 buildCounterListOperationsResponse--; 527 buildCounterListOperationsResponse--;
528 return o; 528 return o;
529 } 529 }
530 530
531 checkListOperationsResponse(api.ListOperationsResponse o) { 531 checkListOperationsResponse(api.ListOperationsResponse o) {
532 buildCounterListOperationsResponse++; 532 buildCounterListOperationsResponse++;
533 if (buildCounterListOperationsResponse < 3) { 533 if (buildCounterListOperationsResponse < 3) {
534 unittest.expect(o.nextPageToken, unittest.equals('foo')); 534 unittest.expect(o.nextPageToken, unittest.equals('foo'));
535 checkUnnamed1195(o.operations); 535 checkUnnamed1227(o.operations);
536 } 536 }
537 buildCounterListOperationsResponse--; 537 buildCounterListOperationsResponse--;
538 } 538 }
539 539
540 buildUnnamed1196() { 540 buildUnnamed1228() {
541 var o = new core.Map<core.String, core.Object>(); 541 var o = new core.Map<core.String, core.Object>();
542 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; 542 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'};
543 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; 543 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'};
544 return o; 544 return o;
545 } 545 }
546 546
547 checkUnnamed1196(core.Map<core.String, core.Object> o) { 547 checkUnnamed1228(core.Map<core.String, core.Object> o) {
548 unittest.expect(o, unittest.hasLength(2)); 548 unittest.expect(o, unittest.hasLength(2));
549 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')); 549 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'));
550 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')); 550 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'));
551 } 551 }
552 552
553 buildUnnamed1197() { 553 buildUnnamed1229() {
554 var o = new core.Map<core.String, core.Object>(); 554 var o = new core.Map<core.String, core.Object>();
555 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; 555 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'};
556 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; 556 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'};
557 return o; 557 return o;
558 } 558 }
559 559
560 checkUnnamed1197(core.Map<core.String, core.Object> o) { 560 checkUnnamed1229(core.Map<core.String, core.Object> o) {
561 unittest.expect(o, unittest.hasLength(2)); 561 unittest.expect(o, unittest.hasLength(2));
562 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')); 562 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'));
563 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')); 563 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'));
564 } 564 }
565 565
566 core.int buildCounterOperation = 0; 566 core.int buildCounterOperation = 0;
567 buildOperation() { 567 buildOperation() {
568 var o = new api.Operation(); 568 var o = new api.Operation();
569 buildCounterOperation++; 569 buildCounterOperation++;
570 if (buildCounterOperation < 3) { 570 if (buildCounterOperation < 3) {
571 o.done = true; 571 o.done = true;
572 o.error = buildStatus(); 572 o.error = buildStatus();
573 o.metadata = buildUnnamed1196(); 573 o.metadata = buildUnnamed1228();
574 o.name = "foo"; 574 o.name = "foo";
575 o.response = buildUnnamed1197(); 575 o.response = buildUnnamed1229();
576 } 576 }
577 buildCounterOperation--; 577 buildCounterOperation--;
578 return o; 578 return o;
579 } 579 }
580 580
581 checkOperation(api.Operation o) { 581 checkOperation(api.Operation o) {
582 buildCounterOperation++; 582 buildCounterOperation++;
583 if (buildCounterOperation < 3) { 583 if (buildCounterOperation < 3) {
584 unittest.expect(o.done, unittest.isTrue); 584 unittest.expect(o.done, unittest.isTrue);
585 checkStatus(o.error); 585 checkStatus(o.error);
586 checkUnnamed1196(o.metadata); 586 checkUnnamed1228(o.metadata);
587 unittest.expect(o.name, unittest.equals('foo')); 587 unittest.expect(o.name, unittest.equals('foo'));
588 checkUnnamed1197(o.response); 588 checkUnnamed1229(o.response);
589 } 589 }
590 buildCounterOperation--; 590 buildCounterOperation--;
591 } 591 }
592 592
593 core.int buildCounterRepoSource = 0; 593 core.int buildCounterRepoSource = 0;
594 buildRepoSource() { 594 buildRepoSource() {
595 var o = new api.RepoSource(); 595 var o = new api.RepoSource();
596 buildCounterRepoSource++; 596 buildCounterRepoSource++;
597 if (buildCounterRepoSource < 3) { 597 if (buildCounterRepoSource < 3) {
598 o.branchName = "foo"; 598 o.branchName = "foo";
(...skipping 11 matching lines...) Expand all
610 if (buildCounterRepoSource < 3) { 610 if (buildCounterRepoSource < 3) {
611 unittest.expect(o.branchName, unittest.equals('foo')); 611 unittest.expect(o.branchName, unittest.equals('foo'));
612 unittest.expect(o.commitSha, unittest.equals('foo')); 612 unittest.expect(o.commitSha, unittest.equals('foo'));
613 unittest.expect(o.projectId, unittest.equals('foo')); 613 unittest.expect(o.projectId, unittest.equals('foo'));
614 unittest.expect(o.repoName, unittest.equals('foo')); 614 unittest.expect(o.repoName, unittest.equals('foo'));
615 unittest.expect(o.tagName, unittest.equals('foo')); 615 unittest.expect(o.tagName, unittest.equals('foo'));
616 } 616 }
617 buildCounterRepoSource--; 617 buildCounterRepoSource--;
618 } 618 }
619 619
620 buildUnnamed1198() { 620 buildUnnamed1230() {
621 var o = new core.List<core.String>(); 621 var o = new core.List<core.String>();
622 o.add("foo"); 622 o.add("foo");
623 o.add("foo"); 623 o.add("foo");
624 return o; 624 return o;
625 } 625 }
626 626
627 checkUnnamed1198(core.List<core.String> o) { 627 checkUnnamed1230(core.List<core.String> o) {
628 unittest.expect(o, unittest.hasLength(2)); 628 unittest.expect(o, unittest.hasLength(2));
629 unittest.expect(o[0], unittest.equals('foo')); 629 unittest.expect(o[0], unittest.equals('foo'));
630 unittest.expect(o[1], unittest.equals('foo')); 630 unittest.expect(o[1], unittest.equals('foo'));
631 } 631 }
632 632
633 buildUnnamed1199() { 633 buildUnnamed1231() {
634 var o = new core.List<api.BuiltImage>(); 634 var o = new core.List<api.BuiltImage>();
635 o.add(buildBuiltImage()); 635 o.add(buildBuiltImage());
636 o.add(buildBuiltImage()); 636 o.add(buildBuiltImage());
637 return o; 637 return o;
638 } 638 }
639 639
640 checkUnnamed1199(core.List<api.BuiltImage> o) { 640 checkUnnamed1231(core.List<api.BuiltImage> o) {
641 unittest.expect(o, unittest.hasLength(2)); 641 unittest.expect(o, unittest.hasLength(2));
642 checkBuiltImage(o[0]); 642 checkBuiltImage(o[0]);
643 checkBuiltImage(o[1]); 643 checkBuiltImage(o[1]);
644 } 644 }
645 645
646 core.int buildCounterResults = 0; 646 core.int buildCounterResults = 0;
647 buildResults() { 647 buildResults() {
648 var o = new api.Results(); 648 var o = new api.Results();
649 buildCounterResults++; 649 buildCounterResults++;
650 if (buildCounterResults < 3) { 650 if (buildCounterResults < 3) {
651 o.buildStepImages = buildUnnamed1198(); 651 o.buildStepImages = buildUnnamed1230();
652 o.images = buildUnnamed1199(); 652 o.images = buildUnnamed1231();
653 } 653 }
654 buildCounterResults--; 654 buildCounterResults--;
655 return o; 655 return o;
656 } 656 }
657 657
658 checkResults(api.Results o) { 658 checkResults(api.Results o) {
659 buildCounterResults++; 659 buildCounterResults++;
660 if (buildCounterResults < 3) { 660 if (buildCounterResults < 3) {
661 checkUnnamed1198(o.buildStepImages); 661 checkUnnamed1230(o.buildStepImages);
662 checkUnnamed1199(o.images); 662 checkUnnamed1231(o.images);
663 } 663 }
664 buildCounterResults--; 664 buildCounterResults--;
665 } 665 }
666 666
667 core.int buildCounterSource = 0; 667 core.int buildCounterSource = 0;
668 buildSource() { 668 buildSource() {
669 var o = new api.Source(); 669 var o = new api.Source();
670 buildCounterSource++; 670 buildCounterSource++;
671 if (buildCounterSource < 3) { 671 if (buildCounterSource < 3) {
672 o.repoSource = buildRepoSource(); 672 o.repoSource = buildRepoSource();
673 o.storageSource = buildStorageSource(); 673 o.storageSource = buildStorageSource();
674 } 674 }
675 buildCounterSource--; 675 buildCounterSource--;
676 return o; 676 return o;
677 } 677 }
678 678
679 checkSource(api.Source o) { 679 checkSource(api.Source o) {
680 buildCounterSource++; 680 buildCounterSource++;
681 if (buildCounterSource < 3) { 681 if (buildCounterSource < 3) {
682 checkRepoSource(o.repoSource); 682 checkRepoSource(o.repoSource);
683 checkStorageSource(o.storageSource); 683 checkStorageSource(o.storageSource);
684 } 684 }
685 buildCounterSource--; 685 buildCounterSource--;
686 } 686 }
687 687
688 buildUnnamed1200() { 688 buildUnnamed1232() {
689 var o = new core.Map<core.String, api.FileHashes>(); 689 var o = new core.Map<core.String, api.FileHashes>();
690 o["x"] = buildFileHashes(); 690 o["x"] = buildFileHashes();
691 o["y"] = buildFileHashes(); 691 o["y"] = buildFileHashes();
692 return o; 692 return o;
693 } 693 }
694 694
695 checkUnnamed1200(core.Map<core.String, api.FileHashes> o) { 695 checkUnnamed1232(core.Map<core.String, api.FileHashes> o) {
696 unittest.expect(o, unittest.hasLength(2)); 696 unittest.expect(o, unittest.hasLength(2));
697 checkFileHashes(o["x"]); 697 checkFileHashes(o["x"]);
698 checkFileHashes(o["y"]); 698 checkFileHashes(o["y"]);
699 } 699 }
700 700
701 core.int buildCounterSourceProvenance = 0; 701 core.int buildCounterSourceProvenance = 0;
702 buildSourceProvenance() { 702 buildSourceProvenance() {
703 var o = new api.SourceProvenance(); 703 var o = new api.SourceProvenance();
704 buildCounterSourceProvenance++; 704 buildCounterSourceProvenance++;
705 if (buildCounterSourceProvenance < 3) { 705 if (buildCounterSourceProvenance < 3) {
706 o.fileHashes = buildUnnamed1200(); 706 o.fileHashes = buildUnnamed1232();
707 o.resolvedRepoSource = buildRepoSource(); 707 o.resolvedRepoSource = buildRepoSource();
708 o.resolvedStorageSource = buildStorageSource(); 708 o.resolvedStorageSource = buildStorageSource();
709 } 709 }
710 buildCounterSourceProvenance--; 710 buildCounterSourceProvenance--;
711 return o; 711 return o;
712 } 712 }
713 713
714 checkSourceProvenance(api.SourceProvenance o) { 714 checkSourceProvenance(api.SourceProvenance o) {
715 buildCounterSourceProvenance++; 715 buildCounterSourceProvenance++;
716 if (buildCounterSourceProvenance < 3) { 716 if (buildCounterSourceProvenance < 3) {
717 checkUnnamed1200(o.fileHashes); 717 checkUnnamed1232(o.fileHashes);
718 checkRepoSource(o.resolvedRepoSource); 718 checkRepoSource(o.resolvedRepoSource);
719 checkStorageSource(o.resolvedStorageSource); 719 checkStorageSource(o.resolvedStorageSource);
720 } 720 }
721 buildCounterSourceProvenance--; 721 buildCounterSourceProvenance--;
722 } 722 }
723 723
724 buildUnnamed1201() { 724 buildUnnamed1233() {
725 var o = new core.Map<core.String, core.Object>(); 725 var o = new core.Map<core.String, core.Object>();
726 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; 726 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'};
727 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; 727 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'};
728 return o; 728 return o;
729 } 729 }
730 730
731 checkUnnamed1201(core.Map<core.String, core.Object> o) { 731 checkUnnamed1233(core.Map<core.String, core.Object> o) {
732 unittest.expect(o, unittest.hasLength(2)); 732 unittest.expect(o, unittest.hasLength(2));
733 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')); 733 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'));
734 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')); 734 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'));
735 } 735 }
736 736
737 buildUnnamed1202() { 737 buildUnnamed1234() {
738 var o = new core.List<core.Map<core.String, core.Object>>(); 738 var o = new core.List<core.Map<core.String, core.Object>>();
739 o.add(buildUnnamed1201()); 739 o.add(buildUnnamed1233());
740 o.add(buildUnnamed1201()); 740 o.add(buildUnnamed1233());
741 return o; 741 return o;
742 } 742 }
743 743
744 checkUnnamed1202(core.List<core.Map<core.String, core.Object>> o) { 744 checkUnnamed1234(core.List<core.Map<core.String, core.Object>> o) {
745 unittest.expect(o, unittest.hasLength(2)); 745 unittest.expect(o, unittest.hasLength(2));
746 checkUnnamed1201(o[0]); 746 checkUnnamed1233(o[0]);
747 checkUnnamed1201(o[1]); 747 checkUnnamed1233(o[1]);
748 } 748 }
749 749
750 core.int buildCounterStatus = 0; 750 core.int buildCounterStatus = 0;
751 buildStatus() { 751 buildStatus() {
752 var o = new api.Status(); 752 var o = new api.Status();
753 buildCounterStatus++; 753 buildCounterStatus++;
754 if (buildCounterStatus < 3) { 754 if (buildCounterStatus < 3) {
755 o.code = 42; 755 o.code = 42;
756 o.details = buildUnnamed1202(); 756 o.details = buildUnnamed1234();
757 o.message = "foo"; 757 o.message = "foo";
758 } 758 }
759 buildCounterStatus--; 759 buildCounterStatus--;
760 return o; 760 return o;
761 } 761 }
762 762
763 checkStatus(api.Status o) { 763 checkStatus(api.Status o) {
764 buildCounterStatus++; 764 buildCounterStatus++;
765 if (buildCounterStatus < 3) { 765 if (buildCounterStatus < 3) {
766 unittest.expect(o.code, unittest.equals(42)); 766 unittest.expect(o.code, unittest.equals(42));
767 checkUnnamed1202(o.details); 767 checkUnnamed1234(o.details);
768 unittest.expect(o.message, unittest.equals('foo')); 768 unittest.expect(o.message, unittest.equals('foo'));
769 } 769 }
770 buildCounterStatus--; 770 buildCounterStatus--;
771 } 771 }
772 772
773 core.int buildCounterStorageSource = 0; 773 core.int buildCounterStorageSource = 0;
774 buildStorageSource() { 774 buildStorageSource() {
775 var o = new api.StorageSource(); 775 var o = new api.StorageSource();
776 buildCounterStorageSource++; 776 buildCounterStorageSource++;
777 if (buildCounterStorageSource < 3) { 777 if (buildCounterStorageSource < 3) {
(...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after
1077 res.get(arg_name).then(unittest.expectAsync(((api.Operation response) { 1077 res.get(arg_name).then(unittest.expectAsync(((api.Operation response) {
1078 checkOperation(response); 1078 checkOperation(response);
1079 }))); 1079 })));
1080 }); 1080 });
1081 1081
1082 unittest.test("method--list", () { 1082 unittest.test("method--list", () {
1083 1083
1084 var mock = new HttpServerMock(); 1084 var mock = new HttpServerMock();
1085 api.OperationsResourceApi res = new api.CloudbuildApi(mock).operations; 1085 api.OperationsResourceApi res = new api.CloudbuildApi(mock).operations;
1086 var arg_name = "foo"; 1086 var arg_name = "foo";
1087 var arg_filter = "foo";
1088 var arg_pageToken = "foo"; 1087 var arg_pageToken = "foo";
1089 var arg_pageSize = 42; 1088 var arg_pageSize = 42;
1089 var arg_filter = "foo";
1090 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 1090 mock.register(unittest.expectAsync((http.BaseRequest req, json) {
1091 var path = (req.url).path; 1091 var path = (req.url).path;
1092 var pathOffset = 0; 1092 var pathOffset = 0;
1093 var index; 1093 var index;
1094 var subPart; 1094 var subPart;
1095 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 1095 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
1096 pathOffset += 1; 1096 pathOffset += 1;
1097 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ als("v1/")); 1097 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ als("v1/"));
1098 pathOffset += 3; 1098 pathOffset += 3;
1099 // NOTE: We cannot test reserved expansions due to the inability to reve rse the operation; 1099 // NOTE: We cannot test reserved expansions due to the inability to reve rse the operation;
1100 1100
1101 var query = (req.url).query; 1101 var query = (req.url).query;
1102 var queryOffset = 0; 1102 var queryOffset = 0;
1103 var queryMap = {}; 1103 var queryMap = {};
1104 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); 1104 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
1105 parseBool(n) { 1105 parseBool(n) {
1106 if (n == "true") return true; 1106 if (n == "true") return true;
1107 if (n == "false") return false; 1107 if (n == "false") return false;
1108 if (n == null) return null; 1108 if (n == null) return null;
1109 throw new core.ArgumentError("Invalid boolean: $n"); 1109 throw new core.ArgumentError("Invalid boolean: $n");
1110 } 1110 }
1111 if (query.length > 0) { 1111 if (query.length > 0) {
1112 for (var part in query.split("&")) { 1112 for (var part in query.split("&")) {
1113 var keyvalue = part.split("="); 1113 var keyvalue = part.split("=");
1114 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1])); 1114 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1]));
1115 } 1115 }
1116 } 1116 }
1117 unittest.expect(queryMap["filter"].first, unittest.equals(arg_filter));
1118 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok en)); 1117 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok en));
1119 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ als(arg_pageSize)); 1118 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ als(arg_pageSize));
1119 unittest.expect(queryMap["filter"].first, unittest.equals(arg_filter));
1120 1120
1121 1121
1122 var h = { 1122 var h = {
1123 "content-type" : "application/json; charset=utf-8", 1123 "content-type" : "application/json; charset=utf-8",
1124 }; 1124 };
1125 var resp = convert.JSON.encode(buildListOperationsResponse()); 1125 var resp = convert.JSON.encode(buildListOperationsResponse());
1126 return new async.Future.value(stringResponse(200, h, resp)); 1126 return new async.Future.value(stringResponse(200, h, resp));
1127 }), true); 1127 }), true);
1128 res.list(arg_name, filter: arg_filter, pageToken: arg_pageToken, pageSize: arg_pageSize).then(unittest.expectAsync(((api.ListOperationsResponse response) { 1128 res.list(arg_name, pageToken: arg_pageToken, pageSize: arg_pageSize, filte r: arg_filter).then(unittest.expectAsync(((api.ListOperationsResponse response) {
1129 checkListOperationsResponse(response); 1129 checkListOperationsResponse(response);
1130 }))); 1130 })));
1131 }); 1131 });
1132 1132
1133 }); 1133 });
1134 1134
1135 1135
1136 unittest.group("resource-ProjectsBuildsResourceApi", () { 1136 unittest.group("resource-ProjectsBuildsResourceApi", () {
1137 unittest.test("method--cancel", () { 1137 unittest.test("method--cancel", () {
1138 1138
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
1305 res.get(arg_projectId, arg_id).then(unittest.expectAsync(((api.Build respo nse) { 1305 res.get(arg_projectId, arg_id).then(unittest.expectAsync(((api.Build respo nse) {
1306 checkBuild(response); 1306 checkBuild(response);
1307 }))); 1307 })));
1308 }); 1308 });
1309 1309
1310 unittest.test("method--list", () { 1310 unittest.test("method--list", () {
1311 1311
1312 var mock = new HttpServerMock(); 1312 var mock = new HttpServerMock();
1313 api.ProjectsBuildsResourceApi res = new api.CloudbuildApi(mock).projects.b uilds; 1313 api.ProjectsBuildsResourceApi res = new api.CloudbuildApi(mock).projects.b uilds;
1314 var arg_projectId = "foo"; 1314 var arg_projectId = "foo";
1315 var arg_filter = "foo";
1316 var arg_pageToken = "foo"; 1315 var arg_pageToken = "foo";
1317 var arg_pageSize = 42; 1316 var arg_pageSize = 42;
1317 var arg_filter = "foo";
1318 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 1318 mock.register(unittest.expectAsync((http.BaseRequest req, json) {
1319 var path = (req.url).path; 1319 var path = (req.url).path;
1320 var pathOffset = 0; 1320 var pathOffset = 0;
1321 var index; 1321 var index;
1322 var subPart; 1322 var subPart;
1323 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 1323 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
1324 pathOffset += 1; 1324 pathOffset += 1;
1325 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq uals("v1/projects/")); 1325 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq uals("v1/projects/"));
1326 pathOffset += 12; 1326 pathOffset += 12;
1327 index = path.indexOf("/builds", pathOffset); 1327 index = path.indexOf("/builds", pathOffset);
(...skipping 13 matching lines...) Expand all
1341 if (n == "false") return false; 1341 if (n == "false") return false;
1342 if (n == null) return null; 1342 if (n == null) return null;
1343 throw new core.ArgumentError("Invalid boolean: $n"); 1343 throw new core.ArgumentError("Invalid boolean: $n");
1344 } 1344 }
1345 if (query.length > 0) { 1345 if (query.length > 0) {
1346 for (var part in query.split("&")) { 1346 for (var part in query.split("&")) {
1347 var keyvalue = part.split("="); 1347 var keyvalue = part.split("=");
1348 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1])); 1348 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1]));
1349 } 1349 }
1350 } 1350 }
1351 unittest.expect(queryMap["filter"].first, unittest.equals(arg_filter));
1352 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok en)); 1351 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok en));
1353 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ als(arg_pageSize)); 1352 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ als(arg_pageSize));
1353 unittest.expect(queryMap["filter"].first, unittest.equals(arg_filter));
1354 1354
1355 1355
1356 var h = { 1356 var h = {
1357 "content-type" : "application/json; charset=utf-8", 1357 "content-type" : "application/json; charset=utf-8",
1358 }; 1358 };
1359 var resp = convert.JSON.encode(buildListBuildsResponse()); 1359 var resp = convert.JSON.encode(buildListBuildsResponse());
1360 return new async.Future.value(stringResponse(200, h, resp)); 1360 return new async.Future.value(stringResponse(200, h, resp));
1361 }), true); 1361 }), true);
1362 res.list(arg_projectId, filter: arg_filter, pageToken: arg_pageToken, page Size: arg_pageSize).then(unittest.expectAsync(((api.ListBuildsResponse response) { 1362 res.list(arg_projectId, pageToken: arg_pageToken, pageSize: arg_pageSize, filter: arg_filter).then(unittest.expectAsync(((api.ListBuildsResponse response) {
1363 checkListBuildsResponse(response); 1363 checkListBuildsResponse(response);
1364 }))); 1364 })));
1365 }); 1365 });
1366 1366
1367 }); 1367 });
1368 1368
1369 1369
1370 unittest.group("resource-ProjectsTriggersResourceApi", () { 1370 unittest.group("resource-ProjectsTriggersResourceApi", () {
1371 unittest.test("method--create", () { 1371 unittest.test("method--create", () {
1372 1372
(...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after
1641 res.patch(arg_request, arg_projectId, arg_triggerId).then(unittest.expectA sync(((api.BuildTrigger response) { 1641 res.patch(arg_request, arg_projectId, arg_triggerId).then(unittest.expectA sync(((api.BuildTrigger response) {
1642 checkBuildTrigger(response); 1642 checkBuildTrigger(response);
1643 }))); 1643 })));
1644 }); 1644 });
1645 1645
1646 }); 1646 });
1647 1647
1648 1648
1649 } 1649 }
1650 1650
OLDNEW
« no previous file with comments | « generated/googleapis/test/classroom/v1_test.dart ('k') | generated/googleapis/test/clouddebugger/v2_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698