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

Side by Side Diff: generated/googleapis/test/clouddebugger/v2_test.dart

Issue 3006323002: Api-Roll 54: 2017-09-11 (Closed)
Patch Set: use 2.0.0-dev.infinity sdk constraint in pubspecs Created 3 years, 3 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.clouddebugger.v2.test; 1 library googleapis.clouddebugger.v2.test;
2 2
3 import "dart:core" as core; 3 import "dart:core" as core;
4 import "dart:collection" as collection;
5 import "dart:async" as async; 4 import "dart:async" as async;
6 import "dart:convert" as convert; 5 import "dart:convert" as convert;
7 6
8 import 'package:http/http.dart' as http; 7 import 'package:http/http.dart' as http;
9 import 'package:http/testing.dart' as http_testing;
10 import 'package:test/test.dart' as unittest; 8 import 'package:test/test.dart' as unittest;
11 9
12 import 'package:googleapis/clouddebugger/v2.dart' as api; 10 import 'package:googleapis/clouddebugger/v2.dart' as api;
13 11
14 class HttpServerMock extends http.BaseClient { 12 class HttpServerMock extends http.BaseClient {
15 core.Function _callback; 13 core.Function _callback;
16 core.bool _expectJson; 14 core.bool _expectJson;
17 15
18 void register(core.Function callback, core.bool expectJson) { 16 void register(core.Function callback, core.bool expectJson) {
19 _callback = callback; 17 _callback = callback;
20 _expectJson = expectJson; 18 _expectJson = expectJson;
21 } 19 }
22 20
23 async.Future<http.StreamedResponse> send(http.BaseRequest request) { 21 async.Future<http.StreamedResponse> send(http.BaseRequest request) {
24 if (_expectJson) { 22 if (_expectJson) {
25 return request.finalize() 23 return request
24 .finalize()
26 .transform(convert.UTF8.decoder) 25 .transform(convert.UTF8.decoder)
27 .join('') 26 .join('')
28 .then((core.String jsonString) { 27 .then((core.String jsonString) {
29 if (jsonString.isEmpty) { 28 if (jsonString.isEmpty) {
30 return _callback(request, null); 29 return _callback(request, null);
31 } else { 30 } else {
32 return _callback(request, convert.JSON.decode(jsonString)); 31 return _callback(request, convert.JSON.decode(jsonString));
33 } 32 }
34 }); 33 });
35 } else { 34 } else {
36 var stream = request.finalize(); 35 var stream = request.finalize();
37 if (stream == null) { 36 if (stream == null) {
38 return _callback(request, []); 37 return _callback(request, []);
39 } else { 38 } else {
40 return stream.toBytes().then((data) { 39 return stream.toBytes().then((data) {
41 return _callback(request, data); 40 return _callback(request, data);
42 }); 41 });
43 } 42 }
44 } 43 }
45 } 44 }
46 } 45 }
47 46
48 http.StreamedResponse stringResponse( 47 http.StreamedResponse stringResponse(core.int status,
49 core.int status, core.Map<core.String, core.String> headers, core.String bod y) { 48 core.Map<core.String, core.String> headers, core.String body) {
50 var stream = new async.Stream.fromIterable([convert.UTF8.encode(body)]); 49 var stream = new async.Stream.fromIterable([convert.UTF8.encode(body)]);
51 return new http.StreamedResponse(stream, status, headers: headers); 50 return new http.StreamedResponse(stream, status, headers: headers);
52 } 51 }
53 52
54 core.int buildCounterAliasContext = 0; 53 core.int buildCounterAliasContext = 0;
55 buildAliasContext() { 54 buildAliasContext() {
56 var o = new api.AliasContext(); 55 var o = new api.AliasContext();
57 buildCounterAliasContext++; 56 buildCounterAliasContext++;
58 if (buildCounterAliasContext < 3) { 57 if (buildCounterAliasContext < 3) {
59 o.kind = "foo"; 58 o.kind = "foo";
60 o.name = "foo"; 59 o.name = "foo";
61 } 60 }
62 buildCounterAliasContext--; 61 buildCounterAliasContext--;
63 return o; 62 return o;
64 } 63 }
65 64
66 checkAliasContext(api.AliasContext o) { 65 checkAliasContext(api.AliasContext o) {
67 buildCounterAliasContext++; 66 buildCounterAliasContext++;
68 if (buildCounterAliasContext < 3) { 67 if (buildCounterAliasContext < 3) {
69 unittest.expect(o.kind, unittest.equals('foo')); 68 unittest.expect(o.kind, unittest.equals('foo'));
70 unittest.expect(o.name, unittest.equals('foo')); 69 unittest.expect(o.name, unittest.equals('foo'));
71 } 70 }
72 buildCounterAliasContext--; 71 buildCounterAliasContext--;
73 } 72 }
74 73
75 buildUnnamed883() { 74 buildUnnamed886() {
76 var o = new core.List<api.Variable>(); 75 var o = new core.List<api.Variable>();
77 o.add(buildVariable()); 76 o.add(buildVariable());
78 o.add(buildVariable()); 77 o.add(buildVariable());
79 return o; 78 return o;
80 } 79 }
81 80
82 checkUnnamed883(core.List<api.Variable> o) { 81 checkUnnamed886(core.List<api.Variable> o) {
83 unittest.expect(o, unittest.hasLength(2)); 82 unittest.expect(o, unittest.hasLength(2));
84 checkVariable(o[0]); 83 checkVariable(o[0]);
85 checkVariable(o[1]); 84 checkVariable(o[1]);
86 } 85 }
87 86
88 buildUnnamed884() { 87 buildUnnamed887() {
89 var o = new core.List<core.String>(); 88 var o = new core.List<core.String>();
90 o.add("foo"); 89 o.add("foo");
91 o.add("foo"); 90 o.add("foo");
92 return o; 91 return o;
93 } 92 }
94 93
95 checkUnnamed884(core.List<core.String> o) { 94 checkUnnamed887(core.List<core.String> o) {
96 unittest.expect(o, unittest.hasLength(2)); 95 unittest.expect(o, unittest.hasLength(2));
97 unittest.expect(o[0], unittest.equals('foo')); 96 unittest.expect(o[0], unittest.equals('foo'));
98 unittest.expect(o[1], unittest.equals('foo')); 97 unittest.expect(o[1], unittest.equals('foo'));
99 } 98 }
100 99
101 buildUnnamed885() { 100 buildUnnamed888() {
102 var o = new core.Map<core.String, core.String>(); 101 var o = new core.Map<core.String, core.String>();
103 o["x"] = "foo"; 102 o["x"] = "foo";
104 o["y"] = "foo"; 103 o["y"] = "foo";
105 return o; 104 return o;
106 } 105 }
107 106
108 checkUnnamed885(core.Map<core.String, core.String> o) { 107 checkUnnamed888(core.Map<core.String, core.String> o) {
109 unittest.expect(o, unittest.hasLength(2)); 108 unittest.expect(o, unittest.hasLength(2));
110 unittest.expect(o["x"], unittest.equals('foo')); 109 unittest.expect(o["x"], unittest.equals('foo'));
111 unittest.expect(o["y"], unittest.equals('foo')); 110 unittest.expect(o["y"], unittest.equals('foo'));
112 } 111 }
113 112
114 buildUnnamed886() { 113 buildUnnamed889() {
115 var o = new core.List<api.StackFrame>(); 114 var o = new core.List<api.StackFrame>();
116 o.add(buildStackFrame()); 115 o.add(buildStackFrame());
117 o.add(buildStackFrame()); 116 o.add(buildStackFrame());
118 return o; 117 return o;
119 } 118 }
120 119
121 checkUnnamed886(core.List<api.StackFrame> o) { 120 checkUnnamed889(core.List<api.StackFrame> o) {
122 unittest.expect(o, unittest.hasLength(2)); 121 unittest.expect(o, unittest.hasLength(2));
123 checkStackFrame(o[0]); 122 checkStackFrame(o[0]);
124 checkStackFrame(o[1]); 123 checkStackFrame(o[1]);
125 } 124 }
126 125
127 buildUnnamed887() { 126 buildUnnamed890() {
128 var o = new core.List<api.Variable>(); 127 var o = new core.List<api.Variable>();
129 o.add(buildVariable()); 128 o.add(buildVariable());
130 o.add(buildVariable()); 129 o.add(buildVariable());
131 return o; 130 return o;
132 } 131 }
133 132
134 checkUnnamed887(core.List<api.Variable> o) { 133 checkUnnamed890(core.List<api.Variable> o) {
135 unittest.expect(o, unittest.hasLength(2)); 134 unittest.expect(o, unittest.hasLength(2));
136 checkVariable(o[0]); 135 checkVariable(o[0]);
137 checkVariable(o[1]); 136 checkVariable(o[1]);
138 } 137 }
139 138
140 core.int buildCounterBreakpoint = 0; 139 core.int buildCounterBreakpoint = 0;
141 buildBreakpoint() { 140 buildBreakpoint() {
142 var o = new api.Breakpoint(); 141 var o = new api.Breakpoint();
143 buildCounterBreakpoint++; 142 buildCounterBreakpoint++;
144 if (buildCounterBreakpoint < 3) { 143 if (buildCounterBreakpoint < 3) {
145 o.action = "foo"; 144 o.action = "foo";
146 o.condition = "foo"; 145 o.condition = "foo";
147 o.createTime = "foo"; 146 o.createTime = "foo";
148 o.evaluatedExpressions = buildUnnamed883(); 147 o.evaluatedExpressions = buildUnnamed886();
149 o.expressions = buildUnnamed884(); 148 o.expressions = buildUnnamed887();
150 o.finalTime = "foo"; 149 o.finalTime = "foo";
151 o.id = "foo"; 150 o.id = "foo";
152 o.isFinalState = true; 151 o.isFinalState = true;
153 o.labels = buildUnnamed885(); 152 o.labels = buildUnnamed888();
154 o.location = buildSourceLocation(); 153 o.location = buildSourceLocation();
155 o.logLevel = "foo"; 154 o.logLevel = "foo";
156 o.logMessageFormat = "foo"; 155 o.logMessageFormat = "foo";
157 o.stackFrames = buildUnnamed886(); 156 o.stackFrames = buildUnnamed889();
158 o.status = buildStatusMessage(); 157 o.status = buildStatusMessage();
159 o.userEmail = "foo"; 158 o.userEmail = "foo";
160 o.variableTable = buildUnnamed887(); 159 o.variableTable = buildUnnamed890();
161 } 160 }
162 buildCounterBreakpoint--; 161 buildCounterBreakpoint--;
163 return o; 162 return o;
164 } 163 }
165 164
166 checkBreakpoint(api.Breakpoint o) { 165 checkBreakpoint(api.Breakpoint o) {
167 buildCounterBreakpoint++; 166 buildCounterBreakpoint++;
168 if (buildCounterBreakpoint < 3) { 167 if (buildCounterBreakpoint < 3) {
169 unittest.expect(o.action, unittest.equals('foo')); 168 unittest.expect(o.action, unittest.equals('foo'));
170 unittest.expect(o.condition, unittest.equals('foo')); 169 unittest.expect(o.condition, unittest.equals('foo'));
171 unittest.expect(o.createTime, unittest.equals('foo')); 170 unittest.expect(o.createTime, unittest.equals('foo'));
172 checkUnnamed883(o.evaluatedExpressions); 171 checkUnnamed886(o.evaluatedExpressions);
173 checkUnnamed884(o.expressions); 172 checkUnnamed887(o.expressions);
174 unittest.expect(o.finalTime, unittest.equals('foo')); 173 unittest.expect(o.finalTime, unittest.equals('foo'));
175 unittest.expect(o.id, unittest.equals('foo')); 174 unittest.expect(o.id, unittest.equals('foo'));
176 unittest.expect(o.isFinalState, unittest.isTrue); 175 unittest.expect(o.isFinalState, unittest.isTrue);
177 checkUnnamed885(o.labels); 176 checkUnnamed888(o.labels);
178 checkSourceLocation(o.location); 177 checkSourceLocation(o.location);
179 unittest.expect(o.logLevel, unittest.equals('foo')); 178 unittest.expect(o.logLevel, unittest.equals('foo'));
180 unittest.expect(o.logMessageFormat, unittest.equals('foo')); 179 unittest.expect(o.logMessageFormat, unittest.equals('foo'));
181 checkUnnamed886(o.stackFrames); 180 checkUnnamed889(o.stackFrames);
182 checkStatusMessage(o.status); 181 checkStatusMessage(o.status);
183 unittest.expect(o.userEmail, unittest.equals('foo')); 182 unittest.expect(o.userEmail, unittest.equals('foo'));
184 checkUnnamed887(o.variableTable); 183 checkUnnamed890(o.variableTable);
185 } 184 }
186 buildCounterBreakpoint--; 185 buildCounterBreakpoint--;
187 } 186 }
188 187
189 core.int buildCounterCloudRepoSourceContext = 0; 188 core.int buildCounterCloudRepoSourceContext = 0;
190 buildCloudRepoSourceContext() { 189 buildCloudRepoSourceContext() {
191 var o = new api.CloudRepoSourceContext(); 190 var o = new api.CloudRepoSourceContext();
192 buildCounterCloudRepoSourceContext++; 191 buildCounterCloudRepoSourceContext++;
193 if (buildCounterCloudRepoSourceContext < 3) { 192 if (buildCounterCloudRepoSourceContext < 3) {
194 o.aliasContext = buildAliasContext(); 193 o.aliasContext = buildAliasContext();
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
246 245
247 checkCloudWorkspaceSourceContext(api.CloudWorkspaceSourceContext o) { 246 checkCloudWorkspaceSourceContext(api.CloudWorkspaceSourceContext o) {
248 buildCounterCloudWorkspaceSourceContext++; 247 buildCounterCloudWorkspaceSourceContext++;
249 if (buildCounterCloudWorkspaceSourceContext < 3) { 248 if (buildCounterCloudWorkspaceSourceContext < 3) {
250 unittest.expect(o.snapshotId, unittest.equals('foo')); 249 unittest.expect(o.snapshotId, unittest.equals('foo'));
251 checkCloudWorkspaceId(o.workspaceId); 250 checkCloudWorkspaceId(o.workspaceId);
252 } 251 }
253 buildCounterCloudWorkspaceSourceContext--; 252 buildCounterCloudWorkspaceSourceContext--;
254 } 253 }
255 254
256 buildUnnamed888() { 255 buildUnnamed891() {
257 var o = new core.List<api.ExtendedSourceContext>(); 256 var o = new core.List<api.ExtendedSourceContext>();
258 o.add(buildExtendedSourceContext()); 257 o.add(buildExtendedSourceContext());
259 o.add(buildExtendedSourceContext()); 258 o.add(buildExtendedSourceContext());
260 return o; 259 return o;
261 } 260 }
262 261
263 checkUnnamed888(core.List<api.ExtendedSourceContext> o) { 262 checkUnnamed891(core.List<api.ExtendedSourceContext> o) {
264 unittest.expect(o, unittest.hasLength(2)); 263 unittest.expect(o, unittest.hasLength(2));
265 checkExtendedSourceContext(o[0]); 264 checkExtendedSourceContext(o[0]);
266 checkExtendedSourceContext(o[1]); 265 checkExtendedSourceContext(o[1]);
267 } 266 }
268 267
269 buildUnnamed889() { 268 buildUnnamed892() {
270 var o = new core.Map<core.String, core.String>(); 269 var o = new core.Map<core.String, core.String>();
271 o["x"] = "foo"; 270 o["x"] = "foo";
272 o["y"] = "foo"; 271 o["y"] = "foo";
273 return o; 272 return o;
274 } 273 }
275 274
276 checkUnnamed889(core.Map<core.String, core.String> o) { 275 checkUnnamed892(core.Map<core.String, core.String> o) {
277 unittest.expect(o, unittest.hasLength(2)); 276 unittest.expect(o, unittest.hasLength(2));
278 unittest.expect(o["x"], unittest.equals('foo')); 277 unittest.expect(o["x"], unittest.equals('foo'));
279 unittest.expect(o["y"], unittest.equals('foo')); 278 unittest.expect(o["y"], unittest.equals('foo'));
280 } 279 }
281 280
282 buildUnnamed890() { 281 buildUnnamed893() {
283 var o = new core.List<api.SourceContext>(); 282 var o = new core.List<api.SourceContext>();
284 o.add(buildSourceContext()); 283 o.add(buildSourceContext());
285 o.add(buildSourceContext()); 284 o.add(buildSourceContext());
286 return o; 285 return o;
287 } 286 }
288 287
289 checkUnnamed890(core.List<api.SourceContext> o) { 288 checkUnnamed893(core.List<api.SourceContext> o) {
290 unittest.expect(o, unittest.hasLength(2)); 289 unittest.expect(o, unittest.hasLength(2));
291 checkSourceContext(o[0]); 290 checkSourceContext(o[0]);
292 checkSourceContext(o[1]); 291 checkSourceContext(o[1]);
293 } 292 }
294 293
295 core.int buildCounterDebuggee = 0; 294 core.int buildCounterDebuggee = 0;
296 buildDebuggee() { 295 buildDebuggee() {
297 var o = new api.Debuggee(); 296 var o = new api.Debuggee();
298 buildCounterDebuggee++; 297 buildCounterDebuggee++;
299 if (buildCounterDebuggee < 3) { 298 if (buildCounterDebuggee < 3) {
300 o.agentVersion = "foo"; 299 o.agentVersion = "foo";
301 o.description = "foo"; 300 o.description = "foo";
302 o.extSourceContexts = buildUnnamed888(); 301 o.extSourceContexts = buildUnnamed891();
303 o.id = "foo"; 302 o.id = "foo";
304 o.isDisabled = true; 303 o.isDisabled = true;
305 o.isInactive = true; 304 o.isInactive = true;
306 o.labels = buildUnnamed889(); 305 o.labels = buildUnnamed892();
307 o.project = "foo"; 306 o.project = "foo";
308 o.sourceContexts = buildUnnamed890(); 307 o.sourceContexts = buildUnnamed893();
309 o.status = buildStatusMessage(); 308 o.status = buildStatusMessage();
310 o.uniquifier = "foo"; 309 o.uniquifier = "foo";
311 } 310 }
312 buildCounterDebuggee--; 311 buildCounterDebuggee--;
313 return o; 312 return o;
314 } 313 }
315 314
316 checkDebuggee(api.Debuggee o) { 315 checkDebuggee(api.Debuggee o) {
317 buildCounterDebuggee++; 316 buildCounterDebuggee++;
318 if (buildCounterDebuggee < 3) { 317 if (buildCounterDebuggee < 3) {
319 unittest.expect(o.agentVersion, unittest.equals('foo')); 318 unittest.expect(o.agentVersion, unittest.equals('foo'));
320 unittest.expect(o.description, unittest.equals('foo')); 319 unittest.expect(o.description, unittest.equals('foo'));
321 checkUnnamed888(o.extSourceContexts); 320 checkUnnamed891(o.extSourceContexts);
322 unittest.expect(o.id, unittest.equals('foo')); 321 unittest.expect(o.id, unittest.equals('foo'));
323 unittest.expect(o.isDisabled, unittest.isTrue); 322 unittest.expect(o.isDisabled, unittest.isTrue);
324 unittest.expect(o.isInactive, unittest.isTrue); 323 unittest.expect(o.isInactive, unittest.isTrue);
325 checkUnnamed889(o.labels); 324 checkUnnamed892(o.labels);
326 unittest.expect(o.project, unittest.equals('foo')); 325 unittest.expect(o.project, unittest.equals('foo'));
327 checkUnnamed890(o.sourceContexts); 326 checkUnnamed893(o.sourceContexts);
328 checkStatusMessage(o.status); 327 checkStatusMessage(o.status);
329 unittest.expect(o.uniquifier, unittest.equals('foo')); 328 unittest.expect(o.uniquifier, unittest.equals('foo'));
330 } 329 }
331 buildCounterDebuggee--; 330 buildCounterDebuggee--;
332 } 331 }
333 332
334 core.int buildCounterEmpty = 0; 333 core.int buildCounterEmpty = 0;
335 buildEmpty() { 334 buildEmpty() {
336 var o = new api.Empty(); 335 var o = new api.Empty();
337 buildCounterEmpty++; 336 buildCounterEmpty++;
338 if (buildCounterEmpty < 3) { 337 if (buildCounterEmpty < 3) {}
339 }
340 buildCounterEmpty--; 338 buildCounterEmpty--;
341 return o; 339 return o;
342 } 340 }
343 341
344 checkEmpty(api.Empty o) { 342 checkEmpty(api.Empty o) {
345 buildCounterEmpty++; 343 buildCounterEmpty++;
346 if (buildCounterEmpty < 3) { 344 if (buildCounterEmpty < 3) {}
347 }
348 buildCounterEmpty--; 345 buildCounterEmpty--;
349 } 346 }
350 347
351 buildUnnamed891() { 348 buildUnnamed894() {
352 var o = new core.Map<core.String, core.String>(); 349 var o = new core.Map<core.String, core.String>();
353 o["x"] = "foo"; 350 o["x"] = "foo";
354 o["y"] = "foo"; 351 o["y"] = "foo";
355 return o; 352 return o;
356 } 353 }
357 354
358 checkUnnamed891(core.Map<core.String, core.String> o) { 355 checkUnnamed894(core.Map<core.String, core.String> o) {
359 unittest.expect(o, unittest.hasLength(2)); 356 unittest.expect(o, unittest.hasLength(2));
360 unittest.expect(o["x"], unittest.equals('foo')); 357 unittest.expect(o["x"], unittest.equals('foo'));
361 unittest.expect(o["y"], unittest.equals('foo')); 358 unittest.expect(o["y"], unittest.equals('foo'));
362 } 359 }
363 360
364 core.int buildCounterExtendedSourceContext = 0; 361 core.int buildCounterExtendedSourceContext = 0;
365 buildExtendedSourceContext() { 362 buildExtendedSourceContext() {
366 var o = new api.ExtendedSourceContext(); 363 var o = new api.ExtendedSourceContext();
367 buildCounterExtendedSourceContext++; 364 buildCounterExtendedSourceContext++;
368 if (buildCounterExtendedSourceContext < 3) { 365 if (buildCounterExtendedSourceContext < 3) {
369 o.context = buildSourceContext(); 366 o.context = buildSourceContext();
370 o.labels = buildUnnamed891(); 367 o.labels = buildUnnamed894();
371 } 368 }
372 buildCounterExtendedSourceContext--; 369 buildCounterExtendedSourceContext--;
373 return o; 370 return o;
374 } 371 }
375 372
376 checkExtendedSourceContext(api.ExtendedSourceContext o) { 373 checkExtendedSourceContext(api.ExtendedSourceContext o) {
377 buildCounterExtendedSourceContext++; 374 buildCounterExtendedSourceContext++;
378 if (buildCounterExtendedSourceContext < 3) { 375 if (buildCounterExtendedSourceContext < 3) {
379 checkSourceContext(o.context); 376 checkSourceContext(o.context);
380 checkUnnamed891(o.labels); 377 checkUnnamed894(o.labels);
381 } 378 }
382 buildCounterExtendedSourceContext--; 379 buildCounterExtendedSourceContext--;
383 } 380 }
384 381
385 buildUnnamed892() { 382 buildUnnamed895() {
386 var o = new core.List<core.String>(); 383 var o = new core.List<core.String>();
387 o.add("foo"); 384 o.add("foo");
388 o.add("foo"); 385 o.add("foo");
389 return o; 386 return o;
390 } 387 }
391 388
392 checkUnnamed892(core.List<core.String> o) { 389 checkUnnamed895(core.List<core.String> o) {
393 unittest.expect(o, unittest.hasLength(2)); 390 unittest.expect(o, unittest.hasLength(2));
394 unittest.expect(o[0], unittest.equals('foo')); 391 unittest.expect(o[0], unittest.equals('foo'));
395 unittest.expect(o[1], unittest.equals('foo')); 392 unittest.expect(o[1], unittest.equals('foo'));
396 } 393 }
397 394
398 core.int buildCounterFormatMessage = 0; 395 core.int buildCounterFormatMessage = 0;
399 buildFormatMessage() { 396 buildFormatMessage() {
400 var o = new api.FormatMessage(); 397 var o = new api.FormatMessage();
401 buildCounterFormatMessage++; 398 buildCounterFormatMessage++;
402 if (buildCounterFormatMessage < 3) { 399 if (buildCounterFormatMessage < 3) {
403 o.format = "foo"; 400 o.format = "foo";
404 o.parameters = buildUnnamed892(); 401 o.parameters = buildUnnamed895();
405 } 402 }
406 buildCounterFormatMessage--; 403 buildCounterFormatMessage--;
407 return o; 404 return o;
408 } 405 }
409 406
410 checkFormatMessage(api.FormatMessage o) { 407 checkFormatMessage(api.FormatMessage o) {
411 buildCounterFormatMessage++; 408 buildCounterFormatMessage++;
412 if (buildCounterFormatMessage < 3) { 409 if (buildCounterFormatMessage < 3) {
413 unittest.expect(o.format, unittest.equals('foo')); 410 unittest.expect(o.format, unittest.equals('foo'));
414 checkUnnamed892(o.parameters); 411 checkUnnamed895(o.parameters);
415 } 412 }
416 buildCounterFormatMessage--; 413 buildCounterFormatMessage--;
417 } 414 }
418 415
419 core.int buildCounterGerritSourceContext = 0; 416 core.int buildCounterGerritSourceContext = 0;
420 buildGerritSourceContext() { 417 buildGerritSourceContext() {
421 var o = new api.GerritSourceContext(); 418 var o = new api.GerritSourceContext();
422 buildCounterGerritSourceContext++; 419 buildCounterGerritSourceContext++;
423 if (buildCounterGerritSourceContext < 3) { 420 if (buildCounterGerritSourceContext < 3) {
424 o.aliasContext = buildAliasContext(); 421 o.aliasContext = buildAliasContext();
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
476 473
477 checkGitSourceContext(api.GitSourceContext o) { 474 checkGitSourceContext(api.GitSourceContext o) {
478 buildCounterGitSourceContext++; 475 buildCounterGitSourceContext++;
479 if (buildCounterGitSourceContext < 3) { 476 if (buildCounterGitSourceContext < 3) {
480 unittest.expect(o.revisionId, unittest.equals('foo')); 477 unittest.expect(o.revisionId, unittest.equals('foo'));
481 unittest.expect(o.url, unittest.equals('foo')); 478 unittest.expect(o.url, unittest.equals('foo'));
482 } 479 }
483 buildCounterGitSourceContext--; 480 buildCounterGitSourceContext--;
484 } 481 }
485 482
486 buildUnnamed893() { 483 buildUnnamed896() {
487 var o = new core.List<api.Breakpoint>(); 484 var o = new core.List<api.Breakpoint>();
488 o.add(buildBreakpoint()); 485 o.add(buildBreakpoint());
489 o.add(buildBreakpoint()); 486 o.add(buildBreakpoint());
490 return o; 487 return o;
491 } 488 }
492 489
493 checkUnnamed893(core.List<api.Breakpoint> o) { 490 checkUnnamed896(core.List<api.Breakpoint> o) {
494 unittest.expect(o, unittest.hasLength(2)); 491 unittest.expect(o, unittest.hasLength(2));
495 checkBreakpoint(o[0]); 492 checkBreakpoint(o[0]);
496 checkBreakpoint(o[1]); 493 checkBreakpoint(o[1]);
497 } 494 }
498 495
499 core.int buildCounterListActiveBreakpointsResponse = 0; 496 core.int buildCounterListActiveBreakpointsResponse = 0;
500 buildListActiveBreakpointsResponse() { 497 buildListActiveBreakpointsResponse() {
501 var o = new api.ListActiveBreakpointsResponse(); 498 var o = new api.ListActiveBreakpointsResponse();
502 buildCounterListActiveBreakpointsResponse++; 499 buildCounterListActiveBreakpointsResponse++;
503 if (buildCounterListActiveBreakpointsResponse < 3) { 500 if (buildCounterListActiveBreakpointsResponse < 3) {
504 o.breakpoints = buildUnnamed893(); 501 o.breakpoints = buildUnnamed896();
505 o.nextWaitToken = "foo"; 502 o.nextWaitToken = "foo";
506 o.waitExpired = true; 503 o.waitExpired = true;
507 } 504 }
508 buildCounterListActiveBreakpointsResponse--; 505 buildCounterListActiveBreakpointsResponse--;
509 return o; 506 return o;
510 } 507 }
511 508
512 checkListActiveBreakpointsResponse(api.ListActiveBreakpointsResponse o) { 509 checkListActiveBreakpointsResponse(api.ListActiveBreakpointsResponse o) {
513 buildCounterListActiveBreakpointsResponse++; 510 buildCounterListActiveBreakpointsResponse++;
514 if (buildCounterListActiveBreakpointsResponse < 3) { 511 if (buildCounterListActiveBreakpointsResponse < 3) {
515 checkUnnamed893(o.breakpoints); 512 checkUnnamed896(o.breakpoints);
516 unittest.expect(o.nextWaitToken, unittest.equals('foo')); 513 unittest.expect(o.nextWaitToken, unittest.equals('foo'));
517 unittest.expect(o.waitExpired, unittest.isTrue); 514 unittest.expect(o.waitExpired, unittest.isTrue);
518 } 515 }
519 buildCounterListActiveBreakpointsResponse--; 516 buildCounterListActiveBreakpointsResponse--;
520 } 517 }
521 518
522 buildUnnamed894() { 519 buildUnnamed897() {
523 var o = new core.List<api.Breakpoint>(); 520 var o = new core.List<api.Breakpoint>();
524 o.add(buildBreakpoint()); 521 o.add(buildBreakpoint());
525 o.add(buildBreakpoint()); 522 o.add(buildBreakpoint());
526 return o; 523 return o;
527 } 524 }
528 525
529 checkUnnamed894(core.List<api.Breakpoint> o) { 526 checkUnnamed897(core.List<api.Breakpoint> o) {
530 unittest.expect(o, unittest.hasLength(2)); 527 unittest.expect(o, unittest.hasLength(2));
531 checkBreakpoint(o[0]); 528 checkBreakpoint(o[0]);
532 checkBreakpoint(o[1]); 529 checkBreakpoint(o[1]);
533 } 530 }
534 531
535 core.int buildCounterListBreakpointsResponse = 0; 532 core.int buildCounterListBreakpointsResponse = 0;
536 buildListBreakpointsResponse() { 533 buildListBreakpointsResponse() {
537 var o = new api.ListBreakpointsResponse(); 534 var o = new api.ListBreakpointsResponse();
538 buildCounterListBreakpointsResponse++; 535 buildCounterListBreakpointsResponse++;
539 if (buildCounterListBreakpointsResponse < 3) { 536 if (buildCounterListBreakpointsResponse < 3) {
540 o.breakpoints = buildUnnamed894(); 537 o.breakpoints = buildUnnamed897();
541 o.nextWaitToken = "foo"; 538 o.nextWaitToken = "foo";
542 } 539 }
543 buildCounterListBreakpointsResponse--; 540 buildCounterListBreakpointsResponse--;
544 return o; 541 return o;
545 } 542 }
546 543
547 checkListBreakpointsResponse(api.ListBreakpointsResponse o) { 544 checkListBreakpointsResponse(api.ListBreakpointsResponse o) {
548 buildCounterListBreakpointsResponse++; 545 buildCounterListBreakpointsResponse++;
549 if (buildCounterListBreakpointsResponse < 3) { 546 if (buildCounterListBreakpointsResponse < 3) {
550 checkUnnamed894(o.breakpoints); 547 checkUnnamed897(o.breakpoints);
551 unittest.expect(o.nextWaitToken, unittest.equals('foo')); 548 unittest.expect(o.nextWaitToken, unittest.equals('foo'));
552 } 549 }
553 buildCounterListBreakpointsResponse--; 550 buildCounterListBreakpointsResponse--;
554 } 551 }
555 552
556 buildUnnamed895() { 553 buildUnnamed898() {
557 var o = new core.List<api.Debuggee>(); 554 var o = new core.List<api.Debuggee>();
558 o.add(buildDebuggee()); 555 o.add(buildDebuggee());
559 o.add(buildDebuggee()); 556 o.add(buildDebuggee());
560 return o; 557 return o;
561 } 558 }
562 559
563 checkUnnamed895(core.List<api.Debuggee> o) { 560 checkUnnamed898(core.List<api.Debuggee> o) {
564 unittest.expect(o, unittest.hasLength(2)); 561 unittest.expect(o, unittest.hasLength(2));
565 checkDebuggee(o[0]); 562 checkDebuggee(o[0]);
566 checkDebuggee(o[1]); 563 checkDebuggee(o[1]);
567 } 564 }
568 565
569 core.int buildCounterListDebuggeesResponse = 0; 566 core.int buildCounterListDebuggeesResponse = 0;
570 buildListDebuggeesResponse() { 567 buildListDebuggeesResponse() {
571 var o = new api.ListDebuggeesResponse(); 568 var o = new api.ListDebuggeesResponse();
572 buildCounterListDebuggeesResponse++; 569 buildCounterListDebuggeesResponse++;
573 if (buildCounterListDebuggeesResponse < 3) { 570 if (buildCounterListDebuggeesResponse < 3) {
574 o.debuggees = buildUnnamed895(); 571 o.debuggees = buildUnnamed898();
575 } 572 }
576 buildCounterListDebuggeesResponse--; 573 buildCounterListDebuggeesResponse--;
577 return o; 574 return o;
578 } 575 }
579 576
580 checkListDebuggeesResponse(api.ListDebuggeesResponse o) { 577 checkListDebuggeesResponse(api.ListDebuggeesResponse o) {
581 buildCounterListDebuggeesResponse++; 578 buildCounterListDebuggeesResponse++;
582 if (buildCounterListDebuggeesResponse < 3) { 579 if (buildCounterListDebuggeesResponse < 3) {
583 checkUnnamed895(o.debuggees); 580 checkUnnamed898(o.debuggees);
584 } 581 }
585 buildCounterListDebuggeesResponse--; 582 buildCounterListDebuggeesResponse--;
586 } 583 }
587 584
588 core.int buildCounterProjectRepoId = 0; 585 core.int buildCounterProjectRepoId = 0;
589 buildProjectRepoId() { 586 buildProjectRepoId() {
590 var o = new api.ProjectRepoId(); 587 var o = new api.ProjectRepoId();
591 buildCounterProjectRepoId++; 588 buildCounterProjectRepoId++;
592 if (buildCounterProjectRepoId < 3) { 589 if (buildCounterProjectRepoId < 3) {
593 o.projectId = "foo"; 590 o.projectId = "foo";
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
723 720
724 checkSourceLocation(api.SourceLocation o) { 721 checkSourceLocation(api.SourceLocation o) {
725 buildCounterSourceLocation++; 722 buildCounterSourceLocation++;
726 if (buildCounterSourceLocation < 3) { 723 if (buildCounterSourceLocation < 3) {
727 unittest.expect(o.line, unittest.equals(42)); 724 unittest.expect(o.line, unittest.equals(42));
728 unittest.expect(o.path, unittest.equals('foo')); 725 unittest.expect(o.path, unittest.equals('foo'));
729 } 726 }
730 buildCounterSourceLocation--; 727 buildCounterSourceLocation--;
731 } 728 }
732 729
733 buildUnnamed896() { 730 buildUnnamed899() {
734 var o = new core.List<api.Variable>(); 731 var o = new core.List<api.Variable>();
735 o.add(buildVariable()); 732 o.add(buildVariable());
736 o.add(buildVariable()); 733 o.add(buildVariable());
737 return o; 734 return o;
738 } 735 }
739 736
740 checkUnnamed896(core.List<api.Variable> o) { 737 checkUnnamed899(core.List<api.Variable> o) {
741 unittest.expect(o, unittest.hasLength(2)); 738 unittest.expect(o, unittest.hasLength(2));
742 checkVariable(o[0]); 739 checkVariable(o[0]);
743 checkVariable(o[1]); 740 checkVariable(o[1]);
744 } 741 }
745 742
746 buildUnnamed897() { 743 buildUnnamed900() {
747 var o = new core.List<api.Variable>(); 744 var o = new core.List<api.Variable>();
748 o.add(buildVariable()); 745 o.add(buildVariable());
749 o.add(buildVariable()); 746 o.add(buildVariable());
750 return o; 747 return o;
751 } 748 }
752 749
753 checkUnnamed897(core.List<api.Variable> o) { 750 checkUnnamed900(core.List<api.Variable> o) {
754 unittest.expect(o, unittest.hasLength(2)); 751 unittest.expect(o, unittest.hasLength(2));
755 checkVariable(o[0]); 752 checkVariable(o[0]);
756 checkVariable(o[1]); 753 checkVariable(o[1]);
757 } 754 }
758 755
759 core.int buildCounterStackFrame = 0; 756 core.int buildCounterStackFrame = 0;
760 buildStackFrame() { 757 buildStackFrame() {
761 var o = new api.StackFrame(); 758 var o = new api.StackFrame();
762 buildCounterStackFrame++; 759 buildCounterStackFrame++;
763 if (buildCounterStackFrame < 3) { 760 if (buildCounterStackFrame < 3) {
764 o.arguments = buildUnnamed896(); 761 o.arguments = buildUnnamed899();
765 o.function = "foo"; 762 o.function = "foo";
766 o.locals = buildUnnamed897(); 763 o.locals = buildUnnamed900();
767 o.location = buildSourceLocation(); 764 o.location = buildSourceLocation();
768 } 765 }
769 buildCounterStackFrame--; 766 buildCounterStackFrame--;
770 return o; 767 return o;
771 } 768 }
772 769
773 checkStackFrame(api.StackFrame o) { 770 checkStackFrame(api.StackFrame o) {
774 buildCounterStackFrame++; 771 buildCounterStackFrame++;
775 if (buildCounterStackFrame < 3) { 772 if (buildCounterStackFrame < 3) {
776 checkUnnamed896(o.arguments); 773 checkUnnamed899(o.arguments);
777 unittest.expect(o.function, unittest.equals('foo')); 774 unittest.expect(o.function, unittest.equals('foo'));
778 checkUnnamed897(o.locals); 775 checkUnnamed900(o.locals);
779 checkSourceLocation(o.location); 776 checkSourceLocation(o.location);
780 } 777 }
781 buildCounterStackFrame--; 778 buildCounterStackFrame--;
782 } 779 }
783 780
784 core.int buildCounterStatusMessage = 0; 781 core.int buildCounterStatusMessage = 0;
785 buildStatusMessage() { 782 buildStatusMessage() {
786 var o = new api.StatusMessage(); 783 var o = new api.StatusMessage();
787 buildCounterStatusMessage++; 784 buildCounterStatusMessage++;
788 if (buildCounterStatusMessage < 3) { 785 if (buildCounterStatusMessage < 3) {
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
820 if (buildCounterUpdateActiveBreakpointRequest < 3) { 817 if (buildCounterUpdateActiveBreakpointRequest < 3) {
821 checkBreakpoint(o.breakpoint); 818 checkBreakpoint(o.breakpoint);
822 } 819 }
823 buildCounterUpdateActiveBreakpointRequest--; 820 buildCounterUpdateActiveBreakpointRequest--;
824 } 821 }
825 822
826 core.int buildCounterUpdateActiveBreakpointResponse = 0; 823 core.int buildCounterUpdateActiveBreakpointResponse = 0;
827 buildUpdateActiveBreakpointResponse() { 824 buildUpdateActiveBreakpointResponse() {
828 var o = new api.UpdateActiveBreakpointResponse(); 825 var o = new api.UpdateActiveBreakpointResponse();
829 buildCounterUpdateActiveBreakpointResponse++; 826 buildCounterUpdateActiveBreakpointResponse++;
830 if (buildCounterUpdateActiveBreakpointResponse < 3) { 827 if (buildCounterUpdateActiveBreakpointResponse < 3) {}
831 }
832 buildCounterUpdateActiveBreakpointResponse--; 828 buildCounterUpdateActiveBreakpointResponse--;
833 return o; 829 return o;
834 } 830 }
835 831
836 checkUpdateActiveBreakpointResponse(api.UpdateActiveBreakpointResponse o) { 832 checkUpdateActiveBreakpointResponse(api.UpdateActiveBreakpointResponse o) {
837 buildCounterUpdateActiveBreakpointResponse++; 833 buildCounterUpdateActiveBreakpointResponse++;
838 if (buildCounterUpdateActiveBreakpointResponse < 3) { 834 if (buildCounterUpdateActiveBreakpointResponse < 3) {}
839 }
840 buildCounterUpdateActiveBreakpointResponse--; 835 buildCounterUpdateActiveBreakpointResponse--;
841 } 836 }
842 837
843 buildUnnamed898() { 838 buildUnnamed901() {
844 var o = new core.List<api.Variable>(); 839 var o = new core.List<api.Variable>();
845 o.add(buildVariable()); 840 o.add(buildVariable());
846 o.add(buildVariable()); 841 o.add(buildVariable());
847 return o; 842 return o;
848 } 843 }
849 844
850 checkUnnamed898(core.List<api.Variable> o) { 845 checkUnnamed901(core.List<api.Variable> o) {
851 unittest.expect(o, unittest.hasLength(2)); 846 unittest.expect(o, unittest.hasLength(2));
852 checkVariable(o[0]); 847 checkVariable(o[0]);
853 checkVariable(o[1]); 848 checkVariable(o[1]);
854 } 849 }
855 850
856 core.int buildCounterVariable = 0; 851 core.int buildCounterVariable = 0;
857 buildVariable() { 852 buildVariable() {
858 var o = new api.Variable(); 853 var o = new api.Variable();
859 buildCounterVariable++; 854 buildCounterVariable++;
860 if (buildCounterVariable < 3) { 855 if (buildCounterVariable < 3) {
861 o.members = buildUnnamed898(); 856 o.members = buildUnnamed901();
862 o.name = "foo"; 857 o.name = "foo";
863 o.status = buildStatusMessage(); 858 o.status = buildStatusMessage();
864 o.type = "foo"; 859 o.type = "foo";
865 o.value = "foo"; 860 o.value = "foo";
866 o.varTableIndex = 42; 861 o.varTableIndex = 42;
867 } 862 }
868 buildCounterVariable--; 863 buildCounterVariable--;
869 return o; 864 return o;
870 } 865 }
871 866
872 checkVariable(api.Variable o) { 867 checkVariable(api.Variable o) {
873 buildCounterVariable++; 868 buildCounterVariable++;
874 if (buildCounterVariable < 3) { 869 if (buildCounterVariable < 3) {
875 checkUnnamed898(o.members); 870 checkUnnamed901(o.members);
876 unittest.expect(o.name, unittest.equals('foo')); 871 unittest.expect(o.name, unittest.equals('foo'));
877 checkStatusMessage(o.status); 872 checkStatusMessage(o.status);
878 unittest.expect(o.type, unittest.equals('foo')); 873 unittest.expect(o.type, unittest.equals('foo'));
879 unittest.expect(o.value, unittest.equals('foo')); 874 unittest.expect(o.value, unittest.equals('foo'));
880 unittest.expect(o.varTableIndex, unittest.equals(42)); 875 unittest.expect(o.varTableIndex, unittest.equals(42));
881 } 876 }
882 buildCounterVariable--; 877 buildCounterVariable--;
883 } 878 }
884 879
885
886 main() { 880 main() {
887 unittest.group("obj-schema-AliasContext", () { 881 unittest.group("obj-schema-AliasContext", () {
888 unittest.test("to-json--from-json", () { 882 unittest.test("to-json--from-json", () {
889 var o = buildAliasContext(); 883 var o = buildAliasContext();
890 var od = new api.AliasContext.fromJson(o.toJson()); 884 var od = new api.AliasContext.fromJson(o.toJson());
891 checkAliasContext(od); 885 checkAliasContext(od);
892 }); 886 });
893 }); 887 });
894 888
895
896 unittest.group("obj-schema-Breakpoint", () { 889 unittest.group("obj-schema-Breakpoint", () {
897 unittest.test("to-json--from-json", () { 890 unittest.test("to-json--from-json", () {
898 var o = buildBreakpoint(); 891 var o = buildBreakpoint();
899 var od = new api.Breakpoint.fromJson(o.toJson()); 892 var od = new api.Breakpoint.fromJson(o.toJson());
900 checkBreakpoint(od); 893 checkBreakpoint(od);
901 }); 894 });
902 }); 895 });
903 896
904
905 unittest.group("obj-schema-CloudRepoSourceContext", () { 897 unittest.group("obj-schema-CloudRepoSourceContext", () {
906 unittest.test("to-json--from-json", () { 898 unittest.test("to-json--from-json", () {
907 var o = buildCloudRepoSourceContext(); 899 var o = buildCloudRepoSourceContext();
908 var od = new api.CloudRepoSourceContext.fromJson(o.toJson()); 900 var od = new api.CloudRepoSourceContext.fromJson(o.toJson());
909 checkCloudRepoSourceContext(od); 901 checkCloudRepoSourceContext(od);
910 }); 902 });
911 }); 903 });
912 904
913
914 unittest.group("obj-schema-CloudWorkspaceId", () { 905 unittest.group("obj-schema-CloudWorkspaceId", () {
915 unittest.test("to-json--from-json", () { 906 unittest.test("to-json--from-json", () {
916 var o = buildCloudWorkspaceId(); 907 var o = buildCloudWorkspaceId();
917 var od = new api.CloudWorkspaceId.fromJson(o.toJson()); 908 var od = new api.CloudWorkspaceId.fromJson(o.toJson());
918 checkCloudWorkspaceId(od); 909 checkCloudWorkspaceId(od);
919 }); 910 });
920 }); 911 });
921 912
922
923 unittest.group("obj-schema-CloudWorkspaceSourceContext", () { 913 unittest.group("obj-schema-CloudWorkspaceSourceContext", () {
924 unittest.test("to-json--from-json", () { 914 unittest.test("to-json--from-json", () {
925 var o = buildCloudWorkspaceSourceContext(); 915 var o = buildCloudWorkspaceSourceContext();
926 var od = new api.CloudWorkspaceSourceContext.fromJson(o.toJson()); 916 var od = new api.CloudWorkspaceSourceContext.fromJson(o.toJson());
927 checkCloudWorkspaceSourceContext(od); 917 checkCloudWorkspaceSourceContext(od);
928 }); 918 });
929 }); 919 });
930 920
931
932 unittest.group("obj-schema-Debuggee", () { 921 unittest.group("obj-schema-Debuggee", () {
933 unittest.test("to-json--from-json", () { 922 unittest.test("to-json--from-json", () {
934 var o = buildDebuggee(); 923 var o = buildDebuggee();
935 var od = new api.Debuggee.fromJson(o.toJson()); 924 var od = new api.Debuggee.fromJson(o.toJson());
936 checkDebuggee(od); 925 checkDebuggee(od);
937 }); 926 });
938 }); 927 });
939 928
940
941 unittest.group("obj-schema-Empty", () { 929 unittest.group("obj-schema-Empty", () {
942 unittest.test("to-json--from-json", () { 930 unittest.test("to-json--from-json", () {
943 var o = buildEmpty(); 931 var o = buildEmpty();
944 var od = new api.Empty.fromJson(o.toJson()); 932 var od = new api.Empty.fromJson(o.toJson());
945 checkEmpty(od); 933 checkEmpty(od);
946 }); 934 });
947 }); 935 });
948 936
949
950 unittest.group("obj-schema-ExtendedSourceContext", () { 937 unittest.group("obj-schema-ExtendedSourceContext", () {
951 unittest.test("to-json--from-json", () { 938 unittest.test("to-json--from-json", () {
952 var o = buildExtendedSourceContext(); 939 var o = buildExtendedSourceContext();
953 var od = new api.ExtendedSourceContext.fromJson(o.toJson()); 940 var od = new api.ExtendedSourceContext.fromJson(o.toJson());
954 checkExtendedSourceContext(od); 941 checkExtendedSourceContext(od);
955 }); 942 });
956 }); 943 });
957 944
958
959 unittest.group("obj-schema-FormatMessage", () { 945 unittest.group("obj-schema-FormatMessage", () {
960 unittest.test("to-json--from-json", () { 946 unittest.test("to-json--from-json", () {
961 var o = buildFormatMessage(); 947 var o = buildFormatMessage();
962 var od = new api.FormatMessage.fromJson(o.toJson()); 948 var od = new api.FormatMessage.fromJson(o.toJson());
963 checkFormatMessage(od); 949 checkFormatMessage(od);
964 }); 950 });
965 }); 951 });
966 952
967
968 unittest.group("obj-schema-GerritSourceContext", () { 953 unittest.group("obj-schema-GerritSourceContext", () {
969 unittest.test("to-json--from-json", () { 954 unittest.test("to-json--from-json", () {
970 var o = buildGerritSourceContext(); 955 var o = buildGerritSourceContext();
971 var od = new api.GerritSourceContext.fromJson(o.toJson()); 956 var od = new api.GerritSourceContext.fromJson(o.toJson());
972 checkGerritSourceContext(od); 957 checkGerritSourceContext(od);
973 }); 958 });
974 }); 959 });
975 960
976
977 unittest.group("obj-schema-GetBreakpointResponse", () { 961 unittest.group("obj-schema-GetBreakpointResponse", () {
978 unittest.test("to-json--from-json", () { 962 unittest.test("to-json--from-json", () {
979 var o = buildGetBreakpointResponse(); 963 var o = buildGetBreakpointResponse();
980 var od = new api.GetBreakpointResponse.fromJson(o.toJson()); 964 var od = new api.GetBreakpointResponse.fromJson(o.toJson());
981 checkGetBreakpointResponse(od); 965 checkGetBreakpointResponse(od);
982 }); 966 });
983 }); 967 });
984 968
985
986 unittest.group("obj-schema-GitSourceContext", () { 969 unittest.group("obj-schema-GitSourceContext", () {
987 unittest.test("to-json--from-json", () { 970 unittest.test("to-json--from-json", () {
988 var o = buildGitSourceContext(); 971 var o = buildGitSourceContext();
989 var od = new api.GitSourceContext.fromJson(o.toJson()); 972 var od = new api.GitSourceContext.fromJson(o.toJson());
990 checkGitSourceContext(od); 973 checkGitSourceContext(od);
991 }); 974 });
992 }); 975 });
993 976
994
995 unittest.group("obj-schema-ListActiveBreakpointsResponse", () { 977 unittest.group("obj-schema-ListActiveBreakpointsResponse", () {
996 unittest.test("to-json--from-json", () { 978 unittest.test("to-json--from-json", () {
997 var o = buildListActiveBreakpointsResponse(); 979 var o = buildListActiveBreakpointsResponse();
998 var od = new api.ListActiveBreakpointsResponse.fromJson(o.toJson()); 980 var od = new api.ListActiveBreakpointsResponse.fromJson(o.toJson());
999 checkListActiveBreakpointsResponse(od); 981 checkListActiveBreakpointsResponse(od);
1000 }); 982 });
1001 }); 983 });
1002 984
1003
1004 unittest.group("obj-schema-ListBreakpointsResponse", () { 985 unittest.group("obj-schema-ListBreakpointsResponse", () {
1005 unittest.test("to-json--from-json", () { 986 unittest.test("to-json--from-json", () {
1006 var o = buildListBreakpointsResponse(); 987 var o = buildListBreakpointsResponse();
1007 var od = new api.ListBreakpointsResponse.fromJson(o.toJson()); 988 var od = new api.ListBreakpointsResponse.fromJson(o.toJson());
1008 checkListBreakpointsResponse(od); 989 checkListBreakpointsResponse(od);
1009 }); 990 });
1010 }); 991 });
1011 992
1012
1013 unittest.group("obj-schema-ListDebuggeesResponse", () { 993 unittest.group("obj-schema-ListDebuggeesResponse", () {
1014 unittest.test("to-json--from-json", () { 994 unittest.test("to-json--from-json", () {
1015 var o = buildListDebuggeesResponse(); 995 var o = buildListDebuggeesResponse();
1016 var od = new api.ListDebuggeesResponse.fromJson(o.toJson()); 996 var od = new api.ListDebuggeesResponse.fromJson(o.toJson());
1017 checkListDebuggeesResponse(od); 997 checkListDebuggeesResponse(od);
1018 }); 998 });
1019 }); 999 });
1020 1000
1021
1022 unittest.group("obj-schema-ProjectRepoId", () { 1001 unittest.group("obj-schema-ProjectRepoId", () {
1023 unittest.test("to-json--from-json", () { 1002 unittest.test("to-json--from-json", () {
1024 var o = buildProjectRepoId(); 1003 var o = buildProjectRepoId();
1025 var od = new api.ProjectRepoId.fromJson(o.toJson()); 1004 var od = new api.ProjectRepoId.fromJson(o.toJson());
1026 checkProjectRepoId(od); 1005 checkProjectRepoId(od);
1027 }); 1006 });
1028 }); 1007 });
1029 1008
1030
1031 unittest.group("obj-schema-RegisterDebuggeeRequest", () { 1009 unittest.group("obj-schema-RegisterDebuggeeRequest", () {
1032 unittest.test("to-json--from-json", () { 1010 unittest.test("to-json--from-json", () {
1033 var o = buildRegisterDebuggeeRequest(); 1011 var o = buildRegisterDebuggeeRequest();
1034 var od = new api.RegisterDebuggeeRequest.fromJson(o.toJson()); 1012 var od = new api.RegisterDebuggeeRequest.fromJson(o.toJson());
1035 checkRegisterDebuggeeRequest(od); 1013 checkRegisterDebuggeeRequest(od);
1036 }); 1014 });
1037 }); 1015 });
1038 1016
1039
1040 unittest.group("obj-schema-RegisterDebuggeeResponse", () { 1017 unittest.group("obj-schema-RegisterDebuggeeResponse", () {
1041 unittest.test("to-json--from-json", () { 1018 unittest.test("to-json--from-json", () {
1042 var o = buildRegisterDebuggeeResponse(); 1019 var o = buildRegisterDebuggeeResponse();
1043 var od = new api.RegisterDebuggeeResponse.fromJson(o.toJson()); 1020 var od = new api.RegisterDebuggeeResponse.fromJson(o.toJson());
1044 checkRegisterDebuggeeResponse(od); 1021 checkRegisterDebuggeeResponse(od);
1045 }); 1022 });
1046 }); 1023 });
1047 1024
1048
1049 unittest.group("obj-schema-RepoId", () { 1025 unittest.group("obj-schema-RepoId", () {
1050 unittest.test("to-json--from-json", () { 1026 unittest.test("to-json--from-json", () {
1051 var o = buildRepoId(); 1027 var o = buildRepoId();
1052 var od = new api.RepoId.fromJson(o.toJson()); 1028 var od = new api.RepoId.fromJson(o.toJson());
1053 checkRepoId(od); 1029 checkRepoId(od);
1054 }); 1030 });
1055 }); 1031 });
1056 1032
1057
1058 unittest.group("obj-schema-SetBreakpointResponse", () { 1033 unittest.group("obj-schema-SetBreakpointResponse", () {
1059 unittest.test("to-json--from-json", () { 1034 unittest.test("to-json--from-json", () {
1060 var o = buildSetBreakpointResponse(); 1035 var o = buildSetBreakpointResponse();
1061 var od = new api.SetBreakpointResponse.fromJson(o.toJson()); 1036 var od = new api.SetBreakpointResponse.fromJson(o.toJson());
1062 checkSetBreakpointResponse(od); 1037 checkSetBreakpointResponse(od);
1063 }); 1038 });
1064 }); 1039 });
1065 1040
1066
1067 unittest.group("obj-schema-SourceContext", () { 1041 unittest.group("obj-schema-SourceContext", () {
1068 unittest.test("to-json--from-json", () { 1042 unittest.test("to-json--from-json", () {
1069 var o = buildSourceContext(); 1043 var o = buildSourceContext();
1070 var od = new api.SourceContext.fromJson(o.toJson()); 1044 var od = new api.SourceContext.fromJson(o.toJson());
1071 checkSourceContext(od); 1045 checkSourceContext(od);
1072 }); 1046 });
1073 }); 1047 });
1074 1048
1075
1076 unittest.group("obj-schema-SourceLocation", () { 1049 unittest.group("obj-schema-SourceLocation", () {
1077 unittest.test("to-json--from-json", () { 1050 unittest.test("to-json--from-json", () {
1078 var o = buildSourceLocation(); 1051 var o = buildSourceLocation();
1079 var od = new api.SourceLocation.fromJson(o.toJson()); 1052 var od = new api.SourceLocation.fromJson(o.toJson());
1080 checkSourceLocation(od); 1053 checkSourceLocation(od);
1081 }); 1054 });
1082 }); 1055 });
1083 1056
1084
1085 unittest.group("obj-schema-StackFrame", () { 1057 unittest.group("obj-schema-StackFrame", () {
1086 unittest.test("to-json--from-json", () { 1058 unittest.test("to-json--from-json", () {
1087 var o = buildStackFrame(); 1059 var o = buildStackFrame();
1088 var od = new api.StackFrame.fromJson(o.toJson()); 1060 var od = new api.StackFrame.fromJson(o.toJson());
1089 checkStackFrame(od); 1061 checkStackFrame(od);
1090 }); 1062 });
1091 }); 1063 });
1092 1064
1093
1094 unittest.group("obj-schema-StatusMessage", () { 1065 unittest.group("obj-schema-StatusMessage", () {
1095 unittest.test("to-json--from-json", () { 1066 unittest.test("to-json--from-json", () {
1096 var o = buildStatusMessage(); 1067 var o = buildStatusMessage();
1097 var od = new api.StatusMessage.fromJson(o.toJson()); 1068 var od = new api.StatusMessage.fromJson(o.toJson());
1098 checkStatusMessage(od); 1069 checkStatusMessage(od);
1099 }); 1070 });
1100 }); 1071 });
1101 1072
1102
1103 unittest.group("obj-schema-UpdateActiveBreakpointRequest", () { 1073 unittest.group("obj-schema-UpdateActiveBreakpointRequest", () {
1104 unittest.test("to-json--from-json", () { 1074 unittest.test("to-json--from-json", () {
1105 var o = buildUpdateActiveBreakpointRequest(); 1075 var o = buildUpdateActiveBreakpointRequest();
1106 var od = new api.UpdateActiveBreakpointRequest.fromJson(o.toJson()); 1076 var od = new api.UpdateActiveBreakpointRequest.fromJson(o.toJson());
1107 checkUpdateActiveBreakpointRequest(od); 1077 checkUpdateActiveBreakpointRequest(od);
1108 }); 1078 });
1109 }); 1079 });
1110 1080
1111
1112 unittest.group("obj-schema-UpdateActiveBreakpointResponse", () { 1081 unittest.group("obj-schema-UpdateActiveBreakpointResponse", () {
1113 unittest.test("to-json--from-json", () { 1082 unittest.test("to-json--from-json", () {
1114 var o = buildUpdateActiveBreakpointResponse(); 1083 var o = buildUpdateActiveBreakpointResponse();
1115 var od = new api.UpdateActiveBreakpointResponse.fromJson(o.toJson()); 1084 var od = new api.UpdateActiveBreakpointResponse.fromJson(o.toJson());
1116 checkUpdateActiveBreakpointResponse(od); 1085 checkUpdateActiveBreakpointResponse(od);
1117 }); 1086 });
1118 }); 1087 });
1119 1088
1120
1121 unittest.group("obj-schema-Variable", () { 1089 unittest.group("obj-schema-Variable", () {
1122 unittest.test("to-json--from-json", () { 1090 unittest.test("to-json--from-json", () {
1123 var o = buildVariable(); 1091 var o = buildVariable();
1124 var od = new api.Variable.fromJson(o.toJson()); 1092 var od = new api.Variable.fromJson(o.toJson());
1125 checkVariable(od); 1093 checkVariable(od);
1126 }); 1094 });
1127 }); 1095 });
1128 1096
1129
1130 unittest.group("resource-ControllerDebuggeesResourceApi", () { 1097 unittest.group("resource-ControllerDebuggeesResourceApi", () {
1131 unittest.test("method--register", () { 1098 unittest.test("method--register", () {
1132
1133 var mock = new HttpServerMock(); 1099 var mock = new HttpServerMock();
1134 api.ControllerDebuggeesResourceApi res = new api.ClouddebuggerApi(mock).co ntroller.debuggees; 1100 api.ControllerDebuggeesResourceApi res =
1101 new api.ClouddebuggerApi(mock).controller.debuggees;
1135 var arg_request = buildRegisterDebuggeeRequest(); 1102 var arg_request = buildRegisterDebuggeeRequest();
1136 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { 1103 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
1137 var obj = new api.RegisterDebuggeeRequest.fromJson(json); 1104 var obj = new api.RegisterDebuggeeRequest.fromJson(json);
1138 checkRegisterDebuggeeRequest(obj); 1105 checkRegisterDebuggeeRequest(obj);
1139 1106
1140 var path = (req.url).path; 1107 var path = (req.url).path;
1141 var pathOffset = 0; 1108 var pathOffset = 0;
1142 var index; 1109 var index;
1143 var subPart; 1110 var subPart;
1144 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 1111 unittest.expect(
1112 path.substring(pathOffset, pathOffset + 1), unittest.equals("/"));
1145 pathOffset += 1; 1113 pathOffset += 1;
1146 unittest.expect(path.substring(pathOffset, pathOffset + 32), unittest.eq uals("v2/controller/debuggees/register")); 1114 unittest.expect(path.substring(pathOffset, pathOffset + 32),
1115 unittest.equals("v2/controller/debuggees/register"));
1147 pathOffset += 32; 1116 pathOffset += 32;
1148 1117
1149 var query = (req.url).query; 1118 var query = (req.url).query;
1150 var queryOffset = 0; 1119 var queryOffset = 0;
1151 var queryMap = {}; 1120 var queryMap = {};
1152 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); 1121 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
1153 parseBool(n) { 1122 parseBool(n) {
1154 if (n == "true") return true; 1123 if (n == "true") return true;
1155 if (n == "false") return false; 1124 if (n == "false") return false;
1156 if (n == null) return null; 1125 if (n == null) return null;
1157 throw new core.ArgumentError("Invalid boolean: $n"); 1126 throw new core.ArgumentError("Invalid boolean: $n");
1158 } 1127 }
1128
1159 if (query.length > 0) { 1129 if (query.length > 0) {
1160 for (var part in query.split("&")) { 1130 for (var part in query.split("&")) {
1161 var keyvalue = part.split("="); 1131 var keyvalue = part.split("=");
1162 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1])); 1132 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]),
1133 core.Uri.decodeQueryComponent(keyvalue[1]));
1163 } 1134 }
1164 } 1135 }
1165 1136
1166
1167 var h = { 1137 var h = {
1168 "content-type" : "application/json; charset=utf-8", 1138 "content-type": "application/json; charset=utf-8",
1169 }; 1139 };
1170 var resp = convert.JSON.encode(buildRegisterDebuggeeResponse()); 1140 var resp = convert.JSON.encode(buildRegisterDebuggeeResponse());
1171 return new async.Future.value(stringResponse(200, h, resp)); 1141 return new async.Future.value(stringResponse(200, h, resp));
1172 }), true); 1142 }), true);
1173 res.register(arg_request).then(unittest.expectAsync1(((api.RegisterDebugge eResponse response) { 1143 res
1144 .register(arg_request)
1145 .then(unittest.expectAsync1(((api.RegisterDebuggeeResponse response) {
1174 checkRegisterDebuggeeResponse(response); 1146 checkRegisterDebuggeeResponse(response);
1175 }))); 1147 })));
1176 }); 1148 });
1177
1178 }); 1149 });
1179 1150
1180
1181 unittest.group("resource-ControllerDebuggeesBreakpointsResourceApi", () { 1151 unittest.group("resource-ControllerDebuggeesBreakpointsResourceApi", () {
1182 unittest.test("method--list", () { 1152 unittest.test("method--list", () {
1183
1184 var mock = new HttpServerMock(); 1153 var mock = new HttpServerMock();
1185 api.ControllerDebuggeesBreakpointsResourceApi res = new api.ClouddebuggerA pi(mock).controller.debuggees.breakpoints; 1154 api.ControllerDebuggeesBreakpointsResourceApi res =
1155 new api.ClouddebuggerApi(mock).controller.debuggees.breakpoints;
1186 var arg_debuggeeId = "foo"; 1156 var arg_debuggeeId = "foo";
1187 var arg_successOnTimeout = true; 1157 var arg_successOnTimeout = true;
1188 var arg_waitToken = "foo"; 1158 var arg_waitToken = "foo";
1189 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { 1159 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
1190 var path = (req.url).path; 1160 var path = (req.url).path;
1191 var pathOffset = 0; 1161 var pathOffset = 0;
1192 var index; 1162 var index;
1193 var subPart; 1163 var subPart;
1194 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 1164 unittest.expect(
1165 path.substring(pathOffset, pathOffset + 1), unittest.equals("/"));
1195 pathOffset += 1; 1166 pathOffset += 1;
1196 unittest.expect(path.substring(pathOffset, pathOffset + 24), unittest.eq uals("v2/controller/debuggees/")); 1167 unittest.expect(path.substring(pathOffset, pathOffset + 24),
1168 unittest.equals("v2/controller/debuggees/"));
1197 pathOffset += 24; 1169 pathOffset += 24;
1198 index = path.indexOf("/breakpoints", pathOffset); 1170 index = path.indexOf("/breakpoints", pathOffset);
1199 unittest.expect(index >= 0, unittest.isTrue); 1171 unittest.expect(index >= 0, unittest.isTrue);
1200 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index )); 1172 subPart =
1173 core.Uri.decodeQueryComponent(path.substring(pathOffset, index));
1201 pathOffset = index; 1174 pathOffset = index;
1202 unittest.expect(subPart, unittest.equals("$arg_debuggeeId")); 1175 unittest.expect(subPart, unittest.equals("$arg_debuggeeId"));
1203 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq uals("/breakpoints")); 1176 unittest.expect(path.substring(pathOffset, pathOffset + 12),
1177 unittest.equals("/breakpoints"));
1204 pathOffset += 12; 1178 pathOffset += 12;
1205 1179
1206 var query = (req.url).query; 1180 var query = (req.url).query;
1207 var queryOffset = 0; 1181 var queryOffset = 0;
1208 var queryMap = {}; 1182 var queryMap = {};
1209 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); 1183 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
1210 parseBool(n) { 1184 parseBool(n) {
1211 if (n == "true") return true; 1185 if (n == "true") return true;
1212 if (n == "false") return false; 1186 if (n == "false") return false;
1213 if (n == null) return null; 1187 if (n == null) return null;
1214 throw new core.ArgumentError("Invalid boolean: $n"); 1188 throw new core.ArgumentError("Invalid boolean: $n");
1215 } 1189 }
1190
1216 if (query.length > 0) { 1191 if (query.length > 0) {
1217 for (var part in query.split("&")) { 1192 for (var part in query.split("&")) {
1218 var keyvalue = part.split("="); 1193 var keyvalue = part.split("=");
1219 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1])); 1194 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]),
1195 core.Uri.decodeQueryComponent(keyvalue[1]));
1220 } 1196 }
1221 } 1197 }
1222 unittest.expect(queryMap["successOnTimeout"].first, unittest.equals("$ar g_successOnTimeout")); 1198 unittest.expect(queryMap["successOnTimeout"].first,
1223 unittest.expect(queryMap["waitToken"].first, unittest.equals(arg_waitTok en)); 1199 unittest.equals("$arg_successOnTimeout"));
1224 1200 unittest.expect(
1201 queryMap["waitToken"].first, unittest.equals(arg_waitToken));
1225 1202
1226 var h = { 1203 var h = {
1227 "content-type" : "application/json; charset=utf-8", 1204 "content-type": "application/json; charset=utf-8",
1228 }; 1205 };
1229 var resp = convert.JSON.encode(buildListActiveBreakpointsResponse()); 1206 var resp = convert.JSON.encode(buildListActiveBreakpointsResponse());
1230 return new async.Future.value(stringResponse(200, h, resp)); 1207 return new async.Future.value(stringResponse(200, h, resp));
1231 }), true); 1208 }), true);
1232 res.list(arg_debuggeeId, successOnTimeout: arg_successOnTimeout, waitToken : arg_waitToken).then(unittest.expectAsync1(((api.ListActiveBreakpointsResponse response) { 1209 res
1210 .list(arg_debuggeeId,
1211 successOnTimeout: arg_successOnTimeout, waitToken: arg_waitToken)
1212 .then(unittest
1213 .expectAsync1(((api.ListActiveBreakpointsResponse response) {
1233 checkListActiveBreakpointsResponse(response); 1214 checkListActiveBreakpointsResponse(response);
1234 }))); 1215 })));
1235 }); 1216 });
1236 1217
1237 unittest.test("method--update", () { 1218 unittest.test("method--update", () {
1238
1239 var mock = new HttpServerMock(); 1219 var mock = new HttpServerMock();
1240 api.ControllerDebuggeesBreakpointsResourceApi res = new api.ClouddebuggerA pi(mock).controller.debuggees.breakpoints; 1220 api.ControllerDebuggeesBreakpointsResourceApi res =
1221 new api.ClouddebuggerApi(mock).controller.debuggees.breakpoints;
1241 var arg_request = buildUpdateActiveBreakpointRequest(); 1222 var arg_request = buildUpdateActiveBreakpointRequest();
1242 var arg_debuggeeId = "foo"; 1223 var arg_debuggeeId = "foo";
1243 var arg_id = "foo"; 1224 var arg_id = "foo";
1244 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { 1225 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
1245 var obj = new api.UpdateActiveBreakpointRequest.fromJson(json); 1226 var obj = new api.UpdateActiveBreakpointRequest.fromJson(json);
1246 checkUpdateActiveBreakpointRequest(obj); 1227 checkUpdateActiveBreakpointRequest(obj);
1247 1228
1248 var path = (req.url).path; 1229 var path = (req.url).path;
1249 var pathOffset = 0; 1230 var pathOffset = 0;
1250 var index; 1231 var index;
1251 var subPart; 1232 var subPart;
1252 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 1233 unittest.expect(
1234 path.substring(pathOffset, pathOffset + 1), unittest.equals("/"));
1253 pathOffset += 1; 1235 pathOffset += 1;
1254 unittest.expect(path.substring(pathOffset, pathOffset + 24), unittest.eq uals("v2/controller/debuggees/")); 1236 unittest.expect(path.substring(pathOffset, pathOffset + 24),
1237 unittest.equals("v2/controller/debuggees/"));
1255 pathOffset += 24; 1238 pathOffset += 24;
1256 index = path.indexOf("/breakpoints/", pathOffset); 1239 index = path.indexOf("/breakpoints/", pathOffset);
1257 unittest.expect(index >= 0, unittest.isTrue); 1240 unittest.expect(index >= 0, unittest.isTrue);
1258 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index )); 1241 subPart =
1242 core.Uri.decodeQueryComponent(path.substring(pathOffset, index));
1259 pathOffset = index; 1243 pathOffset = index;
1260 unittest.expect(subPart, unittest.equals("$arg_debuggeeId")); 1244 unittest.expect(subPart, unittest.equals("$arg_debuggeeId"));
1261 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq uals("/breakpoints/")); 1245 unittest.expect(path.substring(pathOffset, pathOffset + 13),
1246 unittest.equals("/breakpoints/"));
1262 pathOffset += 13; 1247 pathOffset += 13;
1263 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); 1248 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset));
1264 pathOffset = path.length; 1249 pathOffset = path.length;
1265 unittest.expect(subPart, unittest.equals("$arg_id")); 1250 unittest.expect(subPart, unittest.equals("$arg_id"));
1266 1251
1267 var query = (req.url).query; 1252 var query = (req.url).query;
1268 var queryOffset = 0; 1253 var queryOffset = 0;
1269 var queryMap = {}; 1254 var queryMap = {};
1270 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); 1255 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
1271 parseBool(n) { 1256 parseBool(n) {
1272 if (n == "true") return true; 1257 if (n == "true") return true;
1273 if (n == "false") return false; 1258 if (n == "false") return false;
1274 if (n == null) return null; 1259 if (n == null) return null;
1275 throw new core.ArgumentError("Invalid boolean: $n"); 1260 throw new core.ArgumentError("Invalid boolean: $n");
1276 } 1261 }
1262
1277 if (query.length > 0) { 1263 if (query.length > 0) {
1278 for (var part in query.split("&")) { 1264 for (var part in query.split("&")) {
1279 var keyvalue = part.split("="); 1265 var keyvalue = part.split("=");
1280 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1])); 1266 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]),
1267 core.Uri.decodeQueryComponent(keyvalue[1]));
1281 } 1268 }
1282 } 1269 }
1283 1270
1284
1285 var h = { 1271 var h = {
1286 "content-type" : "application/json; charset=utf-8", 1272 "content-type": "application/json; charset=utf-8",
1287 }; 1273 };
1288 var resp = convert.JSON.encode(buildUpdateActiveBreakpointResponse()); 1274 var resp = convert.JSON.encode(buildUpdateActiveBreakpointResponse());
1289 return new async.Future.value(stringResponse(200, h, resp)); 1275 return new async.Future.value(stringResponse(200, h, resp));
1290 }), true); 1276 }), true);
1291 res.update(arg_request, arg_debuggeeId, arg_id).then(unittest.expectAsync1 (((api.UpdateActiveBreakpointResponse response) { 1277 res.update(arg_request, arg_debuggeeId, arg_id).then(
1278 unittest.expectAsync1(((api.UpdateActiveBreakpointResponse response) {
1292 checkUpdateActiveBreakpointResponse(response); 1279 checkUpdateActiveBreakpointResponse(response);
1293 }))); 1280 })));
1294 }); 1281 });
1295
1296 }); 1282 });
1297 1283
1298
1299 unittest.group("resource-DebuggerDebuggeesResourceApi", () { 1284 unittest.group("resource-DebuggerDebuggeesResourceApi", () {
1300 unittest.test("method--list", () { 1285 unittest.test("method--list", () {
1301
1302 var mock = new HttpServerMock(); 1286 var mock = new HttpServerMock();
1303 api.DebuggerDebuggeesResourceApi res = new api.ClouddebuggerApi(mock).debu gger.debuggees; 1287 api.DebuggerDebuggeesResourceApi res =
1288 new api.ClouddebuggerApi(mock).debugger.debuggees;
1304 var arg_clientVersion = "foo"; 1289 var arg_clientVersion = "foo";
1305 var arg_includeInactive = true; 1290 var arg_includeInactive = true;
1306 var arg_project = "foo"; 1291 var arg_project = "foo";
1307 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { 1292 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
1308 var path = (req.url).path; 1293 var path = (req.url).path;
1309 var pathOffset = 0; 1294 var pathOffset = 0;
1310 var index; 1295 var index;
1311 var subPart; 1296 var subPart;
1312 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 1297 unittest.expect(
1298 path.substring(pathOffset, pathOffset + 1), unittest.equals("/"));
1313 pathOffset += 1; 1299 pathOffset += 1;
1314 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq uals("v2/debugger/debuggees")); 1300 unittest.expect(path.substring(pathOffset, pathOffset + 21),
1301 unittest.equals("v2/debugger/debuggees"));
1315 pathOffset += 21; 1302 pathOffset += 21;
1316 1303
1317 var query = (req.url).query; 1304 var query = (req.url).query;
1318 var queryOffset = 0; 1305 var queryOffset = 0;
1319 var queryMap = {}; 1306 var queryMap = {};
1320 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); 1307 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
1321 parseBool(n) { 1308 parseBool(n) {
1322 if (n == "true") return true; 1309 if (n == "true") return true;
1323 if (n == "false") return false; 1310 if (n == "false") return false;
1324 if (n == null) return null; 1311 if (n == null) return null;
1325 throw new core.ArgumentError("Invalid boolean: $n"); 1312 throw new core.ArgumentError("Invalid boolean: $n");
1326 } 1313 }
1314
1327 if (query.length > 0) { 1315 if (query.length > 0) {
1328 for (var part in query.split("&")) { 1316 for (var part in query.split("&")) {
1329 var keyvalue = part.split("="); 1317 var keyvalue = part.split("=");
1330 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1])); 1318 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]),
1319 core.Uri.decodeQueryComponent(keyvalue[1]));
1331 } 1320 }
1332 } 1321 }
1333 unittest.expect(queryMap["clientVersion"].first, unittest.equals(arg_cli entVersion)); 1322 unittest.expect(queryMap["clientVersion"].first,
1334 unittest.expect(queryMap["includeInactive"].first, unittest.equals("$arg _includeInactive")); 1323 unittest.equals(arg_clientVersion));
1335 unittest.expect(queryMap["project"].first, unittest.equals(arg_project)) ; 1324 unittest.expect(queryMap["includeInactive"].first,
1336 1325 unittest.equals("$arg_includeInactive"));
1326 unittest.expect(
1327 queryMap["project"].first, unittest.equals(arg_project));
1337 1328
1338 var h = { 1329 var h = {
1339 "content-type" : "application/json; charset=utf-8", 1330 "content-type": "application/json; charset=utf-8",
1340 }; 1331 };
1341 var resp = convert.JSON.encode(buildListDebuggeesResponse()); 1332 var resp = convert.JSON.encode(buildListDebuggeesResponse());
1342 return new async.Future.value(stringResponse(200, h, resp)); 1333 return new async.Future.value(stringResponse(200, h, resp));
1343 }), true); 1334 }), true);
1344 res.list(clientVersion: arg_clientVersion, includeInactive: arg_includeIna ctive, project: arg_project).then(unittest.expectAsync1(((api.ListDebuggeesRespo nse response) { 1335 res
1336 .list(
1337 clientVersion: arg_clientVersion,
1338 includeInactive: arg_includeInactive,
1339 project: arg_project)
1340 .then(unittest.expectAsync1(((api.ListDebuggeesResponse response) {
1345 checkListDebuggeesResponse(response); 1341 checkListDebuggeesResponse(response);
1346 }))); 1342 })));
1347 }); 1343 });
1348
1349 }); 1344 });
1350 1345
1351
1352 unittest.group("resource-DebuggerDebuggeesBreakpointsResourceApi", () { 1346 unittest.group("resource-DebuggerDebuggeesBreakpointsResourceApi", () {
1353 unittest.test("method--delete", () { 1347 unittest.test("method--delete", () {
1354
1355 var mock = new HttpServerMock(); 1348 var mock = new HttpServerMock();
1356 api.DebuggerDebuggeesBreakpointsResourceApi res = new api.ClouddebuggerApi (mock).debugger.debuggees.breakpoints; 1349 api.DebuggerDebuggeesBreakpointsResourceApi res =
1350 new api.ClouddebuggerApi(mock).debugger.debuggees.breakpoints;
1357 var arg_debuggeeId = "foo"; 1351 var arg_debuggeeId = "foo";
1358 var arg_breakpointId = "foo"; 1352 var arg_breakpointId = "foo";
1359 var arg_clientVersion = "foo"; 1353 var arg_clientVersion = "foo";
1360 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { 1354 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
1361 var path = (req.url).path; 1355 var path = (req.url).path;
1362 var pathOffset = 0; 1356 var pathOffset = 0;
1363 var index; 1357 var index;
1364 var subPart; 1358 var subPart;
1365 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 1359 unittest.expect(
1360 path.substring(pathOffset, pathOffset + 1), unittest.equals("/"));
1366 pathOffset += 1; 1361 pathOffset += 1;
1367 unittest.expect(path.substring(pathOffset, pathOffset + 22), unittest.eq uals("v2/debugger/debuggees/")); 1362 unittest.expect(path.substring(pathOffset, pathOffset + 22),
1363 unittest.equals("v2/debugger/debuggees/"));
1368 pathOffset += 22; 1364 pathOffset += 22;
1369 index = path.indexOf("/breakpoints/", pathOffset); 1365 index = path.indexOf("/breakpoints/", pathOffset);
1370 unittest.expect(index >= 0, unittest.isTrue); 1366 unittest.expect(index >= 0, unittest.isTrue);
1371 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index )); 1367 subPart =
1368 core.Uri.decodeQueryComponent(path.substring(pathOffset, index));
1372 pathOffset = index; 1369 pathOffset = index;
1373 unittest.expect(subPart, unittest.equals("$arg_debuggeeId")); 1370 unittest.expect(subPart, unittest.equals("$arg_debuggeeId"));
1374 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq uals("/breakpoints/")); 1371 unittest.expect(path.substring(pathOffset, pathOffset + 13),
1372 unittest.equals("/breakpoints/"));
1375 pathOffset += 13; 1373 pathOffset += 13;
1376 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); 1374 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset));
1377 pathOffset = path.length; 1375 pathOffset = path.length;
1378 unittest.expect(subPart, unittest.equals("$arg_breakpointId")); 1376 unittest.expect(subPart, unittest.equals("$arg_breakpointId"));
1379 1377
1380 var query = (req.url).query; 1378 var query = (req.url).query;
1381 var queryOffset = 0; 1379 var queryOffset = 0;
1382 var queryMap = {}; 1380 var queryMap = {};
1383 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); 1381 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
1384 parseBool(n) { 1382 parseBool(n) {
1385 if (n == "true") return true; 1383 if (n == "true") return true;
1386 if (n == "false") return false; 1384 if (n == "false") return false;
1387 if (n == null) return null; 1385 if (n == null) return null;
1388 throw new core.ArgumentError("Invalid boolean: $n"); 1386 throw new core.ArgumentError("Invalid boolean: $n");
1389 } 1387 }
1388
1390 if (query.length > 0) { 1389 if (query.length > 0) {
1391 for (var part in query.split("&")) { 1390 for (var part in query.split("&")) {
1392 var keyvalue = part.split("="); 1391 var keyvalue = part.split("=");
1393 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1])); 1392 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]),
1393 core.Uri.decodeQueryComponent(keyvalue[1]));
1394 } 1394 }
1395 } 1395 }
1396 unittest.expect(queryMap["clientVersion"].first, unittest.equals(arg_cli entVersion)); 1396 unittest.expect(queryMap["clientVersion"].first,
1397 1397 unittest.equals(arg_clientVersion));
1398 1398
1399 var h = { 1399 var h = {
1400 "content-type" : "application/json; charset=utf-8", 1400 "content-type": "application/json; charset=utf-8",
1401 }; 1401 };
1402 var resp = convert.JSON.encode(buildEmpty()); 1402 var resp = convert.JSON.encode(buildEmpty());
1403 return new async.Future.value(stringResponse(200, h, resp)); 1403 return new async.Future.value(stringResponse(200, h, resp));
1404 }), true); 1404 }), true);
1405 res.delete(arg_debuggeeId, arg_breakpointId, clientVersion: arg_clientVers ion).then(unittest.expectAsync1(((api.Empty response) { 1405 res
1406 .delete(arg_debuggeeId, arg_breakpointId,
1407 clientVersion: arg_clientVersion)
1408 .then(unittest.expectAsync1(((api.Empty response) {
1406 checkEmpty(response); 1409 checkEmpty(response);
1407 }))); 1410 })));
1408 }); 1411 });
1409 1412
1410 unittest.test("method--get", () { 1413 unittest.test("method--get", () {
1411
1412 var mock = new HttpServerMock(); 1414 var mock = new HttpServerMock();
1413 api.DebuggerDebuggeesBreakpointsResourceApi res = new api.ClouddebuggerApi (mock).debugger.debuggees.breakpoints; 1415 api.DebuggerDebuggeesBreakpointsResourceApi res =
1416 new api.ClouddebuggerApi(mock).debugger.debuggees.breakpoints;
1414 var arg_debuggeeId = "foo"; 1417 var arg_debuggeeId = "foo";
1415 var arg_breakpointId = "foo"; 1418 var arg_breakpointId = "foo";
1416 var arg_clientVersion = "foo"; 1419 var arg_clientVersion = "foo";
1417 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { 1420 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
1418 var path = (req.url).path; 1421 var path = (req.url).path;
1419 var pathOffset = 0; 1422 var pathOffset = 0;
1420 var index; 1423 var index;
1421 var subPart; 1424 var subPart;
1422 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 1425 unittest.expect(
1426 path.substring(pathOffset, pathOffset + 1), unittest.equals("/"));
1423 pathOffset += 1; 1427 pathOffset += 1;
1424 unittest.expect(path.substring(pathOffset, pathOffset + 22), unittest.eq uals("v2/debugger/debuggees/")); 1428 unittest.expect(path.substring(pathOffset, pathOffset + 22),
1429 unittest.equals("v2/debugger/debuggees/"));
1425 pathOffset += 22; 1430 pathOffset += 22;
1426 index = path.indexOf("/breakpoints/", pathOffset); 1431 index = path.indexOf("/breakpoints/", pathOffset);
1427 unittest.expect(index >= 0, unittest.isTrue); 1432 unittest.expect(index >= 0, unittest.isTrue);
1428 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index )); 1433 subPart =
1434 core.Uri.decodeQueryComponent(path.substring(pathOffset, index));
1429 pathOffset = index; 1435 pathOffset = index;
1430 unittest.expect(subPart, unittest.equals("$arg_debuggeeId")); 1436 unittest.expect(subPart, unittest.equals("$arg_debuggeeId"));
1431 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq uals("/breakpoints/")); 1437 unittest.expect(path.substring(pathOffset, pathOffset + 13),
1438 unittest.equals("/breakpoints/"));
1432 pathOffset += 13; 1439 pathOffset += 13;
1433 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); 1440 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset));
1434 pathOffset = path.length; 1441 pathOffset = path.length;
1435 unittest.expect(subPart, unittest.equals("$arg_breakpointId")); 1442 unittest.expect(subPart, unittest.equals("$arg_breakpointId"));
1436 1443
1437 var query = (req.url).query; 1444 var query = (req.url).query;
1438 var queryOffset = 0; 1445 var queryOffset = 0;
1439 var queryMap = {}; 1446 var queryMap = {};
1440 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); 1447 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
1441 parseBool(n) { 1448 parseBool(n) {
1442 if (n == "true") return true; 1449 if (n == "true") return true;
1443 if (n == "false") return false; 1450 if (n == "false") return false;
1444 if (n == null) return null; 1451 if (n == null) return null;
1445 throw new core.ArgumentError("Invalid boolean: $n"); 1452 throw new core.ArgumentError("Invalid boolean: $n");
1446 } 1453 }
1454
1447 if (query.length > 0) { 1455 if (query.length > 0) {
1448 for (var part in query.split("&")) { 1456 for (var part in query.split("&")) {
1449 var keyvalue = part.split("="); 1457 var keyvalue = part.split("=");
1450 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1])); 1458 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]),
1459 core.Uri.decodeQueryComponent(keyvalue[1]));
1451 } 1460 }
1452 } 1461 }
1453 unittest.expect(queryMap["clientVersion"].first, unittest.equals(arg_cli entVersion)); 1462 unittest.expect(queryMap["clientVersion"].first,
1454 1463 unittest.equals(arg_clientVersion));
1455 1464
1456 var h = { 1465 var h = {
1457 "content-type" : "application/json; charset=utf-8", 1466 "content-type": "application/json; charset=utf-8",
1458 }; 1467 };
1459 var resp = convert.JSON.encode(buildGetBreakpointResponse()); 1468 var resp = convert.JSON.encode(buildGetBreakpointResponse());
1460 return new async.Future.value(stringResponse(200, h, resp)); 1469 return new async.Future.value(stringResponse(200, h, resp));
1461 }), true); 1470 }), true);
1462 res.get(arg_debuggeeId, arg_breakpointId, clientVersion: arg_clientVersion ).then(unittest.expectAsync1(((api.GetBreakpointResponse response) { 1471 res
1472 .get(arg_debuggeeId, arg_breakpointId,
1473 clientVersion: arg_clientVersion)
1474 .then(unittest.expectAsync1(((api.GetBreakpointResponse response) {
1463 checkGetBreakpointResponse(response); 1475 checkGetBreakpointResponse(response);
1464 }))); 1476 })));
1465 }); 1477 });
1466 1478
1467 unittest.test("method--list", () { 1479 unittest.test("method--list", () {
1468
1469 var mock = new HttpServerMock(); 1480 var mock = new HttpServerMock();
1470 api.DebuggerDebuggeesBreakpointsResourceApi res = new api.ClouddebuggerApi (mock).debugger.debuggees.breakpoints; 1481 api.DebuggerDebuggeesBreakpointsResourceApi res =
1482 new api.ClouddebuggerApi(mock).debugger.debuggees.breakpoints;
1471 var arg_debuggeeId = "foo"; 1483 var arg_debuggeeId = "foo";
1484 var arg_includeAllUsers = true;
1485 var arg_includeInactive = true;
1472 var arg_stripResults = true; 1486 var arg_stripResults = true;
1473 var arg_waitToken = "foo"; 1487 var arg_waitToken = "foo";
1474 var arg_clientVersion = "foo"; 1488 var arg_clientVersion = "foo";
1475 var arg_action_value = "foo"; 1489 var arg_action_value = "foo";
1476 var arg_includeInactive = true;
1477 var arg_includeAllUsers = true;
1478 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { 1490 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
1479 var path = (req.url).path; 1491 var path = (req.url).path;
1480 var pathOffset = 0; 1492 var pathOffset = 0;
1481 var index; 1493 var index;
1482 var subPart; 1494 var subPart;
1483 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 1495 unittest.expect(
1496 path.substring(pathOffset, pathOffset + 1), unittest.equals("/"));
1484 pathOffset += 1; 1497 pathOffset += 1;
1485 unittest.expect(path.substring(pathOffset, pathOffset + 22), unittest.eq uals("v2/debugger/debuggees/")); 1498 unittest.expect(path.substring(pathOffset, pathOffset + 22),
1499 unittest.equals("v2/debugger/debuggees/"));
1486 pathOffset += 22; 1500 pathOffset += 22;
1487 index = path.indexOf("/breakpoints", pathOffset); 1501 index = path.indexOf("/breakpoints", pathOffset);
1488 unittest.expect(index >= 0, unittest.isTrue); 1502 unittest.expect(index >= 0, unittest.isTrue);
1489 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index )); 1503 subPart =
1504 core.Uri.decodeQueryComponent(path.substring(pathOffset, index));
1490 pathOffset = index; 1505 pathOffset = index;
1491 unittest.expect(subPart, unittest.equals("$arg_debuggeeId")); 1506 unittest.expect(subPart, unittest.equals("$arg_debuggeeId"));
1492 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq uals("/breakpoints")); 1507 unittest.expect(path.substring(pathOffset, pathOffset + 12),
1508 unittest.equals("/breakpoints"));
1493 pathOffset += 12; 1509 pathOffset += 12;
1494 1510
1495 var query = (req.url).query; 1511 var query = (req.url).query;
1496 var queryOffset = 0; 1512 var queryOffset = 0;
1497 var queryMap = {}; 1513 var queryMap = {};
1498 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); 1514 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
1499 parseBool(n) { 1515 parseBool(n) {
1500 if (n == "true") return true; 1516 if (n == "true") return true;
1501 if (n == "false") return false; 1517 if (n == "false") return false;
1502 if (n == null) return null; 1518 if (n == null) return null;
1503 throw new core.ArgumentError("Invalid boolean: $n"); 1519 throw new core.ArgumentError("Invalid boolean: $n");
1504 } 1520 }
1521
1505 if (query.length > 0) { 1522 if (query.length > 0) {
1506 for (var part in query.split("&")) { 1523 for (var part in query.split("&")) {
1507 var keyvalue = part.split("="); 1524 var keyvalue = part.split("=");
1508 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1])); 1525 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]),
1526 core.Uri.decodeQueryComponent(keyvalue[1]));
1509 } 1527 }
1510 } 1528 }
1511 unittest.expect(queryMap["stripResults"].first, unittest.equals("$arg_st ripResults")); 1529 unittest.expect(queryMap["includeAllUsers"].first,
1512 unittest.expect(queryMap["waitToken"].first, unittest.equals(arg_waitTok en)); 1530 unittest.equals("$arg_includeAllUsers"));
1513 unittest.expect(queryMap["clientVersion"].first, unittest.equals(arg_cli entVersion)); 1531 unittest.expect(queryMap["includeInactive"].first,
1514 unittest.expect(queryMap["action.value"].first, unittest.equals(arg_acti on_value)); 1532 unittest.equals("$arg_includeInactive"));
1515 unittest.expect(queryMap["includeInactive"].first, unittest.equals("$arg _includeInactive")); 1533 unittest.expect(queryMap["stripResults"].first,
1516 unittest.expect(queryMap["includeAllUsers"].first, unittest.equals("$arg _includeAllUsers")); 1534 unittest.equals("$arg_stripResults"));
1517 1535 unittest.expect(
1536 queryMap["waitToken"].first, unittest.equals(arg_waitToken));
1537 unittest.expect(queryMap["clientVersion"].first,
1538 unittest.equals(arg_clientVersion));
1539 unittest.expect(
1540 queryMap["action.value"].first, unittest.equals(arg_action_value));
1518 1541
1519 var h = { 1542 var h = {
1520 "content-type" : "application/json; charset=utf-8", 1543 "content-type": "application/json; charset=utf-8",
1521 }; 1544 };
1522 var resp = convert.JSON.encode(buildListBreakpointsResponse()); 1545 var resp = convert.JSON.encode(buildListBreakpointsResponse());
1523 return new async.Future.value(stringResponse(200, h, resp)); 1546 return new async.Future.value(stringResponse(200, h, resp));
1524 }), true); 1547 }), true);
1525 res.list(arg_debuggeeId, stripResults: arg_stripResults, waitToken: arg_wa itToken, clientVersion: arg_clientVersion, action_value: arg_action_value, inclu deInactive: arg_includeInactive, includeAllUsers: arg_includeAllUsers).then(unit test.expectAsync1(((api.ListBreakpointsResponse response) { 1548 res
1549 .list(arg_debuggeeId,
1550 includeAllUsers: arg_includeAllUsers,
1551 includeInactive: arg_includeInactive,
1552 stripResults: arg_stripResults,
1553 waitToken: arg_waitToken,
1554 clientVersion: arg_clientVersion,
1555 action_value: arg_action_value)
1556 .then(unittest.expectAsync1(((api.ListBreakpointsResponse response) {
1526 checkListBreakpointsResponse(response); 1557 checkListBreakpointsResponse(response);
1527 }))); 1558 })));
1528 }); 1559 });
1529 1560
1530 unittest.test("method--set", () { 1561 unittest.test("method--set", () {
1531
1532 var mock = new HttpServerMock(); 1562 var mock = new HttpServerMock();
1533 api.DebuggerDebuggeesBreakpointsResourceApi res = new api.ClouddebuggerApi (mock).debugger.debuggees.breakpoints; 1563 api.DebuggerDebuggeesBreakpointsResourceApi res =
1564 new api.ClouddebuggerApi(mock).debugger.debuggees.breakpoints;
1534 var arg_request = buildBreakpoint(); 1565 var arg_request = buildBreakpoint();
1535 var arg_debuggeeId = "foo"; 1566 var arg_debuggeeId = "foo";
1536 var arg_clientVersion = "foo"; 1567 var arg_clientVersion = "foo";
1537 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { 1568 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
1538 var obj = new api.Breakpoint.fromJson(json); 1569 var obj = new api.Breakpoint.fromJson(json);
1539 checkBreakpoint(obj); 1570 checkBreakpoint(obj);
1540 1571
1541 var path = (req.url).path; 1572 var path = (req.url).path;
1542 var pathOffset = 0; 1573 var pathOffset = 0;
1543 var index; 1574 var index;
1544 var subPart; 1575 var subPart;
1545 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 1576 unittest.expect(
1577 path.substring(pathOffset, pathOffset + 1), unittest.equals("/"));
1546 pathOffset += 1; 1578 pathOffset += 1;
1547 unittest.expect(path.substring(pathOffset, pathOffset + 22), unittest.eq uals("v2/debugger/debuggees/")); 1579 unittest.expect(path.substring(pathOffset, pathOffset + 22),
1580 unittest.equals("v2/debugger/debuggees/"));
1548 pathOffset += 22; 1581 pathOffset += 22;
1549 index = path.indexOf("/breakpoints/set", pathOffset); 1582 index = path.indexOf("/breakpoints/set", pathOffset);
1550 unittest.expect(index >= 0, unittest.isTrue); 1583 unittest.expect(index >= 0, unittest.isTrue);
1551 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index )); 1584 subPart =
1585 core.Uri.decodeQueryComponent(path.substring(pathOffset, index));
1552 pathOffset = index; 1586 pathOffset = index;
1553 unittest.expect(subPart, unittest.equals("$arg_debuggeeId")); 1587 unittest.expect(subPart, unittest.equals("$arg_debuggeeId"));
1554 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq uals("/breakpoints/set")); 1588 unittest.expect(path.substring(pathOffset, pathOffset + 16),
1589 unittest.equals("/breakpoints/set"));
1555 pathOffset += 16; 1590 pathOffset += 16;
1556 1591
1557 var query = (req.url).query; 1592 var query = (req.url).query;
1558 var queryOffset = 0; 1593 var queryOffset = 0;
1559 var queryMap = {}; 1594 var queryMap = {};
1560 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); 1595 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
1561 parseBool(n) { 1596 parseBool(n) {
1562 if (n == "true") return true; 1597 if (n == "true") return true;
1563 if (n == "false") return false; 1598 if (n == "false") return false;
1564 if (n == null) return null; 1599 if (n == null) return null;
1565 throw new core.ArgumentError("Invalid boolean: $n"); 1600 throw new core.ArgumentError("Invalid boolean: $n");
1566 } 1601 }
1602
1567 if (query.length > 0) { 1603 if (query.length > 0) {
1568 for (var part in query.split("&")) { 1604 for (var part in query.split("&")) {
1569 var keyvalue = part.split("="); 1605 var keyvalue = part.split("=");
1570 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1])); 1606 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]),
1607 core.Uri.decodeQueryComponent(keyvalue[1]));
1571 } 1608 }
1572 } 1609 }
1573 unittest.expect(queryMap["clientVersion"].first, unittest.equals(arg_cli entVersion)); 1610 unittest.expect(queryMap["clientVersion"].first,
1574 1611 unittest.equals(arg_clientVersion));
1575 1612
1576 var h = { 1613 var h = {
1577 "content-type" : "application/json; charset=utf-8", 1614 "content-type": "application/json; charset=utf-8",
1578 }; 1615 };
1579 var resp = convert.JSON.encode(buildSetBreakpointResponse()); 1616 var resp = convert.JSON.encode(buildSetBreakpointResponse());
1580 return new async.Future.value(stringResponse(200, h, resp)); 1617 return new async.Future.value(stringResponse(200, h, resp));
1581 }), true); 1618 }), true);
1582 res.set(arg_request, arg_debuggeeId, clientVersion: arg_clientVersion).the n(unittest.expectAsync1(((api.SetBreakpointResponse response) { 1619 res
1620 .set(arg_request, arg_debuggeeId, clientVersion: arg_clientVersion)
1621 .then(unittest.expectAsync1(((api.SetBreakpointResponse response) {
1583 checkSetBreakpointResponse(response); 1622 checkSetBreakpointResponse(response);
1584 }))); 1623 })));
1585 }); 1624 });
1586
1587 }); 1625 });
1588
1589
1590 } 1626 }
1591
OLDNEW
« no previous file with comments | « generated/googleapis/test/cloudbuild/v1_test.dart ('k') | generated/googleapis/test/cloudfunctions/v1_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698