| OLD | NEW |
| 1 library googleapis_beta.runtimeconfig.v1beta1.test; | 1 library googleapis_beta.runtimeconfig.v1beta1.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 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 101 } | 101 } |
| 102 | 102 |
| 103 checkEndCondition(api.EndCondition o) { | 103 checkEndCondition(api.EndCondition o) { |
| 104 buildCounterEndCondition++; | 104 buildCounterEndCondition++; |
| 105 if (buildCounterEndCondition < 3) { | 105 if (buildCounterEndCondition < 3) { |
| 106 checkCardinality(o.cardinality); | 106 checkCardinality(o.cardinality); |
| 107 } | 107 } |
| 108 buildCounterEndCondition--; | 108 buildCounterEndCondition--; |
| 109 } | 109 } |
| 110 | 110 |
| 111 buildUnnamed4213() { | 111 buildUnnamed4048() { |
| 112 var o = new core.List<api.RuntimeConfig>(); | 112 var o = new core.List<api.RuntimeConfig>(); |
| 113 o.add(buildRuntimeConfig()); | 113 o.add(buildRuntimeConfig()); |
| 114 o.add(buildRuntimeConfig()); | 114 o.add(buildRuntimeConfig()); |
| 115 return o; | 115 return o; |
| 116 } | 116 } |
| 117 | 117 |
| 118 checkUnnamed4213(core.List<api.RuntimeConfig> o) { | 118 checkUnnamed4048(core.List<api.RuntimeConfig> o) { |
| 119 unittest.expect(o, unittest.hasLength(2)); | 119 unittest.expect(o, unittest.hasLength(2)); |
| 120 checkRuntimeConfig(o[0]); | 120 checkRuntimeConfig(o[0]); |
| 121 checkRuntimeConfig(o[1]); | 121 checkRuntimeConfig(o[1]); |
| 122 } | 122 } |
| 123 | 123 |
| 124 core.int buildCounterListConfigsResponse = 0; | 124 core.int buildCounterListConfigsResponse = 0; |
| 125 buildListConfigsResponse() { | 125 buildListConfigsResponse() { |
| 126 var o = new api.ListConfigsResponse(); | 126 var o = new api.ListConfigsResponse(); |
| 127 buildCounterListConfigsResponse++; | 127 buildCounterListConfigsResponse++; |
| 128 if (buildCounterListConfigsResponse < 3) { | 128 if (buildCounterListConfigsResponse < 3) { |
| 129 o.configs = buildUnnamed4213(); | 129 o.configs = buildUnnamed4048(); |
| 130 o.nextPageToken = "foo"; | 130 o.nextPageToken = "foo"; |
| 131 } | 131 } |
| 132 buildCounterListConfigsResponse--; | 132 buildCounterListConfigsResponse--; |
| 133 return o; | 133 return o; |
| 134 } | 134 } |
| 135 | 135 |
| 136 checkListConfigsResponse(api.ListConfigsResponse o) { | 136 checkListConfigsResponse(api.ListConfigsResponse o) { |
| 137 buildCounterListConfigsResponse++; | 137 buildCounterListConfigsResponse++; |
| 138 if (buildCounterListConfigsResponse < 3) { | 138 if (buildCounterListConfigsResponse < 3) { |
| 139 checkUnnamed4213(o.configs); | 139 checkUnnamed4048(o.configs); |
| 140 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 140 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
| 141 } | 141 } |
| 142 buildCounterListConfigsResponse--; | 142 buildCounterListConfigsResponse--; |
| 143 } | 143 } |
| 144 | 144 |
| 145 buildUnnamed4214() { | 145 buildUnnamed4049() { |
| 146 var o = new core.List<api.Variable>(); | 146 var o = new core.List<api.Variable>(); |
| 147 o.add(buildVariable()); | 147 o.add(buildVariable()); |
| 148 o.add(buildVariable()); | 148 o.add(buildVariable()); |
| 149 return o; | 149 return o; |
| 150 } | 150 } |
| 151 | 151 |
| 152 checkUnnamed4214(core.List<api.Variable> o) { | 152 checkUnnamed4049(core.List<api.Variable> o) { |
| 153 unittest.expect(o, unittest.hasLength(2)); | 153 unittest.expect(o, unittest.hasLength(2)); |
| 154 checkVariable(o[0]); | 154 checkVariable(o[0]); |
| 155 checkVariable(o[1]); | 155 checkVariable(o[1]); |
| 156 } | 156 } |
| 157 | 157 |
| 158 core.int buildCounterListVariablesResponse = 0; | 158 core.int buildCounterListVariablesResponse = 0; |
| 159 buildListVariablesResponse() { | 159 buildListVariablesResponse() { |
| 160 var o = new api.ListVariablesResponse(); | 160 var o = new api.ListVariablesResponse(); |
| 161 buildCounterListVariablesResponse++; | 161 buildCounterListVariablesResponse++; |
| 162 if (buildCounterListVariablesResponse < 3) { | 162 if (buildCounterListVariablesResponse < 3) { |
| 163 o.nextPageToken = "foo"; | 163 o.nextPageToken = "foo"; |
| 164 o.variables = buildUnnamed4214(); | 164 o.variables = buildUnnamed4049(); |
| 165 } | 165 } |
| 166 buildCounterListVariablesResponse--; | 166 buildCounterListVariablesResponse--; |
| 167 return o; | 167 return o; |
| 168 } | 168 } |
| 169 | 169 |
| 170 checkListVariablesResponse(api.ListVariablesResponse o) { | 170 checkListVariablesResponse(api.ListVariablesResponse o) { |
| 171 buildCounterListVariablesResponse++; | 171 buildCounterListVariablesResponse++; |
| 172 if (buildCounterListVariablesResponse < 3) { | 172 if (buildCounterListVariablesResponse < 3) { |
| 173 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 173 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
| 174 checkUnnamed4214(o.variables); | 174 checkUnnamed4049(o.variables); |
| 175 } | 175 } |
| 176 buildCounterListVariablesResponse--; | 176 buildCounterListVariablesResponse--; |
| 177 } | 177 } |
| 178 | 178 |
| 179 buildUnnamed4215() { | 179 buildUnnamed4050() { |
| 180 var o = new core.List<api.Waiter>(); | 180 var o = new core.List<api.Waiter>(); |
| 181 o.add(buildWaiter()); | 181 o.add(buildWaiter()); |
| 182 o.add(buildWaiter()); | 182 o.add(buildWaiter()); |
| 183 return o; | 183 return o; |
| 184 } | 184 } |
| 185 | 185 |
| 186 checkUnnamed4215(core.List<api.Waiter> o) { | 186 checkUnnamed4050(core.List<api.Waiter> o) { |
| 187 unittest.expect(o, unittest.hasLength(2)); | 187 unittest.expect(o, unittest.hasLength(2)); |
| 188 checkWaiter(o[0]); | 188 checkWaiter(o[0]); |
| 189 checkWaiter(o[1]); | 189 checkWaiter(o[1]); |
| 190 } | 190 } |
| 191 | 191 |
| 192 core.int buildCounterListWaitersResponse = 0; | 192 core.int buildCounterListWaitersResponse = 0; |
| 193 buildListWaitersResponse() { | 193 buildListWaitersResponse() { |
| 194 var o = new api.ListWaitersResponse(); | 194 var o = new api.ListWaitersResponse(); |
| 195 buildCounterListWaitersResponse++; | 195 buildCounterListWaitersResponse++; |
| 196 if (buildCounterListWaitersResponse < 3) { | 196 if (buildCounterListWaitersResponse < 3) { |
| 197 o.nextPageToken = "foo"; | 197 o.nextPageToken = "foo"; |
| 198 o.waiters = buildUnnamed4215(); | 198 o.waiters = buildUnnamed4050(); |
| 199 } | 199 } |
| 200 buildCounterListWaitersResponse--; | 200 buildCounterListWaitersResponse--; |
| 201 return o; | 201 return o; |
| 202 } | 202 } |
| 203 | 203 |
| 204 checkListWaitersResponse(api.ListWaitersResponse o) { | 204 checkListWaitersResponse(api.ListWaitersResponse o) { |
| 205 buildCounterListWaitersResponse++; | 205 buildCounterListWaitersResponse++; |
| 206 if (buildCounterListWaitersResponse < 3) { | 206 if (buildCounterListWaitersResponse < 3) { |
| 207 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 207 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
| 208 checkUnnamed4215(o.waiters); | 208 checkUnnamed4050(o.waiters); |
| 209 } | 209 } |
| 210 buildCounterListWaitersResponse--; | 210 buildCounterListWaitersResponse--; |
| 211 } | 211 } |
| 212 | 212 |
| 213 buildUnnamed4216() { | 213 buildUnnamed4051() { |
| 214 var o = new core.Map<core.String, core.Object>(); | 214 var o = new core.Map<core.String, core.Object>(); |
| 215 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 215 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; |
| 216 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 216 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; |
| 217 return o; | 217 return o; |
| 218 } | 218 } |
| 219 | 219 |
| 220 checkUnnamed4216(core.Map<core.String, core.Object> o) { | 220 checkUnnamed4051(core.Map<core.String, core.Object> o) { |
| 221 unittest.expect(o, unittest.hasLength(2)); | 221 unittest.expect(o, unittest.hasLength(2)); |
| 222 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')); | 222 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')); |
| 223 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')); | 223 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')); |
| 224 } | 224 } |
| 225 | 225 |
| 226 buildUnnamed4217() { | 226 buildUnnamed4052() { |
| 227 var o = new core.Map<core.String, core.Object>(); | 227 var o = new core.Map<core.String, core.Object>(); |
| 228 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 228 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; |
| 229 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 229 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; |
| 230 return o; | 230 return o; |
| 231 } | 231 } |
| 232 | 232 |
| 233 checkUnnamed4217(core.Map<core.String, core.Object> o) { | 233 checkUnnamed4052(core.Map<core.String, core.Object> o) { |
| 234 unittest.expect(o, unittest.hasLength(2)); | 234 unittest.expect(o, unittest.hasLength(2)); |
| 235 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')); | 235 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')); |
| 236 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')); | 236 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')); |
| 237 } | 237 } |
| 238 | 238 |
| 239 core.int buildCounterOperation = 0; | 239 core.int buildCounterOperation = 0; |
| 240 buildOperation() { | 240 buildOperation() { |
| 241 var o = new api.Operation(); | 241 var o = new api.Operation(); |
| 242 buildCounterOperation++; | 242 buildCounterOperation++; |
| 243 if (buildCounterOperation < 3) { | 243 if (buildCounterOperation < 3) { |
| 244 o.done = true; | 244 o.done = true; |
| 245 o.error = buildStatus(); | 245 o.error = buildStatus(); |
| 246 o.metadata = buildUnnamed4216(); | 246 o.metadata = buildUnnamed4051(); |
| 247 o.name = "foo"; | 247 o.name = "foo"; |
| 248 o.response = buildUnnamed4217(); | 248 o.response = buildUnnamed4052(); |
| 249 } | 249 } |
| 250 buildCounterOperation--; | 250 buildCounterOperation--; |
| 251 return o; | 251 return o; |
| 252 } | 252 } |
| 253 | 253 |
| 254 checkOperation(api.Operation o) { | 254 checkOperation(api.Operation o) { |
| 255 buildCounterOperation++; | 255 buildCounterOperation++; |
| 256 if (buildCounterOperation < 3) { | 256 if (buildCounterOperation < 3) { |
| 257 unittest.expect(o.done, unittest.isTrue); | 257 unittest.expect(o.done, unittest.isTrue); |
| 258 checkStatus(o.error); | 258 checkStatus(o.error); |
| 259 checkUnnamed4216(o.metadata); | 259 checkUnnamed4051(o.metadata); |
| 260 unittest.expect(o.name, unittest.equals('foo')); | 260 unittest.expect(o.name, unittest.equals('foo')); |
| 261 checkUnnamed4217(o.response); | 261 checkUnnamed4052(o.response); |
| 262 } | 262 } |
| 263 buildCounterOperation--; | 263 buildCounterOperation--; |
| 264 } | 264 } |
| 265 | 265 |
| 266 core.int buildCounterRuntimeConfig = 0; | 266 core.int buildCounterRuntimeConfig = 0; |
| 267 buildRuntimeConfig() { | 267 buildRuntimeConfig() { |
| 268 var o = new api.RuntimeConfig(); | 268 var o = new api.RuntimeConfig(); |
| 269 buildCounterRuntimeConfig++; | 269 buildCounterRuntimeConfig++; |
| 270 if (buildCounterRuntimeConfig < 3) { | 270 if (buildCounterRuntimeConfig < 3) { |
| 271 o.description = "foo"; | 271 o.description = "foo"; |
| 272 o.name = "foo"; | 272 o.name = "foo"; |
| 273 } | 273 } |
| 274 buildCounterRuntimeConfig--; | 274 buildCounterRuntimeConfig--; |
| 275 return o; | 275 return o; |
| 276 } | 276 } |
| 277 | 277 |
| 278 checkRuntimeConfig(api.RuntimeConfig o) { | 278 checkRuntimeConfig(api.RuntimeConfig o) { |
| 279 buildCounterRuntimeConfig++; | 279 buildCounterRuntimeConfig++; |
| 280 if (buildCounterRuntimeConfig < 3) { | 280 if (buildCounterRuntimeConfig < 3) { |
| 281 unittest.expect(o.description, unittest.equals('foo')); | 281 unittest.expect(o.description, unittest.equals('foo')); |
| 282 unittest.expect(o.name, unittest.equals('foo')); | 282 unittest.expect(o.name, unittest.equals('foo')); |
| 283 } | 283 } |
| 284 buildCounterRuntimeConfig--; | 284 buildCounterRuntimeConfig--; |
| 285 } | 285 } |
| 286 | 286 |
| 287 buildUnnamed4218() { | 287 buildUnnamed4053() { |
| 288 var o = new core.Map<core.String, core.Object>(); | 288 var o = new core.Map<core.String, core.Object>(); |
| 289 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 289 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; |
| 290 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 290 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; |
| 291 return o; | 291 return o; |
| 292 } | 292 } |
| 293 | 293 |
| 294 checkUnnamed4218(core.Map<core.String, core.Object> o) { | 294 checkUnnamed4053(core.Map<core.String, core.Object> o) { |
| 295 unittest.expect(o, unittest.hasLength(2)); | 295 unittest.expect(o, unittest.hasLength(2)); |
| 296 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')); | 296 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')); |
| 297 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')); | 297 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')); |
| 298 } | 298 } |
| 299 | 299 |
| 300 buildUnnamed4219() { | 300 buildUnnamed4054() { |
| 301 var o = new core.List<core.Map<core.String, core.Object>>(); | 301 var o = new core.List<core.Map<core.String, core.Object>>(); |
| 302 o.add(buildUnnamed4218()); | 302 o.add(buildUnnamed4053()); |
| 303 o.add(buildUnnamed4218()); | 303 o.add(buildUnnamed4053()); |
| 304 return o; | 304 return o; |
| 305 } | 305 } |
| 306 | 306 |
| 307 checkUnnamed4219(core.List<core.Map<core.String, core.Object>> o) { | 307 checkUnnamed4054(core.List<core.Map<core.String, core.Object>> o) { |
| 308 unittest.expect(o, unittest.hasLength(2)); | 308 unittest.expect(o, unittest.hasLength(2)); |
| 309 checkUnnamed4218(o[0]); | 309 checkUnnamed4053(o[0]); |
| 310 checkUnnamed4218(o[1]); | 310 checkUnnamed4053(o[1]); |
| 311 } | 311 } |
| 312 | 312 |
| 313 core.int buildCounterStatus = 0; | 313 core.int buildCounterStatus = 0; |
| 314 buildStatus() { | 314 buildStatus() { |
| 315 var o = new api.Status(); | 315 var o = new api.Status(); |
| 316 buildCounterStatus++; | 316 buildCounterStatus++; |
| 317 if (buildCounterStatus < 3) { | 317 if (buildCounterStatus < 3) { |
| 318 o.code = 42; | 318 o.code = 42; |
| 319 o.details = buildUnnamed4219(); | 319 o.details = buildUnnamed4054(); |
| 320 o.message = "foo"; | 320 o.message = "foo"; |
| 321 } | 321 } |
| 322 buildCounterStatus--; | 322 buildCounterStatus--; |
| 323 return o; | 323 return o; |
| 324 } | 324 } |
| 325 | 325 |
| 326 checkStatus(api.Status o) { | 326 checkStatus(api.Status o) { |
| 327 buildCounterStatus++; | 327 buildCounterStatus++; |
| 328 if (buildCounterStatus < 3) { | 328 if (buildCounterStatus < 3) { |
| 329 unittest.expect(o.code, unittest.equals(42)); | 329 unittest.expect(o.code, unittest.equals(42)); |
| 330 checkUnnamed4219(o.details); | 330 checkUnnamed4054(o.details); |
| 331 unittest.expect(o.message, unittest.equals('foo')); | 331 unittest.expect(o.message, unittest.equals('foo')); |
| 332 } | 332 } |
| 333 buildCounterStatus--; | 333 buildCounterStatus--; |
| 334 } | 334 } |
| 335 | 335 |
| 336 core.int buildCounterVariable = 0; | 336 core.int buildCounterVariable = 0; |
| 337 buildVariable() { | 337 buildVariable() { |
| 338 var o = new api.Variable(); | 338 var o = new api.Variable(); |
| 339 buildCounterVariable++; | 339 buildCounterVariable++; |
| 340 if (buildCounterVariable < 3) { | 340 if (buildCounterVariable < 3) { |
| (...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 520 }); | 520 }); |
| 521 | 521 |
| 522 | 522 |
| 523 unittest.group("resource-ProjectsConfigsResourceApi", () { | 523 unittest.group("resource-ProjectsConfigsResourceApi", () { |
| 524 unittest.test("method--create", () { | 524 unittest.test("method--create", () { |
| 525 | 525 |
| 526 var mock = new HttpServerMock(); | 526 var mock = new HttpServerMock(); |
| 527 api.ProjectsConfigsResourceApi res = new api.RuntimeconfigApi(mock).projec
ts.configs; | 527 api.ProjectsConfigsResourceApi res = new api.RuntimeconfigApi(mock).projec
ts.configs; |
| 528 var arg_request = buildRuntimeConfig(); | 528 var arg_request = buildRuntimeConfig(); |
| 529 var arg_parent = "foo"; | 529 var arg_parent = "foo"; |
| 530 var arg_requestId = "foo"; |
| 530 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 531 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 531 var obj = new api.RuntimeConfig.fromJson(json); | 532 var obj = new api.RuntimeConfig.fromJson(json); |
| 532 checkRuntimeConfig(obj); | 533 checkRuntimeConfig(obj); |
| 533 | 534 |
| 534 var path = (req.url).path; | 535 var path = (req.url).path; |
| 535 var pathOffset = 0; | 536 var pathOffset = 0; |
| 536 var index; | 537 var index; |
| 537 var subPart; | 538 var subPart; |
| 538 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 539 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 539 pathOffset += 1; | 540 pathOffset += 1; |
| (...skipping 10 matching lines...) Expand all Loading... |
| 550 if (n == "false") return false; | 551 if (n == "false") return false; |
| 551 if (n == null) return null; | 552 if (n == null) return null; |
| 552 throw new core.ArgumentError("Invalid boolean: $n"); | 553 throw new core.ArgumentError("Invalid boolean: $n"); |
| 553 } | 554 } |
| 554 if (query.length > 0) { | 555 if (query.length > 0) { |
| 555 for (var part in query.split("&")) { | 556 for (var part in query.split("&")) { |
| 556 var keyvalue = part.split("="); | 557 var keyvalue = part.split("="); |
| 557 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 558 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 558 } | 559 } |
| 559 } | 560 } |
| 561 unittest.expect(queryMap["requestId"].first, unittest.equals(arg_request
Id)); |
| 560 | 562 |
| 561 | 563 |
| 562 var h = { | 564 var h = { |
| 563 "content-type" : "application/json; charset=utf-8", | 565 "content-type" : "application/json; charset=utf-8", |
| 564 }; | 566 }; |
| 565 var resp = convert.JSON.encode(buildRuntimeConfig()); | 567 var resp = convert.JSON.encode(buildRuntimeConfig()); |
| 566 return new async.Future.value(stringResponse(200, h, resp)); | 568 return new async.Future.value(stringResponse(200, h, resp)); |
| 567 }), true); | 569 }), true); |
| 568 res.create(arg_request, arg_parent).then(unittest.expectAsync(((api.Runtim
eConfig response) { | 570 res.create(arg_request, arg_parent, requestId: arg_requestId).then(unittes
t.expectAsync(((api.RuntimeConfig response) { |
| 569 checkRuntimeConfig(response); | 571 checkRuntimeConfig(response); |
| 570 }))); | 572 }))); |
| 571 }); | 573 }); |
| 572 | 574 |
| 573 unittest.test("method--delete", () { | 575 unittest.test("method--delete", () { |
| 574 | 576 |
| 575 var mock = new HttpServerMock(); | 577 var mock = new HttpServerMock(); |
| 576 api.ProjectsConfigsResourceApi res = new api.RuntimeconfigApi(mock).projec
ts.configs; | 578 api.ProjectsConfigsResourceApi res = new api.RuntimeconfigApi(mock).projec
ts.configs; |
| 577 var arg_name = "foo"; | 579 var arg_name = "foo"; |
| 578 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 580 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| (...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 810 }); | 812 }); |
| 811 | 813 |
| 812 | 814 |
| 813 unittest.group("resource-ProjectsConfigsVariablesResourceApi", () { | 815 unittest.group("resource-ProjectsConfigsVariablesResourceApi", () { |
| 814 unittest.test("method--create", () { | 816 unittest.test("method--create", () { |
| 815 | 817 |
| 816 var mock = new HttpServerMock(); | 818 var mock = new HttpServerMock(); |
| 817 api.ProjectsConfigsVariablesResourceApi res = new api.RuntimeconfigApi(moc
k).projects.configs.variables; | 819 api.ProjectsConfigsVariablesResourceApi res = new api.RuntimeconfigApi(moc
k).projects.configs.variables; |
| 818 var arg_request = buildVariable(); | 820 var arg_request = buildVariable(); |
| 819 var arg_parent = "foo"; | 821 var arg_parent = "foo"; |
| 822 var arg_requestId = "foo"; |
| 820 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 823 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 821 var obj = new api.Variable.fromJson(json); | 824 var obj = new api.Variable.fromJson(json); |
| 822 checkVariable(obj); | 825 checkVariable(obj); |
| 823 | 826 |
| 824 var path = (req.url).path; | 827 var path = (req.url).path; |
| 825 var pathOffset = 0; | 828 var pathOffset = 0; |
| 826 var index; | 829 var index; |
| 827 var subPart; | 830 var subPart; |
| 828 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 831 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 829 pathOffset += 1; | 832 pathOffset += 1; |
| (...skipping 10 matching lines...) Expand all Loading... |
| 840 if (n == "false") return false; | 843 if (n == "false") return false; |
| 841 if (n == null) return null; | 844 if (n == null) return null; |
| 842 throw new core.ArgumentError("Invalid boolean: $n"); | 845 throw new core.ArgumentError("Invalid boolean: $n"); |
| 843 } | 846 } |
| 844 if (query.length > 0) { | 847 if (query.length > 0) { |
| 845 for (var part in query.split("&")) { | 848 for (var part in query.split("&")) { |
| 846 var keyvalue = part.split("="); | 849 var keyvalue = part.split("="); |
| 847 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 850 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 848 } | 851 } |
| 849 } | 852 } |
| 853 unittest.expect(queryMap["requestId"].first, unittest.equals(arg_request
Id)); |
| 850 | 854 |
| 851 | 855 |
| 852 var h = { | 856 var h = { |
| 853 "content-type" : "application/json; charset=utf-8", | 857 "content-type" : "application/json; charset=utf-8", |
| 854 }; | 858 }; |
| 855 var resp = convert.JSON.encode(buildVariable()); | 859 var resp = convert.JSON.encode(buildVariable()); |
| 856 return new async.Future.value(stringResponse(200, h, resp)); | 860 return new async.Future.value(stringResponse(200, h, resp)); |
| 857 }), true); | 861 }), true); |
| 858 res.create(arg_request, arg_parent).then(unittest.expectAsync(((api.Variab
le response) { | 862 res.create(arg_request, arg_parent, requestId: arg_requestId).then(unittes
t.expectAsync(((api.Variable response) { |
| 859 checkVariable(response); | 863 checkVariable(response); |
| 860 }))); | 864 }))); |
| 861 }); | 865 }); |
| 862 | 866 |
| 863 unittest.test("method--delete", () { | 867 unittest.test("method--delete", () { |
| 864 | 868 |
| 865 var mock = new HttpServerMock(); | 869 var mock = new HttpServerMock(); |
| 866 api.ProjectsConfigsVariablesResourceApi res = new api.RuntimeconfigApi(moc
k).projects.configs.variables; | 870 api.ProjectsConfigsVariablesResourceApi res = new api.RuntimeconfigApi(moc
k).projects.configs.variables; |
| 867 var arg_name = "foo"; | 871 var arg_name = "foo"; |
| 868 var arg_recursive = true; | 872 var arg_recursive = true; |
| (...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1104 }); | 1108 }); |
| 1105 | 1109 |
| 1106 | 1110 |
| 1107 unittest.group("resource-ProjectsConfigsWaitersResourceApi", () { | 1111 unittest.group("resource-ProjectsConfigsWaitersResourceApi", () { |
| 1108 unittest.test("method--create", () { | 1112 unittest.test("method--create", () { |
| 1109 | 1113 |
| 1110 var mock = new HttpServerMock(); | 1114 var mock = new HttpServerMock(); |
| 1111 api.ProjectsConfigsWaitersResourceApi res = new api.RuntimeconfigApi(mock)
.projects.configs.waiters; | 1115 api.ProjectsConfigsWaitersResourceApi res = new api.RuntimeconfigApi(mock)
.projects.configs.waiters; |
| 1112 var arg_request = buildWaiter(); | 1116 var arg_request = buildWaiter(); |
| 1113 var arg_parent = "foo"; | 1117 var arg_parent = "foo"; |
| 1118 var arg_requestId = "foo"; |
| 1114 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1119 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 1115 var obj = new api.Waiter.fromJson(json); | 1120 var obj = new api.Waiter.fromJson(json); |
| 1116 checkWaiter(obj); | 1121 checkWaiter(obj); |
| 1117 | 1122 |
| 1118 var path = (req.url).path; | 1123 var path = (req.url).path; |
| 1119 var pathOffset = 0; | 1124 var pathOffset = 0; |
| 1120 var index; | 1125 var index; |
| 1121 var subPart; | 1126 var subPart; |
| 1122 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1127 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 1123 pathOffset += 1; | 1128 pathOffset += 1; |
| (...skipping 10 matching lines...) Expand all Loading... |
| 1134 if (n == "false") return false; | 1139 if (n == "false") return false; |
| 1135 if (n == null) return null; | 1140 if (n == null) return null; |
| 1136 throw new core.ArgumentError("Invalid boolean: $n"); | 1141 throw new core.ArgumentError("Invalid boolean: $n"); |
| 1137 } | 1142 } |
| 1138 if (query.length > 0) { | 1143 if (query.length > 0) { |
| 1139 for (var part in query.split("&")) { | 1144 for (var part in query.split("&")) { |
| 1140 var keyvalue = part.split("="); | 1145 var keyvalue = part.split("="); |
| 1141 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 1146 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 1142 } | 1147 } |
| 1143 } | 1148 } |
| 1149 unittest.expect(queryMap["requestId"].first, unittest.equals(arg_request
Id)); |
| 1144 | 1150 |
| 1145 | 1151 |
| 1146 var h = { | 1152 var h = { |
| 1147 "content-type" : "application/json; charset=utf-8", | 1153 "content-type" : "application/json; charset=utf-8", |
| 1148 }; | 1154 }; |
| 1149 var resp = convert.JSON.encode(buildOperation()); | 1155 var resp = convert.JSON.encode(buildOperation()); |
| 1150 return new async.Future.value(stringResponse(200, h, resp)); | 1156 return new async.Future.value(stringResponse(200, h, resp)); |
| 1151 }), true); | 1157 }), true); |
| 1152 res.create(arg_request, arg_parent).then(unittest.expectAsync(((api.Operat
ion response) { | 1158 res.create(arg_request, arg_parent, requestId: arg_requestId).then(unittes
t.expectAsync(((api.Operation response) { |
| 1153 checkOperation(response); | 1159 checkOperation(response); |
| 1154 }))); | 1160 }))); |
| 1155 }); | 1161 }); |
| 1156 | 1162 |
| 1157 unittest.test("method--delete", () { | 1163 unittest.test("method--delete", () { |
| 1158 | 1164 |
| 1159 var mock = new HttpServerMock(); | 1165 var mock = new HttpServerMock(); |
| 1160 api.ProjectsConfigsWaitersResourceApi res = new api.RuntimeconfigApi(mock)
.projects.configs.waiters; | 1166 api.ProjectsConfigsWaitersResourceApi res = new api.RuntimeconfigApi(mock)
.projects.configs.waiters; |
| 1161 var arg_name = "foo"; | 1167 var arg_name = "foo"; |
| 1162 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1168 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| (...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1291 res.list(arg_parent, pageSize: arg_pageSize, pageToken: arg_pageToken).the
n(unittest.expectAsync(((api.ListWaitersResponse response) { | 1297 res.list(arg_parent, pageSize: arg_pageSize, pageToken: arg_pageToken).the
n(unittest.expectAsync(((api.ListWaitersResponse response) { |
| 1292 checkListWaitersResponse(response); | 1298 checkListWaitersResponse(response); |
| 1293 }))); | 1299 }))); |
| 1294 }); | 1300 }); |
| 1295 | 1301 |
| 1296 }); | 1302 }); |
| 1297 | 1303 |
| 1298 | 1304 |
| 1299 } | 1305 } |
| 1300 | 1306 |
| OLD | NEW |