OLD | NEW |
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 Loading... |
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 buildUnnamed1175() { | 54 buildUnnamed1184() { |
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 checkUnnamed1175(core.List<core.String> o) { | 61 checkUnnamed1184(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 buildUnnamed1176() { | 67 buildUnnamed1185() { |
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 checkUnnamed1176(core.List<api.BuildStep> o) { | 74 checkUnnamed1185(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() { |
| 81 var o = new core.Map<core.String, core.String>(); |
| 82 o["x"] = "foo"; |
| 83 o["y"] = "foo"; |
| 84 return o; |
| 85 } |
| 86 |
| 87 checkUnnamed1186(core.Map<core.String, core.String> o) { |
| 88 unittest.expect(o, unittest.hasLength(2)); |
| 89 unittest.expect(o["x"], unittest.equals('foo')); |
| 90 unittest.expect(o["y"], unittest.equals('foo')); |
| 91 } |
| 92 |
80 core.int buildCounterBuild = 0; | 93 core.int buildCounterBuild = 0; |
81 buildBuild() { | 94 buildBuild() { |
82 var o = new api.Build(); | 95 var o = new api.Build(); |
83 buildCounterBuild++; | 96 buildCounterBuild++; |
84 if (buildCounterBuild < 3) { | 97 if (buildCounterBuild < 3) { |
85 o.buildTriggerId = "foo"; | 98 o.buildTriggerId = "foo"; |
86 o.createTime = "foo"; | 99 o.createTime = "foo"; |
87 o.finishTime = "foo"; | 100 o.finishTime = "foo"; |
88 o.id = "foo"; | 101 o.id = "foo"; |
89 o.images = buildUnnamed1175(); | 102 o.images = buildUnnamed1184(); |
90 o.logUrl = "foo"; | 103 o.logUrl = "foo"; |
91 o.logsBucket = "foo"; | 104 o.logsBucket = "foo"; |
92 o.options = buildBuildOptions(); | 105 o.options = buildBuildOptions(); |
93 o.projectId = "foo"; | 106 o.projectId = "foo"; |
94 o.results = buildResults(); | 107 o.results = buildResults(); |
95 o.source = buildSource(); | 108 o.source = buildSource(); |
96 o.sourceProvenance = buildSourceProvenance(); | 109 o.sourceProvenance = buildSourceProvenance(); |
97 o.startTime = "foo"; | 110 o.startTime = "foo"; |
98 o.status = "foo"; | 111 o.status = "foo"; |
99 o.statusDetail = "foo"; | 112 o.statusDetail = "foo"; |
100 o.steps = buildUnnamed1176(); | 113 o.steps = buildUnnamed1185(); |
| 114 o.substitutions = buildUnnamed1186(); |
101 o.timeout = "foo"; | 115 o.timeout = "foo"; |
102 } | 116 } |
103 buildCounterBuild--; | 117 buildCounterBuild--; |
104 return o; | 118 return o; |
105 } | 119 } |
106 | 120 |
107 checkBuild(api.Build o) { | 121 checkBuild(api.Build o) { |
108 buildCounterBuild++; | 122 buildCounterBuild++; |
109 if (buildCounterBuild < 3) { | 123 if (buildCounterBuild < 3) { |
110 unittest.expect(o.buildTriggerId, unittest.equals('foo')); | 124 unittest.expect(o.buildTriggerId, unittest.equals('foo')); |
111 unittest.expect(o.createTime, unittest.equals('foo')); | 125 unittest.expect(o.createTime, unittest.equals('foo')); |
112 unittest.expect(o.finishTime, unittest.equals('foo')); | 126 unittest.expect(o.finishTime, unittest.equals('foo')); |
113 unittest.expect(o.id, unittest.equals('foo')); | 127 unittest.expect(o.id, unittest.equals('foo')); |
114 checkUnnamed1175(o.images); | 128 checkUnnamed1184(o.images); |
115 unittest.expect(o.logUrl, unittest.equals('foo')); | 129 unittest.expect(o.logUrl, unittest.equals('foo')); |
116 unittest.expect(o.logsBucket, unittest.equals('foo')); | 130 unittest.expect(o.logsBucket, unittest.equals('foo')); |
117 checkBuildOptions(o.options); | 131 checkBuildOptions(o.options); |
118 unittest.expect(o.projectId, unittest.equals('foo')); | 132 unittest.expect(o.projectId, unittest.equals('foo')); |
119 checkResults(o.results); | 133 checkResults(o.results); |
120 checkSource(o.source); | 134 checkSource(o.source); |
121 checkSourceProvenance(o.sourceProvenance); | 135 checkSourceProvenance(o.sourceProvenance); |
122 unittest.expect(o.startTime, unittest.equals('foo')); | 136 unittest.expect(o.startTime, unittest.equals('foo')); |
123 unittest.expect(o.status, unittest.equals('foo')); | 137 unittest.expect(o.status, unittest.equals('foo')); |
124 unittest.expect(o.statusDetail, unittest.equals('foo')); | 138 unittest.expect(o.statusDetail, unittest.equals('foo')); |
125 checkUnnamed1176(o.steps); | 139 checkUnnamed1185(o.steps); |
| 140 checkUnnamed1186(o.substitutions); |
126 unittest.expect(o.timeout, unittest.equals('foo')); | 141 unittest.expect(o.timeout, unittest.equals('foo')); |
127 } | 142 } |
128 buildCounterBuild--; | 143 buildCounterBuild--; |
129 } | 144 } |
130 | 145 |
131 core.int buildCounterBuildOperationMetadata = 0; | 146 core.int buildCounterBuildOperationMetadata = 0; |
132 buildBuildOperationMetadata() { | 147 buildBuildOperationMetadata() { |
133 var o = new api.BuildOperationMetadata(); | 148 var o = new api.BuildOperationMetadata(); |
134 buildCounterBuildOperationMetadata++; | 149 buildCounterBuildOperationMetadata++; |
135 if (buildCounterBuildOperationMetadata < 3) { | 150 if (buildCounterBuildOperationMetadata < 3) { |
136 o.build = buildBuild(); | 151 o.build = buildBuild(); |
137 } | 152 } |
138 buildCounterBuildOperationMetadata--; | 153 buildCounterBuildOperationMetadata--; |
139 return o; | 154 return o; |
140 } | 155 } |
141 | 156 |
142 checkBuildOperationMetadata(api.BuildOperationMetadata o) { | 157 checkBuildOperationMetadata(api.BuildOperationMetadata o) { |
143 buildCounterBuildOperationMetadata++; | 158 buildCounterBuildOperationMetadata++; |
144 if (buildCounterBuildOperationMetadata < 3) { | 159 if (buildCounterBuildOperationMetadata < 3) { |
145 checkBuild(o.build); | 160 checkBuild(o.build); |
146 } | 161 } |
147 buildCounterBuildOperationMetadata--; | 162 buildCounterBuildOperationMetadata--; |
148 } | 163 } |
149 | 164 |
150 buildUnnamed1177() { | 165 buildUnnamed1187() { |
151 var o = new core.List<core.String>(); | 166 var o = new core.List<core.String>(); |
152 o.add("foo"); | 167 o.add("foo"); |
153 o.add("foo"); | 168 o.add("foo"); |
154 return o; | 169 return o; |
155 } | 170 } |
156 | 171 |
157 checkUnnamed1177(core.List<core.String> o) { | 172 checkUnnamed1187(core.List<core.String> o) { |
158 unittest.expect(o, unittest.hasLength(2)); | 173 unittest.expect(o, unittest.hasLength(2)); |
159 unittest.expect(o[0], unittest.equals('foo')); | 174 unittest.expect(o[0], unittest.equals('foo')); |
160 unittest.expect(o[1], unittest.equals('foo')); | 175 unittest.expect(o[1], unittest.equals('foo')); |
161 } | 176 } |
162 | 177 |
163 core.int buildCounterBuildOptions = 0; | 178 core.int buildCounterBuildOptions = 0; |
164 buildBuildOptions() { | 179 buildBuildOptions() { |
165 var o = new api.BuildOptions(); | 180 var o = new api.BuildOptions(); |
166 buildCounterBuildOptions++; | 181 buildCounterBuildOptions++; |
167 if (buildCounterBuildOptions < 3) { | 182 if (buildCounterBuildOptions < 3) { |
168 o.requestedVerifyOption = "foo"; | 183 o.requestedVerifyOption = "foo"; |
169 o.sourceProvenanceHash = buildUnnamed1177(); | 184 o.sourceProvenanceHash = buildUnnamed1187(); |
170 } | 185 } |
171 buildCounterBuildOptions--; | 186 buildCounterBuildOptions--; |
172 return o; | 187 return o; |
173 } | 188 } |
174 | 189 |
175 checkBuildOptions(api.BuildOptions o) { | 190 checkBuildOptions(api.BuildOptions o) { |
176 buildCounterBuildOptions++; | 191 buildCounterBuildOptions++; |
177 if (buildCounterBuildOptions < 3) { | 192 if (buildCounterBuildOptions < 3) { |
178 unittest.expect(o.requestedVerifyOption, unittest.equals('foo')); | 193 unittest.expect(o.requestedVerifyOption, unittest.equals('foo')); |
179 checkUnnamed1177(o.sourceProvenanceHash); | 194 checkUnnamed1187(o.sourceProvenanceHash); |
180 } | 195 } |
181 buildCounterBuildOptions--; | 196 buildCounterBuildOptions--; |
182 } | 197 } |
183 | 198 |
184 buildUnnamed1178() { | 199 buildUnnamed1188() { |
185 var o = new core.List<core.String>(); | 200 var o = new core.List<core.String>(); |
186 o.add("foo"); | 201 o.add("foo"); |
187 o.add("foo"); | 202 o.add("foo"); |
188 return o; | 203 return o; |
189 } | 204 } |
190 | 205 |
191 checkUnnamed1178(core.List<core.String> o) { | 206 checkUnnamed1188(core.List<core.String> o) { |
192 unittest.expect(o, unittest.hasLength(2)); | 207 unittest.expect(o, unittest.hasLength(2)); |
193 unittest.expect(o[0], unittest.equals('foo')); | 208 unittest.expect(o[0], unittest.equals('foo')); |
194 unittest.expect(o[1], unittest.equals('foo')); | 209 unittest.expect(o[1], unittest.equals('foo')); |
195 } | 210 } |
196 | 211 |
197 buildUnnamed1179() { | 212 buildUnnamed1189() { |
198 var o = new core.List<core.String>(); | 213 var o = new core.List<core.String>(); |
199 o.add("foo"); | 214 o.add("foo"); |
200 o.add("foo"); | 215 o.add("foo"); |
201 return o; | 216 return o; |
202 } | 217 } |
203 | 218 |
204 checkUnnamed1179(core.List<core.String> o) { | 219 checkUnnamed1189(core.List<core.String> o) { |
205 unittest.expect(o, unittest.hasLength(2)); | 220 unittest.expect(o, unittest.hasLength(2)); |
206 unittest.expect(o[0], unittest.equals('foo')); | 221 unittest.expect(o[0], unittest.equals('foo')); |
207 unittest.expect(o[1], unittest.equals('foo')); | 222 unittest.expect(o[1], unittest.equals('foo')); |
208 } | 223 } |
209 | 224 |
210 buildUnnamed1180() { | 225 buildUnnamed1190() { |
211 var o = new core.List<core.String>(); | 226 var o = new core.List<core.String>(); |
212 o.add("foo"); | 227 o.add("foo"); |
213 o.add("foo"); | 228 o.add("foo"); |
214 return o; | 229 return o; |
215 } | 230 } |
216 | 231 |
217 checkUnnamed1180(core.List<core.String> o) { | 232 checkUnnamed1190(core.List<core.String> o) { |
218 unittest.expect(o, unittest.hasLength(2)); | 233 unittest.expect(o, unittest.hasLength(2)); |
219 unittest.expect(o[0], unittest.equals('foo')); | 234 unittest.expect(o[0], unittest.equals('foo')); |
220 unittest.expect(o[1], unittest.equals('foo')); | 235 unittest.expect(o[1], unittest.equals('foo')); |
221 } | 236 } |
222 | 237 |
223 core.int buildCounterBuildStep = 0; | 238 core.int buildCounterBuildStep = 0; |
224 buildBuildStep() { | 239 buildBuildStep() { |
225 var o = new api.BuildStep(); | 240 var o = new api.BuildStep(); |
226 buildCounterBuildStep++; | 241 buildCounterBuildStep++; |
227 if (buildCounterBuildStep < 3) { | 242 if (buildCounterBuildStep < 3) { |
228 o.args = buildUnnamed1178(); | 243 o.args = buildUnnamed1188(); |
229 o.dir = "foo"; | 244 o.dir = "foo"; |
230 o.entrypoint = "foo"; | 245 o.entrypoint = "foo"; |
231 o.env = buildUnnamed1179(); | 246 o.env = buildUnnamed1189(); |
232 o.id = "foo"; | 247 o.id = "foo"; |
233 o.name = "foo"; | 248 o.name = "foo"; |
234 o.waitFor = buildUnnamed1180(); | 249 o.waitFor = buildUnnamed1190(); |
235 } | 250 } |
236 buildCounterBuildStep--; | 251 buildCounterBuildStep--; |
237 return o; | 252 return o; |
238 } | 253 } |
239 | 254 |
240 checkBuildStep(api.BuildStep o) { | 255 checkBuildStep(api.BuildStep o) { |
241 buildCounterBuildStep++; | 256 buildCounterBuildStep++; |
242 if (buildCounterBuildStep < 3) { | 257 if (buildCounterBuildStep < 3) { |
243 checkUnnamed1178(o.args); | 258 checkUnnamed1188(o.args); |
244 unittest.expect(o.dir, unittest.equals('foo')); | 259 unittest.expect(o.dir, unittest.equals('foo')); |
245 unittest.expect(o.entrypoint, unittest.equals('foo')); | 260 unittest.expect(o.entrypoint, unittest.equals('foo')); |
246 checkUnnamed1179(o.env); | 261 checkUnnamed1189(o.env); |
247 unittest.expect(o.id, unittest.equals('foo')); | 262 unittest.expect(o.id, unittest.equals('foo')); |
248 unittest.expect(o.name, unittest.equals('foo')); | 263 unittest.expect(o.name, unittest.equals('foo')); |
249 checkUnnamed1180(o.waitFor); | 264 checkUnnamed1190(o.waitFor); |
250 } | 265 } |
251 buildCounterBuildStep--; | 266 buildCounterBuildStep--; |
252 } | 267 } |
253 | 268 |
| 269 buildUnnamed1191() { |
| 270 var o = new core.Map<core.String, core.String>(); |
| 271 o["x"] = "foo"; |
| 272 o["y"] = "foo"; |
| 273 return o; |
| 274 } |
| 275 |
| 276 checkUnnamed1191(core.Map<core.String, core.String> o) { |
| 277 unittest.expect(o, unittest.hasLength(2)); |
| 278 unittest.expect(o["x"], unittest.equals('foo')); |
| 279 unittest.expect(o["y"], unittest.equals('foo')); |
| 280 } |
| 281 |
254 core.int buildCounterBuildTrigger = 0; | 282 core.int buildCounterBuildTrigger = 0; |
255 buildBuildTrigger() { | 283 buildBuildTrigger() { |
256 var o = new api.BuildTrigger(); | 284 var o = new api.BuildTrigger(); |
257 buildCounterBuildTrigger++; | 285 buildCounterBuildTrigger++; |
258 if (buildCounterBuildTrigger < 3) { | 286 if (buildCounterBuildTrigger < 3) { |
259 o.build = buildBuild(); | 287 o.build = buildBuild(); |
260 o.createTime = "foo"; | 288 o.createTime = "foo"; |
261 o.description = "foo"; | 289 o.description = "foo"; |
262 o.disabled = true; | 290 o.disabled = true; |
263 o.filename = "foo"; | 291 o.filename = "foo"; |
264 o.id = "foo"; | 292 o.id = "foo"; |
| 293 o.substitutions = buildUnnamed1191(); |
265 o.triggerTemplate = buildRepoSource(); | 294 o.triggerTemplate = buildRepoSource(); |
266 } | 295 } |
267 buildCounterBuildTrigger--; | 296 buildCounterBuildTrigger--; |
268 return o; | 297 return o; |
269 } | 298 } |
270 | 299 |
271 checkBuildTrigger(api.BuildTrigger o) { | 300 checkBuildTrigger(api.BuildTrigger o) { |
272 buildCounterBuildTrigger++; | 301 buildCounterBuildTrigger++; |
273 if (buildCounterBuildTrigger < 3) { | 302 if (buildCounterBuildTrigger < 3) { |
274 checkBuild(o.build); | 303 checkBuild(o.build); |
275 unittest.expect(o.createTime, unittest.equals('foo')); | 304 unittest.expect(o.createTime, unittest.equals('foo')); |
276 unittest.expect(o.description, unittest.equals('foo')); | 305 unittest.expect(o.description, unittest.equals('foo')); |
277 unittest.expect(o.disabled, unittest.isTrue); | 306 unittest.expect(o.disabled, unittest.isTrue); |
278 unittest.expect(o.filename, unittest.equals('foo')); | 307 unittest.expect(o.filename, unittest.equals('foo')); |
279 unittest.expect(o.id, unittest.equals('foo')); | 308 unittest.expect(o.id, unittest.equals('foo')); |
| 309 checkUnnamed1191(o.substitutions); |
280 checkRepoSource(o.triggerTemplate); | 310 checkRepoSource(o.triggerTemplate); |
281 } | 311 } |
282 buildCounterBuildTrigger--; | 312 buildCounterBuildTrigger--; |
283 } | 313 } |
284 | 314 |
285 core.int buildCounterBuiltImage = 0; | 315 core.int buildCounterBuiltImage = 0; |
286 buildBuiltImage() { | 316 buildBuiltImage() { |
287 var o = new api.BuiltImage(); | 317 var o = new api.BuiltImage(); |
288 buildCounterBuiltImage++; | 318 buildCounterBuiltImage++; |
289 if (buildCounterBuiltImage < 3) { | 319 if (buildCounterBuiltImage < 3) { |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
347 return o; | 377 return o; |
348 } | 378 } |
349 | 379 |
350 checkEmpty(api.Empty o) { | 380 checkEmpty(api.Empty o) { |
351 buildCounterEmpty++; | 381 buildCounterEmpty++; |
352 if (buildCounterEmpty < 3) { | 382 if (buildCounterEmpty < 3) { |
353 } | 383 } |
354 buildCounterEmpty--; | 384 buildCounterEmpty--; |
355 } | 385 } |
356 | 386 |
357 buildUnnamed1181() { | 387 buildUnnamed1192() { |
358 var o = new core.List<api.Hash>(); | 388 var o = new core.List<api.Hash>(); |
359 o.add(buildHash()); | 389 o.add(buildHash()); |
360 o.add(buildHash()); | 390 o.add(buildHash()); |
361 return o; | 391 return o; |
362 } | 392 } |
363 | 393 |
364 checkUnnamed1181(core.List<api.Hash> o) { | 394 checkUnnamed1192(core.List<api.Hash> o) { |
365 unittest.expect(o, unittest.hasLength(2)); | 395 unittest.expect(o, unittest.hasLength(2)); |
366 checkHash(o[0]); | 396 checkHash(o[0]); |
367 checkHash(o[1]); | 397 checkHash(o[1]); |
368 } | 398 } |
369 | 399 |
370 core.int buildCounterFileHashes = 0; | 400 core.int buildCounterFileHashes = 0; |
371 buildFileHashes() { | 401 buildFileHashes() { |
372 var o = new api.FileHashes(); | 402 var o = new api.FileHashes(); |
373 buildCounterFileHashes++; | 403 buildCounterFileHashes++; |
374 if (buildCounterFileHashes < 3) { | 404 if (buildCounterFileHashes < 3) { |
375 o.fileHash = buildUnnamed1181(); | 405 o.fileHash = buildUnnamed1192(); |
376 } | 406 } |
377 buildCounterFileHashes--; | 407 buildCounterFileHashes--; |
378 return o; | 408 return o; |
379 } | 409 } |
380 | 410 |
381 checkFileHashes(api.FileHashes o) { | 411 checkFileHashes(api.FileHashes o) { |
382 buildCounterFileHashes++; | 412 buildCounterFileHashes++; |
383 if (buildCounterFileHashes < 3) { | 413 if (buildCounterFileHashes < 3) { |
384 checkUnnamed1181(o.fileHash); | 414 checkUnnamed1192(o.fileHash); |
385 } | 415 } |
386 buildCounterFileHashes--; | 416 buildCounterFileHashes--; |
387 } | 417 } |
388 | 418 |
389 core.int buildCounterHash = 0; | 419 core.int buildCounterHash = 0; |
390 buildHash() { | 420 buildHash() { |
391 var o = new api.Hash(); | 421 var o = new api.Hash(); |
392 buildCounterHash++; | 422 buildCounterHash++; |
393 if (buildCounterHash < 3) { | 423 if (buildCounterHash < 3) { |
394 o.type = "foo"; | 424 o.type = "foo"; |
395 o.value = "foo"; | 425 o.value = "foo"; |
396 } | 426 } |
397 buildCounterHash--; | 427 buildCounterHash--; |
398 return o; | 428 return o; |
399 } | 429 } |
400 | 430 |
401 checkHash(api.Hash o) { | 431 checkHash(api.Hash o) { |
402 buildCounterHash++; | 432 buildCounterHash++; |
403 if (buildCounterHash < 3) { | 433 if (buildCounterHash < 3) { |
404 unittest.expect(o.type, unittest.equals('foo')); | 434 unittest.expect(o.type, unittest.equals('foo')); |
405 unittest.expect(o.value, unittest.equals('foo')); | 435 unittest.expect(o.value, unittest.equals('foo')); |
406 } | 436 } |
407 buildCounterHash--; | 437 buildCounterHash--; |
408 } | 438 } |
409 | 439 |
410 buildUnnamed1182() { | 440 buildUnnamed1193() { |
411 var o = new core.List<api.BuildTrigger>(); | 441 var o = new core.List<api.BuildTrigger>(); |
412 o.add(buildBuildTrigger()); | 442 o.add(buildBuildTrigger()); |
413 o.add(buildBuildTrigger()); | 443 o.add(buildBuildTrigger()); |
414 return o; | 444 return o; |
415 } | 445 } |
416 | 446 |
417 checkUnnamed1182(core.List<api.BuildTrigger> o) { | 447 checkUnnamed1193(core.List<api.BuildTrigger> o) { |
418 unittest.expect(o, unittest.hasLength(2)); | 448 unittest.expect(o, unittest.hasLength(2)); |
419 checkBuildTrigger(o[0]); | 449 checkBuildTrigger(o[0]); |
420 checkBuildTrigger(o[1]); | 450 checkBuildTrigger(o[1]); |
421 } | 451 } |
422 | 452 |
423 core.int buildCounterListBuildTriggersResponse = 0; | 453 core.int buildCounterListBuildTriggersResponse = 0; |
424 buildListBuildTriggersResponse() { | 454 buildListBuildTriggersResponse() { |
425 var o = new api.ListBuildTriggersResponse(); | 455 var o = new api.ListBuildTriggersResponse(); |
426 buildCounterListBuildTriggersResponse++; | 456 buildCounterListBuildTriggersResponse++; |
427 if (buildCounterListBuildTriggersResponse < 3) { | 457 if (buildCounterListBuildTriggersResponse < 3) { |
428 o.triggers = buildUnnamed1182(); | 458 o.triggers = buildUnnamed1193(); |
429 } | 459 } |
430 buildCounterListBuildTriggersResponse--; | 460 buildCounterListBuildTriggersResponse--; |
431 return o; | 461 return o; |
432 } | 462 } |
433 | 463 |
434 checkListBuildTriggersResponse(api.ListBuildTriggersResponse o) { | 464 checkListBuildTriggersResponse(api.ListBuildTriggersResponse o) { |
435 buildCounterListBuildTriggersResponse++; | 465 buildCounterListBuildTriggersResponse++; |
436 if (buildCounterListBuildTriggersResponse < 3) { | 466 if (buildCounterListBuildTriggersResponse < 3) { |
437 checkUnnamed1182(o.triggers); | 467 checkUnnamed1193(o.triggers); |
438 } | 468 } |
439 buildCounterListBuildTriggersResponse--; | 469 buildCounterListBuildTriggersResponse--; |
440 } | 470 } |
441 | 471 |
442 buildUnnamed1183() { | 472 buildUnnamed1194() { |
443 var o = new core.List<api.Build>(); | 473 var o = new core.List<api.Build>(); |
444 o.add(buildBuild()); | 474 o.add(buildBuild()); |
445 o.add(buildBuild()); | 475 o.add(buildBuild()); |
446 return o; | 476 return o; |
447 } | 477 } |
448 | 478 |
449 checkUnnamed1183(core.List<api.Build> o) { | 479 checkUnnamed1194(core.List<api.Build> o) { |
450 unittest.expect(o, unittest.hasLength(2)); | 480 unittest.expect(o, unittest.hasLength(2)); |
451 checkBuild(o[0]); | 481 checkBuild(o[0]); |
452 checkBuild(o[1]); | 482 checkBuild(o[1]); |
453 } | 483 } |
454 | 484 |
455 core.int buildCounterListBuildsResponse = 0; | 485 core.int buildCounterListBuildsResponse = 0; |
456 buildListBuildsResponse() { | 486 buildListBuildsResponse() { |
457 var o = new api.ListBuildsResponse(); | 487 var o = new api.ListBuildsResponse(); |
458 buildCounterListBuildsResponse++; | 488 buildCounterListBuildsResponse++; |
459 if (buildCounterListBuildsResponse < 3) { | 489 if (buildCounterListBuildsResponse < 3) { |
460 o.builds = buildUnnamed1183(); | 490 o.builds = buildUnnamed1194(); |
461 o.nextPageToken = "foo"; | 491 o.nextPageToken = "foo"; |
462 } | 492 } |
463 buildCounterListBuildsResponse--; | 493 buildCounterListBuildsResponse--; |
464 return o; | 494 return o; |
465 } | 495 } |
466 | 496 |
467 checkListBuildsResponse(api.ListBuildsResponse o) { | 497 checkListBuildsResponse(api.ListBuildsResponse o) { |
468 buildCounterListBuildsResponse++; | 498 buildCounterListBuildsResponse++; |
469 if (buildCounterListBuildsResponse < 3) { | 499 if (buildCounterListBuildsResponse < 3) { |
470 checkUnnamed1183(o.builds); | 500 checkUnnamed1194(o.builds); |
471 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 501 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
472 } | 502 } |
473 buildCounterListBuildsResponse--; | 503 buildCounterListBuildsResponse--; |
474 } | 504 } |
475 | 505 |
476 buildUnnamed1184() { | 506 buildUnnamed1195() { |
477 var o = new core.List<api.Operation>(); | 507 var o = new core.List<api.Operation>(); |
478 o.add(buildOperation()); | 508 o.add(buildOperation()); |
479 o.add(buildOperation()); | 509 o.add(buildOperation()); |
480 return o; | 510 return o; |
481 } | 511 } |
482 | 512 |
483 checkUnnamed1184(core.List<api.Operation> o) { | 513 checkUnnamed1195(core.List<api.Operation> o) { |
484 unittest.expect(o, unittest.hasLength(2)); | 514 unittest.expect(o, unittest.hasLength(2)); |
485 checkOperation(o[0]); | 515 checkOperation(o[0]); |
486 checkOperation(o[1]); | 516 checkOperation(o[1]); |
487 } | 517 } |
488 | 518 |
489 core.int buildCounterListOperationsResponse = 0; | 519 core.int buildCounterListOperationsResponse = 0; |
490 buildListOperationsResponse() { | 520 buildListOperationsResponse() { |
491 var o = new api.ListOperationsResponse(); | 521 var o = new api.ListOperationsResponse(); |
492 buildCounterListOperationsResponse++; | 522 buildCounterListOperationsResponse++; |
493 if (buildCounterListOperationsResponse < 3) { | 523 if (buildCounterListOperationsResponse < 3) { |
494 o.nextPageToken = "foo"; | 524 o.nextPageToken = "foo"; |
495 o.operations = buildUnnamed1184(); | 525 o.operations = buildUnnamed1195(); |
496 } | 526 } |
497 buildCounterListOperationsResponse--; | 527 buildCounterListOperationsResponse--; |
498 return o; | 528 return o; |
499 } | 529 } |
500 | 530 |
501 checkListOperationsResponse(api.ListOperationsResponse o) { | 531 checkListOperationsResponse(api.ListOperationsResponse o) { |
502 buildCounterListOperationsResponse++; | 532 buildCounterListOperationsResponse++; |
503 if (buildCounterListOperationsResponse < 3) { | 533 if (buildCounterListOperationsResponse < 3) { |
504 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 534 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
505 checkUnnamed1184(o.operations); | 535 checkUnnamed1195(o.operations); |
506 } | 536 } |
507 buildCounterListOperationsResponse--; | 537 buildCounterListOperationsResponse--; |
508 } | 538 } |
509 | 539 |
510 buildUnnamed1185() { | 540 buildUnnamed1196() { |
511 var o = new core.Map<core.String, core.Object>(); | 541 var o = new core.Map<core.String, core.Object>(); |
512 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 542 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; |
513 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 543 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; |
514 return o; | 544 return o; |
515 } | 545 } |
516 | 546 |
517 checkUnnamed1185(core.Map<core.String, core.Object> o) { | 547 checkUnnamed1196(core.Map<core.String, core.Object> o) { |
518 unittest.expect(o, unittest.hasLength(2)); | 548 unittest.expect(o, unittest.hasLength(2)); |
519 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')); |
520 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')); |
521 } | 551 } |
522 | 552 |
523 buildUnnamed1186() { | 553 buildUnnamed1197() { |
524 var o = new core.Map<core.String, core.Object>(); | 554 var o = new core.Map<core.String, core.Object>(); |
525 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 555 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; |
526 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 556 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; |
527 return o; | 557 return o; |
528 } | 558 } |
529 | 559 |
530 checkUnnamed1186(core.Map<core.String, core.Object> o) { | 560 checkUnnamed1197(core.Map<core.String, core.Object> o) { |
531 unittest.expect(o, unittest.hasLength(2)); | 561 unittest.expect(o, unittest.hasLength(2)); |
532 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')); |
533 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')); |
534 } | 564 } |
535 | 565 |
536 core.int buildCounterOperation = 0; | 566 core.int buildCounterOperation = 0; |
537 buildOperation() { | 567 buildOperation() { |
538 var o = new api.Operation(); | 568 var o = new api.Operation(); |
539 buildCounterOperation++; | 569 buildCounterOperation++; |
540 if (buildCounterOperation < 3) { | 570 if (buildCounterOperation < 3) { |
541 o.done = true; | 571 o.done = true; |
542 o.error = buildStatus(); | 572 o.error = buildStatus(); |
543 o.metadata = buildUnnamed1185(); | 573 o.metadata = buildUnnamed1196(); |
544 o.name = "foo"; | 574 o.name = "foo"; |
545 o.response = buildUnnamed1186(); | 575 o.response = buildUnnamed1197(); |
546 } | 576 } |
547 buildCounterOperation--; | 577 buildCounterOperation--; |
548 return o; | 578 return o; |
549 } | 579 } |
550 | 580 |
551 checkOperation(api.Operation o) { | 581 checkOperation(api.Operation o) { |
552 buildCounterOperation++; | 582 buildCounterOperation++; |
553 if (buildCounterOperation < 3) { | 583 if (buildCounterOperation < 3) { |
554 unittest.expect(o.done, unittest.isTrue); | 584 unittest.expect(o.done, unittest.isTrue); |
555 checkStatus(o.error); | 585 checkStatus(o.error); |
556 checkUnnamed1185(o.metadata); | 586 checkUnnamed1196(o.metadata); |
557 unittest.expect(o.name, unittest.equals('foo')); | 587 unittest.expect(o.name, unittest.equals('foo')); |
558 checkUnnamed1186(o.response); | 588 checkUnnamed1197(o.response); |
559 } | 589 } |
560 buildCounterOperation--; | 590 buildCounterOperation--; |
561 } | 591 } |
562 | 592 |
563 core.int buildCounterRepoSource = 0; | 593 core.int buildCounterRepoSource = 0; |
564 buildRepoSource() { | 594 buildRepoSource() { |
565 var o = new api.RepoSource(); | 595 var o = new api.RepoSource(); |
566 buildCounterRepoSource++; | 596 buildCounterRepoSource++; |
567 if (buildCounterRepoSource < 3) { | 597 if (buildCounterRepoSource < 3) { |
568 o.branchName = "foo"; | 598 o.branchName = "foo"; |
(...skipping 11 matching lines...) Expand all Loading... |
580 if (buildCounterRepoSource < 3) { | 610 if (buildCounterRepoSource < 3) { |
581 unittest.expect(o.branchName, unittest.equals('foo')); | 611 unittest.expect(o.branchName, unittest.equals('foo')); |
582 unittest.expect(o.commitSha, unittest.equals('foo')); | 612 unittest.expect(o.commitSha, unittest.equals('foo')); |
583 unittest.expect(o.projectId, unittest.equals('foo')); | 613 unittest.expect(o.projectId, unittest.equals('foo')); |
584 unittest.expect(o.repoName, unittest.equals('foo')); | 614 unittest.expect(o.repoName, unittest.equals('foo')); |
585 unittest.expect(o.tagName, unittest.equals('foo')); | 615 unittest.expect(o.tagName, unittest.equals('foo')); |
586 } | 616 } |
587 buildCounterRepoSource--; | 617 buildCounterRepoSource--; |
588 } | 618 } |
589 | 619 |
590 buildUnnamed1187() { | 620 buildUnnamed1198() { |
591 var o = new core.List<core.String>(); | 621 var o = new core.List<core.String>(); |
592 o.add("foo"); | 622 o.add("foo"); |
593 o.add("foo"); | 623 o.add("foo"); |
594 return o; | 624 return o; |
595 } | 625 } |
596 | 626 |
597 checkUnnamed1187(core.List<core.String> o) { | 627 checkUnnamed1198(core.List<core.String> o) { |
598 unittest.expect(o, unittest.hasLength(2)); | 628 unittest.expect(o, unittest.hasLength(2)); |
599 unittest.expect(o[0], unittest.equals('foo')); | 629 unittest.expect(o[0], unittest.equals('foo')); |
600 unittest.expect(o[1], unittest.equals('foo')); | 630 unittest.expect(o[1], unittest.equals('foo')); |
601 } | 631 } |
602 | 632 |
603 buildUnnamed1188() { | 633 buildUnnamed1199() { |
604 var o = new core.List<api.BuiltImage>(); | 634 var o = new core.List<api.BuiltImage>(); |
605 o.add(buildBuiltImage()); | 635 o.add(buildBuiltImage()); |
606 o.add(buildBuiltImage()); | 636 o.add(buildBuiltImage()); |
607 return o; | 637 return o; |
608 } | 638 } |
609 | 639 |
610 checkUnnamed1188(core.List<api.BuiltImage> o) { | 640 checkUnnamed1199(core.List<api.BuiltImage> o) { |
611 unittest.expect(o, unittest.hasLength(2)); | 641 unittest.expect(o, unittest.hasLength(2)); |
612 checkBuiltImage(o[0]); | 642 checkBuiltImage(o[0]); |
613 checkBuiltImage(o[1]); | 643 checkBuiltImage(o[1]); |
614 } | 644 } |
615 | 645 |
616 core.int buildCounterResults = 0; | 646 core.int buildCounterResults = 0; |
617 buildResults() { | 647 buildResults() { |
618 var o = new api.Results(); | 648 var o = new api.Results(); |
619 buildCounterResults++; | 649 buildCounterResults++; |
620 if (buildCounterResults < 3) { | 650 if (buildCounterResults < 3) { |
621 o.buildStepImages = buildUnnamed1187(); | 651 o.buildStepImages = buildUnnamed1198(); |
622 o.images = buildUnnamed1188(); | 652 o.images = buildUnnamed1199(); |
623 } | 653 } |
624 buildCounterResults--; | 654 buildCounterResults--; |
625 return o; | 655 return o; |
626 } | 656 } |
627 | 657 |
628 checkResults(api.Results o) { | 658 checkResults(api.Results o) { |
629 buildCounterResults++; | 659 buildCounterResults++; |
630 if (buildCounterResults < 3) { | 660 if (buildCounterResults < 3) { |
631 checkUnnamed1187(o.buildStepImages); | 661 checkUnnamed1198(o.buildStepImages); |
632 checkUnnamed1188(o.images); | 662 checkUnnamed1199(o.images); |
633 } | 663 } |
634 buildCounterResults--; | 664 buildCounterResults--; |
635 } | 665 } |
636 | 666 |
637 core.int buildCounterSource = 0; | 667 core.int buildCounterSource = 0; |
638 buildSource() { | 668 buildSource() { |
639 var o = new api.Source(); | 669 var o = new api.Source(); |
640 buildCounterSource++; | 670 buildCounterSource++; |
641 if (buildCounterSource < 3) { | 671 if (buildCounterSource < 3) { |
642 o.repoSource = buildRepoSource(); | 672 o.repoSource = buildRepoSource(); |
643 o.storageSource = buildStorageSource(); | 673 o.storageSource = buildStorageSource(); |
644 } | 674 } |
645 buildCounterSource--; | 675 buildCounterSource--; |
646 return o; | 676 return o; |
647 } | 677 } |
648 | 678 |
649 checkSource(api.Source o) { | 679 checkSource(api.Source o) { |
650 buildCounterSource++; | 680 buildCounterSource++; |
651 if (buildCounterSource < 3) { | 681 if (buildCounterSource < 3) { |
652 checkRepoSource(o.repoSource); | 682 checkRepoSource(o.repoSource); |
653 checkStorageSource(o.storageSource); | 683 checkStorageSource(o.storageSource); |
654 } | 684 } |
655 buildCounterSource--; | 685 buildCounterSource--; |
656 } | 686 } |
657 | 687 |
658 buildUnnamed1189() { | 688 buildUnnamed1200() { |
659 var o = new core.Map<core.String, api.FileHashes>(); | 689 var o = new core.Map<core.String, api.FileHashes>(); |
660 o["x"] = buildFileHashes(); | 690 o["x"] = buildFileHashes(); |
661 o["y"] = buildFileHashes(); | 691 o["y"] = buildFileHashes(); |
662 return o; | 692 return o; |
663 } | 693 } |
664 | 694 |
665 checkUnnamed1189(core.Map<core.String, api.FileHashes> o) { | 695 checkUnnamed1200(core.Map<core.String, api.FileHashes> o) { |
666 unittest.expect(o, unittest.hasLength(2)); | 696 unittest.expect(o, unittest.hasLength(2)); |
667 checkFileHashes(o["x"]); | 697 checkFileHashes(o["x"]); |
668 checkFileHashes(o["y"]); | 698 checkFileHashes(o["y"]); |
669 } | 699 } |
670 | 700 |
671 core.int buildCounterSourceProvenance = 0; | 701 core.int buildCounterSourceProvenance = 0; |
672 buildSourceProvenance() { | 702 buildSourceProvenance() { |
673 var o = new api.SourceProvenance(); | 703 var o = new api.SourceProvenance(); |
674 buildCounterSourceProvenance++; | 704 buildCounterSourceProvenance++; |
675 if (buildCounterSourceProvenance < 3) { | 705 if (buildCounterSourceProvenance < 3) { |
676 o.fileHashes = buildUnnamed1189(); | 706 o.fileHashes = buildUnnamed1200(); |
677 o.resolvedRepoSource = buildRepoSource(); | 707 o.resolvedRepoSource = buildRepoSource(); |
678 o.resolvedStorageSource = buildStorageSource(); | 708 o.resolvedStorageSource = buildStorageSource(); |
679 } | 709 } |
680 buildCounterSourceProvenance--; | 710 buildCounterSourceProvenance--; |
681 return o; | 711 return o; |
682 } | 712 } |
683 | 713 |
684 checkSourceProvenance(api.SourceProvenance o) { | 714 checkSourceProvenance(api.SourceProvenance o) { |
685 buildCounterSourceProvenance++; | 715 buildCounterSourceProvenance++; |
686 if (buildCounterSourceProvenance < 3) { | 716 if (buildCounterSourceProvenance < 3) { |
687 checkUnnamed1189(o.fileHashes); | 717 checkUnnamed1200(o.fileHashes); |
688 checkRepoSource(o.resolvedRepoSource); | 718 checkRepoSource(o.resolvedRepoSource); |
689 checkStorageSource(o.resolvedStorageSource); | 719 checkStorageSource(o.resolvedStorageSource); |
690 } | 720 } |
691 buildCounterSourceProvenance--; | 721 buildCounterSourceProvenance--; |
692 } | 722 } |
693 | 723 |
694 buildUnnamed1190() { | 724 buildUnnamed1201() { |
695 var o = new core.Map<core.String, core.Object>(); | 725 var o = new core.Map<core.String, core.Object>(); |
696 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 726 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; |
697 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 727 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; |
698 return o; | 728 return o; |
699 } | 729 } |
700 | 730 |
701 checkUnnamed1190(core.Map<core.String, core.Object> o) { | 731 checkUnnamed1201(core.Map<core.String, core.Object> o) { |
702 unittest.expect(o, unittest.hasLength(2)); | 732 unittest.expect(o, unittest.hasLength(2)); |
703 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')); |
704 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')); |
705 } | 735 } |
706 | 736 |
707 buildUnnamed1191() { | 737 buildUnnamed1202() { |
708 var o = new core.List<core.Map<core.String, core.Object>>(); | 738 var o = new core.List<core.Map<core.String, core.Object>>(); |
709 o.add(buildUnnamed1190()); | 739 o.add(buildUnnamed1201()); |
710 o.add(buildUnnamed1190()); | 740 o.add(buildUnnamed1201()); |
711 return o; | 741 return o; |
712 } | 742 } |
713 | 743 |
714 checkUnnamed1191(core.List<core.Map<core.String, core.Object>> o) { | 744 checkUnnamed1202(core.List<core.Map<core.String, core.Object>> o) { |
715 unittest.expect(o, unittest.hasLength(2)); | 745 unittest.expect(o, unittest.hasLength(2)); |
716 checkUnnamed1190(o[0]); | 746 checkUnnamed1201(o[0]); |
717 checkUnnamed1190(o[1]); | 747 checkUnnamed1201(o[1]); |
718 } | 748 } |
719 | 749 |
720 core.int buildCounterStatus = 0; | 750 core.int buildCounterStatus = 0; |
721 buildStatus() { | 751 buildStatus() { |
722 var o = new api.Status(); | 752 var o = new api.Status(); |
723 buildCounterStatus++; | 753 buildCounterStatus++; |
724 if (buildCounterStatus < 3) { | 754 if (buildCounterStatus < 3) { |
725 o.code = 42; | 755 o.code = 42; |
726 o.details = buildUnnamed1191(); | 756 o.details = buildUnnamed1202(); |
727 o.message = "foo"; | 757 o.message = "foo"; |
728 } | 758 } |
729 buildCounterStatus--; | 759 buildCounterStatus--; |
730 return o; | 760 return o; |
731 } | 761 } |
732 | 762 |
733 checkStatus(api.Status o) { | 763 checkStatus(api.Status o) { |
734 buildCounterStatus++; | 764 buildCounterStatus++; |
735 if (buildCounterStatus < 3) { | 765 if (buildCounterStatus < 3) { |
736 unittest.expect(o.code, unittest.equals(42)); | 766 unittest.expect(o.code, unittest.equals(42)); |
737 checkUnnamed1191(o.details); | 767 checkUnnamed1202(o.details); |
738 unittest.expect(o.message, unittest.equals('foo')); | 768 unittest.expect(o.message, unittest.equals('foo')); |
739 } | 769 } |
740 buildCounterStatus--; | 770 buildCounterStatus--; |
741 } | 771 } |
742 | 772 |
743 core.int buildCounterStorageSource = 0; | 773 core.int buildCounterStorageSource = 0; |
744 buildStorageSource() { | 774 buildStorageSource() { |
745 var o = new api.StorageSource(); | 775 var o = new api.StorageSource(); |
746 buildCounterStorageSource++; | 776 buildCounterStorageSource++; |
747 if (buildCounterStorageSource < 3) { | 777 if (buildCounterStorageSource < 3) { |
(...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1047 res.get(arg_name).then(unittest.expectAsync(((api.Operation response) { | 1077 res.get(arg_name).then(unittest.expectAsync(((api.Operation response) { |
1048 checkOperation(response); | 1078 checkOperation(response); |
1049 }))); | 1079 }))); |
1050 }); | 1080 }); |
1051 | 1081 |
1052 unittest.test("method--list", () { | 1082 unittest.test("method--list", () { |
1053 | 1083 |
1054 var mock = new HttpServerMock(); | 1084 var mock = new HttpServerMock(); |
1055 api.OperationsResourceApi res = new api.CloudbuildApi(mock).operations; | 1085 api.OperationsResourceApi res = new api.CloudbuildApi(mock).operations; |
1056 var arg_name = "foo"; | 1086 var arg_name = "foo"; |
1057 var arg_pageSize = 42; | |
1058 var arg_filter = "foo"; | 1087 var arg_filter = "foo"; |
1059 var arg_pageToken = "foo"; | 1088 var arg_pageToken = "foo"; |
| 1089 var arg_pageSize = 42; |
1060 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1090 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
1061 var path = (req.url).path; | 1091 var path = (req.url).path; |
1062 var pathOffset = 0; | 1092 var pathOffset = 0; |
1063 var index; | 1093 var index; |
1064 var subPart; | 1094 var subPart; |
1065 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1095 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
1066 pathOffset += 1; | 1096 pathOffset += 1; |
1067 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); | 1097 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); |
1068 pathOffset += 3; | 1098 pathOffset += 3; |
1069 // 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; |
1070 | 1100 |
1071 var query = (req.url).query; | 1101 var query = (req.url).query; |
1072 var queryOffset = 0; | 1102 var queryOffset = 0; |
1073 var queryMap = {}; | 1103 var queryMap = {}; |
1074 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 1104 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
1075 parseBool(n) { | 1105 parseBool(n) { |
1076 if (n == "true") return true; | 1106 if (n == "true") return true; |
1077 if (n == "false") return false; | 1107 if (n == "false") return false; |
1078 if (n == null) return null; | 1108 if (n == null) return null; |
1079 throw new core.ArgumentError("Invalid boolean: $n"); | 1109 throw new core.ArgumentError("Invalid boolean: $n"); |
1080 } | 1110 } |
1081 if (query.length > 0) { | 1111 if (query.length > 0) { |
1082 for (var part in query.split("&")) { | 1112 for (var part in query.split("&")) { |
1083 var keyvalue = part.split("="); | 1113 var keyvalue = part.split("="); |
1084 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])); |
1085 } | 1115 } |
1086 } | 1116 } |
1087 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ
als(arg_pageSize)); | |
1088 unittest.expect(queryMap["filter"].first, unittest.equals(arg_filter)); | 1117 unittest.expect(queryMap["filter"].first, unittest.equals(arg_filter)); |
1089 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | 1118 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); |
| 1119 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ
als(arg_pageSize)); |
1090 | 1120 |
1091 | 1121 |
1092 var h = { | 1122 var h = { |
1093 "content-type" : "application/json; charset=utf-8", | 1123 "content-type" : "application/json; charset=utf-8", |
1094 }; | 1124 }; |
1095 var resp = convert.JSON.encode(buildListOperationsResponse()); | 1125 var resp = convert.JSON.encode(buildListOperationsResponse()); |
1096 return new async.Future.value(stringResponse(200, h, resp)); | 1126 return new async.Future.value(stringResponse(200, h, resp)); |
1097 }), true); | 1127 }), true); |
1098 res.list(arg_name, pageSize: arg_pageSize, filter: arg_filter, pageToken:
arg_pageToken).then(unittest.expectAsync(((api.ListOperationsResponse response)
{ | 1128 res.list(arg_name, filter: arg_filter, pageToken: arg_pageToken, pageSize:
arg_pageSize).then(unittest.expectAsync(((api.ListOperationsResponse response)
{ |
1099 checkListOperationsResponse(response); | 1129 checkListOperationsResponse(response); |
1100 }))); | 1130 }))); |
1101 }); | 1131 }); |
1102 | 1132 |
1103 }); | 1133 }); |
1104 | 1134 |
1105 | 1135 |
1106 unittest.group("resource-ProjectsBuildsResourceApi", () { | 1136 unittest.group("resource-ProjectsBuildsResourceApi", () { |
1107 unittest.test("method--cancel", () { | 1137 unittest.test("method--cancel", () { |
1108 | 1138 |
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1275 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) { |
1276 checkBuild(response); | 1306 checkBuild(response); |
1277 }))); | 1307 }))); |
1278 }); | 1308 }); |
1279 | 1309 |
1280 unittest.test("method--list", () { | 1310 unittest.test("method--list", () { |
1281 | 1311 |
1282 var mock = new HttpServerMock(); | 1312 var mock = new HttpServerMock(); |
1283 api.ProjectsBuildsResourceApi res = new api.CloudbuildApi(mock).projects.b
uilds; | 1313 api.ProjectsBuildsResourceApi res = new api.CloudbuildApi(mock).projects.b
uilds; |
1284 var arg_projectId = "foo"; | 1314 var arg_projectId = "foo"; |
1285 var arg_pageSize = 42; | |
1286 var arg_filter = "foo"; | 1315 var arg_filter = "foo"; |
1287 var arg_pageToken = "foo"; | 1316 var arg_pageToken = "foo"; |
| 1317 var arg_pageSize = 42; |
1288 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1318 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
1289 var path = (req.url).path; | 1319 var path = (req.url).path; |
1290 var pathOffset = 0; | 1320 var pathOffset = 0; |
1291 var index; | 1321 var index; |
1292 var subPart; | 1322 var subPart; |
1293 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1323 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
1294 pathOffset += 1; | 1324 pathOffset += 1; |
1295 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/")); |
1296 pathOffset += 12; | 1326 pathOffset += 12; |
1297 index = path.indexOf("/builds", pathOffset); | 1327 index = path.indexOf("/builds", pathOffset); |
(...skipping 13 matching lines...) Expand all Loading... |
1311 if (n == "false") return false; | 1341 if (n == "false") return false; |
1312 if (n == null) return null; | 1342 if (n == null) return null; |
1313 throw new core.ArgumentError("Invalid boolean: $n"); | 1343 throw new core.ArgumentError("Invalid boolean: $n"); |
1314 } | 1344 } |
1315 if (query.length > 0) { | 1345 if (query.length > 0) { |
1316 for (var part in query.split("&")) { | 1346 for (var part in query.split("&")) { |
1317 var keyvalue = part.split("="); | 1347 var keyvalue = part.split("="); |
1318 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])); |
1319 } | 1349 } |
1320 } | 1350 } |
1321 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ
als(arg_pageSize)); | |
1322 unittest.expect(queryMap["filter"].first, unittest.equals(arg_filter)); | 1351 unittest.expect(queryMap["filter"].first, unittest.equals(arg_filter)); |
1323 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | 1352 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); |
| 1353 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ
als(arg_pageSize)); |
1324 | 1354 |
1325 | 1355 |
1326 var h = { | 1356 var h = { |
1327 "content-type" : "application/json; charset=utf-8", | 1357 "content-type" : "application/json; charset=utf-8", |
1328 }; | 1358 }; |
1329 var resp = convert.JSON.encode(buildListBuildsResponse()); | 1359 var resp = convert.JSON.encode(buildListBuildsResponse()); |
1330 return new async.Future.value(stringResponse(200, h, resp)); | 1360 return new async.Future.value(stringResponse(200, h, resp)); |
1331 }), true); | 1361 }), true); |
1332 res.list(arg_projectId, pageSize: arg_pageSize, filter: arg_filter, pageTo
ken: arg_pageToken).then(unittest.expectAsync(((api.ListBuildsResponse response)
{ | 1362 res.list(arg_projectId, filter: arg_filter, pageToken: arg_pageToken, page
Size: arg_pageSize).then(unittest.expectAsync(((api.ListBuildsResponse response)
{ |
1333 checkListBuildsResponse(response); | 1363 checkListBuildsResponse(response); |
1334 }))); | 1364 }))); |
1335 }); | 1365 }); |
1336 | 1366 |
1337 }); | 1367 }); |
1338 | 1368 |
1339 | 1369 |
1340 unittest.group("resource-ProjectsTriggersResourceApi", () { | 1370 unittest.group("resource-ProjectsTriggersResourceApi", () { |
1341 unittest.test("method--create", () { | 1371 unittest.test("method--create", () { |
1342 | 1372 |
(...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1611 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) { |
1612 checkBuildTrigger(response); | 1642 checkBuildTrigger(response); |
1613 }))); | 1643 }))); |
1614 }); | 1644 }); |
1615 | 1645 |
1616 }); | 1646 }); |
1617 | 1647 |
1618 | 1648 |
1619 } | 1649 } |
1620 | 1650 |
OLD | NEW |