| OLD | NEW |
| 1 library googleapis.cloudbuild.v1.test; | 1 library googleapis.cloudbuild.v1.test; |
| 2 | 2 |
| 3 import "dart:core" as core; | 3 import "dart:core" as core; |
| 4 import "dart:collection" as collection; | 4 import "dart:collection" as collection; |
| 5 import "dart:async" as async; | 5 import "dart:async" as async; |
| 6 import "dart:convert" as convert; | 6 import "dart:convert" as convert; |
| 7 | 7 |
| 8 import 'package:http/http.dart' as http; | 8 import 'package:http/http.dart' as http; |
| 9 import 'package:http/testing.dart' as http_testing; | 9 import 'package:http/testing.dart' as http_testing; |
| 10 import 'package:test/test.dart' as unittest; | 10 import 'package:test/test.dart' as unittest; |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 } | 44 } |
| 45 } | 45 } |
| 46 } | 46 } |
| 47 | 47 |
| 48 http.StreamedResponse stringResponse( | 48 http.StreamedResponse stringResponse( |
| 49 core.int status, core.Map<core.String, core.String> headers, core.String bod
y) { | 49 core.int status, core.Map<core.String, core.String> headers, core.String bod
y) { |
| 50 var stream = new async.Stream.fromIterable([convert.UTF8.encode(body)]); | 50 var stream = new async.Stream.fromIterable([convert.UTF8.encode(body)]); |
| 51 return new http.StreamedResponse(stream, status, headers: headers); | 51 return new http.StreamedResponse(stream, status, headers: headers); |
| 52 } | 52 } |
| 53 | 53 |
| 54 buildUnnamed1340() { | 54 buildUnnamed1424() { |
| 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 checkUnnamed1340(core.List<core.String> o) { | 61 checkUnnamed1424(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 buildUnnamed1341() { | 67 buildUnnamed1425() { |
| 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 checkUnnamed1341(core.List<api.BuildStep> o) { | 74 checkUnnamed1425(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 buildUnnamed1342() { | 80 buildUnnamed1426() { |
| 81 var o = new core.Map<core.String, core.String>(); | 81 var o = new core.Map<core.String, core.String>(); |
| 82 o["x"] = "foo"; | 82 o["x"] = "foo"; |
| 83 o["y"] = "foo"; | 83 o["y"] = "foo"; |
| 84 return o; | 84 return o; |
| 85 } | 85 } |
| 86 | 86 |
| 87 checkUnnamed1342(core.Map<core.String, core.String> o) { | 87 checkUnnamed1426(core.Map<core.String, core.String> o) { |
| 88 unittest.expect(o, unittest.hasLength(2)); | 88 unittest.expect(o, unittest.hasLength(2)); |
| 89 unittest.expect(o["x"], unittest.equals('foo')); | 89 unittest.expect(o["x"], unittest.equals('foo')); |
| 90 unittest.expect(o["y"], unittest.equals('foo')); | 90 unittest.expect(o["y"], unittest.equals('foo')); |
| 91 } | 91 } |
| 92 | 92 |
| 93 buildUnnamed1343() { | 93 buildUnnamed1427() { |
| 94 var o = new core.List<core.String>(); | 94 var o = new core.List<core.String>(); |
| 95 o.add("foo"); | 95 o.add("foo"); |
| 96 o.add("foo"); | 96 o.add("foo"); |
| 97 return o; | 97 return o; |
| 98 } | 98 } |
| 99 | 99 |
| 100 checkUnnamed1343(core.List<core.String> o) { | 100 checkUnnamed1427(core.List<core.String> o) { |
| 101 unittest.expect(o, unittest.hasLength(2)); | 101 unittest.expect(o, unittest.hasLength(2)); |
| 102 unittest.expect(o[0], unittest.equals('foo')); | 102 unittest.expect(o[0], unittest.equals('foo')); |
| 103 unittest.expect(o[1], unittest.equals('foo')); | 103 unittest.expect(o[1], unittest.equals('foo')); |
| 104 } | 104 } |
| 105 | 105 |
| 106 core.int buildCounterBuild = 0; | 106 core.int buildCounterBuild = 0; |
| 107 buildBuild() { | 107 buildBuild() { |
| 108 var o = new api.Build(); | 108 var o = new api.Build(); |
| 109 buildCounterBuild++; | 109 buildCounterBuild++; |
| 110 if (buildCounterBuild < 3) { | 110 if (buildCounterBuild < 3) { |
| 111 o.buildTriggerId = "foo"; | 111 o.buildTriggerId = "foo"; |
| 112 o.createTime = "foo"; | 112 o.createTime = "foo"; |
| 113 o.finishTime = "foo"; | 113 o.finishTime = "foo"; |
| 114 o.id = "foo"; | 114 o.id = "foo"; |
| 115 o.images = buildUnnamed1340(); | 115 o.images = buildUnnamed1424(); |
| 116 o.logUrl = "foo"; | 116 o.logUrl = "foo"; |
| 117 o.logsBucket = "foo"; | 117 o.logsBucket = "foo"; |
| 118 o.options = buildBuildOptions(); | 118 o.options = buildBuildOptions(); |
| 119 o.projectId = "foo"; | 119 o.projectId = "foo"; |
| 120 o.results = buildResults(); | 120 o.results = buildResults(); |
| 121 o.source = buildSource(); | 121 o.source = buildSource(); |
| 122 o.sourceProvenance = buildSourceProvenance(); | 122 o.sourceProvenance = buildSourceProvenance(); |
| 123 o.startTime = "foo"; | 123 o.startTime = "foo"; |
| 124 o.status = "foo"; | 124 o.status = "foo"; |
| 125 o.statusDetail = "foo"; | 125 o.statusDetail = "foo"; |
| 126 o.steps = buildUnnamed1341(); | 126 o.steps = buildUnnamed1425(); |
| 127 o.substitutions = buildUnnamed1342(); | 127 o.substitutions = buildUnnamed1426(); |
| 128 o.tags = buildUnnamed1343(); | 128 o.tags = buildUnnamed1427(); |
| 129 o.timeout = "foo"; | 129 o.timeout = "foo"; |
| 130 } | 130 } |
| 131 buildCounterBuild--; | 131 buildCounterBuild--; |
| 132 return o; | 132 return o; |
| 133 } | 133 } |
| 134 | 134 |
| 135 checkBuild(api.Build o) { | 135 checkBuild(api.Build o) { |
| 136 buildCounterBuild++; | 136 buildCounterBuild++; |
| 137 if (buildCounterBuild < 3) { | 137 if (buildCounterBuild < 3) { |
| 138 unittest.expect(o.buildTriggerId, unittest.equals('foo')); | 138 unittest.expect(o.buildTriggerId, unittest.equals('foo')); |
| 139 unittest.expect(o.createTime, unittest.equals('foo')); | 139 unittest.expect(o.createTime, unittest.equals('foo')); |
| 140 unittest.expect(o.finishTime, unittest.equals('foo')); | 140 unittest.expect(o.finishTime, unittest.equals('foo')); |
| 141 unittest.expect(o.id, unittest.equals('foo')); | 141 unittest.expect(o.id, unittest.equals('foo')); |
| 142 checkUnnamed1340(o.images); | 142 checkUnnamed1424(o.images); |
| 143 unittest.expect(o.logUrl, unittest.equals('foo')); | 143 unittest.expect(o.logUrl, unittest.equals('foo')); |
| 144 unittest.expect(o.logsBucket, unittest.equals('foo')); | 144 unittest.expect(o.logsBucket, unittest.equals('foo')); |
| 145 checkBuildOptions(o.options); | 145 checkBuildOptions(o.options); |
| 146 unittest.expect(o.projectId, unittest.equals('foo')); | 146 unittest.expect(o.projectId, unittest.equals('foo')); |
| 147 checkResults(o.results); | 147 checkResults(o.results); |
| 148 checkSource(o.source); | 148 checkSource(o.source); |
| 149 checkSourceProvenance(o.sourceProvenance); | 149 checkSourceProvenance(o.sourceProvenance); |
| 150 unittest.expect(o.startTime, unittest.equals('foo')); | 150 unittest.expect(o.startTime, unittest.equals('foo')); |
| 151 unittest.expect(o.status, unittest.equals('foo')); | 151 unittest.expect(o.status, unittest.equals('foo')); |
| 152 unittest.expect(o.statusDetail, unittest.equals('foo')); | 152 unittest.expect(o.statusDetail, unittest.equals('foo')); |
| 153 checkUnnamed1341(o.steps); | 153 checkUnnamed1425(o.steps); |
| 154 checkUnnamed1342(o.substitutions); | 154 checkUnnamed1426(o.substitutions); |
| 155 checkUnnamed1343(o.tags); | 155 checkUnnamed1427(o.tags); |
| 156 unittest.expect(o.timeout, unittest.equals('foo')); | 156 unittest.expect(o.timeout, unittest.equals('foo')); |
| 157 } | 157 } |
| 158 buildCounterBuild--; | 158 buildCounterBuild--; |
| 159 } | 159 } |
| 160 | 160 |
| 161 core.int buildCounterBuildOperationMetadata = 0; | 161 core.int buildCounterBuildOperationMetadata = 0; |
| 162 buildBuildOperationMetadata() { | 162 buildBuildOperationMetadata() { |
| 163 var o = new api.BuildOperationMetadata(); | 163 var o = new api.BuildOperationMetadata(); |
| 164 buildCounterBuildOperationMetadata++; | 164 buildCounterBuildOperationMetadata++; |
| 165 if (buildCounterBuildOperationMetadata < 3) { | 165 if (buildCounterBuildOperationMetadata < 3) { |
| 166 o.build = buildBuild(); | 166 o.build = buildBuild(); |
| 167 } | 167 } |
| 168 buildCounterBuildOperationMetadata--; | 168 buildCounterBuildOperationMetadata--; |
| 169 return o; | 169 return o; |
| 170 } | 170 } |
| 171 | 171 |
| 172 checkBuildOperationMetadata(api.BuildOperationMetadata o) { | 172 checkBuildOperationMetadata(api.BuildOperationMetadata o) { |
| 173 buildCounterBuildOperationMetadata++; | 173 buildCounterBuildOperationMetadata++; |
| 174 if (buildCounterBuildOperationMetadata < 3) { | 174 if (buildCounterBuildOperationMetadata < 3) { |
| 175 checkBuild(o.build); | 175 checkBuild(o.build); |
| 176 } | 176 } |
| 177 buildCounterBuildOperationMetadata--; | 177 buildCounterBuildOperationMetadata--; |
| 178 } | 178 } |
| 179 | 179 |
| 180 buildUnnamed1344() { | 180 buildUnnamed1428() { |
| 181 var o = new core.List<core.String>(); | 181 var o = new core.List<core.String>(); |
| 182 o.add("foo"); | 182 o.add("foo"); |
| 183 o.add("foo"); | 183 o.add("foo"); |
| 184 return o; | 184 return o; |
| 185 } | 185 } |
| 186 | 186 |
| 187 checkUnnamed1344(core.List<core.String> o) { | 187 checkUnnamed1428(core.List<core.String> o) { |
| 188 unittest.expect(o, unittest.hasLength(2)); | 188 unittest.expect(o, unittest.hasLength(2)); |
| 189 unittest.expect(o[0], unittest.equals('foo')); | 189 unittest.expect(o[0], unittest.equals('foo')); |
| 190 unittest.expect(o[1], unittest.equals('foo')); | 190 unittest.expect(o[1], unittest.equals('foo')); |
| 191 } | 191 } |
| 192 | 192 |
| 193 core.int buildCounterBuildOptions = 0; | 193 core.int buildCounterBuildOptions = 0; |
| 194 buildBuildOptions() { | 194 buildBuildOptions() { |
| 195 var o = new api.BuildOptions(); | 195 var o = new api.BuildOptions(); |
| 196 buildCounterBuildOptions++; | 196 buildCounterBuildOptions++; |
| 197 if (buildCounterBuildOptions < 3) { | 197 if (buildCounterBuildOptions < 3) { |
| 198 o.requestedVerifyOption = "foo"; | 198 o.requestedVerifyOption = "foo"; |
| 199 o.sourceProvenanceHash = buildUnnamed1344(); | 199 o.sourceProvenanceHash = buildUnnamed1428(); |
| 200 o.substitutionOption = "foo"; |
| 200 } | 201 } |
| 201 buildCounterBuildOptions--; | 202 buildCounterBuildOptions--; |
| 202 return o; | 203 return o; |
| 203 } | 204 } |
| 204 | 205 |
| 205 checkBuildOptions(api.BuildOptions o) { | 206 checkBuildOptions(api.BuildOptions o) { |
| 206 buildCounterBuildOptions++; | 207 buildCounterBuildOptions++; |
| 207 if (buildCounterBuildOptions < 3) { | 208 if (buildCounterBuildOptions < 3) { |
| 208 unittest.expect(o.requestedVerifyOption, unittest.equals('foo')); | 209 unittest.expect(o.requestedVerifyOption, unittest.equals('foo')); |
| 209 checkUnnamed1344(o.sourceProvenanceHash); | 210 checkUnnamed1428(o.sourceProvenanceHash); |
| 211 unittest.expect(o.substitutionOption, unittest.equals('foo')); |
| 210 } | 212 } |
| 211 buildCounterBuildOptions--; | 213 buildCounterBuildOptions--; |
| 212 } | 214 } |
| 213 | 215 |
| 214 buildUnnamed1345() { | 216 buildUnnamed1429() { |
| 215 var o = new core.List<core.String>(); | 217 var o = new core.List<core.String>(); |
| 216 o.add("foo"); | 218 o.add("foo"); |
| 217 o.add("foo"); | 219 o.add("foo"); |
| 218 return o; | 220 return o; |
| 219 } | 221 } |
| 220 | 222 |
| 221 checkUnnamed1345(core.List<core.String> o) { | 223 checkUnnamed1429(core.List<core.String> o) { |
| 222 unittest.expect(o, unittest.hasLength(2)); | 224 unittest.expect(o, unittest.hasLength(2)); |
| 223 unittest.expect(o[0], unittest.equals('foo')); | 225 unittest.expect(o[0], unittest.equals('foo')); |
| 224 unittest.expect(o[1], unittest.equals('foo')); | 226 unittest.expect(o[1], unittest.equals('foo')); |
| 225 } | 227 } |
| 226 | 228 |
| 227 buildUnnamed1346() { | 229 buildUnnamed1430() { |
| 228 var o = new core.List<core.String>(); | 230 var o = new core.List<core.String>(); |
| 229 o.add("foo"); | 231 o.add("foo"); |
| 230 o.add("foo"); | 232 o.add("foo"); |
| 231 return o; | 233 return o; |
| 232 } | 234 } |
| 233 | 235 |
| 234 checkUnnamed1346(core.List<core.String> o) { | 236 checkUnnamed1430(core.List<core.String> o) { |
| 235 unittest.expect(o, unittest.hasLength(2)); | 237 unittest.expect(o, unittest.hasLength(2)); |
| 236 unittest.expect(o[0], unittest.equals('foo')); | 238 unittest.expect(o[0], unittest.equals('foo')); |
| 237 unittest.expect(o[1], unittest.equals('foo')); | 239 unittest.expect(o[1], unittest.equals('foo')); |
| 238 } | 240 } |
| 239 | 241 |
| 240 buildUnnamed1347() { | 242 buildUnnamed1431() { |
| 241 var o = new core.List<core.String>(); | 243 var o = new core.List<core.String>(); |
| 242 o.add("foo"); | 244 o.add("foo"); |
| 243 o.add("foo"); | 245 o.add("foo"); |
| 244 return o; | 246 return o; |
| 245 } | 247 } |
| 246 | 248 |
| 247 checkUnnamed1347(core.List<core.String> o) { | 249 checkUnnamed1431(core.List<core.String> o) { |
| 248 unittest.expect(o, unittest.hasLength(2)); | 250 unittest.expect(o, unittest.hasLength(2)); |
| 249 unittest.expect(o[0], unittest.equals('foo')); | 251 unittest.expect(o[0], unittest.equals('foo')); |
| 250 unittest.expect(o[1], unittest.equals('foo')); | 252 unittest.expect(o[1], unittest.equals('foo')); |
| 251 } | 253 } |
| 252 | 254 |
| 253 core.int buildCounterBuildStep = 0; | 255 core.int buildCounterBuildStep = 0; |
| 254 buildBuildStep() { | 256 buildBuildStep() { |
| 255 var o = new api.BuildStep(); | 257 var o = new api.BuildStep(); |
| 256 buildCounterBuildStep++; | 258 buildCounterBuildStep++; |
| 257 if (buildCounterBuildStep < 3) { | 259 if (buildCounterBuildStep < 3) { |
| 258 o.args = buildUnnamed1345(); | 260 o.args = buildUnnamed1429(); |
| 259 o.dir = "foo"; | 261 o.dir = "foo"; |
| 260 o.entrypoint = "foo"; | 262 o.entrypoint = "foo"; |
| 261 o.env = buildUnnamed1346(); | 263 o.env = buildUnnamed1430(); |
| 262 o.id = "foo"; | 264 o.id = "foo"; |
| 263 o.name = "foo"; | 265 o.name = "foo"; |
| 264 o.waitFor = buildUnnamed1347(); | 266 o.waitFor = buildUnnamed1431(); |
| 265 } | 267 } |
| 266 buildCounterBuildStep--; | 268 buildCounterBuildStep--; |
| 267 return o; | 269 return o; |
| 268 } | 270 } |
| 269 | 271 |
| 270 checkBuildStep(api.BuildStep o) { | 272 checkBuildStep(api.BuildStep o) { |
| 271 buildCounterBuildStep++; | 273 buildCounterBuildStep++; |
| 272 if (buildCounterBuildStep < 3) { | 274 if (buildCounterBuildStep < 3) { |
| 273 checkUnnamed1345(o.args); | 275 checkUnnamed1429(o.args); |
| 274 unittest.expect(o.dir, unittest.equals('foo')); | 276 unittest.expect(o.dir, unittest.equals('foo')); |
| 275 unittest.expect(o.entrypoint, unittest.equals('foo')); | 277 unittest.expect(o.entrypoint, unittest.equals('foo')); |
| 276 checkUnnamed1346(o.env); | 278 checkUnnamed1430(o.env); |
| 277 unittest.expect(o.id, unittest.equals('foo')); | 279 unittest.expect(o.id, unittest.equals('foo')); |
| 278 unittest.expect(o.name, unittest.equals('foo')); | 280 unittest.expect(o.name, unittest.equals('foo')); |
| 279 checkUnnamed1347(o.waitFor); | 281 checkUnnamed1431(o.waitFor); |
| 280 } | 282 } |
| 281 buildCounterBuildStep--; | 283 buildCounterBuildStep--; |
| 282 } | 284 } |
| 283 | 285 |
| 284 buildUnnamed1348() { | 286 buildUnnamed1432() { |
| 285 var o = new core.Map<core.String, core.String>(); | 287 var o = new core.Map<core.String, core.String>(); |
| 286 o["x"] = "foo"; | 288 o["x"] = "foo"; |
| 287 o["y"] = "foo"; | 289 o["y"] = "foo"; |
| 288 return o; | 290 return o; |
| 289 } | 291 } |
| 290 | 292 |
| 291 checkUnnamed1348(core.Map<core.String, core.String> o) { | 293 checkUnnamed1432(core.Map<core.String, core.String> o) { |
| 292 unittest.expect(o, unittest.hasLength(2)); | 294 unittest.expect(o, unittest.hasLength(2)); |
| 293 unittest.expect(o["x"], unittest.equals('foo')); | 295 unittest.expect(o["x"], unittest.equals('foo')); |
| 294 unittest.expect(o["y"], unittest.equals('foo')); | 296 unittest.expect(o["y"], unittest.equals('foo')); |
| 295 } | 297 } |
| 296 | 298 |
| 297 core.int buildCounterBuildTrigger = 0; | 299 core.int buildCounterBuildTrigger = 0; |
| 298 buildBuildTrigger() { | 300 buildBuildTrigger() { |
| 299 var o = new api.BuildTrigger(); | 301 var o = new api.BuildTrigger(); |
| 300 buildCounterBuildTrigger++; | 302 buildCounterBuildTrigger++; |
| 301 if (buildCounterBuildTrigger < 3) { | 303 if (buildCounterBuildTrigger < 3) { |
| 302 o.build = buildBuild(); | 304 o.build = buildBuild(); |
| 303 o.createTime = "foo"; | 305 o.createTime = "foo"; |
| 304 o.description = "foo"; | 306 o.description = "foo"; |
| 305 o.disabled = true; | 307 o.disabled = true; |
| 306 o.filename = "foo"; | 308 o.filename = "foo"; |
| 307 o.id = "foo"; | 309 o.id = "foo"; |
| 308 o.substitutions = buildUnnamed1348(); | 310 o.substitutions = buildUnnamed1432(); |
| 309 o.triggerTemplate = buildRepoSource(); | 311 o.triggerTemplate = buildRepoSource(); |
| 310 } | 312 } |
| 311 buildCounterBuildTrigger--; | 313 buildCounterBuildTrigger--; |
| 312 return o; | 314 return o; |
| 313 } | 315 } |
| 314 | 316 |
| 315 checkBuildTrigger(api.BuildTrigger o) { | 317 checkBuildTrigger(api.BuildTrigger o) { |
| 316 buildCounterBuildTrigger++; | 318 buildCounterBuildTrigger++; |
| 317 if (buildCounterBuildTrigger < 3) { | 319 if (buildCounterBuildTrigger < 3) { |
| 318 checkBuild(o.build); | 320 checkBuild(o.build); |
| 319 unittest.expect(o.createTime, unittest.equals('foo')); | 321 unittest.expect(o.createTime, unittest.equals('foo')); |
| 320 unittest.expect(o.description, unittest.equals('foo')); | 322 unittest.expect(o.description, unittest.equals('foo')); |
| 321 unittest.expect(o.disabled, unittest.isTrue); | 323 unittest.expect(o.disabled, unittest.isTrue); |
| 322 unittest.expect(o.filename, unittest.equals('foo')); | 324 unittest.expect(o.filename, unittest.equals('foo')); |
| 323 unittest.expect(o.id, unittest.equals('foo')); | 325 unittest.expect(o.id, unittest.equals('foo')); |
| 324 checkUnnamed1348(o.substitutions); | 326 checkUnnamed1432(o.substitutions); |
| 325 checkRepoSource(o.triggerTemplate); | 327 checkRepoSource(o.triggerTemplate); |
| 326 } | 328 } |
| 327 buildCounterBuildTrigger--; | 329 buildCounterBuildTrigger--; |
| 328 } | 330 } |
| 329 | 331 |
| 330 core.int buildCounterBuiltImage = 0; | 332 core.int buildCounterBuiltImage = 0; |
| 331 buildBuiltImage() { | 333 buildBuiltImage() { |
| 332 var o = new api.BuiltImage(); | 334 var o = new api.BuiltImage(); |
| 333 buildCounterBuiltImage++; | 335 buildCounterBuiltImage++; |
| 334 if (buildCounterBuiltImage < 3) { | 336 if (buildCounterBuiltImage < 3) { |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 392 return o; | 394 return o; |
| 393 } | 395 } |
| 394 | 396 |
| 395 checkEmpty(api.Empty o) { | 397 checkEmpty(api.Empty o) { |
| 396 buildCounterEmpty++; | 398 buildCounterEmpty++; |
| 397 if (buildCounterEmpty < 3) { | 399 if (buildCounterEmpty < 3) { |
| 398 } | 400 } |
| 399 buildCounterEmpty--; | 401 buildCounterEmpty--; |
| 400 } | 402 } |
| 401 | 403 |
| 402 buildUnnamed1349() { | 404 buildUnnamed1433() { |
| 403 var o = new core.List<api.Hash>(); | 405 var o = new core.List<api.Hash>(); |
| 404 o.add(buildHash()); | 406 o.add(buildHash()); |
| 405 o.add(buildHash()); | 407 o.add(buildHash()); |
| 406 return o; | 408 return o; |
| 407 } | 409 } |
| 408 | 410 |
| 409 checkUnnamed1349(core.List<api.Hash> o) { | 411 checkUnnamed1433(core.List<api.Hash> o) { |
| 410 unittest.expect(o, unittest.hasLength(2)); | 412 unittest.expect(o, unittest.hasLength(2)); |
| 411 checkHash(o[0]); | 413 checkHash(o[0]); |
| 412 checkHash(o[1]); | 414 checkHash(o[1]); |
| 413 } | 415 } |
| 414 | 416 |
| 415 core.int buildCounterFileHashes = 0; | 417 core.int buildCounterFileHashes = 0; |
| 416 buildFileHashes() { | 418 buildFileHashes() { |
| 417 var o = new api.FileHashes(); | 419 var o = new api.FileHashes(); |
| 418 buildCounterFileHashes++; | 420 buildCounterFileHashes++; |
| 419 if (buildCounterFileHashes < 3) { | 421 if (buildCounterFileHashes < 3) { |
| 420 o.fileHash = buildUnnamed1349(); | 422 o.fileHash = buildUnnamed1433(); |
| 421 } | 423 } |
| 422 buildCounterFileHashes--; | 424 buildCounterFileHashes--; |
| 423 return o; | 425 return o; |
| 424 } | 426 } |
| 425 | 427 |
| 426 checkFileHashes(api.FileHashes o) { | 428 checkFileHashes(api.FileHashes o) { |
| 427 buildCounterFileHashes++; | 429 buildCounterFileHashes++; |
| 428 if (buildCounterFileHashes < 3) { | 430 if (buildCounterFileHashes < 3) { |
| 429 checkUnnamed1349(o.fileHash); | 431 checkUnnamed1433(o.fileHash); |
| 430 } | 432 } |
| 431 buildCounterFileHashes--; | 433 buildCounterFileHashes--; |
| 432 } | 434 } |
| 433 | 435 |
| 434 core.int buildCounterHash = 0; | 436 core.int buildCounterHash = 0; |
| 435 buildHash() { | 437 buildHash() { |
| 436 var o = new api.Hash(); | 438 var o = new api.Hash(); |
| 437 buildCounterHash++; | 439 buildCounterHash++; |
| 438 if (buildCounterHash < 3) { | 440 if (buildCounterHash < 3) { |
| 439 o.type = "foo"; | 441 o.type = "foo"; |
| 440 o.value = "foo"; | 442 o.value = "foo"; |
| 441 } | 443 } |
| 442 buildCounterHash--; | 444 buildCounterHash--; |
| 443 return o; | 445 return o; |
| 444 } | 446 } |
| 445 | 447 |
| 446 checkHash(api.Hash o) { | 448 checkHash(api.Hash o) { |
| 447 buildCounterHash++; | 449 buildCounterHash++; |
| 448 if (buildCounterHash < 3) { | 450 if (buildCounterHash < 3) { |
| 449 unittest.expect(o.type, unittest.equals('foo')); | 451 unittest.expect(o.type, unittest.equals('foo')); |
| 450 unittest.expect(o.value, unittest.equals('foo')); | 452 unittest.expect(o.value, unittest.equals('foo')); |
| 451 } | 453 } |
| 452 buildCounterHash--; | 454 buildCounterHash--; |
| 453 } | 455 } |
| 454 | 456 |
| 455 buildUnnamed1350() { | 457 buildUnnamed1434() { |
| 456 var o = new core.List<api.BuildTrigger>(); | 458 var o = new core.List<api.BuildTrigger>(); |
| 457 o.add(buildBuildTrigger()); | 459 o.add(buildBuildTrigger()); |
| 458 o.add(buildBuildTrigger()); | 460 o.add(buildBuildTrigger()); |
| 459 return o; | 461 return o; |
| 460 } | 462 } |
| 461 | 463 |
| 462 checkUnnamed1350(core.List<api.BuildTrigger> o) { | 464 checkUnnamed1434(core.List<api.BuildTrigger> o) { |
| 463 unittest.expect(o, unittest.hasLength(2)); | 465 unittest.expect(o, unittest.hasLength(2)); |
| 464 checkBuildTrigger(o[0]); | 466 checkBuildTrigger(o[0]); |
| 465 checkBuildTrigger(o[1]); | 467 checkBuildTrigger(o[1]); |
| 466 } | 468 } |
| 467 | 469 |
| 468 core.int buildCounterListBuildTriggersResponse = 0; | 470 core.int buildCounterListBuildTriggersResponse = 0; |
| 469 buildListBuildTriggersResponse() { | 471 buildListBuildTriggersResponse() { |
| 470 var o = new api.ListBuildTriggersResponse(); | 472 var o = new api.ListBuildTriggersResponse(); |
| 471 buildCounterListBuildTriggersResponse++; | 473 buildCounterListBuildTriggersResponse++; |
| 472 if (buildCounterListBuildTriggersResponse < 3) { | 474 if (buildCounterListBuildTriggersResponse < 3) { |
| 473 o.triggers = buildUnnamed1350(); | 475 o.triggers = buildUnnamed1434(); |
| 474 } | 476 } |
| 475 buildCounterListBuildTriggersResponse--; | 477 buildCounterListBuildTriggersResponse--; |
| 476 return o; | 478 return o; |
| 477 } | 479 } |
| 478 | 480 |
| 479 checkListBuildTriggersResponse(api.ListBuildTriggersResponse o) { | 481 checkListBuildTriggersResponse(api.ListBuildTriggersResponse o) { |
| 480 buildCounterListBuildTriggersResponse++; | 482 buildCounterListBuildTriggersResponse++; |
| 481 if (buildCounterListBuildTriggersResponse < 3) { | 483 if (buildCounterListBuildTriggersResponse < 3) { |
| 482 checkUnnamed1350(o.triggers); | 484 checkUnnamed1434(o.triggers); |
| 483 } | 485 } |
| 484 buildCounterListBuildTriggersResponse--; | 486 buildCounterListBuildTriggersResponse--; |
| 485 } | 487 } |
| 486 | 488 |
| 487 buildUnnamed1351() { | 489 buildUnnamed1435() { |
| 488 var o = new core.List<api.Build>(); | 490 var o = new core.List<api.Build>(); |
| 489 o.add(buildBuild()); | 491 o.add(buildBuild()); |
| 490 o.add(buildBuild()); | 492 o.add(buildBuild()); |
| 491 return o; | 493 return o; |
| 492 } | 494 } |
| 493 | 495 |
| 494 checkUnnamed1351(core.List<api.Build> o) { | 496 checkUnnamed1435(core.List<api.Build> o) { |
| 495 unittest.expect(o, unittest.hasLength(2)); | 497 unittest.expect(o, unittest.hasLength(2)); |
| 496 checkBuild(o[0]); | 498 checkBuild(o[0]); |
| 497 checkBuild(o[1]); | 499 checkBuild(o[1]); |
| 498 } | 500 } |
| 499 | 501 |
| 500 core.int buildCounterListBuildsResponse = 0; | 502 core.int buildCounterListBuildsResponse = 0; |
| 501 buildListBuildsResponse() { | 503 buildListBuildsResponse() { |
| 502 var o = new api.ListBuildsResponse(); | 504 var o = new api.ListBuildsResponse(); |
| 503 buildCounterListBuildsResponse++; | 505 buildCounterListBuildsResponse++; |
| 504 if (buildCounterListBuildsResponse < 3) { | 506 if (buildCounterListBuildsResponse < 3) { |
| 505 o.builds = buildUnnamed1351(); | 507 o.builds = buildUnnamed1435(); |
| 506 o.nextPageToken = "foo"; | 508 o.nextPageToken = "foo"; |
| 507 } | 509 } |
| 508 buildCounterListBuildsResponse--; | 510 buildCounterListBuildsResponse--; |
| 509 return o; | 511 return o; |
| 510 } | 512 } |
| 511 | 513 |
| 512 checkListBuildsResponse(api.ListBuildsResponse o) { | 514 checkListBuildsResponse(api.ListBuildsResponse o) { |
| 513 buildCounterListBuildsResponse++; | 515 buildCounterListBuildsResponse++; |
| 514 if (buildCounterListBuildsResponse < 3) { | 516 if (buildCounterListBuildsResponse < 3) { |
| 515 checkUnnamed1351(o.builds); | 517 checkUnnamed1435(o.builds); |
| 516 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 518 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
| 517 } | 519 } |
| 518 buildCounterListBuildsResponse--; | 520 buildCounterListBuildsResponse--; |
| 519 } | 521 } |
| 520 | 522 |
| 521 buildUnnamed1352() { | 523 buildUnnamed1436() { |
| 522 var o = new core.List<api.Operation>(); | 524 var o = new core.List<api.Operation>(); |
| 523 o.add(buildOperation()); | 525 o.add(buildOperation()); |
| 524 o.add(buildOperation()); | 526 o.add(buildOperation()); |
| 525 return o; | 527 return o; |
| 526 } | 528 } |
| 527 | 529 |
| 528 checkUnnamed1352(core.List<api.Operation> o) { | 530 checkUnnamed1436(core.List<api.Operation> o) { |
| 529 unittest.expect(o, unittest.hasLength(2)); | 531 unittest.expect(o, unittest.hasLength(2)); |
| 530 checkOperation(o[0]); | 532 checkOperation(o[0]); |
| 531 checkOperation(o[1]); | 533 checkOperation(o[1]); |
| 532 } | 534 } |
| 533 | 535 |
| 534 core.int buildCounterListOperationsResponse = 0; | 536 core.int buildCounterListOperationsResponse = 0; |
| 535 buildListOperationsResponse() { | 537 buildListOperationsResponse() { |
| 536 var o = new api.ListOperationsResponse(); | 538 var o = new api.ListOperationsResponse(); |
| 537 buildCounterListOperationsResponse++; | 539 buildCounterListOperationsResponse++; |
| 538 if (buildCounterListOperationsResponse < 3) { | 540 if (buildCounterListOperationsResponse < 3) { |
| 539 o.nextPageToken = "foo"; | 541 o.nextPageToken = "foo"; |
| 540 o.operations = buildUnnamed1352(); | 542 o.operations = buildUnnamed1436(); |
| 541 } | 543 } |
| 542 buildCounterListOperationsResponse--; | 544 buildCounterListOperationsResponse--; |
| 543 return o; | 545 return o; |
| 544 } | 546 } |
| 545 | 547 |
| 546 checkListOperationsResponse(api.ListOperationsResponse o) { | 548 checkListOperationsResponse(api.ListOperationsResponse o) { |
| 547 buildCounterListOperationsResponse++; | 549 buildCounterListOperationsResponse++; |
| 548 if (buildCounterListOperationsResponse < 3) { | 550 if (buildCounterListOperationsResponse < 3) { |
| 549 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 551 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
| 550 checkUnnamed1352(o.operations); | 552 checkUnnamed1436(o.operations); |
| 551 } | 553 } |
| 552 buildCounterListOperationsResponse--; | 554 buildCounterListOperationsResponse--; |
| 553 } | 555 } |
| 554 | 556 |
| 555 buildUnnamed1353() { | 557 buildUnnamed1437() { |
| 556 var o = new core.Map<core.String, core.Object>(); | 558 var o = new core.Map<core.String, core.Object>(); |
| 557 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 559 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; |
| 558 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 560 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; |
| 559 return o; | 561 return o; |
| 560 } | 562 } |
| 561 | 563 |
| 562 checkUnnamed1353(core.Map<core.String, core.Object> o) { | 564 checkUnnamed1437(core.Map<core.String, core.Object> o) { |
| 563 unittest.expect(o, unittest.hasLength(2)); | 565 unittest.expect(o, unittest.hasLength(2)); |
| 564 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')); | 566 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')); |
| 565 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')); | 567 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')); |
| 566 } | 568 } |
| 567 | 569 |
| 568 buildUnnamed1354() { | 570 buildUnnamed1438() { |
| 569 var o = new core.Map<core.String, core.Object>(); | 571 var o = new core.Map<core.String, core.Object>(); |
| 570 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 572 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; |
| 571 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 573 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; |
| 572 return o; | 574 return o; |
| 573 } | 575 } |
| 574 | 576 |
| 575 checkUnnamed1354(core.Map<core.String, core.Object> o) { | 577 checkUnnamed1438(core.Map<core.String, core.Object> o) { |
| 576 unittest.expect(o, unittest.hasLength(2)); | 578 unittest.expect(o, unittest.hasLength(2)); |
| 577 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')); | 579 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')); |
| 578 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')); | 580 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')); |
| 579 } | 581 } |
| 580 | 582 |
| 581 core.int buildCounterOperation = 0; | 583 core.int buildCounterOperation = 0; |
| 582 buildOperation() { | 584 buildOperation() { |
| 583 var o = new api.Operation(); | 585 var o = new api.Operation(); |
| 584 buildCounterOperation++; | 586 buildCounterOperation++; |
| 585 if (buildCounterOperation < 3) { | 587 if (buildCounterOperation < 3) { |
| 586 o.done = true; | 588 o.done = true; |
| 587 o.error = buildStatus(); | 589 o.error = buildStatus(); |
| 588 o.metadata = buildUnnamed1353(); | 590 o.metadata = buildUnnamed1437(); |
| 589 o.name = "foo"; | 591 o.name = "foo"; |
| 590 o.response = buildUnnamed1354(); | 592 o.response = buildUnnamed1438(); |
| 591 } | 593 } |
| 592 buildCounterOperation--; | 594 buildCounterOperation--; |
| 593 return o; | 595 return o; |
| 594 } | 596 } |
| 595 | 597 |
| 596 checkOperation(api.Operation o) { | 598 checkOperation(api.Operation o) { |
| 597 buildCounterOperation++; | 599 buildCounterOperation++; |
| 598 if (buildCounterOperation < 3) { | 600 if (buildCounterOperation < 3) { |
| 599 unittest.expect(o.done, unittest.isTrue); | 601 unittest.expect(o.done, unittest.isTrue); |
| 600 checkStatus(o.error); | 602 checkStatus(o.error); |
| 601 checkUnnamed1353(o.metadata); | 603 checkUnnamed1437(o.metadata); |
| 602 unittest.expect(o.name, unittest.equals('foo')); | 604 unittest.expect(o.name, unittest.equals('foo')); |
| 603 checkUnnamed1354(o.response); | 605 checkUnnamed1438(o.response); |
| 604 } | 606 } |
| 605 buildCounterOperation--; | 607 buildCounterOperation--; |
| 606 } | 608 } |
| 607 | 609 |
| 608 core.int buildCounterRepoSource = 0; | 610 core.int buildCounterRepoSource = 0; |
| 609 buildRepoSource() { | 611 buildRepoSource() { |
| 610 var o = new api.RepoSource(); | 612 var o = new api.RepoSource(); |
| 611 buildCounterRepoSource++; | 613 buildCounterRepoSource++; |
| 612 if (buildCounterRepoSource < 3) { | 614 if (buildCounterRepoSource < 3) { |
| 613 o.branchName = "foo"; | 615 o.branchName = "foo"; |
| (...skipping 11 matching lines...) Expand all Loading... |
| 625 if (buildCounterRepoSource < 3) { | 627 if (buildCounterRepoSource < 3) { |
| 626 unittest.expect(o.branchName, unittest.equals('foo')); | 628 unittest.expect(o.branchName, unittest.equals('foo')); |
| 627 unittest.expect(o.commitSha, unittest.equals('foo')); | 629 unittest.expect(o.commitSha, unittest.equals('foo')); |
| 628 unittest.expect(o.projectId, unittest.equals('foo')); | 630 unittest.expect(o.projectId, unittest.equals('foo')); |
| 629 unittest.expect(o.repoName, unittest.equals('foo')); | 631 unittest.expect(o.repoName, unittest.equals('foo')); |
| 630 unittest.expect(o.tagName, unittest.equals('foo')); | 632 unittest.expect(o.tagName, unittest.equals('foo')); |
| 631 } | 633 } |
| 632 buildCounterRepoSource--; | 634 buildCounterRepoSource--; |
| 633 } | 635 } |
| 634 | 636 |
| 635 buildUnnamed1355() { | 637 buildUnnamed1439() { |
| 636 var o = new core.List<core.String>(); | 638 var o = new core.List<core.String>(); |
| 637 o.add("foo"); | 639 o.add("foo"); |
| 638 o.add("foo"); | 640 o.add("foo"); |
| 639 return o; | 641 return o; |
| 640 } | 642 } |
| 641 | 643 |
| 642 checkUnnamed1355(core.List<core.String> o) { | 644 checkUnnamed1439(core.List<core.String> o) { |
| 643 unittest.expect(o, unittest.hasLength(2)); | 645 unittest.expect(o, unittest.hasLength(2)); |
| 644 unittest.expect(o[0], unittest.equals('foo')); | 646 unittest.expect(o[0], unittest.equals('foo')); |
| 645 unittest.expect(o[1], unittest.equals('foo')); | 647 unittest.expect(o[1], unittest.equals('foo')); |
| 646 } | 648 } |
| 647 | 649 |
| 648 buildUnnamed1356() { | 650 buildUnnamed1440() { |
| 649 var o = new core.List<api.BuiltImage>(); | 651 var o = new core.List<api.BuiltImage>(); |
| 650 o.add(buildBuiltImage()); | 652 o.add(buildBuiltImage()); |
| 651 o.add(buildBuiltImage()); | 653 o.add(buildBuiltImage()); |
| 652 return o; | 654 return o; |
| 653 } | 655 } |
| 654 | 656 |
| 655 checkUnnamed1356(core.List<api.BuiltImage> o) { | 657 checkUnnamed1440(core.List<api.BuiltImage> o) { |
| 656 unittest.expect(o, unittest.hasLength(2)); | 658 unittest.expect(o, unittest.hasLength(2)); |
| 657 checkBuiltImage(o[0]); | 659 checkBuiltImage(o[0]); |
| 658 checkBuiltImage(o[1]); | 660 checkBuiltImage(o[1]); |
| 659 } | 661 } |
| 660 | 662 |
| 661 core.int buildCounterResults = 0; | 663 core.int buildCounterResults = 0; |
| 662 buildResults() { | 664 buildResults() { |
| 663 var o = new api.Results(); | 665 var o = new api.Results(); |
| 664 buildCounterResults++; | 666 buildCounterResults++; |
| 665 if (buildCounterResults < 3) { | 667 if (buildCounterResults < 3) { |
| 666 o.buildStepImages = buildUnnamed1355(); | 668 o.buildStepImages = buildUnnamed1439(); |
| 667 o.images = buildUnnamed1356(); | 669 o.images = buildUnnamed1440(); |
| 668 } | 670 } |
| 669 buildCounterResults--; | 671 buildCounterResults--; |
| 670 return o; | 672 return o; |
| 671 } | 673 } |
| 672 | 674 |
| 673 checkResults(api.Results o) { | 675 checkResults(api.Results o) { |
| 674 buildCounterResults++; | 676 buildCounterResults++; |
| 675 if (buildCounterResults < 3) { | 677 if (buildCounterResults < 3) { |
| 676 checkUnnamed1355(o.buildStepImages); | 678 checkUnnamed1439(o.buildStepImages); |
| 677 checkUnnamed1356(o.images); | 679 checkUnnamed1440(o.images); |
| 678 } | 680 } |
| 679 buildCounterResults--; | 681 buildCounterResults--; |
| 680 } | 682 } |
| 681 | 683 |
| 682 core.int buildCounterSource = 0; | 684 core.int buildCounterSource = 0; |
| 683 buildSource() { | 685 buildSource() { |
| 684 var o = new api.Source(); | 686 var o = new api.Source(); |
| 685 buildCounterSource++; | 687 buildCounterSource++; |
| 686 if (buildCounterSource < 3) { | 688 if (buildCounterSource < 3) { |
| 687 o.repoSource = buildRepoSource(); | 689 o.repoSource = buildRepoSource(); |
| 688 o.storageSource = buildStorageSource(); | 690 o.storageSource = buildStorageSource(); |
| 689 } | 691 } |
| 690 buildCounterSource--; | 692 buildCounterSource--; |
| 691 return o; | 693 return o; |
| 692 } | 694 } |
| 693 | 695 |
| 694 checkSource(api.Source o) { | 696 checkSource(api.Source o) { |
| 695 buildCounterSource++; | 697 buildCounterSource++; |
| 696 if (buildCounterSource < 3) { | 698 if (buildCounterSource < 3) { |
| 697 checkRepoSource(o.repoSource); | 699 checkRepoSource(o.repoSource); |
| 698 checkStorageSource(o.storageSource); | 700 checkStorageSource(o.storageSource); |
| 699 } | 701 } |
| 700 buildCounterSource--; | 702 buildCounterSource--; |
| 701 } | 703 } |
| 702 | 704 |
| 703 buildUnnamed1357() { | 705 buildUnnamed1441() { |
| 704 var o = new core.Map<core.String, api.FileHashes>(); | 706 var o = new core.Map<core.String, api.FileHashes>(); |
| 705 o["x"] = buildFileHashes(); | 707 o["x"] = buildFileHashes(); |
| 706 o["y"] = buildFileHashes(); | 708 o["y"] = buildFileHashes(); |
| 707 return o; | 709 return o; |
| 708 } | 710 } |
| 709 | 711 |
| 710 checkUnnamed1357(core.Map<core.String, api.FileHashes> o) { | 712 checkUnnamed1441(core.Map<core.String, api.FileHashes> o) { |
| 711 unittest.expect(o, unittest.hasLength(2)); | 713 unittest.expect(o, unittest.hasLength(2)); |
| 712 checkFileHashes(o["x"]); | 714 checkFileHashes(o["x"]); |
| 713 checkFileHashes(o["y"]); | 715 checkFileHashes(o["y"]); |
| 714 } | 716 } |
| 715 | 717 |
| 716 core.int buildCounterSourceProvenance = 0; | 718 core.int buildCounterSourceProvenance = 0; |
| 717 buildSourceProvenance() { | 719 buildSourceProvenance() { |
| 718 var o = new api.SourceProvenance(); | 720 var o = new api.SourceProvenance(); |
| 719 buildCounterSourceProvenance++; | 721 buildCounterSourceProvenance++; |
| 720 if (buildCounterSourceProvenance < 3) { | 722 if (buildCounterSourceProvenance < 3) { |
| 721 o.fileHashes = buildUnnamed1357(); | 723 o.fileHashes = buildUnnamed1441(); |
| 722 o.resolvedRepoSource = buildRepoSource(); | 724 o.resolvedRepoSource = buildRepoSource(); |
| 723 o.resolvedStorageSource = buildStorageSource(); | 725 o.resolvedStorageSource = buildStorageSource(); |
| 724 } | 726 } |
| 725 buildCounterSourceProvenance--; | 727 buildCounterSourceProvenance--; |
| 726 return o; | 728 return o; |
| 727 } | 729 } |
| 728 | 730 |
| 729 checkSourceProvenance(api.SourceProvenance o) { | 731 checkSourceProvenance(api.SourceProvenance o) { |
| 730 buildCounterSourceProvenance++; | 732 buildCounterSourceProvenance++; |
| 731 if (buildCounterSourceProvenance < 3) { | 733 if (buildCounterSourceProvenance < 3) { |
| 732 checkUnnamed1357(o.fileHashes); | 734 checkUnnamed1441(o.fileHashes); |
| 733 checkRepoSource(o.resolvedRepoSource); | 735 checkRepoSource(o.resolvedRepoSource); |
| 734 checkStorageSource(o.resolvedStorageSource); | 736 checkStorageSource(o.resolvedStorageSource); |
| 735 } | 737 } |
| 736 buildCounterSourceProvenance--; | 738 buildCounterSourceProvenance--; |
| 737 } | 739 } |
| 738 | 740 |
| 739 buildUnnamed1358() { | 741 buildUnnamed1442() { |
| 740 var o = new core.Map<core.String, core.Object>(); | 742 var o = new core.Map<core.String, core.Object>(); |
| 741 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 743 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; |
| 742 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 744 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; |
| 743 return o; | 745 return o; |
| 744 } | 746 } |
| 745 | 747 |
| 746 checkUnnamed1358(core.Map<core.String, core.Object> o) { | 748 checkUnnamed1442(core.Map<core.String, core.Object> o) { |
| 747 unittest.expect(o, unittest.hasLength(2)); | 749 unittest.expect(o, unittest.hasLength(2)); |
| 748 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')); | 750 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')); |
| 749 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')); | 751 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')); |
| 750 } | 752 } |
| 751 | 753 |
| 752 buildUnnamed1359() { | 754 buildUnnamed1443() { |
| 753 var o = new core.List<core.Map<core.String, core.Object>>(); | 755 var o = new core.List<core.Map<core.String, core.Object>>(); |
| 754 o.add(buildUnnamed1358()); | 756 o.add(buildUnnamed1442()); |
| 755 o.add(buildUnnamed1358()); | 757 o.add(buildUnnamed1442()); |
| 756 return o; | 758 return o; |
| 757 } | 759 } |
| 758 | 760 |
| 759 checkUnnamed1359(core.List<core.Map<core.String, core.Object>> o) { | 761 checkUnnamed1443(core.List<core.Map<core.String, core.Object>> o) { |
| 760 unittest.expect(o, unittest.hasLength(2)); | 762 unittest.expect(o, unittest.hasLength(2)); |
| 761 checkUnnamed1358(o[0]); | 763 checkUnnamed1442(o[0]); |
| 762 checkUnnamed1358(o[1]); | 764 checkUnnamed1442(o[1]); |
| 763 } | 765 } |
| 764 | 766 |
| 765 core.int buildCounterStatus = 0; | 767 core.int buildCounterStatus = 0; |
| 766 buildStatus() { | 768 buildStatus() { |
| 767 var o = new api.Status(); | 769 var o = new api.Status(); |
| 768 buildCounterStatus++; | 770 buildCounterStatus++; |
| 769 if (buildCounterStatus < 3) { | 771 if (buildCounterStatus < 3) { |
| 770 o.code = 42; | 772 o.code = 42; |
| 771 o.details = buildUnnamed1359(); | 773 o.details = buildUnnamed1443(); |
| 772 o.message = "foo"; | 774 o.message = "foo"; |
| 773 } | 775 } |
| 774 buildCounterStatus--; | 776 buildCounterStatus--; |
| 775 return o; | 777 return o; |
| 776 } | 778 } |
| 777 | 779 |
| 778 checkStatus(api.Status o) { | 780 checkStatus(api.Status o) { |
| 779 buildCounterStatus++; | 781 buildCounterStatus++; |
| 780 if (buildCounterStatus < 3) { | 782 if (buildCounterStatus < 3) { |
| 781 unittest.expect(o.code, unittest.equals(42)); | 783 unittest.expect(o.code, unittest.equals(42)); |
| 782 checkUnnamed1359(o.details); | 784 checkUnnamed1443(o.details); |
| 783 unittest.expect(o.message, unittest.equals('foo')); | 785 unittest.expect(o.message, unittest.equals('foo')); |
| 784 } | 786 } |
| 785 buildCounterStatus--; | 787 buildCounterStatus--; |
| 786 } | 788 } |
| 787 | 789 |
| 788 core.int buildCounterStorageSource = 0; | 790 core.int buildCounterStorageSource = 0; |
| 789 buildStorageSource() { | 791 buildStorageSource() { |
| 790 var o = new api.StorageSource(); | 792 var o = new api.StorageSource(); |
| 791 buildCounterStorageSource++; | 793 buildCounterStorageSource++; |
| 792 if (buildCounterStorageSource < 3) { | 794 if (buildCounterStorageSource < 3) { |
| (...skipping 527 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1320 res.get(arg_projectId, arg_id).then(unittest.expectAsync1(((api.Build resp
onse) { | 1322 res.get(arg_projectId, arg_id).then(unittest.expectAsync1(((api.Build resp
onse) { |
| 1321 checkBuild(response); | 1323 checkBuild(response); |
| 1322 }))); | 1324 }))); |
| 1323 }); | 1325 }); |
| 1324 | 1326 |
| 1325 unittest.test("method--list", () { | 1327 unittest.test("method--list", () { |
| 1326 | 1328 |
| 1327 var mock = new HttpServerMock(); | 1329 var mock = new HttpServerMock(); |
| 1328 api.ProjectsBuildsResourceApi res = new api.CloudbuildApi(mock).projects.b
uilds; | 1330 api.ProjectsBuildsResourceApi res = new api.CloudbuildApi(mock).projects.b
uilds; |
| 1329 var arg_projectId = "foo"; | 1331 var arg_projectId = "foo"; |
| 1330 var arg_filter = "foo"; | |
| 1331 var arg_pageToken = "foo"; | 1332 var arg_pageToken = "foo"; |
| 1332 var arg_pageSize = 42; | 1333 var arg_pageSize = 42; |
| 1334 var arg_filter = "foo"; |
| 1333 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 1335 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 1334 var path = (req.url).path; | 1336 var path = (req.url).path; |
| 1335 var pathOffset = 0; | 1337 var pathOffset = 0; |
| 1336 var index; | 1338 var index; |
| 1337 var subPart; | 1339 var subPart; |
| 1338 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1340 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 1339 pathOffset += 1; | 1341 pathOffset += 1; |
| 1340 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("v1/projects/")); | 1342 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("v1/projects/")); |
| 1341 pathOffset += 12; | 1343 pathOffset += 12; |
| 1342 index = path.indexOf("/builds", pathOffset); | 1344 index = path.indexOf("/builds", pathOffset); |
| (...skipping 13 matching lines...) Expand all Loading... |
| 1356 if (n == "false") return false; | 1358 if (n == "false") return false; |
| 1357 if (n == null) return null; | 1359 if (n == null) return null; |
| 1358 throw new core.ArgumentError("Invalid boolean: $n"); | 1360 throw new core.ArgumentError("Invalid boolean: $n"); |
| 1359 } | 1361 } |
| 1360 if (query.length > 0) { | 1362 if (query.length > 0) { |
| 1361 for (var part in query.split("&")) { | 1363 for (var part in query.split("&")) { |
| 1362 var keyvalue = part.split("="); | 1364 var keyvalue = part.split("="); |
| 1363 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 1365 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 1364 } | 1366 } |
| 1365 } | 1367 } |
| 1366 unittest.expect(queryMap["filter"].first, unittest.equals(arg_filter)); | |
| 1367 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | 1368 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); |
| 1368 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ
als(arg_pageSize)); | 1369 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ
als(arg_pageSize)); |
| 1370 unittest.expect(queryMap["filter"].first, unittest.equals(arg_filter)); |
| 1369 | 1371 |
| 1370 | 1372 |
| 1371 var h = { | 1373 var h = { |
| 1372 "content-type" : "application/json; charset=utf-8", | 1374 "content-type" : "application/json; charset=utf-8", |
| 1373 }; | 1375 }; |
| 1374 var resp = convert.JSON.encode(buildListBuildsResponse()); | 1376 var resp = convert.JSON.encode(buildListBuildsResponse()); |
| 1375 return new async.Future.value(stringResponse(200, h, resp)); | 1377 return new async.Future.value(stringResponse(200, h, resp)); |
| 1376 }), true); | 1378 }), true); |
| 1377 res.list(arg_projectId, filter: arg_filter, pageToken: arg_pageToken, page
Size: arg_pageSize).then(unittest.expectAsync1(((api.ListBuildsResponse response
) { | 1379 res.list(arg_projectId, pageToken: arg_pageToken, pageSize: arg_pageSize,
filter: arg_filter).then(unittest.expectAsync1(((api.ListBuildsResponse response
) { |
| 1378 checkListBuildsResponse(response); | 1380 checkListBuildsResponse(response); |
| 1379 }))); | 1381 }))); |
| 1380 }); | 1382 }); |
| 1381 | 1383 |
| 1382 }); | 1384 }); |
| 1383 | 1385 |
| 1384 | 1386 |
| 1385 unittest.group("resource-ProjectsTriggersResourceApi", () { | 1387 unittest.group("resource-ProjectsTriggersResourceApi", () { |
| 1386 unittest.test("method--create", () { | 1388 unittest.test("method--create", () { |
| 1387 | 1389 |
| (...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1656 res.patch(arg_request, arg_projectId, arg_triggerId).then(unittest.expectA
sync1(((api.BuildTrigger response) { | 1658 res.patch(arg_request, arg_projectId, arg_triggerId).then(unittest.expectA
sync1(((api.BuildTrigger response) { |
| 1657 checkBuildTrigger(response); | 1659 checkBuildTrigger(response); |
| 1658 }))); | 1660 }))); |
| 1659 }); | 1661 }); |
| 1660 | 1662 |
| 1661 }); | 1663 }); |
| 1662 | 1664 |
| 1663 | 1665 |
| 1664 } | 1666 } |
| 1665 | 1667 |
| OLD | NEW |