| OLD | NEW |
| 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; | 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/clouddebugger/v2.dart' as api; | 12 import 'package:googleapis/clouddebugger/v2.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 Loading... |
| 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 buildCounterAliasContext = 0; | 54 core.int buildCounterAliasContext = 0; |
| 55 buildAliasContext() { | 55 buildAliasContext() { |
| 56 var o = new api.AliasContext(); | 56 var o = new api.AliasContext(); |
| 57 buildCounterAliasContext++; | 57 buildCounterAliasContext++; |
| 58 if (buildCounterAliasContext < 3) { | 58 if (buildCounterAliasContext < 3) { |
| 59 o.kind = "foo"; | 59 o.kind = "foo"; |
| 60 o.name = "foo"; | 60 o.name = "foo"; |
| 61 } | 61 } |
| 62 buildCounterAliasContext--; | 62 buildCounterAliasContext--; |
| 63 return o; | 63 return o; |
| 64 } | 64 } |
| 65 | 65 |
| 66 checkAliasContext(api.AliasContext o) { | 66 checkAliasContext(api.AliasContext o) { |
| 67 buildCounterAliasContext++; | 67 buildCounterAliasContext++; |
| 68 if (buildCounterAliasContext < 3) { | 68 if (buildCounterAliasContext < 3) { |
| 69 unittest.expect(o.kind, unittest.equals('foo')); | 69 unittest.expect(o.kind, unittest.equals('foo')); |
| 70 unittest.expect(o.name, unittest.equals('foo')); | 70 unittest.expect(o.name, unittest.equals('foo')); |
| 71 } | 71 } |
| 72 buildCounterAliasContext--; | 72 buildCounterAliasContext--; |
| 73 } | 73 } |
| 74 | 74 |
| 75 buildUnnamed809() { | 75 buildUnnamed816() { |
| 76 var o = new core.List<api.Variable>(); | 76 var o = new core.List<api.Variable>(); |
| 77 o.add(buildVariable()); | 77 o.add(buildVariable()); |
| 78 o.add(buildVariable()); | 78 o.add(buildVariable()); |
| 79 return o; | 79 return o; |
| 80 } | 80 } |
| 81 | 81 |
| 82 checkUnnamed809(core.List<api.Variable> o) { | 82 checkUnnamed816(core.List<api.Variable> o) { |
| 83 unittest.expect(o, unittest.hasLength(2)); | 83 unittest.expect(o, unittest.hasLength(2)); |
| 84 checkVariable(o[0]); | 84 checkVariable(o[0]); |
| 85 checkVariable(o[1]); | 85 checkVariable(o[1]); |
| 86 } | 86 } |
| 87 | 87 |
| 88 buildUnnamed810() { | 88 buildUnnamed817() { |
| 89 var o = new core.List<core.String>(); | 89 var o = new core.List<core.String>(); |
| 90 o.add("foo"); | 90 o.add("foo"); |
| 91 o.add("foo"); | 91 o.add("foo"); |
| 92 return o; | 92 return o; |
| 93 } | 93 } |
| 94 | 94 |
| 95 checkUnnamed810(core.List<core.String> o) { | 95 checkUnnamed817(core.List<core.String> o) { |
| 96 unittest.expect(o, unittest.hasLength(2)); | 96 unittest.expect(o, unittest.hasLength(2)); |
| 97 unittest.expect(o[0], unittest.equals('foo')); | 97 unittest.expect(o[0], unittest.equals('foo')); |
| 98 unittest.expect(o[1], unittest.equals('foo')); | 98 unittest.expect(o[1], unittest.equals('foo')); |
| 99 } | 99 } |
| 100 | 100 |
| 101 buildUnnamed811() { | 101 buildUnnamed818() { |
| 102 var o = new core.Map<core.String, core.String>(); | 102 var o = new core.Map<core.String, core.String>(); |
| 103 o["x"] = "foo"; | 103 o["x"] = "foo"; |
| 104 o["y"] = "foo"; | 104 o["y"] = "foo"; |
| 105 return o; | 105 return o; |
| 106 } | 106 } |
| 107 | 107 |
| 108 checkUnnamed811(core.Map<core.String, core.String> o) { | 108 checkUnnamed818(core.Map<core.String, core.String> o) { |
| 109 unittest.expect(o, unittest.hasLength(2)); | 109 unittest.expect(o, unittest.hasLength(2)); |
| 110 unittest.expect(o["x"], unittest.equals('foo')); | 110 unittest.expect(o["x"], unittest.equals('foo')); |
| 111 unittest.expect(o["y"], unittest.equals('foo')); | 111 unittest.expect(o["y"], unittest.equals('foo')); |
| 112 } | 112 } |
| 113 | 113 |
| 114 buildUnnamed812() { | 114 buildUnnamed819() { |
| 115 var o = new core.List<api.StackFrame>(); | 115 var o = new core.List<api.StackFrame>(); |
| 116 o.add(buildStackFrame()); | 116 o.add(buildStackFrame()); |
| 117 o.add(buildStackFrame()); | 117 o.add(buildStackFrame()); |
| 118 return o; | 118 return o; |
| 119 } | 119 } |
| 120 | 120 |
| 121 checkUnnamed812(core.List<api.StackFrame> o) { | 121 checkUnnamed819(core.List<api.StackFrame> o) { |
| 122 unittest.expect(o, unittest.hasLength(2)); | 122 unittest.expect(o, unittest.hasLength(2)); |
| 123 checkStackFrame(o[0]); | 123 checkStackFrame(o[0]); |
| 124 checkStackFrame(o[1]); | 124 checkStackFrame(o[1]); |
| 125 } | 125 } |
| 126 | 126 |
| 127 buildUnnamed813() { | 127 buildUnnamed820() { |
| 128 var o = new core.List<api.Variable>(); | 128 var o = new core.List<api.Variable>(); |
| 129 o.add(buildVariable()); | 129 o.add(buildVariable()); |
| 130 o.add(buildVariable()); | 130 o.add(buildVariable()); |
| 131 return o; | 131 return o; |
| 132 } | 132 } |
| 133 | 133 |
| 134 checkUnnamed813(core.List<api.Variable> o) { | 134 checkUnnamed820(core.List<api.Variable> o) { |
| 135 unittest.expect(o, unittest.hasLength(2)); | 135 unittest.expect(o, unittest.hasLength(2)); |
| 136 checkVariable(o[0]); | 136 checkVariable(o[0]); |
| 137 checkVariable(o[1]); | 137 checkVariable(o[1]); |
| 138 } | 138 } |
| 139 | 139 |
| 140 core.int buildCounterBreakpoint = 0; | 140 core.int buildCounterBreakpoint = 0; |
| 141 buildBreakpoint() { | 141 buildBreakpoint() { |
| 142 var o = new api.Breakpoint(); | 142 var o = new api.Breakpoint(); |
| 143 buildCounterBreakpoint++; | 143 buildCounterBreakpoint++; |
| 144 if (buildCounterBreakpoint < 3) { | 144 if (buildCounterBreakpoint < 3) { |
| 145 o.action = "foo"; | 145 o.action = "foo"; |
| 146 o.condition = "foo"; | 146 o.condition = "foo"; |
| 147 o.createTime = "foo"; | 147 o.createTime = "foo"; |
| 148 o.evaluatedExpressions = buildUnnamed809(); | 148 o.evaluatedExpressions = buildUnnamed816(); |
| 149 o.expressions = buildUnnamed810(); | 149 o.expressions = buildUnnamed817(); |
| 150 o.finalTime = "foo"; | 150 o.finalTime = "foo"; |
| 151 o.id = "foo"; | 151 o.id = "foo"; |
| 152 o.isFinalState = true; | 152 o.isFinalState = true; |
| 153 o.labels = buildUnnamed811(); | 153 o.labels = buildUnnamed818(); |
| 154 o.location = buildSourceLocation(); | 154 o.location = buildSourceLocation(); |
| 155 o.logLevel = "foo"; | 155 o.logLevel = "foo"; |
| 156 o.logMessageFormat = "foo"; | 156 o.logMessageFormat = "foo"; |
| 157 o.stackFrames = buildUnnamed812(); | 157 o.stackFrames = buildUnnamed819(); |
| 158 o.status = buildStatusMessage(); | 158 o.status = buildStatusMessage(); |
| 159 o.userEmail = "foo"; | 159 o.userEmail = "foo"; |
| 160 o.variableTable = buildUnnamed813(); | 160 o.variableTable = buildUnnamed820(); |
| 161 } | 161 } |
| 162 buildCounterBreakpoint--; | 162 buildCounterBreakpoint--; |
| 163 return o; | 163 return o; |
| 164 } | 164 } |
| 165 | 165 |
| 166 checkBreakpoint(api.Breakpoint o) { | 166 checkBreakpoint(api.Breakpoint o) { |
| 167 buildCounterBreakpoint++; | 167 buildCounterBreakpoint++; |
| 168 if (buildCounterBreakpoint < 3) { | 168 if (buildCounterBreakpoint < 3) { |
| 169 unittest.expect(o.action, unittest.equals('foo')); | 169 unittest.expect(o.action, unittest.equals('foo')); |
| 170 unittest.expect(o.condition, unittest.equals('foo')); | 170 unittest.expect(o.condition, unittest.equals('foo')); |
| 171 unittest.expect(o.createTime, unittest.equals('foo')); | 171 unittest.expect(o.createTime, unittest.equals('foo')); |
| 172 checkUnnamed809(o.evaluatedExpressions); | 172 checkUnnamed816(o.evaluatedExpressions); |
| 173 checkUnnamed810(o.expressions); | 173 checkUnnamed817(o.expressions); |
| 174 unittest.expect(o.finalTime, unittest.equals('foo')); | 174 unittest.expect(o.finalTime, unittest.equals('foo')); |
| 175 unittest.expect(o.id, unittest.equals('foo')); | 175 unittest.expect(o.id, unittest.equals('foo')); |
| 176 unittest.expect(o.isFinalState, unittest.isTrue); | 176 unittest.expect(o.isFinalState, unittest.isTrue); |
| 177 checkUnnamed811(o.labels); | 177 checkUnnamed818(o.labels); |
| 178 checkSourceLocation(o.location); | 178 checkSourceLocation(o.location); |
| 179 unittest.expect(o.logLevel, unittest.equals('foo')); | 179 unittest.expect(o.logLevel, unittest.equals('foo')); |
| 180 unittest.expect(o.logMessageFormat, unittest.equals('foo')); | 180 unittest.expect(o.logMessageFormat, unittest.equals('foo')); |
| 181 checkUnnamed812(o.stackFrames); | 181 checkUnnamed819(o.stackFrames); |
| 182 checkStatusMessage(o.status); | 182 checkStatusMessage(o.status); |
| 183 unittest.expect(o.userEmail, unittest.equals('foo')); | 183 unittest.expect(o.userEmail, unittest.equals('foo')); |
| 184 checkUnnamed813(o.variableTable); | 184 checkUnnamed820(o.variableTable); |
| 185 } | 185 } |
| 186 buildCounterBreakpoint--; | 186 buildCounterBreakpoint--; |
| 187 } | 187 } |
| 188 | 188 |
| 189 core.int buildCounterCloudRepoSourceContext = 0; | 189 core.int buildCounterCloudRepoSourceContext = 0; |
| 190 buildCloudRepoSourceContext() { | 190 buildCloudRepoSourceContext() { |
| 191 var o = new api.CloudRepoSourceContext(); | 191 var o = new api.CloudRepoSourceContext(); |
| 192 buildCounterCloudRepoSourceContext++; | 192 buildCounterCloudRepoSourceContext++; |
| 193 if (buildCounterCloudRepoSourceContext < 3) { | 193 if (buildCounterCloudRepoSourceContext < 3) { |
| 194 o.aliasContext = buildAliasContext(); | 194 o.aliasContext = buildAliasContext(); |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 246 | 246 |
| 247 checkCloudWorkspaceSourceContext(api.CloudWorkspaceSourceContext o) { | 247 checkCloudWorkspaceSourceContext(api.CloudWorkspaceSourceContext o) { |
| 248 buildCounterCloudWorkspaceSourceContext++; | 248 buildCounterCloudWorkspaceSourceContext++; |
| 249 if (buildCounterCloudWorkspaceSourceContext < 3) { | 249 if (buildCounterCloudWorkspaceSourceContext < 3) { |
| 250 unittest.expect(o.snapshotId, unittest.equals('foo')); | 250 unittest.expect(o.snapshotId, unittest.equals('foo')); |
| 251 checkCloudWorkspaceId(o.workspaceId); | 251 checkCloudWorkspaceId(o.workspaceId); |
| 252 } | 252 } |
| 253 buildCounterCloudWorkspaceSourceContext--; | 253 buildCounterCloudWorkspaceSourceContext--; |
| 254 } | 254 } |
| 255 | 255 |
| 256 buildUnnamed814() { | 256 buildUnnamed821() { |
| 257 var o = new core.List<api.ExtendedSourceContext>(); | 257 var o = new core.List<api.ExtendedSourceContext>(); |
| 258 o.add(buildExtendedSourceContext()); | 258 o.add(buildExtendedSourceContext()); |
| 259 o.add(buildExtendedSourceContext()); | 259 o.add(buildExtendedSourceContext()); |
| 260 return o; | 260 return o; |
| 261 } | 261 } |
| 262 | 262 |
| 263 checkUnnamed814(core.List<api.ExtendedSourceContext> o) { | 263 checkUnnamed821(core.List<api.ExtendedSourceContext> o) { |
| 264 unittest.expect(o, unittest.hasLength(2)); | 264 unittest.expect(o, unittest.hasLength(2)); |
| 265 checkExtendedSourceContext(o[0]); | 265 checkExtendedSourceContext(o[0]); |
| 266 checkExtendedSourceContext(o[1]); | 266 checkExtendedSourceContext(o[1]); |
| 267 } | 267 } |
| 268 | 268 |
| 269 buildUnnamed815() { | 269 buildUnnamed822() { |
| 270 var o = new core.Map<core.String, core.String>(); | 270 var o = new core.Map<core.String, core.String>(); |
| 271 o["x"] = "foo"; | 271 o["x"] = "foo"; |
| 272 o["y"] = "foo"; | 272 o["y"] = "foo"; |
| 273 return o; | 273 return o; |
| 274 } | 274 } |
| 275 | 275 |
| 276 checkUnnamed815(core.Map<core.String, core.String> o) { | 276 checkUnnamed822(core.Map<core.String, core.String> o) { |
| 277 unittest.expect(o, unittest.hasLength(2)); | 277 unittest.expect(o, unittest.hasLength(2)); |
| 278 unittest.expect(o["x"], unittest.equals('foo')); | 278 unittest.expect(o["x"], unittest.equals('foo')); |
| 279 unittest.expect(o["y"], unittest.equals('foo')); | 279 unittest.expect(o["y"], unittest.equals('foo')); |
| 280 } | 280 } |
| 281 | 281 |
| 282 buildUnnamed816() { | 282 buildUnnamed823() { |
| 283 var o = new core.List<api.SourceContext>(); | 283 var o = new core.List<api.SourceContext>(); |
| 284 o.add(buildSourceContext()); | 284 o.add(buildSourceContext()); |
| 285 o.add(buildSourceContext()); | 285 o.add(buildSourceContext()); |
| 286 return o; | 286 return o; |
| 287 } | 287 } |
| 288 | 288 |
| 289 checkUnnamed816(core.List<api.SourceContext> o) { | 289 checkUnnamed823(core.List<api.SourceContext> o) { |
| 290 unittest.expect(o, unittest.hasLength(2)); | 290 unittest.expect(o, unittest.hasLength(2)); |
| 291 checkSourceContext(o[0]); | 291 checkSourceContext(o[0]); |
| 292 checkSourceContext(o[1]); | 292 checkSourceContext(o[1]); |
| 293 } | 293 } |
| 294 | 294 |
| 295 core.int buildCounterDebuggee = 0; | 295 core.int buildCounterDebuggee = 0; |
| 296 buildDebuggee() { | 296 buildDebuggee() { |
| 297 var o = new api.Debuggee(); | 297 var o = new api.Debuggee(); |
| 298 buildCounterDebuggee++; | 298 buildCounterDebuggee++; |
| 299 if (buildCounterDebuggee < 3) { | 299 if (buildCounterDebuggee < 3) { |
| 300 o.agentVersion = "foo"; | 300 o.agentVersion = "foo"; |
| 301 o.description = "foo"; | 301 o.description = "foo"; |
| 302 o.extSourceContexts = buildUnnamed814(); | 302 o.extSourceContexts = buildUnnamed821(); |
| 303 o.id = "foo"; | 303 o.id = "foo"; |
| 304 o.isDisabled = true; | 304 o.isDisabled = true; |
| 305 o.isInactive = true; | 305 o.isInactive = true; |
| 306 o.labels = buildUnnamed815(); | 306 o.labels = buildUnnamed822(); |
| 307 o.project = "foo"; | 307 o.project = "foo"; |
| 308 o.sourceContexts = buildUnnamed816(); | 308 o.sourceContexts = buildUnnamed823(); |
| 309 o.status = buildStatusMessage(); | 309 o.status = buildStatusMessage(); |
| 310 o.uniquifier = "foo"; | 310 o.uniquifier = "foo"; |
| 311 } | 311 } |
| 312 buildCounterDebuggee--; | 312 buildCounterDebuggee--; |
| 313 return o; | 313 return o; |
| 314 } | 314 } |
| 315 | 315 |
| 316 checkDebuggee(api.Debuggee o) { | 316 checkDebuggee(api.Debuggee o) { |
| 317 buildCounterDebuggee++; | 317 buildCounterDebuggee++; |
| 318 if (buildCounterDebuggee < 3) { | 318 if (buildCounterDebuggee < 3) { |
| 319 unittest.expect(o.agentVersion, unittest.equals('foo')); | 319 unittest.expect(o.agentVersion, unittest.equals('foo')); |
| 320 unittest.expect(o.description, unittest.equals('foo')); | 320 unittest.expect(o.description, unittest.equals('foo')); |
| 321 checkUnnamed814(o.extSourceContexts); | 321 checkUnnamed821(o.extSourceContexts); |
| 322 unittest.expect(o.id, unittest.equals('foo')); | 322 unittest.expect(o.id, unittest.equals('foo')); |
| 323 unittest.expect(o.isDisabled, unittest.isTrue); | 323 unittest.expect(o.isDisabled, unittest.isTrue); |
| 324 unittest.expect(o.isInactive, unittest.isTrue); | 324 unittest.expect(o.isInactive, unittest.isTrue); |
| 325 checkUnnamed815(o.labels); | 325 checkUnnamed822(o.labels); |
| 326 unittest.expect(o.project, unittest.equals('foo')); | 326 unittest.expect(o.project, unittest.equals('foo')); |
| 327 checkUnnamed816(o.sourceContexts); | 327 checkUnnamed823(o.sourceContexts); |
| 328 checkStatusMessage(o.status); | 328 checkStatusMessage(o.status); |
| 329 unittest.expect(o.uniquifier, unittest.equals('foo')); | 329 unittest.expect(o.uniquifier, unittest.equals('foo')); |
| 330 } | 330 } |
| 331 buildCounterDebuggee--; | 331 buildCounterDebuggee--; |
| 332 } | 332 } |
| 333 | 333 |
| 334 core.int buildCounterEmpty = 0; | 334 core.int buildCounterEmpty = 0; |
| 335 buildEmpty() { | 335 buildEmpty() { |
| 336 var o = new api.Empty(); | 336 var o = new api.Empty(); |
| 337 buildCounterEmpty++; | 337 buildCounterEmpty++; |
| 338 if (buildCounterEmpty < 3) { | 338 if (buildCounterEmpty < 3) { |
| 339 } | 339 } |
| 340 buildCounterEmpty--; | 340 buildCounterEmpty--; |
| 341 return o; | 341 return o; |
| 342 } | 342 } |
| 343 | 343 |
| 344 checkEmpty(api.Empty o) { | 344 checkEmpty(api.Empty o) { |
| 345 buildCounterEmpty++; | 345 buildCounterEmpty++; |
| 346 if (buildCounterEmpty < 3) { | 346 if (buildCounterEmpty < 3) { |
| 347 } | 347 } |
| 348 buildCounterEmpty--; | 348 buildCounterEmpty--; |
| 349 } | 349 } |
| 350 | 350 |
| 351 buildUnnamed817() { | 351 buildUnnamed824() { |
| 352 var o = new core.Map<core.String, core.String>(); | 352 var o = new core.Map<core.String, core.String>(); |
| 353 o["x"] = "foo"; | 353 o["x"] = "foo"; |
| 354 o["y"] = "foo"; | 354 o["y"] = "foo"; |
| 355 return o; | 355 return o; |
| 356 } | 356 } |
| 357 | 357 |
| 358 checkUnnamed817(core.Map<core.String, core.String> o) { | 358 checkUnnamed824(core.Map<core.String, core.String> o) { |
| 359 unittest.expect(o, unittest.hasLength(2)); | 359 unittest.expect(o, unittest.hasLength(2)); |
| 360 unittest.expect(o["x"], unittest.equals('foo')); | 360 unittest.expect(o["x"], unittest.equals('foo')); |
| 361 unittest.expect(o["y"], unittest.equals('foo')); | 361 unittest.expect(o["y"], unittest.equals('foo')); |
| 362 } | 362 } |
| 363 | 363 |
| 364 core.int buildCounterExtendedSourceContext = 0; | 364 core.int buildCounterExtendedSourceContext = 0; |
| 365 buildExtendedSourceContext() { | 365 buildExtendedSourceContext() { |
| 366 var o = new api.ExtendedSourceContext(); | 366 var o = new api.ExtendedSourceContext(); |
| 367 buildCounterExtendedSourceContext++; | 367 buildCounterExtendedSourceContext++; |
| 368 if (buildCounterExtendedSourceContext < 3) { | 368 if (buildCounterExtendedSourceContext < 3) { |
| 369 o.context = buildSourceContext(); | 369 o.context = buildSourceContext(); |
| 370 o.labels = buildUnnamed817(); | 370 o.labels = buildUnnamed824(); |
| 371 } | 371 } |
| 372 buildCounterExtendedSourceContext--; | 372 buildCounterExtendedSourceContext--; |
| 373 return o; | 373 return o; |
| 374 } | 374 } |
| 375 | 375 |
| 376 checkExtendedSourceContext(api.ExtendedSourceContext o) { | 376 checkExtendedSourceContext(api.ExtendedSourceContext o) { |
| 377 buildCounterExtendedSourceContext++; | 377 buildCounterExtendedSourceContext++; |
| 378 if (buildCounterExtendedSourceContext < 3) { | 378 if (buildCounterExtendedSourceContext < 3) { |
| 379 checkSourceContext(o.context); | 379 checkSourceContext(o.context); |
| 380 checkUnnamed817(o.labels); | 380 checkUnnamed824(o.labels); |
| 381 } | 381 } |
| 382 buildCounterExtendedSourceContext--; | 382 buildCounterExtendedSourceContext--; |
| 383 } | 383 } |
| 384 | 384 |
| 385 buildUnnamed818() { | 385 buildUnnamed825() { |
| 386 var o = new core.List<core.String>(); | 386 var o = new core.List<core.String>(); |
| 387 o.add("foo"); | 387 o.add("foo"); |
| 388 o.add("foo"); | 388 o.add("foo"); |
| 389 return o; | 389 return o; |
| 390 } | 390 } |
| 391 | 391 |
| 392 checkUnnamed818(core.List<core.String> o) { | 392 checkUnnamed825(core.List<core.String> o) { |
| 393 unittest.expect(o, unittest.hasLength(2)); | 393 unittest.expect(o, unittest.hasLength(2)); |
| 394 unittest.expect(o[0], unittest.equals('foo')); | 394 unittest.expect(o[0], unittest.equals('foo')); |
| 395 unittest.expect(o[1], unittest.equals('foo')); | 395 unittest.expect(o[1], unittest.equals('foo')); |
| 396 } | 396 } |
| 397 | 397 |
| 398 core.int buildCounterFormatMessage = 0; | 398 core.int buildCounterFormatMessage = 0; |
| 399 buildFormatMessage() { | 399 buildFormatMessage() { |
| 400 var o = new api.FormatMessage(); | 400 var o = new api.FormatMessage(); |
| 401 buildCounterFormatMessage++; | 401 buildCounterFormatMessage++; |
| 402 if (buildCounterFormatMessage < 3) { | 402 if (buildCounterFormatMessage < 3) { |
| 403 o.format = "foo"; | 403 o.format = "foo"; |
| 404 o.parameters = buildUnnamed818(); | 404 o.parameters = buildUnnamed825(); |
| 405 } | 405 } |
| 406 buildCounterFormatMessage--; | 406 buildCounterFormatMessage--; |
| 407 return o; | 407 return o; |
| 408 } | 408 } |
| 409 | 409 |
| 410 checkFormatMessage(api.FormatMessage o) { | 410 checkFormatMessage(api.FormatMessage o) { |
| 411 buildCounterFormatMessage++; | 411 buildCounterFormatMessage++; |
| 412 if (buildCounterFormatMessage < 3) { | 412 if (buildCounterFormatMessage < 3) { |
| 413 unittest.expect(o.format, unittest.equals('foo')); | 413 unittest.expect(o.format, unittest.equals('foo')); |
| 414 checkUnnamed818(o.parameters); | 414 checkUnnamed825(o.parameters); |
| 415 } | 415 } |
| 416 buildCounterFormatMessage--; | 416 buildCounterFormatMessage--; |
| 417 } | 417 } |
| 418 | 418 |
| 419 core.int buildCounterGerritSourceContext = 0; | 419 core.int buildCounterGerritSourceContext = 0; |
| 420 buildGerritSourceContext() { | 420 buildGerritSourceContext() { |
| 421 var o = new api.GerritSourceContext(); | 421 var o = new api.GerritSourceContext(); |
| 422 buildCounterGerritSourceContext++; | 422 buildCounterGerritSourceContext++; |
| 423 if (buildCounterGerritSourceContext < 3) { | 423 if (buildCounterGerritSourceContext < 3) { |
| 424 o.aliasContext = buildAliasContext(); | 424 o.aliasContext = buildAliasContext(); |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 476 | 476 |
| 477 checkGitSourceContext(api.GitSourceContext o) { | 477 checkGitSourceContext(api.GitSourceContext o) { |
| 478 buildCounterGitSourceContext++; | 478 buildCounterGitSourceContext++; |
| 479 if (buildCounterGitSourceContext < 3) { | 479 if (buildCounterGitSourceContext < 3) { |
| 480 unittest.expect(o.revisionId, unittest.equals('foo')); | 480 unittest.expect(o.revisionId, unittest.equals('foo')); |
| 481 unittest.expect(o.url, unittest.equals('foo')); | 481 unittest.expect(o.url, unittest.equals('foo')); |
| 482 } | 482 } |
| 483 buildCounterGitSourceContext--; | 483 buildCounterGitSourceContext--; |
| 484 } | 484 } |
| 485 | 485 |
| 486 buildUnnamed819() { | 486 buildUnnamed826() { |
| 487 var o = new core.List<api.Breakpoint>(); | 487 var o = new core.List<api.Breakpoint>(); |
| 488 o.add(buildBreakpoint()); | 488 o.add(buildBreakpoint()); |
| 489 o.add(buildBreakpoint()); | 489 o.add(buildBreakpoint()); |
| 490 return o; | 490 return o; |
| 491 } | 491 } |
| 492 | 492 |
| 493 checkUnnamed819(core.List<api.Breakpoint> o) { | 493 checkUnnamed826(core.List<api.Breakpoint> o) { |
| 494 unittest.expect(o, unittest.hasLength(2)); | 494 unittest.expect(o, unittest.hasLength(2)); |
| 495 checkBreakpoint(o[0]); | 495 checkBreakpoint(o[0]); |
| 496 checkBreakpoint(o[1]); | 496 checkBreakpoint(o[1]); |
| 497 } | 497 } |
| 498 | 498 |
| 499 core.int buildCounterListActiveBreakpointsResponse = 0; | 499 core.int buildCounterListActiveBreakpointsResponse = 0; |
| 500 buildListActiveBreakpointsResponse() { | 500 buildListActiveBreakpointsResponse() { |
| 501 var o = new api.ListActiveBreakpointsResponse(); | 501 var o = new api.ListActiveBreakpointsResponse(); |
| 502 buildCounterListActiveBreakpointsResponse++; | 502 buildCounterListActiveBreakpointsResponse++; |
| 503 if (buildCounterListActiveBreakpointsResponse < 3) { | 503 if (buildCounterListActiveBreakpointsResponse < 3) { |
| 504 o.breakpoints = buildUnnamed819(); | 504 o.breakpoints = buildUnnamed826(); |
| 505 o.nextWaitToken = "foo"; | 505 o.nextWaitToken = "foo"; |
| 506 o.waitExpired = true; | 506 o.waitExpired = true; |
| 507 } | 507 } |
| 508 buildCounterListActiveBreakpointsResponse--; | 508 buildCounterListActiveBreakpointsResponse--; |
| 509 return o; | 509 return o; |
| 510 } | 510 } |
| 511 | 511 |
| 512 checkListActiveBreakpointsResponse(api.ListActiveBreakpointsResponse o) { | 512 checkListActiveBreakpointsResponse(api.ListActiveBreakpointsResponse o) { |
| 513 buildCounterListActiveBreakpointsResponse++; | 513 buildCounterListActiveBreakpointsResponse++; |
| 514 if (buildCounterListActiveBreakpointsResponse < 3) { | 514 if (buildCounterListActiveBreakpointsResponse < 3) { |
| 515 checkUnnamed819(o.breakpoints); | 515 checkUnnamed826(o.breakpoints); |
| 516 unittest.expect(o.nextWaitToken, unittest.equals('foo')); | 516 unittest.expect(o.nextWaitToken, unittest.equals('foo')); |
| 517 unittest.expect(o.waitExpired, unittest.isTrue); | 517 unittest.expect(o.waitExpired, unittest.isTrue); |
| 518 } | 518 } |
| 519 buildCounterListActiveBreakpointsResponse--; | 519 buildCounterListActiveBreakpointsResponse--; |
| 520 } | 520 } |
| 521 | 521 |
| 522 buildUnnamed820() { | 522 buildUnnamed827() { |
| 523 var o = new core.List<api.Breakpoint>(); | 523 var o = new core.List<api.Breakpoint>(); |
| 524 o.add(buildBreakpoint()); | 524 o.add(buildBreakpoint()); |
| 525 o.add(buildBreakpoint()); | 525 o.add(buildBreakpoint()); |
| 526 return o; | 526 return o; |
| 527 } | 527 } |
| 528 | 528 |
| 529 checkUnnamed820(core.List<api.Breakpoint> o) { | 529 checkUnnamed827(core.List<api.Breakpoint> o) { |
| 530 unittest.expect(o, unittest.hasLength(2)); | 530 unittest.expect(o, unittest.hasLength(2)); |
| 531 checkBreakpoint(o[0]); | 531 checkBreakpoint(o[0]); |
| 532 checkBreakpoint(o[1]); | 532 checkBreakpoint(o[1]); |
| 533 } | 533 } |
| 534 | 534 |
| 535 core.int buildCounterListBreakpointsResponse = 0; | 535 core.int buildCounterListBreakpointsResponse = 0; |
| 536 buildListBreakpointsResponse() { | 536 buildListBreakpointsResponse() { |
| 537 var o = new api.ListBreakpointsResponse(); | 537 var o = new api.ListBreakpointsResponse(); |
| 538 buildCounterListBreakpointsResponse++; | 538 buildCounterListBreakpointsResponse++; |
| 539 if (buildCounterListBreakpointsResponse < 3) { | 539 if (buildCounterListBreakpointsResponse < 3) { |
| 540 o.breakpoints = buildUnnamed820(); | 540 o.breakpoints = buildUnnamed827(); |
| 541 o.nextWaitToken = "foo"; | 541 o.nextWaitToken = "foo"; |
| 542 } | 542 } |
| 543 buildCounterListBreakpointsResponse--; | 543 buildCounterListBreakpointsResponse--; |
| 544 return o; | 544 return o; |
| 545 } | 545 } |
| 546 | 546 |
| 547 checkListBreakpointsResponse(api.ListBreakpointsResponse o) { | 547 checkListBreakpointsResponse(api.ListBreakpointsResponse o) { |
| 548 buildCounterListBreakpointsResponse++; | 548 buildCounterListBreakpointsResponse++; |
| 549 if (buildCounterListBreakpointsResponse < 3) { | 549 if (buildCounterListBreakpointsResponse < 3) { |
| 550 checkUnnamed820(o.breakpoints); | 550 checkUnnamed827(o.breakpoints); |
| 551 unittest.expect(o.nextWaitToken, unittest.equals('foo')); | 551 unittest.expect(o.nextWaitToken, unittest.equals('foo')); |
| 552 } | 552 } |
| 553 buildCounterListBreakpointsResponse--; | 553 buildCounterListBreakpointsResponse--; |
| 554 } | 554 } |
| 555 | 555 |
| 556 buildUnnamed821() { | 556 buildUnnamed828() { |
| 557 var o = new core.List<api.Debuggee>(); | 557 var o = new core.List<api.Debuggee>(); |
| 558 o.add(buildDebuggee()); | 558 o.add(buildDebuggee()); |
| 559 o.add(buildDebuggee()); | 559 o.add(buildDebuggee()); |
| 560 return o; | 560 return o; |
| 561 } | 561 } |
| 562 | 562 |
| 563 checkUnnamed821(core.List<api.Debuggee> o) { | 563 checkUnnamed828(core.List<api.Debuggee> o) { |
| 564 unittest.expect(o, unittest.hasLength(2)); | 564 unittest.expect(o, unittest.hasLength(2)); |
| 565 checkDebuggee(o[0]); | 565 checkDebuggee(o[0]); |
| 566 checkDebuggee(o[1]); | 566 checkDebuggee(o[1]); |
| 567 } | 567 } |
| 568 | 568 |
| 569 core.int buildCounterListDebuggeesResponse = 0; | 569 core.int buildCounterListDebuggeesResponse = 0; |
| 570 buildListDebuggeesResponse() { | 570 buildListDebuggeesResponse() { |
| 571 var o = new api.ListDebuggeesResponse(); | 571 var o = new api.ListDebuggeesResponse(); |
| 572 buildCounterListDebuggeesResponse++; | 572 buildCounterListDebuggeesResponse++; |
| 573 if (buildCounterListDebuggeesResponse < 3) { | 573 if (buildCounterListDebuggeesResponse < 3) { |
| 574 o.debuggees = buildUnnamed821(); | 574 o.debuggees = buildUnnamed828(); |
| 575 } | 575 } |
| 576 buildCounterListDebuggeesResponse--; | 576 buildCounterListDebuggeesResponse--; |
| 577 return o; | 577 return o; |
| 578 } | 578 } |
| 579 | 579 |
| 580 checkListDebuggeesResponse(api.ListDebuggeesResponse o) { | 580 checkListDebuggeesResponse(api.ListDebuggeesResponse o) { |
| 581 buildCounterListDebuggeesResponse++; | 581 buildCounterListDebuggeesResponse++; |
| 582 if (buildCounterListDebuggeesResponse < 3) { | 582 if (buildCounterListDebuggeesResponse < 3) { |
| 583 checkUnnamed821(o.debuggees); | 583 checkUnnamed828(o.debuggees); |
| 584 } | 584 } |
| 585 buildCounterListDebuggeesResponse--; | 585 buildCounterListDebuggeesResponse--; |
| 586 } | 586 } |
| 587 | 587 |
| 588 core.int buildCounterProjectRepoId = 0; | 588 core.int buildCounterProjectRepoId = 0; |
| 589 buildProjectRepoId() { | 589 buildProjectRepoId() { |
| 590 var o = new api.ProjectRepoId(); | 590 var o = new api.ProjectRepoId(); |
| 591 buildCounterProjectRepoId++; | 591 buildCounterProjectRepoId++; |
| 592 if (buildCounterProjectRepoId < 3) { | 592 if (buildCounterProjectRepoId < 3) { |
| 593 o.projectId = "foo"; | 593 o.projectId = "foo"; |
| (...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 723 | 723 |
| 724 checkSourceLocation(api.SourceLocation o) { | 724 checkSourceLocation(api.SourceLocation o) { |
| 725 buildCounterSourceLocation++; | 725 buildCounterSourceLocation++; |
| 726 if (buildCounterSourceLocation < 3) { | 726 if (buildCounterSourceLocation < 3) { |
| 727 unittest.expect(o.line, unittest.equals(42)); | 727 unittest.expect(o.line, unittest.equals(42)); |
| 728 unittest.expect(o.path, unittest.equals('foo')); | 728 unittest.expect(o.path, unittest.equals('foo')); |
| 729 } | 729 } |
| 730 buildCounterSourceLocation--; | 730 buildCounterSourceLocation--; |
| 731 } | 731 } |
| 732 | 732 |
| 733 buildUnnamed822() { | 733 buildUnnamed829() { |
| 734 var o = new core.List<api.Variable>(); | 734 var o = new core.List<api.Variable>(); |
| 735 o.add(buildVariable()); | 735 o.add(buildVariable()); |
| 736 o.add(buildVariable()); | 736 o.add(buildVariable()); |
| 737 return o; | 737 return o; |
| 738 } | 738 } |
| 739 | 739 |
| 740 checkUnnamed822(core.List<api.Variable> o) { | 740 checkUnnamed829(core.List<api.Variable> o) { |
| 741 unittest.expect(o, unittest.hasLength(2)); | 741 unittest.expect(o, unittest.hasLength(2)); |
| 742 checkVariable(o[0]); | 742 checkVariable(o[0]); |
| 743 checkVariable(o[1]); | 743 checkVariable(o[1]); |
| 744 } | 744 } |
| 745 | 745 |
| 746 buildUnnamed823() { | 746 buildUnnamed830() { |
| 747 var o = new core.List<api.Variable>(); | 747 var o = new core.List<api.Variable>(); |
| 748 o.add(buildVariable()); | 748 o.add(buildVariable()); |
| 749 o.add(buildVariable()); | 749 o.add(buildVariable()); |
| 750 return o; | 750 return o; |
| 751 } | 751 } |
| 752 | 752 |
| 753 checkUnnamed823(core.List<api.Variable> o) { | 753 checkUnnamed830(core.List<api.Variable> o) { |
| 754 unittest.expect(o, unittest.hasLength(2)); | 754 unittest.expect(o, unittest.hasLength(2)); |
| 755 checkVariable(o[0]); | 755 checkVariable(o[0]); |
| 756 checkVariable(o[1]); | 756 checkVariable(o[1]); |
| 757 } | 757 } |
| 758 | 758 |
| 759 core.int buildCounterStackFrame = 0; | 759 core.int buildCounterStackFrame = 0; |
| 760 buildStackFrame() { | 760 buildStackFrame() { |
| 761 var o = new api.StackFrame(); | 761 var o = new api.StackFrame(); |
| 762 buildCounterStackFrame++; | 762 buildCounterStackFrame++; |
| 763 if (buildCounterStackFrame < 3) { | 763 if (buildCounterStackFrame < 3) { |
| 764 o.arguments = buildUnnamed822(); | 764 o.arguments = buildUnnamed829(); |
| 765 o.function = "foo"; | 765 o.function = "foo"; |
| 766 o.locals = buildUnnamed823(); | 766 o.locals = buildUnnamed830(); |
| 767 o.location = buildSourceLocation(); | 767 o.location = buildSourceLocation(); |
| 768 } | 768 } |
| 769 buildCounterStackFrame--; | 769 buildCounterStackFrame--; |
| 770 return o; | 770 return o; |
| 771 } | 771 } |
| 772 | 772 |
| 773 checkStackFrame(api.StackFrame o) { | 773 checkStackFrame(api.StackFrame o) { |
| 774 buildCounterStackFrame++; | 774 buildCounterStackFrame++; |
| 775 if (buildCounterStackFrame < 3) { | 775 if (buildCounterStackFrame < 3) { |
| 776 checkUnnamed822(o.arguments); | 776 checkUnnamed829(o.arguments); |
| 777 unittest.expect(o.function, unittest.equals('foo')); | 777 unittest.expect(o.function, unittest.equals('foo')); |
| 778 checkUnnamed823(o.locals); | 778 checkUnnamed830(o.locals); |
| 779 checkSourceLocation(o.location); | 779 checkSourceLocation(o.location); |
| 780 } | 780 } |
| 781 buildCounterStackFrame--; | 781 buildCounterStackFrame--; |
| 782 } | 782 } |
| 783 | 783 |
| 784 core.int buildCounterStatusMessage = 0; | 784 core.int buildCounterStatusMessage = 0; |
| 785 buildStatusMessage() { | 785 buildStatusMessage() { |
| 786 var o = new api.StatusMessage(); | 786 var o = new api.StatusMessage(); |
| 787 buildCounterStatusMessage++; | 787 buildCounterStatusMessage++; |
| 788 if (buildCounterStatusMessage < 3) { | 788 if (buildCounterStatusMessage < 3) { |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 833 return o; | 833 return o; |
| 834 } | 834 } |
| 835 | 835 |
| 836 checkUpdateActiveBreakpointResponse(api.UpdateActiveBreakpointResponse o) { | 836 checkUpdateActiveBreakpointResponse(api.UpdateActiveBreakpointResponse o) { |
| 837 buildCounterUpdateActiveBreakpointResponse++; | 837 buildCounterUpdateActiveBreakpointResponse++; |
| 838 if (buildCounterUpdateActiveBreakpointResponse < 3) { | 838 if (buildCounterUpdateActiveBreakpointResponse < 3) { |
| 839 } | 839 } |
| 840 buildCounterUpdateActiveBreakpointResponse--; | 840 buildCounterUpdateActiveBreakpointResponse--; |
| 841 } | 841 } |
| 842 | 842 |
| 843 buildUnnamed824() { | 843 buildUnnamed831() { |
| 844 var o = new core.List<api.Variable>(); | 844 var o = new core.List<api.Variable>(); |
| 845 o.add(buildVariable()); | 845 o.add(buildVariable()); |
| 846 o.add(buildVariable()); | 846 o.add(buildVariable()); |
| 847 return o; | 847 return o; |
| 848 } | 848 } |
| 849 | 849 |
| 850 checkUnnamed824(core.List<api.Variable> o) { | 850 checkUnnamed831(core.List<api.Variable> o) { |
| 851 unittest.expect(o, unittest.hasLength(2)); | 851 unittest.expect(o, unittest.hasLength(2)); |
| 852 checkVariable(o[0]); | 852 checkVariable(o[0]); |
| 853 checkVariable(o[1]); | 853 checkVariable(o[1]); |
| 854 } | 854 } |
| 855 | 855 |
| 856 core.int buildCounterVariable = 0; | 856 core.int buildCounterVariable = 0; |
| 857 buildVariable() { | 857 buildVariable() { |
| 858 var o = new api.Variable(); | 858 var o = new api.Variable(); |
| 859 buildCounterVariable++; | 859 buildCounterVariable++; |
| 860 if (buildCounterVariable < 3) { | 860 if (buildCounterVariable < 3) { |
| 861 o.members = buildUnnamed824(); | 861 o.members = buildUnnamed831(); |
| 862 o.name = "foo"; | 862 o.name = "foo"; |
| 863 o.status = buildStatusMessage(); | 863 o.status = buildStatusMessage(); |
| 864 o.type = "foo"; | 864 o.type = "foo"; |
| 865 o.value = "foo"; | 865 o.value = "foo"; |
| 866 o.varTableIndex = 42; | 866 o.varTableIndex = 42; |
| 867 } | 867 } |
| 868 buildCounterVariable--; | 868 buildCounterVariable--; |
| 869 return o; | 869 return o; |
| 870 } | 870 } |
| 871 | 871 |
| 872 checkVariable(api.Variable o) { | 872 checkVariable(api.Variable o) { |
| 873 buildCounterVariable++; | 873 buildCounterVariable++; |
| 874 if (buildCounterVariable < 3) { | 874 if (buildCounterVariable < 3) { |
| 875 checkUnnamed824(o.members); | 875 checkUnnamed831(o.members); |
| 876 unittest.expect(o.name, unittest.equals('foo')); | 876 unittest.expect(o.name, unittest.equals('foo')); |
| 877 checkStatusMessage(o.status); | 877 checkStatusMessage(o.status); |
| 878 unittest.expect(o.type, unittest.equals('foo')); | 878 unittest.expect(o.type, unittest.equals('foo')); |
| 879 unittest.expect(o.value, unittest.equals('foo')); | 879 unittest.expect(o.value, unittest.equals('foo')); |
| 880 unittest.expect(o.varTableIndex, unittest.equals(42)); | 880 unittest.expect(o.varTableIndex, unittest.equals(42)); |
| 881 } | 881 } |
| 882 buildCounterVariable--; | 882 buildCounterVariable--; |
| 883 } | 883 } |
| 884 | 884 |
| 885 | 885 |
| (...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1126 }); | 1126 }); |
| 1127 }); | 1127 }); |
| 1128 | 1128 |
| 1129 | 1129 |
| 1130 unittest.group("resource-ControllerDebuggeesResourceApi", () { | 1130 unittest.group("resource-ControllerDebuggeesResourceApi", () { |
| 1131 unittest.test("method--register", () { | 1131 unittest.test("method--register", () { |
| 1132 | 1132 |
| 1133 var mock = new HttpServerMock(); | 1133 var mock = new HttpServerMock(); |
| 1134 api.ControllerDebuggeesResourceApi res = new api.ClouddebuggerApi(mock).co
ntroller.debuggees; | 1134 api.ControllerDebuggeesResourceApi res = new api.ClouddebuggerApi(mock).co
ntroller.debuggees; |
| 1135 var arg_request = buildRegisterDebuggeeRequest(); | 1135 var arg_request = buildRegisterDebuggeeRequest(); |
| 1136 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1136 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 1137 var obj = new api.RegisterDebuggeeRequest.fromJson(json); | 1137 var obj = new api.RegisterDebuggeeRequest.fromJson(json); |
| 1138 checkRegisterDebuggeeRequest(obj); | 1138 checkRegisterDebuggeeRequest(obj); |
| 1139 | 1139 |
| 1140 var path = (req.url).path; | 1140 var path = (req.url).path; |
| 1141 var pathOffset = 0; | 1141 var pathOffset = 0; |
| 1142 var index; | 1142 var index; |
| 1143 var subPart; | 1143 var subPart; |
| 1144 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1144 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 1145 pathOffset += 1; | 1145 pathOffset += 1; |
| 1146 unittest.expect(path.substring(pathOffset, pathOffset + 32), unittest.eq
uals("v2/controller/debuggees/register")); | 1146 unittest.expect(path.substring(pathOffset, pathOffset + 32), unittest.eq
uals("v2/controller/debuggees/register")); |
| (...skipping 16 matching lines...) Expand all Loading... |
| 1163 } | 1163 } |
| 1164 } | 1164 } |
| 1165 | 1165 |
| 1166 | 1166 |
| 1167 var h = { | 1167 var h = { |
| 1168 "content-type" : "application/json; charset=utf-8", | 1168 "content-type" : "application/json; charset=utf-8", |
| 1169 }; | 1169 }; |
| 1170 var resp = convert.JSON.encode(buildRegisterDebuggeeResponse()); | 1170 var resp = convert.JSON.encode(buildRegisterDebuggeeResponse()); |
| 1171 return new async.Future.value(stringResponse(200, h, resp)); | 1171 return new async.Future.value(stringResponse(200, h, resp)); |
| 1172 }), true); | 1172 }), true); |
| 1173 res.register(arg_request).then(unittest.expectAsync(((api.RegisterDebuggee
Response response) { | 1173 res.register(arg_request).then(unittest.expectAsync1(((api.RegisterDebugge
eResponse response) { |
| 1174 checkRegisterDebuggeeResponse(response); | 1174 checkRegisterDebuggeeResponse(response); |
| 1175 }))); | 1175 }))); |
| 1176 }); | 1176 }); |
| 1177 | 1177 |
| 1178 }); | 1178 }); |
| 1179 | 1179 |
| 1180 | 1180 |
| 1181 unittest.group("resource-ControllerDebuggeesBreakpointsResourceApi", () { | 1181 unittest.group("resource-ControllerDebuggeesBreakpointsResourceApi", () { |
| 1182 unittest.test("method--list", () { | 1182 unittest.test("method--list", () { |
| 1183 | 1183 |
| 1184 var mock = new HttpServerMock(); | 1184 var mock = new HttpServerMock(); |
| 1185 api.ControllerDebuggeesBreakpointsResourceApi res = new api.ClouddebuggerA
pi(mock).controller.debuggees.breakpoints; | 1185 api.ControllerDebuggeesBreakpointsResourceApi res = new api.ClouddebuggerA
pi(mock).controller.debuggees.breakpoints; |
| 1186 var arg_debuggeeId = "foo"; | 1186 var arg_debuggeeId = "foo"; |
| 1187 var arg_waitToken = "foo"; |
| 1187 var arg_successOnTimeout = true; | 1188 var arg_successOnTimeout = true; |
| 1188 var arg_waitToken = "foo"; | 1189 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 1189 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 1190 var path = (req.url).path; | 1190 var path = (req.url).path; |
| 1191 var pathOffset = 0; | 1191 var pathOffset = 0; |
| 1192 var index; | 1192 var index; |
| 1193 var subPart; | 1193 var subPart; |
| 1194 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1194 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 1195 pathOffset += 1; | 1195 pathOffset += 1; |
| 1196 unittest.expect(path.substring(pathOffset, pathOffset + 24), unittest.eq
uals("v2/controller/debuggees/")); | 1196 unittest.expect(path.substring(pathOffset, pathOffset + 24), unittest.eq
uals("v2/controller/debuggees/")); |
| 1197 pathOffset += 24; | 1197 pathOffset += 24; |
| 1198 index = path.indexOf("/breakpoints", pathOffset); | 1198 index = path.indexOf("/breakpoints", pathOffset); |
| 1199 unittest.expect(index >= 0, unittest.isTrue); | 1199 unittest.expect(index >= 0, unittest.isTrue); |
| (...skipping 12 matching lines...) Expand all Loading... |
| 1212 if (n == "false") return false; | 1212 if (n == "false") return false; |
| 1213 if (n == null) return null; | 1213 if (n == null) return null; |
| 1214 throw new core.ArgumentError("Invalid boolean: $n"); | 1214 throw new core.ArgumentError("Invalid boolean: $n"); |
| 1215 } | 1215 } |
| 1216 if (query.length > 0) { | 1216 if (query.length > 0) { |
| 1217 for (var part in query.split("&")) { | 1217 for (var part in query.split("&")) { |
| 1218 var keyvalue = part.split("="); | 1218 var keyvalue = part.split("="); |
| 1219 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 1219 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 1220 } | 1220 } |
| 1221 } | 1221 } |
| 1222 unittest.expect(queryMap["waitToken"].first, unittest.equals(arg_waitTok
en)); |
| 1222 unittest.expect(queryMap["successOnTimeout"].first, unittest.equals("$ar
g_successOnTimeout")); | 1223 unittest.expect(queryMap["successOnTimeout"].first, unittest.equals("$ar
g_successOnTimeout")); |
| 1223 unittest.expect(queryMap["waitToken"].first, unittest.equals(arg_waitTok
en)); | |
| 1224 | 1224 |
| 1225 | 1225 |
| 1226 var h = { | 1226 var h = { |
| 1227 "content-type" : "application/json; charset=utf-8", | 1227 "content-type" : "application/json; charset=utf-8", |
| 1228 }; | 1228 }; |
| 1229 var resp = convert.JSON.encode(buildListActiveBreakpointsResponse()); | 1229 var resp = convert.JSON.encode(buildListActiveBreakpointsResponse()); |
| 1230 return new async.Future.value(stringResponse(200, h, resp)); | 1230 return new async.Future.value(stringResponse(200, h, resp)); |
| 1231 }), true); | 1231 }), true); |
| 1232 res.list(arg_debuggeeId, successOnTimeout: arg_successOnTimeout, waitToken
: arg_waitToken).then(unittest.expectAsync(((api.ListActiveBreakpointsResponse r
esponse) { | 1232 res.list(arg_debuggeeId, waitToken: arg_waitToken, successOnTimeout: arg_s
uccessOnTimeout).then(unittest.expectAsync1(((api.ListActiveBreakpointsResponse
response) { |
| 1233 checkListActiveBreakpointsResponse(response); | 1233 checkListActiveBreakpointsResponse(response); |
| 1234 }))); | 1234 }))); |
| 1235 }); | 1235 }); |
| 1236 | 1236 |
| 1237 unittest.test("method--update", () { | 1237 unittest.test("method--update", () { |
| 1238 | 1238 |
| 1239 var mock = new HttpServerMock(); | 1239 var mock = new HttpServerMock(); |
| 1240 api.ControllerDebuggeesBreakpointsResourceApi res = new api.ClouddebuggerA
pi(mock).controller.debuggees.breakpoints; | 1240 api.ControllerDebuggeesBreakpointsResourceApi res = new api.ClouddebuggerA
pi(mock).controller.debuggees.breakpoints; |
| 1241 var arg_request = buildUpdateActiveBreakpointRequest(); | 1241 var arg_request = buildUpdateActiveBreakpointRequest(); |
| 1242 var arg_debuggeeId = "foo"; | 1242 var arg_debuggeeId = "foo"; |
| 1243 var arg_id = "foo"; | 1243 var arg_id = "foo"; |
| 1244 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1244 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 1245 var obj = new api.UpdateActiveBreakpointRequest.fromJson(json); | 1245 var obj = new api.UpdateActiveBreakpointRequest.fromJson(json); |
| 1246 checkUpdateActiveBreakpointRequest(obj); | 1246 checkUpdateActiveBreakpointRequest(obj); |
| 1247 | 1247 |
| 1248 var path = (req.url).path; | 1248 var path = (req.url).path; |
| 1249 var pathOffset = 0; | 1249 var pathOffset = 0; |
| 1250 var index; | 1250 var index; |
| 1251 var subPart; | 1251 var subPart; |
| 1252 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1252 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 1253 pathOffset += 1; | 1253 pathOffset += 1; |
| 1254 unittest.expect(path.substring(pathOffset, pathOffset + 24), unittest.eq
uals("v2/controller/debuggees/")); | 1254 unittest.expect(path.substring(pathOffset, pathOffset + 24), unittest.eq
uals("v2/controller/debuggees/")); |
| (...skipping 26 matching lines...) Expand all Loading... |
| 1281 } | 1281 } |
| 1282 } | 1282 } |
| 1283 | 1283 |
| 1284 | 1284 |
| 1285 var h = { | 1285 var h = { |
| 1286 "content-type" : "application/json; charset=utf-8", | 1286 "content-type" : "application/json; charset=utf-8", |
| 1287 }; | 1287 }; |
| 1288 var resp = convert.JSON.encode(buildUpdateActiveBreakpointResponse()); | 1288 var resp = convert.JSON.encode(buildUpdateActiveBreakpointResponse()); |
| 1289 return new async.Future.value(stringResponse(200, h, resp)); | 1289 return new async.Future.value(stringResponse(200, h, resp)); |
| 1290 }), true); | 1290 }), true); |
| 1291 res.update(arg_request, arg_debuggeeId, arg_id).then(unittest.expectAsync(
((api.UpdateActiveBreakpointResponse response) { | 1291 res.update(arg_request, arg_debuggeeId, arg_id).then(unittest.expectAsync1
(((api.UpdateActiveBreakpointResponse response) { |
| 1292 checkUpdateActiveBreakpointResponse(response); | 1292 checkUpdateActiveBreakpointResponse(response); |
| 1293 }))); | 1293 }))); |
| 1294 }); | 1294 }); |
| 1295 | 1295 |
| 1296 }); | 1296 }); |
| 1297 | 1297 |
| 1298 | 1298 |
| 1299 unittest.group("resource-DebuggerDebuggeesResourceApi", () { | 1299 unittest.group("resource-DebuggerDebuggeesResourceApi", () { |
| 1300 unittest.test("method--list", () { | 1300 unittest.test("method--list", () { |
| 1301 | 1301 |
| 1302 var mock = new HttpServerMock(); | 1302 var mock = new HttpServerMock(); |
| 1303 api.DebuggerDebuggeesResourceApi res = new api.ClouddebuggerApi(mock).debu
gger.debuggees; | 1303 api.DebuggerDebuggeesResourceApi res = new api.ClouddebuggerApi(mock).debu
gger.debuggees; |
| 1304 var arg_project = "foo"; | |
| 1305 var arg_clientVersion = "foo"; | 1304 var arg_clientVersion = "foo"; |
| 1306 var arg_includeInactive = true; | 1305 var arg_includeInactive = true; |
| 1307 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1306 var arg_project = "foo"; |
| 1307 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 1308 var path = (req.url).path; | 1308 var path = (req.url).path; |
| 1309 var pathOffset = 0; | 1309 var pathOffset = 0; |
| 1310 var index; | 1310 var index; |
| 1311 var subPart; | 1311 var subPart; |
| 1312 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1312 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 1313 pathOffset += 1; | 1313 pathOffset += 1; |
| 1314 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq
uals("v2/debugger/debuggees")); | 1314 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq
uals("v2/debugger/debuggees")); |
| 1315 pathOffset += 21; | 1315 pathOffset += 21; |
| 1316 | 1316 |
| 1317 var query = (req.url).query; | 1317 var query = (req.url).query; |
| 1318 var queryOffset = 0; | 1318 var queryOffset = 0; |
| 1319 var queryMap = {}; | 1319 var queryMap = {}; |
| 1320 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 1320 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 1321 parseBool(n) { | 1321 parseBool(n) { |
| 1322 if (n == "true") return true; | 1322 if (n == "true") return true; |
| 1323 if (n == "false") return false; | 1323 if (n == "false") return false; |
| 1324 if (n == null) return null; | 1324 if (n == null) return null; |
| 1325 throw new core.ArgumentError("Invalid boolean: $n"); | 1325 throw new core.ArgumentError("Invalid boolean: $n"); |
| 1326 } | 1326 } |
| 1327 if (query.length > 0) { | 1327 if (query.length > 0) { |
| 1328 for (var part in query.split("&")) { | 1328 for (var part in query.split("&")) { |
| 1329 var keyvalue = part.split("="); | 1329 var keyvalue = part.split("="); |
| 1330 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 1330 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 1331 } | 1331 } |
| 1332 } | 1332 } |
| 1333 unittest.expect(queryMap["project"].first, unittest.equals(arg_project))
; | |
| 1334 unittest.expect(queryMap["clientVersion"].first, unittest.equals(arg_cli
entVersion)); | 1333 unittest.expect(queryMap["clientVersion"].first, unittest.equals(arg_cli
entVersion)); |
| 1335 unittest.expect(queryMap["includeInactive"].first, unittest.equals("$arg
_includeInactive")); | 1334 unittest.expect(queryMap["includeInactive"].first, unittest.equals("$arg
_includeInactive")); |
| 1335 unittest.expect(queryMap["project"].first, unittest.equals(arg_project))
; |
| 1336 | 1336 |
| 1337 | 1337 |
| 1338 var h = { | 1338 var h = { |
| 1339 "content-type" : "application/json; charset=utf-8", | 1339 "content-type" : "application/json; charset=utf-8", |
| 1340 }; | 1340 }; |
| 1341 var resp = convert.JSON.encode(buildListDebuggeesResponse()); | 1341 var resp = convert.JSON.encode(buildListDebuggeesResponse()); |
| 1342 return new async.Future.value(stringResponse(200, h, resp)); | 1342 return new async.Future.value(stringResponse(200, h, resp)); |
| 1343 }), true); | 1343 }), true); |
| 1344 res.list(project: arg_project, clientVersion: arg_clientVersion, includeIn
active: arg_includeInactive).then(unittest.expectAsync(((api.ListDebuggeesRespon
se response) { | 1344 res.list(clientVersion: arg_clientVersion, includeInactive: arg_includeIna
ctive, project: arg_project).then(unittest.expectAsync1(((api.ListDebuggeesRespo
nse response) { |
| 1345 checkListDebuggeesResponse(response); | 1345 checkListDebuggeesResponse(response); |
| 1346 }))); | 1346 }))); |
| 1347 }); | 1347 }); |
| 1348 | 1348 |
| 1349 }); | 1349 }); |
| 1350 | 1350 |
| 1351 | 1351 |
| 1352 unittest.group("resource-DebuggerDebuggeesBreakpointsResourceApi", () { | 1352 unittest.group("resource-DebuggerDebuggeesBreakpointsResourceApi", () { |
| 1353 unittest.test("method--delete", () { | 1353 unittest.test("method--delete", () { |
| 1354 | 1354 |
| 1355 var mock = new HttpServerMock(); | 1355 var mock = new HttpServerMock(); |
| 1356 api.DebuggerDebuggeesBreakpointsResourceApi res = new api.ClouddebuggerApi
(mock).debugger.debuggees.breakpoints; | 1356 api.DebuggerDebuggeesBreakpointsResourceApi res = new api.ClouddebuggerApi
(mock).debugger.debuggees.breakpoints; |
| 1357 var arg_debuggeeId = "foo"; | 1357 var arg_debuggeeId = "foo"; |
| 1358 var arg_breakpointId = "foo"; | 1358 var arg_breakpointId = "foo"; |
| 1359 var arg_clientVersion = "foo"; | 1359 var arg_clientVersion = "foo"; |
| 1360 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1360 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 1361 var path = (req.url).path; | 1361 var path = (req.url).path; |
| 1362 var pathOffset = 0; | 1362 var pathOffset = 0; |
| 1363 var index; | 1363 var index; |
| 1364 var subPart; | 1364 var subPart; |
| 1365 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1365 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 1366 pathOffset += 1; | 1366 pathOffset += 1; |
| 1367 unittest.expect(path.substring(pathOffset, pathOffset + 22), unittest.eq
uals("v2/debugger/debuggees/")); | 1367 unittest.expect(path.substring(pathOffset, pathOffset + 22), unittest.eq
uals("v2/debugger/debuggees/")); |
| 1368 pathOffset += 22; | 1368 pathOffset += 22; |
| 1369 index = path.indexOf("/breakpoints/", pathOffset); | 1369 index = path.indexOf("/breakpoints/", pathOffset); |
| 1370 unittest.expect(index >= 0, unittest.isTrue); | 1370 unittest.expect(index >= 0, unittest.isTrue); |
| (...skipping 24 matching lines...) Expand all Loading... |
| 1395 } | 1395 } |
| 1396 unittest.expect(queryMap["clientVersion"].first, unittest.equals(arg_cli
entVersion)); | 1396 unittest.expect(queryMap["clientVersion"].first, unittest.equals(arg_cli
entVersion)); |
| 1397 | 1397 |
| 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.expectAsync(((api.Empty response) { | 1405 res.delete(arg_debuggeeId, arg_breakpointId, clientVersion: arg_clientVers
ion).then(unittest.expectAsync1(((api.Empty response) { |
| 1406 checkEmpty(response); | 1406 checkEmpty(response); |
| 1407 }))); | 1407 }))); |
| 1408 }); | 1408 }); |
| 1409 | 1409 |
| 1410 unittest.test("method--get", () { | 1410 unittest.test("method--get", () { |
| 1411 | 1411 |
| 1412 var mock = new HttpServerMock(); | 1412 var mock = new HttpServerMock(); |
| 1413 api.DebuggerDebuggeesBreakpointsResourceApi res = new api.ClouddebuggerApi
(mock).debugger.debuggees.breakpoints; | 1413 api.DebuggerDebuggeesBreakpointsResourceApi res = new api.ClouddebuggerApi
(mock).debugger.debuggees.breakpoints; |
| 1414 var arg_debuggeeId = "foo"; | 1414 var arg_debuggeeId = "foo"; |
| 1415 var arg_breakpointId = "foo"; | 1415 var arg_breakpointId = "foo"; |
| 1416 var arg_clientVersion = "foo"; | 1416 var arg_clientVersion = "foo"; |
| 1417 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1417 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 1418 var path = (req.url).path; | 1418 var path = (req.url).path; |
| 1419 var pathOffset = 0; | 1419 var pathOffset = 0; |
| 1420 var index; | 1420 var index; |
| 1421 var subPart; | 1421 var subPart; |
| 1422 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1422 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 1423 pathOffset += 1; | 1423 pathOffset += 1; |
| 1424 unittest.expect(path.substring(pathOffset, pathOffset + 22), unittest.eq
uals("v2/debugger/debuggees/")); | 1424 unittest.expect(path.substring(pathOffset, pathOffset + 22), unittest.eq
uals("v2/debugger/debuggees/")); |
| 1425 pathOffset += 22; | 1425 pathOffset += 22; |
| 1426 index = path.indexOf("/breakpoints/", pathOffset); | 1426 index = path.indexOf("/breakpoints/", pathOffset); |
| 1427 unittest.expect(index >= 0, unittest.isTrue); | 1427 unittest.expect(index >= 0, unittest.isTrue); |
| (...skipping 24 matching lines...) Expand all Loading... |
| 1452 } | 1452 } |
| 1453 unittest.expect(queryMap["clientVersion"].first, unittest.equals(arg_cli
entVersion)); | 1453 unittest.expect(queryMap["clientVersion"].first, unittest.equals(arg_cli
entVersion)); |
| 1454 | 1454 |
| 1455 | 1455 |
| 1456 var h = { | 1456 var h = { |
| 1457 "content-type" : "application/json; charset=utf-8", | 1457 "content-type" : "application/json; charset=utf-8", |
| 1458 }; | 1458 }; |
| 1459 var resp = convert.JSON.encode(buildGetBreakpointResponse()); | 1459 var resp = convert.JSON.encode(buildGetBreakpointResponse()); |
| 1460 return new async.Future.value(stringResponse(200, h, resp)); | 1460 return new async.Future.value(stringResponse(200, h, resp)); |
| 1461 }), true); | 1461 }), true); |
| 1462 res.get(arg_debuggeeId, arg_breakpointId, clientVersion: arg_clientVersion
).then(unittest.expectAsync(((api.GetBreakpointResponse response) { | 1462 res.get(arg_debuggeeId, arg_breakpointId, clientVersion: arg_clientVersion
).then(unittest.expectAsync1(((api.GetBreakpointResponse response) { |
| 1463 checkGetBreakpointResponse(response); | 1463 checkGetBreakpointResponse(response); |
| 1464 }))); | 1464 }))); |
| 1465 }); | 1465 }); |
| 1466 | 1466 |
| 1467 unittest.test("method--list", () { | 1467 unittest.test("method--list", () { |
| 1468 | 1468 |
| 1469 var mock = new HttpServerMock(); | 1469 var mock = new HttpServerMock(); |
| 1470 api.DebuggerDebuggeesBreakpointsResourceApi res = new api.ClouddebuggerApi
(mock).debugger.debuggees.breakpoints; | 1470 api.DebuggerDebuggeesBreakpointsResourceApi res = new api.ClouddebuggerApi
(mock).debugger.debuggees.breakpoints; |
| 1471 var arg_debuggeeId = "foo"; | 1471 var arg_debuggeeId = "foo"; |
| 1472 var arg_waitToken = "foo"; |
| 1473 var arg_action_value = "foo"; |
| 1472 var arg_clientVersion = "foo"; | 1474 var arg_clientVersion = "foo"; |
| 1473 var arg_action_value = "foo"; | 1475 var arg_includeInactive = true; |
| 1474 var arg_includeAllUsers = true; | 1476 var arg_includeAllUsers = true; |
| 1475 var arg_includeInactive = true; | |
| 1476 var arg_stripResults = true; | 1477 var arg_stripResults = true; |
| 1477 var arg_waitToken = "foo"; | 1478 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 1478 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 1479 var path = (req.url).path; | 1479 var path = (req.url).path; |
| 1480 var pathOffset = 0; | 1480 var pathOffset = 0; |
| 1481 var index; | 1481 var index; |
| 1482 var subPart; | 1482 var subPart; |
| 1483 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1483 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 1484 pathOffset += 1; | 1484 pathOffset += 1; |
| 1485 unittest.expect(path.substring(pathOffset, pathOffset + 22), unittest.eq
uals("v2/debugger/debuggees/")); | 1485 unittest.expect(path.substring(pathOffset, pathOffset + 22), unittest.eq
uals("v2/debugger/debuggees/")); |
| 1486 pathOffset += 22; | 1486 pathOffset += 22; |
| 1487 index = path.indexOf("/breakpoints", pathOffset); | 1487 index = path.indexOf("/breakpoints", pathOffset); |
| 1488 unittest.expect(index >= 0, unittest.isTrue); | 1488 unittest.expect(index >= 0, unittest.isTrue); |
| (...skipping 12 matching lines...) Expand all Loading... |
| 1501 if (n == "false") return false; | 1501 if (n == "false") return false; |
| 1502 if (n == null) return null; | 1502 if (n == null) return null; |
| 1503 throw new core.ArgumentError("Invalid boolean: $n"); | 1503 throw new core.ArgumentError("Invalid boolean: $n"); |
| 1504 } | 1504 } |
| 1505 if (query.length > 0) { | 1505 if (query.length > 0) { |
| 1506 for (var part in query.split("&")) { | 1506 for (var part in query.split("&")) { |
| 1507 var keyvalue = part.split("="); | 1507 var keyvalue = part.split("="); |
| 1508 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 1508 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 1509 } | 1509 } |
| 1510 } | 1510 } |
| 1511 unittest.expect(queryMap["waitToken"].first, unittest.equals(arg_waitTok
en)); |
| 1512 unittest.expect(queryMap["action.value"].first, unittest.equals(arg_acti
on_value)); |
| 1511 unittest.expect(queryMap["clientVersion"].first, unittest.equals(arg_cli
entVersion)); | 1513 unittest.expect(queryMap["clientVersion"].first, unittest.equals(arg_cli
entVersion)); |
| 1512 unittest.expect(queryMap["action.value"].first, unittest.equals(arg_acti
on_value)); | 1514 unittest.expect(queryMap["includeInactive"].first, unittest.equals("$arg
_includeInactive")); |
| 1513 unittest.expect(queryMap["includeAllUsers"].first, unittest.equals("$arg
_includeAllUsers")); | 1515 unittest.expect(queryMap["includeAllUsers"].first, unittest.equals("$arg
_includeAllUsers")); |
| 1514 unittest.expect(queryMap["includeInactive"].first, unittest.equals("$arg
_includeInactive")); | |
| 1515 unittest.expect(queryMap["stripResults"].first, unittest.equals("$arg_st
ripResults")); | 1516 unittest.expect(queryMap["stripResults"].first, unittest.equals("$arg_st
ripResults")); |
| 1516 unittest.expect(queryMap["waitToken"].first, unittest.equals(arg_waitTok
en)); | |
| 1517 | 1517 |
| 1518 | 1518 |
| 1519 var h = { | 1519 var h = { |
| 1520 "content-type" : "application/json; charset=utf-8", | 1520 "content-type" : "application/json; charset=utf-8", |
| 1521 }; | 1521 }; |
| 1522 var resp = convert.JSON.encode(buildListBreakpointsResponse()); | 1522 var resp = convert.JSON.encode(buildListBreakpointsResponse()); |
| 1523 return new async.Future.value(stringResponse(200, h, resp)); | 1523 return new async.Future.value(stringResponse(200, h, resp)); |
| 1524 }), true); | 1524 }), true); |
| 1525 res.list(arg_debuggeeId, clientVersion: arg_clientVersion, action_value: a
rg_action_value, includeAllUsers: arg_includeAllUsers, includeInactive: arg_incl
udeInactive, stripResults: arg_stripResults, waitToken: arg_waitToken).then(unit
test.expectAsync(((api.ListBreakpointsResponse response) { | 1525 res.list(arg_debuggeeId, waitToken: arg_waitToken, action_value: arg_actio
n_value, clientVersion: arg_clientVersion, includeInactive: arg_includeInactive,
includeAllUsers: arg_includeAllUsers, stripResults: arg_stripResults).then(unit
test.expectAsync1(((api.ListBreakpointsResponse response) { |
| 1526 checkListBreakpointsResponse(response); | 1526 checkListBreakpointsResponse(response); |
| 1527 }))); | 1527 }))); |
| 1528 }); | 1528 }); |
| 1529 | 1529 |
| 1530 unittest.test("method--set", () { | 1530 unittest.test("method--set", () { |
| 1531 | 1531 |
| 1532 var mock = new HttpServerMock(); | 1532 var mock = new HttpServerMock(); |
| 1533 api.DebuggerDebuggeesBreakpointsResourceApi res = new api.ClouddebuggerApi
(mock).debugger.debuggees.breakpoints; | 1533 api.DebuggerDebuggeesBreakpointsResourceApi res = new api.ClouddebuggerApi
(mock).debugger.debuggees.breakpoints; |
| 1534 var arg_request = buildBreakpoint(); | 1534 var arg_request = buildBreakpoint(); |
| 1535 var arg_debuggeeId = "foo"; | 1535 var arg_debuggeeId = "foo"; |
| 1536 var arg_clientVersion = "foo"; | 1536 var arg_clientVersion = "foo"; |
| 1537 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1537 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 1538 var obj = new api.Breakpoint.fromJson(json); | 1538 var obj = new api.Breakpoint.fromJson(json); |
| 1539 checkBreakpoint(obj); | 1539 checkBreakpoint(obj); |
| 1540 | 1540 |
| 1541 var path = (req.url).path; | 1541 var path = (req.url).path; |
| 1542 var pathOffset = 0; | 1542 var pathOffset = 0; |
| 1543 var index; | 1543 var index; |
| 1544 var subPart; | 1544 var subPart; |
| 1545 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1545 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 1546 pathOffset += 1; | 1546 pathOffset += 1; |
| 1547 unittest.expect(path.substring(pathOffset, pathOffset + 22), unittest.eq
uals("v2/debugger/debuggees/")); | 1547 unittest.expect(path.substring(pathOffset, pathOffset + 22), unittest.eq
uals("v2/debugger/debuggees/")); |
| (...skipping 24 matching lines...) Expand all Loading... |
| 1572 } | 1572 } |
| 1573 unittest.expect(queryMap["clientVersion"].first, unittest.equals(arg_cli
entVersion)); | 1573 unittest.expect(queryMap["clientVersion"].first, unittest.equals(arg_cli
entVersion)); |
| 1574 | 1574 |
| 1575 | 1575 |
| 1576 var h = { | 1576 var h = { |
| 1577 "content-type" : "application/json; charset=utf-8", | 1577 "content-type" : "application/json; charset=utf-8", |
| 1578 }; | 1578 }; |
| 1579 var resp = convert.JSON.encode(buildSetBreakpointResponse()); | 1579 var resp = convert.JSON.encode(buildSetBreakpointResponse()); |
| 1580 return new async.Future.value(stringResponse(200, h, resp)); | 1580 return new async.Future.value(stringResponse(200, h, resp)); |
| 1581 }), true); | 1581 }), true); |
| 1582 res.set(arg_request, arg_debuggeeId, clientVersion: arg_clientVersion).the
n(unittest.expectAsync(((api.SetBreakpointResponse response) { | 1582 res.set(arg_request, arg_debuggeeId, clientVersion: arg_clientVersion).the
n(unittest.expectAsync1(((api.SetBreakpointResponse response) { |
| 1583 checkSetBreakpointResponse(response); | 1583 checkSetBreakpointResponse(response); |
| 1584 }))); | 1584 }))); |
| 1585 }); | 1585 }); |
| 1586 | 1586 |
| 1587 }); | 1587 }); |
| 1588 | 1588 |
| 1589 | 1589 |
| 1590 } | 1590 } |
| 1591 | 1591 |
| OLD | NEW |