| 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 buildUnnamed1412() { | 54 buildUnnamed1422() { |
| 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 checkUnnamed1412(core.List<core.String> o) { | 61 checkUnnamed1422(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 buildUnnamed1413() { | 67 buildUnnamed1423() { |
| 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 checkUnnamed1413(core.List<api.BuildStep> o) { | 74 checkUnnamed1423(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.buildTriggerId = "foo"; |
| 85 o.createTime = "foo"; | 86 o.createTime = "foo"; |
| 86 o.finishTime = "foo"; | 87 o.finishTime = "foo"; |
| 87 o.id = "foo"; | 88 o.id = "foo"; |
| 88 o.images = buildUnnamed1412(); | 89 o.images = buildUnnamed1422(); |
| 89 o.logUrl = "foo"; | 90 o.logUrl = "foo"; |
| 90 o.logsBucket = "foo"; | 91 o.logsBucket = "foo"; |
| 91 o.options = buildBuildOptions(); | 92 o.options = buildBuildOptions(); |
| 92 o.projectId = "foo"; | 93 o.projectId = "foo"; |
| 93 o.results = buildResults(); | 94 o.results = buildResults(); |
| 94 o.source = buildSource(); | 95 o.source = buildSource(); |
| 95 o.sourceProvenance = buildSourceProvenance(); | 96 o.sourceProvenance = buildSourceProvenance(); |
| 96 o.startTime = "foo"; | 97 o.startTime = "foo"; |
| 97 o.status = "foo"; | 98 o.status = "foo"; |
| 98 o.statusDetail = "foo"; | 99 o.statusDetail = "foo"; |
| 99 o.steps = buildUnnamed1413(); | 100 o.steps = buildUnnamed1423(); |
| 100 o.timeout = "foo"; | 101 o.timeout = "foo"; |
| 101 } | 102 } |
| 102 buildCounterBuild--; | 103 buildCounterBuild--; |
| 103 return o; | 104 return o; |
| 104 } | 105 } |
| 105 | 106 |
| 106 checkBuild(api.Build o) { | 107 checkBuild(api.Build o) { |
| 107 buildCounterBuild++; | 108 buildCounterBuild++; |
| 108 if (buildCounterBuild < 3) { | 109 if (buildCounterBuild < 3) { |
| 110 unittest.expect(o.buildTriggerId, unittest.equals('foo')); |
| 109 unittest.expect(o.createTime, unittest.equals('foo')); | 111 unittest.expect(o.createTime, unittest.equals('foo')); |
| 110 unittest.expect(o.finishTime, unittest.equals('foo')); | 112 unittest.expect(o.finishTime, unittest.equals('foo')); |
| 111 unittest.expect(o.id, unittest.equals('foo')); | 113 unittest.expect(o.id, unittest.equals('foo')); |
| 112 checkUnnamed1412(o.images); | 114 checkUnnamed1422(o.images); |
| 113 unittest.expect(o.logUrl, unittest.equals('foo')); | 115 unittest.expect(o.logUrl, unittest.equals('foo')); |
| 114 unittest.expect(o.logsBucket, unittest.equals('foo')); | 116 unittest.expect(o.logsBucket, unittest.equals('foo')); |
| 115 checkBuildOptions(o.options); | 117 checkBuildOptions(o.options); |
| 116 unittest.expect(o.projectId, unittest.equals('foo')); | 118 unittest.expect(o.projectId, unittest.equals('foo')); |
| 117 checkResults(o.results); | 119 checkResults(o.results); |
| 118 checkSource(o.source); | 120 checkSource(o.source); |
| 119 checkSourceProvenance(o.sourceProvenance); | 121 checkSourceProvenance(o.sourceProvenance); |
| 120 unittest.expect(o.startTime, unittest.equals('foo')); | 122 unittest.expect(o.startTime, unittest.equals('foo')); |
| 121 unittest.expect(o.status, unittest.equals('foo')); | 123 unittest.expect(o.status, unittest.equals('foo')); |
| 122 unittest.expect(o.statusDetail, unittest.equals('foo')); | 124 unittest.expect(o.statusDetail, unittest.equals('foo')); |
| 123 checkUnnamed1413(o.steps); | 125 checkUnnamed1423(o.steps); |
| 124 unittest.expect(o.timeout, unittest.equals('foo')); | 126 unittest.expect(o.timeout, unittest.equals('foo')); |
| 125 } | 127 } |
| 126 buildCounterBuild--; | 128 buildCounterBuild--; |
| 127 } | 129 } |
| 128 | 130 |
| 129 core.int buildCounterBuildOperationMetadata = 0; | 131 core.int buildCounterBuildOperationMetadata = 0; |
| 130 buildBuildOperationMetadata() { | 132 buildBuildOperationMetadata() { |
| 131 var o = new api.BuildOperationMetadata(); | 133 var o = new api.BuildOperationMetadata(); |
| 132 buildCounterBuildOperationMetadata++; | 134 buildCounterBuildOperationMetadata++; |
| 133 if (buildCounterBuildOperationMetadata < 3) { | 135 if (buildCounterBuildOperationMetadata < 3) { |
| 134 o.build = buildBuild(); | 136 o.build = buildBuild(); |
| 135 } | 137 } |
| 136 buildCounterBuildOperationMetadata--; | 138 buildCounterBuildOperationMetadata--; |
| 137 return o; | 139 return o; |
| 138 } | 140 } |
| 139 | 141 |
| 140 checkBuildOperationMetadata(api.BuildOperationMetadata o) { | 142 checkBuildOperationMetadata(api.BuildOperationMetadata o) { |
| 141 buildCounterBuildOperationMetadata++; | 143 buildCounterBuildOperationMetadata++; |
| 142 if (buildCounterBuildOperationMetadata < 3) { | 144 if (buildCounterBuildOperationMetadata < 3) { |
| 143 checkBuild(o.build); | 145 checkBuild(o.build); |
| 144 } | 146 } |
| 145 buildCounterBuildOperationMetadata--; | 147 buildCounterBuildOperationMetadata--; |
| 146 } | 148 } |
| 147 | 149 |
| 148 buildUnnamed1414() { | 150 buildUnnamed1424() { |
| 149 var o = new core.List<core.String>(); | 151 var o = new core.List<core.String>(); |
| 150 o.add("foo"); | 152 o.add("foo"); |
| 151 o.add("foo"); | 153 o.add("foo"); |
| 152 return o; | 154 return o; |
| 153 } | 155 } |
| 154 | 156 |
| 155 checkUnnamed1414(core.List<core.String> o) { | 157 checkUnnamed1424(core.List<core.String> o) { |
| 156 unittest.expect(o, unittest.hasLength(2)); | 158 unittest.expect(o, unittest.hasLength(2)); |
| 157 unittest.expect(o[0], unittest.equals('foo')); | 159 unittest.expect(o[0], unittest.equals('foo')); |
| 158 unittest.expect(o[1], unittest.equals('foo')); | 160 unittest.expect(o[1], unittest.equals('foo')); |
| 159 } | 161 } |
| 160 | 162 |
| 161 core.int buildCounterBuildOptions = 0; | 163 core.int buildCounterBuildOptions = 0; |
| 162 buildBuildOptions() { | 164 buildBuildOptions() { |
| 163 var o = new api.BuildOptions(); | 165 var o = new api.BuildOptions(); |
| 164 buildCounterBuildOptions++; | 166 buildCounterBuildOptions++; |
| 165 if (buildCounterBuildOptions < 3) { | 167 if (buildCounterBuildOptions < 3) { |
| 166 o.requestedVerifyOption = "foo"; | 168 o.requestedVerifyOption = "foo"; |
| 167 o.sourceProvenanceHash = buildUnnamed1414(); | 169 o.sourceProvenanceHash = buildUnnamed1424(); |
| 168 } | 170 } |
| 169 buildCounterBuildOptions--; | 171 buildCounterBuildOptions--; |
| 170 return o; | 172 return o; |
| 171 } | 173 } |
| 172 | 174 |
| 173 checkBuildOptions(api.BuildOptions o) { | 175 checkBuildOptions(api.BuildOptions o) { |
| 174 buildCounterBuildOptions++; | 176 buildCounterBuildOptions++; |
| 175 if (buildCounterBuildOptions < 3) { | 177 if (buildCounterBuildOptions < 3) { |
| 176 unittest.expect(o.requestedVerifyOption, unittest.equals('foo')); | 178 unittest.expect(o.requestedVerifyOption, unittest.equals('foo')); |
| 177 checkUnnamed1414(o.sourceProvenanceHash); | 179 checkUnnamed1424(o.sourceProvenanceHash); |
| 178 } | 180 } |
| 179 buildCounterBuildOptions--; | 181 buildCounterBuildOptions--; |
| 180 } | 182 } |
| 181 | 183 |
| 182 buildUnnamed1415() { | 184 buildUnnamed1425() { |
| 183 var o = new core.List<core.String>(); | 185 var o = new core.List<core.String>(); |
| 184 o.add("foo"); | 186 o.add("foo"); |
| 185 o.add("foo"); | 187 o.add("foo"); |
| 186 return o; | 188 return o; |
| 187 } | 189 } |
| 188 | 190 |
| 189 checkUnnamed1415(core.List<core.String> o) { | 191 checkUnnamed1425(core.List<core.String> o) { |
| 190 unittest.expect(o, unittest.hasLength(2)); | 192 unittest.expect(o, unittest.hasLength(2)); |
| 191 unittest.expect(o[0], unittest.equals('foo')); | 193 unittest.expect(o[0], unittest.equals('foo')); |
| 192 unittest.expect(o[1], unittest.equals('foo')); | 194 unittest.expect(o[1], unittest.equals('foo')); |
| 193 } | 195 } |
| 194 | 196 |
| 195 buildUnnamed1416() { | 197 buildUnnamed1426() { |
| 196 var o = new core.List<core.String>(); | 198 var o = new core.List<core.String>(); |
| 197 o.add("foo"); | 199 o.add("foo"); |
| 198 o.add("foo"); | 200 o.add("foo"); |
| 199 return o; | 201 return o; |
| 200 } | 202 } |
| 201 | 203 |
| 202 checkUnnamed1416(core.List<core.String> o) { | 204 checkUnnamed1426(core.List<core.String> o) { |
| 203 unittest.expect(o, unittest.hasLength(2)); | 205 unittest.expect(o, unittest.hasLength(2)); |
| 204 unittest.expect(o[0], unittest.equals('foo')); | 206 unittest.expect(o[0], unittest.equals('foo')); |
| 205 unittest.expect(o[1], unittest.equals('foo')); | 207 unittest.expect(o[1], unittest.equals('foo')); |
| 206 } | 208 } |
| 207 | 209 |
| 208 buildUnnamed1417() { | 210 buildUnnamed1427() { |
| 209 var o = new core.List<core.String>(); | 211 var o = new core.List<core.String>(); |
| 210 o.add("foo"); | 212 o.add("foo"); |
| 211 o.add("foo"); | 213 o.add("foo"); |
| 212 return o; | 214 return o; |
| 213 } | 215 } |
| 214 | 216 |
| 215 checkUnnamed1417(core.List<core.String> o) { | 217 checkUnnamed1427(core.List<core.String> o) { |
| 216 unittest.expect(o, unittest.hasLength(2)); | 218 unittest.expect(o, unittest.hasLength(2)); |
| 217 unittest.expect(o[0], unittest.equals('foo')); | 219 unittest.expect(o[0], unittest.equals('foo')); |
| 218 unittest.expect(o[1], unittest.equals('foo')); | 220 unittest.expect(o[1], unittest.equals('foo')); |
| 219 } | 221 } |
| 220 | 222 |
| 221 core.int buildCounterBuildStep = 0; | 223 core.int buildCounterBuildStep = 0; |
| 222 buildBuildStep() { | 224 buildBuildStep() { |
| 223 var o = new api.BuildStep(); | 225 var o = new api.BuildStep(); |
| 224 buildCounterBuildStep++; | 226 buildCounterBuildStep++; |
| 225 if (buildCounterBuildStep < 3) { | 227 if (buildCounterBuildStep < 3) { |
| 226 o.args = buildUnnamed1415(); | 228 o.args = buildUnnamed1425(); |
| 227 o.dir = "foo"; | 229 o.dir = "foo"; |
| 228 o.env = buildUnnamed1416(); | 230 o.env = buildUnnamed1426(); |
| 229 o.id = "foo"; | 231 o.id = "foo"; |
| 230 o.name = "foo"; | 232 o.name = "foo"; |
| 231 o.waitFor = buildUnnamed1417(); | 233 o.waitFor = buildUnnamed1427(); |
| 232 } | 234 } |
| 233 buildCounterBuildStep--; | 235 buildCounterBuildStep--; |
| 234 return o; | 236 return o; |
| 235 } | 237 } |
| 236 | 238 |
| 237 checkBuildStep(api.BuildStep o) { | 239 checkBuildStep(api.BuildStep o) { |
| 238 buildCounterBuildStep++; | 240 buildCounterBuildStep++; |
| 239 if (buildCounterBuildStep < 3) { | 241 if (buildCounterBuildStep < 3) { |
| 240 checkUnnamed1415(o.args); | 242 checkUnnamed1425(o.args); |
| 241 unittest.expect(o.dir, unittest.equals('foo')); | 243 unittest.expect(o.dir, unittest.equals('foo')); |
| 242 checkUnnamed1416(o.env); | 244 checkUnnamed1426(o.env); |
| 243 unittest.expect(o.id, unittest.equals('foo')); | 245 unittest.expect(o.id, unittest.equals('foo')); |
| 244 unittest.expect(o.name, unittest.equals('foo')); | 246 unittest.expect(o.name, unittest.equals('foo')); |
| 245 checkUnnamed1417(o.waitFor); | 247 checkUnnamed1427(o.waitFor); |
| 246 } | 248 } |
| 247 buildCounterBuildStep--; | 249 buildCounterBuildStep--; |
| 248 } | 250 } |
| 249 | 251 |
| 250 core.int buildCounterBuildTrigger = 0; | 252 core.int buildCounterBuildTrigger = 0; |
| 251 buildBuildTrigger() { | 253 buildBuildTrigger() { |
| 252 var o = new api.BuildTrigger(); | 254 var o = new api.BuildTrigger(); |
| 253 buildCounterBuildTrigger++; | 255 buildCounterBuildTrigger++; |
| 254 if (buildCounterBuildTrigger < 3) { | 256 if (buildCounterBuildTrigger < 3) { |
| 255 o.build = buildBuild(); | 257 o.build = buildBuild(); |
| 256 o.createTime = "foo"; | 258 o.createTime = "foo"; |
| 259 o.description = "foo"; |
| 260 o.disabled = true; |
| 257 o.filename = "foo"; | 261 o.filename = "foo"; |
| 258 o.id = "foo"; | 262 o.id = "foo"; |
| 259 o.triggerTemplate = buildRepoSource(); | 263 o.triggerTemplate = buildRepoSource(); |
| 260 } | 264 } |
| 261 buildCounterBuildTrigger--; | 265 buildCounterBuildTrigger--; |
| 262 return o; | 266 return o; |
| 263 } | 267 } |
| 264 | 268 |
| 265 checkBuildTrigger(api.BuildTrigger o) { | 269 checkBuildTrigger(api.BuildTrigger o) { |
| 266 buildCounterBuildTrigger++; | 270 buildCounterBuildTrigger++; |
| 267 if (buildCounterBuildTrigger < 3) { | 271 if (buildCounterBuildTrigger < 3) { |
| 268 checkBuild(o.build); | 272 checkBuild(o.build); |
| 269 unittest.expect(o.createTime, unittest.equals('foo')); | 273 unittest.expect(o.createTime, unittest.equals('foo')); |
| 274 unittest.expect(o.description, unittest.equals('foo')); |
| 275 unittest.expect(o.disabled, unittest.isTrue); |
| 270 unittest.expect(o.filename, unittest.equals('foo')); | 276 unittest.expect(o.filename, unittest.equals('foo')); |
| 271 unittest.expect(o.id, unittest.equals('foo')); | 277 unittest.expect(o.id, unittest.equals('foo')); |
| 272 checkRepoSource(o.triggerTemplate); | 278 checkRepoSource(o.triggerTemplate); |
| 273 } | 279 } |
| 274 buildCounterBuildTrigger--; | 280 buildCounterBuildTrigger--; |
| 275 } | 281 } |
| 276 | 282 |
| 277 core.int buildCounterBuiltImage = 0; | 283 core.int buildCounterBuiltImage = 0; |
| 278 buildBuiltImage() { | 284 buildBuiltImage() { |
| 279 var o = new api.BuiltImage(); | 285 var o = new api.BuiltImage(); |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 322 return o; | 328 return o; |
| 323 } | 329 } |
| 324 | 330 |
| 325 checkEmpty(api.Empty o) { | 331 checkEmpty(api.Empty o) { |
| 326 buildCounterEmpty++; | 332 buildCounterEmpty++; |
| 327 if (buildCounterEmpty < 3) { | 333 if (buildCounterEmpty < 3) { |
| 328 } | 334 } |
| 329 buildCounterEmpty--; | 335 buildCounterEmpty--; |
| 330 } | 336 } |
| 331 | 337 |
| 332 buildUnnamed1418() { | 338 buildUnnamed1428() { |
| 333 var o = new core.List<api.Hash>(); | 339 var o = new core.List<api.Hash>(); |
| 334 o.add(buildHash()); | 340 o.add(buildHash()); |
| 335 o.add(buildHash()); | 341 o.add(buildHash()); |
| 336 return o; | 342 return o; |
| 337 } | 343 } |
| 338 | 344 |
| 339 checkUnnamed1418(core.List<api.Hash> o) { | 345 checkUnnamed1428(core.List<api.Hash> o) { |
| 340 unittest.expect(o, unittest.hasLength(2)); | 346 unittest.expect(o, unittest.hasLength(2)); |
| 341 checkHash(o[0]); | 347 checkHash(o[0]); |
| 342 checkHash(o[1]); | 348 checkHash(o[1]); |
| 343 } | 349 } |
| 344 | 350 |
| 345 core.int buildCounterFileHashes = 0; | 351 core.int buildCounterFileHashes = 0; |
| 346 buildFileHashes() { | 352 buildFileHashes() { |
| 347 var o = new api.FileHashes(); | 353 var o = new api.FileHashes(); |
| 348 buildCounterFileHashes++; | 354 buildCounterFileHashes++; |
| 349 if (buildCounterFileHashes < 3) { | 355 if (buildCounterFileHashes < 3) { |
| 350 o.fileHash = buildUnnamed1418(); | 356 o.fileHash = buildUnnamed1428(); |
| 351 } | 357 } |
| 352 buildCounterFileHashes--; | 358 buildCounterFileHashes--; |
| 353 return o; | 359 return o; |
| 354 } | 360 } |
| 355 | 361 |
| 356 checkFileHashes(api.FileHashes o) { | 362 checkFileHashes(api.FileHashes o) { |
| 357 buildCounterFileHashes++; | 363 buildCounterFileHashes++; |
| 358 if (buildCounterFileHashes < 3) { | 364 if (buildCounterFileHashes < 3) { |
| 359 checkUnnamed1418(o.fileHash); | 365 checkUnnamed1428(o.fileHash); |
| 360 } | 366 } |
| 361 buildCounterFileHashes--; | 367 buildCounterFileHashes--; |
| 362 } | 368 } |
| 363 | 369 |
| 364 core.int buildCounterHash = 0; | 370 core.int buildCounterHash = 0; |
| 365 buildHash() { | 371 buildHash() { |
| 366 var o = new api.Hash(); | 372 var o = new api.Hash(); |
| 367 buildCounterHash++; | 373 buildCounterHash++; |
| 368 if (buildCounterHash < 3) { | 374 if (buildCounterHash < 3) { |
| 369 o.type = "foo"; | 375 o.type = "foo"; |
| 370 o.value = "foo"; | 376 o.value = "foo"; |
| 371 } | 377 } |
| 372 buildCounterHash--; | 378 buildCounterHash--; |
| 373 return o; | 379 return o; |
| 374 } | 380 } |
| 375 | 381 |
| 376 checkHash(api.Hash o) { | 382 checkHash(api.Hash o) { |
| 377 buildCounterHash++; | 383 buildCounterHash++; |
| 378 if (buildCounterHash < 3) { | 384 if (buildCounterHash < 3) { |
| 379 unittest.expect(o.type, unittest.equals('foo')); | 385 unittest.expect(o.type, unittest.equals('foo')); |
| 380 unittest.expect(o.value, unittest.equals('foo')); | 386 unittest.expect(o.value, unittest.equals('foo')); |
| 381 } | 387 } |
| 382 buildCounterHash--; | 388 buildCounterHash--; |
| 383 } | 389 } |
| 384 | 390 |
| 385 buildUnnamed1419() { | 391 buildUnnamed1429() { |
| 386 var o = new core.List<api.BuildTrigger>(); | 392 var o = new core.List<api.BuildTrigger>(); |
| 387 o.add(buildBuildTrigger()); | 393 o.add(buildBuildTrigger()); |
| 388 o.add(buildBuildTrigger()); | 394 o.add(buildBuildTrigger()); |
| 389 return o; | 395 return o; |
| 390 } | 396 } |
| 391 | 397 |
| 392 checkUnnamed1419(core.List<api.BuildTrigger> o) { | 398 checkUnnamed1429(core.List<api.BuildTrigger> o) { |
| 393 unittest.expect(o, unittest.hasLength(2)); | 399 unittest.expect(o, unittest.hasLength(2)); |
| 394 checkBuildTrigger(o[0]); | 400 checkBuildTrigger(o[0]); |
| 395 checkBuildTrigger(o[1]); | 401 checkBuildTrigger(o[1]); |
| 396 } | 402 } |
| 397 | 403 |
| 398 core.int buildCounterListBuildTriggersResponse = 0; | 404 core.int buildCounterListBuildTriggersResponse = 0; |
| 399 buildListBuildTriggersResponse() { | 405 buildListBuildTriggersResponse() { |
| 400 var o = new api.ListBuildTriggersResponse(); | 406 var o = new api.ListBuildTriggersResponse(); |
| 401 buildCounterListBuildTriggersResponse++; | 407 buildCounterListBuildTriggersResponse++; |
| 402 if (buildCounterListBuildTriggersResponse < 3) { | 408 if (buildCounterListBuildTriggersResponse < 3) { |
| 403 o.triggers = buildUnnamed1419(); | 409 o.triggers = buildUnnamed1429(); |
| 404 } | 410 } |
| 405 buildCounterListBuildTriggersResponse--; | 411 buildCounterListBuildTriggersResponse--; |
| 406 return o; | 412 return o; |
| 407 } | 413 } |
| 408 | 414 |
| 409 checkListBuildTriggersResponse(api.ListBuildTriggersResponse o) { | 415 checkListBuildTriggersResponse(api.ListBuildTriggersResponse o) { |
| 410 buildCounterListBuildTriggersResponse++; | 416 buildCounterListBuildTriggersResponse++; |
| 411 if (buildCounterListBuildTriggersResponse < 3) { | 417 if (buildCounterListBuildTriggersResponse < 3) { |
| 412 checkUnnamed1419(o.triggers); | 418 checkUnnamed1429(o.triggers); |
| 413 } | 419 } |
| 414 buildCounterListBuildTriggersResponse--; | 420 buildCounterListBuildTriggersResponse--; |
| 415 } | 421 } |
| 416 | 422 |
| 417 buildUnnamed1420() { | 423 buildUnnamed1430() { |
| 418 var o = new core.List<api.Build>(); | 424 var o = new core.List<api.Build>(); |
| 419 o.add(buildBuild()); | 425 o.add(buildBuild()); |
| 420 o.add(buildBuild()); | 426 o.add(buildBuild()); |
| 421 return o; | 427 return o; |
| 422 } | 428 } |
| 423 | 429 |
| 424 checkUnnamed1420(core.List<api.Build> o) { | 430 checkUnnamed1430(core.List<api.Build> o) { |
| 425 unittest.expect(o, unittest.hasLength(2)); | 431 unittest.expect(o, unittest.hasLength(2)); |
| 426 checkBuild(o[0]); | 432 checkBuild(o[0]); |
| 427 checkBuild(o[1]); | 433 checkBuild(o[1]); |
| 428 } | 434 } |
| 429 | 435 |
| 430 core.int buildCounterListBuildsResponse = 0; | 436 core.int buildCounterListBuildsResponse = 0; |
| 431 buildListBuildsResponse() { | 437 buildListBuildsResponse() { |
| 432 var o = new api.ListBuildsResponse(); | 438 var o = new api.ListBuildsResponse(); |
| 433 buildCounterListBuildsResponse++; | 439 buildCounterListBuildsResponse++; |
| 434 if (buildCounterListBuildsResponse < 3) { | 440 if (buildCounterListBuildsResponse < 3) { |
| 435 o.builds = buildUnnamed1420(); | 441 o.builds = buildUnnamed1430(); |
| 436 o.nextPageToken = "foo"; | 442 o.nextPageToken = "foo"; |
| 437 } | 443 } |
| 438 buildCounterListBuildsResponse--; | 444 buildCounterListBuildsResponse--; |
| 439 return o; | 445 return o; |
| 440 } | 446 } |
| 441 | 447 |
| 442 checkListBuildsResponse(api.ListBuildsResponse o) { | 448 checkListBuildsResponse(api.ListBuildsResponse o) { |
| 443 buildCounterListBuildsResponse++; | 449 buildCounterListBuildsResponse++; |
| 444 if (buildCounterListBuildsResponse < 3) { | 450 if (buildCounterListBuildsResponse < 3) { |
| 445 checkUnnamed1420(o.builds); | 451 checkUnnamed1430(o.builds); |
| 446 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 452 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
| 447 } | 453 } |
| 448 buildCounterListBuildsResponse--; | 454 buildCounterListBuildsResponse--; |
| 449 } | 455 } |
| 450 | 456 |
| 451 buildUnnamed1421() { | 457 buildUnnamed1431() { |
| 452 var o = new core.List<api.Operation>(); | 458 var o = new core.List<api.Operation>(); |
| 453 o.add(buildOperation()); | 459 o.add(buildOperation()); |
| 454 o.add(buildOperation()); | 460 o.add(buildOperation()); |
| 455 return o; | 461 return o; |
| 456 } | 462 } |
| 457 | 463 |
| 458 checkUnnamed1421(core.List<api.Operation> o) { | 464 checkUnnamed1431(core.List<api.Operation> o) { |
| 459 unittest.expect(o, unittest.hasLength(2)); | 465 unittest.expect(o, unittest.hasLength(2)); |
| 460 checkOperation(o[0]); | 466 checkOperation(o[0]); |
| 461 checkOperation(o[1]); | 467 checkOperation(o[1]); |
| 462 } | 468 } |
| 463 | 469 |
| 464 core.int buildCounterListOperationsResponse = 0; | 470 core.int buildCounterListOperationsResponse = 0; |
| 465 buildListOperationsResponse() { | 471 buildListOperationsResponse() { |
| 466 var o = new api.ListOperationsResponse(); | 472 var o = new api.ListOperationsResponse(); |
| 467 buildCounterListOperationsResponse++; | 473 buildCounterListOperationsResponse++; |
| 468 if (buildCounterListOperationsResponse < 3) { | 474 if (buildCounterListOperationsResponse < 3) { |
| 469 o.nextPageToken = "foo"; | 475 o.nextPageToken = "foo"; |
| 470 o.operations = buildUnnamed1421(); | 476 o.operations = buildUnnamed1431(); |
| 471 } | 477 } |
| 472 buildCounterListOperationsResponse--; | 478 buildCounterListOperationsResponse--; |
| 473 return o; | 479 return o; |
| 474 } | 480 } |
| 475 | 481 |
| 476 checkListOperationsResponse(api.ListOperationsResponse o) { | 482 checkListOperationsResponse(api.ListOperationsResponse o) { |
| 477 buildCounterListOperationsResponse++; | 483 buildCounterListOperationsResponse++; |
| 478 if (buildCounterListOperationsResponse < 3) { | 484 if (buildCounterListOperationsResponse < 3) { |
| 479 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 485 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
| 480 checkUnnamed1421(o.operations); | 486 checkUnnamed1431(o.operations); |
| 481 } | 487 } |
| 482 buildCounterListOperationsResponse--; | 488 buildCounterListOperationsResponse--; |
| 483 } | 489 } |
| 484 | 490 |
| 485 buildUnnamed1422() { | 491 buildUnnamed1432() { |
| 486 var o = new core.Map<core.String, core.Object>(); | 492 var o = new core.Map<core.String, core.Object>(); |
| 487 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 493 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; |
| 488 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 494 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; |
| 489 return o; | 495 return o; |
| 490 } | 496 } |
| 491 | 497 |
| 492 checkUnnamed1422(core.Map<core.String, core.Object> o) { | 498 checkUnnamed1432(core.Map<core.String, core.Object> o) { |
| 493 unittest.expect(o, unittest.hasLength(2)); | 499 unittest.expect(o, unittest.hasLength(2)); |
| 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')); | 500 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')); |
| 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')); | 501 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')); |
| 496 } | 502 } |
| 497 | 503 |
| 498 buildUnnamed1423() { | 504 buildUnnamed1433() { |
| 499 var o = new core.Map<core.String, core.Object>(); | 505 var o = new core.Map<core.String, core.Object>(); |
| 500 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 506 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; |
| 501 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 507 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; |
| 502 return o; | 508 return o; |
| 503 } | 509 } |
| 504 | 510 |
| 505 checkUnnamed1423(core.Map<core.String, core.Object> o) { | 511 checkUnnamed1433(core.Map<core.String, core.Object> o) { |
| 506 unittest.expect(o, unittest.hasLength(2)); | 512 unittest.expect(o, unittest.hasLength(2)); |
| 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')); | 513 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')); |
| 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')); | 514 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')); |
| 509 } | 515 } |
| 510 | 516 |
| 511 core.int buildCounterOperation = 0; | 517 core.int buildCounterOperation = 0; |
| 512 buildOperation() { | 518 buildOperation() { |
| 513 var o = new api.Operation(); | 519 var o = new api.Operation(); |
| 514 buildCounterOperation++; | 520 buildCounterOperation++; |
| 515 if (buildCounterOperation < 3) { | 521 if (buildCounterOperation < 3) { |
| 516 o.done = true; | 522 o.done = true; |
| 517 o.error = buildStatus(); | 523 o.error = buildStatus(); |
| 518 o.metadata = buildUnnamed1422(); | 524 o.metadata = buildUnnamed1432(); |
| 519 o.name = "foo"; | 525 o.name = "foo"; |
| 520 o.response = buildUnnamed1423(); | 526 o.response = buildUnnamed1433(); |
| 521 } | 527 } |
| 522 buildCounterOperation--; | 528 buildCounterOperation--; |
| 523 return o; | 529 return o; |
| 524 } | 530 } |
| 525 | 531 |
| 526 checkOperation(api.Operation o) { | 532 checkOperation(api.Operation o) { |
| 527 buildCounterOperation++; | 533 buildCounterOperation++; |
| 528 if (buildCounterOperation < 3) { | 534 if (buildCounterOperation < 3) { |
| 529 unittest.expect(o.done, unittest.isTrue); | 535 unittest.expect(o.done, unittest.isTrue); |
| 530 checkStatus(o.error); | 536 checkStatus(o.error); |
| 531 checkUnnamed1422(o.metadata); | 537 checkUnnamed1432(o.metadata); |
| 532 unittest.expect(o.name, unittest.equals('foo')); | 538 unittest.expect(o.name, unittest.equals('foo')); |
| 533 checkUnnamed1423(o.response); | 539 checkUnnamed1433(o.response); |
| 534 } | 540 } |
| 535 buildCounterOperation--; | 541 buildCounterOperation--; |
| 536 } | 542 } |
| 537 | 543 |
| 538 core.int buildCounterRepoSource = 0; | 544 core.int buildCounterRepoSource = 0; |
| 539 buildRepoSource() { | 545 buildRepoSource() { |
| 540 var o = new api.RepoSource(); | 546 var o = new api.RepoSource(); |
| 541 buildCounterRepoSource++; | 547 buildCounterRepoSource++; |
| 542 if (buildCounterRepoSource < 3) { | 548 if (buildCounterRepoSource < 3) { |
| 543 o.branchName = "foo"; | 549 o.branchName = "foo"; |
| (...skipping 11 matching lines...) Expand all Loading... |
| 555 if (buildCounterRepoSource < 3) { | 561 if (buildCounterRepoSource < 3) { |
| 556 unittest.expect(o.branchName, unittest.equals('foo')); | 562 unittest.expect(o.branchName, unittest.equals('foo')); |
| 557 unittest.expect(o.commitSha, unittest.equals('foo')); | 563 unittest.expect(o.commitSha, unittest.equals('foo')); |
| 558 unittest.expect(o.projectId, unittest.equals('foo')); | 564 unittest.expect(o.projectId, unittest.equals('foo')); |
| 559 unittest.expect(o.repoName, unittest.equals('foo')); | 565 unittest.expect(o.repoName, unittest.equals('foo')); |
| 560 unittest.expect(o.tagName, unittest.equals('foo')); | 566 unittest.expect(o.tagName, unittest.equals('foo')); |
| 561 } | 567 } |
| 562 buildCounterRepoSource--; | 568 buildCounterRepoSource--; |
| 563 } | 569 } |
| 564 | 570 |
| 565 buildUnnamed1424() { | 571 buildUnnamed1434() { |
| 566 var o = new core.List<core.String>(); | 572 var o = new core.List<core.String>(); |
| 567 o.add("foo"); | 573 o.add("foo"); |
| 568 o.add("foo"); | 574 o.add("foo"); |
| 569 return o; | 575 return o; |
| 570 } | 576 } |
| 571 | 577 |
| 572 checkUnnamed1424(core.List<core.String> o) { | 578 checkUnnamed1434(core.List<core.String> o) { |
| 573 unittest.expect(o, unittest.hasLength(2)); | 579 unittest.expect(o, unittest.hasLength(2)); |
| 574 unittest.expect(o[0], unittest.equals('foo')); | 580 unittest.expect(o[0], unittest.equals('foo')); |
| 575 unittest.expect(o[1], unittest.equals('foo')); | 581 unittest.expect(o[1], unittest.equals('foo')); |
| 576 } | 582 } |
| 577 | 583 |
| 578 buildUnnamed1425() { | 584 buildUnnamed1435() { |
| 579 var o = new core.List<api.BuiltImage>(); | 585 var o = new core.List<api.BuiltImage>(); |
| 580 o.add(buildBuiltImage()); | 586 o.add(buildBuiltImage()); |
| 581 o.add(buildBuiltImage()); | 587 o.add(buildBuiltImage()); |
| 582 return o; | 588 return o; |
| 583 } | 589 } |
| 584 | 590 |
| 585 checkUnnamed1425(core.List<api.BuiltImage> o) { | 591 checkUnnamed1435(core.List<api.BuiltImage> o) { |
| 586 unittest.expect(o, unittest.hasLength(2)); | 592 unittest.expect(o, unittest.hasLength(2)); |
| 587 checkBuiltImage(o[0]); | 593 checkBuiltImage(o[0]); |
| 588 checkBuiltImage(o[1]); | 594 checkBuiltImage(o[1]); |
| 589 } | 595 } |
| 590 | 596 |
| 591 core.int buildCounterResults = 0; | 597 core.int buildCounterResults = 0; |
| 592 buildResults() { | 598 buildResults() { |
| 593 var o = new api.Results(); | 599 var o = new api.Results(); |
| 594 buildCounterResults++; | 600 buildCounterResults++; |
| 595 if (buildCounterResults < 3) { | 601 if (buildCounterResults < 3) { |
| 596 o.buildStepImages = buildUnnamed1424(); | 602 o.buildStepImages = buildUnnamed1434(); |
| 597 o.images = buildUnnamed1425(); | 603 o.images = buildUnnamed1435(); |
| 598 } | 604 } |
| 599 buildCounterResults--; | 605 buildCounterResults--; |
| 600 return o; | 606 return o; |
| 601 } | 607 } |
| 602 | 608 |
| 603 checkResults(api.Results o) { | 609 checkResults(api.Results o) { |
| 604 buildCounterResults++; | 610 buildCounterResults++; |
| 605 if (buildCounterResults < 3) { | 611 if (buildCounterResults < 3) { |
| 606 checkUnnamed1424(o.buildStepImages); | 612 checkUnnamed1434(o.buildStepImages); |
| 607 checkUnnamed1425(o.images); | 613 checkUnnamed1435(o.images); |
| 608 } | 614 } |
| 609 buildCounterResults--; | 615 buildCounterResults--; |
| 610 } | 616 } |
| 611 | 617 |
| 612 core.int buildCounterSource = 0; | 618 core.int buildCounterSource = 0; |
| 613 buildSource() { | 619 buildSource() { |
| 614 var o = new api.Source(); | 620 var o = new api.Source(); |
| 615 buildCounterSource++; | 621 buildCounterSource++; |
| 616 if (buildCounterSource < 3) { | 622 if (buildCounterSource < 3) { |
| 617 o.repoSource = buildRepoSource(); | 623 o.repoSource = buildRepoSource(); |
| 618 o.storageSource = buildStorageSource(); | 624 o.storageSource = buildStorageSource(); |
| 619 } | 625 } |
| 620 buildCounterSource--; | 626 buildCounterSource--; |
| 621 return o; | 627 return o; |
| 622 } | 628 } |
| 623 | 629 |
| 624 checkSource(api.Source o) { | 630 checkSource(api.Source o) { |
| 625 buildCounterSource++; | 631 buildCounterSource++; |
| 626 if (buildCounterSource < 3) { | 632 if (buildCounterSource < 3) { |
| 627 checkRepoSource(o.repoSource); | 633 checkRepoSource(o.repoSource); |
| 628 checkStorageSource(o.storageSource); | 634 checkStorageSource(o.storageSource); |
| 629 } | 635 } |
| 630 buildCounterSource--; | 636 buildCounterSource--; |
| 631 } | 637 } |
| 632 | 638 |
| 633 buildUnnamed1426() { | 639 buildUnnamed1436() { |
| 634 var o = new core.Map<core.String, api.FileHashes>(); | 640 var o = new core.Map<core.String, api.FileHashes>(); |
| 635 o["x"] = buildFileHashes(); | 641 o["x"] = buildFileHashes(); |
| 636 o["y"] = buildFileHashes(); | 642 o["y"] = buildFileHashes(); |
| 637 return o; | 643 return o; |
| 638 } | 644 } |
| 639 | 645 |
| 640 checkUnnamed1426(core.Map<core.String, api.FileHashes> o) { | 646 checkUnnamed1436(core.Map<core.String, api.FileHashes> o) { |
| 641 unittest.expect(o, unittest.hasLength(2)); | 647 unittest.expect(o, unittest.hasLength(2)); |
| 642 checkFileHashes(o["x"]); | 648 checkFileHashes(o["x"]); |
| 643 checkFileHashes(o["y"]); | 649 checkFileHashes(o["y"]); |
| 644 } | 650 } |
| 645 | 651 |
| 646 core.int buildCounterSourceProvenance = 0; | 652 core.int buildCounterSourceProvenance = 0; |
| 647 buildSourceProvenance() { | 653 buildSourceProvenance() { |
| 648 var o = new api.SourceProvenance(); | 654 var o = new api.SourceProvenance(); |
| 649 buildCounterSourceProvenance++; | 655 buildCounterSourceProvenance++; |
| 650 if (buildCounterSourceProvenance < 3) { | 656 if (buildCounterSourceProvenance < 3) { |
| 651 o.fileHashes = buildUnnamed1426(); | 657 o.fileHashes = buildUnnamed1436(); |
| 652 o.resolvedRepoSource = buildRepoSource(); | 658 o.resolvedRepoSource = buildRepoSource(); |
| 653 o.resolvedStorageSource = buildStorageSource(); | 659 o.resolvedStorageSource = buildStorageSource(); |
| 654 } | 660 } |
| 655 buildCounterSourceProvenance--; | 661 buildCounterSourceProvenance--; |
| 656 return o; | 662 return o; |
| 657 } | 663 } |
| 658 | 664 |
| 659 checkSourceProvenance(api.SourceProvenance o) { | 665 checkSourceProvenance(api.SourceProvenance o) { |
| 660 buildCounterSourceProvenance++; | 666 buildCounterSourceProvenance++; |
| 661 if (buildCounterSourceProvenance < 3) { | 667 if (buildCounterSourceProvenance < 3) { |
| 662 checkUnnamed1426(o.fileHashes); | 668 checkUnnamed1436(o.fileHashes); |
| 663 checkRepoSource(o.resolvedRepoSource); | 669 checkRepoSource(o.resolvedRepoSource); |
| 664 checkStorageSource(o.resolvedStorageSource); | 670 checkStorageSource(o.resolvedStorageSource); |
| 665 } | 671 } |
| 666 buildCounterSourceProvenance--; | 672 buildCounterSourceProvenance--; |
| 667 } | 673 } |
| 668 | 674 |
| 669 buildUnnamed1427() { | 675 buildUnnamed1437() { |
| 670 var o = new core.Map<core.String, core.Object>(); | 676 var o = new core.Map<core.String, core.Object>(); |
| 671 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 677 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; |
| 672 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 678 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; |
| 673 return o; | 679 return o; |
| 674 } | 680 } |
| 675 | 681 |
| 676 checkUnnamed1427(core.Map<core.String, core.Object> o) { | 682 checkUnnamed1437(core.Map<core.String, core.Object> o) { |
| 677 unittest.expect(o, unittest.hasLength(2)); | 683 unittest.expect(o, unittest.hasLength(2)); |
| 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')); | 684 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')); |
| 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')); | 685 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')); |
| 680 } | 686 } |
| 681 | 687 |
| 682 buildUnnamed1428() { | 688 buildUnnamed1438() { |
| 683 var o = new core.List<core.Map<core.String, core.Object>>(); | 689 var o = new core.List<core.Map<core.String, core.Object>>(); |
| 684 o.add(buildUnnamed1427()); | 690 o.add(buildUnnamed1437()); |
| 685 o.add(buildUnnamed1427()); | 691 o.add(buildUnnamed1437()); |
| 686 return o; | 692 return o; |
| 687 } | 693 } |
| 688 | 694 |
| 689 checkUnnamed1428(core.List<core.Map<core.String, core.Object>> o) { | 695 checkUnnamed1438(core.List<core.Map<core.String, core.Object>> o) { |
| 690 unittest.expect(o, unittest.hasLength(2)); | 696 unittest.expect(o, unittest.hasLength(2)); |
| 691 checkUnnamed1427(o[0]); | 697 checkUnnamed1437(o[0]); |
| 692 checkUnnamed1427(o[1]); | 698 checkUnnamed1437(o[1]); |
| 693 } | 699 } |
| 694 | 700 |
| 695 core.int buildCounterStatus = 0; | 701 core.int buildCounterStatus = 0; |
| 696 buildStatus() { | 702 buildStatus() { |
| 697 var o = new api.Status(); | 703 var o = new api.Status(); |
| 698 buildCounterStatus++; | 704 buildCounterStatus++; |
| 699 if (buildCounterStatus < 3) { | 705 if (buildCounterStatus < 3) { |
| 700 o.code = 42; | 706 o.code = 42; |
| 701 o.details = buildUnnamed1428(); | 707 o.details = buildUnnamed1438(); |
| 702 o.message = "foo"; | 708 o.message = "foo"; |
| 703 } | 709 } |
| 704 buildCounterStatus--; | 710 buildCounterStatus--; |
| 705 return o; | 711 return o; |
| 706 } | 712 } |
| 707 | 713 |
| 708 checkStatus(api.Status o) { | 714 checkStatus(api.Status o) { |
| 709 buildCounterStatus++; | 715 buildCounterStatus++; |
| 710 if (buildCounterStatus < 3) { | 716 if (buildCounterStatus < 3) { |
| 711 unittest.expect(o.code, unittest.equals(42)); | 717 unittest.expect(o.code, unittest.equals(42)); |
| 712 checkUnnamed1428(o.details); | 718 checkUnnamed1438(o.details); |
| 713 unittest.expect(o.message, unittest.equals('foo')); | 719 unittest.expect(o.message, unittest.equals('foo')); |
| 714 } | 720 } |
| 715 buildCounterStatus--; | 721 buildCounterStatus--; |
| 716 } | 722 } |
| 717 | 723 |
| 718 core.int buildCounterStorageSource = 0; | 724 core.int buildCounterStorageSource = 0; |
| 719 buildStorageSource() { | 725 buildStorageSource() { |
| 720 var o = new api.StorageSource(); | 726 var o = new api.StorageSource(); |
| 721 buildCounterStorageSource++; | 727 buildCounterStorageSource++; |
| 722 if (buildCounterStorageSource < 3) { | 728 if (buildCounterStorageSource < 3) { |
| (...skipping 470 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1193 checkBuild(response); | 1199 checkBuild(response); |
| 1194 }))); | 1200 }))); |
| 1195 }); | 1201 }); |
| 1196 | 1202 |
| 1197 unittest.test("method--list", () { | 1203 unittest.test("method--list", () { |
| 1198 | 1204 |
| 1199 var mock = new HttpServerMock(); | 1205 var mock = new HttpServerMock(); |
| 1200 api.ProjectsBuildsResourceApi res = new api.CloudbuildApi(mock).projects.b
uilds; | 1206 api.ProjectsBuildsResourceApi res = new api.CloudbuildApi(mock).projects.b
uilds; |
| 1201 var arg_projectId = "foo"; | 1207 var arg_projectId = "foo"; |
| 1202 var arg_pageSize = 42; | 1208 var arg_pageSize = 42; |
| 1209 var arg_filter = "foo"; |
| 1203 var arg_pageToken = "foo"; | 1210 var arg_pageToken = "foo"; |
| 1204 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1211 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 1205 var path = (req.url).path; | 1212 var path = (req.url).path; |
| 1206 var pathOffset = 0; | 1213 var pathOffset = 0; |
| 1207 var index; | 1214 var index; |
| 1208 var subPart; | 1215 var subPart; |
| 1209 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1216 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 1210 pathOffset += 1; | 1217 pathOffset += 1; |
| 1211 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("v1/projects/")); | 1218 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("v1/projects/")); |
| 1212 pathOffset += 12; | 1219 pathOffset += 12; |
| (...skipping 15 matching lines...) Expand all Loading... |
| 1228 if (n == null) return null; | 1235 if (n == null) return null; |
| 1229 throw new core.ArgumentError("Invalid boolean: $n"); | 1236 throw new core.ArgumentError("Invalid boolean: $n"); |
| 1230 } | 1237 } |
| 1231 if (query.length > 0) { | 1238 if (query.length > 0) { |
| 1232 for (var part in query.split("&")) { | 1239 for (var part in query.split("&")) { |
| 1233 var keyvalue = part.split("="); | 1240 var keyvalue = part.split("="); |
| 1234 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 1241 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 1235 } | 1242 } |
| 1236 } | 1243 } |
| 1237 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ
als(arg_pageSize)); | 1244 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ
als(arg_pageSize)); |
| 1245 unittest.expect(queryMap["filter"].first, unittest.equals(arg_filter)); |
| 1238 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | 1246 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); |
| 1239 | 1247 |
| 1240 | 1248 |
| 1241 var h = { | 1249 var h = { |
| 1242 "content-type" : "application/json; charset=utf-8", | 1250 "content-type" : "application/json; charset=utf-8", |
| 1243 }; | 1251 }; |
| 1244 var resp = convert.JSON.encode(buildListBuildsResponse()); | 1252 var resp = convert.JSON.encode(buildListBuildsResponse()); |
| 1245 return new async.Future.value(stringResponse(200, h, resp)); | 1253 return new async.Future.value(stringResponse(200, h, resp)); |
| 1246 }), true); | 1254 }), true); |
| 1247 res.list(arg_projectId, pageSize: arg_pageSize, pageToken: arg_pageToken).
then(unittest.expectAsync(((api.ListBuildsResponse response) { | 1255 res.list(arg_projectId, pageSize: arg_pageSize, filter: arg_filter, pageTo
ken: arg_pageToken).then(unittest.expectAsync(((api.ListBuildsResponse response)
{ |
| 1248 checkListBuildsResponse(response); | 1256 checkListBuildsResponse(response); |
| 1249 }))); | 1257 }))); |
| 1250 }); | 1258 }); |
| 1251 | 1259 |
| 1252 }); | 1260 }); |
| 1253 | 1261 |
| 1254 | 1262 |
| 1255 unittest.group("resource-ProjectsTriggersResourceApi", () { | 1263 unittest.group("resource-ProjectsTriggersResourceApi", () { |
| 1256 unittest.test("method--create", () { | 1264 unittest.test("method--create", () { |
| 1257 | 1265 |
| (...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1526 res.patch(arg_request, arg_projectId, arg_triggerId).then(unittest.expectA
sync(((api.BuildTrigger response) { | 1534 res.patch(arg_request, arg_projectId, arg_triggerId).then(unittest.expectA
sync(((api.BuildTrigger response) { |
| 1527 checkBuildTrigger(response); | 1535 checkBuildTrigger(response); |
| 1528 }))); | 1536 }))); |
| 1529 }); | 1537 }); |
| 1530 | 1538 |
| 1531 }); | 1539 }); |
| 1532 | 1540 |
| 1533 | 1541 |
| 1534 } | 1542 } |
| 1535 | 1543 |
| OLD | NEW |