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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 } | 44 } |
45 } | 45 } |
46 } | 46 } |
47 | 47 |
48 http.StreamedResponse stringResponse( | 48 http.StreamedResponse stringResponse( |
49 core.int status, core.Map headers, core.String body) { | 49 core.int status, core.Map headers, core.String body) { |
50 var stream = new async.Stream.fromIterable([convert.UTF8.encode(body)]); | 50 var stream = new async.Stream.fromIterable([convert.UTF8.encode(body)]); |
51 return new http.StreamedResponse(stream, status, headers: headers); | 51 return new http.StreamedResponse(stream, status, headers: headers); |
52 } | 52 } |
53 | 53 |
54 buildUnnamed3779() { | 54 buildUnnamed3871() { |
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 checkUnnamed3779(core.List<core.String> o) { | 61 checkUnnamed3871(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 = buildUnnamed3779(); | 72 o.members = buildUnnamed3871(); |
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 checkUnnamed3779(o.members); | 82 checkUnnamed3871(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 buildUnnamed3780() { | 145 buildUnnamed3872() { |
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 checkUnnamed3780(core.List<api.RuntimeConfig> o) { | 152 checkUnnamed3872(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 = buildUnnamed3780(); | 163 o.configs = buildUnnamed3872(); |
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 checkUnnamed3780(o.configs); | 173 checkUnnamed3872(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 buildUnnamed3781() { | 179 buildUnnamed3873() { |
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 checkUnnamed3781(core.List<api.Variable> o) { | 186 checkUnnamed3873(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 = buildUnnamed3781(); | 198 o.variables = buildUnnamed3873(); |
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 checkUnnamed3781(o.variables); | 208 checkUnnamed3873(o.variables); |
209 } | 209 } |
210 buildCounterListVariablesResponse--; | 210 buildCounterListVariablesResponse--; |
211 } | 211 } |
212 | 212 |
213 buildUnnamed3782() { | 213 buildUnnamed3874() { |
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 checkUnnamed3782(core.List<api.Waiter> o) { | 220 checkUnnamed3874(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 = buildUnnamed3782(); | 232 o.waiters = buildUnnamed3874(); |
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 checkUnnamed3782(o.waiters); | 242 checkUnnamed3874(o.waiters); |
243 } | 243 } |
244 buildCounterListWaitersResponse--; | 244 buildCounterListWaitersResponse--; |
245 } | 245 } |
246 | 246 |
247 buildUnnamed3783() { | 247 buildUnnamed3875() { |
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 checkUnnamed3783(core.Map<core.String, core.Object> o) { | 254 checkUnnamed3875(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 buildUnnamed3784() { | 260 buildUnnamed3876() { |
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 checkUnnamed3784(core.Map<core.String, core.Object> o) { | 267 checkUnnamed3876(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 = buildUnnamed3783(); | 280 o.metadata = buildUnnamed3875(); |
281 o.name = "foo"; | 281 o.name = "foo"; |
282 o.response = buildUnnamed3784(); | 282 o.response = buildUnnamed3876(); |
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 checkUnnamed3783(o.metadata); | 293 checkUnnamed3875(o.metadata); |
294 unittest.expect(o.name, unittest.equals('foo')); | 294 unittest.expect(o.name, unittest.equals('foo')); |
295 checkUnnamed3784(o.response); | 295 checkUnnamed3876(o.response); |
296 } | 296 } |
297 buildCounterOperation--; | 297 buildCounterOperation--; |
298 } | 298 } |
299 | 299 |
300 buildUnnamed3785() { | 300 buildUnnamed3877() { |
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 checkUnnamed3785(core.List<api.Binding> o) { | 307 checkUnnamed3877(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 = buildUnnamed3785(); | 318 o.bindings = buildUnnamed3877(); |
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 checkUnnamed3785(o.bindings); | 329 checkUnnamed3877(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 buildUnnamed3786() { | 376 buildUnnamed3878() { |
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 checkUnnamed3786(core.Map<core.String, core.Object> o) { | 383 checkUnnamed3878(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 buildUnnamed3787() { | 389 buildUnnamed3879() { |
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(buildUnnamed3786()); | 391 o.add(buildUnnamed3878()); |
392 o.add(buildUnnamed3786()); | 392 o.add(buildUnnamed3878()); |
393 return o; | 393 return o; |
394 } | 394 } |
395 | 395 |
396 checkUnnamed3787(core.List<core.Map<core.String, core.Object>> o) { | 396 checkUnnamed3879(core.List<core.Map<core.String, core.Object>> o) { |
397 unittest.expect(o, unittest.hasLength(2)); | 397 unittest.expect(o, unittest.hasLength(2)); |
398 checkUnnamed3786(o[0]); | 398 checkUnnamed3878(o[0]); |
399 checkUnnamed3786(o[1]); | 399 checkUnnamed3878(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 = buildUnnamed3787(); | 408 o.details = buildUnnamed3879(); |
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 checkUnnamed3787(o.details); | 419 checkUnnamed3879(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 buildUnnamed3788() { | 425 buildUnnamed3880() { |
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 checkUnnamed3788(core.List<core.String> o) { | 432 checkUnnamed3880(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 = buildUnnamed3788(); | 443 o.permissions = buildUnnamed3880(); |
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 checkUnnamed3788(o.permissions); | 452 checkUnnamed3880(o.permissions); |
453 } | 453 } |
454 buildCounterTestIamPermissionsRequest--; | 454 buildCounterTestIamPermissionsRequest--; |
455 } | 455 } |
456 | 456 |
457 buildUnnamed3789() { | 457 buildUnnamed3881() { |
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 checkUnnamed3789(core.List<core.String> o) { | 464 checkUnnamed3881(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 = buildUnnamed3789(); | 475 o.permissions = buildUnnamed3881(); |
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 checkUnnamed3789(o.permissions); | 484 checkUnnamed3881(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 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
556 } | 556 } |
557 | 557 |
558 checkWatchVariableRequest(api.WatchVariableRequest o) { | 558 checkWatchVariableRequest(api.WatchVariableRequest o) { |
559 buildCounterWatchVariableRequest++; | 559 buildCounterWatchVariableRequest++; |
560 if (buildCounterWatchVariableRequest < 3) { | 560 if (buildCounterWatchVariableRequest < 3) { |
561 unittest.expect(o.newerThan, unittest.equals('foo')); | 561 unittest.expect(o.newerThan, unittest.equals('foo')); |
562 } | 562 } |
563 buildCounterWatchVariableRequest--; | 563 buildCounterWatchVariableRequest--; |
564 } | 564 } |
565 | 565 |
566 buildUnnamed3790() { | 566 buildUnnamed3882() { |
567 var o = new core.List<core.String>(); | 567 var o = new core.List<core.String>(); |
568 o.add("foo"); | 568 o.add("foo"); |
569 o.add("foo"); | 569 o.add("foo"); |
570 return o; | 570 return o; |
571 } | 571 } |
572 | 572 |
573 checkUnnamed3790(core.List<core.String> o) { | 573 checkUnnamed3882(core.List<core.String> o) { |
574 unittest.expect(o, unittest.hasLength(2)); | 574 unittest.expect(o, unittest.hasLength(2)); |
575 unittest.expect(o[0], unittest.equals('foo')); | 575 unittest.expect(o[0], unittest.equals('foo')); |
576 unittest.expect(o[1], unittest.equals('foo')); | 576 unittest.expect(o[1], unittest.equals('foo')); |
577 } | 577 } |
578 | 578 |
579 buildUnnamed3791() { | 579 buildUnnamed3883() { |
580 var o = new core.List<core.String>(); | 580 var o = new core.List<core.String>(); |
581 o.add("foo"); | 581 o.add("foo"); |
582 o.add("foo"); | 582 o.add("foo"); |
583 return o; | 583 return o; |
584 } | 584 } |
585 | 585 |
586 checkUnnamed3791(core.List<core.String> o) { | 586 checkUnnamed3883(core.List<core.String> o) { |
587 unittest.expect(o, unittest.hasLength(2)); | 587 unittest.expect(o, unittest.hasLength(2)); |
588 unittest.expect(o[0], unittest.equals('foo')); | 588 unittest.expect(o[0], unittest.equals('foo')); |
589 unittest.expect(o[1], unittest.equals('foo')); | 589 unittest.expect(o[1], unittest.equals('foo')); |
590 } | 590 } |
591 | 591 |
592 buildUnnamed3792() { | 592 buildUnnamed3884() { |
593 var o = new core.List<core.String>(); | 593 var o = new core.List<core.String>(); |
594 o.add("foo"); | 594 o.add("foo"); |
595 o.add("foo"); | 595 o.add("foo"); |
596 return o; | 596 return o; |
597 } | 597 } |
598 | 598 |
599 checkUnnamed3792(core.List<core.String> o) { | 599 checkUnnamed3884(core.List<core.String> o) { |
600 unittest.expect(o, unittest.hasLength(2)); | 600 unittest.expect(o, unittest.hasLength(2)); |
601 unittest.expect(o[0], unittest.equals('foo')); | 601 unittest.expect(o[0], unittest.equals('foo')); |
602 unittest.expect(o[1], unittest.equals('foo')); | 602 unittest.expect(o[1], unittest.equals('foo')); |
603 } | 603 } |
604 | 604 |
605 | 605 |
606 main() { | 606 main() { |
607 unittest.group("obj-schema-Binding", () { | 607 unittest.group("obj-schema-Binding", () { |
608 unittest.test("to-json--from-json", () { | 608 unittest.test("to-json--from-json", () { |
609 var o = buildBinding(); | 609 var o = buildBinding(); |
(...skipping 332 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
942 res.getIamPolicy(arg_resource).then(unittest.expectAsync(((api.Policy resp
onse) { | 942 res.getIamPolicy(arg_resource).then(unittest.expectAsync(((api.Policy resp
onse) { |
943 checkPolicy(response); | 943 checkPolicy(response); |
944 }))); | 944 }))); |
945 }); | 945 }); |
946 | 946 |
947 unittest.test("method--list", () { | 947 unittest.test("method--list", () { |
948 | 948 |
949 var mock = new HttpServerMock(); | 949 var mock = new HttpServerMock(); |
950 api.ProjectsConfigsResourceApi res = new api.RuntimeconfigApi(mock).projec
ts.configs; | 950 api.ProjectsConfigsResourceApi res = new api.RuntimeconfigApi(mock).projec
ts.configs; |
951 var arg_parent = "foo"; | 951 var arg_parent = "foo"; |
| 952 var arg_pageToken = "foo"; |
952 var arg_pageSize = 42; | 953 var arg_pageSize = 42; |
953 var arg_pageToken = "foo"; | |
954 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 954 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
955 var path = (req.url).path; | 955 var path = (req.url).path; |
956 var pathOffset = 0; | 956 var pathOffset = 0; |
957 var index; | 957 var index; |
958 var subPart; | 958 var subPart; |
959 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 959 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
960 pathOffset += 1; | 960 pathOffset += 1; |
961 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("v1beta1/")); | 961 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("v1beta1/")); |
962 pathOffset += 8; | 962 pathOffset += 8; |
963 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; | 963 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; |
964 | 964 |
965 var query = (req.url).query; | 965 var query = (req.url).query; |
966 var queryOffset = 0; | 966 var queryOffset = 0; |
967 var queryMap = {}; | 967 var queryMap = {}; |
968 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 968 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
969 parseBool(n) { | 969 parseBool(n) { |
970 if (n == "true") return true; | 970 if (n == "true") return true; |
971 if (n == "false") return false; | 971 if (n == "false") return false; |
972 if (n == null) return null; | 972 if (n == null) return null; |
973 throw new core.ArgumentError("Invalid boolean: $n"); | 973 throw new core.ArgumentError("Invalid boolean: $n"); |
974 } | 974 } |
975 if (query.length > 0) { | 975 if (query.length > 0) { |
976 for (var part in query.split("&")) { | 976 for (var part in query.split("&")) { |
977 var keyvalue = part.split("="); | 977 var keyvalue = part.split("="); |
978 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 978 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
979 } | 979 } |
980 } | 980 } |
| 981 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); |
981 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ
als(arg_pageSize)); | 982 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ
als(arg_pageSize)); |
982 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | |
983 | 983 |
984 | 984 |
985 var h = { | 985 var h = { |
986 "content-type" : "application/json; charset=utf-8", | 986 "content-type" : "application/json; charset=utf-8", |
987 }; | 987 }; |
988 var resp = convert.JSON.encode(buildListConfigsResponse()); | 988 var resp = convert.JSON.encode(buildListConfigsResponse()); |
989 return new async.Future.value(stringResponse(200, h, resp)); | 989 return new async.Future.value(stringResponse(200, h, resp)); |
990 }), true); | 990 }), true); |
991 res.list(arg_parent, pageSize: arg_pageSize, pageToken: arg_pageToken).the
n(unittest.expectAsync(((api.ListConfigsResponse response) { | 991 res.list(arg_parent, pageToken: arg_pageToken, pageSize: arg_pageSize).the
n(unittest.expectAsync(((api.ListConfigsResponse response) { |
992 checkListConfigsResponse(response); | 992 checkListConfigsResponse(response); |
993 }))); | 993 }))); |
994 }); | 994 }); |
995 | 995 |
996 unittest.test("method--setIamPolicy", () { | 996 unittest.test("method--setIamPolicy", () { |
997 | 997 |
998 var mock = new HttpServerMock(); | 998 var mock = new HttpServerMock(); |
999 api.ProjectsConfigsResourceApi res = new api.RuntimeconfigApi(mock).projec
ts.configs; | 999 api.ProjectsConfigsResourceApi res = new api.RuntimeconfigApi(mock).projec
ts.configs; |
1000 var arg_request = buildSetIamPolicyRequest(); | 1000 var arg_request = buildSetIamPolicyRequest(); |
1001 var arg_resource = "foo"; | 1001 var arg_resource = "foo"; |
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1187 res.get(arg_name).then(unittest.expectAsync(((api.Operation response) { | 1187 res.get(arg_name).then(unittest.expectAsync(((api.Operation response) { |
1188 checkOperation(response); | 1188 checkOperation(response); |
1189 }))); | 1189 }))); |
1190 }); | 1190 }); |
1191 | 1191 |
1192 unittest.test("method--testIamPermissions", () { | 1192 unittest.test("method--testIamPermissions", () { |
1193 | 1193 |
1194 var mock = new HttpServerMock(); | 1194 var mock = new HttpServerMock(); |
1195 api.ProjectsConfigsOperationsResourceApi res = new api.RuntimeconfigApi(mo
ck).projects.configs.operations; | 1195 api.ProjectsConfigsOperationsResourceApi res = new api.RuntimeconfigApi(mo
ck).projects.configs.operations; |
1196 var arg_resource = "foo"; | 1196 var arg_resource = "foo"; |
1197 var arg_permissions = buildUnnamed3790(); | 1197 var arg_permissions = buildUnnamed3882(); |
1198 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1198 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
1199 var path = (req.url).path; | 1199 var path = (req.url).path; |
1200 var pathOffset = 0; | 1200 var pathOffset = 0; |
1201 var index; | 1201 var index; |
1202 var subPart; | 1202 var subPart; |
1203 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1203 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
1204 pathOffset += 1; | 1204 pathOffset += 1; |
1205 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("v1beta1/")); | 1205 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("v1beta1/")); |
1206 pathOffset += 8; | 1206 pathOffset += 8; |
1207 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; | 1207 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; |
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1381 res.get(arg_name).then(unittest.expectAsync(((api.Variable response) { | 1381 res.get(arg_name).then(unittest.expectAsync(((api.Variable response) { |
1382 checkVariable(response); | 1382 checkVariable(response); |
1383 }))); | 1383 }))); |
1384 }); | 1384 }); |
1385 | 1385 |
1386 unittest.test("method--list", () { | 1386 unittest.test("method--list", () { |
1387 | 1387 |
1388 var mock = new HttpServerMock(); | 1388 var mock = new HttpServerMock(); |
1389 api.ProjectsConfigsVariablesResourceApi res = new api.RuntimeconfigApi(moc
k).projects.configs.variables; | 1389 api.ProjectsConfigsVariablesResourceApi res = new api.RuntimeconfigApi(moc
k).projects.configs.variables; |
1390 var arg_parent = "foo"; | 1390 var arg_parent = "foo"; |
| 1391 var arg_pageToken = "foo"; |
1391 var arg_pageSize = 42; | 1392 var arg_pageSize = 42; |
1392 var arg_filter = "foo"; | 1393 var arg_filter = "foo"; |
1393 var arg_pageToken = "foo"; | |
1394 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1394 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
1395 var path = (req.url).path; | 1395 var path = (req.url).path; |
1396 var pathOffset = 0; | 1396 var pathOffset = 0; |
1397 var index; | 1397 var index; |
1398 var subPart; | 1398 var subPart; |
1399 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1399 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
1400 pathOffset += 1; | 1400 pathOffset += 1; |
1401 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("v1beta1/")); | 1401 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("v1beta1/")); |
1402 pathOffset += 8; | 1402 pathOffset += 8; |
1403 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; | 1403 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; |
1404 | 1404 |
1405 var query = (req.url).query; | 1405 var query = (req.url).query; |
1406 var queryOffset = 0; | 1406 var queryOffset = 0; |
1407 var queryMap = {}; | 1407 var queryMap = {}; |
1408 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 1408 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
1409 parseBool(n) { | 1409 parseBool(n) { |
1410 if (n == "true") return true; | 1410 if (n == "true") return true; |
1411 if (n == "false") return false; | 1411 if (n == "false") return false; |
1412 if (n == null) return null; | 1412 if (n == null) return null; |
1413 throw new core.ArgumentError("Invalid boolean: $n"); | 1413 throw new core.ArgumentError("Invalid boolean: $n"); |
1414 } | 1414 } |
1415 if (query.length > 0) { | 1415 if (query.length > 0) { |
1416 for (var part in query.split("&")) { | 1416 for (var part in query.split("&")) { |
1417 var keyvalue = part.split("="); | 1417 var keyvalue = part.split("="); |
1418 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 1418 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
1419 } | 1419 } |
1420 } | 1420 } |
| 1421 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); |
1421 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ
als(arg_pageSize)); | 1422 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ
als(arg_pageSize)); |
1422 unittest.expect(queryMap["filter"].first, unittest.equals(arg_filter)); | 1423 unittest.expect(queryMap["filter"].first, unittest.equals(arg_filter)); |
1423 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | |
1424 | 1424 |
1425 | 1425 |
1426 var h = { | 1426 var h = { |
1427 "content-type" : "application/json; charset=utf-8", | 1427 "content-type" : "application/json; charset=utf-8", |
1428 }; | 1428 }; |
1429 var resp = convert.JSON.encode(buildListVariablesResponse()); | 1429 var resp = convert.JSON.encode(buildListVariablesResponse()); |
1430 return new async.Future.value(stringResponse(200, h, resp)); | 1430 return new async.Future.value(stringResponse(200, h, resp)); |
1431 }), true); | 1431 }), true); |
1432 res.list(arg_parent, pageSize: arg_pageSize, filter: arg_filter, pageToken
: arg_pageToken).then(unittest.expectAsync(((api.ListVariablesResponse response)
{ | 1432 res.list(arg_parent, pageToken: arg_pageToken, pageSize: arg_pageSize, fil
ter: arg_filter).then(unittest.expectAsync(((api.ListVariablesResponse response)
{ |
1433 checkListVariablesResponse(response); | 1433 checkListVariablesResponse(response); |
1434 }))); | 1434 }))); |
1435 }); | 1435 }); |
1436 | 1436 |
1437 unittest.test("method--testIamPermissions", () { | 1437 unittest.test("method--testIamPermissions", () { |
1438 | 1438 |
1439 var mock = new HttpServerMock(); | 1439 var mock = new HttpServerMock(); |
1440 api.ProjectsConfigsVariablesResourceApi res = new api.RuntimeconfigApi(moc
k).projects.configs.variables; | 1440 api.ProjectsConfigsVariablesResourceApi res = new api.RuntimeconfigApi(moc
k).projects.configs.variables; |
1441 var arg_resource = "foo"; | 1441 var arg_resource = "foo"; |
1442 var arg_permissions = buildUnnamed3791(); | 1442 var arg_permissions = buildUnnamed3883(); |
1443 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1443 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
1444 var path = (req.url).path; | 1444 var path = (req.url).path; |
1445 var pathOffset = 0; | 1445 var pathOffset = 0; |
1446 var index; | 1446 var index; |
1447 var subPart; | 1447 var subPart; |
1448 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1448 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
1449 pathOffset += 1; | 1449 pathOffset += 1; |
1450 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("v1beta1/")); | 1450 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("v1beta1/")); |
1451 pathOffset += 8; | 1451 pathOffset += 8; |
1452 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; | 1452 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; |
(...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1722 res.get(arg_name).then(unittest.expectAsync(((api.Waiter response) { | 1722 res.get(arg_name).then(unittest.expectAsync(((api.Waiter response) { |
1723 checkWaiter(response); | 1723 checkWaiter(response); |
1724 }))); | 1724 }))); |
1725 }); | 1725 }); |
1726 | 1726 |
1727 unittest.test("method--list", () { | 1727 unittest.test("method--list", () { |
1728 | 1728 |
1729 var mock = new HttpServerMock(); | 1729 var mock = new HttpServerMock(); |
1730 api.ProjectsConfigsWaitersResourceApi res = new api.RuntimeconfigApi(mock)
.projects.configs.waiters; | 1730 api.ProjectsConfigsWaitersResourceApi res = new api.RuntimeconfigApi(mock)
.projects.configs.waiters; |
1731 var arg_parent = "foo"; | 1731 var arg_parent = "foo"; |
| 1732 var arg_pageToken = "foo"; |
1732 var arg_pageSize = 42; | 1733 var arg_pageSize = 42; |
1733 var arg_pageToken = "foo"; | |
1734 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1734 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
1735 var path = (req.url).path; | 1735 var path = (req.url).path; |
1736 var pathOffset = 0; | 1736 var pathOffset = 0; |
1737 var index; | 1737 var index; |
1738 var subPart; | 1738 var subPart; |
1739 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1739 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
1740 pathOffset += 1; | 1740 pathOffset += 1; |
1741 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("v1beta1/")); | 1741 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("v1beta1/")); |
1742 pathOffset += 8; | 1742 pathOffset += 8; |
1743 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; | 1743 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; |
1744 | 1744 |
1745 var query = (req.url).query; | 1745 var query = (req.url).query; |
1746 var queryOffset = 0; | 1746 var queryOffset = 0; |
1747 var queryMap = {}; | 1747 var queryMap = {}; |
1748 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 1748 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
1749 parseBool(n) { | 1749 parseBool(n) { |
1750 if (n == "true") return true; | 1750 if (n == "true") return true; |
1751 if (n == "false") return false; | 1751 if (n == "false") return false; |
1752 if (n == null) return null; | 1752 if (n == null) return null; |
1753 throw new core.ArgumentError("Invalid boolean: $n"); | 1753 throw new core.ArgumentError("Invalid boolean: $n"); |
1754 } | 1754 } |
1755 if (query.length > 0) { | 1755 if (query.length > 0) { |
1756 for (var part in query.split("&")) { | 1756 for (var part in query.split("&")) { |
1757 var keyvalue = part.split("="); | 1757 var keyvalue = part.split("="); |
1758 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 1758 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
1759 } | 1759 } |
1760 } | 1760 } |
| 1761 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); |
1761 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ
als(arg_pageSize)); | 1762 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ
als(arg_pageSize)); |
1762 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | |
1763 | 1763 |
1764 | 1764 |
1765 var h = { | 1765 var h = { |
1766 "content-type" : "application/json; charset=utf-8", | 1766 "content-type" : "application/json; charset=utf-8", |
1767 }; | 1767 }; |
1768 var resp = convert.JSON.encode(buildListWaitersResponse()); | 1768 var resp = convert.JSON.encode(buildListWaitersResponse()); |
1769 return new async.Future.value(stringResponse(200, h, resp)); | 1769 return new async.Future.value(stringResponse(200, h, resp)); |
1770 }), true); | 1770 }), true); |
1771 res.list(arg_parent, pageSize: arg_pageSize, pageToken: arg_pageToken).the
n(unittest.expectAsync(((api.ListWaitersResponse response) { | 1771 res.list(arg_parent, pageToken: arg_pageToken, pageSize: arg_pageSize).the
n(unittest.expectAsync(((api.ListWaitersResponse response) { |
1772 checkListWaitersResponse(response); | 1772 checkListWaitersResponse(response); |
1773 }))); | 1773 }))); |
1774 }); | 1774 }); |
1775 | 1775 |
1776 unittest.test("method--testIamPermissions", () { | 1776 unittest.test("method--testIamPermissions", () { |
1777 | 1777 |
1778 var mock = new HttpServerMock(); | 1778 var mock = new HttpServerMock(); |
1779 api.ProjectsConfigsWaitersResourceApi res = new api.RuntimeconfigApi(mock)
.projects.configs.waiters; | 1779 api.ProjectsConfigsWaitersResourceApi res = new api.RuntimeconfigApi(mock)
.projects.configs.waiters; |
1780 var arg_resource = "foo"; | 1780 var arg_resource = "foo"; |
1781 var arg_permissions = buildUnnamed3792(); | 1781 var arg_permissions = buildUnnamed3884(); |
1782 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1782 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
1783 var path = (req.url).path; | 1783 var path = (req.url).path; |
1784 var pathOffset = 0; | 1784 var pathOffset = 0; |
1785 var index; | 1785 var index; |
1786 var subPart; | 1786 var subPart; |
1787 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1787 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
1788 pathOffset += 1; | 1788 pathOffset += 1; |
1789 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("v1beta1/")); | 1789 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("v1beta1/")); |
1790 pathOffset += 8; | 1790 pathOffset += 8; |
1791 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; | 1791 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; |
(...skipping 26 matching lines...) Expand all Loading... |
1818 res.testIamPermissions(arg_resource, permissions: arg_permissions).then(un
ittest.expectAsync(((api.TestIamPermissionsResponse response) { | 1818 res.testIamPermissions(arg_resource, permissions: arg_permissions).then(un
ittest.expectAsync(((api.TestIamPermissionsResponse response) { |
1819 checkTestIamPermissionsResponse(response); | 1819 checkTestIamPermissionsResponse(response); |
1820 }))); | 1820 }))); |
1821 }); | 1821 }); |
1822 | 1822 |
1823 }); | 1823 }); |
1824 | 1824 |
1825 | 1825 |
1826 } | 1826 } |
1827 | 1827 |
OLD | NEW |