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:test/test.dart' as unittest; | 10 import 'package:test/test.dart' as unittest; |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 } | 44 } |
45 } | 45 } |
46 } | 46 } |
47 | 47 |
48 http.StreamedResponse stringResponse( | 48 http.StreamedResponse stringResponse( |
49 core.int status, core.Map<core.String, core.String> headers, core.String bod
y) { | 49 core.int status, core.Map<core.String, core.String> headers, core.String bod
y) { |
50 var stream = new async.Stream.fromIterable([convert.UTF8.encode(body)]); | 50 var stream = new async.Stream.fromIterable([convert.UTF8.encode(body)]); |
51 return new http.StreamedResponse(stream, status, headers: headers); | 51 return new http.StreamedResponse(stream, status, headers: headers); |
52 } | 52 } |
53 | 53 |
54 buildUnnamed3521() { | 54 buildUnnamed3553() { |
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 checkUnnamed3521(core.List<core.String> o) { | 61 checkUnnamed3553(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 = buildUnnamed3521(); | 72 o.members = buildUnnamed3553(); |
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 checkUnnamed3521(o.members); | 82 checkUnnamed3553(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 buildUnnamed3522() { | 145 buildUnnamed3554() { |
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 checkUnnamed3522(core.List<api.RuntimeConfig> o) { | 152 checkUnnamed3554(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 = buildUnnamed3522(); | 163 o.configs = buildUnnamed3554(); |
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 checkUnnamed3522(o.configs); | 173 checkUnnamed3554(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 buildUnnamed3523() { | 179 buildUnnamed3555() { |
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 checkUnnamed3523(core.List<api.Variable> o) { | 186 checkUnnamed3555(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 = buildUnnamed3523(); | 198 o.variables = buildUnnamed3555(); |
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 checkUnnamed3523(o.variables); | 208 checkUnnamed3555(o.variables); |
209 } | 209 } |
210 buildCounterListVariablesResponse--; | 210 buildCounterListVariablesResponse--; |
211 } | 211 } |
212 | 212 |
213 buildUnnamed3524() { | 213 buildUnnamed3556() { |
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 checkUnnamed3524(core.List<api.Waiter> o) { | 220 checkUnnamed3556(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 = buildUnnamed3524(); | 232 o.waiters = buildUnnamed3556(); |
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 checkUnnamed3524(o.waiters); | 242 checkUnnamed3556(o.waiters); |
243 } | 243 } |
244 buildCounterListWaitersResponse--; | 244 buildCounterListWaitersResponse--; |
245 } | 245 } |
246 | 246 |
247 buildUnnamed3525() { | 247 buildUnnamed3557() { |
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 checkUnnamed3525(core.Map<core.String, core.Object> o) { | 254 checkUnnamed3557(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 buildUnnamed3526() { | 260 buildUnnamed3558() { |
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 checkUnnamed3526(core.Map<core.String, core.Object> o) { | 267 checkUnnamed3558(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 = buildUnnamed3525(); | 280 o.metadata = buildUnnamed3557(); |
281 o.name = "foo"; | 281 o.name = "foo"; |
282 o.response = buildUnnamed3526(); | 282 o.response = buildUnnamed3558(); |
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 checkUnnamed3525(o.metadata); | 293 checkUnnamed3557(o.metadata); |
294 unittest.expect(o.name, unittest.equals('foo')); | 294 unittest.expect(o.name, unittest.equals('foo')); |
295 checkUnnamed3526(o.response); | 295 checkUnnamed3558(o.response); |
296 } | 296 } |
297 buildCounterOperation--; | 297 buildCounterOperation--; |
298 } | 298 } |
299 | 299 |
300 buildUnnamed3527() { | 300 buildUnnamed3559() { |
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 checkUnnamed3527(core.List<api.Binding> o) { | 307 checkUnnamed3559(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 = buildUnnamed3527(); | 318 o.bindings = buildUnnamed3559(); |
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 checkUnnamed3527(o.bindings); | 329 checkUnnamed3559(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 buildUnnamed3528() { | 376 buildUnnamed3560() { |
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 checkUnnamed3528(core.Map<core.String, core.Object> o) { | 383 checkUnnamed3560(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 buildUnnamed3529() { | 389 buildUnnamed3561() { |
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(buildUnnamed3528()); | 391 o.add(buildUnnamed3560()); |
392 o.add(buildUnnamed3528()); | 392 o.add(buildUnnamed3560()); |
393 return o; | 393 return o; |
394 } | 394 } |
395 | 395 |
396 checkUnnamed3529(core.List<core.Map<core.String, core.Object>> o) { | 396 checkUnnamed3561(core.List<core.Map<core.String, core.Object>> o) { |
397 unittest.expect(o, unittest.hasLength(2)); | 397 unittest.expect(o, unittest.hasLength(2)); |
398 checkUnnamed3528(o[0]); | 398 checkUnnamed3560(o[0]); |
399 checkUnnamed3528(o[1]); | 399 checkUnnamed3560(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 = buildUnnamed3529(); | 408 o.details = buildUnnamed3561(); |
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 checkUnnamed3529(o.details); | 419 checkUnnamed3561(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 buildUnnamed3530() { | 425 buildUnnamed3562() { |
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 checkUnnamed3530(core.List<core.String> o) { | 432 checkUnnamed3562(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 = buildUnnamed3530(); | 443 o.permissions = buildUnnamed3562(); |
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 checkUnnamed3530(o.permissions); | 452 checkUnnamed3562(o.permissions); |
453 } | 453 } |
454 buildCounterTestIamPermissionsRequest--; | 454 buildCounterTestIamPermissionsRequest--; |
455 } | 455 } |
456 | 456 |
457 buildUnnamed3531() { | 457 buildUnnamed3563() { |
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 checkUnnamed3531(core.List<core.String> o) { | 464 checkUnnamed3563(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 = buildUnnamed3531(); | 475 o.permissions = buildUnnamed3563(); |
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 checkUnnamed3531(o.permissions); | 484 checkUnnamed3563(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 408 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
903 res.getIamPolicy(arg_resource).then(unittest.expectAsync1(((api.Policy res
ponse) { | 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_pageSize = 42; |
913 var arg_pageToken = "foo"; | 914 var arg_pageToken = "foo"; |
914 var arg_pageSize = 42; | |
915 mock.register(unittest.expectAsync2((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 |
926 var query = (req.url).query; | 926 var query = (req.url).query; |
927 var queryOffset = 0; | 927 var queryOffset = 0; |
928 var queryMap = {}; | 928 var queryMap = {}; |
929 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 929 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
930 parseBool(n) { | 930 parseBool(n) { |
931 if (n == "true") return true; | 931 if (n == "true") return true; |
932 if (n == "false") return false; | 932 if (n == "false") return false; |
933 if (n == null) return null; | 933 if (n == null) return null; |
934 throw new core.ArgumentError("Invalid boolean: $n"); | 934 throw new core.ArgumentError("Invalid boolean: $n"); |
935 } | 935 } |
936 if (query.length > 0) { | 936 if (query.length > 0) { |
937 for (var part in query.split("&")) { | 937 for (var part in query.split("&")) { |
938 var keyvalue = part.split("="); | 938 var keyvalue = part.split("="); |
939 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 939 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
940 } | 940 } |
941 } | 941 } |
| 942 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ
als(arg_pageSize)); |
942 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | 943 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); |
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.expectAsync1(((api.ListConfigsResponse response) { | 952 res.list(arg_parent, pageSize: arg_pageSize, pageToken: arg_pageToken).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"; |
(...skipping 381 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1344 res.get(arg_name).then(unittest.expectAsync1(((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_pageSize = 42; |
1354 var arg_filter = "foo"; | 1355 var arg_filter = "foo"; |
1355 var arg_returnValues = true; | 1356 var arg_returnValues = true; |
1356 var arg_pageToken = "foo"; | 1357 var arg_pageToken = "foo"; |
1357 var arg_pageSize = 42; | |
1358 mock.register(unittest.expectAsync2((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 |
1369 var query = (req.url).query; | 1369 var query = (req.url).query; |
1370 var queryOffset = 0; | 1370 var queryOffset = 0; |
1371 var queryMap = {}; | 1371 var queryMap = {}; |
1372 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 1372 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
1373 parseBool(n) { | 1373 parseBool(n) { |
1374 if (n == "true") return true; | 1374 if (n == "true") return true; |
1375 if (n == "false") return false; | 1375 if (n == "false") return false; |
1376 if (n == null) return null; | 1376 if (n == null) return null; |
1377 throw new core.ArgumentError("Invalid boolean: $n"); | 1377 throw new core.ArgumentError("Invalid boolean: $n"); |
1378 } | 1378 } |
1379 if (query.length > 0) { | 1379 if (query.length > 0) { |
1380 for (var part in query.split("&")) { | 1380 for (var part in query.split("&")) { |
1381 var keyvalue = part.split("="); | 1381 var keyvalue = part.split("="); |
1382 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 1382 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
1383 } | 1383 } |
1384 } | 1384 } |
| 1385 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ
als(arg_pageSize)); |
1385 unittest.expect(queryMap["filter"].first, unittest.equals(arg_filter)); | 1386 unittest.expect(queryMap["filter"].first, unittest.equals(arg_filter)); |
1386 unittest.expect(queryMap["returnValues"].first, unittest.equals("$arg_re
turnValues")); | 1387 unittest.expect(queryMap["returnValues"].first, unittest.equals("$arg_re
turnValues")); |
1387 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | 1388 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); |
1388 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ
als(arg_pageSize)); | |
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, filter: arg_filter, returnValues: arg_returnValues, p
ageToken: arg_pageToken, pageSize: arg_pageSize).then(unittest.expectAsync1(((ap
i.ListVariablesResponse response) { | 1397 res.list(arg_parent, pageSize: arg_pageSize, filter: arg_filter, returnVal
ues: arg_returnValues, pageToken: arg_pageToken).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"; |
(...skipping 379 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1787 res.testIamPermissions(arg_request, arg_resource).then(unittest.expectAsyn
c1(((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 |