| 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 buildUnnamed676() { | 54 buildUnnamed1412() { |
| 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 checkUnnamed676(core.List<core.String> o) { | 61 checkUnnamed1412(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 buildUnnamed677() { | 67 buildUnnamed1413() { |
| 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 checkUnnamed677(core.List<api.BuildStep> o) { | 74 checkUnnamed1413(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 core.int buildCounterBuild = 0; | 80 core.int buildCounterBuild = 0; |
| 81 buildBuild() { | 81 buildBuild() { |
| 82 var o = new api.Build(); | 82 var o = new api.Build(); |
| 83 buildCounterBuild++; | 83 buildCounterBuild++; |
| 84 if (buildCounterBuild < 3) { | 84 if (buildCounterBuild < 3) { |
| 85 o.createTime = "foo"; | 85 o.createTime = "foo"; |
| 86 o.finishTime = "foo"; | 86 o.finishTime = "foo"; |
| 87 o.id = "foo"; | 87 o.id = "foo"; |
| 88 o.images = buildUnnamed676(); | 88 o.images = buildUnnamed1412(); |
| 89 o.logUrl = "foo"; |
| 89 o.logsBucket = "foo"; | 90 o.logsBucket = "foo"; |
| 90 o.options = buildBuildOptions(); | 91 o.options = buildBuildOptions(); |
| 91 o.projectId = "foo"; | 92 o.projectId = "foo"; |
| 92 o.results = buildResults(); | 93 o.results = buildResults(); |
| 93 o.source = buildSource(); | 94 o.source = buildSource(); |
| 94 o.sourceProvenance = buildSourceProvenance(); | 95 o.sourceProvenance = buildSourceProvenance(); |
| 95 o.startTime = "foo"; | 96 o.startTime = "foo"; |
| 96 o.status = "foo"; | 97 o.status = "foo"; |
| 97 o.statusDetail = "foo"; | 98 o.statusDetail = "foo"; |
| 98 o.steps = buildUnnamed677(); | 99 o.steps = buildUnnamed1413(); |
| 99 o.timeout = "foo"; | 100 o.timeout = "foo"; |
| 100 } | 101 } |
| 101 buildCounterBuild--; | 102 buildCounterBuild--; |
| 102 return o; | 103 return o; |
| 103 } | 104 } |
| 104 | 105 |
| 105 checkBuild(api.Build o) { | 106 checkBuild(api.Build o) { |
| 106 buildCounterBuild++; | 107 buildCounterBuild++; |
| 107 if (buildCounterBuild < 3) { | 108 if (buildCounterBuild < 3) { |
| 108 unittest.expect(o.createTime, unittest.equals('foo')); | 109 unittest.expect(o.createTime, unittest.equals('foo')); |
| 109 unittest.expect(o.finishTime, unittest.equals('foo')); | 110 unittest.expect(o.finishTime, unittest.equals('foo')); |
| 110 unittest.expect(o.id, unittest.equals('foo')); | 111 unittest.expect(o.id, unittest.equals('foo')); |
| 111 checkUnnamed676(o.images); | 112 checkUnnamed1412(o.images); |
| 113 unittest.expect(o.logUrl, unittest.equals('foo')); |
| 112 unittest.expect(o.logsBucket, unittest.equals('foo')); | 114 unittest.expect(o.logsBucket, unittest.equals('foo')); |
| 113 checkBuildOptions(o.options); | 115 checkBuildOptions(o.options); |
| 114 unittest.expect(o.projectId, unittest.equals('foo')); | 116 unittest.expect(o.projectId, unittest.equals('foo')); |
| 115 checkResults(o.results); | 117 checkResults(o.results); |
| 116 checkSource(o.source); | 118 checkSource(o.source); |
| 117 checkSourceProvenance(o.sourceProvenance); | 119 checkSourceProvenance(o.sourceProvenance); |
| 118 unittest.expect(o.startTime, unittest.equals('foo')); | 120 unittest.expect(o.startTime, unittest.equals('foo')); |
| 119 unittest.expect(o.status, unittest.equals('foo')); | 121 unittest.expect(o.status, unittest.equals('foo')); |
| 120 unittest.expect(o.statusDetail, unittest.equals('foo')); | 122 unittest.expect(o.statusDetail, unittest.equals('foo')); |
| 121 checkUnnamed677(o.steps); | 123 checkUnnamed1413(o.steps); |
| 122 unittest.expect(o.timeout, unittest.equals('foo')); | 124 unittest.expect(o.timeout, unittest.equals('foo')); |
| 123 } | 125 } |
| 124 buildCounterBuild--; | 126 buildCounterBuild--; |
| 125 } | 127 } |
| 126 | 128 |
| 127 core.int buildCounterBuildOperationMetadata = 0; | 129 core.int buildCounterBuildOperationMetadata = 0; |
| 128 buildBuildOperationMetadata() { | 130 buildBuildOperationMetadata() { |
| 129 var o = new api.BuildOperationMetadata(); | 131 var o = new api.BuildOperationMetadata(); |
| 130 buildCounterBuildOperationMetadata++; | 132 buildCounterBuildOperationMetadata++; |
| 131 if (buildCounterBuildOperationMetadata < 3) { | 133 if (buildCounterBuildOperationMetadata < 3) { |
| 132 o.build = buildBuild(); | 134 o.build = buildBuild(); |
| 133 } | 135 } |
| 134 buildCounterBuildOperationMetadata--; | 136 buildCounterBuildOperationMetadata--; |
| 135 return o; | 137 return o; |
| 136 } | 138 } |
| 137 | 139 |
| 138 checkBuildOperationMetadata(api.BuildOperationMetadata o) { | 140 checkBuildOperationMetadata(api.BuildOperationMetadata o) { |
| 139 buildCounterBuildOperationMetadata++; | 141 buildCounterBuildOperationMetadata++; |
| 140 if (buildCounterBuildOperationMetadata < 3) { | 142 if (buildCounterBuildOperationMetadata < 3) { |
| 141 checkBuild(o.build); | 143 checkBuild(o.build); |
| 142 } | 144 } |
| 143 buildCounterBuildOperationMetadata--; | 145 buildCounterBuildOperationMetadata--; |
| 144 } | 146 } |
| 145 | 147 |
| 146 buildUnnamed678() { | 148 buildUnnamed1414() { |
| 147 var o = new core.List<core.String>(); | 149 var o = new core.List<core.String>(); |
| 148 o.add("foo"); | 150 o.add("foo"); |
| 149 o.add("foo"); | 151 o.add("foo"); |
| 150 return o; | 152 return o; |
| 151 } | 153 } |
| 152 | 154 |
| 153 checkUnnamed678(core.List<core.String> o) { | 155 checkUnnamed1414(core.List<core.String> o) { |
| 154 unittest.expect(o, unittest.hasLength(2)); | 156 unittest.expect(o, unittest.hasLength(2)); |
| 155 unittest.expect(o[0], unittest.equals('foo')); | 157 unittest.expect(o[0], unittest.equals('foo')); |
| 156 unittest.expect(o[1], unittest.equals('foo')); | 158 unittest.expect(o[1], unittest.equals('foo')); |
| 157 } | 159 } |
| 158 | 160 |
| 159 core.int buildCounterBuildOptions = 0; | 161 core.int buildCounterBuildOptions = 0; |
| 160 buildBuildOptions() { | 162 buildBuildOptions() { |
| 161 var o = new api.BuildOptions(); | 163 var o = new api.BuildOptions(); |
| 162 buildCounterBuildOptions++; | 164 buildCounterBuildOptions++; |
| 163 if (buildCounterBuildOptions < 3) { | 165 if (buildCounterBuildOptions < 3) { |
| 164 o.requestedVerifyOption = "foo"; | 166 o.requestedVerifyOption = "foo"; |
| 165 o.sourceProvenanceHash = buildUnnamed678(); | 167 o.sourceProvenanceHash = buildUnnamed1414(); |
| 166 } | 168 } |
| 167 buildCounterBuildOptions--; | 169 buildCounterBuildOptions--; |
| 168 return o; | 170 return o; |
| 169 } | 171 } |
| 170 | 172 |
| 171 checkBuildOptions(api.BuildOptions o) { | 173 checkBuildOptions(api.BuildOptions o) { |
| 172 buildCounterBuildOptions++; | 174 buildCounterBuildOptions++; |
| 173 if (buildCounterBuildOptions < 3) { | 175 if (buildCounterBuildOptions < 3) { |
| 174 unittest.expect(o.requestedVerifyOption, unittest.equals('foo')); | 176 unittest.expect(o.requestedVerifyOption, unittest.equals('foo')); |
| 175 checkUnnamed678(o.sourceProvenanceHash); | 177 checkUnnamed1414(o.sourceProvenanceHash); |
| 176 } | 178 } |
| 177 buildCounterBuildOptions--; | 179 buildCounterBuildOptions--; |
| 178 } | 180 } |
| 179 | 181 |
| 180 buildUnnamed679() { | 182 buildUnnamed1415() { |
| 181 var o = new core.List<core.String>(); | 183 var o = new core.List<core.String>(); |
| 182 o.add("foo"); | 184 o.add("foo"); |
| 183 o.add("foo"); | 185 o.add("foo"); |
| 184 return o; | 186 return o; |
| 185 } | 187 } |
| 186 | 188 |
| 187 checkUnnamed679(core.List<core.String> o) { | 189 checkUnnamed1415(core.List<core.String> o) { |
| 188 unittest.expect(o, unittest.hasLength(2)); | 190 unittest.expect(o, unittest.hasLength(2)); |
| 189 unittest.expect(o[0], unittest.equals('foo')); | 191 unittest.expect(o[0], unittest.equals('foo')); |
| 190 unittest.expect(o[1], unittest.equals('foo')); | 192 unittest.expect(o[1], unittest.equals('foo')); |
| 191 } | 193 } |
| 192 | 194 |
| 193 buildUnnamed680() { | 195 buildUnnamed1416() { |
| 194 var o = new core.List<core.String>(); | 196 var o = new core.List<core.String>(); |
| 195 o.add("foo"); | 197 o.add("foo"); |
| 196 o.add("foo"); | 198 o.add("foo"); |
| 197 return o; | 199 return o; |
| 198 } | 200 } |
| 199 | 201 |
| 200 checkUnnamed680(core.List<core.String> o) { | 202 checkUnnamed1416(core.List<core.String> o) { |
| 201 unittest.expect(o, unittest.hasLength(2)); | 203 unittest.expect(o, unittest.hasLength(2)); |
| 202 unittest.expect(o[0], unittest.equals('foo')); | 204 unittest.expect(o[0], unittest.equals('foo')); |
| 203 unittest.expect(o[1], unittest.equals('foo')); | 205 unittest.expect(o[1], unittest.equals('foo')); |
| 204 } | 206 } |
| 205 | 207 |
| 206 buildUnnamed681() { | 208 buildUnnamed1417() { |
| 207 var o = new core.List<core.String>(); | 209 var o = new core.List<core.String>(); |
| 208 o.add("foo"); | 210 o.add("foo"); |
| 209 o.add("foo"); | 211 o.add("foo"); |
| 210 return o; | 212 return o; |
| 211 } | 213 } |
| 212 | 214 |
| 213 checkUnnamed681(core.List<core.String> o) { | 215 checkUnnamed1417(core.List<core.String> o) { |
| 214 unittest.expect(o, unittest.hasLength(2)); | 216 unittest.expect(o, unittest.hasLength(2)); |
| 215 unittest.expect(o[0], unittest.equals('foo')); | 217 unittest.expect(o[0], unittest.equals('foo')); |
| 216 unittest.expect(o[1], unittest.equals('foo')); | 218 unittest.expect(o[1], unittest.equals('foo')); |
| 217 } | 219 } |
| 218 | 220 |
| 219 core.int buildCounterBuildStep = 0; | 221 core.int buildCounterBuildStep = 0; |
| 220 buildBuildStep() { | 222 buildBuildStep() { |
| 221 var o = new api.BuildStep(); | 223 var o = new api.BuildStep(); |
| 222 buildCounterBuildStep++; | 224 buildCounterBuildStep++; |
| 223 if (buildCounterBuildStep < 3) { | 225 if (buildCounterBuildStep < 3) { |
| 224 o.args = buildUnnamed679(); | 226 o.args = buildUnnamed1415(); |
| 225 o.dir = "foo"; | 227 o.dir = "foo"; |
| 226 o.env = buildUnnamed680(); | 228 o.env = buildUnnamed1416(); |
| 227 o.id = "foo"; | 229 o.id = "foo"; |
| 228 o.name = "foo"; | 230 o.name = "foo"; |
| 229 o.waitFor = buildUnnamed681(); | 231 o.waitFor = buildUnnamed1417(); |
| 230 } | 232 } |
| 231 buildCounterBuildStep--; | 233 buildCounterBuildStep--; |
| 232 return o; | 234 return o; |
| 233 } | 235 } |
| 234 | 236 |
| 235 checkBuildStep(api.BuildStep o) { | 237 checkBuildStep(api.BuildStep o) { |
| 236 buildCounterBuildStep++; | 238 buildCounterBuildStep++; |
| 237 if (buildCounterBuildStep < 3) { | 239 if (buildCounterBuildStep < 3) { |
| 238 checkUnnamed679(o.args); | 240 checkUnnamed1415(o.args); |
| 239 unittest.expect(o.dir, unittest.equals('foo')); | 241 unittest.expect(o.dir, unittest.equals('foo')); |
| 240 checkUnnamed680(o.env); | 242 checkUnnamed1416(o.env); |
| 241 unittest.expect(o.id, unittest.equals('foo')); | 243 unittest.expect(o.id, unittest.equals('foo')); |
| 242 unittest.expect(o.name, unittest.equals('foo')); | 244 unittest.expect(o.name, unittest.equals('foo')); |
| 243 checkUnnamed681(o.waitFor); | 245 checkUnnamed1417(o.waitFor); |
| 244 } | 246 } |
| 245 buildCounterBuildStep--; | 247 buildCounterBuildStep--; |
| 246 } | 248 } |
| 247 | 249 |
| 250 core.int buildCounterBuildTrigger = 0; |
| 251 buildBuildTrigger() { |
| 252 var o = new api.BuildTrigger(); |
| 253 buildCounterBuildTrigger++; |
| 254 if (buildCounterBuildTrigger < 3) { |
| 255 o.build = buildBuild(); |
| 256 o.createTime = "foo"; |
| 257 o.filename = "foo"; |
| 258 o.id = "foo"; |
| 259 o.triggerTemplate = buildRepoSource(); |
| 260 } |
| 261 buildCounterBuildTrigger--; |
| 262 return o; |
| 263 } |
| 264 |
| 265 checkBuildTrigger(api.BuildTrigger o) { |
| 266 buildCounterBuildTrigger++; |
| 267 if (buildCounterBuildTrigger < 3) { |
| 268 checkBuild(o.build); |
| 269 unittest.expect(o.createTime, unittest.equals('foo')); |
| 270 unittest.expect(o.filename, unittest.equals('foo')); |
| 271 unittest.expect(o.id, unittest.equals('foo')); |
| 272 checkRepoSource(o.triggerTemplate); |
| 273 } |
| 274 buildCounterBuildTrigger--; |
| 275 } |
| 276 |
| 248 core.int buildCounterBuiltImage = 0; | 277 core.int buildCounterBuiltImage = 0; |
| 249 buildBuiltImage() { | 278 buildBuiltImage() { |
| 250 var o = new api.BuiltImage(); | 279 var o = new api.BuiltImage(); |
| 251 buildCounterBuiltImage++; | 280 buildCounterBuiltImage++; |
| 252 if (buildCounterBuiltImage < 3) { | 281 if (buildCounterBuiltImage < 3) { |
| 253 o.digest = "foo"; | 282 o.digest = "foo"; |
| 254 o.name = "foo"; | 283 o.name = "foo"; |
| 255 } | 284 } |
| 256 buildCounterBuiltImage--; | 285 buildCounterBuiltImage--; |
| 257 return o; | 286 return o; |
| (...skipping 18 matching lines...) Expand all Loading... |
| 276 return o; | 305 return o; |
| 277 } | 306 } |
| 278 | 307 |
| 279 checkCancelBuildRequest(api.CancelBuildRequest o) { | 308 checkCancelBuildRequest(api.CancelBuildRequest o) { |
| 280 buildCounterCancelBuildRequest++; | 309 buildCounterCancelBuildRequest++; |
| 281 if (buildCounterCancelBuildRequest < 3) { | 310 if (buildCounterCancelBuildRequest < 3) { |
| 282 } | 311 } |
| 283 buildCounterCancelBuildRequest--; | 312 buildCounterCancelBuildRequest--; |
| 284 } | 313 } |
| 285 | 314 |
| 286 buildUnnamed682() { | 315 core.int buildCounterEmpty = 0; |
| 316 buildEmpty() { |
| 317 var o = new api.Empty(); |
| 318 buildCounterEmpty++; |
| 319 if (buildCounterEmpty < 3) { |
| 320 } |
| 321 buildCounterEmpty--; |
| 322 return o; |
| 323 } |
| 324 |
| 325 checkEmpty(api.Empty o) { |
| 326 buildCounterEmpty++; |
| 327 if (buildCounterEmpty < 3) { |
| 328 } |
| 329 buildCounterEmpty--; |
| 330 } |
| 331 |
| 332 buildUnnamed1418() { |
| 287 var o = new core.List<api.Hash>(); | 333 var o = new core.List<api.Hash>(); |
| 288 o.add(buildHash()); | 334 o.add(buildHash()); |
| 289 o.add(buildHash()); | 335 o.add(buildHash()); |
| 290 return o; | 336 return o; |
| 291 } | 337 } |
| 292 | 338 |
| 293 checkUnnamed682(core.List<api.Hash> o) { | 339 checkUnnamed1418(core.List<api.Hash> o) { |
| 294 unittest.expect(o, unittest.hasLength(2)); | 340 unittest.expect(o, unittest.hasLength(2)); |
| 295 checkHash(o[0]); | 341 checkHash(o[0]); |
| 296 checkHash(o[1]); | 342 checkHash(o[1]); |
| 297 } | 343 } |
| 298 | 344 |
| 299 core.int buildCounterFileHashes = 0; | 345 core.int buildCounterFileHashes = 0; |
| 300 buildFileHashes() { | 346 buildFileHashes() { |
| 301 var o = new api.FileHashes(); | 347 var o = new api.FileHashes(); |
| 302 buildCounterFileHashes++; | 348 buildCounterFileHashes++; |
| 303 if (buildCounterFileHashes < 3) { | 349 if (buildCounterFileHashes < 3) { |
| 304 o.fileHash = buildUnnamed682(); | 350 o.fileHash = buildUnnamed1418(); |
| 305 } | 351 } |
| 306 buildCounterFileHashes--; | 352 buildCounterFileHashes--; |
| 307 return o; | 353 return o; |
| 308 } | 354 } |
| 309 | 355 |
| 310 checkFileHashes(api.FileHashes o) { | 356 checkFileHashes(api.FileHashes o) { |
| 311 buildCounterFileHashes++; | 357 buildCounterFileHashes++; |
| 312 if (buildCounterFileHashes < 3) { | 358 if (buildCounterFileHashes < 3) { |
| 313 checkUnnamed682(o.fileHash); | 359 checkUnnamed1418(o.fileHash); |
| 314 } | 360 } |
| 315 buildCounterFileHashes--; | 361 buildCounterFileHashes--; |
| 316 } | 362 } |
| 317 | 363 |
| 318 core.int buildCounterHash = 0; | 364 core.int buildCounterHash = 0; |
| 319 buildHash() { | 365 buildHash() { |
| 320 var o = new api.Hash(); | 366 var o = new api.Hash(); |
| 321 buildCounterHash++; | 367 buildCounterHash++; |
| 322 if (buildCounterHash < 3) { | 368 if (buildCounterHash < 3) { |
| 323 o.type = "foo"; | 369 o.type = "foo"; |
| 324 o.value = "foo"; | 370 o.value = "foo"; |
| 325 } | 371 } |
| 326 buildCounterHash--; | 372 buildCounterHash--; |
| 327 return o; | 373 return o; |
| 328 } | 374 } |
| 329 | 375 |
| 330 checkHash(api.Hash o) { | 376 checkHash(api.Hash o) { |
| 331 buildCounterHash++; | 377 buildCounterHash++; |
| 332 if (buildCounterHash < 3) { | 378 if (buildCounterHash < 3) { |
| 333 unittest.expect(o.type, unittest.equals('foo')); | 379 unittest.expect(o.type, unittest.equals('foo')); |
| 334 unittest.expect(o.value, unittest.equals('foo')); | 380 unittest.expect(o.value, unittest.equals('foo')); |
| 335 } | 381 } |
| 336 buildCounterHash--; | 382 buildCounterHash--; |
| 337 } | 383 } |
| 338 | 384 |
| 339 buildUnnamed683() { | 385 buildUnnamed1419() { |
| 386 var o = new core.List<api.BuildTrigger>(); |
| 387 o.add(buildBuildTrigger()); |
| 388 o.add(buildBuildTrigger()); |
| 389 return o; |
| 390 } |
| 391 |
| 392 checkUnnamed1419(core.List<api.BuildTrigger> o) { |
| 393 unittest.expect(o, unittest.hasLength(2)); |
| 394 checkBuildTrigger(o[0]); |
| 395 checkBuildTrigger(o[1]); |
| 396 } |
| 397 |
| 398 core.int buildCounterListBuildTriggersResponse = 0; |
| 399 buildListBuildTriggersResponse() { |
| 400 var o = new api.ListBuildTriggersResponse(); |
| 401 buildCounterListBuildTriggersResponse++; |
| 402 if (buildCounterListBuildTriggersResponse < 3) { |
| 403 o.triggers = buildUnnamed1419(); |
| 404 } |
| 405 buildCounterListBuildTriggersResponse--; |
| 406 return o; |
| 407 } |
| 408 |
| 409 checkListBuildTriggersResponse(api.ListBuildTriggersResponse o) { |
| 410 buildCounterListBuildTriggersResponse++; |
| 411 if (buildCounterListBuildTriggersResponse < 3) { |
| 412 checkUnnamed1419(o.triggers); |
| 413 } |
| 414 buildCounterListBuildTriggersResponse--; |
| 415 } |
| 416 |
| 417 buildUnnamed1420() { |
| 340 var o = new core.List<api.Build>(); | 418 var o = new core.List<api.Build>(); |
| 341 o.add(buildBuild()); | 419 o.add(buildBuild()); |
| 342 o.add(buildBuild()); | 420 o.add(buildBuild()); |
| 343 return o; | 421 return o; |
| 344 } | 422 } |
| 345 | 423 |
| 346 checkUnnamed683(core.List<api.Build> o) { | 424 checkUnnamed1420(core.List<api.Build> o) { |
| 347 unittest.expect(o, unittest.hasLength(2)); | 425 unittest.expect(o, unittest.hasLength(2)); |
| 348 checkBuild(o[0]); | 426 checkBuild(o[0]); |
| 349 checkBuild(o[1]); | 427 checkBuild(o[1]); |
| 350 } | 428 } |
| 351 | 429 |
| 352 core.int buildCounterListBuildsResponse = 0; | 430 core.int buildCounterListBuildsResponse = 0; |
| 353 buildListBuildsResponse() { | 431 buildListBuildsResponse() { |
| 354 var o = new api.ListBuildsResponse(); | 432 var o = new api.ListBuildsResponse(); |
| 355 buildCounterListBuildsResponse++; | 433 buildCounterListBuildsResponse++; |
| 356 if (buildCounterListBuildsResponse < 3) { | 434 if (buildCounterListBuildsResponse < 3) { |
| 357 o.builds = buildUnnamed683(); | 435 o.builds = buildUnnamed1420(); |
| 358 o.nextPageToken = "foo"; | 436 o.nextPageToken = "foo"; |
| 359 } | 437 } |
| 360 buildCounterListBuildsResponse--; | 438 buildCounterListBuildsResponse--; |
| 361 return o; | 439 return o; |
| 362 } | 440 } |
| 363 | 441 |
| 364 checkListBuildsResponse(api.ListBuildsResponse o) { | 442 checkListBuildsResponse(api.ListBuildsResponse o) { |
| 365 buildCounterListBuildsResponse++; | 443 buildCounterListBuildsResponse++; |
| 366 if (buildCounterListBuildsResponse < 3) { | 444 if (buildCounterListBuildsResponse < 3) { |
| 367 checkUnnamed683(o.builds); | 445 checkUnnamed1420(o.builds); |
| 368 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 446 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
| 369 } | 447 } |
| 370 buildCounterListBuildsResponse--; | 448 buildCounterListBuildsResponse--; |
| 371 } | 449 } |
| 372 | 450 |
| 373 buildUnnamed684() { | 451 buildUnnamed1421() { |
| 374 var o = new core.List<api.Operation>(); | 452 var o = new core.List<api.Operation>(); |
| 375 o.add(buildOperation()); | 453 o.add(buildOperation()); |
| 376 o.add(buildOperation()); | 454 o.add(buildOperation()); |
| 377 return o; | 455 return o; |
| 378 } | 456 } |
| 379 | 457 |
| 380 checkUnnamed684(core.List<api.Operation> o) { | 458 checkUnnamed1421(core.List<api.Operation> o) { |
| 381 unittest.expect(o, unittest.hasLength(2)); | 459 unittest.expect(o, unittest.hasLength(2)); |
| 382 checkOperation(o[0]); | 460 checkOperation(o[0]); |
| 383 checkOperation(o[1]); | 461 checkOperation(o[1]); |
| 384 } | 462 } |
| 385 | 463 |
| 386 core.int buildCounterListOperationsResponse = 0; | 464 core.int buildCounterListOperationsResponse = 0; |
| 387 buildListOperationsResponse() { | 465 buildListOperationsResponse() { |
| 388 var o = new api.ListOperationsResponse(); | 466 var o = new api.ListOperationsResponse(); |
| 389 buildCounterListOperationsResponse++; | 467 buildCounterListOperationsResponse++; |
| 390 if (buildCounterListOperationsResponse < 3) { | 468 if (buildCounterListOperationsResponse < 3) { |
| 391 o.nextPageToken = "foo"; | 469 o.nextPageToken = "foo"; |
| 392 o.operations = buildUnnamed684(); | 470 o.operations = buildUnnamed1421(); |
| 393 } | 471 } |
| 394 buildCounterListOperationsResponse--; | 472 buildCounterListOperationsResponse--; |
| 395 return o; | 473 return o; |
| 396 } | 474 } |
| 397 | 475 |
| 398 checkListOperationsResponse(api.ListOperationsResponse o) { | 476 checkListOperationsResponse(api.ListOperationsResponse o) { |
| 399 buildCounterListOperationsResponse++; | 477 buildCounterListOperationsResponse++; |
| 400 if (buildCounterListOperationsResponse < 3) { | 478 if (buildCounterListOperationsResponse < 3) { |
| 401 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 479 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
| 402 checkUnnamed684(o.operations); | 480 checkUnnamed1421(o.operations); |
| 403 } | 481 } |
| 404 buildCounterListOperationsResponse--; | 482 buildCounterListOperationsResponse--; |
| 405 } | 483 } |
| 406 | 484 |
| 407 buildUnnamed685() { | 485 buildUnnamed1422() { |
| 408 var o = new core.Map<core.String, core.Object>(); | 486 var o = new core.Map<core.String, core.Object>(); |
| 409 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 487 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; |
| 410 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 488 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; |
| 411 return o; | 489 return o; |
| 412 } | 490 } |
| 413 | 491 |
| 414 checkUnnamed685(core.Map<core.String, core.Object> o) { | 492 checkUnnamed1422(core.Map<core.String, core.Object> o) { |
| 415 unittest.expect(o, unittest.hasLength(2)); | 493 unittest.expect(o, unittest.hasLength(2)); |
| 416 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')); | 494 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')); |
| 417 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')); | 495 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')); |
| 418 } | 496 } |
| 419 | 497 |
| 420 buildUnnamed686() { | 498 buildUnnamed1423() { |
| 421 var o = new core.Map<core.String, core.Object>(); | 499 var o = new core.Map<core.String, core.Object>(); |
| 422 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 500 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; |
| 423 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 501 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; |
| 424 return o; | 502 return o; |
| 425 } | 503 } |
| 426 | 504 |
| 427 checkUnnamed686(core.Map<core.String, core.Object> o) { | 505 checkUnnamed1423(core.Map<core.String, core.Object> o) { |
| 428 unittest.expect(o, unittest.hasLength(2)); | 506 unittest.expect(o, unittest.hasLength(2)); |
| 429 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')); | 507 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')); |
| 430 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')); | 508 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')); |
| 431 } | 509 } |
| 432 | 510 |
| 433 core.int buildCounterOperation = 0; | 511 core.int buildCounterOperation = 0; |
| 434 buildOperation() { | 512 buildOperation() { |
| 435 var o = new api.Operation(); | 513 var o = new api.Operation(); |
| 436 buildCounterOperation++; | 514 buildCounterOperation++; |
| 437 if (buildCounterOperation < 3) { | 515 if (buildCounterOperation < 3) { |
| 438 o.done = true; | 516 o.done = true; |
| 439 o.error = buildStatus(); | 517 o.error = buildStatus(); |
| 440 o.metadata = buildUnnamed685(); | 518 o.metadata = buildUnnamed1422(); |
| 441 o.name = "foo"; | 519 o.name = "foo"; |
| 442 o.response = buildUnnamed686(); | 520 o.response = buildUnnamed1423(); |
| 443 } | 521 } |
| 444 buildCounterOperation--; | 522 buildCounterOperation--; |
| 445 return o; | 523 return o; |
| 446 } | 524 } |
| 447 | 525 |
| 448 checkOperation(api.Operation o) { | 526 checkOperation(api.Operation o) { |
| 449 buildCounterOperation++; | 527 buildCounterOperation++; |
| 450 if (buildCounterOperation < 3) { | 528 if (buildCounterOperation < 3) { |
| 451 unittest.expect(o.done, unittest.isTrue); | 529 unittest.expect(o.done, unittest.isTrue); |
| 452 checkStatus(o.error); | 530 checkStatus(o.error); |
| 453 checkUnnamed685(o.metadata); | 531 checkUnnamed1422(o.metadata); |
| 454 unittest.expect(o.name, unittest.equals('foo')); | 532 unittest.expect(o.name, unittest.equals('foo')); |
| 455 checkUnnamed686(o.response); | 533 checkUnnamed1423(o.response); |
| 456 } | 534 } |
| 457 buildCounterOperation--; | 535 buildCounterOperation--; |
| 458 } | 536 } |
| 459 | 537 |
| 460 core.int buildCounterRepoSource = 0; | 538 core.int buildCounterRepoSource = 0; |
| 461 buildRepoSource() { | 539 buildRepoSource() { |
| 462 var o = new api.RepoSource(); | 540 var o = new api.RepoSource(); |
| 463 buildCounterRepoSource++; | 541 buildCounterRepoSource++; |
| 464 if (buildCounterRepoSource < 3) { | 542 if (buildCounterRepoSource < 3) { |
| 465 o.branchName = "foo"; | 543 o.branchName = "foo"; |
| (...skipping 11 matching lines...) Expand all Loading... |
| 477 if (buildCounterRepoSource < 3) { | 555 if (buildCounterRepoSource < 3) { |
| 478 unittest.expect(o.branchName, unittest.equals('foo')); | 556 unittest.expect(o.branchName, unittest.equals('foo')); |
| 479 unittest.expect(o.commitSha, unittest.equals('foo')); | 557 unittest.expect(o.commitSha, unittest.equals('foo')); |
| 480 unittest.expect(o.projectId, unittest.equals('foo')); | 558 unittest.expect(o.projectId, unittest.equals('foo')); |
| 481 unittest.expect(o.repoName, unittest.equals('foo')); | 559 unittest.expect(o.repoName, unittest.equals('foo')); |
| 482 unittest.expect(o.tagName, unittest.equals('foo')); | 560 unittest.expect(o.tagName, unittest.equals('foo')); |
| 483 } | 561 } |
| 484 buildCounterRepoSource--; | 562 buildCounterRepoSource--; |
| 485 } | 563 } |
| 486 | 564 |
| 487 buildUnnamed687() { | 565 buildUnnamed1424() { |
| 488 var o = new core.List<core.String>(); | 566 var o = new core.List<core.String>(); |
| 489 o.add("foo"); | 567 o.add("foo"); |
| 490 o.add("foo"); | 568 o.add("foo"); |
| 491 return o; | 569 return o; |
| 492 } | 570 } |
| 493 | 571 |
| 494 checkUnnamed687(core.List<core.String> o) { | 572 checkUnnamed1424(core.List<core.String> o) { |
| 495 unittest.expect(o, unittest.hasLength(2)); | 573 unittest.expect(o, unittest.hasLength(2)); |
| 496 unittest.expect(o[0], unittest.equals('foo')); | 574 unittest.expect(o[0], unittest.equals('foo')); |
| 497 unittest.expect(o[1], unittest.equals('foo')); | 575 unittest.expect(o[1], unittest.equals('foo')); |
| 498 } | 576 } |
| 499 | 577 |
| 500 buildUnnamed688() { | 578 buildUnnamed1425() { |
| 501 var o = new core.List<api.BuiltImage>(); | 579 var o = new core.List<api.BuiltImage>(); |
| 502 o.add(buildBuiltImage()); | 580 o.add(buildBuiltImage()); |
| 503 o.add(buildBuiltImage()); | 581 o.add(buildBuiltImage()); |
| 504 return o; | 582 return o; |
| 505 } | 583 } |
| 506 | 584 |
| 507 checkUnnamed688(core.List<api.BuiltImage> o) { | 585 checkUnnamed1425(core.List<api.BuiltImage> o) { |
| 508 unittest.expect(o, unittest.hasLength(2)); | 586 unittest.expect(o, unittest.hasLength(2)); |
| 509 checkBuiltImage(o[0]); | 587 checkBuiltImage(o[0]); |
| 510 checkBuiltImage(o[1]); | 588 checkBuiltImage(o[1]); |
| 511 } | 589 } |
| 512 | 590 |
| 513 core.int buildCounterResults = 0; | 591 core.int buildCounterResults = 0; |
| 514 buildResults() { | 592 buildResults() { |
| 515 var o = new api.Results(); | 593 var o = new api.Results(); |
| 516 buildCounterResults++; | 594 buildCounterResults++; |
| 517 if (buildCounterResults < 3) { | 595 if (buildCounterResults < 3) { |
| 518 o.buildStepImages = buildUnnamed687(); | 596 o.buildStepImages = buildUnnamed1424(); |
| 519 o.images = buildUnnamed688(); | 597 o.images = buildUnnamed1425(); |
| 520 } | 598 } |
| 521 buildCounterResults--; | 599 buildCounterResults--; |
| 522 return o; | 600 return o; |
| 523 } | 601 } |
| 524 | 602 |
| 525 checkResults(api.Results o) { | 603 checkResults(api.Results o) { |
| 526 buildCounterResults++; | 604 buildCounterResults++; |
| 527 if (buildCounterResults < 3) { | 605 if (buildCounterResults < 3) { |
| 528 checkUnnamed687(o.buildStepImages); | 606 checkUnnamed1424(o.buildStepImages); |
| 529 checkUnnamed688(o.images); | 607 checkUnnamed1425(o.images); |
| 530 } | 608 } |
| 531 buildCounterResults--; | 609 buildCounterResults--; |
| 532 } | 610 } |
| 533 | 611 |
| 534 core.int buildCounterSource = 0; | 612 core.int buildCounterSource = 0; |
| 535 buildSource() { | 613 buildSource() { |
| 536 var o = new api.Source(); | 614 var o = new api.Source(); |
| 537 buildCounterSource++; | 615 buildCounterSource++; |
| 538 if (buildCounterSource < 3) { | 616 if (buildCounterSource < 3) { |
| 539 o.repoSource = buildRepoSource(); | 617 o.repoSource = buildRepoSource(); |
| 540 o.storageSource = buildStorageSource(); | 618 o.storageSource = buildStorageSource(); |
| 541 } | 619 } |
| 542 buildCounterSource--; | 620 buildCounterSource--; |
| 543 return o; | 621 return o; |
| 544 } | 622 } |
| 545 | 623 |
| 546 checkSource(api.Source o) { | 624 checkSource(api.Source o) { |
| 547 buildCounterSource++; | 625 buildCounterSource++; |
| 548 if (buildCounterSource < 3) { | 626 if (buildCounterSource < 3) { |
| 549 checkRepoSource(o.repoSource); | 627 checkRepoSource(o.repoSource); |
| 550 checkStorageSource(o.storageSource); | 628 checkStorageSource(o.storageSource); |
| 551 } | 629 } |
| 552 buildCounterSource--; | 630 buildCounterSource--; |
| 553 } | 631 } |
| 554 | 632 |
| 555 buildUnnamed689() { | 633 buildUnnamed1426() { |
| 556 var o = new core.Map<core.String, api.FileHashes>(); | 634 var o = new core.Map<core.String, api.FileHashes>(); |
| 557 o["x"] = buildFileHashes(); | 635 o["x"] = buildFileHashes(); |
| 558 o["y"] = buildFileHashes(); | 636 o["y"] = buildFileHashes(); |
| 559 return o; | 637 return o; |
| 560 } | 638 } |
| 561 | 639 |
| 562 checkUnnamed689(core.Map<core.String, api.FileHashes> o) { | 640 checkUnnamed1426(core.Map<core.String, api.FileHashes> o) { |
| 563 unittest.expect(o, unittest.hasLength(2)); | 641 unittest.expect(o, unittest.hasLength(2)); |
| 564 checkFileHashes(o["x"]); | 642 checkFileHashes(o["x"]); |
| 565 checkFileHashes(o["y"]); | 643 checkFileHashes(o["y"]); |
| 566 } | 644 } |
| 567 | 645 |
| 568 core.int buildCounterSourceProvenance = 0; | 646 core.int buildCounterSourceProvenance = 0; |
| 569 buildSourceProvenance() { | 647 buildSourceProvenance() { |
| 570 var o = new api.SourceProvenance(); | 648 var o = new api.SourceProvenance(); |
| 571 buildCounterSourceProvenance++; | 649 buildCounterSourceProvenance++; |
| 572 if (buildCounterSourceProvenance < 3) { | 650 if (buildCounterSourceProvenance < 3) { |
| 573 o.fileHashes = buildUnnamed689(); | 651 o.fileHashes = buildUnnamed1426(); |
| 574 o.resolvedRepoSource = buildRepoSource(); | 652 o.resolvedRepoSource = buildRepoSource(); |
| 575 o.resolvedStorageSource = buildStorageSource(); | 653 o.resolvedStorageSource = buildStorageSource(); |
| 576 } | 654 } |
| 577 buildCounterSourceProvenance--; | 655 buildCounterSourceProvenance--; |
| 578 return o; | 656 return o; |
| 579 } | 657 } |
| 580 | 658 |
| 581 checkSourceProvenance(api.SourceProvenance o) { | 659 checkSourceProvenance(api.SourceProvenance o) { |
| 582 buildCounterSourceProvenance++; | 660 buildCounterSourceProvenance++; |
| 583 if (buildCounterSourceProvenance < 3) { | 661 if (buildCounterSourceProvenance < 3) { |
| 584 checkUnnamed689(o.fileHashes); | 662 checkUnnamed1426(o.fileHashes); |
| 585 checkRepoSource(o.resolvedRepoSource); | 663 checkRepoSource(o.resolvedRepoSource); |
| 586 checkStorageSource(o.resolvedStorageSource); | 664 checkStorageSource(o.resolvedStorageSource); |
| 587 } | 665 } |
| 588 buildCounterSourceProvenance--; | 666 buildCounterSourceProvenance--; |
| 589 } | 667 } |
| 590 | 668 |
| 591 buildUnnamed690() { | 669 buildUnnamed1427() { |
| 592 var o = new core.Map<core.String, core.Object>(); | 670 var o = new core.Map<core.String, core.Object>(); |
| 593 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 671 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; |
| 594 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 672 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; |
| 595 return o; | 673 return o; |
| 596 } | 674 } |
| 597 | 675 |
| 598 checkUnnamed690(core.Map<core.String, core.Object> o) { | 676 checkUnnamed1427(core.Map<core.String, core.Object> o) { |
| 599 unittest.expect(o, unittest.hasLength(2)); | 677 unittest.expect(o, unittest.hasLength(2)); |
| 600 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')); | 678 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')); |
| 601 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')); | 679 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')); |
| 602 } | 680 } |
| 603 | 681 |
| 604 buildUnnamed691() { | 682 buildUnnamed1428() { |
| 605 var o = new core.List<core.Map<core.String, core.Object>>(); | 683 var o = new core.List<core.Map<core.String, core.Object>>(); |
| 606 o.add(buildUnnamed690()); | 684 o.add(buildUnnamed1427()); |
| 607 o.add(buildUnnamed690()); | 685 o.add(buildUnnamed1427()); |
| 608 return o; | 686 return o; |
| 609 } | 687 } |
| 610 | 688 |
| 611 checkUnnamed691(core.List<core.Map<core.String, core.Object>> o) { | 689 checkUnnamed1428(core.List<core.Map<core.String, core.Object>> o) { |
| 612 unittest.expect(o, unittest.hasLength(2)); | 690 unittest.expect(o, unittest.hasLength(2)); |
| 613 checkUnnamed690(o[0]); | 691 checkUnnamed1427(o[0]); |
| 614 checkUnnamed690(o[1]); | 692 checkUnnamed1427(o[1]); |
| 615 } | 693 } |
| 616 | 694 |
| 617 core.int buildCounterStatus = 0; | 695 core.int buildCounterStatus = 0; |
| 618 buildStatus() { | 696 buildStatus() { |
| 619 var o = new api.Status(); | 697 var o = new api.Status(); |
| 620 buildCounterStatus++; | 698 buildCounterStatus++; |
| 621 if (buildCounterStatus < 3) { | 699 if (buildCounterStatus < 3) { |
| 622 o.code = 42; | 700 o.code = 42; |
| 623 o.details = buildUnnamed691(); | 701 o.details = buildUnnamed1428(); |
| 624 o.message = "foo"; | 702 o.message = "foo"; |
| 625 } | 703 } |
| 626 buildCounterStatus--; | 704 buildCounterStatus--; |
| 627 return o; | 705 return o; |
| 628 } | 706 } |
| 629 | 707 |
| 630 checkStatus(api.Status o) { | 708 checkStatus(api.Status o) { |
| 631 buildCounterStatus++; | 709 buildCounterStatus++; |
| 632 if (buildCounterStatus < 3) { | 710 if (buildCounterStatus < 3) { |
| 633 unittest.expect(o.code, unittest.equals(42)); | 711 unittest.expect(o.code, unittest.equals(42)); |
| 634 checkUnnamed691(o.details); | 712 checkUnnamed1428(o.details); |
| 635 unittest.expect(o.message, unittest.equals('foo')); | 713 unittest.expect(o.message, unittest.equals('foo')); |
| 636 } | 714 } |
| 637 buildCounterStatus--; | 715 buildCounterStatus--; |
| 638 } | 716 } |
| 639 | 717 |
| 640 core.int buildCounterStorageSource = 0; | 718 core.int buildCounterStorageSource = 0; |
| 641 buildStorageSource() { | 719 buildStorageSource() { |
| 642 var o = new api.StorageSource(); | 720 var o = new api.StorageSource(); |
| 643 buildCounterStorageSource++; | 721 buildCounterStorageSource++; |
| 644 if (buildCounterStorageSource < 3) { | 722 if (buildCounterStorageSource < 3) { |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 691 | 769 |
| 692 unittest.group("obj-schema-BuildStep", () { | 770 unittest.group("obj-schema-BuildStep", () { |
| 693 unittest.test("to-json--from-json", () { | 771 unittest.test("to-json--from-json", () { |
| 694 var o = buildBuildStep(); | 772 var o = buildBuildStep(); |
| 695 var od = new api.BuildStep.fromJson(o.toJson()); | 773 var od = new api.BuildStep.fromJson(o.toJson()); |
| 696 checkBuildStep(od); | 774 checkBuildStep(od); |
| 697 }); | 775 }); |
| 698 }); | 776 }); |
| 699 | 777 |
| 700 | 778 |
| 779 unittest.group("obj-schema-BuildTrigger", () { |
| 780 unittest.test("to-json--from-json", () { |
| 781 var o = buildBuildTrigger(); |
| 782 var od = new api.BuildTrigger.fromJson(o.toJson()); |
| 783 checkBuildTrigger(od); |
| 784 }); |
| 785 }); |
| 786 |
| 787 |
| 701 unittest.group("obj-schema-BuiltImage", () { | 788 unittest.group("obj-schema-BuiltImage", () { |
| 702 unittest.test("to-json--from-json", () { | 789 unittest.test("to-json--from-json", () { |
| 703 var o = buildBuiltImage(); | 790 var o = buildBuiltImage(); |
| 704 var od = new api.BuiltImage.fromJson(o.toJson()); | 791 var od = new api.BuiltImage.fromJson(o.toJson()); |
| 705 checkBuiltImage(od); | 792 checkBuiltImage(od); |
| 706 }); | 793 }); |
| 707 }); | 794 }); |
| 708 | 795 |
| 709 | 796 |
| 710 unittest.group("obj-schema-CancelBuildRequest", () { | 797 unittest.group("obj-schema-CancelBuildRequest", () { |
| 711 unittest.test("to-json--from-json", () { | 798 unittest.test("to-json--from-json", () { |
| 712 var o = buildCancelBuildRequest(); | 799 var o = buildCancelBuildRequest(); |
| 713 var od = new api.CancelBuildRequest.fromJson(o.toJson()); | 800 var od = new api.CancelBuildRequest.fromJson(o.toJson()); |
| 714 checkCancelBuildRequest(od); | 801 checkCancelBuildRequest(od); |
| 715 }); | 802 }); |
| 716 }); | 803 }); |
| 717 | 804 |
| 718 | 805 |
| 806 unittest.group("obj-schema-Empty", () { |
| 807 unittest.test("to-json--from-json", () { |
| 808 var o = buildEmpty(); |
| 809 var od = new api.Empty.fromJson(o.toJson()); |
| 810 checkEmpty(od); |
| 811 }); |
| 812 }); |
| 813 |
| 814 |
| 719 unittest.group("obj-schema-FileHashes", () { | 815 unittest.group("obj-schema-FileHashes", () { |
| 720 unittest.test("to-json--from-json", () { | 816 unittest.test("to-json--from-json", () { |
| 721 var o = buildFileHashes(); | 817 var o = buildFileHashes(); |
| 722 var od = new api.FileHashes.fromJson(o.toJson()); | 818 var od = new api.FileHashes.fromJson(o.toJson()); |
| 723 checkFileHashes(od); | 819 checkFileHashes(od); |
| 724 }); | 820 }); |
| 725 }); | 821 }); |
| 726 | 822 |
| 727 | 823 |
| 728 unittest.group("obj-schema-Hash", () { | 824 unittest.group("obj-schema-Hash", () { |
| 729 unittest.test("to-json--from-json", () { | 825 unittest.test("to-json--from-json", () { |
| 730 var o = buildHash(); | 826 var o = buildHash(); |
| 731 var od = new api.Hash.fromJson(o.toJson()); | 827 var od = new api.Hash.fromJson(o.toJson()); |
| 732 checkHash(od); | 828 checkHash(od); |
| 733 }); | 829 }); |
| 734 }); | 830 }); |
| 735 | 831 |
| 736 | 832 |
| 833 unittest.group("obj-schema-ListBuildTriggersResponse", () { |
| 834 unittest.test("to-json--from-json", () { |
| 835 var o = buildListBuildTriggersResponse(); |
| 836 var od = new api.ListBuildTriggersResponse.fromJson(o.toJson()); |
| 837 checkListBuildTriggersResponse(od); |
| 838 }); |
| 839 }); |
| 840 |
| 841 |
| 737 unittest.group("obj-schema-ListBuildsResponse", () { | 842 unittest.group("obj-schema-ListBuildsResponse", () { |
| 738 unittest.test("to-json--from-json", () { | 843 unittest.test("to-json--from-json", () { |
| 739 var o = buildListBuildsResponse(); | 844 var o = buildListBuildsResponse(); |
| 740 var od = new api.ListBuildsResponse.fromJson(o.toJson()); | 845 var od = new api.ListBuildsResponse.fromJson(o.toJson()); |
| 741 checkListBuildsResponse(od); | 846 checkListBuildsResponse(od); |
| 742 }); | 847 }); |
| 743 }); | 848 }); |
| 744 | 849 |
| 745 | 850 |
| 746 unittest.group("obj-schema-ListOperationsResponse", () { | 851 unittest.group("obj-schema-ListOperationsResponse", () { |
| (...skipping 393 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1140 return new async.Future.value(stringResponse(200, h, resp)); | 1245 return new async.Future.value(stringResponse(200, h, resp)); |
| 1141 }), true); | 1246 }), true); |
| 1142 res.list(arg_projectId, pageSize: arg_pageSize, pageToken: arg_pageToken).
then(unittest.expectAsync(((api.ListBuildsResponse response) { | 1247 res.list(arg_projectId, pageSize: arg_pageSize, pageToken: arg_pageToken).
then(unittest.expectAsync(((api.ListBuildsResponse response) { |
| 1143 checkListBuildsResponse(response); | 1248 checkListBuildsResponse(response); |
| 1144 }))); | 1249 }))); |
| 1145 }); | 1250 }); |
| 1146 | 1251 |
| 1147 }); | 1252 }); |
| 1148 | 1253 |
| 1149 | 1254 |
| 1255 unittest.group("resource-ProjectsTriggersResourceApi", () { |
| 1256 unittest.test("method--create", () { |
| 1257 |
| 1258 var mock = new HttpServerMock(); |
| 1259 api.ProjectsTriggersResourceApi res = new api.CloudbuildApi(mock).projects
.triggers; |
| 1260 var arg_request = buildBuildTrigger(); |
| 1261 var arg_projectId = "foo"; |
| 1262 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 1263 var obj = new api.BuildTrigger.fromJson(json); |
| 1264 checkBuildTrigger(obj); |
| 1265 |
| 1266 var path = (req.url).path; |
| 1267 var pathOffset = 0; |
| 1268 var index; |
| 1269 var subPart; |
| 1270 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 1271 pathOffset += 1; |
| 1272 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("v1/projects/")); |
| 1273 pathOffset += 12; |
| 1274 index = path.indexOf("/triggers", pathOffset); |
| 1275 unittest.expect(index >= 0, unittest.isTrue); |
| 1276 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); |
| 1277 pathOffset = index; |
| 1278 unittest.expect(subPart, unittest.equals("$arg_projectId")); |
| 1279 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("/triggers")); |
| 1280 pathOffset += 9; |
| 1281 |
| 1282 var query = (req.url).query; |
| 1283 var queryOffset = 0; |
| 1284 var queryMap = {}; |
| 1285 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 1286 parseBool(n) { |
| 1287 if (n == "true") return true; |
| 1288 if (n == "false") return false; |
| 1289 if (n == null) return null; |
| 1290 throw new core.ArgumentError("Invalid boolean: $n"); |
| 1291 } |
| 1292 if (query.length > 0) { |
| 1293 for (var part in query.split("&")) { |
| 1294 var keyvalue = part.split("="); |
| 1295 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 1296 } |
| 1297 } |
| 1298 |
| 1299 |
| 1300 var h = { |
| 1301 "content-type" : "application/json; charset=utf-8", |
| 1302 }; |
| 1303 var resp = convert.JSON.encode(buildBuildTrigger()); |
| 1304 return new async.Future.value(stringResponse(200, h, resp)); |
| 1305 }), true); |
| 1306 res.create(arg_request, arg_projectId).then(unittest.expectAsync(((api.Bui
ldTrigger response) { |
| 1307 checkBuildTrigger(response); |
| 1308 }))); |
| 1309 }); |
| 1310 |
| 1311 unittest.test("method--delete", () { |
| 1312 |
| 1313 var mock = new HttpServerMock(); |
| 1314 api.ProjectsTriggersResourceApi res = new api.CloudbuildApi(mock).projects
.triggers; |
| 1315 var arg_projectId = "foo"; |
| 1316 var arg_triggerId = "foo"; |
| 1317 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 1318 var path = (req.url).path; |
| 1319 var pathOffset = 0; |
| 1320 var index; |
| 1321 var subPart; |
| 1322 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 1323 pathOffset += 1; |
| 1324 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("v1/projects/")); |
| 1325 pathOffset += 12; |
| 1326 index = path.indexOf("/triggers/", pathOffset); |
| 1327 unittest.expect(index >= 0, unittest.isTrue); |
| 1328 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); |
| 1329 pathOffset = index; |
| 1330 unittest.expect(subPart, unittest.equals("$arg_projectId")); |
| 1331 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("/triggers/")); |
| 1332 pathOffset += 10; |
| 1333 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); |
| 1334 pathOffset = path.length; |
| 1335 unittest.expect(subPart, unittest.equals("$arg_triggerId")); |
| 1336 |
| 1337 var query = (req.url).query; |
| 1338 var queryOffset = 0; |
| 1339 var queryMap = {}; |
| 1340 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 1341 parseBool(n) { |
| 1342 if (n == "true") return true; |
| 1343 if (n == "false") return false; |
| 1344 if (n == null) return null; |
| 1345 throw new core.ArgumentError("Invalid boolean: $n"); |
| 1346 } |
| 1347 if (query.length > 0) { |
| 1348 for (var part in query.split("&")) { |
| 1349 var keyvalue = part.split("="); |
| 1350 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 1351 } |
| 1352 } |
| 1353 |
| 1354 |
| 1355 var h = { |
| 1356 "content-type" : "application/json; charset=utf-8", |
| 1357 }; |
| 1358 var resp = convert.JSON.encode(buildEmpty()); |
| 1359 return new async.Future.value(stringResponse(200, h, resp)); |
| 1360 }), true); |
| 1361 res.delete(arg_projectId, arg_triggerId).then(unittest.expectAsync(((api.E
mpty response) { |
| 1362 checkEmpty(response); |
| 1363 }))); |
| 1364 }); |
| 1365 |
| 1366 unittest.test("method--get", () { |
| 1367 |
| 1368 var mock = new HttpServerMock(); |
| 1369 api.ProjectsTriggersResourceApi res = new api.CloudbuildApi(mock).projects
.triggers; |
| 1370 var arg_projectId = "foo"; |
| 1371 var arg_triggerId = "foo"; |
| 1372 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 1373 var path = (req.url).path; |
| 1374 var pathOffset = 0; |
| 1375 var index; |
| 1376 var subPart; |
| 1377 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 1378 pathOffset += 1; |
| 1379 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("v1/projects/")); |
| 1380 pathOffset += 12; |
| 1381 index = path.indexOf("/triggers/", pathOffset); |
| 1382 unittest.expect(index >= 0, unittest.isTrue); |
| 1383 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); |
| 1384 pathOffset = index; |
| 1385 unittest.expect(subPart, unittest.equals("$arg_projectId")); |
| 1386 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("/triggers/")); |
| 1387 pathOffset += 10; |
| 1388 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); |
| 1389 pathOffset = path.length; |
| 1390 unittest.expect(subPart, unittest.equals("$arg_triggerId")); |
| 1391 |
| 1392 var query = (req.url).query; |
| 1393 var queryOffset = 0; |
| 1394 var queryMap = {}; |
| 1395 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 1396 parseBool(n) { |
| 1397 if (n == "true") return true; |
| 1398 if (n == "false") return false; |
| 1399 if (n == null) return null; |
| 1400 throw new core.ArgumentError("Invalid boolean: $n"); |
| 1401 } |
| 1402 if (query.length > 0) { |
| 1403 for (var part in query.split("&")) { |
| 1404 var keyvalue = part.split("="); |
| 1405 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 1406 } |
| 1407 } |
| 1408 |
| 1409 |
| 1410 var h = { |
| 1411 "content-type" : "application/json; charset=utf-8", |
| 1412 }; |
| 1413 var resp = convert.JSON.encode(buildBuildTrigger()); |
| 1414 return new async.Future.value(stringResponse(200, h, resp)); |
| 1415 }), true); |
| 1416 res.get(arg_projectId, arg_triggerId).then(unittest.expectAsync(((api.Buil
dTrigger response) { |
| 1417 checkBuildTrigger(response); |
| 1418 }))); |
| 1419 }); |
| 1420 |
| 1421 unittest.test("method--list", () { |
| 1422 |
| 1423 var mock = new HttpServerMock(); |
| 1424 api.ProjectsTriggersResourceApi res = new api.CloudbuildApi(mock).projects
.triggers; |
| 1425 var arg_projectId = "foo"; |
| 1426 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 1427 var path = (req.url).path; |
| 1428 var pathOffset = 0; |
| 1429 var index; |
| 1430 var subPart; |
| 1431 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 1432 pathOffset += 1; |
| 1433 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("v1/projects/")); |
| 1434 pathOffset += 12; |
| 1435 index = path.indexOf("/triggers", pathOffset); |
| 1436 unittest.expect(index >= 0, unittest.isTrue); |
| 1437 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); |
| 1438 pathOffset = index; |
| 1439 unittest.expect(subPart, unittest.equals("$arg_projectId")); |
| 1440 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("/triggers")); |
| 1441 pathOffset += 9; |
| 1442 |
| 1443 var query = (req.url).query; |
| 1444 var queryOffset = 0; |
| 1445 var queryMap = {}; |
| 1446 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 1447 parseBool(n) { |
| 1448 if (n == "true") return true; |
| 1449 if (n == "false") return false; |
| 1450 if (n == null) return null; |
| 1451 throw new core.ArgumentError("Invalid boolean: $n"); |
| 1452 } |
| 1453 if (query.length > 0) { |
| 1454 for (var part in query.split("&")) { |
| 1455 var keyvalue = part.split("="); |
| 1456 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 1457 } |
| 1458 } |
| 1459 |
| 1460 |
| 1461 var h = { |
| 1462 "content-type" : "application/json; charset=utf-8", |
| 1463 }; |
| 1464 var resp = convert.JSON.encode(buildListBuildTriggersResponse()); |
| 1465 return new async.Future.value(stringResponse(200, h, resp)); |
| 1466 }), true); |
| 1467 res.list(arg_projectId).then(unittest.expectAsync(((api.ListBuildTriggersR
esponse response) { |
| 1468 checkListBuildTriggersResponse(response); |
| 1469 }))); |
| 1470 }); |
| 1471 |
| 1472 unittest.test("method--patch", () { |
| 1473 |
| 1474 var mock = new HttpServerMock(); |
| 1475 api.ProjectsTriggersResourceApi res = new api.CloudbuildApi(mock).projects
.triggers; |
| 1476 var arg_request = buildBuildTrigger(); |
| 1477 var arg_projectId = "foo"; |
| 1478 var arg_triggerId = "foo"; |
| 1479 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 1480 var obj = new api.BuildTrigger.fromJson(json); |
| 1481 checkBuildTrigger(obj); |
| 1482 |
| 1483 var path = (req.url).path; |
| 1484 var pathOffset = 0; |
| 1485 var index; |
| 1486 var subPart; |
| 1487 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 1488 pathOffset += 1; |
| 1489 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("v1/projects/")); |
| 1490 pathOffset += 12; |
| 1491 index = path.indexOf("/triggers/", pathOffset); |
| 1492 unittest.expect(index >= 0, unittest.isTrue); |
| 1493 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); |
| 1494 pathOffset = index; |
| 1495 unittest.expect(subPart, unittest.equals("$arg_projectId")); |
| 1496 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("/triggers/")); |
| 1497 pathOffset += 10; |
| 1498 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); |
| 1499 pathOffset = path.length; |
| 1500 unittest.expect(subPart, unittest.equals("$arg_triggerId")); |
| 1501 |
| 1502 var query = (req.url).query; |
| 1503 var queryOffset = 0; |
| 1504 var queryMap = {}; |
| 1505 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 1506 parseBool(n) { |
| 1507 if (n == "true") return true; |
| 1508 if (n == "false") return false; |
| 1509 if (n == null) return null; |
| 1510 throw new core.ArgumentError("Invalid boolean: $n"); |
| 1511 } |
| 1512 if (query.length > 0) { |
| 1513 for (var part in query.split("&")) { |
| 1514 var keyvalue = part.split("="); |
| 1515 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 1516 } |
| 1517 } |
| 1518 |
| 1519 |
| 1520 var h = { |
| 1521 "content-type" : "application/json; charset=utf-8", |
| 1522 }; |
| 1523 var resp = convert.JSON.encode(buildBuildTrigger()); |
| 1524 return new async.Future.value(stringResponse(200, h, resp)); |
| 1525 }), true); |
| 1526 res.patch(arg_request, arg_projectId, arg_triggerId).then(unittest.expectA
sync(((api.BuildTrigger response) { |
| 1527 checkBuildTrigger(response); |
| 1528 }))); |
| 1529 }); |
| 1530 |
| 1531 }); |
| 1532 |
| 1533 |
| 1150 } | 1534 } |
| 1151 | 1535 |
| OLD | NEW |