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

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

Issue 2936613002: Api-Roll 50: 2017-06-12 (Closed)
Patch Set: Created 3 years, 6 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.replicapoolupdater.v1beta1.test; 1 library googleapis_beta.replicapoolupdater.v1beta1.test;
2 2
3 import "dart:core" as core; 3 import "dart:core" as core;
4 import "dart:collection" as collection; 4 import "dart:collection" as collection;
5 import "dart:async" as async; 5 import "dart:async" as async;
6 import "dart:convert" as convert; 6 import "dart:convert" as convert;
7 7
8 import 'package:http/http.dart' as http; 8 import 'package:http/http.dart' as http;
9 import 'package:http/testing.dart' as http_testing; 9 import 'package:http/testing.dart' as http_testing;
10 import 'package:unittest/unittest.dart' as unittest; 10 import 'package:test/test.dart' as unittest;
11 11
12 import 'package:googleapis_beta/replicapoolupdater/v1beta1.dart' as api; 12 import 'package:googleapis_beta/replicapoolupdater/v1beta1.dart' as api;
13 13
14 class HttpServerMock extends http.BaseClient { 14 class HttpServerMock extends http.BaseClient {
15 core.Function _callback; 15 core.Function _callback;
16 core.bool _expectJson; 16 core.bool _expectJson;
17 17
18 void register(core.Function callback, core.bool expectJson) { 18 void register(core.Function callback, core.bool expectJson) {
19 _callback = callback; 19 _callback = callback;
20 _expectJson = expectJson; 20 _expectJson = expectJson;
(...skipping 18 matching lines...) Expand all
39 } else { 39 } else {
40 return stream.toBytes().then((data) { 40 return stream.toBytes().then((data) {
41 return _callback(request, data); 41 return _callback(request, data);
42 }); 42 });
43 } 43 }
44 } 44 }
45 } 45 }
46 } 46 }
47 47
48 http.StreamedResponse stringResponse( 48 http.StreamedResponse stringResponse(
49 core.int status, core.Map headers, core.String body) { 49 core.int status, core.Map<core.String, core.String> headers, core.String bod y) {
50 var stream = new async.Stream.fromIterable([convert.UTF8.encode(body)]); 50 var stream = new async.Stream.fromIterable([convert.UTF8.encode(body)]);
51 return new http.StreamedResponse(stream, status, headers: headers); 51 return new http.StreamedResponse(stream, status, headers: headers);
52 } 52 }
53 53
54 core.int buildCounterInstanceUpdateErrorErrors = 0; 54 core.int buildCounterInstanceUpdateErrorErrors = 0;
55 buildInstanceUpdateErrorErrors() { 55 buildInstanceUpdateErrorErrors() {
56 var o = new api.InstanceUpdateErrorErrors(); 56 var o = new api.InstanceUpdateErrorErrors();
57 buildCounterInstanceUpdateErrorErrors++; 57 buildCounterInstanceUpdateErrorErrors++;
58 if (buildCounterInstanceUpdateErrorErrors < 3) { 58 if (buildCounterInstanceUpdateErrorErrors < 3) {
59 o.code = "foo"; 59 o.code = "foo";
60 o.location = "foo"; 60 o.location = "foo";
61 o.message = "foo"; 61 o.message = "foo";
62 } 62 }
63 buildCounterInstanceUpdateErrorErrors--; 63 buildCounterInstanceUpdateErrorErrors--;
64 return o; 64 return o;
65 } 65 }
66 66
67 checkInstanceUpdateErrorErrors(api.InstanceUpdateErrorErrors o) { 67 checkInstanceUpdateErrorErrors(api.InstanceUpdateErrorErrors o) {
68 buildCounterInstanceUpdateErrorErrors++; 68 buildCounterInstanceUpdateErrorErrors++;
69 if (buildCounterInstanceUpdateErrorErrors < 3) { 69 if (buildCounterInstanceUpdateErrorErrors < 3) {
70 unittest.expect(o.code, unittest.equals('foo')); 70 unittest.expect(o.code, unittest.equals('foo'));
71 unittest.expect(o.location, unittest.equals('foo')); 71 unittest.expect(o.location, unittest.equals('foo'));
72 unittest.expect(o.message, unittest.equals('foo')); 72 unittest.expect(o.message, unittest.equals('foo'));
73 } 73 }
74 buildCounterInstanceUpdateErrorErrors--; 74 buildCounterInstanceUpdateErrorErrors--;
75 } 75 }
76 76
77 buildUnnamed3680() { 77 buildUnnamed3154() {
78 var o = new core.List<api.InstanceUpdateErrorErrors>(); 78 var o = new core.List<api.InstanceUpdateErrorErrors>();
79 o.add(buildInstanceUpdateErrorErrors()); 79 o.add(buildInstanceUpdateErrorErrors());
80 o.add(buildInstanceUpdateErrorErrors()); 80 o.add(buildInstanceUpdateErrorErrors());
81 return o; 81 return o;
82 } 82 }
83 83
84 checkUnnamed3680(core.List<api.InstanceUpdateErrorErrors> o) { 84 checkUnnamed3154(core.List<api.InstanceUpdateErrorErrors> o) {
85 unittest.expect(o, unittest.hasLength(2)); 85 unittest.expect(o, unittest.hasLength(2));
86 checkInstanceUpdateErrorErrors(o[0]); 86 checkInstanceUpdateErrorErrors(o[0]);
87 checkInstanceUpdateErrorErrors(o[1]); 87 checkInstanceUpdateErrorErrors(o[1]);
88 } 88 }
89 89
90 core.int buildCounterInstanceUpdateError = 0; 90 core.int buildCounterInstanceUpdateError = 0;
91 buildInstanceUpdateError() { 91 buildInstanceUpdateError() {
92 var o = new api.InstanceUpdateError(); 92 var o = new api.InstanceUpdateError();
93 buildCounterInstanceUpdateError++; 93 buildCounterInstanceUpdateError++;
94 if (buildCounterInstanceUpdateError < 3) { 94 if (buildCounterInstanceUpdateError < 3) {
95 o.errors = buildUnnamed3680(); 95 o.errors = buildUnnamed3154();
96 } 96 }
97 buildCounterInstanceUpdateError--; 97 buildCounterInstanceUpdateError--;
98 return o; 98 return o;
99 } 99 }
100 100
101 checkInstanceUpdateError(api.InstanceUpdateError o) { 101 checkInstanceUpdateError(api.InstanceUpdateError o) {
102 buildCounterInstanceUpdateError++; 102 buildCounterInstanceUpdateError++;
103 if (buildCounterInstanceUpdateError < 3) { 103 if (buildCounterInstanceUpdateError < 3) {
104 checkUnnamed3680(o.errors); 104 checkUnnamed3154(o.errors);
105 } 105 }
106 buildCounterInstanceUpdateError--; 106 buildCounterInstanceUpdateError--;
107 } 107 }
108 108
109 core.int buildCounterInstanceUpdate = 0; 109 core.int buildCounterInstanceUpdate = 0;
110 buildInstanceUpdate() { 110 buildInstanceUpdate() {
111 var o = new api.InstanceUpdate(); 111 var o = new api.InstanceUpdate();
112 buildCounterInstanceUpdate++; 112 buildCounterInstanceUpdate++;
113 if (buildCounterInstanceUpdate < 3) { 113 if (buildCounterInstanceUpdate < 3) {
114 o.error = buildInstanceUpdateError(); 114 o.error = buildInstanceUpdateError();
115 o.instance = "foo"; 115 o.instance = "foo";
116 o.status = "foo"; 116 o.status = "foo";
117 } 117 }
118 buildCounterInstanceUpdate--; 118 buildCounterInstanceUpdate--;
119 return o; 119 return o;
120 } 120 }
121 121
122 checkInstanceUpdate(api.InstanceUpdate o) { 122 checkInstanceUpdate(api.InstanceUpdate o) {
123 buildCounterInstanceUpdate++; 123 buildCounterInstanceUpdate++;
124 if (buildCounterInstanceUpdate < 3) { 124 if (buildCounterInstanceUpdate < 3) {
125 checkInstanceUpdateError(o.error); 125 checkInstanceUpdateError(o.error);
126 unittest.expect(o.instance, unittest.equals('foo')); 126 unittest.expect(o.instance, unittest.equals('foo'));
127 unittest.expect(o.status, unittest.equals('foo')); 127 unittest.expect(o.status, unittest.equals('foo'));
128 } 128 }
129 buildCounterInstanceUpdate--; 129 buildCounterInstanceUpdate--;
130 } 130 }
131 131
132 buildUnnamed3681() { 132 buildUnnamed3155() {
133 var o = new core.List<api.InstanceUpdate>(); 133 var o = new core.List<api.InstanceUpdate>();
134 o.add(buildInstanceUpdate()); 134 o.add(buildInstanceUpdate());
135 o.add(buildInstanceUpdate()); 135 o.add(buildInstanceUpdate());
136 return o; 136 return o;
137 } 137 }
138 138
139 checkUnnamed3681(core.List<api.InstanceUpdate> o) { 139 checkUnnamed3155(core.List<api.InstanceUpdate> o) {
140 unittest.expect(o, unittest.hasLength(2)); 140 unittest.expect(o, unittest.hasLength(2));
141 checkInstanceUpdate(o[0]); 141 checkInstanceUpdate(o[0]);
142 checkInstanceUpdate(o[1]); 142 checkInstanceUpdate(o[1]);
143 } 143 }
144 144
145 core.int buildCounterInstanceUpdateList = 0; 145 core.int buildCounterInstanceUpdateList = 0;
146 buildInstanceUpdateList() { 146 buildInstanceUpdateList() {
147 var o = new api.InstanceUpdateList(); 147 var o = new api.InstanceUpdateList();
148 buildCounterInstanceUpdateList++; 148 buildCounterInstanceUpdateList++;
149 if (buildCounterInstanceUpdateList < 3) { 149 if (buildCounterInstanceUpdateList < 3) {
150 o.items = buildUnnamed3681(); 150 o.items = buildUnnamed3155();
151 o.kind = "foo"; 151 o.kind = "foo";
152 o.nextPageToken = "foo"; 152 o.nextPageToken = "foo";
153 o.selfLink = "foo"; 153 o.selfLink = "foo";
154 } 154 }
155 buildCounterInstanceUpdateList--; 155 buildCounterInstanceUpdateList--;
156 return o; 156 return o;
157 } 157 }
158 158
159 checkInstanceUpdateList(api.InstanceUpdateList o) { 159 checkInstanceUpdateList(api.InstanceUpdateList o) {
160 buildCounterInstanceUpdateList++; 160 buildCounterInstanceUpdateList++;
161 if (buildCounterInstanceUpdateList < 3) { 161 if (buildCounterInstanceUpdateList < 3) {
162 checkUnnamed3681(o.items); 162 checkUnnamed3155(o.items);
163 unittest.expect(o.kind, unittest.equals('foo')); 163 unittest.expect(o.kind, unittest.equals('foo'));
164 unittest.expect(o.nextPageToken, unittest.equals('foo')); 164 unittest.expect(o.nextPageToken, unittest.equals('foo'));
165 unittest.expect(o.selfLink, unittest.equals('foo')); 165 unittest.expect(o.selfLink, unittest.equals('foo'));
166 } 166 }
167 buildCounterInstanceUpdateList--; 167 buildCounterInstanceUpdateList--;
168 } 168 }
169 169
170 core.int buildCounterOperationErrorErrors = 0; 170 core.int buildCounterOperationErrorErrors = 0;
171 buildOperationErrorErrors() { 171 buildOperationErrorErrors() {
172 var o = new api.OperationErrorErrors(); 172 var o = new api.OperationErrorErrors();
(...skipping 10 matching lines...) Expand all
183 checkOperationErrorErrors(api.OperationErrorErrors o) { 183 checkOperationErrorErrors(api.OperationErrorErrors o) {
184 buildCounterOperationErrorErrors++; 184 buildCounterOperationErrorErrors++;
185 if (buildCounterOperationErrorErrors < 3) { 185 if (buildCounterOperationErrorErrors < 3) {
186 unittest.expect(o.code, unittest.equals('foo')); 186 unittest.expect(o.code, unittest.equals('foo'));
187 unittest.expect(o.location, unittest.equals('foo')); 187 unittest.expect(o.location, unittest.equals('foo'));
188 unittest.expect(o.message, unittest.equals('foo')); 188 unittest.expect(o.message, unittest.equals('foo'));
189 } 189 }
190 buildCounterOperationErrorErrors--; 190 buildCounterOperationErrorErrors--;
191 } 191 }
192 192
193 buildUnnamed3682() { 193 buildUnnamed3156() {
194 var o = new core.List<api.OperationErrorErrors>(); 194 var o = new core.List<api.OperationErrorErrors>();
195 o.add(buildOperationErrorErrors()); 195 o.add(buildOperationErrorErrors());
196 o.add(buildOperationErrorErrors()); 196 o.add(buildOperationErrorErrors());
197 return o; 197 return o;
198 } 198 }
199 199
200 checkUnnamed3682(core.List<api.OperationErrorErrors> o) { 200 checkUnnamed3156(core.List<api.OperationErrorErrors> o) {
201 unittest.expect(o, unittest.hasLength(2)); 201 unittest.expect(o, unittest.hasLength(2));
202 checkOperationErrorErrors(o[0]); 202 checkOperationErrorErrors(o[0]);
203 checkOperationErrorErrors(o[1]); 203 checkOperationErrorErrors(o[1]);
204 } 204 }
205 205
206 core.int buildCounterOperationError = 0; 206 core.int buildCounterOperationError = 0;
207 buildOperationError() { 207 buildOperationError() {
208 var o = new api.OperationError(); 208 var o = new api.OperationError();
209 buildCounterOperationError++; 209 buildCounterOperationError++;
210 if (buildCounterOperationError < 3) { 210 if (buildCounterOperationError < 3) {
211 o.errors = buildUnnamed3682(); 211 o.errors = buildUnnamed3156();
212 } 212 }
213 buildCounterOperationError--; 213 buildCounterOperationError--;
214 return o; 214 return o;
215 } 215 }
216 216
217 checkOperationError(api.OperationError o) { 217 checkOperationError(api.OperationError o) {
218 buildCounterOperationError++; 218 buildCounterOperationError++;
219 if (buildCounterOperationError < 3) { 219 if (buildCounterOperationError < 3) {
220 checkUnnamed3682(o.errors); 220 checkUnnamed3156(o.errors);
221 } 221 }
222 buildCounterOperationError--; 222 buildCounterOperationError--;
223 } 223 }
224 224
225 core.int buildCounterOperationWarningsData = 0; 225 core.int buildCounterOperationWarningsData = 0;
226 buildOperationWarningsData() { 226 buildOperationWarningsData() {
227 var o = new api.OperationWarningsData(); 227 var o = new api.OperationWarningsData();
228 buildCounterOperationWarningsData++; 228 buildCounterOperationWarningsData++;
229 if (buildCounterOperationWarningsData < 3) { 229 if (buildCounterOperationWarningsData < 3) {
230 o.key = "foo"; 230 o.key = "foo";
231 o.value = "foo"; 231 o.value = "foo";
232 } 232 }
233 buildCounterOperationWarningsData--; 233 buildCounterOperationWarningsData--;
234 return o; 234 return o;
235 } 235 }
236 236
237 checkOperationWarningsData(api.OperationWarningsData o) { 237 checkOperationWarningsData(api.OperationWarningsData o) {
238 buildCounterOperationWarningsData++; 238 buildCounterOperationWarningsData++;
239 if (buildCounterOperationWarningsData < 3) { 239 if (buildCounterOperationWarningsData < 3) {
240 unittest.expect(o.key, unittest.equals('foo')); 240 unittest.expect(o.key, unittest.equals('foo'));
241 unittest.expect(o.value, unittest.equals('foo')); 241 unittest.expect(o.value, unittest.equals('foo'));
242 } 242 }
243 buildCounterOperationWarningsData--; 243 buildCounterOperationWarningsData--;
244 } 244 }
245 245
246 buildUnnamed3683() { 246 buildUnnamed3157() {
247 var o = new core.List<api.OperationWarningsData>(); 247 var o = new core.List<api.OperationWarningsData>();
248 o.add(buildOperationWarningsData()); 248 o.add(buildOperationWarningsData());
249 o.add(buildOperationWarningsData()); 249 o.add(buildOperationWarningsData());
250 return o; 250 return o;
251 } 251 }
252 252
253 checkUnnamed3683(core.List<api.OperationWarningsData> o) { 253 checkUnnamed3157(core.List<api.OperationWarningsData> o) {
254 unittest.expect(o, unittest.hasLength(2)); 254 unittest.expect(o, unittest.hasLength(2));
255 checkOperationWarningsData(o[0]); 255 checkOperationWarningsData(o[0]);
256 checkOperationWarningsData(o[1]); 256 checkOperationWarningsData(o[1]);
257 } 257 }
258 258
259 core.int buildCounterOperationWarnings = 0; 259 core.int buildCounterOperationWarnings = 0;
260 buildOperationWarnings() { 260 buildOperationWarnings() {
261 var o = new api.OperationWarnings(); 261 var o = new api.OperationWarnings();
262 buildCounterOperationWarnings++; 262 buildCounterOperationWarnings++;
263 if (buildCounterOperationWarnings < 3) { 263 if (buildCounterOperationWarnings < 3) {
264 o.code = "foo"; 264 o.code = "foo";
265 o.data = buildUnnamed3683(); 265 o.data = buildUnnamed3157();
266 o.message = "foo"; 266 o.message = "foo";
267 } 267 }
268 buildCounterOperationWarnings--; 268 buildCounterOperationWarnings--;
269 return o; 269 return o;
270 } 270 }
271 271
272 checkOperationWarnings(api.OperationWarnings o) { 272 checkOperationWarnings(api.OperationWarnings o) {
273 buildCounterOperationWarnings++; 273 buildCounterOperationWarnings++;
274 if (buildCounterOperationWarnings < 3) { 274 if (buildCounterOperationWarnings < 3) {
275 unittest.expect(o.code, unittest.equals('foo')); 275 unittest.expect(o.code, unittest.equals('foo'));
276 checkUnnamed3683(o.data); 276 checkUnnamed3157(o.data);
277 unittest.expect(o.message, unittest.equals('foo')); 277 unittest.expect(o.message, unittest.equals('foo'));
278 } 278 }
279 buildCounterOperationWarnings--; 279 buildCounterOperationWarnings--;
280 } 280 }
281 281
282 buildUnnamed3684() { 282 buildUnnamed3158() {
283 var o = new core.List<api.OperationWarnings>(); 283 var o = new core.List<api.OperationWarnings>();
284 o.add(buildOperationWarnings()); 284 o.add(buildOperationWarnings());
285 o.add(buildOperationWarnings()); 285 o.add(buildOperationWarnings());
286 return o; 286 return o;
287 } 287 }
288 288
289 checkUnnamed3684(core.List<api.OperationWarnings> o) { 289 checkUnnamed3158(core.List<api.OperationWarnings> o) {
290 unittest.expect(o, unittest.hasLength(2)); 290 unittest.expect(o, unittest.hasLength(2));
291 checkOperationWarnings(o[0]); 291 checkOperationWarnings(o[0]);
292 checkOperationWarnings(o[1]); 292 checkOperationWarnings(o[1]);
293 } 293 }
294 294
295 core.int buildCounterOperation = 0; 295 core.int buildCounterOperation = 0;
296 buildOperation() { 296 buildOperation() {
297 var o = new api.Operation(); 297 var o = new api.Operation();
298 buildCounterOperation++; 298 buildCounterOperation++;
299 if (buildCounterOperation < 3) { 299 if (buildCounterOperation < 3) {
(...skipping 10 matching lines...) Expand all
310 o.operationType = "foo"; 310 o.operationType = "foo";
311 o.progress = 42; 311 o.progress = 42;
312 o.region = "foo"; 312 o.region = "foo";
313 o.selfLink = "foo"; 313 o.selfLink = "foo";
314 o.startTime = "foo"; 314 o.startTime = "foo";
315 o.status = "foo"; 315 o.status = "foo";
316 o.statusMessage = "foo"; 316 o.statusMessage = "foo";
317 o.targetId = "foo"; 317 o.targetId = "foo";
318 o.targetLink = "foo"; 318 o.targetLink = "foo";
319 o.user = "foo"; 319 o.user = "foo";
320 o.warnings = buildUnnamed3684(); 320 o.warnings = buildUnnamed3158();
321 o.zone = "foo"; 321 o.zone = "foo";
322 } 322 }
323 buildCounterOperation--; 323 buildCounterOperation--;
324 return o; 324 return o;
325 } 325 }
326 326
327 checkOperation(api.Operation o) { 327 checkOperation(api.Operation o) {
328 buildCounterOperation++; 328 buildCounterOperation++;
329 if (buildCounterOperation < 3) { 329 if (buildCounterOperation < 3) {
330 unittest.expect(o.clientOperationId, unittest.equals('foo')); 330 unittest.expect(o.clientOperationId, unittest.equals('foo'));
331 unittest.expect(o.creationTimestamp, unittest.equals('foo')); 331 unittest.expect(o.creationTimestamp, unittest.equals('foo'));
332 unittest.expect(o.endTime, unittest.equals('foo')); 332 unittest.expect(o.endTime, unittest.equals('foo'));
333 checkOperationError(o.error); 333 checkOperationError(o.error);
334 unittest.expect(o.httpErrorMessage, unittest.equals('foo')); 334 unittest.expect(o.httpErrorMessage, unittest.equals('foo'));
335 unittest.expect(o.httpErrorStatusCode, unittest.equals(42)); 335 unittest.expect(o.httpErrorStatusCode, unittest.equals(42));
336 unittest.expect(o.id, unittest.equals('foo')); 336 unittest.expect(o.id, unittest.equals('foo'));
337 unittest.expect(o.insertTime, unittest.equals('foo')); 337 unittest.expect(o.insertTime, unittest.equals('foo'));
338 unittest.expect(o.kind, unittest.equals('foo')); 338 unittest.expect(o.kind, unittest.equals('foo'));
339 unittest.expect(o.name, unittest.equals('foo')); 339 unittest.expect(o.name, unittest.equals('foo'));
340 unittest.expect(o.operationType, unittest.equals('foo')); 340 unittest.expect(o.operationType, unittest.equals('foo'));
341 unittest.expect(o.progress, unittest.equals(42)); 341 unittest.expect(o.progress, unittest.equals(42));
342 unittest.expect(o.region, unittest.equals('foo')); 342 unittest.expect(o.region, unittest.equals('foo'));
343 unittest.expect(o.selfLink, unittest.equals('foo')); 343 unittest.expect(o.selfLink, unittest.equals('foo'));
344 unittest.expect(o.startTime, unittest.equals('foo')); 344 unittest.expect(o.startTime, unittest.equals('foo'));
345 unittest.expect(o.status, unittest.equals('foo')); 345 unittest.expect(o.status, unittest.equals('foo'));
346 unittest.expect(o.statusMessage, unittest.equals('foo')); 346 unittest.expect(o.statusMessage, unittest.equals('foo'));
347 unittest.expect(o.targetId, unittest.equals('foo')); 347 unittest.expect(o.targetId, unittest.equals('foo'));
348 unittest.expect(o.targetLink, unittest.equals('foo')); 348 unittest.expect(o.targetLink, unittest.equals('foo'));
349 unittest.expect(o.user, unittest.equals('foo')); 349 unittest.expect(o.user, unittest.equals('foo'));
350 checkUnnamed3684(o.warnings); 350 checkUnnamed3158(o.warnings);
351 unittest.expect(o.zone, unittest.equals('foo')); 351 unittest.expect(o.zone, unittest.equals('foo'));
352 } 352 }
353 buildCounterOperation--; 353 buildCounterOperation--;
354 } 354 }
355 355
356 buildUnnamed3685() { 356 buildUnnamed3159() {
357 var o = new core.List<api.Operation>(); 357 var o = new core.List<api.Operation>();
358 o.add(buildOperation()); 358 o.add(buildOperation());
359 o.add(buildOperation()); 359 o.add(buildOperation());
360 return o; 360 return o;
361 } 361 }
362 362
363 checkUnnamed3685(core.List<api.Operation> o) { 363 checkUnnamed3159(core.List<api.Operation> o) {
364 unittest.expect(o, unittest.hasLength(2)); 364 unittest.expect(o, unittest.hasLength(2));
365 checkOperation(o[0]); 365 checkOperation(o[0]);
366 checkOperation(o[1]); 366 checkOperation(o[1]);
367 } 367 }
368 368
369 core.int buildCounterOperationList = 0; 369 core.int buildCounterOperationList = 0;
370 buildOperationList() { 370 buildOperationList() {
371 var o = new api.OperationList(); 371 var o = new api.OperationList();
372 buildCounterOperationList++; 372 buildCounterOperationList++;
373 if (buildCounterOperationList < 3) { 373 if (buildCounterOperationList < 3) {
374 o.id = "foo"; 374 o.id = "foo";
375 o.items = buildUnnamed3685(); 375 o.items = buildUnnamed3159();
376 o.kind = "foo"; 376 o.kind = "foo";
377 o.nextPageToken = "foo"; 377 o.nextPageToken = "foo";
378 o.selfLink = "foo"; 378 o.selfLink = "foo";
379 } 379 }
380 buildCounterOperationList--; 380 buildCounterOperationList--;
381 return o; 381 return o;
382 } 382 }
383 383
384 checkOperationList(api.OperationList o) { 384 checkOperationList(api.OperationList o) {
385 buildCounterOperationList++; 385 buildCounterOperationList++;
386 if (buildCounterOperationList < 3) { 386 if (buildCounterOperationList < 3) {
387 unittest.expect(o.id, unittest.equals('foo')); 387 unittest.expect(o.id, unittest.equals('foo'));
388 checkUnnamed3685(o.items); 388 checkUnnamed3159(o.items);
389 unittest.expect(o.kind, unittest.equals('foo')); 389 unittest.expect(o.kind, unittest.equals('foo'));
390 unittest.expect(o.nextPageToken, unittest.equals('foo')); 390 unittest.expect(o.nextPageToken, unittest.equals('foo'));
391 unittest.expect(o.selfLink, unittest.equals('foo')); 391 unittest.expect(o.selfLink, unittest.equals('foo'));
392 } 392 }
393 buildCounterOperationList--; 393 buildCounterOperationList--;
394 } 394 }
395 395
396 core.int buildCounterRollingUpdateErrorErrors = 0; 396 core.int buildCounterRollingUpdateErrorErrors = 0;
397 buildRollingUpdateErrorErrors() { 397 buildRollingUpdateErrorErrors() {
398 var o = new api.RollingUpdateErrorErrors(); 398 var o = new api.RollingUpdateErrorErrors();
(...skipping 10 matching lines...) Expand all
409 checkRollingUpdateErrorErrors(api.RollingUpdateErrorErrors o) { 409 checkRollingUpdateErrorErrors(api.RollingUpdateErrorErrors o) {
410 buildCounterRollingUpdateErrorErrors++; 410 buildCounterRollingUpdateErrorErrors++;
411 if (buildCounterRollingUpdateErrorErrors < 3) { 411 if (buildCounterRollingUpdateErrorErrors < 3) {
412 unittest.expect(o.code, unittest.equals('foo')); 412 unittest.expect(o.code, unittest.equals('foo'));
413 unittest.expect(o.location, unittest.equals('foo')); 413 unittest.expect(o.location, unittest.equals('foo'));
414 unittest.expect(o.message, unittest.equals('foo')); 414 unittest.expect(o.message, unittest.equals('foo'));
415 } 415 }
416 buildCounterRollingUpdateErrorErrors--; 416 buildCounterRollingUpdateErrorErrors--;
417 } 417 }
418 418
419 buildUnnamed3686() { 419 buildUnnamed3160() {
420 var o = new core.List<api.RollingUpdateErrorErrors>(); 420 var o = new core.List<api.RollingUpdateErrorErrors>();
421 o.add(buildRollingUpdateErrorErrors()); 421 o.add(buildRollingUpdateErrorErrors());
422 o.add(buildRollingUpdateErrorErrors()); 422 o.add(buildRollingUpdateErrorErrors());
423 return o; 423 return o;
424 } 424 }
425 425
426 checkUnnamed3686(core.List<api.RollingUpdateErrorErrors> o) { 426 checkUnnamed3160(core.List<api.RollingUpdateErrorErrors> o) {
427 unittest.expect(o, unittest.hasLength(2)); 427 unittest.expect(o, unittest.hasLength(2));
428 checkRollingUpdateErrorErrors(o[0]); 428 checkRollingUpdateErrorErrors(o[0]);
429 checkRollingUpdateErrorErrors(o[1]); 429 checkRollingUpdateErrorErrors(o[1]);
430 } 430 }
431 431
432 core.int buildCounterRollingUpdateError = 0; 432 core.int buildCounterRollingUpdateError = 0;
433 buildRollingUpdateError() { 433 buildRollingUpdateError() {
434 var o = new api.RollingUpdateError(); 434 var o = new api.RollingUpdateError();
435 buildCounterRollingUpdateError++; 435 buildCounterRollingUpdateError++;
436 if (buildCounterRollingUpdateError < 3) { 436 if (buildCounterRollingUpdateError < 3) {
437 o.errors = buildUnnamed3686(); 437 o.errors = buildUnnamed3160();
438 } 438 }
439 buildCounterRollingUpdateError--; 439 buildCounterRollingUpdateError--;
440 return o; 440 return o;
441 } 441 }
442 442
443 checkRollingUpdateError(api.RollingUpdateError o) { 443 checkRollingUpdateError(api.RollingUpdateError o) {
444 buildCounterRollingUpdateError++; 444 buildCounterRollingUpdateError++;
445 if (buildCounterRollingUpdateError < 3) { 445 if (buildCounterRollingUpdateError < 3) {
446 checkUnnamed3686(o.errors); 446 checkUnnamed3160(o.errors);
447 } 447 }
448 buildCounterRollingUpdateError--; 448 buildCounterRollingUpdateError--;
449 } 449 }
450 450
451 core.int buildCounterRollingUpdatePolicy = 0; 451 core.int buildCounterRollingUpdatePolicy = 0;
452 buildRollingUpdatePolicy() { 452 buildRollingUpdatePolicy() {
453 var o = new api.RollingUpdatePolicy(); 453 var o = new api.RollingUpdatePolicy();
454 buildCounterRollingUpdatePolicy++; 454 buildCounterRollingUpdatePolicy++;
455 if (buildCounterRollingUpdatePolicy < 3) { 455 if (buildCounterRollingUpdatePolicy < 3) {
456 o.autoPauseAfterInstances = 42; 456 o.autoPauseAfterInstances = 42;
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
517 checkRollingUpdatePolicy(o.policy); 517 checkRollingUpdatePolicy(o.policy);
518 unittest.expect(o.progress, unittest.equals(42)); 518 unittest.expect(o.progress, unittest.equals(42));
519 unittest.expect(o.selfLink, unittest.equals('foo')); 519 unittest.expect(o.selfLink, unittest.equals('foo'));
520 unittest.expect(o.status, unittest.equals('foo')); 520 unittest.expect(o.status, unittest.equals('foo'));
521 unittest.expect(o.statusMessage, unittest.equals('foo')); 521 unittest.expect(o.statusMessage, unittest.equals('foo'));
522 unittest.expect(o.user, unittest.equals('foo')); 522 unittest.expect(o.user, unittest.equals('foo'));
523 } 523 }
524 buildCounterRollingUpdate--; 524 buildCounterRollingUpdate--;
525 } 525 }
526 526
527 buildUnnamed3687() { 527 buildUnnamed3161() {
528 var o = new core.List<api.RollingUpdate>(); 528 var o = new core.List<api.RollingUpdate>();
529 o.add(buildRollingUpdate()); 529 o.add(buildRollingUpdate());
530 o.add(buildRollingUpdate()); 530 o.add(buildRollingUpdate());
531 return o; 531 return o;
532 } 532 }
533 533
534 checkUnnamed3687(core.List<api.RollingUpdate> o) { 534 checkUnnamed3161(core.List<api.RollingUpdate> o) {
535 unittest.expect(o, unittest.hasLength(2)); 535 unittest.expect(o, unittest.hasLength(2));
536 checkRollingUpdate(o[0]); 536 checkRollingUpdate(o[0]);
537 checkRollingUpdate(o[1]); 537 checkRollingUpdate(o[1]);
538 } 538 }
539 539
540 core.int buildCounterRollingUpdateList = 0; 540 core.int buildCounterRollingUpdateList = 0;
541 buildRollingUpdateList() { 541 buildRollingUpdateList() {
542 var o = new api.RollingUpdateList(); 542 var o = new api.RollingUpdateList();
543 buildCounterRollingUpdateList++; 543 buildCounterRollingUpdateList++;
544 if (buildCounterRollingUpdateList < 3) { 544 if (buildCounterRollingUpdateList < 3) {
545 o.items = buildUnnamed3687(); 545 o.items = buildUnnamed3161();
546 o.kind = "foo"; 546 o.kind = "foo";
547 o.nextPageToken = "foo"; 547 o.nextPageToken = "foo";
548 o.selfLink = "foo"; 548 o.selfLink = "foo";
549 } 549 }
550 buildCounterRollingUpdateList--; 550 buildCounterRollingUpdateList--;
551 return o; 551 return o;
552 } 552 }
553 553
554 checkRollingUpdateList(api.RollingUpdateList o) { 554 checkRollingUpdateList(api.RollingUpdateList o) {
555 buildCounterRollingUpdateList++; 555 buildCounterRollingUpdateList++;
556 if (buildCounterRollingUpdateList < 3) { 556 if (buildCounterRollingUpdateList < 3) {
557 checkUnnamed3687(o.items); 557 checkUnnamed3161(o.items);
558 unittest.expect(o.kind, unittest.equals('foo')); 558 unittest.expect(o.kind, unittest.equals('foo'));
559 unittest.expect(o.nextPageToken, unittest.equals('foo')); 559 unittest.expect(o.nextPageToken, unittest.equals('foo'));
560 unittest.expect(o.selfLink, unittest.equals('foo')); 560 unittest.expect(o.selfLink, unittest.equals('foo'));
561 } 561 }
562 buildCounterRollingUpdateList--; 562 buildCounterRollingUpdateList--;
563 } 563 }
564 564
565 565
566 main() { 566 main() {
567 unittest.group("obj-schema-InstanceUpdateErrorErrors", () { 567 unittest.group("obj-schema-InstanceUpdateErrorErrors", () {
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
700 700
701 701
702 unittest.group("resource-RollingUpdatesResourceApi", () { 702 unittest.group("resource-RollingUpdatesResourceApi", () {
703 unittest.test("method--cancel", () { 703 unittest.test("method--cancel", () {
704 704
705 var mock = new HttpServerMock(); 705 var mock = new HttpServerMock();
706 api.RollingUpdatesResourceApi res = new api.ReplicapoolupdaterApi(mock).ro llingUpdates; 706 api.RollingUpdatesResourceApi res = new api.ReplicapoolupdaterApi(mock).ro llingUpdates;
707 var arg_project = "foo"; 707 var arg_project = "foo";
708 var arg_zone = "foo"; 708 var arg_zone = "foo";
709 var arg_rollingUpdate = "foo"; 709 var arg_rollingUpdate = "foo";
710 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 710 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
711 var path = (req.url).path; 711 var path = (req.url).path;
712 var pathOffset = 0; 712 var pathOffset = 0;
713 var index; 713 var index;
714 var subPart; 714 var subPart;
715 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 715 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
716 pathOffset += 1; 716 pathOffset += 1;
717 717
718 var query = (req.url).query; 718 var query = (req.url).query;
719 var queryOffset = 0; 719 var queryOffset = 0;
720 var queryMap = {}; 720 var queryMap = {};
(...skipping 11 matching lines...) Expand all
732 } 732 }
733 } 733 }
734 734
735 735
736 var h = { 736 var h = {
737 "content-type" : "application/json; charset=utf-8", 737 "content-type" : "application/json; charset=utf-8",
738 }; 738 };
739 var resp = convert.JSON.encode(buildOperation()); 739 var resp = convert.JSON.encode(buildOperation());
740 return new async.Future.value(stringResponse(200, h, resp)); 740 return new async.Future.value(stringResponse(200, h, resp));
741 }), true); 741 }), true);
742 res.cancel(arg_project, arg_zone, arg_rollingUpdate).then(unittest.expectA sync(((api.Operation response) { 742 res.cancel(arg_project, arg_zone, arg_rollingUpdate).then(unittest.expectA sync1(((api.Operation response) {
743 checkOperation(response); 743 checkOperation(response);
744 }))); 744 })));
745 }); 745 });
746 746
747 unittest.test("method--get", () { 747 unittest.test("method--get", () {
748 748
749 var mock = new HttpServerMock(); 749 var mock = new HttpServerMock();
750 api.RollingUpdatesResourceApi res = new api.ReplicapoolupdaterApi(mock).ro llingUpdates; 750 api.RollingUpdatesResourceApi res = new api.ReplicapoolupdaterApi(mock).ro llingUpdates;
751 var arg_project = "foo"; 751 var arg_project = "foo";
752 var arg_zone = "foo"; 752 var arg_zone = "foo";
753 var arg_rollingUpdate = "foo"; 753 var arg_rollingUpdate = "foo";
754 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 754 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
755 var path = (req.url).path; 755 var path = (req.url).path;
756 var pathOffset = 0; 756 var pathOffset = 0;
757 var index; 757 var index;
758 var subPart; 758 var subPart;
759 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 759 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
760 pathOffset += 1; 760 pathOffset += 1;
761 761
762 var query = (req.url).query; 762 var query = (req.url).query;
763 var queryOffset = 0; 763 var queryOffset = 0;
764 var queryMap = {}; 764 var queryMap = {};
(...skipping 11 matching lines...) Expand all
776 } 776 }
777 } 777 }
778 778
779 779
780 var h = { 780 var h = {
781 "content-type" : "application/json; charset=utf-8", 781 "content-type" : "application/json; charset=utf-8",
782 }; 782 };
783 var resp = convert.JSON.encode(buildRollingUpdate()); 783 var resp = convert.JSON.encode(buildRollingUpdate());
784 return new async.Future.value(stringResponse(200, h, resp)); 784 return new async.Future.value(stringResponse(200, h, resp));
785 }), true); 785 }), true);
786 res.get(arg_project, arg_zone, arg_rollingUpdate).then(unittest.expectAsyn c(((api.RollingUpdate response) { 786 res.get(arg_project, arg_zone, arg_rollingUpdate).then(unittest.expectAsyn c1(((api.RollingUpdate response) {
787 checkRollingUpdate(response); 787 checkRollingUpdate(response);
788 }))); 788 })));
789 }); 789 });
790 790
791 unittest.test("method--insert", () { 791 unittest.test("method--insert", () {
792 792
793 var mock = new HttpServerMock(); 793 var mock = new HttpServerMock();
794 api.RollingUpdatesResourceApi res = new api.ReplicapoolupdaterApi(mock).ro llingUpdates; 794 api.RollingUpdatesResourceApi res = new api.ReplicapoolupdaterApi(mock).ro llingUpdates;
795 var arg_request = buildRollingUpdate(); 795 var arg_request = buildRollingUpdate();
796 var arg_project = "foo"; 796 var arg_project = "foo";
797 var arg_zone = "foo"; 797 var arg_zone = "foo";
798 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 798 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
799 var obj = new api.RollingUpdate.fromJson(json); 799 var obj = new api.RollingUpdate.fromJson(json);
800 checkRollingUpdate(obj); 800 checkRollingUpdate(obj);
801 801
802 var path = (req.url).path; 802 var path = (req.url).path;
803 var pathOffset = 0; 803 var pathOffset = 0;
804 var index; 804 var index;
805 var subPart; 805 var subPart;
806 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 806 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
807 pathOffset += 1; 807 pathOffset += 1;
808 808
(...skipping 14 matching lines...) Expand all
823 } 823 }
824 } 824 }
825 825
826 826
827 var h = { 827 var h = {
828 "content-type" : "application/json; charset=utf-8", 828 "content-type" : "application/json; charset=utf-8",
829 }; 829 };
830 var resp = convert.JSON.encode(buildOperation()); 830 var resp = convert.JSON.encode(buildOperation());
831 return new async.Future.value(stringResponse(200, h, resp)); 831 return new async.Future.value(stringResponse(200, h, resp));
832 }), true); 832 }), true);
833 res.insert(arg_request, arg_project, arg_zone).then(unittest.expectAsync(( (api.Operation response) { 833 res.insert(arg_request, arg_project, arg_zone).then(unittest.expectAsync1( ((api.Operation response) {
834 checkOperation(response); 834 checkOperation(response);
835 }))); 835 })));
836 }); 836 });
837 837
838 unittest.test("method--list", () { 838 unittest.test("method--list", () {
839 839
840 var mock = new HttpServerMock(); 840 var mock = new HttpServerMock();
841 api.RollingUpdatesResourceApi res = new api.ReplicapoolupdaterApi(mock).ro llingUpdates; 841 api.RollingUpdatesResourceApi res = new api.ReplicapoolupdaterApi(mock).ro llingUpdates;
842 var arg_project = "foo"; 842 var arg_project = "foo";
843 var arg_zone = "foo"; 843 var arg_zone = "foo";
844 var arg_filter = "foo"; 844 var arg_filter = "foo";
845 var arg_maxResults = 42; 845 var arg_maxResults = 42;
846 var arg_pageToken = "foo"; 846 var arg_pageToken = "foo";
847 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 847 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
848 var path = (req.url).path; 848 var path = (req.url).path;
849 var pathOffset = 0; 849 var pathOffset = 0;
850 var index; 850 var index;
851 var subPart; 851 var subPart;
852 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 852 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
853 pathOffset += 1; 853 pathOffset += 1;
854 854
855 var query = (req.url).query; 855 var query = (req.url).query;
856 var queryOffset = 0; 856 var queryOffset = 0;
857 var queryMap = {}; 857 var queryMap = {};
(...skipping 14 matching lines...) Expand all
872 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e quals(arg_maxResults)); 872 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e quals(arg_maxResults));
873 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok en)); 873 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok en));
874 874
875 875
876 var h = { 876 var h = {
877 "content-type" : "application/json; charset=utf-8", 877 "content-type" : "application/json; charset=utf-8",
878 }; 878 };
879 var resp = convert.JSON.encode(buildRollingUpdateList()); 879 var resp = convert.JSON.encode(buildRollingUpdateList());
880 return new async.Future.value(stringResponse(200, h, resp)); 880 return new async.Future.value(stringResponse(200, h, resp));
881 }), true); 881 }), true);
882 res.list(arg_project, arg_zone, filter: arg_filter, maxResults: arg_maxRes ults, pageToken: arg_pageToken).then(unittest.expectAsync(((api.RollingUpdateLis t response) { 882 res.list(arg_project, arg_zone, filter: arg_filter, maxResults: arg_maxRes ults, pageToken: arg_pageToken).then(unittest.expectAsync1(((api.RollingUpdateLi st response) {
883 checkRollingUpdateList(response); 883 checkRollingUpdateList(response);
884 }))); 884 })));
885 }); 885 });
886 886
887 unittest.test("method--listInstanceUpdates", () { 887 unittest.test("method--listInstanceUpdates", () {
888 888
889 var mock = new HttpServerMock(); 889 var mock = new HttpServerMock();
890 api.RollingUpdatesResourceApi res = new api.ReplicapoolupdaterApi(mock).ro llingUpdates; 890 api.RollingUpdatesResourceApi res = new api.ReplicapoolupdaterApi(mock).ro llingUpdates;
891 var arg_project = "foo"; 891 var arg_project = "foo";
892 var arg_zone = "foo"; 892 var arg_zone = "foo";
893 var arg_rollingUpdate = "foo"; 893 var arg_rollingUpdate = "foo";
894 var arg_filter = "foo"; 894 var arg_filter = "foo";
895 var arg_maxResults = 42; 895 var arg_maxResults = 42;
896 var arg_pageToken = "foo"; 896 var arg_pageToken = "foo";
897 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 897 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
898 var path = (req.url).path; 898 var path = (req.url).path;
899 var pathOffset = 0; 899 var pathOffset = 0;
900 var index; 900 var index;
901 var subPart; 901 var subPart;
902 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 902 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
903 pathOffset += 1; 903 pathOffset += 1;
904 904
905 var query = (req.url).query; 905 var query = (req.url).query;
906 var queryOffset = 0; 906 var queryOffset = 0;
907 var queryMap = {}; 907 var queryMap = {};
(...skipping 14 matching lines...) Expand all
922 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e quals(arg_maxResults)); 922 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e quals(arg_maxResults));
923 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok en)); 923 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok en));
924 924
925 925
926 var h = { 926 var h = {
927 "content-type" : "application/json; charset=utf-8", 927 "content-type" : "application/json; charset=utf-8",
928 }; 928 };
929 var resp = convert.JSON.encode(buildInstanceUpdateList()); 929 var resp = convert.JSON.encode(buildInstanceUpdateList());
930 return new async.Future.value(stringResponse(200, h, resp)); 930 return new async.Future.value(stringResponse(200, h, resp));
931 }), true); 931 }), true);
932 res.listInstanceUpdates(arg_project, arg_zone, arg_rollingUpdate, filter: arg_filter, maxResults: arg_maxResults, pageToken: arg_pageToken).then(unittest. expectAsync(((api.InstanceUpdateList response) { 932 res.listInstanceUpdates(arg_project, arg_zone, arg_rollingUpdate, filter: arg_filter, maxResults: arg_maxResults, pageToken: arg_pageToken).then(unittest. expectAsync1(((api.InstanceUpdateList response) {
933 checkInstanceUpdateList(response); 933 checkInstanceUpdateList(response);
934 }))); 934 })));
935 }); 935 });
936 936
937 unittest.test("method--pause", () { 937 unittest.test("method--pause", () {
938 938
939 var mock = new HttpServerMock(); 939 var mock = new HttpServerMock();
940 api.RollingUpdatesResourceApi res = new api.ReplicapoolupdaterApi(mock).ro llingUpdates; 940 api.RollingUpdatesResourceApi res = new api.ReplicapoolupdaterApi(mock).ro llingUpdates;
941 var arg_project = "foo"; 941 var arg_project = "foo";
942 var arg_zone = "foo"; 942 var arg_zone = "foo";
943 var arg_rollingUpdate = "foo"; 943 var arg_rollingUpdate = "foo";
944 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 944 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
945 var path = (req.url).path; 945 var path = (req.url).path;
946 var pathOffset = 0; 946 var pathOffset = 0;
947 var index; 947 var index;
948 var subPart; 948 var subPart;
949 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 949 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
950 pathOffset += 1; 950 pathOffset += 1;
951 951
952 var query = (req.url).query; 952 var query = (req.url).query;
953 var queryOffset = 0; 953 var queryOffset = 0;
954 var queryMap = {}; 954 var queryMap = {};
(...skipping 11 matching lines...) Expand all
966 } 966 }
967 } 967 }
968 968
969 969
970 var h = { 970 var h = {
971 "content-type" : "application/json; charset=utf-8", 971 "content-type" : "application/json; charset=utf-8",
972 }; 972 };
973 var resp = convert.JSON.encode(buildOperation()); 973 var resp = convert.JSON.encode(buildOperation());
974 return new async.Future.value(stringResponse(200, h, resp)); 974 return new async.Future.value(stringResponse(200, h, resp));
975 }), true); 975 }), true);
976 res.pause(arg_project, arg_zone, arg_rollingUpdate).then(unittest.expectAs ync(((api.Operation response) { 976 res.pause(arg_project, arg_zone, arg_rollingUpdate).then(unittest.expectAs ync1(((api.Operation response) {
977 checkOperation(response); 977 checkOperation(response);
978 }))); 978 })));
979 }); 979 });
980 980
981 unittest.test("method--resume", () { 981 unittest.test("method--resume", () {
982 982
983 var mock = new HttpServerMock(); 983 var mock = new HttpServerMock();
984 api.RollingUpdatesResourceApi res = new api.ReplicapoolupdaterApi(mock).ro llingUpdates; 984 api.RollingUpdatesResourceApi res = new api.ReplicapoolupdaterApi(mock).ro llingUpdates;
985 var arg_project = "foo"; 985 var arg_project = "foo";
986 var arg_zone = "foo"; 986 var arg_zone = "foo";
987 var arg_rollingUpdate = "foo"; 987 var arg_rollingUpdate = "foo";
988 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 988 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
989 var path = (req.url).path; 989 var path = (req.url).path;
990 var pathOffset = 0; 990 var pathOffset = 0;
991 var index; 991 var index;
992 var subPart; 992 var subPart;
993 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 993 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
994 pathOffset += 1; 994 pathOffset += 1;
995 995
996 var query = (req.url).query; 996 var query = (req.url).query;
997 var queryOffset = 0; 997 var queryOffset = 0;
998 var queryMap = {}; 998 var queryMap = {};
(...skipping 11 matching lines...) Expand all
1010 } 1010 }
1011 } 1011 }
1012 1012
1013 1013
1014 var h = { 1014 var h = {
1015 "content-type" : "application/json; charset=utf-8", 1015 "content-type" : "application/json; charset=utf-8",
1016 }; 1016 };
1017 var resp = convert.JSON.encode(buildOperation()); 1017 var resp = convert.JSON.encode(buildOperation());
1018 return new async.Future.value(stringResponse(200, h, resp)); 1018 return new async.Future.value(stringResponse(200, h, resp));
1019 }), true); 1019 }), true);
1020 res.resume(arg_project, arg_zone, arg_rollingUpdate).then(unittest.expectA sync(((api.Operation response) { 1020 res.resume(arg_project, arg_zone, arg_rollingUpdate).then(unittest.expectA sync1(((api.Operation response) {
1021 checkOperation(response); 1021 checkOperation(response);
1022 }))); 1022 })));
1023 }); 1023 });
1024 1024
1025 unittest.test("method--rollback", () { 1025 unittest.test("method--rollback", () {
1026 1026
1027 var mock = new HttpServerMock(); 1027 var mock = new HttpServerMock();
1028 api.RollingUpdatesResourceApi res = new api.ReplicapoolupdaterApi(mock).ro llingUpdates; 1028 api.RollingUpdatesResourceApi res = new api.ReplicapoolupdaterApi(mock).ro llingUpdates;
1029 var arg_project = "foo"; 1029 var arg_project = "foo";
1030 var arg_zone = "foo"; 1030 var arg_zone = "foo";
1031 var arg_rollingUpdate = "foo"; 1031 var arg_rollingUpdate = "foo";
1032 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 1032 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
1033 var path = (req.url).path; 1033 var path = (req.url).path;
1034 var pathOffset = 0; 1034 var pathOffset = 0;
1035 var index; 1035 var index;
1036 var subPart; 1036 var subPart;
1037 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 1037 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
1038 pathOffset += 1; 1038 pathOffset += 1;
1039 1039
1040 var query = (req.url).query; 1040 var query = (req.url).query;
1041 var queryOffset = 0; 1041 var queryOffset = 0;
1042 var queryMap = {}; 1042 var queryMap = {};
(...skipping 11 matching lines...) Expand all
1054 } 1054 }
1055 } 1055 }
1056 1056
1057 1057
1058 var h = { 1058 var h = {
1059 "content-type" : "application/json; charset=utf-8", 1059 "content-type" : "application/json; charset=utf-8",
1060 }; 1060 };
1061 var resp = convert.JSON.encode(buildOperation()); 1061 var resp = convert.JSON.encode(buildOperation());
1062 return new async.Future.value(stringResponse(200, h, resp)); 1062 return new async.Future.value(stringResponse(200, h, resp));
1063 }), true); 1063 }), true);
1064 res.rollback(arg_project, arg_zone, arg_rollingUpdate).then(unittest.expec tAsync(((api.Operation response) { 1064 res.rollback(arg_project, arg_zone, arg_rollingUpdate).then(unittest.expec tAsync1(((api.Operation response) {
1065 checkOperation(response); 1065 checkOperation(response);
1066 }))); 1066 })));
1067 }); 1067 });
1068 1068
1069 }); 1069 });
1070 1070
1071 1071
1072 unittest.group("resource-ZoneOperationsResourceApi", () { 1072 unittest.group("resource-ZoneOperationsResourceApi", () {
1073 unittest.test("method--get", () { 1073 unittest.test("method--get", () {
1074 1074
1075 var mock = new HttpServerMock(); 1075 var mock = new HttpServerMock();
1076 api.ZoneOperationsResourceApi res = new api.ReplicapoolupdaterApi(mock).zo neOperations; 1076 api.ZoneOperationsResourceApi res = new api.ReplicapoolupdaterApi(mock).zo neOperations;
1077 var arg_project = "foo"; 1077 var arg_project = "foo";
1078 var arg_zone = "foo"; 1078 var arg_zone = "foo";
1079 var arg_operation = "foo"; 1079 var arg_operation = "foo";
1080 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 1080 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
1081 var path = (req.url).path; 1081 var path = (req.url).path;
1082 var pathOffset = 0; 1082 var pathOffset = 0;
1083 var index; 1083 var index;
1084 var subPart; 1084 var subPart;
1085 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 1085 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
1086 pathOffset += 1; 1086 pathOffset += 1;
1087 1087
1088 var query = (req.url).query; 1088 var query = (req.url).query;
1089 var queryOffset = 0; 1089 var queryOffset = 0;
1090 var queryMap = {}; 1090 var queryMap = {};
(...skipping 11 matching lines...) Expand all
1102 } 1102 }
1103 } 1103 }
1104 1104
1105 1105
1106 var h = { 1106 var h = {
1107 "content-type" : "application/json; charset=utf-8", 1107 "content-type" : "application/json; charset=utf-8",
1108 }; 1108 };
1109 var resp = convert.JSON.encode(buildOperation()); 1109 var resp = convert.JSON.encode(buildOperation());
1110 return new async.Future.value(stringResponse(200, h, resp)); 1110 return new async.Future.value(stringResponse(200, h, resp));
1111 }), true); 1111 }), true);
1112 res.get(arg_project, arg_zone, arg_operation).then(unittest.expectAsync((( api.Operation response) { 1112 res.get(arg_project, arg_zone, arg_operation).then(unittest.expectAsync1(( (api.Operation response) {
1113 checkOperation(response); 1113 checkOperation(response);
1114 }))); 1114 })));
1115 }); 1115 });
1116 1116
1117 unittest.test("method--list", () { 1117 unittest.test("method--list", () {
1118 1118
1119 var mock = new HttpServerMock(); 1119 var mock = new HttpServerMock();
1120 api.ZoneOperationsResourceApi res = new api.ReplicapoolupdaterApi(mock).zo neOperations; 1120 api.ZoneOperationsResourceApi res = new api.ReplicapoolupdaterApi(mock).zo neOperations;
1121 var arg_project = "foo"; 1121 var arg_project = "foo";
1122 var arg_zone = "foo"; 1122 var arg_zone = "foo";
1123 var arg_filter = "foo"; 1123 var arg_filter = "foo";
1124 var arg_maxResults = 42; 1124 var arg_maxResults = 42;
1125 var arg_pageToken = "foo"; 1125 var arg_pageToken = "foo";
1126 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 1126 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
1127 var path = (req.url).path; 1127 var path = (req.url).path;
1128 var pathOffset = 0; 1128 var pathOffset = 0;
1129 var index; 1129 var index;
1130 var subPart; 1130 var subPart;
1131 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 1131 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
1132 pathOffset += 1; 1132 pathOffset += 1;
1133 1133
1134 var query = (req.url).query; 1134 var query = (req.url).query;
1135 var queryOffset = 0; 1135 var queryOffset = 0;
1136 var queryMap = {}; 1136 var queryMap = {};
(...skipping 14 matching lines...) Expand all
1151 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e quals(arg_maxResults)); 1151 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e quals(arg_maxResults));
1152 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok en)); 1152 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok en));
1153 1153
1154 1154
1155 var h = { 1155 var h = {
1156 "content-type" : "application/json; charset=utf-8", 1156 "content-type" : "application/json; charset=utf-8",
1157 }; 1157 };
1158 var resp = convert.JSON.encode(buildOperationList()); 1158 var resp = convert.JSON.encode(buildOperationList());
1159 return new async.Future.value(stringResponse(200, h, resp)); 1159 return new async.Future.value(stringResponse(200, h, resp));
1160 }), true); 1160 }), true);
1161 res.list(arg_project, arg_zone, filter: arg_filter, maxResults: arg_maxRes ults, pageToken: arg_pageToken).then(unittest.expectAsync(((api.OperationList re sponse) { 1161 res.list(arg_project, arg_zone, filter: arg_filter, maxResults: arg_maxRes ults, pageToken: arg_pageToken).then(unittest.expectAsync1(((api.OperationList r esponse) {
1162 checkOperationList(response); 1162 checkOperationList(response);
1163 }))); 1163 })));
1164 }); 1164 });
1165 1165
1166 }); 1166 });
1167 1167
1168 1168
1169 } 1169 }
1170 1170
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698