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:test/test.dart' as unittest; | 10 import 'package:test/test.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<core.String, core.String> headers, core.String bod
y) { | 49 core.int status, core.Map<core.String, core.String> headers, core.String bod
y) { |
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 buildUnnamed1402() { | 54 buildUnnamed1419() { |
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 checkUnnamed1402(core.List<core.String> o) { | 61 checkUnnamed1419(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 buildUnnamed1403() { | 67 buildUnnamed1420() { |
68 var o = new core.List<api.Secret>(); | 68 var o = new core.List<api.Secret>(); |
69 o.add(buildSecret()); | 69 o.add(buildSecret()); |
70 o.add(buildSecret()); | 70 o.add(buildSecret()); |
71 return o; | 71 return o; |
72 } | 72 } |
73 | 73 |
74 checkUnnamed1403(core.List<api.Secret> o) { | 74 checkUnnamed1420(core.List<api.Secret> o) { |
75 unittest.expect(o, unittest.hasLength(2)); | 75 unittest.expect(o, unittest.hasLength(2)); |
76 checkSecret(o[0]); | 76 checkSecret(o[0]); |
77 checkSecret(o[1]); | 77 checkSecret(o[1]); |
78 } | 78 } |
79 | 79 |
80 buildUnnamed1404() { | 80 buildUnnamed1421() { |
81 var o = new core.List<api.BuildStep>(); | 81 var o = new core.List<api.BuildStep>(); |
82 o.add(buildBuildStep()); | 82 o.add(buildBuildStep()); |
83 o.add(buildBuildStep()); | 83 o.add(buildBuildStep()); |
84 return o; | 84 return o; |
85 } | 85 } |
86 | 86 |
87 checkUnnamed1404(core.List<api.BuildStep> o) { | 87 checkUnnamed1421(core.List<api.BuildStep> o) { |
88 unittest.expect(o, unittest.hasLength(2)); | 88 unittest.expect(o, unittest.hasLength(2)); |
89 checkBuildStep(o[0]); | 89 checkBuildStep(o[0]); |
90 checkBuildStep(o[1]); | 90 checkBuildStep(o[1]); |
91 } | 91 } |
92 | 92 |
93 buildUnnamed1405() { | 93 buildUnnamed1422() { |
94 var o = new core.Map<core.String, core.String>(); | 94 var o = new core.Map<core.String, core.String>(); |
95 o["x"] = "foo"; | 95 o["x"] = "foo"; |
96 o["y"] = "foo"; | 96 o["y"] = "foo"; |
97 return o; | 97 return o; |
98 } | 98 } |
99 | 99 |
100 checkUnnamed1405(core.Map<core.String, core.String> o) { | 100 checkUnnamed1422(core.Map<core.String, core.String> o) { |
101 unittest.expect(o, unittest.hasLength(2)); | 101 unittest.expect(o, unittest.hasLength(2)); |
102 unittest.expect(o["x"], unittest.equals('foo')); | 102 unittest.expect(o["x"], unittest.equals('foo')); |
103 unittest.expect(o["y"], unittest.equals('foo')); | 103 unittest.expect(o["y"], unittest.equals('foo')); |
104 } | 104 } |
105 | 105 |
106 buildUnnamed1406() { | 106 buildUnnamed1423() { |
107 var o = new core.List<core.String>(); | 107 var o = new core.List<core.String>(); |
108 o.add("foo"); | 108 o.add("foo"); |
109 o.add("foo"); | 109 o.add("foo"); |
110 return o; | 110 return o; |
111 } | 111 } |
112 | 112 |
113 checkUnnamed1406(core.List<core.String> o) { | 113 checkUnnamed1423(core.List<core.String> o) { |
114 unittest.expect(o, unittest.hasLength(2)); | 114 unittest.expect(o, unittest.hasLength(2)); |
115 unittest.expect(o[0], unittest.equals('foo')); | 115 unittest.expect(o[0], unittest.equals('foo')); |
116 unittest.expect(o[1], unittest.equals('foo')); | 116 unittest.expect(o[1], unittest.equals('foo')); |
117 } | 117 } |
118 | 118 |
119 core.int buildCounterBuild = 0; | 119 core.int buildCounterBuild = 0; |
120 buildBuild() { | 120 buildBuild() { |
121 var o = new api.Build(); | 121 var o = new api.Build(); |
122 buildCounterBuild++; | 122 buildCounterBuild++; |
123 if (buildCounterBuild < 3) { | 123 if (buildCounterBuild < 3) { |
124 o.buildTriggerId = "foo"; | 124 o.buildTriggerId = "foo"; |
125 o.createTime = "foo"; | 125 o.createTime = "foo"; |
126 o.finishTime = "foo"; | 126 o.finishTime = "foo"; |
127 o.id = "foo"; | 127 o.id = "foo"; |
128 o.images = buildUnnamed1402(); | 128 o.images = buildUnnamed1419(); |
129 o.logUrl = "foo"; | 129 o.logUrl = "foo"; |
130 o.logsBucket = "foo"; | 130 o.logsBucket = "foo"; |
131 o.options = buildBuildOptions(); | 131 o.options = buildBuildOptions(); |
132 o.projectId = "foo"; | 132 o.projectId = "foo"; |
133 o.results = buildResults(); | 133 o.results = buildResults(); |
134 o.secrets = buildUnnamed1403(); | 134 o.secrets = buildUnnamed1420(); |
135 o.source = buildSource(); | 135 o.source = buildSource(); |
136 o.sourceProvenance = buildSourceProvenance(); | 136 o.sourceProvenance = buildSourceProvenance(); |
137 o.startTime = "foo"; | 137 o.startTime = "foo"; |
138 o.status = "foo"; | 138 o.status = "foo"; |
139 o.statusDetail = "foo"; | 139 o.statusDetail = "foo"; |
140 o.steps = buildUnnamed1404(); | 140 o.steps = buildUnnamed1421(); |
141 o.substitutions = buildUnnamed1405(); | 141 o.substitutions = buildUnnamed1422(); |
142 o.tags = buildUnnamed1406(); | 142 o.tags = buildUnnamed1423(); |
143 o.timeout = "foo"; | 143 o.timeout = "foo"; |
144 } | 144 } |
145 buildCounterBuild--; | 145 buildCounterBuild--; |
146 return o; | 146 return o; |
147 } | 147 } |
148 | 148 |
149 checkBuild(api.Build o) { | 149 checkBuild(api.Build o) { |
150 buildCounterBuild++; | 150 buildCounterBuild++; |
151 if (buildCounterBuild < 3) { | 151 if (buildCounterBuild < 3) { |
152 unittest.expect(o.buildTriggerId, unittest.equals('foo')); | 152 unittest.expect(o.buildTriggerId, unittest.equals('foo')); |
153 unittest.expect(o.createTime, unittest.equals('foo')); | 153 unittest.expect(o.createTime, unittest.equals('foo')); |
154 unittest.expect(o.finishTime, unittest.equals('foo')); | 154 unittest.expect(o.finishTime, unittest.equals('foo')); |
155 unittest.expect(o.id, unittest.equals('foo')); | 155 unittest.expect(o.id, unittest.equals('foo')); |
156 checkUnnamed1402(o.images); | 156 checkUnnamed1419(o.images); |
157 unittest.expect(o.logUrl, unittest.equals('foo')); | 157 unittest.expect(o.logUrl, unittest.equals('foo')); |
158 unittest.expect(o.logsBucket, unittest.equals('foo')); | 158 unittest.expect(o.logsBucket, unittest.equals('foo')); |
159 checkBuildOptions(o.options); | 159 checkBuildOptions(o.options); |
160 unittest.expect(o.projectId, unittest.equals('foo')); | 160 unittest.expect(o.projectId, unittest.equals('foo')); |
161 checkResults(o.results); | 161 checkResults(o.results); |
162 checkUnnamed1403(o.secrets); | 162 checkUnnamed1420(o.secrets); |
163 checkSource(o.source); | 163 checkSource(o.source); |
164 checkSourceProvenance(o.sourceProvenance); | 164 checkSourceProvenance(o.sourceProvenance); |
165 unittest.expect(o.startTime, unittest.equals('foo')); | 165 unittest.expect(o.startTime, unittest.equals('foo')); |
166 unittest.expect(o.status, unittest.equals('foo')); | 166 unittest.expect(o.status, unittest.equals('foo')); |
167 unittest.expect(o.statusDetail, unittest.equals('foo')); | 167 unittest.expect(o.statusDetail, unittest.equals('foo')); |
168 checkUnnamed1404(o.steps); | 168 checkUnnamed1421(o.steps); |
169 checkUnnamed1405(o.substitutions); | 169 checkUnnamed1422(o.substitutions); |
170 checkUnnamed1406(o.tags); | 170 checkUnnamed1423(o.tags); |
171 unittest.expect(o.timeout, unittest.equals('foo')); | 171 unittest.expect(o.timeout, unittest.equals('foo')); |
172 } | 172 } |
173 buildCounterBuild--; | 173 buildCounterBuild--; |
174 } | 174 } |
175 | 175 |
176 core.int buildCounterBuildOperationMetadata = 0; | 176 core.int buildCounterBuildOperationMetadata = 0; |
177 buildBuildOperationMetadata() { | 177 buildBuildOperationMetadata() { |
178 var o = new api.BuildOperationMetadata(); | 178 var o = new api.BuildOperationMetadata(); |
179 buildCounterBuildOperationMetadata++; | 179 buildCounterBuildOperationMetadata++; |
180 if (buildCounterBuildOperationMetadata < 3) { | 180 if (buildCounterBuildOperationMetadata < 3) { |
181 o.build = buildBuild(); | 181 o.build = buildBuild(); |
182 } | 182 } |
183 buildCounterBuildOperationMetadata--; | 183 buildCounterBuildOperationMetadata--; |
184 return o; | 184 return o; |
185 } | 185 } |
186 | 186 |
187 checkBuildOperationMetadata(api.BuildOperationMetadata o) { | 187 checkBuildOperationMetadata(api.BuildOperationMetadata o) { |
188 buildCounterBuildOperationMetadata++; | 188 buildCounterBuildOperationMetadata++; |
189 if (buildCounterBuildOperationMetadata < 3) { | 189 if (buildCounterBuildOperationMetadata < 3) { |
190 checkBuild(o.build); | 190 checkBuild(o.build); |
191 } | 191 } |
192 buildCounterBuildOperationMetadata--; | 192 buildCounterBuildOperationMetadata--; |
193 } | 193 } |
194 | 194 |
195 buildUnnamed1407() { | 195 buildUnnamed1424() { |
196 var o = new core.List<core.String>(); | 196 var o = new core.List<core.String>(); |
197 o.add("foo"); | 197 o.add("foo"); |
198 o.add("foo"); | 198 o.add("foo"); |
199 return o; | 199 return o; |
200 } | 200 } |
201 | 201 |
202 checkUnnamed1407(core.List<core.String> o) { | 202 checkUnnamed1424(core.List<core.String> o) { |
203 unittest.expect(o, unittest.hasLength(2)); | 203 unittest.expect(o, unittest.hasLength(2)); |
204 unittest.expect(o[0], unittest.equals('foo')); | 204 unittest.expect(o[0], unittest.equals('foo')); |
205 unittest.expect(o[1], unittest.equals('foo')); | 205 unittest.expect(o[1], unittest.equals('foo')); |
206 } | 206 } |
207 | 207 |
208 core.int buildCounterBuildOptions = 0; | 208 core.int buildCounterBuildOptions = 0; |
209 buildBuildOptions() { | 209 buildBuildOptions() { |
210 var o = new api.BuildOptions(); | 210 var o = new api.BuildOptions(); |
211 buildCounterBuildOptions++; | 211 buildCounterBuildOptions++; |
212 if (buildCounterBuildOptions < 3) { | 212 if (buildCounterBuildOptions < 3) { |
213 o.requestedVerifyOption = "foo"; | 213 o.requestedVerifyOption = "foo"; |
214 o.sourceProvenanceHash = buildUnnamed1407(); | 214 o.sourceProvenanceHash = buildUnnamed1424(); |
215 o.substitutionOption = "foo"; | 215 o.substitutionOption = "foo"; |
216 } | 216 } |
217 buildCounterBuildOptions--; | 217 buildCounterBuildOptions--; |
218 return o; | 218 return o; |
219 } | 219 } |
220 | 220 |
221 checkBuildOptions(api.BuildOptions o) { | 221 checkBuildOptions(api.BuildOptions o) { |
222 buildCounterBuildOptions++; | 222 buildCounterBuildOptions++; |
223 if (buildCounterBuildOptions < 3) { | 223 if (buildCounterBuildOptions < 3) { |
224 unittest.expect(o.requestedVerifyOption, unittest.equals('foo')); | 224 unittest.expect(o.requestedVerifyOption, unittest.equals('foo')); |
225 checkUnnamed1407(o.sourceProvenanceHash); | 225 checkUnnamed1424(o.sourceProvenanceHash); |
226 unittest.expect(o.substitutionOption, unittest.equals('foo')); | 226 unittest.expect(o.substitutionOption, unittest.equals('foo')); |
227 } | 227 } |
228 buildCounterBuildOptions--; | 228 buildCounterBuildOptions--; |
229 } | 229 } |
230 | 230 |
231 buildUnnamed1408() { | 231 buildUnnamed1425() { |
232 var o = new core.List<core.String>(); | 232 var o = new core.List<core.String>(); |
233 o.add("foo"); | 233 o.add("foo"); |
234 o.add("foo"); | 234 o.add("foo"); |
235 return o; | 235 return o; |
236 } | 236 } |
237 | 237 |
238 checkUnnamed1408(core.List<core.String> o) { | 238 checkUnnamed1425(core.List<core.String> o) { |
239 unittest.expect(o, unittest.hasLength(2)); | 239 unittest.expect(o, unittest.hasLength(2)); |
240 unittest.expect(o[0], unittest.equals('foo')); | 240 unittest.expect(o[0], unittest.equals('foo')); |
241 unittest.expect(o[1], unittest.equals('foo')); | 241 unittest.expect(o[1], unittest.equals('foo')); |
242 } | 242 } |
243 | 243 |
244 buildUnnamed1409() { | 244 buildUnnamed1426() { |
245 var o = new core.List<core.String>(); | 245 var o = new core.List<core.String>(); |
246 o.add("foo"); | 246 o.add("foo"); |
247 o.add("foo"); | 247 o.add("foo"); |
248 return o; | 248 return o; |
249 } | 249 } |
250 | 250 |
251 checkUnnamed1409(core.List<core.String> o) { | 251 checkUnnamed1426(core.List<core.String> o) { |
252 unittest.expect(o, unittest.hasLength(2)); | 252 unittest.expect(o, unittest.hasLength(2)); |
253 unittest.expect(o[0], unittest.equals('foo')); | 253 unittest.expect(o[0], unittest.equals('foo')); |
254 unittest.expect(o[1], unittest.equals('foo')); | 254 unittest.expect(o[1], unittest.equals('foo')); |
255 } | 255 } |
256 | 256 |
257 buildUnnamed1410() { | 257 buildUnnamed1427() { |
258 var o = new core.List<core.String>(); | 258 var o = new core.List<core.String>(); |
259 o.add("foo"); | 259 o.add("foo"); |
260 o.add("foo"); | 260 o.add("foo"); |
261 return o; | 261 return o; |
262 } | 262 } |
263 | 263 |
264 checkUnnamed1410(core.List<core.String> o) { | 264 checkUnnamed1427(core.List<core.String> o) { |
265 unittest.expect(o, unittest.hasLength(2)); | 265 unittest.expect(o, unittest.hasLength(2)); |
266 unittest.expect(o[0], unittest.equals('foo')); | 266 unittest.expect(o[0], unittest.equals('foo')); |
267 unittest.expect(o[1], unittest.equals('foo')); | 267 unittest.expect(o[1], unittest.equals('foo')); |
268 } | 268 } |
269 | 269 |
270 buildUnnamed1411() { | 270 buildUnnamed1428() { |
271 var o = new core.List<api.Volume>(); | 271 var o = new core.List<api.Volume>(); |
272 o.add(buildVolume()); | 272 o.add(buildVolume()); |
273 o.add(buildVolume()); | 273 o.add(buildVolume()); |
274 return o; | 274 return o; |
275 } | 275 } |
276 | 276 |
277 checkUnnamed1411(core.List<api.Volume> o) { | 277 checkUnnamed1428(core.List<api.Volume> o) { |
278 unittest.expect(o, unittest.hasLength(2)); | 278 unittest.expect(o, unittest.hasLength(2)); |
279 checkVolume(o[0]); | 279 checkVolume(o[0]); |
280 checkVolume(o[1]); | 280 checkVolume(o[1]); |
281 } | 281 } |
282 | 282 |
283 buildUnnamed1412() { | 283 buildUnnamed1429() { |
284 var o = new core.List<core.String>(); | 284 var o = new core.List<core.String>(); |
285 o.add("foo"); | 285 o.add("foo"); |
286 o.add("foo"); | 286 o.add("foo"); |
287 return o; | 287 return o; |
288 } | 288 } |
289 | 289 |
290 checkUnnamed1412(core.List<core.String> o) { | 290 checkUnnamed1429(core.List<core.String> o) { |
291 unittest.expect(o, unittest.hasLength(2)); | 291 unittest.expect(o, unittest.hasLength(2)); |
292 unittest.expect(o[0], unittest.equals('foo')); | 292 unittest.expect(o[0], unittest.equals('foo')); |
293 unittest.expect(o[1], unittest.equals('foo')); | 293 unittest.expect(o[1], unittest.equals('foo')); |
294 } | 294 } |
295 | 295 |
296 core.int buildCounterBuildStep = 0; | 296 core.int buildCounterBuildStep = 0; |
297 buildBuildStep() { | 297 buildBuildStep() { |
298 var o = new api.BuildStep(); | 298 var o = new api.BuildStep(); |
299 buildCounterBuildStep++; | 299 buildCounterBuildStep++; |
300 if (buildCounterBuildStep < 3) { | 300 if (buildCounterBuildStep < 3) { |
301 o.args = buildUnnamed1408(); | 301 o.args = buildUnnamed1425(); |
302 o.dir = "foo"; | 302 o.dir = "foo"; |
303 o.entrypoint = "foo"; | 303 o.entrypoint = "foo"; |
304 o.env = buildUnnamed1409(); | 304 o.env = buildUnnamed1426(); |
305 o.id = "foo"; | 305 o.id = "foo"; |
306 o.name = "foo"; | 306 o.name = "foo"; |
307 o.secretEnv = buildUnnamed1410(); | 307 o.secretEnv = buildUnnamed1427(); |
308 o.volumes = buildUnnamed1411(); | 308 o.volumes = buildUnnamed1428(); |
309 o.waitFor = buildUnnamed1412(); | 309 o.waitFor = buildUnnamed1429(); |
310 } | 310 } |
311 buildCounterBuildStep--; | 311 buildCounterBuildStep--; |
312 return o; | 312 return o; |
313 } | 313 } |
314 | 314 |
315 checkBuildStep(api.BuildStep o) { | 315 checkBuildStep(api.BuildStep o) { |
316 buildCounterBuildStep++; | 316 buildCounterBuildStep++; |
317 if (buildCounterBuildStep < 3) { | 317 if (buildCounterBuildStep < 3) { |
318 checkUnnamed1408(o.args); | 318 checkUnnamed1425(o.args); |
319 unittest.expect(o.dir, unittest.equals('foo')); | 319 unittest.expect(o.dir, unittest.equals('foo')); |
320 unittest.expect(o.entrypoint, unittest.equals('foo')); | 320 unittest.expect(o.entrypoint, unittest.equals('foo')); |
321 checkUnnamed1409(o.env); | 321 checkUnnamed1426(o.env); |
322 unittest.expect(o.id, unittest.equals('foo')); | 322 unittest.expect(o.id, unittest.equals('foo')); |
323 unittest.expect(o.name, unittest.equals('foo')); | 323 unittest.expect(o.name, unittest.equals('foo')); |
324 checkUnnamed1410(o.secretEnv); | 324 checkUnnamed1427(o.secretEnv); |
325 checkUnnamed1411(o.volumes); | 325 checkUnnamed1428(o.volumes); |
326 checkUnnamed1412(o.waitFor); | 326 checkUnnamed1429(o.waitFor); |
327 } | 327 } |
328 buildCounterBuildStep--; | 328 buildCounterBuildStep--; |
329 } | 329 } |
330 | 330 |
331 buildUnnamed1413() { | 331 buildUnnamed1430() { |
332 var o = new core.Map<core.String, core.String>(); | 332 var o = new core.Map<core.String, core.String>(); |
333 o["x"] = "foo"; | 333 o["x"] = "foo"; |
334 o["y"] = "foo"; | 334 o["y"] = "foo"; |
335 return o; | 335 return o; |
336 } | 336 } |
337 | 337 |
338 checkUnnamed1413(core.Map<core.String, core.String> o) { | 338 checkUnnamed1430(core.Map<core.String, core.String> o) { |
339 unittest.expect(o, unittest.hasLength(2)); | 339 unittest.expect(o, unittest.hasLength(2)); |
340 unittest.expect(o["x"], unittest.equals('foo')); | 340 unittest.expect(o["x"], unittest.equals('foo')); |
341 unittest.expect(o["y"], unittest.equals('foo')); | 341 unittest.expect(o["y"], unittest.equals('foo')); |
342 } | 342 } |
343 | 343 |
344 core.int buildCounterBuildTrigger = 0; | 344 core.int buildCounterBuildTrigger = 0; |
345 buildBuildTrigger() { | 345 buildBuildTrigger() { |
346 var o = new api.BuildTrigger(); | 346 var o = new api.BuildTrigger(); |
347 buildCounterBuildTrigger++; | 347 buildCounterBuildTrigger++; |
348 if (buildCounterBuildTrigger < 3) { | 348 if (buildCounterBuildTrigger < 3) { |
349 o.build = buildBuild(); | 349 o.build = buildBuild(); |
350 o.createTime = "foo"; | 350 o.createTime = "foo"; |
351 o.description = "foo"; | 351 o.description = "foo"; |
352 o.disabled = true; | 352 o.disabled = true; |
353 o.filename = "foo"; | 353 o.filename = "foo"; |
354 o.id = "foo"; | 354 o.id = "foo"; |
355 o.substitutions = buildUnnamed1413(); | 355 o.substitutions = buildUnnamed1430(); |
356 o.triggerTemplate = buildRepoSource(); | 356 o.triggerTemplate = buildRepoSource(); |
357 } | 357 } |
358 buildCounterBuildTrigger--; | 358 buildCounterBuildTrigger--; |
359 return o; | 359 return o; |
360 } | 360 } |
361 | 361 |
362 checkBuildTrigger(api.BuildTrigger o) { | 362 checkBuildTrigger(api.BuildTrigger o) { |
363 buildCounterBuildTrigger++; | 363 buildCounterBuildTrigger++; |
364 if (buildCounterBuildTrigger < 3) { | 364 if (buildCounterBuildTrigger < 3) { |
365 checkBuild(o.build); | 365 checkBuild(o.build); |
366 unittest.expect(o.createTime, unittest.equals('foo')); | 366 unittest.expect(o.createTime, unittest.equals('foo')); |
367 unittest.expect(o.description, unittest.equals('foo')); | 367 unittest.expect(o.description, unittest.equals('foo')); |
368 unittest.expect(o.disabled, unittest.isTrue); | 368 unittest.expect(o.disabled, unittest.isTrue); |
369 unittest.expect(o.filename, unittest.equals('foo')); | 369 unittest.expect(o.filename, unittest.equals('foo')); |
370 unittest.expect(o.id, unittest.equals('foo')); | 370 unittest.expect(o.id, unittest.equals('foo')); |
371 checkUnnamed1413(o.substitutions); | 371 checkUnnamed1430(o.substitutions); |
372 checkRepoSource(o.triggerTemplate); | 372 checkRepoSource(o.triggerTemplate); |
373 } | 373 } |
374 buildCounterBuildTrigger--; | 374 buildCounterBuildTrigger--; |
375 } | 375 } |
376 | 376 |
377 core.int buildCounterBuiltImage = 0; | 377 core.int buildCounterBuiltImage = 0; |
378 buildBuiltImage() { | 378 buildBuiltImage() { |
379 var o = new api.BuiltImage(); | 379 var o = new api.BuiltImage(); |
380 buildCounterBuiltImage++; | 380 buildCounterBuiltImage++; |
381 if (buildCounterBuiltImage < 3) { | 381 if (buildCounterBuiltImage < 3) { |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
439 return o; | 439 return o; |
440 } | 440 } |
441 | 441 |
442 checkEmpty(api.Empty o) { | 442 checkEmpty(api.Empty o) { |
443 buildCounterEmpty++; | 443 buildCounterEmpty++; |
444 if (buildCounterEmpty < 3) { | 444 if (buildCounterEmpty < 3) { |
445 } | 445 } |
446 buildCounterEmpty--; | 446 buildCounterEmpty--; |
447 } | 447 } |
448 | 448 |
449 buildUnnamed1414() { | 449 buildUnnamed1431() { |
450 var o = new core.List<api.Hash>(); | 450 var o = new core.List<api.Hash>(); |
451 o.add(buildHash()); | 451 o.add(buildHash()); |
452 o.add(buildHash()); | 452 o.add(buildHash()); |
453 return o; | 453 return o; |
454 } | 454 } |
455 | 455 |
456 checkUnnamed1414(core.List<api.Hash> o) { | 456 checkUnnamed1431(core.List<api.Hash> o) { |
457 unittest.expect(o, unittest.hasLength(2)); | 457 unittest.expect(o, unittest.hasLength(2)); |
458 checkHash(o[0]); | 458 checkHash(o[0]); |
459 checkHash(o[1]); | 459 checkHash(o[1]); |
460 } | 460 } |
461 | 461 |
462 core.int buildCounterFileHashes = 0; | 462 core.int buildCounterFileHashes = 0; |
463 buildFileHashes() { | 463 buildFileHashes() { |
464 var o = new api.FileHashes(); | 464 var o = new api.FileHashes(); |
465 buildCounterFileHashes++; | 465 buildCounterFileHashes++; |
466 if (buildCounterFileHashes < 3) { | 466 if (buildCounterFileHashes < 3) { |
467 o.fileHash = buildUnnamed1414(); | 467 o.fileHash = buildUnnamed1431(); |
468 } | 468 } |
469 buildCounterFileHashes--; | 469 buildCounterFileHashes--; |
470 return o; | 470 return o; |
471 } | 471 } |
472 | 472 |
473 checkFileHashes(api.FileHashes o) { | 473 checkFileHashes(api.FileHashes o) { |
474 buildCounterFileHashes++; | 474 buildCounterFileHashes++; |
475 if (buildCounterFileHashes < 3) { | 475 if (buildCounterFileHashes < 3) { |
476 checkUnnamed1414(o.fileHash); | 476 checkUnnamed1431(o.fileHash); |
477 } | 477 } |
478 buildCounterFileHashes--; | 478 buildCounterFileHashes--; |
479 } | 479 } |
480 | 480 |
481 core.int buildCounterHash = 0; | 481 core.int buildCounterHash = 0; |
482 buildHash() { | 482 buildHash() { |
483 var o = new api.Hash(); | 483 var o = new api.Hash(); |
484 buildCounterHash++; | 484 buildCounterHash++; |
485 if (buildCounterHash < 3) { | 485 if (buildCounterHash < 3) { |
486 o.type = "foo"; | 486 o.type = "foo"; |
487 o.value = "foo"; | 487 o.value = "foo"; |
488 } | 488 } |
489 buildCounterHash--; | 489 buildCounterHash--; |
490 return o; | 490 return o; |
491 } | 491 } |
492 | 492 |
493 checkHash(api.Hash o) { | 493 checkHash(api.Hash o) { |
494 buildCounterHash++; | 494 buildCounterHash++; |
495 if (buildCounterHash < 3) { | 495 if (buildCounterHash < 3) { |
496 unittest.expect(o.type, unittest.equals('foo')); | 496 unittest.expect(o.type, unittest.equals('foo')); |
497 unittest.expect(o.value, unittest.equals('foo')); | 497 unittest.expect(o.value, unittest.equals('foo')); |
498 } | 498 } |
499 buildCounterHash--; | 499 buildCounterHash--; |
500 } | 500 } |
501 | 501 |
502 buildUnnamed1415() { | 502 buildUnnamed1432() { |
503 var o = new core.List<api.BuildTrigger>(); | 503 var o = new core.List<api.BuildTrigger>(); |
504 o.add(buildBuildTrigger()); | 504 o.add(buildBuildTrigger()); |
505 o.add(buildBuildTrigger()); | 505 o.add(buildBuildTrigger()); |
506 return o; | 506 return o; |
507 } | 507 } |
508 | 508 |
509 checkUnnamed1415(core.List<api.BuildTrigger> o) { | 509 checkUnnamed1432(core.List<api.BuildTrigger> o) { |
510 unittest.expect(o, unittest.hasLength(2)); | 510 unittest.expect(o, unittest.hasLength(2)); |
511 checkBuildTrigger(o[0]); | 511 checkBuildTrigger(o[0]); |
512 checkBuildTrigger(o[1]); | 512 checkBuildTrigger(o[1]); |
513 } | 513 } |
514 | 514 |
515 core.int buildCounterListBuildTriggersResponse = 0; | 515 core.int buildCounterListBuildTriggersResponse = 0; |
516 buildListBuildTriggersResponse() { | 516 buildListBuildTriggersResponse() { |
517 var o = new api.ListBuildTriggersResponse(); | 517 var o = new api.ListBuildTriggersResponse(); |
518 buildCounterListBuildTriggersResponse++; | 518 buildCounterListBuildTriggersResponse++; |
519 if (buildCounterListBuildTriggersResponse < 3) { | 519 if (buildCounterListBuildTriggersResponse < 3) { |
520 o.triggers = buildUnnamed1415(); | 520 o.triggers = buildUnnamed1432(); |
521 } | 521 } |
522 buildCounterListBuildTriggersResponse--; | 522 buildCounterListBuildTriggersResponse--; |
523 return o; | 523 return o; |
524 } | 524 } |
525 | 525 |
526 checkListBuildTriggersResponse(api.ListBuildTriggersResponse o) { | 526 checkListBuildTriggersResponse(api.ListBuildTriggersResponse o) { |
527 buildCounterListBuildTriggersResponse++; | 527 buildCounterListBuildTriggersResponse++; |
528 if (buildCounterListBuildTriggersResponse < 3) { | 528 if (buildCounterListBuildTriggersResponse < 3) { |
529 checkUnnamed1415(o.triggers); | 529 checkUnnamed1432(o.triggers); |
530 } | 530 } |
531 buildCounterListBuildTriggersResponse--; | 531 buildCounterListBuildTriggersResponse--; |
532 } | 532 } |
533 | 533 |
534 buildUnnamed1416() { | 534 buildUnnamed1433() { |
535 var o = new core.List<api.Build>(); | 535 var o = new core.List<api.Build>(); |
536 o.add(buildBuild()); | 536 o.add(buildBuild()); |
537 o.add(buildBuild()); | 537 o.add(buildBuild()); |
538 return o; | 538 return o; |
539 } | 539 } |
540 | 540 |
541 checkUnnamed1416(core.List<api.Build> o) { | 541 checkUnnamed1433(core.List<api.Build> o) { |
542 unittest.expect(o, unittest.hasLength(2)); | 542 unittest.expect(o, unittest.hasLength(2)); |
543 checkBuild(o[0]); | 543 checkBuild(o[0]); |
544 checkBuild(o[1]); | 544 checkBuild(o[1]); |
545 } | 545 } |
546 | 546 |
547 core.int buildCounterListBuildsResponse = 0; | 547 core.int buildCounterListBuildsResponse = 0; |
548 buildListBuildsResponse() { | 548 buildListBuildsResponse() { |
549 var o = new api.ListBuildsResponse(); | 549 var o = new api.ListBuildsResponse(); |
550 buildCounterListBuildsResponse++; | 550 buildCounterListBuildsResponse++; |
551 if (buildCounterListBuildsResponse < 3) { | 551 if (buildCounterListBuildsResponse < 3) { |
552 o.builds = buildUnnamed1416(); | 552 o.builds = buildUnnamed1433(); |
553 o.nextPageToken = "foo"; | 553 o.nextPageToken = "foo"; |
554 } | 554 } |
555 buildCounterListBuildsResponse--; | 555 buildCounterListBuildsResponse--; |
556 return o; | 556 return o; |
557 } | 557 } |
558 | 558 |
559 checkListBuildsResponse(api.ListBuildsResponse o) { | 559 checkListBuildsResponse(api.ListBuildsResponse o) { |
560 buildCounterListBuildsResponse++; | 560 buildCounterListBuildsResponse++; |
561 if (buildCounterListBuildsResponse < 3) { | 561 if (buildCounterListBuildsResponse < 3) { |
562 checkUnnamed1416(o.builds); | 562 checkUnnamed1433(o.builds); |
563 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 563 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
564 } | 564 } |
565 buildCounterListBuildsResponse--; | 565 buildCounterListBuildsResponse--; |
566 } | 566 } |
567 | 567 |
568 buildUnnamed1417() { | 568 buildUnnamed1434() { |
569 var o = new core.List<api.Operation>(); | 569 var o = new core.List<api.Operation>(); |
570 o.add(buildOperation()); | 570 o.add(buildOperation()); |
571 o.add(buildOperation()); | 571 o.add(buildOperation()); |
572 return o; | 572 return o; |
573 } | 573 } |
574 | 574 |
575 checkUnnamed1417(core.List<api.Operation> o) { | 575 checkUnnamed1434(core.List<api.Operation> o) { |
576 unittest.expect(o, unittest.hasLength(2)); | 576 unittest.expect(o, unittest.hasLength(2)); |
577 checkOperation(o[0]); | 577 checkOperation(o[0]); |
578 checkOperation(o[1]); | 578 checkOperation(o[1]); |
579 } | 579 } |
580 | 580 |
581 core.int buildCounterListOperationsResponse = 0; | 581 core.int buildCounterListOperationsResponse = 0; |
582 buildListOperationsResponse() { | 582 buildListOperationsResponse() { |
583 var o = new api.ListOperationsResponse(); | 583 var o = new api.ListOperationsResponse(); |
584 buildCounterListOperationsResponse++; | 584 buildCounterListOperationsResponse++; |
585 if (buildCounterListOperationsResponse < 3) { | 585 if (buildCounterListOperationsResponse < 3) { |
586 o.nextPageToken = "foo"; | 586 o.nextPageToken = "foo"; |
587 o.operations = buildUnnamed1417(); | 587 o.operations = buildUnnamed1434(); |
588 } | 588 } |
589 buildCounterListOperationsResponse--; | 589 buildCounterListOperationsResponse--; |
590 return o; | 590 return o; |
591 } | 591 } |
592 | 592 |
593 checkListOperationsResponse(api.ListOperationsResponse o) { | 593 checkListOperationsResponse(api.ListOperationsResponse o) { |
594 buildCounterListOperationsResponse++; | 594 buildCounterListOperationsResponse++; |
595 if (buildCounterListOperationsResponse < 3) { | 595 if (buildCounterListOperationsResponse < 3) { |
596 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 596 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
597 checkUnnamed1417(o.operations); | 597 checkUnnamed1434(o.operations); |
598 } | 598 } |
599 buildCounterListOperationsResponse--; | 599 buildCounterListOperationsResponse--; |
600 } | 600 } |
601 | 601 |
602 buildUnnamed1418() { | 602 buildUnnamed1435() { |
603 var o = new core.Map<core.String, core.Object>(); | 603 var o = new core.Map<core.String, core.Object>(); |
604 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 604 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; |
605 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 605 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; |
606 return o; | 606 return o; |
607 } | 607 } |
608 | 608 |
609 checkUnnamed1418(core.Map<core.String, core.Object> o) { | 609 checkUnnamed1435(core.Map<core.String, core.Object> o) { |
610 unittest.expect(o, unittest.hasLength(2)); | 610 unittest.expect(o, unittest.hasLength(2)); |
611 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')); | 611 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')); |
612 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')); | 612 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')); |
613 } | 613 } |
614 | 614 |
615 buildUnnamed1419() { | 615 buildUnnamed1436() { |
616 var o = new core.Map<core.String, core.Object>(); | 616 var o = new core.Map<core.String, core.Object>(); |
617 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 617 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; |
618 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 618 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; |
619 return o; | 619 return o; |
620 } | 620 } |
621 | 621 |
622 checkUnnamed1419(core.Map<core.String, core.Object> o) { | 622 checkUnnamed1436(core.Map<core.String, core.Object> o) { |
623 unittest.expect(o, unittest.hasLength(2)); | 623 unittest.expect(o, unittest.hasLength(2)); |
624 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')); | 624 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')); |
625 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')); | 625 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')); |
626 } | 626 } |
627 | 627 |
628 core.int buildCounterOperation = 0; | 628 core.int buildCounterOperation = 0; |
629 buildOperation() { | 629 buildOperation() { |
630 var o = new api.Operation(); | 630 var o = new api.Operation(); |
631 buildCounterOperation++; | 631 buildCounterOperation++; |
632 if (buildCounterOperation < 3) { | 632 if (buildCounterOperation < 3) { |
633 o.done = true; | 633 o.done = true; |
634 o.error = buildStatus(); | 634 o.error = buildStatus(); |
635 o.metadata = buildUnnamed1418(); | 635 o.metadata = buildUnnamed1435(); |
636 o.name = "foo"; | 636 o.name = "foo"; |
637 o.response = buildUnnamed1419(); | 637 o.response = buildUnnamed1436(); |
638 } | 638 } |
639 buildCounterOperation--; | 639 buildCounterOperation--; |
640 return o; | 640 return o; |
641 } | 641 } |
642 | 642 |
643 checkOperation(api.Operation o) { | 643 checkOperation(api.Operation o) { |
644 buildCounterOperation++; | 644 buildCounterOperation++; |
645 if (buildCounterOperation < 3) { | 645 if (buildCounterOperation < 3) { |
646 unittest.expect(o.done, unittest.isTrue); | 646 unittest.expect(o.done, unittest.isTrue); |
647 checkStatus(o.error); | 647 checkStatus(o.error); |
648 checkUnnamed1418(o.metadata); | 648 checkUnnamed1435(o.metadata); |
649 unittest.expect(o.name, unittest.equals('foo')); | 649 unittest.expect(o.name, unittest.equals('foo')); |
650 checkUnnamed1419(o.response); | 650 checkUnnamed1436(o.response); |
651 } | 651 } |
652 buildCounterOperation--; | 652 buildCounterOperation--; |
653 } | 653 } |
654 | 654 |
655 core.int buildCounterRepoSource = 0; | 655 core.int buildCounterRepoSource = 0; |
656 buildRepoSource() { | 656 buildRepoSource() { |
657 var o = new api.RepoSource(); | 657 var o = new api.RepoSource(); |
658 buildCounterRepoSource++; | 658 buildCounterRepoSource++; |
659 if (buildCounterRepoSource < 3) { | 659 if (buildCounterRepoSource < 3) { |
660 o.branchName = "foo"; | 660 o.branchName = "foo"; |
(...skipping 11 matching lines...) Expand all Loading... |
672 if (buildCounterRepoSource < 3) { | 672 if (buildCounterRepoSource < 3) { |
673 unittest.expect(o.branchName, unittest.equals('foo')); | 673 unittest.expect(o.branchName, unittest.equals('foo')); |
674 unittest.expect(o.commitSha, unittest.equals('foo')); | 674 unittest.expect(o.commitSha, unittest.equals('foo')); |
675 unittest.expect(o.projectId, unittest.equals('foo')); | 675 unittest.expect(o.projectId, unittest.equals('foo')); |
676 unittest.expect(o.repoName, unittest.equals('foo')); | 676 unittest.expect(o.repoName, unittest.equals('foo')); |
677 unittest.expect(o.tagName, unittest.equals('foo')); | 677 unittest.expect(o.tagName, unittest.equals('foo')); |
678 } | 678 } |
679 buildCounterRepoSource--; | 679 buildCounterRepoSource--; |
680 } | 680 } |
681 | 681 |
682 buildUnnamed1420() { | 682 buildUnnamed1437() { |
683 var o = new core.List<core.String>(); | 683 var o = new core.List<core.String>(); |
684 o.add("foo"); | 684 o.add("foo"); |
685 o.add("foo"); | 685 o.add("foo"); |
686 return o; | 686 return o; |
687 } | 687 } |
688 | 688 |
689 checkUnnamed1420(core.List<core.String> o) { | 689 checkUnnamed1437(core.List<core.String> o) { |
690 unittest.expect(o, unittest.hasLength(2)); | 690 unittest.expect(o, unittest.hasLength(2)); |
691 unittest.expect(o[0], unittest.equals('foo')); | 691 unittest.expect(o[0], unittest.equals('foo')); |
692 unittest.expect(o[1], unittest.equals('foo')); | 692 unittest.expect(o[1], unittest.equals('foo')); |
693 } | 693 } |
694 | 694 |
695 buildUnnamed1421() { | 695 buildUnnamed1438() { |
696 var o = new core.List<api.BuiltImage>(); | 696 var o = new core.List<api.BuiltImage>(); |
697 o.add(buildBuiltImage()); | 697 o.add(buildBuiltImage()); |
698 o.add(buildBuiltImage()); | 698 o.add(buildBuiltImage()); |
699 return o; | 699 return o; |
700 } | 700 } |
701 | 701 |
702 checkUnnamed1421(core.List<api.BuiltImage> o) { | 702 checkUnnamed1438(core.List<api.BuiltImage> o) { |
703 unittest.expect(o, unittest.hasLength(2)); | 703 unittest.expect(o, unittest.hasLength(2)); |
704 checkBuiltImage(o[0]); | 704 checkBuiltImage(o[0]); |
705 checkBuiltImage(o[1]); | 705 checkBuiltImage(o[1]); |
706 } | 706 } |
707 | 707 |
708 core.int buildCounterResults = 0; | 708 core.int buildCounterResults = 0; |
709 buildResults() { | 709 buildResults() { |
710 var o = new api.Results(); | 710 var o = new api.Results(); |
711 buildCounterResults++; | 711 buildCounterResults++; |
712 if (buildCounterResults < 3) { | 712 if (buildCounterResults < 3) { |
713 o.buildStepImages = buildUnnamed1420(); | 713 o.buildStepImages = buildUnnamed1437(); |
714 o.images = buildUnnamed1421(); | 714 o.images = buildUnnamed1438(); |
715 } | 715 } |
716 buildCounterResults--; | 716 buildCounterResults--; |
717 return o; | 717 return o; |
718 } | 718 } |
719 | 719 |
720 checkResults(api.Results o) { | 720 checkResults(api.Results o) { |
721 buildCounterResults++; | 721 buildCounterResults++; |
722 if (buildCounterResults < 3) { | 722 if (buildCounterResults < 3) { |
723 checkUnnamed1420(o.buildStepImages); | 723 checkUnnamed1437(o.buildStepImages); |
724 checkUnnamed1421(o.images); | 724 checkUnnamed1438(o.images); |
725 } | 725 } |
726 buildCounterResults--; | 726 buildCounterResults--; |
727 } | 727 } |
728 | 728 |
729 buildUnnamed1422() { | 729 buildUnnamed1439() { |
730 var o = new core.Map<core.String, core.String>(); | 730 var o = new core.Map<core.String, core.String>(); |
731 o["x"] = "foo"; | 731 o["x"] = "foo"; |
732 o["y"] = "foo"; | 732 o["y"] = "foo"; |
733 return o; | 733 return o; |
734 } | 734 } |
735 | 735 |
736 checkUnnamed1422(core.Map<core.String, core.String> o) { | 736 checkUnnamed1439(core.Map<core.String, core.String> o) { |
737 unittest.expect(o, unittest.hasLength(2)); | 737 unittest.expect(o, unittest.hasLength(2)); |
738 unittest.expect(o["x"], unittest.equals('foo')); | 738 unittest.expect(o["x"], unittest.equals('foo')); |
739 unittest.expect(o["y"], unittest.equals('foo')); | 739 unittest.expect(o["y"], unittest.equals('foo')); |
740 } | 740 } |
741 | 741 |
742 core.int buildCounterSecret = 0; | 742 core.int buildCounterSecret = 0; |
743 buildSecret() { | 743 buildSecret() { |
744 var o = new api.Secret(); | 744 var o = new api.Secret(); |
745 buildCounterSecret++; | 745 buildCounterSecret++; |
746 if (buildCounterSecret < 3) { | 746 if (buildCounterSecret < 3) { |
747 o.kmsKeyName = "foo"; | 747 o.kmsKeyName = "foo"; |
748 o.secretEnv = buildUnnamed1422(); | 748 o.secretEnv = buildUnnamed1439(); |
749 } | 749 } |
750 buildCounterSecret--; | 750 buildCounterSecret--; |
751 return o; | 751 return o; |
752 } | 752 } |
753 | 753 |
754 checkSecret(api.Secret o) { | 754 checkSecret(api.Secret o) { |
755 buildCounterSecret++; | 755 buildCounterSecret++; |
756 if (buildCounterSecret < 3) { | 756 if (buildCounterSecret < 3) { |
757 unittest.expect(o.kmsKeyName, unittest.equals('foo')); | 757 unittest.expect(o.kmsKeyName, unittest.equals('foo')); |
758 checkUnnamed1422(o.secretEnv); | 758 checkUnnamed1439(o.secretEnv); |
759 } | 759 } |
760 buildCounterSecret--; | 760 buildCounterSecret--; |
761 } | 761 } |
762 | 762 |
763 core.int buildCounterSource = 0; | 763 core.int buildCounterSource = 0; |
764 buildSource() { | 764 buildSource() { |
765 var o = new api.Source(); | 765 var o = new api.Source(); |
766 buildCounterSource++; | 766 buildCounterSource++; |
767 if (buildCounterSource < 3) { | 767 if (buildCounterSource < 3) { |
768 o.repoSource = buildRepoSource(); | 768 o.repoSource = buildRepoSource(); |
769 o.storageSource = buildStorageSource(); | 769 o.storageSource = buildStorageSource(); |
770 } | 770 } |
771 buildCounterSource--; | 771 buildCounterSource--; |
772 return o; | 772 return o; |
773 } | 773 } |
774 | 774 |
775 checkSource(api.Source o) { | 775 checkSource(api.Source o) { |
776 buildCounterSource++; | 776 buildCounterSource++; |
777 if (buildCounterSource < 3) { | 777 if (buildCounterSource < 3) { |
778 checkRepoSource(o.repoSource); | 778 checkRepoSource(o.repoSource); |
779 checkStorageSource(o.storageSource); | 779 checkStorageSource(o.storageSource); |
780 } | 780 } |
781 buildCounterSource--; | 781 buildCounterSource--; |
782 } | 782 } |
783 | 783 |
784 buildUnnamed1423() { | 784 buildUnnamed1440() { |
785 var o = new core.Map<core.String, api.FileHashes>(); | 785 var o = new core.Map<core.String, api.FileHashes>(); |
786 o["x"] = buildFileHashes(); | 786 o["x"] = buildFileHashes(); |
787 o["y"] = buildFileHashes(); | 787 o["y"] = buildFileHashes(); |
788 return o; | 788 return o; |
789 } | 789 } |
790 | 790 |
791 checkUnnamed1423(core.Map<core.String, api.FileHashes> o) { | 791 checkUnnamed1440(core.Map<core.String, api.FileHashes> o) { |
792 unittest.expect(o, unittest.hasLength(2)); | 792 unittest.expect(o, unittest.hasLength(2)); |
793 checkFileHashes(o["x"]); | 793 checkFileHashes(o["x"]); |
794 checkFileHashes(o["y"]); | 794 checkFileHashes(o["y"]); |
795 } | 795 } |
796 | 796 |
797 core.int buildCounterSourceProvenance = 0; | 797 core.int buildCounterSourceProvenance = 0; |
798 buildSourceProvenance() { | 798 buildSourceProvenance() { |
799 var o = new api.SourceProvenance(); | 799 var o = new api.SourceProvenance(); |
800 buildCounterSourceProvenance++; | 800 buildCounterSourceProvenance++; |
801 if (buildCounterSourceProvenance < 3) { | 801 if (buildCounterSourceProvenance < 3) { |
802 o.fileHashes = buildUnnamed1423(); | 802 o.fileHashes = buildUnnamed1440(); |
803 o.resolvedRepoSource = buildRepoSource(); | 803 o.resolvedRepoSource = buildRepoSource(); |
804 o.resolvedStorageSource = buildStorageSource(); | 804 o.resolvedStorageSource = buildStorageSource(); |
805 } | 805 } |
806 buildCounterSourceProvenance--; | 806 buildCounterSourceProvenance--; |
807 return o; | 807 return o; |
808 } | 808 } |
809 | 809 |
810 checkSourceProvenance(api.SourceProvenance o) { | 810 checkSourceProvenance(api.SourceProvenance o) { |
811 buildCounterSourceProvenance++; | 811 buildCounterSourceProvenance++; |
812 if (buildCounterSourceProvenance < 3) { | 812 if (buildCounterSourceProvenance < 3) { |
813 checkUnnamed1423(o.fileHashes); | 813 checkUnnamed1440(o.fileHashes); |
814 checkRepoSource(o.resolvedRepoSource); | 814 checkRepoSource(o.resolvedRepoSource); |
815 checkStorageSource(o.resolvedStorageSource); | 815 checkStorageSource(o.resolvedStorageSource); |
816 } | 816 } |
817 buildCounterSourceProvenance--; | 817 buildCounterSourceProvenance--; |
818 } | 818 } |
819 | 819 |
820 buildUnnamed1424() { | 820 buildUnnamed1441() { |
821 var o = new core.Map<core.String, core.Object>(); | 821 var o = new core.Map<core.String, core.Object>(); |
822 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 822 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; |
823 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 823 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; |
824 return o; | 824 return o; |
825 } | 825 } |
826 | 826 |
827 checkUnnamed1424(core.Map<core.String, core.Object> o) { | 827 checkUnnamed1441(core.Map<core.String, core.Object> o) { |
828 unittest.expect(o, unittest.hasLength(2)); | 828 unittest.expect(o, unittest.hasLength(2)); |
829 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')); | 829 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')); |
830 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')); | 830 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')); |
831 } | 831 } |
832 | 832 |
833 buildUnnamed1425() { | 833 buildUnnamed1442() { |
834 var o = new core.List<core.Map<core.String, core.Object>>(); | 834 var o = new core.List<core.Map<core.String, core.Object>>(); |
835 o.add(buildUnnamed1424()); | 835 o.add(buildUnnamed1441()); |
836 o.add(buildUnnamed1424()); | 836 o.add(buildUnnamed1441()); |
837 return o; | 837 return o; |
838 } | 838 } |
839 | 839 |
840 checkUnnamed1425(core.List<core.Map<core.String, core.Object>> o) { | 840 checkUnnamed1442(core.List<core.Map<core.String, core.Object>> o) { |
841 unittest.expect(o, unittest.hasLength(2)); | 841 unittest.expect(o, unittest.hasLength(2)); |
842 checkUnnamed1424(o[0]); | 842 checkUnnamed1441(o[0]); |
843 checkUnnamed1424(o[1]); | 843 checkUnnamed1441(o[1]); |
844 } | 844 } |
845 | 845 |
846 core.int buildCounterStatus = 0; | 846 core.int buildCounterStatus = 0; |
847 buildStatus() { | 847 buildStatus() { |
848 var o = new api.Status(); | 848 var o = new api.Status(); |
849 buildCounterStatus++; | 849 buildCounterStatus++; |
850 if (buildCounterStatus < 3) { | 850 if (buildCounterStatus < 3) { |
851 o.code = 42; | 851 o.code = 42; |
852 o.details = buildUnnamed1425(); | 852 o.details = buildUnnamed1442(); |
853 o.message = "foo"; | 853 o.message = "foo"; |
854 } | 854 } |
855 buildCounterStatus--; | 855 buildCounterStatus--; |
856 return o; | 856 return o; |
857 } | 857 } |
858 | 858 |
859 checkStatus(api.Status o) { | 859 checkStatus(api.Status o) { |
860 buildCounterStatus++; | 860 buildCounterStatus++; |
861 if (buildCounterStatus < 3) { | 861 if (buildCounterStatus < 3) { |
862 unittest.expect(o.code, unittest.equals(42)); | 862 unittest.expect(o.code, unittest.equals(42)); |
863 checkUnnamed1425(o.details); | 863 checkUnnamed1442(o.details); |
864 unittest.expect(o.message, unittest.equals('foo')); | 864 unittest.expect(o.message, unittest.equals('foo')); |
865 } | 865 } |
866 buildCounterStatus--; | 866 buildCounterStatus--; |
867 } | 867 } |
868 | 868 |
869 core.int buildCounterStorageSource = 0; | 869 core.int buildCounterStorageSource = 0; |
870 buildStorageSource() { | 870 buildStorageSource() { |
871 var o = new api.StorageSource(); | 871 var o = new api.StorageSource(); |
872 buildCounterStorageSource++; | 872 buildCounterStorageSource++; |
873 if (buildCounterStorageSource < 3) { | 873 if (buildCounterStorageSource < 3) { |
(...skipping 566 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1440 res.get(arg_projectId, arg_id).then(unittest.expectAsync1(((api.Build resp
onse) { | 1440 res.get(arg_projectId, arg_id).then(unittest.expectAsync1(((api.Build resp
onse) { |
1441 checkBuild(response); | 1441 checkBuild(response); |
1442 }))); | 1442 }))); |
1443 }); | 1443 }); |
1444 | 1444 |
1445 unittest.test("method--list", () { | 1445 unittest.test("method--list", () { |
1446 | 1446 |
1447 var mock = new HttpServerMock(); | 1447 var mock = new HttpServerMock(); |
1448 api.ProjectsBuildsResourceApi res = new api.CloudbuildApi(mock).projects.b
uilds; | 1448 api.ProjectsBuildsResourceApi res = new api.CloudbuildApi(mock).projects.b
uilds; |
1449 var arg_projectId = "foo"; | 1449 var arg_projectId = "foo"; |
| 1450 var arg_pageToken = "foo"; |
1450 var arg_pageSize = 42; | 1451 var arg_pageSize = 42; |
1451 var arg_filter = "foo"; | 1452 var arg_filter = "foo"; |
1452 var arg_pageToken = "foo"; | |
1453 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 1453 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
1454 var path = (req.url).path; | 1454 var path = (req.url).path; |
1455 var pathOffset = 0; | 1455 var pathOffset = 0; |
1456 var index; | 1456 var index; |
1457 var subPart; | 1457 var subPart; |
1458 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1458 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
1459 pathOffset += 1; | 1459 pathOffset += 1; |
1460 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("v1/projects/")); | 1460 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("v1/projects/")); |
1461 pathOffset += 12; | 1461 pathOffset += 12; |
1462 index = path.indexOf("/builds", pathOffset); | 1462 index = path.indexOf("/builds", pathOffset); |
(...skipping 13 matching lines...) Expand all Loading... |
1476 if (n == "false") return false; | 1476 if (n == "false") return false; |
1477 if (n == null) return null; | 1477 if (n == null) return null; |
1478 throw new core.ArgumentError("Invalid boolean: $n"); | 1478 throw new core.ArgumentError("Invalid boolean: $n"); |
1479 } | 1479 } |
1480 if (query.length > 0) { | 1480 if (query.length > 0) { |
1481 for (var part in query.split("&")) { | 1481 for (var part in query.split("&")) { |
1482 var keyvalue = part.split("="); | 1482 var keyvalue = part.split("="); |
1483 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 1483 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
1484 } | 1484 } |
1485 } | 1485 } |
| 1486 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); |
1486 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ
als(arg_pageSize)); | 1487 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ
als(arg_pageSize)); |
1487 unittest.expect(queryMap["filter"].first, unittest.equals(arg_filter)); | 1488 unittest.expect(queryMap["filter"].first, unittest.equals(arg_filter)); |
1488 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | |
1489 | 1489 |
1490 | 1490 |
1491 var h = { | 1491 var h = { |
1492 "content-type" : "application/json; charset=utf-8", | 1492 "content-type" : "application/json; charset=utf-8", |
1493 }; | 1493 }; |
1494 var resp = convert.JSON.encode(buildListBuildsResponse()); | 1494 var resp = convert.JSON.encode(buildListBuildsResponse()); |
1495 return new async.Future.value(stringResponse(200, h, resp)); | 1495 return new async.Future.value(stringResponse(200, h, resp)); |
1496 }), true); | 1496 }), true); |
1497 res.list(arg_projectId, pageSize: arg_pageSize, filter: arg_filter, pageTo
ken: arg_pageToken).then(unittest.expectAsync1(((api.ListBuildsResponse response
) { | 1497 res.list(arg_projectId, pageToken: arg_pageToken, pageSize: arg_pageSize,
filter: arg_filter).then(unittest.expectAsync1(((api.ListBuildsResponse response
) { |
1498 checkListBuildsResponse(response); | 1498 checkListBuildsResponse(response); |
1499 }))); | 1499 }))); |
1500 }); | 1500 }); |
1501 | 1501 |
1502 }); | 1502 }); |
1503 | 1503 |
1504 | 1504 |
1505 unittest.group("resource-ProjectsTriggersResourceApi", () { | 1505 unittest.group("resource-ProjectsTriggersResourceApi", () { |
1506 unittest.test("method--create", () { | 1506 unittest.test("method--create", () { |
1507 | 1507 |
(...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1776 res.patch(arg_request, arg_projectId, arg_triggerId).then(unittest.expectA
sync1(((api.BuildTrigger response) { | 1776 res.patch(arg_request, arg_projectId, arg_triggerId).then(unittest.expectA
sync1(((api.BuildTrigger response) { |
1777 checkBuildTrigger(response); | 1777 checkBuildTrigger(response); |
1778 }))); | 1778 }))); |
1779 }); | 1779 }); |
1780 | 1780 |
1781 }); | 1781 }); |
1782 | 1782 |
1783 | 1783 |
1784 } | 1784 } |
1785 | 1785 |
OLD | NEW |