Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(91)

Side by Side Diff: generated/googleapis_beta/test/runtimeconfig/v1beta1_test.dart

Issue 2734843002: Api-roll 46: 2017-03-06 (Closed)
Patch Set: Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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 buildUnnamed3871() { 54 buildUnnamed3453() {
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 checkUnnamed3871(core.List<core.String> o) { 61 checkUnnamed3453(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 = buildUnnamed3871(); 72 o.members = buildUnnamed3453();
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 checkUnnamed3871(o.members); 82 checkUnnamed3453(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
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 buildUnnamed3872() { 145 buildUnnamed3454() {
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 checkUnnamed3872(core.List<api.RuntimeConfig> o) { 152 checkUnnamed3454(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 = buildUnnamed3872(); 163 o.configs = buildUnnamed3454();
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 checkUnnamed3872(o.configs); 173 checkUnnamed3454(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 buildUnnamed3873() { 179 buildUnnamed3455() {
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 checkUnnamed3873(core.List<api.Variable> o) { 186 checkUnnamed3455(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 = buildUnnamed3873(); 198 o.variables = buildUnnamed3455();
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 checkUnnamed3873(o.variables); 208 checkUnnamed3455(o.variables);
209 } 209 }
210 buildCounterListVariablesResponse--; 210 buildCounterListVariablesResponse--;
211 } 211 }
212 212
213 buildUnnamed3874() { 213 buildUnnamed3456() {
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 checkUnnamed3874(core.List<api.Waiter> o) { 220 checkUnnamed3456(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 = buildUnnamed3874(); 232 o.waiters = buildUnnamed3456();
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 checkUnnamed3874(o.waiters); 242 checkUnnamed3456(o.waiters);
243 } 243 }
244 buildCounterListWaitersResponse--; 244 buildCounterListWaitersResponse--;
245 } 245 }
246 246
247 buildUnnamed3875() { 247 buildUnnamed3457() {
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 checkUnnamed3875(core.Map<core.String, core.Object> o) { 254 checkUnnamed3457(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 buildUnnamed3876() { 260 buildUnnamed3458() {
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 checkUnnamed3876(core.Map<core.String, core.Object> o) { 267 checkUnnamed3458(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 = buildUnnamed3875(); 280 o.metadata = buildUnnamed3457();
281 o.name = "foo"; 281 o.name = "foo";
282 o.response = buildUnnamed3876(); 282 o.response = buildUnnamed3458();
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 checkUnnamed3875(o.metadata); 293 checkUnnamed3457(o.metadata);
294 unittest.expect(o.name, unittest.equals('foo')); 294 unittest.expect(o.name, unittest.equals('foo'));
295 checkUnnamed3876(o.response); 295 checkUnnamed3458(o.response);
296 } 296 }
297 buildCounterOperation--; 297 buildCounterOperation--;
298 } 298 }
299 299
300 buildUnnamed3877() { 300 buildUnnamed3459() {
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 checkUnnamed3877(core.List<api.Binding> o) { 307 checkUnnamed3459(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 = buildUnnamed3877(); 318 o.bindings = buildUnnamed3459();
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 checkUnnamed3877(o.bindings); 329 checkUnnamed3459(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
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 buildUnnamed3878() { 376 buildUnnamed3460() {
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 checkUnnamed3878(core.Map<core.String, core.Object> o) { 383 checkUnnamed3460(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 buildUnnamed3879() { 389 buildUnnamed3461() {
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(buildUnnamed3878()); 391 o.add(buildUnnamed3460());
392 o.add(buildUnnamed3878()); 392 o.add(buildUnnamed3460());
393 return o; 393 return o;
394 } 394 }
395 395
396 checkUnnamed3879(core.List<core.Map<core.String, core.Object>> o) { 396 checkUnnamed3461(core.List<core.Map<core.String, core.Object>> o) {
397 unittest.expect(o, unittest.hasLength(2)); 397 unittest.expect(o, unittest.hasLength(2));
398 checkUnnamed3878(o[0]); 398 checkUnnamed3460(o[0]);
399 checkUnnamed3878(o[1]); 399 checkUnnamed3460(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 = buildUnnamed3879(); 408 o.details = buildUnnamed3461();
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 checkUnnamed3879(o.details); 419 checkUnnamed3461(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 buildUnnamed3880() { 425 buildUnnamed3462() {
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 checkUnnamed3880(core.List<core.String> o) { 432 checkUnnamed3462(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 = buildUnnamed3880(); 443 o.permissions = buildUnnamed3462();
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 checkUnnamed3880(o.permissions); 452 checkUnnamed3462(o.permissions);
453 } 453 }
454 buildCounterTestIamPermissionsRequest--; 454 buildCounterTestIamPermissionsRequest--;
455 } 455 }
456 456
457 buildUnnamed3881() { 457 buildUnnamed3463() {
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 checkUnnamed3881(core.List<core.String> o) { 464 checkUnnamed3463(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 = buildUnnamed3881(); 475 o.permissions = buildUnnamed3463();
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 checkUnnamed3881(o.permissions); 484 checkUnnamed3463(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
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 buildUnnamed3882() { 566 buildUnnamed3464() {
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 checkUnnamed3882(core.List<core.String> o) { 573 checkUnnamed3464(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 buildUnnamed3883() { 579 buildUnnamed3465() {
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 checkUnnamed3883(core.List<core.String> o) { 586 checkUnnamed3465(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 buildUnnamed3884() { 592 buildUnnamed3466() {
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 checkUnnamed3884(core.List<core.String> o) { 599 checkUnnamed3466(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 577 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 = buildUnnamed3882(); 1197 var arg_permissions = buildUnnamed3464();
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
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";
1392 var arg_pageSize = 42; 1391 var arg_pageSize = 42;
1393 var arg_filter = "foo"; 1392 var arg_filter = "foo";
1393 var arg_pageToken = "foo";
1394 var arg_returnValues = true;
1394 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 1395 mock.register(unittest.expectAsync((http.BaseRequest req, json) {
1395 var path = (req.url).path; 1396 var path = (req.url).path;
1396 var pathOffset = 0; 1397 var pathOffset = 0;
1397 var index; 1398 var index;
1398 var subPart; 1399 var subPart;
1399 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 1400 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
1400 pathOffset += 1; 1401 pathOffset += 1;
1401 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ als("v1beta1/")); 1402 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ als("v1beta1/"));
1402 pathOffset += 8; 1403 pathOffset += 8;
1403 // NOTE: We cannot test reserved expansions due to the inability to reve rse the operation; 1404 // NOTE: We cannot test reserved expansions due to the inability to reve rse the operation;
1404 1405
1405 var query = (req.url).query; 1406 var query = (req.url).query;
1406 var queryOffset = 0; 1407 var queryOffset = 0;
1407 var queryMap = {}; 1408 var queryMap = {};
1408 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); 1409 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
1409 parseBool(n) { 1410 parseBool(n) {
1410 if (n == "true") return true; 1411 if (n == "true") return true;
1411 if (n == "false") return false; 1412 if (n == "false") return false;
1412 if (n == null) return null; 1413 if (n == null) return null;
1413 throw new core.ArgumentError("Invalid boolean: $n"); 1414 throw new core.ArgumentError("Invalid boolean: $n");
1414 } 1415 }
1415 if (query.length > 0) { 1416 if (query.length > 0) {
1416 for (var part in query.split("&")) { 1417 for (var part in query.split("&")) {
1417 var keyvalue = part.split("="); 1418 var keyvalue = part.split("=");
1418 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1])); 1419 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1]));
1419 } 1420 }
1420 } 1421 }
1421 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok en));
1422 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));
1423 unittest.expect(queryMap["filter"].first, unittest.equals(arg_filter)); 1423 unittest.expect(queryMap["filter"].first, unittest.equals(arg_filter));
1424 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok en));
1425 unittest.expect(queryMap["returnValues"].first, unittest.equals("$arg_re turnValues"));
1424 1426
1425 1427
1426 var h = { 1428 var h = {
1427 "content-type" : "application/json; charset=utf-8", 1429 "content-type" : "application/json; charset=utf-8",
1428 }; 1430 };
1429 var resp = convert.JSON.encode(buildListVariablesResponse()); 1431 var resp = convert.JSON.encode(buildListVariablesResponse());
1430 return new async.Future.value(stringResponse(200, h, resp)); 1432 return new async.Future.value(stringResponse(200, h, resp));
1431 }), true); 1433 }), true);
1432 res.list(arg_parent, pageToken: arg_pageToken, pageSize: arg_pageSize, fil ter: arg_filter).then(unittest.expectAsync(((api.ListVariablesResponse response) { 1434 res.list(arg_parent, pageSize: arg_pageSize, filter: arg_filter, pageToken : arg_pageToken, returnValues: arg_returnValues).then(unittest.expectAsync(((api .ListVariablesResponse response) {
1433 checkListVariablesResponse(response); 1435 checkListVariablesResponse(response);
1434 }))); 1436 })));
1435 }); 1437 });
1436 1438
1437 unittest.test("method--testIamPermissions", () { 1439 unittest.test("method--testIamPermissions", () {
1438 1440
1439 var mock = new HttpServerMock(); 1441 var mock = new HttpServerMock();
1440 api.ProjectsConfigsVariablesResourceApi res = new api.RuntimeconfigApi(moc k).projects.configs.variables; 1442 api.ProjectsConfigsVariablesResourceApi res = new api.RuntimeconfigApi(moc k).projects.configs.variables;
1441 var arg_resource = "foo"; 1443 var arg_resource = "foo";
1442 var arg_permissions = buildUnnamed3883(); 1444 var arg_permissions = buildUnnamed3465();
1443 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 1445 mock.register(unittest.expectAsync((http.BaseRequest req, json) {
1444 var path = (req.url).path; 1446 var path = (req.url).path;
1445 var pathOffset = 0; 1447 var pathOffset = 0;
1446 var index; 1448 var index;
1447 var subPart; 1449 var subPart;
1448 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 1450 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
1449 pathOffset += 1; 1451 pathOffset += 1;
1450 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ als("v1beta1/")); 1452 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ als("v1beta1/"));
1451 pathOffset += 8; 1453 pathOffset += 8;
1452 // NOTE: We cannot test reserved expansions due to the inability to reve rse the operation; 1454 // NOTE: We cannot test reserved expansions due to the inability to reve rse the operation;
(...skipping 318 matching lines...) Expand 10 before | Expand all | Expand 10 after
1771 res.list(arg_parent, pageToken: arg_pageToken, pageSize: arg_pageSize).the n(unittest.expectAsync(((api.ListWaitersResponse response) { 1773 res.list(arg_parent, pageToken: arg_pageToken, pageSize: arg_pageSize).the n(unittest.expectAsync(((api.ListWaitersResponse response) {
1772 checkListWaitersResponse(response); 1774 checkListWaitersResponse(response);
1773 }))); 1775 })));
1774 }); 1776 });
1775 1777
1776 unittest.test("method--testIamPermissions", () { 1778 unittest.test("method--testIamPermissions", () {
1777 1779
1778 var mock = new HttpServerMock(); 1780 var mock = new HttpServerMock();
1779 api.ProjectsConfigsWaitersResourceApi res = new api.RuntimeconfigApi(mock) .projects.configs.waiters; 1781 api.ProjectsConfigsWaitersResourceApi res = new api.RuntimeconfigApi(mock) .projects.configs.waiters;
1780 var arg_resource = "foo"; 1782 var arg_resource = "foo";
1781 var arg_permissions = buildUnnamed3884(); 1783 var arg_permissions = buildUnnamed3466();
1782 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 1784 mock.register(unittest.expectAsync((http.BaseRequest req, json) {
1783 var path = (req.url).path; 1785 var path = (req.url).path;
1784 var pathOffset = 0; 1786 var pathOffset = 0;
1785 var index; 1787 var index;
1786 var subPart; 1788 var subPart;
1787 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 1789 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
1788 pathOffset += 1; 1790 pathOffset += 1;
1789 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ als("v1beta1/")); 1791 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ als("v1beta1/"));
1790 pathOffset += 8; 1792 pathOffset += 8;
1791 // NOTE: We cannot test reserved expansions due to the inability to reve rse the operation; 1793 // NOTE: We cannot test reserved expansions due to the inability to reve rse the operation;
(...skipping 26 matching lines...) Expand all
1818 res.testIamPermissions(arg_resource, permissions: arg_permissions).then(un ittest.expectAsync(((api.TestIamPermissionsResponse response) { 1820 res.testIamPermissions(arg_resource, permissions: arg_permissions).then(un ittest.expectAsync(((api.TestIamPermissionsResponse response) {
1819 checkTestIamPermissionsResponse(response); 1821 checkTestIamPermissionsResponse(response);
1820 }))); 1822 })));
1821 }); 1823 });
1822 1824
1823 }); 1825 });
1824 1826
1825 1827
1826 } 1828 }
1827 1829
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698