| 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:test/test.dart' as unittest; |
| 11 | 11 |
| 12 import 'package:googleapis_beta/runtimeconfig/v1beta1.dart' as api; | 12 import 'package:googleapis_beta/runtimeconfig/v1beta1.dart' as api; |
| 13 | 13 |
| 14 class HttpServerMock extends http.BaseClient { | 14 class HttpServerMock extends http.BaseClient { |
| 15 core.Function _callback; | 15 core.Function _callback; |
| 16 core.bool _expectJson; | 16 core.bool _expectJson; |
| 17 | 17 |
| 18 void register(core.Function callback, core.bool expectJson) { | 18 void register(core.Function callback, core.bool expectJson) { |
| 19 _callback = callback; | 19 _callback = callback; |
| 20 _expectJson = expectJson; | 20 _expectJson = expectJson; |
| (...skipping 18 matching lines...) Expand all Loading... |
| 39 } else { | 39 } else { |
| 40 return stream.toBytes().then((data) { | 40 return stream.toBytes().then((data) { |
| 41 return _callback(request, data); | 41 return _callback(request, data); |
| 42 }); | 42 }); |
| 43 } | 43 } |
| 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<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 buildUnnamed3920() { | 54 buildUnnamed3396() { |
| 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 checkUnnamed3920(core.List<core.String> o) { | 61 checkUnnamed3396(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 core.int buildCounterBinding = 0; | 67 core.int buildCounterBinding = 0; |
| 68 buildBinding() { | 68 buildBinding() { |
| 69 var o = new api.Binding(); | 69 var o = new api.Binding(); |
| 70 buildCounterBinding++; | 70 buildCounterBinding++; |
| 71 if (buildCounterBinding < 3) { | 71 if (buildCounterBinding < 3) { |
| 72 o.members = buildUnnamed3920(); | 72 o.members = buildUnnamed3396(); |
| 73 o.role = "foo"; | 73 o.role = "foo"; |
| 74 } | 74 } |
| 75 buildCounterBinding--; | 75 buildCounterBinding--; |
| 76 return o; | 76 return o; |
| 77 } | 77 } |
| 78 | 78 |
| 79 checkBinding(api.Binding o) { | 79 checkBinding(api.Binding o) { |
| 80 buildCounterBinding++; | 80 buildCounterBinding++; |
| 81 if (buildCounterBinding < 3) { | 81 if (buildCounterBinding < 3) { |
| 82 checkUnnamed3920(o.members); | 82 checkUnnamed3396(o.members); |
| 83 unittest.expect(o.role, unittest.equals('foo')); | 83 unittest.expect(o.role, unittest.equals('foo')); |
| 84 } | 84 } |
| 85 buildCounterBinding--; | 85 buildCounterBinding--; |
| 86 } | 86 } |
| 87 | 87 |
| 88 core.int buildCounterCardinality = 0; | 88 core.int buildCounterCardinality = 0; |
| 89 buildCardinality() { | 89 buildCardinality() { |
| 90 var o = new api.Cardinality(); | 90 var o = new api.Cardinality(); |
| 91 buildCounterCardinality++; | 91 buildCounterCardinality++; |
| 92 if (buildCounterCardinality < 3) { | 92 if (buildCounterCardinality < 3) { |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 135 } | 135 } |
| 136 | 136 |
| 137 checkEndCondition(api.EndCondition o) { | 137 checkEndCondition(api.EndCondition o) { |
| 138 buildCounterEndCondition++; | 138 buildCounterEndCondition++; |
| 139 if (buildCounterEndCondition < 3) { | 139 if (buildCounterEndCondition < 3) { |
| 140 checkCardinality(o.cardinality); | 140 checkCardinality(o.cardinality); |
| 141 } | 141 } |
| 142 buildCounterEndCondition--; | 142 buildCounterEndCondition--; |
| 143 } | 143 } |
| 144 | 144 |
| 145 buildUnnamed3921() { | 145 buildUnnamed3397() { |
| 146 var o = new core.List<api.RuntimeConfig>(); | 146 var o = new core.List<api.RuntimeConfig>(); |
| 147 o.add(buildRuntimeConfig()); | 147 o.add(buildRuntimeConfig()); |
| 148 o.add(buildRuntimeConfig()); | 148 o.add(buildRuntimeConfig()); |
| 149 return o; | 149 return o; |
| 150 } | 150 } |
| 151 | 151 |
| 152 checkUnnamed3921(core.List<api.RuntimeConfig> o) { | 152 checkUnnamed3397(core.List<api.RuntimeConfig> o) { |
| 153 unittest.expect(o, unittest.hasLength(2)); | 153 unittest.expect(o, unittest.hasLength(2)); |
| 154 checkRuntimeConfig(o[0]); | 154 checkRuntimeConfig(o[0]); |
| 155 checkRuntimeConfig(o[1]); | 155 checkRuntimeConfig(o[1]); |
| 156 } | 156 } |
| 157 | 157 |
| 158 core.int buildCounterListConfigsResponse = 0; | 158 core.int buildCounterListConfigsResponse = 0; |
| 159 buildListConfigsResponse() { | 159 buildListConfigsResponse() { |
| 160 var o = new api.ListConfigsResponse(); | 160 var o = new api.ListConfigsResponse(); |
| 161 buildCounterListConfigsResponse++; | 161 buildCounterListConfigsResponse++; |
| 162 if (buildCounterListConfigsResponse < 3) { | 162 if (buildCounterListConfigsResponse < 3) { |
| 163 o.configs = buildUnnamed3921(); | 163 o.configs = buildUnnamed3397(); |
| 164 o.nextPageToken = "foo"; | 164 o.nextPageToken = "foo"; |
| 165 } | 165 } |
| 166 buildCounterListConfigsResponse--; | 166 buildCounterListConfigsResponse--; |
| 167 return o; | 167 return o; |
| 168 } | 168 } |
| 169 | 169 |
| 170 checkListConfigsResponse(api.ListConfigsResponse o) { | 170 checkListConfigsResponse(api.ListConfigsResponse o) { |
| 171 buildCounterListConfigsResponse++; | 171 buildCounterListConfigsResponse++; |
| 172 if (buildCounterListConfigsResponse < 3) { | 172 if (buildCounterListConfigsResponse < 3) { |
| 173 checkUnnamed3921(o.configs); | 173 checkUnnamed3397(o.configs); |
| 174 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 174 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
| 175 } | 175 } |
| 176 buildCounterListConfigsResponse--; | 176 buildCounterListConfigsResponse--; |
| 177 } | 177 } |
| 178 | 178 |
| 179 buildUnnamed3922() { | 179 buildUnnamed3398() { |
| 180 var o = new core.List<api.Variable>(); | 180 var o = new core.List<api.Variable>(); |
| 181 o.add(buildVariable()); | 181 o.add(buildVariable()); |
| 182 o.add(buildVariable()); | 182 o.add(buildVariable()); |
| 183 return o; | 183 return o; |
| 184 } | 184 } |
| 185 | 185 |
| 186 checkUnnamed3922(core.List<api.Variable> o) { | 186 checkUnnamed3398(core.List<api.Variable> o) { |
| 187 unittest.expect(o, unittest.hasLength(2)); | 187 unittest.expect(o, unittest.hasLength(2)); |
| 188 checkVariable(o[0]); | 188 checkVariable(o[0]); |
| 189 checkVariable(o[1]); | 189 checkVariable(o[1]); |
| 190 } | 190 } |
| 191 | 191 |
| 192 core.int buildCounterListVariablesResponse = 0; | 192 core.int buildCounterListVariablesResponse = 0; |
| 193 buildListVariablesResponse() { | 193 buildListVariablesResponse() { |
| 194 var o = new api.ListVariablesResponse(); | 194 var o = new api.ListVariablesResponse(); |
| 195 buildCounterListVariablesResponse++; | 195 buildCounterListVariablesResponse++; |
| 196 if (buildCounterListVariablesResponse < 3) { | 196 if (buildCounterListVariablesResponse < 3) { |
| 197 o.nextPageToken = "foo"; | 197 o.nextPageToken = "foo"; |
| 198 o.variables = buildUnnamed3922(); | 198 o.variables = buildUnnamed3398(); |
| 199 } | 199 } |
| 200 buildCounterListVariablesResponse--; | 200 buildCounterListVariablesResponse--; |
| 201 return o; | 201 return o; |
| 202 } | 202 } |
| 203 | 203 |
| 204 checkListVariablesResponse(api.ListVariablesResponse o) { | 204 checkListVariablesResponse(api.ListVariablesResponse o) { |
| 205 buildCounterListVariablesResponse++; | 205 buildCounterListVariablesResponse++; |
| 206 if (buildCounterListVariablesResponse < 3) { | 206 if (buildCounterListVariablesResponse < 3) { |
| 207 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 207 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
| 208 checkUnnamed3922(o.variables); | 208 checkUnnamed3398(o.variables); |
| 209 } | 209 } |
| 210 buildCounterListVariablesResponse--; | 210 buildCounterListVariablesResponse--; |
| 211 } | 211 } |
| 212 | 212 |
| 213 buildUnnamed3923() { | 213 buildUnnamed3399() { |
| 214 var o = new core.List<api.Waiter>(); | 214 var o = new core.List<api.Waiter>(); |
| 215 o.add(buildWaiter()); | 215 o.add(buildWaiter()); |
| 216 o.add(buildWaiter()); | 216 o.add(buildWaiter()); |
| 217 return o; | 217 return o; |
| 218 } | 218 } |
| 219 | 219 |
| 220 checkUnnamed3923(core.List<api.Waiter> o) { | 220 checkUnnamed3399(core.List<api.Waiter> o) { |
| 221 unittest.expect(o, unittest.hasLength(2)); | 221 unittest.expect(o, unittest.hasLength(2)); |
| 222 checkWaiter(o[0]); | 222 checkWaiter(o[0]); |
| 223 checkWaiter(o[1]); | 223 checkWaiter(o[1]); |
| 224 } | 224 } |
| 225 | 225 |
| 226 core.int buildCounterListWaitersResponse = 0; | 226 core.int buildCounterListWaitersResponse = 0; |
| 227 buildListWaitersResponse() { | 227 buildListWaitersResponse() { |
| 228 var o = new api.ListWaitersResponse(); | 228 var o = new api.ListWaitersResponse(); |
| 229 buildCounterListWaitersResponse++; | 229 buildCounterListWaitersResponse++; |
| 230 if (buildCounterListWaitersResponse < 3) { | 230 if (buildCounterListWaitersResponse < 3) { |
| 231 o.nextPageToken = "foo"; | 231 o.nextPageToken = "foo"; |
| 232 o.waiters = buildUnnamed3923(); | 232 o.waiters = buildUnnamed3399(); |
| 233 } | 233 } |
| 234 buildCounterListWaitersResponse--; | 234 buildCounterListWaitersResponse--; |
| 235 return o; | 235 return o; |
| 236 } | 236 } |
| 237 | 237 |
| 238 checkListWaitersResponse(api.ListWaitersResponse o) { | 238 checkListWaitersResponse(api.ListWaitersResponse o) { |
| 239 buildCounterListWaitersResponse++; | 239 buildCounterListWaitersResponse++; |
| 240 if (buildCounterListWaitersResponse < 3) { | 240 if (buildCounterListWaitersResponse < 3) { |
| 241 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 241 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
| 242 checkUnnamed3923(o.waiters); | 242 checkUnnamed3399(o.waiters); |
| 243 } | 243 } |
| 244 buildCounterListWaitersResponse--; | 244 buildCounterListWaitersResponse--; |
| 245 } | 245 } |
| 246 | 246 |
| 247 buildUnnamed3924() { | 247 buildUnnamed3400() { |
| 248 var o = new core.Map<core.String, core.Object>(); | 248 var o = new core.Map<core.String, core.Object>(); |
| 249 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 249 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; |
| 250 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 250 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; |
| 251 return o; | 251 return o; |
| 252 } | 252 } |
| 253 | 253 |
| 254 checkUnnamed3924(core.Map<core.String, core.Object> o) { | 254 checkUnnamed3400(core.Map<core.String, core.Object> o) { |
| 255 unittest.expect(o, unittest.hasLength(2)); | 255 unittest.expect(o, unittest.hasLength(2)); |
| 256 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')); | 256 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')); |
| 257 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')); | 257 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')); |
| 258 } | 258 } |
| 259 | 259 |
| 260 buildUnnamed3925() { | 260 buildUnnamed3401() { |
| 261 var o = new core.Map<core.String, core.Object>(); | 261 var o = new core.Map<core.String, core.Object>(); |
| 262 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 262 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; |
| 263 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 263 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; |
| 264 return o; | 264 return o; |
| 265 } | 265 } |
| 266 | 266 |
| 267 checkUnnamed3925(core.Map<core.String, core.Object> o) { | 267 checkUnnamed3401(core.Map<core.String, core.Object> o) { |
| 268 unittest.expect(o, unittest.hasLength(2)); | 268 unittest.expect(o, unittest.hasLength(2)); |
| 269 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')); | 269 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')); |
| 270 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')); | 270 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')); |
| 271 } | 271 } |
| 272 | 272 |
| 273 core.int buildCounterOperation = 0; | 273 core.int buildCounterOperation = 0; |
| 274 buildOperation() { | 274 buildOperation() { |
| 275 var o = new api.Operation(); | 275 var o = new api.Operation(); |
| 276 buildCounterOperation++; | 276 buildCounterOperation++; |
| 277 if (buildCounterOperation < 3) { | 277 if (buildCounterOperation < 3) { |
| 278 o.done = true; | 278 o.done = true; |
| 279 o.error = buildStatus(); | 279 o.error = buildStatus(); |
| 280 o.metadata = buildUnnamed3924(); | 280 o.metadata = buildUnnamed3400(); |
| 281 o.name = "foo"; | 281 o.name = "foo"; |
| 282 o.response = buildUnnamed3925(); | 282 o.response = buildUnnamed3401(); |
| 283 } | 283 } |
| 284 buildCounterOperation--; | 284 buildCounterOperation--; |
| 285 return o; | 285 return o; |
| 286 } | 286 } |
| 287 | 287 |
| 288 checkOperation(api.Operation o) { | 288 checkOperation(api.Operation o) { |
| 289 buildCounterOperation++; | 289 buildCounterOperation++; |
| 290 if (buildCounterOperation < 3) { | 290 if (buildCounterOperation < 3) { |
| 291 unittest.expect(o.done, unittest.isTrue); | 291 unittest.expect(o.done, unittest.isTrue); |
| 292 checkStatus(o.error); | 292 checkStatus(o.error); |
| 293 checkUnnamed3924(o.metadata); | 293 checkUnnamed3400(o.metadata); |
| 294 unittest.expect(o.name, unittest.equals('foo')); | 294 unittest.expect(o.name, unittest.equals('foo')); |
| 295 checkUnnamed3925(o.response); | 295 checkUnnamed3401(o.response); |
| 296 } | 296 } |
| 297 buildCounterOperation--; | 297 buildCounterOperation--; |
| 298 } | 298 } |
| 299 | 299 |
| 300 buildUnnamed3926() { | 300 buildUnnamed3402() { |
| 301 var o = new core.List<api.Binding>(); | 301 var o = new core.List<api.Binding>(); |
| 302 o.add(buildBinding()); | 302 o.add(buildBinding()); |
| 303 o.add(buildBinding()); | 303 o.add(buildBinding()); |
| 304 return o; | 304 return o; |
| 305 } | 305 } |
| 306 | 306 |
| 307 checkUnnamed3926(core.List<api.Binding> o) { | 307 checkUnnamed3402(core.List<api.Binding> o) { |
| 308 unittest.expect(o, unittest.hasLength(2)); | 308 unittest.expect(o, unittest.hasLength(2)); |
| 309 checkBinding(o[0]); | 309 checkBinding(o[0]); |
| 310 checkBinding(o[1]); | 310 checkBinding(o[1]); |
| 311 } | 311 } |
| 312 | 312 |
| 313 core.int buildCounterPolicy = 0; | 313 core.int buildCounterPolicy = 0; |
| 314 buildPolicy() { | 314 buildPolicy() { |
| 315 var o = new api.Policy(); | 315 var o = new api.Policy(); |
| 316 buildCounterPolicy++; | 316 buildCounterPolicy++; |
| 317 if (buildCounterPolicy < 3) { | 317 if (buildCounterPolicy < 3) { |
| 318 o.bindings = buildUnnamed3926(); | 318 o.bindings = buildUnnamed3402(); |
| 319 o.etag = "foo"; | 319 o.etag = "foo"; |
| 320 o.version = 42; | 320 o.version = 42; |
| 321 } | 321 } |
| 322 buildCounterPolicy--; | 322 buildCounterPolicy--; |
| 323 return o; | 323 return o; |
| 324 } | 324 } |
| 325 | 325 |
| 326 checkPolicy(api.Policy o) { | 326 checkPolicy(api.Policy o) { |
| 327 buildCounterPolicy++; | 327 buildCounterPolicy++; |
| 328 if (buildCounterPolicy < 3) { | 328 if (buildCounterPolicy < 3) { |
| 329 checkUnnamed3926(o.bindings); | 329 checkUnnamed3402(o.bindings); |
| 330 unittest.expect(o.etag, unittest.equals('foo')); | 330 unittest.expect(o.etag, unittest.equals('foo')); |
| 331 unittest.expect(o.version, unittest.equals(42)); | 331 unittest.expect(o.version, unittest.equals(42)); |
| 332 } | 332 } |
| 333 buildCounterPolicy--; | 333 buildCounterPolicy--; |
| 334 } | 334 } |
| 335 | 335 |
| 336 core.int buildCounterRuntimeConfig = 0; | 336 core.int buildCounterRuntimeConfig = 0; |
| 337 buildRuntimeConfig() { | 337 buildRuntimeConfig() { |
| 338 var o = new api.RuntimeConfig(); | 338 var o = new api.RuntimeConfig(); |
| 339 buildCounterRuntimeConfig++; | 339 buildCounterRuntimeConfig++; |
| (...skipping 26 matching lines...) Expand all Loading... |
| 366 } | 366 } |
| 367 | 367 |
| 368 checkSetIamPolicyRequest(api.SetIamPolicyRequest o) { | 368 checkSetIamPolicyRequest(api.SetIamPolicyRequest o) { |
| 369 buildCounterSetIamPolicyRequest++; | 369 buildCounterSetIamPolicyRequest++; |
| 370 if (buildCounterSetIamPolicyRequest < 3) { | 370 if (buildCounterSetIamPolicyRequest < 3) { |
| 371 checkPolicy(o.policy); | 371 checkPolicy(o.policy); |
| 372 } | 372 } |
| 373 buildCounterSetIamPolicyRequest--; | 373 buildCounterSetIamPolicyRequest--; |
| 374 } | 374 } |
| 375 | 375 |
| 376 buildUnnamed3927() { | 376 buildUnnamed3403() { |
| 377 var o = new core.Map<core.String, core.Object>(); | 377 var o = new core.Map<core.String, core.Object>(); |
| 378 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 378 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; |
| 379 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 379 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; |
| 380 return o; | 380 return o; |
| 381 } | 381 } |
| 382 | 382 |
| 383 checkUnnamed3927(core.Map<core.String, core.Object> o) { | 383 checkUnnamed3403(core.Map<core.String, core.Object> o) { |
| 384 unittest.expect(o, unittest.hasLength(2)); | 384 unittest.expect(o, unittest.hasLength(2)); |
| 385 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')); | 385 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')); |
| 386 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')); | 386 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')); |
| 387 } | 387 } |
| 388 | 388 |
| 389 buildUnnamed3928() { | 389 buildUnnamed3404() { |
| 390 var o = new core.List<core.Map<core.String, core.Object>>(); | 390 var o = new core.List<core.Map<core.String, core.Object>>(); |
| 391 o.add(buildUnnamed3927()); | 391 o.add(buildUnnamed3403()); |
| 392 o.add(buildUnnamed3927()); | 392 o.add(buildUnnamed3403()); |
| 393 return o; | 393 return o; |
| 394 } | 394 } |
| 395 | 395 |
| 396 checkUnnamed3928(core.List<core.Map<core.String, core.Object>> o) { | 396 checkUnnamed3404(core.List<core.Map<core.String, core.Object>> o) { |
| 397 unittest.expect(o, unittest.hasLength(2)); | 397 unittest.expect(o, unittest.hasLength(2)); |
| 398 checkUnnamed3927(o[0]); | 398 checkUnnamed3403(o[0]); |
| 399 checkUnnamed3927(o[1]); | 399 checkUnnamed3403(o[1]); |
| 400 } | 400 } |
| 401 | 401 |
| 402 core.int buildCounterStatus = 0; | 402 core.int buildCounterStatus = 0; |
| 403 buildStatus() { | 403 buildStatus() { |
| 404 var o = new api.Status(); | 404 var o = new api.Status(); |
| 405 buildCounterStatus++; | 405 buildCounterStatus++; |
| 406 if (buildCounterStatus < 3) { | 406 if (buildCounterStatus < 3) { |
| 407 o.code = 42; | 407 o.code = 42; |
| 408 o.details = buildUnnamed3928(); | 408 o.details = buildUnnamed3404(); |
| 409 o.message = "foo"; | 409 o.message = "foo"; |
| 410 } | 410 } |
| 411 buildCounterStatus--; | 411 buildCounterStatus--; |
| 412 return o; | 412 return o; |
| 413 } | 413 } |
| 414 | 414 |
| 415 checkStatus(api.Status o) { | 415 checkStatus(api.Status o) { |
| 416 buildCounterStatus++; | 416 buildCounterStatus++; |
| 417 if (buildCounterStatus < 3) { | 417 if (buildCounterStatus < 3) { |
| 418 unittest.expect(o.code, unittest.equals(42)); | 418 unittest.expect(o.code, unittest.equals(42)); |
| 419 checkUnnamed3928(o.details); | 419 checkUnnamed3404(o.details); |
| 420 unittest.expect(o.message, unittest.equals('foo')); | 420 unittest.expect(o.message, unittest.equals('foo')); |
| 421 } | 421 } |
| 422 buildCounterStatus--; | 422 buildCounterStatus--; |
| 423 } | 423 } |
| 424 | 424 |
| 425 buildUnnamed3929() { | 425 buildUnnamed3405() { |
| 426 var o = new core.List<core.String>(); | 426 var o = new core.List<core.String>(); |
| 427 o.add("foo"); | 427 o.add("foo"); |
| 428 o.add("foo"); | 428 o.add("foo"); |
| 429 return o; | 429 return o; |
| 430 } | 430 } |
| 431 | 431 |
| 432 checkUnnamed3929(core.List<core.String> o) { | 432 checkUnnamed3405(core.List<core.String> o) { |
| 433 unittest.expect(o, unittest.hasLength(2)); | 433 unittest.expect(o, unittest.hasLength(2)); |
| 434 unittest.expect(o[0], unittest.equals('foo')); | 434 unittest.expect(o[0], unittest.equals('foo')); |
| 435 unittest.expect(o[1], unittest.equals('foo')); | 435 unittest.expect(o[1], unittest.equals('foo')); |
| 436 } | 436 } |
| 437 | 437 |
| 438 core.int buildCounterTestIamPermissionsRequest = 0; | 438 core.int buildCounterTestIamPermissionsRequest = 0; |
| 439 buildTestIamPermissionsRequest() { | 439 buildTestIamPermissionsRequest() { |
| 440 var o = new api.TestIamPermissionsRequest(); | 440 var o = new api.TestIamPermissionsRequest(); |
| 441 buildCounterTestIamPermissionsRequest++; | 441 buildCounterTestIamPermissionsRequest++; |
| 442 if (buildCounterTestIamPermissionsRequest < 3) { | 442 if (buildCounterTestIamPermissionsRequest < 3) { |
| 443 o.permissions = buildUnnamed3929(); | 443 o.permissions = buildUnnamed3405(); |
| 444 } | 444 } |
| 445 buildCounterTestIamPermissionsRequest--; | 445 buildCounterTestIamPermissionsRequest--; |
| 446 return o; | 446 return o; |
| 447 } | 447 } |
| 448 | 448 |
| 449 checkTestIamPermissionsRequest(api.TestIamPermissionsRequest o) { | 449 checkTestIamPermissionsRequest(api.TestIamPermissionsRequest o) { |
| 450 buildCounterTestIamPermissionsRequest++; | 450 buildCounterTestIamPermissionsRequest++; |
| 451 if (buildCounterTestIamPermissionsRequest < 3) { | 451 if (buildCounterTestIamPermissionsRequest < 3) { |
| 452 checkUnnamed3929(o.permissions); | 452 checkUnnamed3405(o.permissions); |
| 453 } | 453 } |
| 454 buildCounterTestIamPermissionsRequest--; | 454 buildCounterTestIamPermissionsRequest--; |
| 455 } | 455 } |
| 456 | 456 |
| 457 buildUnnamed3930() { | 457 buildUnnamed3406() { |
| 458 var o = new core.List<core.String>(); | 458 var o = new core.List<core.String>(); |
| 459 o.add("foo"); | 459 o.add("foo"); |
| 460 o.add("foo"); | 460 o.add("foo"); |
| 461 return o; | 461 return o; |
| 462 } | 462 } |
| 463 | 463 |
| 464 checkUnnamed3930(core.List<core.String> o) { | 464 checkUnnamed3406(core.List<core.String> o) { |
| 465 unittest.expect(o, unittest.hasLength(2)); | 465 unittest.expect(o, unittest.hasLength(2)); |
| 466 unittest.expect(o[0], unittest.equals('foo')); | 466 unittest.expect(o[0], unittest.equals('foo')); |
| 467 unittest.expect(o[1], unittest.equals('foo')); | 467 unittest.expect(o[1], unittest.equals('foo')); |
| 468 } | 468 } |
| 469 | 469 |
| 470 core.int buildCounterTestIamPermissionsResponse = 0; | 470 core.int buildCounterTestIamPermissionsResponse = 0; |
| 471 buildTestIamPermissionsResponse() { | 471 buildTestIamPermissionsResponse() { |
| 472 var o = new api.TestIamPermissionsResponse(); | 472 var o = new api.TestIamPermissionsResponse(); |
| 473 buildCounterTestIamPermissionsResponse++; | 473 buildCounterTestIamPermissionsResponse++; |
| 474 if (buildCounterTestIamPermissionsResponse < 3) { | 474 if (buildCounterTestIamPermissionsResponse < 3) { |
| 475 o.permissions = buildUnnamed3930(); | 475 o.permissions = buildUnnamed3406(); |
| 476 } | 476 } |
| 477 buildCounterTestIamPermissionsResponse--; | 477 buildCounterTestIamPermissionsResponse--; |
| 478 return o; | 478 return o; |
| 479 } | 479 } |
| 480 | 480 |
| 481 checkTestIamPermissionsResponse(api.TestIamPermissionsResponse o) { | 481 checkTestIamPermissionsResponse(api.TestIamPermissionsResponse o) { |
| 482 buildCounterTestIamPermissionsResponse++; | 482 buildCounterTestIamPermissionsResponse++; |
| 483 if (buildCounterTestIamPermissionsResponse < 3) { | 483 if (buildCounterTestIamPermissionsResponse < 3) { |
| 484 checkUnnamed3930(o.permissions); | 484 checkUnnamed3406(o.permissions); |
| 485 } | 485 } |
| 486 buildCounterTestIamPermissionsResponse--; | 486 buildCounterTestIamPermissionsResponse--; |
| 487 } | 487 } |
| 488 | 488 |
| 489 core.int buildCounterVariable = 0; | 489 core.int buildCounterVariable = 0; |
| 490 buildVariable() { | 490 buildVariable() { |
| 491 var o = new api.Variable(); | 491 var o = new api.Variable(); |
| 492 buildCounterVariable++; | 492 buildCounterVariable++; |
| 493 if (buildCounterVariable < 3) { | 493 if (buildCounterVariable < 3) { |
| 494 o.name = "foo"; | 494 o.name = "foo"; |
| (...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 719 | 719 |
| 720 | 720 |
| 721 unittest.group("resource-ProjectsConfigsResourceApi", () { | 721 unittest.group("resource-ProjectsConfigsResourceApi", () { |
| 722 unittest.test("method--create", () { | 722 unittest.test("method--create", () { |
| 723 | 723 |
| 724 var mock = new HttpServerMock(); | 724 var mock = new HttpServerMock(); |
| 725 api.ProjectsConfigsResourceApi res = new api.RuntimeconfigApi(mock).projec
ts.configs; | 725 api.ProjectsConfigsResourceApi res = new api.RuntimeconfigApi(mock).projec
ts.configs; |
| 726 var arg_request = buildRuntimeConfig(); | 726 var arg_request = buildRuntimeConfig(); |
| 727 var arg_parent = "foo"; | 727 var arg_parent = "foo"; |
| 728 var arg_requestId = "foo"; | 728 var arg_requestId = "foo"; |
| 729 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 729 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 730 var obj = new api.RuntimeConfig.fromJson(json); | 730 var obj = new api.RuntimeConfig.fromJson(json); |
| 731 checkRuntimeConfig(obj); | 731 checkRuntimeConfig(obj); |
| 732 | 732 |
| 733 var path = (req.url).path; | 733 var path = (req.url).path; |
| 734 var pathOffset = 0; | 734 var pathOffset = 0; |
| 735 var index; | 735 var index; |
| 736 var subPart; | 736 var subPart; |
| 737 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 737 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 738 pathOffset += 1; | 738 pathOffset += 1; |
| 739 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("v1beta1/")); | 739 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("v1beta1/")); |
| (...skipping 18 matching lines...) Expand all Loading... |
| 758 } | 758 } |
| 759 unittest.expect(queryMap["requestId"].first, unittest.equals(arg_request
Id)); | 759 unittest.expect(queryMap["requestId"].first, unittest.equals(arg_request
Id)); |
| 760 | 760 |
| 761 | 761 |
| 762 var h = { | 762 var h = { |
| 763 "content-type" : "application/json; charset=utf-8", | 763 "content-type" : "application/json; charset=utf-8", |
| 764 }; | 764 }; |
| 765 var resp = convert.JSON.encode(buildRuntimeConfig()); | 765 var resp = convert.JSON.encode(buildRuntimeConfig()); |
| 766 return new async.Future.value(stringResponse(200, h, resp)); | 766 return new async.Future.value(stringResponse(200, h, resp)); |
| 767 }), true); | 767 }), true); |
| 768 res.create(arg_request, arg_parent, requestId: arg_requestId).then(unittes
t.expectAsync(((api.RuntimeConfig response) { | 768 res.create(arg_request, arg_parent, requestId: arg_requestId).then(unittes
t.expectAsync1(((api.RuntimeConfig response) { |
| 769 checkRuntimeConfig(response); | 769 checkRuntimeConfig(response); |
| 770 }))); | 770 }))); |
| 771 }); | 771 }); |
| 772 | 772 |
| 773 unittest.test("method--delete", () { | 773 unittest.test("method--delete", () { |
| 774 | 774 |
| 775 var mock = new HttpServerMock(); | 775 var mock = new HttpServerMock(); |
| 776 api.ProjectsConfigsResourceApi res = new api.RuntimeconfigApi(mock).projec
ts.configs; | 776 api.ProjectsConfigsResourceApi res = new api.RuntimeconfigApi(mock).projec
ts.configs; |
| 777 var arg_name = "foo"; | 777 var arg_name = "foo"; |
| 778 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 778 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 779 var path = (req.url).path; | 779 var path = (req.url).path; |
| 780 var pathOffset = 0; | 780 var pathOffset = 0; |
| 781 var index; | 781 var index; |
| 782 var subPart; | 782 var subPart; |
| 783 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 783 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 784 pathOffset += 1; | 784 pathOffset += 1; |
| 785 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("v1beta1/")); | 785 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("v1beta1/")); |
| 786 pathOffset += 8; | 786 pathOffset += 8; |
| 787 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; | 787 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; |
| 788 | 788 |
| (...skipping 14 matching lines...) Expand all Loading... |
| 803 } | 803 } |
| 804 } | 804 } |
| 805 | 805 |
| 806 | 806 |
| 807 var h = { | 807 var h = { |
| 808 "content-type" : "application/json; charset=utf-8", | 808 "content-type" : "application/json; charset=utf-8", |
| 809 }; | 809 }; |
| 810 var resp = convert.JSON.encode(buildEmpty()); | 810 var resp = convert.JSON.encode(buildEmpty()); |
| 811 return new async.Future.value(stringResponse(200, h, resp)); | 811 return new async.Future.value(stringResponse(200, h, resp)); |
| 812 }), true); | 812 }), true); |
| 813 res.delete(arg_name).then(unittest.expectAsync(((api.Empty response) { | 813 res.delete(arg_name).then(unittest.expectAsync1(((api.Empty response) { |
| 814 checkEmpty(response); | 814 checkEmpty(response); |
| 815 }))); | 815 }))); |
| 816 }); | 816 }); |
| 817 | 817 |
| 818 unittest.test("method--get", () { | 818 unittest.test("method--get", () { |
| 819 | 819 |
| 820 var mock = new HttpServerMock(); | 820 var mock = new HttpServerMock(); |
| 821 api.ProjectsConfigsResourceApi res = new api.RuntimeconfigApi(mock).projec
ts.configs; | 821 api.ProjectsConfigsResourceApi res = new api.RuntimeconfigApi(mock).projec
ts.configs; |
| 822 var arg_name = "foo"; | 822 var arg_name = "foo"; |
| 823 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 823 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 824 var path = (req.url).path; | 824 var path = (req.url).path; |
| 825 var pathOffset = 0; | 825 var pathOffset = 0; |
| 826 var index; | 826 var index; |
| 827 var subPart; | 827 var subPart; |
| 828 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 828 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 829 pathOffset += 1; | 829 pathOffset += 1; |
| 830 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("v1beta1/")); | 830 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("v1beta1/")); |
| 831 pathOffset += 8; | 831 pathOffset += 8; |
| 832 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; | 832 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; |
| 833 | 833 |
| (...skipping 14 matching lines...) Expand all Loading... |
| 848 } | 848 } |
| 849 } | 849 } |
| 850 | 850 |
| 851 | 851 |
| 852 var h = { | 852 var h = { |
| 853 "content-type" : "application/json; charset=utf-8", | 853 "content-type" : "application/json; charset=utf-8", |
| 854 }; | 854 }; |
| 855 var resp = convert.JSON.encode(buildRuntimeConfig()); | 855 var resp = convert.JSON.encode(buildRuntimeConfig()); |
| 856 return new async.Future.value(stringResponse(200, h, resp)); | 856 return new async.Future.value(stringResponse(200, h, resp)); |
| 857 }), true); | 857 }), true); |
| 858 res.get(arg_name).then(unittest.expectAsync(((api.RuntimeConfig response)
{ | 858 res.get(arg_name).then(unittest.expectAsync1(((api.RuntimeConfig response)
{ |
| 859 checkRuntimeConfig(response); | 859 checkRuntimeConfig(response); |
| 860 }))); | 860 }))); |
| 861 }); | 861 }); |
| 862 | 862 |
| 863 unittest.test("method--getIamPolicy", () { | 863 unittest.test("method--getIamPolicy", () { |
| 864 | 864 |
| 865 var mock = new HttpServerMock(); | 865 var mock = new HttpServerMock(); |
| 866 api.ProjectsConfigsResourceApi res = new api.RuntimeconfigApi(mock).projec
ts.configs; | 866 api.ProjectsConfigsResourceApi res = new api.RuntimeconfigApi(mock).projec
ts.configs; |
| 867 var arg_resource = "foo"; | 867 var arg_resource = "foo"; |
| 868 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 868 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 869 var path = (req.url).path; | 869 var path = (req.url).path; |
| 870 var pathOffset = 0; | 870 var pathOffset = 0; |
| 871 var index; | 871 var index; |
| 872 var subPart; | 872 var subPart; |
| 873 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 873 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 874 pathOffset += 1; | 874 pathOffset += 1; |
| 875 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("v1beta1/")); | 875 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("v1beta1/")); |
| 876 pathOffset += 8; | 876 pathOffset += 8; |
| 877 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; | 877 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; |
| 878 | 878 |
| (...skipping 14 matching lines...) Expand all Loading... |
| 893 } | 893 } |
| 894 } | 894 } |
| 895 | 895 |
| 896 | 896 |
| 897 var h = { | 897 var h = { |
| 898 "content-type" : "application/json; charset=utf-8", | 898 "content-type" : "application/json; charset=utf-8", |
| 899 }; | 899 }; |
| 900 var resp = convert.JSON.encode(buildPolicy()); | 900 var resp = convert.JSON.encode(buildPolicy()); |
| 901 return new async.Future.value(stringResponse(200, h, resp)); | 901 return new async.Future.value(stringResponse(200, h, resp)); |
| 902 }), true); | 902 }), true); |
| 903 res.getIamPolicy(arg_resource).then(unittest.expectAsync(((api.Policy resp
onse) { | 903 res.getIamPolicy(arg_resource).then(unittest.expectAsync1(((api.Policy res
ponse) { |
| 904 checkPolicy(response); | 904 checkPolicy(response); |
| 905 }))); | 905 }))); |
| 906 }); | 906 }); |
| 907 | 907 |
| 908 unittest.test("method--list", () { | 908 unittest.test("method--list", () { |
| 909 | 909 |
| 910 var mock = new HttpServerMock(); | 910 var mock = new HttpServerMock(); |
| 911 api.ProjectsConfigsResourceApi res = new api.RuntimeconfigApi(mock).projec
ts.configs; | 911 api.ProjectsConfigsResourceApi res = new api.RuntimeconfigApi(mock).projec
ts.configs; |
| 912 var arg_parent = "foo"; | 912 var arg_parent = "foo"; |
| 913 var arg_pageToken = "foo"; | 913 var arg_pageToken = "foo"; |
| 914 var arg_pageSize = 42; | 914 var arg_pageSize = 42; |
| 915 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 915 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 916 var path = (req.url).path; | 916 var path = (req.url).path; |
| 917 var pathOffset = 0; | 917 var pathOffset = 0; |
| 918 var index; | 918 var index; |
| 919 var subPart; | 919 var subPart; |
| 920 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 920 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 921 pathOffset += 1; | 921 pathOffset += 1; |
| 922 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("v1beta1/")); | 922 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("v1beta1/")); |
| 923 pathOffset += 8; | 923 pathOffset += 8; |
| 924 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; | 924 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; |
| 925 | 925 |
| (...skipping 16 matching lines...) Expand all Loading... |
| 942 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | 942 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); |
| 943 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ
als(arg_pageSize)); | 943 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ
als(arg_pageSize)); |
| 944 | 944 |
| 945 | 945 |
| 946 var h = { | 946 var h = { |
| 947 "content-type" : "application/json; charset=utf-8", | 947 "content-type" : "application/json; charset=utf-8", |
| 948 }; | 948 }; |
| 949 var resp = convert.JSON.encode(buildListConfigsResponse()); | 949 var resp = convert.JSON.encode(buildListConfigsResponse()); |
| 950 return new async.Future.value(stringResponse(200, h, resp)); | 950 return new async.Future.value(stringResponse(200, h, resp)); |
| 951 }), true); | 951 }), true); |
| 952 res.list(arg_parent, pageToken: arg_pageToken, pageSize: arg_pageSize).the
n(unittest.expectAsync(((api.ListConfigsResponse response) { | 952 res.list(arg_parent, pageToken: arg_pageToken, pageSize: arg_pageSize).the
n(unittest.expectAsync1(((api.ListConfigsResponse response) { |
| 953 checkListConfigsResponse(response); | 953 checkListConfigsResponse(response); |
| 954 }))); | 954 }))); |
| 955 }); | 955 }); |
| 956 | 956 |
| 957 unittest.test("method--setIamPolicy", () { | 957 unittest.test("method--setIamPolicy", () { |
| 958 | 958 |
| 959 var mock = new HttpServerMock(); | 959 var mock = new HttpServerMock(); |
| 960 api.ProjectsConfigsResourceApi res = new api.RuntimeconfigApi(mock).projec
ts.configs; | 960 api.ProjectsConfigsResourceApi res = new api.RuntimeconfigApi(mock).projec
ts.configs; |
| 961 var arg_request = buildSetIamPolicyRequest(); | 961 var arg_request = buildSetIamPolicyRequest(); |
| 962 var arg_resource = "foo"; | 962 var arg_resource = "foo"; |
| 963 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 963 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 964 var obj = new api.SetIamPolicyRequest.fromJson(json); | 964 var obj = new api.SetIamPolicyRequest.fromJson(json); |
| 965 checkSetIamPolicyRequest(obj); | 965 checkSetIamPolicyRequest(obj); |
| 966 | 966 |
| 967 var path = (req.url).path; | 967 var path = (req.url).path; |
| 968 var pathOffset = 0; | 968 var pathOffset = 0; |
| 969 var index; | 969 var index; |
| 970 var subPart; | 970 var subPart; |
| 971 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 971 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 972 pathOffset += 1; | 972 pathOffset += 1; |
| 973 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("v1beta1/")); | 973 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("v1beta1/")); |
| (...skipping 17 matching lines...) Expand all Loading... |
| 991 } | 991 } |
| 992 } | 992 } |
| 993 | 993 |
| 994 | 994 |
| 995 var h = { | 995 var h = { |
| 996 "content-type" : "application/json; charset=utf-8", | 996 "content-type" : "application/json; charset=utf-8", |
| 997 }; | 997 }; |
| 998 var resp = convert.JSON.encode(buildPolicy()); | 998 var resp = convert.JSON.encode(buildPolicy()); |
| 999 return new async.Future.value(stringResponse(200, h, resp)); | 999 return new async.Future.value(stringResponse(200, h, resp)); |
| 1000 }), true); | 1000 }), true); |
| 1001 res.setIamPolicy(arg_request, arg_resource).then(unittest.expectAsync(((ap
i.Policy response) { | 1001 res.setIamPolicy(arg_request, arg_resource).then(unittest.expectAsync1(((a
pi.Policy response) { |
| 1002 checkPolicy(response); | 1002 checkPolicy(response); |
| 1003 }))); | 1003 }))); |
| 1004 }); | 1004 }); |
| 1005 | 1005 |
| 1006 unittest.test("method--testIamPermissions", () { | 1006 unittest.test("method--testIamPermissions", () { |
| 1007 | 1007 |
| 1008 var mock = new HttpServerMock(); | 1008 var mock = new HttpServerMock(); |
| 1009 api.ProjectsConfigsResourceApi res = new api.RuntimeconfigApi(mock).projec
ts.configs; | 1009 api.ProjectsConfigsResourceApi res = new api.RuntimeconfigApi(mock).projec
ts.configs; |
| 1010 var arg_request = buildTestIamPermissionsRequest(); | 1010 var arg_request = buildTestIamPermissionsRequest(); |
| 1011 var arg_resource = "foo"; | 1011 var arg_resource = "foo"; |
| 1012 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1012 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 1013 var obj = new api.TestIamPermissionsRequest.fromJson(json); | 1013 var obj = new api.TestIamPermissionsRequest.fromJson(json); |
| 1014 checkTestIamPermissionsRequest(obj); | 1014 checkTestIamPermissionsRequest(obj); |
| 1015 | 1015 |
| 1016 var path = (req.url).path; | 1016 var path = (req.url).path; |
| 1017 var pathOffset = 0; | 1017 var pathOffset = 0; |
| 1018 var index; | 1018 var index; |
| 1019 var subPart; | 1019 var subPart; |
| 1020 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1020 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 1021 pathOffset += 1; | 1021 pathOffset += 1; |
| 1022 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("v1beta1/")); | 1022 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("v1beta1/")); |
| (...skipping 17 matching lines...) Expand all Loading... |
| 1040 } | 1040 } |
| 1041 } | 1041 } |
| 1042 | 1042 |
| 1043 | 1043 |
| 1044 var h = { | 1044 var h = { |
| 1045 "content-type" : "application/json; charset=utf-8", | 1045 "content-type" : "application/json; charset=utf-8", |
| 1046 }; | 1046 }; |
| 1047 var resp = convert.JSON.encode(buildTestIamPermissionsResponse()); | 1047 var resp = convert.JSON.encode(buildTestIamPermissionsResponse()); |
| 1048 return new async.Future.value(stringResponse(200, h, resp)); | 1048 return new async.Future.value(stringResponse(200, h, resp)); |
| 1049 }), true); | 1049 }), true); |
| 1050 res.testIamPermissions(arg_request, arg_resource).then(unittest.expectAsyn
c(((api.TestIamPermissionsResponse response) { | 1050 res.testIamPermissions(arg_request, arg_resource).then(unittest.expectAsyn
c1(((api.TestIamPermissionsResponse response) { |
| 1051 checkTestIamPermissionsResponse(response); | 1051 checkTestIamPermissionsResponse(response); |
| 1052 }))); | 1052 }))); |
| 1053 }); | 1053 }); |
| 1054 | 1054 |
| 1055 unittest.test("method--update", () { | 1055 unittest.test("method--update", () { |
| 1056 | 1056 |
| 1057 var mock = new HttpServerMock(); | 1057 var mock = new HttpServerMock(); |
| 1058 api.ProjectsConfigsResourceApi res = new api.RuntimeconfigApi(mock).projec
ts.configs; | 1058 api.ProjectsConfigsResourceApi res = new api.RuntimeconfigApi(mock).projec
ts.configs; |
| 1059 var arg_request = buildRuntimeConfig(); | 1059 var arg_request = buildRuntimeConfig(); |
| 1060 var arg_name = "foo"; | 1060 var arg_name = "foo"; |
| 1061 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1061 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 1062 var obj = new api.RuntimeConfig.fromJson(json); | 1062 var obj = new api.RuntimeConfig.fromJson(json); |
| 1063 checkRuntimeConfig(obj); | 1063 checkRuntimeConfig(obj); |
| 1064 | 1064 |
| 1065 var path = (req.url).path; | 1065 var path = (req.url).path; |
| 1066 var pathOffset = 0; | 1066 var pathOffset = 0; |
| 1067 var index; | 1067 var index; |
| 1068 var subPart; | 1068 var subPart; |
| 1069 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1069 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 1070 pathOffset += 1; | 1070 pathOffset += 1; |
| 1071 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("v1beta1/")); | 1071 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("v1beta1/")); |
| (...skipping 17 matching lines...) Expand all Loading... |
| 1089 } | 1089 } |
| 1090 } | 1090 } |
| 1091 | 1091 |
| 1092 | 1092 |
| 1093 var h = { | 1093 var h = { |
| 1094 "content-type" : "application/json; charset=utf-8", | 1094 "content-type" : "application/json; charset=utf-8", |
| 1095 }; | 1095 }; |
| 1096 var resp = convert.JSON.encode(buildRuntimeConfig()); | 1096 var resp = convert.JSON.encode(buildRuntimeConfig()); |
| 1097 return new async.Future.value(stringResponse(200, h, resp)); | 1097 return new async.Future.value(stringResponse(200, h, resp)); |
| 1098 }), true); | 1098 }), true); |
| 1099 res.update(arg_request, arg_name).then(unittest.expectAsync(((api.RuntimeC
onfig response) { | 1099 res.update(arg_request, arg_name).then(unittest.expectAsync1(((api.Runtime
Config response) { |
| 1100 checkRuntimeConfig(response); | 1100 checkRuntimeConfig(response); |
| 1101 }))); | 1101 }))); |
| 1102 }); | 1102 }); |
| 1103 | 1103 |
| 1104 }); | 1104 }); |
| 1105 | 1105 |
| 1106 | 1106 |
| 1107 unittest.group("resource-ProjectsConfigsOperationsResourceApi", () { | 1107 unittest.group("resource-ProjectsConfigsOperationsResourceApi", () { |
| 1108 unittest.test("method--get", () { | 1108 unittest.test("method--get", () { |
| 1109 | 1109 |
| 1110 var mock = new HttpServerMock(); | 1110 var mock = new HttpServerMock(); |
| 1111 api.ProjectsConfigsOperationsResourceApi res = new api.RuntimeconfigApi(mo
ck).projects.configs.operations; | 1111 api.ProjectsConfigsOperationsResourceApi res = new api.RuntimeconfigApi(mo
ck).projects.configs.operations; |
| 1112 var arg_name = "foo"; | 1112 var arg_name = "foo"; |
| 1113 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1113 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 1114 var path = (req.url).path; | 1114 var path = (req.url).path; |
| 1115 var pathOffset = 0; | 1115 var pathOffset = 0; |
| 1116 var index; | 1116 var index; |
| 1117 var subPart; | 1117 var subPart; |
| 1118 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1118 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 1119 pathOffset += 1; | 1119 pathOffset += 1; |
| 1120 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("v1beta1/")); | 1120 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("v1beta1/")); |
| 1121 pathOffset += 8; | 1121 pathOffset += 8; |
| 1122 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; | 1122 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; |
| 1123 | 1123 |
| (...skipping 14 matching lines...) Expand all Loading... |
| 1138 } | 1138 } |
| 1139 } | 1139 } |
| 1140 | 1140 |
| 1141 | 1141 |
| 1142 var h = { | 1142 var h = { |
| 1143 "content-type" : "application/json; charset=utf-8", | 1143 "content-type" : "application/json; charset=utf-8", |
| 1144 }; | 1144 }; |
| 1145 var resp = convert.JSON.encode(buildOperation()); | 1145 var resp = convert.JSON.encode(buildOperation()); |
| 1146 return new async.Future.value(stringResponse(200, h, resp)); | 1146 return new async.Future.value(stringResponse(200, h, resp)); |
| 1147 }), true); | 1147 }), true); |
| 1148 res.get(arg_name).then(unittest.expectAsync(((api.Operation response) { | 1148 res.get(arg_name).then(unittest.expectAsync1(((api.Operation response) { |
| 1149 checkOperation(response); | 1149 checkOperation(response); |
| 1150 }))); | 1150 }))); |
| 1151 }); | 1151 }); |
| 1152 | 1152 |
| 1153 unittest.test("method--testIamPermissions", () { | 1153 unittest.test("method--testIamPermissions", () { |
| 1154 | 1154 |
| 1155 var mock = new HttpServerMock(); | 1155 var mock = new HttpServerMock(); |
| 1156 api.ProjectsConfigsOperationsResourceApi res = new api.RuntimeconfigApi(mo
ck).projects.configs.operations; | 1156 api.ProjectsConfigsOperationsResourceApi res = new api.RuntimeconfigApi(mo
ck).projects.configs.operations; |
| 1157 var arg_request = buildTestIamPermissionsRequest(); | 1157 var arg_request = buildTestIamPermissionsRequest(); |
| 1158 var arg_resource = "foo"; | 1158 var arg_resource = "foo"; |
| 1159 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1159 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 1160 var obj = new api.TestIamPermissionsRequest.fromJson(json); | 1160 var obj = new api.TestIamPermissionsRequest.fromJson(json); |
| 1161 checkTestIamPermissionsRequest(obj); | 1161 checkTestIamPermissionsRequest(obj); |
| 1162 | 1162 |
| 1163 var path = (req.url).path; | 1163 var path = (req.url).path; |
| 1164 var pathOffset = 0; | 1164 var pathOffset = 0; |
| 1165 var index; | 1165 var index; |
| 1166 var subPart; | 1166 var subPart; |
| 1167 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1167 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 1168 pathOffset += 1; | 1168 pathOffset += 1; |
| 1169 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("v1beta1/")); | 1169 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("v1beta1/")); |
| (...skipping 17 matching lines...) Expand all Loading... |
| 1187 } | 1187 } |
| 1188 } | 1188 } |
| 1189 | 1189 |
| 1190 | 1190 |
| 1191 var h = { | 1191 var h = { |
| 1192 "content-type" : "application/json; charset=utf-8", | 1192 "content-type" : "application/json; charset=utf-8", |
| 1193 }; | 1193 }; |
| 1194 var resp = convert.JSON.encode(buildTestIamPermissionsResponse()); | 1194 var resp = convert.JSON.encode(buildTestIamPermissionsResponse()); |
| 1195 return new async.Future.value(stringResponse(200, h, resp)); | 1195 return new async.Future.value(stringResponse(200, h, resp)); |
| 1196 }), true); | 1196 }), true); |
| 1197 res.testIamPermissions(arg_request, arg_resource).then(unittest.expectAsyn
c(((api.TestIamPermissionsResponse response) { | 1197 res.testIamPermissions(arg_request, arg_resource).then(unittest.expectAsyn
c1(((api.TestIamPermissionsResponse response) { |
| 1198 checkTestIamPermissionsResponse(response); | 1198 checkTestIamPermissionsResponse(response); |
| 1199 }))); | 1199 }))); |
| 1200 }); | 1200 }); |
| 1201 | 1201 |
| 1202 }); | 1202 }); |
| 1203 | 1203 |
| 1204 | 1204 |
| 1205 unittest.group("resource-ProjectsConfigsVariablesResourceApi", () { | 1205 unittest.group("resource-ProjectsConfigsVariablesResourceApi", () { |
| 1206 unittest.test("method--create", () { | 1206 unittest.test("method--create", () { |
| 1207 | 1207 |
| 1208 var mock = new HttpServerMock(); | 1208 var mock = new HttpServerMock(); |
| 1209 api.ProjectsConfigsVariablesResourceApi res = new api.RuntimeconfigApi(moc
k).projects.configs.variables; | 1209 api.ProjectsConfigsVariablesResourceApi res = new api.RuntimeconfigApi(moc
k).projects.configs.variables; |
| 1210 var arg_request = buildVariable(); | 1210 var arg_request = buildVariable(); |
| 1211 var arg_parent = "foo"; | 1211 var arg_parent = "foo"; |
| 1212 var arg_requestId = "foo"; | 1212 var arg_requestId = "foo"; |
| 1213 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1213 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 1214 var obj = new api.Variable.fromJson(json); | 1214 var obj = new api.Variable.fromJson(json); |
| 1215 checkVariable(obj); | 1215 checkVariable(obj); |
| 1216 | 1216 |
| 1217 var path = (req.url).path; | 1217 var path = (req.url).path; |
| 1218 var pathOffset = 0; | 1218 var pathOffset = 0; |
| 1219 var index; | 1219 var index; |
| 1220 var subPart; | 1220 var subPart; |
| 1221 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1221 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 1222 pathOffset += 1; | 1222 pathOffset += 1; |
| 1223 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("v1beta1/")); | 1223 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("v1beta1/")); |
| (...skipping 18 matching lines...) Expand all Loading... |
| 1242 } | 1242 } |
| 1243 unittest.expect(queryMap["requestId"].first, unittest.equals(arg_request
Id)); | 1243 unittest.expect(queryMap["requestId"].first, unittest.equals(arg_request
Id)); |
| 1244 | 1244 |
| 1245 | 1245 |
| 1246 var h = { | 1246 var h = { |
| 1247 "content-type" : "application/json; charset=utf-8", | 1247 "content-type" : "application/json; charset=utf-8", |
| 1248 }; | 1248 }; |
| 1249 var resp = convert.JSON.encode(buildVariable()); | 1249 var resp = convert.JSON.encode(buildVariable()); |
| 1250 return new async.Future.value(stringResponse(200, h, resp)); | 1250 return new async.Future.value(stringResponse(200, h, resp)); |
| 1251 }), true); | 1251 }), true); |
| 1252 res.create(arg_request, arg_parent, requestId: arg_requestId).then(unittes
t.expectAsync(((api.Variable response) { | 1252 res.create(arg_request, arg_parent, requestId: arg_requestId).then(unittes
t.expectAsync1(((api.Variable response) { |
| 1253 checkVariable(response); | 1253 checkVariable(response); |
| 1254 }))); | 1254 }))); |
| 1255 }); | 1255 }); |
| 1256 | 1256 |
| 1257 unittest.test("method--delete", () { | 1257 unittest.test("method--delete", () { |
| 1258 | 1258 |
| 1259 var mock = new HttpServerMock(); | 1259 var mock = new HttpServerMock(); |
| 1260 api.ProjectsConfigsVariablesResourceApi res = new api.RuntimeconfigApi(moc
k).projects.configs.variables; | 1260 api.ProjectsConfigsVariablesResourceApi res = new api.RuntimeconfigApi(moc
k).projects.configs.variables; |
| 1261 var arg_name = "foo"; | 1261 var arg_name = "foo"; |
| 1262 var arg_recursive = true; | 1262 var arg_recursive = true; |
| 1263 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1263 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 1264 var path = (req.url).path; | 1264 var path = (req.url).path; |
| 1265 var pathOffset = 0; | 1265 var pathOffset = 0; |
| 1266 var index; | 1266 var index; |
| 1267 var subPart; | 1267 var subPart; |
| 1268 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1268 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 1269 pathOffset += 1; | 1269 pathOffset += 1; |
| 1270 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("v1beta1/")); | 1270 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("v1beta1/")); |
| 1271 pathOffset += 8; | 1271 pathOffset += 8; |
| 1272 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; | 1272 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; |
| 1273 | 1273 |
| (...skipping 15 matching lines...) Expand all Loading... |
| 1289 } | 1289 } |
| 1290 unittest.expect(queryMap["recursive"].first, unittest.equals("$arg_recur
sive")); | 1290 unittest.expect(queryMap["recursive"].first, unittest.equals("$arg_recur
sive")); |
| 1291 | 1291 |
| 1292 | 1292 |
| 1293 var h = { | 1293 var h = { |
| 1294 "content-type" : "application/json; charset=utf-8", | 1294 "content-type" : "application/json; charset=utf-8", |
| 1295 }; | 1295 }; |
| 1296 var resp = convert.JSON.encode(buildEmpty()); | 1296 var resp = convert.JSON.encode(buildEmpty()); |
| 1297 return new async.Future.value(stringResponse(200, h, resp)); | 1297 return new async.Future.value(stringResponse(200, h, resp)); |
| 1298 }), true); | 1298 }), true); |
| 1299 res.delete(arg_name, recursive: arg_recursive).then(unittest.expectAsync((
(api.Empty response) { | 1299 res.delete(arg_name, recursive: arg_recursive).then(unittest.expectAsync1(
((api.Empty response) { |
| 1300 checkEmpty(response); | 1300 checkEmpty(response); |
| 1301 }))); | 1301 }))); |
| 1302 }); | 1302 }); |
| 1303 | 1303 |
| 1304 unittest.test("method--get", () { | 1304 unittest.test("method--get", () { |
| 1305 | 1305 |
| 1306 var mock = new HttpServerMock(); | 1306 var mock = new HttpServerMock(); |
| 1307 api.ProjectsConfigsVariablesResourceApi res = new api.RuntimeconfigApi(moc
k).projects.configs.variables; | 1307 api.ProjectsConfigsVariablesResourceApi res = new api.RuntimeconfigApi(moc
k).projects.configs.variables; |
| 1308 var arg_name = "foo"; | 1308 var arg_name = "foo"; |
| 1309 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1309 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 1310 var path = (req.url).path; | 1310 var path = (req.url).path; |
| 1311 var pathOffset = 0; | 1311 var pathOffset = 0; |
| 1312 var index; | 1312 var index; |
| 1313 var subPart; | 1313 var subPart; |
| 1314 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1314 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 1315 pathOffset += 1; | 1315 pathOffset += 1; |
| 1316 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("v1beta1/")); | 1316 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("v1beta1/")); |
| 1317 pathOffset += 8; | 1317 pathOffset += 8; |
| 1318 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; | 1318 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; |
| 1319 | 1319 |
| (...skipping 14 matching lines...) Expand all Loading... |
| 1334 } | 1334 } |
| 1335 } | 1335 } |
| 1336 | 1336 |
| 1337 | 1337 |
| 1338 var h = { | 1338 var h = { |
| 1339 "content-type" : "application/json; charset=utf-8", | 1339 "content-type" : "application/json; charset=utf-8", |
| 1340 }; | 1340 }; |
| 1341 var resp = convert.JSON.encode(buildVariable()); | 1341 var resp = convert.JSON.encode(buildVariable()); |
| 1342 return new async.Future.value(stringResponse(200, h, resp)); | 1342 return new async.Future.value(stringResponse(200, h, resp)); |
| 1343 }), true); | 1343 }), true); |
| 1344 res.get(arg_name).then(unittest.expectAsync(((api.Variable response) { | 1344 res.get(arg_name).then(unittest.expectAsync1(((api.Variable response) { |
| 1345 checkVariable(response); | 1345 checkVariable(response); |
| 1346 }))); | 1346 }))); |
| 1347 }); | 1347 }); |
| 1348 | 1348 |
| 1349 unittest.test("method--list", () { | 1349 unittest.test("method--list", () { |
| 1350 | 1350 |
| 1351 var mock = new HttpServerMock(); | 1351 var mock = new HttpServerMock(); |
| 1352 api.ProjectsConfigsVariablesResourceApi res = new api.RuntimeconfigApi(moc
k).projects.configs.variables; | 1352 api.ProjectsConfigsVariablesResourceApi res = new api.RuntimeconfigApi(moc
k).projects.configs.variables; |
| 1353 var arg_parent = "foo"; | 1353 var arg_parent = "foo"; |
| 1354 var arg_pageToken = "foo"; | 1354 var arg_pageToken = "foo"; |
| 1355 var arg_returnValues = true; | 1355 var arg_returnValues = true; |
| 1356 var arg_pageSize = 42; | 1356 var arg_pageSize = 42; |
| 1357 var arg_filter = "foo"; | 1357 var arg_filter = "foo"; |
| 1358 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1358 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 1359 var path = (req.url).path; | 1359 var path = (req.url).path; |
| 1360 var pathOffset = 0; | 1360 var pathOffset = 0; |
| 1361 var index; | 1361 var index; |
| 1362 var subPart; | 1362 var subPart; |
| 1363 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1363 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 1364 pathOffset += 1; | 1364 pathOffset += 1; |
| 1365 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("v1beta1/")); | 1365 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("v1beta1/")); |
| 1366 pathOffset += 8; | 1366 pathOffset += 8; |
| 1367 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; | 1367 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; |
| 1368 | 1368 |
| (...skipping 18 matching lines...) Expand all Loading... |
| 1387 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ
als(arg_pageSize)); | 1387 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ
als(arg_pageSize)); |
| 1388 unittest.expect(queryMap["filter"].first, unittest.equals(arg_filter)); | 1388 unittest.expect(queryMap["filter"].first, unittest.equals(arg_filter)); |
| 1389 | 1389 |
| 1390 | 1390 |
| 1391 var h = { | 1391 var h = { |
| 1392 "content-type" : "application/json; charset=utf-8", | 1392 "content-type" : "application/json; charset=utf-8", |
| 1393 }; | 1393 }; |
| 1394 var resp = convert.JSON.encode(buildListVariablesResponse()); | 1394 var resp = convert.JSON.encode(buildListVariablesResponse()); |
| 1395 return new async.Future.value(stringResponse(200, h, resp)); | 1395 return new async.Future.value(stringResponse(200, h, resp)); |
| 1396 }), true); | 1396 }), true); |
| 1397 res.list(arg_parent, pageToken: arg_pageToken, returnValues: arg_returnVal
ues, pageSize: arg_pageSize, filter: arg_filter).then(unittest.expectAsync(((api
.ListVariablesResponse response) { | 1397 res.list(arg_parent, pageToken: arg_pageToken, returnValues: arg_returnVal
ues, pageSize: arg_pageSize, filter: arg_filter).then(unittest.expectAsync1(((ap
i.ListVariablesResponse response) { |
| 1398 checkListVariablesResponse(response); | 1398 checkListVariablesResponse(response); |
| 1399 }))); | 1399 }))); |
| 1400 }); | 1400 }); |
| 1401 | 1401 |
| 1402 unittest.test("method--testIamPermissions", () { | 1402 unittest.test("method--testIamPermissions", () { |
| 1403 | 1403 |
| 1404 var mock = new HttpServerMock(); | 1404 var mock = new HttpServerMock(); |
| 1405 api.ProjectsConfigsVariablesResourceApi res = new api.RuntimeconfigApi(moc
k).projects.configs.variables; | 1405 api.ProjectsConfigsVariablesResourceApi res = new api.RuntimeconfigApi(moc
k).projects.configs.variables; |
| 1406 var arg_request = buildTestIamPermissionsRequest(); | 1406 var arg_request = buildTestIamPermissionsRequest(); |
| 1407 var arg_resource = "foo"; | 1407 var arg_resource = "foo"; |
| 1408 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1408 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 1409 var obj = new api.TestIamPermissionsRequest.fromJson(json); | 1409 var obj = new api.TestIamPermissionsRequest.fromJson(json); |
| 1410 checkTestIamPermissionsRequest(obj); | 1410 checkTestIamPermissionsRequest(obj); |
| 1411 | 1411 |
| 1412 var path = (req.url).path; | 1412 var path = (req.url).path; |
| 1413 var pathOffset = 0; | 1413 var pathOffset = 0; |
| 1414 var index; | 1414 var index; |
| 1415 var subPart; | 1415 var subPart; |
| 1416 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1416 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 1417 pathOffset += 1; | 1417 pathOffset += 1; |
| 1418 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("v1beta1/")); | 1418 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("v1beta1/")); |
| (...skipping 17 matching lines...) Expand all Loading... |
| 1436 } | 1436 } |
| 1437 } | 1437 } |
| 1438 | 1438 |
| 1439 | 1439 |
| 1440 var h = { | 1440 var h = { |
| 1441 "content-type" : "application/json; charset=utf-8", | 1441 "content-type" : "application/json; charset=utf-8", |
| 1442 }; | 1442 }; |
| 1443 var resp = convert.JSON.encode(buildTestIamPermissionsResponse()); | 1443 var resp = convert.JSON.encode(buildTestIamPermissionsResponse()); |
| 1444 return new async.Future.value(stringResponse(200, h, resp)); | 1444 return new async.Future.value(stringResponse(200, h, resp)); |
| 1445 }), true); | 1445 }), true); |
| 1446 res.testIamPermissions(arg_request, arg_resource).then(unittest.expectAsyn
c(((api.TestIamPermissionsResponse response) { | 1446 res.testIamPermissions(arg_request, arg_resource).then(unittest.expectAsyn
c1(((api.TestIamPermissionsResponse response) { |
| 1447 checkTestIamPermissionsResponse(response); | 1447 checkTestIamPermissionsResponse(response); |
| 1448 }))); | 1448 }))); |
| 1449 }); | 1449 }); |
| 1450 | 1450 |
| 1451 unittest.test("method--update", () { | 1451 unittest.test("method--update", () { |
| 1452 | 1452 |
| 1453 var mock = new HttpServerMock(); | 1453 var mock = new HttpServerMock(); |
| 1454 api.ProjectsConfigsVariablesResourceApi res = new api.RuntimeconfigApi(moc
k).projects.configs.variables; | 1454 api.ProjectsConfigsVariablesResourceApi res = new api.RuntimeconfigApi(moc
k).projects.configs.variables; |
| 1455 var arg_request = buildVariable(); | 1455 var arg_request = buildVariable(); |
| 1456 var arg_name = "foo"; | 1456 var arg_name = "foo"; |
| 1457 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1457 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 1458 var obj = new api.Variable.fromJson(json); | 1458 var obj = new api.Variable.fromJson(json); |
| 1459 checkVariable(obj); | 1459 checkVariable(obj); |
| 1460 | 1460 |
| 1461 var path = (req.url).path; | 1461 var path = (req.url).path; |
| 1462 var pathOffset = 0; | 1462 var pathOffset = 0; |
| 1463 var index; | 1463 var index; |
| 1464 var subPart; | 1464 var subPart; |
| 1465 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1465 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 1466 pathOffset += 1; | 1466 pathOffset += 1; |
| 1467 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("v1beta1/")); | 1467 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("v1beta1/")); |
| (...skipping 17 matching lines...) Expand all Loading... |
| 1485 } | 1485 } |
| 1486 } | 1486 } |
| 1487 | 1487 |
| 1488 | 1488 |
| 1489 var h = { | 1489 var h = { |
| 1490 "content-type" : "application/json; charset=utf-8", | 1490 "content-type" : "application/json; charset=utf-8", |
| 1491 }; | 1491 }; |
| 1492 var resp = convert.JSON.encode(buildVariable()); | 1492 var resp = convert.JSON.encode(buildVariable()); |
| 1493 return new async.Future.value(stringResponse(200, h, resp)); | 1493 return new async.Future.value(stringResponse(200, h, resp)); |
| 1494 }), true); | 1494 }), true); |
| 1495 res.update(arg_request, arg_name).then(unittest.expectAsync(((api.Variable
response) { | 1495 res.update(arg_request, arg_name).then(unittest.expectAsync1(((api.Variabl
e response) { |
| 1496 checkVariable(response); | 1496 checkVariable(response); |
| 1497 }))); | 1497 }))); |
| 1498 }); | 1498 }); |
| 1499 | 1499 |
| 1500 unittest.test("method--watch", () { | 1500 unittest.test("method--watch", () { |
| 1501 | 1501 |
| 1502 var mock = new HttpServerMock(); | 1502 var mock = new HttpServerMock(); |
| 1503 api.ProjectsConfigsVariablesResourceApi res = new api.RuntimeconfigApi(moc
k).projects.configs.variables; | 1503 api.ProjectsConfigsVariablesResourceApi res = new api.RuntimeconfigApi(moc
k).projects.configs.variables; |
| 1504 var arg_request = buildWatchVariableRequest(); | 1504 var arg_request = buildWatchVariableRequest(); |
| 1505 var arg_name = "foo"; | 1505 var arg_name = "foo"; |
| 1506 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1506 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 1507 var obj = new api.WatchVariableRequest.fromJson(json); | 1507 var obj = new api.WatchVariableRequest.fromJson(json); |
| 1508 checkWatchVariableRequest(obj); | 1508 checkWatchVariableRequest(obj); |
| 1509 | 1509 |
| 1510 var path = (req.url).path; | 1510 var path = (req.url).path; |
| 1511 var pathOffset = 0; | 1511 var pathOffset = 0; |
| 1512 var index; | 1512 var index; |
| 1513 var subPart; | 1513 var subPart; |
| 1514 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1514 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 1515 pathOffset += 1; | 1515 pathOffset += 1; |
| 1516 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("v1beta1/")); | 1516 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("v1beta1/")); |
| (...skipping 17 matching lines...) Expand all Loading... |
| 1534 } | 1534 } |
| 1535 } | 1535 } |
| 1536 | 1536 |
| 1537 | 1537 |
| 1538 var h = { | 1538 var h = { |
| 1539 "content-type" : "application/json; charset=utf-8", | 1539 "content-type" : "application/json; charset=utf-8", |
| 1540 }; | 1540 }; |
| 1541 var resp = convert.JSON.encode(buildVariable()); | 1541 var resp = convert.JSON.encode(buildVariable()); |
| 1542 return new async.Future.value(stringResponse(200, h, resp)); | 1542 return new async.Future.value(stringResponse(200, h, resp)); |
| 1543 }), true); | 1543 }), true); |
| 1544 res.watch(arg_request, arg_name).then(unittest.expectAsync(((api.Variable
response) { | 1544 res.watch(arg_request, arg_name).then(unittest.expectAsync1(((api.Variable
response) { |
| 1545 checkVariable(response); | 1545 checkVariable(response); |
| 1546 }))); | 1546 }))); |
| 1547 }); | 1547 }); |
| 1548 | 1548 |
| 1549 }); | 1549 }); |
| 1550 | 1550 |
| 1551 | 1551 |
| 1552 unittest.group("resource-ProjectsConfigsWaitersResourceApi", () { | 1552 unittest.group("resource-ProjectsConfigsWaitersResourceApi", () { |
| 1553 unittest.test("method--create", () { | 1553 unittest.test("method--create", () { |
| 1554 | 1554 |
| 1555 var mock = new HttpServerMock(); | 1555 var mock = new HttpServerMock(); |
| 1556 api.ProjectsConfigsWaitersResourceApi res = new api.RuntimeconfigApi(mock)
.projects.configs.waiters; | 1556 api.ProjectsConfigsWaitersResourceApi res = new api.RuntimeconfigApi(mock)
.projects.configs.waiters; |
| 1557 var arg_request = buildWaiter(); | 1557 var arg_request = buildWaiter(); |
| 1558 var arg_parent = "foo"; | 1558 var arg_parent = "foo"; |
| 1559 var arg_requestId = "foo"; | 1559 var arg_requestId = "foo"; |
| 1560 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1560 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 1561 var obj = new api.Waiter.fromJson(json); | 1561 var obj = new api.Waiter.fromJson(json); |
| 1562 checkWaiter(obj); | 1562 checkWaiter(obj); |
| 1563 | 1563 |
| 1564 var path = (req.url).path; | 1564 var path = (req.url).path; |
| 1565 var pathOffset = 0; | 1565 var pathOffset = 0; |
| 1566 var index; | 1566 var index; |
| 1567 var subPart; | 1567 var subPart; |
| 1568 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1568 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 1569 pathOffset += 1; | 1569 pathOffset += 1; |
| 1570 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("v1beta1/")); | 1570 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("v1beta1/")); |
| (...skipping 18 matching lines...) Expand all Loading... |
| 1589 } | 1589 } |
| 1590 unittest.expect(queryMap["requestId"].first, unittest.equals(arg_request
Id)); | 1590 unittest.expect(queryMap["requestId"].first, unittest.equals(arg_request
Id)); |
| 1591 | 1591 |
| 1592 | 1592 |
| 1593 var h = { | 1593 var h = { |
| 1594 "content-type" : "application/json; charset=utf-8", | 1594 "content-type" : "application/json; charset=utf-8", |
| 1595 }; | 1595 }; |
| 1596 var resp = convert.JSON.encode(buildOperation()); | 1596 var resp = convert.JSON.encode(buildOperation()); |
| 1597 return new async.Future.value(stringResponse(200, h, resp)); | 1597 return new async.Future.value(stringResponse(200, h, resp)); |
| 1598 }), true); | 1598 }), true); |
| 1599 res.create(arg_request, arg_parent, requestId: arg_requestId).then(unittes
t.expectAsync(((api.Operation response) { | 1599 res.create(arg_request, arg_parent, requestId: arg_requestId).then(unittes
t.expectAsync1(((api.Operation response) { |
| 1600 checkOperation(response); | 1600 checkOperation(response); |
| 1601 }))); | 1601 }))); |
| 1602 }); | 1602 }); |
| 1603 | 1603 |
| 1604 unittest.test("method--delete", () { | 1604 unittest.test("method--delete", () { |
| 1605 | 1605 |
| 1606 var mock = new HttpServerMock(); | 1606 var mock = new HttpServerMock(); |
| 1607 api.ProjectsConfigsWaitersResourceApi res = new api.RuntimeconfigApi(mock)
.projects.configs.waiters; | 1607 api.ProjectsConfigsWaitersResourceApi res = new api.RuntimeconfigApi(mock)
.projects.configs.waiters; |
| 1608 var arg_name = "foo"; | 1608 var arg_name = "foo"; |
| 1609 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1609 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 1610 var path = (req.url).path; | 1610 var path = (req.url).path; |
| 1611 var pathOffset = 0; | 1611 var pathOffset = 0; |
| 1612 var index; | 1612 var index; |
| 1613 var subPart; | 1613 var subPart; |
| 1614 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1614 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 1615 pathOffset += 1; | 1615 pathOffset += 1; |
| 1616 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("v1beta1/")); | 1616 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("v1beta1/")); |
| 1617 pathOffset += 8; | 1617 pathOffset += 8; |
| 1618 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; | 1618 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; |
| 1619 | 1619 |
| (...skipping 14 matching lines...) Expand all Loading... |
| 1634 } | 1634 } |
| 1635 } | 1635 } |
| 1636 | 1636 |
| 1637 | 1637 |
| 1638 var h = { | 1638 var h = { |
| 1639 "content-type" : "application/json; charset=utf-8", | 1639 "content-type" : "application/json; charset=utf-8", |
| 1640 }; | 1640 }; |
| 1641 var resp = convert.JSON.encode(buildEmpty()); | 1641 var resp = convert.JSON.encode(buildEmpty()); |
| 1642 return new async.Future.value(stringResponse(200, h, resp)); | 1642 return new async.Future.value(stringResponse(200, h, resp)); |
| 1643 }), true); | 1643 }), true); |
| 1644 res.delete(arg_name).then(unittest.expectAsync(((api.Empty response) { | 1644 res.delete(arg_name).then(unittest.expectAsync1(((api.Empty response) { |
| 1645 checkEmpty(response); | 1645 checkEmpty(response); |
| 1646 }))); | 1646 }))); |
| 1647 }); | 1647 }); |
| 1648 | 1648 |
| 1649 unittest.test("method--get", () { | 1649 unittest.test("method--get", () { |
| 1650 | 1650 |
| 1651 var mock = new HttpServerMock(); | 1651 var mock = new HttpServerMock(); |
| 1652 api.ProjectsConfigsWaitersResourceApi res = new api.RuntimeconfigApi(mock)
.projects.configs.waiters; | 1652 api.ProjectsConfigsWaitersResourceApi res = new api.RuntimeconfigApi(mock)
.projects.configs.waiters; |
| 1653 var arg_name = "foo"; | 1653 var arg_name = "foo"; |
| 1654 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1654 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 1655 var path = (req.url).path; | 1655 var path = (req.url).path; |
| 1656 var pathOffset = 0; | 1656 var pathOffset = 0; |
| 1657 var index; | 1657 var index; |
| 1658 var subPart; | 1658 var subPart; |
| 1659 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1659 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 1660 pathOffset += 1; | 1660 pathOffset += 1; |
| 1661 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("v1beta1/")); | 1661 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("v1beta1/")); |
| 1662 pathOffset += 8; | 1662 pathOffset += 8; |
| 1663 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; | 1663 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; |
| 1664 | 1664 |
| (...skipping 14 matching lines...) Expand all Loading... |
| 1679 } | 1679 } |
| 1680 } | 1680 } |
| 1681 | 1681 |
| 1682 | 1682 |
| 1683 var h = { | 1683 var h = { |
| 1684 "content-type" : "application/json; charset=utf-8", | 1684 "content-type" : "application/json; charset=utf-8", |
| 1685 }; | 1685 }; |
| 1686 var resp = convert.JSON.encode(buildWaiter()); | 1686 var resp = convert.JSON.encode(buildWaiter()); |
| 1687 return new async.Future.value(stringResponse(200, h, resp)); | 1687 return new async.Future.value(stringResponse(200, h, resp)); |
| 1688 }), true); | 1688 }), true); |
| 1689 res.get(arg_name).then(unittest.expectAsync(((api.Waiter response) { | 1689 res.get(arg_name).then(unittest.expectAsync1(((api.Waiter response) { |
| 1690 checkWaiter(response); | 1690 checkWaiter(response); |
| 1691 }))); | 1691 }))); |
| 1692 }); | 1692 }); |
| 1693 | 1693 |
| 1694 unittest.test("method--list", () { | 1694 unittest.test("method--list", () { |
| 1695 | 1695 |
| 1696 var mock = new HttpServerMock(); | 1696 var mock = new HttpServerMock(); |
| 1697 api.ProjectsConfigsWaitersResourceApi res = new api.RuntimeconfigApi(mock)
.projects.configs.waiters; | 1697 api.ProjectsConfigsWaitersResourceApi res = new api.RuntimeconfigApi(mock)
.projects.configs.waiters; |
| 1698 var arg_parent = "foo"; | 1698 var arg_parent = "foo"; |
| 1699 var arg_pageToken = "foo"; | 1699 var arg_pageToken = "foo"; |
| 1700 var arg_pageSize = 42; | 1700 var arg_pageSize = 42; |
| 1701 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1701 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 1702 var path = (req.url).path; | 1702 var path = (req.url).path; |
| 1703 var pathOffset = 0; | 1703 var pathOffset = 0; |
| 1704 var index; | 1704 var index; |
| 1705 var subPart; | 1705 var subPart; |
| 1706 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1706 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 1707 pathOffset += 1; | 1707 pathOffset += 1; |
| 1708 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("v1beta1/")); | 1708 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("v1beta1/")); |
| 1709 pathOffset += 8; | 1709 pathOffset += 8; |
| 1710 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; | 1710 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; |
| 1711 | 1711 |
| (...skipping 16 matching lines...) Expand all Loading... |
| 1728 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | 1728 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); |
| 1729 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ
als(arg_pageSize)); | 1729 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ
als(arg_pageSize)); |
| 1730 | 1730 |
| 1731 | 1731 |
| 1732 var h = { | 1732 var h = { |
| 1733 "content-type" : "application/json; charset=utf-8", | 1733 "content-type" : "application/json; charset=utf-8", |
| 1734 }; | 1734 }; |
| 1735 var resp = convert.JSON.encode(buildListWaitersResponse()); | 1735 var resp = convert.JSON.encode(buildListWaitersResponse()); |
| 1736 return new async.Future.value(stringResponse(200, h, resp)); | 1736 return new async.Future.value(stringResponse(200, h, resp)); |
| 1737 }), true); | 1737 }), true); |
| 1738 res.list(arg_parent, pageToken: arg_pageToken, pageSize: arg_pageSize).the
n(unittest.expectAsync(((api.ListWaitersResponse response) { | 1738 res.list(arg_parent, pageToken: arg_pageToken, pageSize: arg_pageSize).the
n(unittest.expectAsync1(((api.ListWaitersResponse response) { |
| 1739 checkListWaitersResponse(response); | 1739 checkListWaitersResponse(response); |
| 1740 }))); | 1740 }))); |
| 1741 }); | 1741 }); |
| 1742 | 1742 |
| 1743 unittest.test("method--testIamPermissions", () { | 1743 unittest.test("method--testIamPermissions", () { |
| 1744 | 1744 |
| 1745 var mock = new HttpServerMock(); | 1745 var mock = new HttpServerMock(); |
| 1746 api.ProjectsConfigsWaitersResourceApi res = new api.RuntimeconfigApi(mock)
.projects.configs.waiters; | 1746 api.ProjectsConfigsWaitersResourceApi res = new api.RuntimeconfigApi(mock)
.projects.configs.waiters; |
| 1747 var arg_request = buildTestIamPermissionsRequest(); | 1747 var arg_request = buildTestIamPermissionsRequest(); |
| 1748 var arg_resource = "foo"; | 1748 var arg_resource = "foo"; |
| 1749 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1749 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 1750 var obj = new api.TestIamPermissionsRequest.fromJson(json); | 1750 var obj = new api.TestIamPermissionsRequest.fromJson(json); |
| 1751 checkTestIamPermissionsRequest(obj); | 1751 checkTestIamPermissionsRequest(obj); |
| 1752 | 1752 |
| 1753 var path = (req.url).path; | 1753 var path = (req.url).path; |
| 1754 var pathOffset = 0; | 1754 var pathOffset = 0; |
| 1755 var index; | 1755 var index; |
| 1756 var subPart; | 1756 var subPart; |
| 1757 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1757 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 1758 pathOffset += 1; | 1758 pathOffset += 1; |
| 1759 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("v1beta1/")); | 1759 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("v1beta1/")); |
| (...skipping 17 matching lines...) Expand all Loading... |
| 1777 } | 1777 } |
| 1778 } | 1778 } |
| 1779 | 1779 |
| 1780 | 1780 |
| 1781 var h = { | 1781 var h = { |
| 1782 "content-type" : "application/json; charset=utf-8", | 1782 "content-type" : "application/json; charset=utf-8", |
| 1783 }; | 1783 }; |
| 1784 var resp = convert.JSON.encode(buildTestIamPermissionsResponse()); | 1784 var resp = convert.JSON.encode(buildTestIamPermissionsResponse()); |
| 1785 return new async.Future.value(stringResponse(200, h, resp)); | 1785 return new async.Future.value(stringResponse(200, h, resp)); |
| 1786 }), true); | 1786 }), true); |
| 1787 res.testIamPermissions(arg_request, arg_resource).then(unittest.expectAsyn
c(((api.TestIamPermissionsResponse response) { | 1787 res.testIamPermissions(arg_request, arg_resource).then(unittest.expectAsyn
c1(((api.TestIamPermissionsResponse response) { |
| 1788 checkTestIamPermissionsResponse(response); | 1788 checkTestIamPermissionsResponse(response); |
| 1789 }))); | 1789 }))); |
| 1790 }); | 1790 }); |
| 1791 | 1791 |
| 1792 }); | 1792 }); |
| 1793 | 1793 |
| 1794 | 1794 |
| 1795 } | 1795 } |
| 1796 | 1796 |
| OLD | NEW |