| OLD | NEW |
| 1 library googleapis.tracing.v1.test; | 1 library googleapis.tracing.v1.test; |
| 2 | 2 |
| 3 import "dart:core" as core; | 3 import "dart:core" as core; |
| 4 import "dart:collection" as collection; | 4 import "dart:collection" as collection; |
| 5 import "dart:async" as async; | 5 import "dart:async" as async; |
| 6 import "dart:convert" as convert; | 6 import "dart:convert" as convert; |
| 7 | 7 |
| 8 import 'package:http/http.dart' as http; | 8 import 'package:http/http.dart' as http; |
| 9 import 'package:http/testing.dart' as http_testing; | 9 import 'package:http/testing.dart' as http_testing; |
| 10 import 'package:unittest/unittest.dart' as unittest; | 10 import 'package:unittest/unittest.dart' as unittest; |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 } | 44 } |
| 45 } | 45 } |
| 46 } | 46 } |
| 47 | 47 |
| 48 http.StreamedResponse stringResponse( | 48 http.StreamedResponse stringResponse( |
| 49 core.int status, core.Map headers, core.String body) { | 49 core.int status, core.Map headers, core.String body) { |
| 50 var stream = new async.Stream.fromIterable([convert.UTF8.encode(body)]); | 50 var stream = new async.Stream.fromIterable([convert.UTF8.encode(body)]); |
| 51 return new http.StreamedResponse(stream, status, headers: headers); | 51 return new http.StreamedResponse(stream, status, headers: headers); |
| 52 } | 52 } |
| 53 | 53 |
| 54 buildUnnamed2958() { | 54 buildUnnamed3064() { |
| 55 var o = new core.Map<core.String, api.AttributeValue>(); | 55 var o = new core.Map<core.String, api.AttributeValue>(); |
| 56 o["x"] = buildAttributeValue(); | 56 o["x"] = buildAttributeValue(); |
| 57 o["y"] = buildAttributeValue(); | 57 o["y"] = buildAttributeValue(); |
| 58 return o; | 58 return o; |
| 59 } | 59 } |
| 60 | 60 |
| 61 checkUnnamed2958(core.Map<core.String, api.AttributeValue> o) { | 61 checkUnnamed3064(core.Map<core.String, api.AttributeValue> o) { |
| 62 unittest.expect(o, unittest.hasLength(2)); | 62 unittest.expect(o, unittest.hasLength(2)); |
| 63 checkAttributeValue(o["x"]); | 63 checkAttributeValue(o["x"]); |
| 64 checkAttributeValue(o["y"]); | 64 checkAttributeValue(o["y"]); |
| 65 } | 65 } |
| 66 | 66 |
| 67 core.int buildCounterAnnotation = 0; | 67 core.int buildCounterAnnotation = 0; |
| 68 buildAnnotation() { | 68 buildAnnotation() { |
| 69 var o = new api.Annotation(); | 69 var o = new api.Annotation(); |
| 70 buildCounterAnnotation++; | 70 buildCounterAnnotation++; |
| 71 if (buildCounterAnnotation < 3) { | 71 if (buildCounterAnnotation < 3) { |
| 72 o.attributes = buildUnnamed2958(); | 72 o.attributes = buildUnnamed3064(); |
| 73 o.description = "foo"; | 73 o.description = "foo"; |
| 74 } | 74 } |
| 75 buildCounterAnnotation--; | 75 buildCounterAnnotation--; |
| 76 return o; | 76 return o; |
| 77 } | 77 } |
| 78 | 78 |
| 79 checkAnnotation(api.Annotation o) { | 79 checkAnnotation(api.Annotation o) { |
| 80 buildCounterAnnotation++; | 80 buildCounterAnnotation++; |
| 81 if (buildCounterAnnotation < 3) { | 81 if (buildCounterAnnotation < 3) { |
| 82 checkUnnamed2958(o.attributes); | 82 checkUnnamed3064(o.attributes); |
| 83 unittest.expect(o.description, unittest.equals('foo')); | 83 unittest.expect(o.description, unittest.equals('foo')); |
| 84 } | 84 } |
| 85 buildCounterAnnotation--; | 85 buildCounterAnnotation--; |
| 86 } | 86 } |
| 87 | 87 |
| 88 core.int buildCounterAttributeValue = 0; | 88 core.int buildCounterAttributeValue = 0; |
| 89 buildAttributeValue() { | 89 buildAttributeValue() { |
| 90 var o = new api.AttributeValue(); | 90 var o = new api.AttributeValue(); |
| 91 buildCounterAttributeValue++; | 91 buildCounterAttributeValue++; |
| 92 if (buildCounterAttributeValue < 3) { | 92 if (buildCounterAttributeValue < 3) { |
| 93 o.boolValue = true; | 93 o.boolValue = true; |
| 94 o.intValue = "foo"; | 94 o.intValue = "foo"; |
| 95 o.stringValue = "foo"; | 95 o.stringValue = "foo"; |
| 96 } | 96 } |
| 97 buildCounterAttributeValue--; | 97 buildCounterAttributeValue--; |
| 98 return o; | 98 return o; |
| 99 } | 99 } |
| 100 | 100 |
| 101 checkAttributeValue(api.AttributeValue o) { | 101 checkAttributeValue(api.AttributeValue o) { |
| 102 buildCounterAttributeValue++; | 102 buildCounterAttributeValue++; |
| 103 if (buildCounterAttributeValue < 3) { | 103 if (buildCounterAttributeValue < 3) { |
| 104 unittest.expect(o.boolValue, unittest.isTrue); | 104 unittest.expect(o.boolValue, unittest.isTrue); |
| 105 unittest.expect(o.intValue, unittest.equals('foo')); | 105 unittest.expect(o.intValue, unittest.equals('foo')); |
| 106 unittest.expect(o.stringValue, unittest.equals('foo')); | 106 unittest.expect(o.stringValue, unittest.equals('foo')); |
| 107 } | 107 } |
| 108 buildCounterAttributeValue--; | 108 buildCounterAttributeValue--; |
| 109 } | 109 } |
| 110 | 110 |
| 111 buildUnnamed2959() { | 111 buildUnnamed3065() { |
| 112 var o = new core.Map<core.String, api.SpanUpdates>(); | 112 var o = new core.Map<core.String, api.SpanUpdates>(); |
| 113 o["x"] = buildSpanUpdates(); | 113 o["x"] = buildSpanUpdates(); |
| 114 o["y"] = buildSpanUpdates(); | 114 o["y"] = buildSpanUpdates(); |
| 115 return o; | 115 return o; |
| 116 } | 116 } |
| 117 | 117 |
| 118 checkUnnamed2959(core.Map<core.String, api.SpanUpdates> o) { | 118 checkUnnamed3065(core.Map<core.String, api.SpanUpdates> o) { |
| 119 unittest.expect(o, unittest.hasLength(2)); | 119 unittest.expect(o, unittest.hasLength(2)); |
| 120 checkSpanUpdates(o["x"]); | 120 checkSpanUpdates(o["x"]); |
| 121 checkSpanUpdates(o["y"]); | 121 checkSpanUpdates(o["y"]); |
| 122 } | 122 } |
| 123 | 123 |
| 124 core.int buildCounterBatchUpdateSpansRequest = 0; | 124 core.int buildCounterBatchUpdateSpansRequest = 0; |
| 125 buildBatchUpdateSpansRequest() { | 125 buildBatchUpdateSpansRequest() { |
| 126 var o = new api.BatchUpdateSpansRequest(); | 126 var o = new api.BatchUpdateSpansRequest(); |
| 127 buildCounterBatchUpdateSpansRequest++; | 127 buildCounterBatchUpdateSpansRequest++; |
| 128 if (buildCounterBatchUpdateSpansRequest < 3) { | 128 if (buildCounterBatchUpdateSpansRequest < 3) { |
| 129 o.spanUpdates = buildUnnamed2959(); | 129 o.spanUpdates = buildUnnamed3065(); |
| 130 } | 130 } |
| 131 buildCounterBatchUpdateSpansRequest--; | 131 buildCounterBatchUpdateSpansRequest--; |
| 132 return o; | 132 return o; |
| 133 } | 133 } |
| 134 | 134 |
| 135 checkBatchUpdateSpansRequest(api.BatchUpdateSpansRequest o) { | 135 checkBatchUpdateSpansRequest(api.BatchUpdateSpansRequest o) { |
| 136 buildCounterBatchUpdateSpansRequest++; | 136 buildCounterBatchUpdateSpansRequest++; |
| 137 if (buildCounterBatchUpdateSpansRequest < 3) { | 137 if (buildCounterBatchUpdateSpansRequest < 3) { |
| 138 checkUnnamed2959(o.spanUpdates); | 138 checkUnnamed3065(o.spanUpdates); |
| 139 } | 139 } |
| 140 buildCounterBatchUpdateSpansRequest--; | 140 buildCounterBatchUpdateSpansRequest--; |
| 141 } | 141 } |
| 142 | 142 |
| 143 core.int buildCounterEmpty = 0; | 143 core.int buildCounterEmpty = 0; |
| 144 buildEmpty() { | 144 buildEmpty() { |
| 145 var o = new api.Empty(); | 145 var o = new api.Empty(); |
| 146 buildCounterEmpty++; | 146 buildCounterEmpty++; |
| 147 if (buildCounterEmpty < 3) { | 147 if (buildCounterEmpty < 3) { |
| 148 } | 148 } |
| (...skipping 24 matching lines...) Expand all Loading... |
| 173 checkLink(api.Link o) { | 173 checkLink(api.Link o) { |
| 174 buildCounterLink++; | 174 buildCounterLink++; |
| 175 if (buildCounterLink < 3) { | 175 if (buildCounterLink < 3) { |
| 176 unittest.expect(o.spanId, unittest.equals('foo')); | 176 unittest.expect(o.spanId, unittest.equals('foo')); |
| 177 unittest.expect(o.traceId, unittest.equals('foo')); | 177 unittest.expect(o.traceId, unittest.equals('foo')); |
| 178 unittest.expect(o.type, unittest.equals('foo')); | 178 unittest.expect(o.type, unittest.equals('foo')); |
| 179 } | 179 } |
| 180 buildCounterLink--; | 180 buildCounterLink--; |
| 181 } | 181 } |
| 182 | 182 |
| 183 buildUnnamed2960() { | 183 buildUnnamed3066() { |
| 184 var o = new core.List<api.Span>(); | 184 var o = new core.List<api.Span>(); |
| 185 o.add(buildSpan()); | 185 o.add(buildSpan()); |
| 186 o.add(buildSpan()); | 186 o.add(buildSpan()); |
| 187 return o; | 187 return o; |
| 188 } | 188 } |
| 189 | 189 |
| 190 checkUnnamed2960(core.List<api.Span> o) { | 190 checkUnnamed3066(core.List<api.Span> o) { |
| 191 unittest.expect(o, unittest.hasLength(2)); | 191 unittest.expect(o, unittest.hasLength(2)); |
| 192 checkSpan(o[0]); | 192 checkSpan(o[0]); |
| 193 checkSpan(o[1]); | 193 checkSpan(o[1]); |
| 194 } | 194 } |
| 195 | 195 |
| 196 core.int buildCounterListSpansResponse = 0; | 196 core.int buildCounterListSpansResponse = 0; |
| 197 buildListSpansResponse() { | 197 buildListSpansResponse() { |
| 198 var o = new api.ListSpansResponse(); | 198 var o = new api.ListSpansResponse(); |
| 199 buildCounterListSpansResponse++; | 199 buildCounterListSpansResponse++; |
| 200 if (buildCounterListSpansResponse < 3) { | 200 if (buildCounterListSpansResponse < 3) { |
| 201 o.nextPageToken = "foo"; | 201 o.nextPageToken = "foo"; |
| 202 o.spans = buildUnnamed2960(); | 202 o.spans = buildUnnamed3066(); |
| 203 } | 203 } |
| 204 buildCounterListSpansResponse--; | 204 buildCounterListSpansResponse--; |
| 205 return o; | 205 return o; |
| 206 } | 206 } |
| 207 | 207 |
| 208 checkListSpansResponse(api.ListSpansResponse o) { | 208 checkListSpansResponse(api.ListSpansResponse o) { |
| 209 buildCounterListSpansResponse++; | 209 buildCounterListSpansResponse++; |
| 210 if (buildCounterListSpansResponse < 3) { | 210 if (buildCounterListSpansResponse < 3) { |
| 211 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 211 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
| 212 checkUnnamed2960(o.spans); | 212 checkUnnamed3066(o.spans); |
| 213 } | 213 } |
| 214 buildCounterListSpansResponse--; | 214 buildCounterListSpansResponse--; |
| 215 } | 215 } |
| 216 | 216 |
| 217 buildUnnamed2961() { | 217 buildUnnamed3067() { |
| 218 var o = new core.List<api.Trace>(); | 218 var o = new core.List<api.Trace>(); |
| 219 o.add(buildTrace()); | 219 o.add(buildTrace()); |
| 220 o.add(buildTrace()); | 220 o.add(buildTrace()); |
| 221 return o; | 221 return o; |
| 222 } | 222 } |
| 223 | 223 |
| 224 checkUnnamed2961(core.List<api.Trace> o) { | 224 checkUnnamed3067(core.List<api.Trace> o) { |
| 225 unittest.expect(o, unittest.hasLength(2)); | 225 unittest.expect(o, unittest.hasLength(2)); |
| 226 checkTrace(o[0]); | 226 checkTrace(o[0]); |
| 227 checkTrace(o[1]); | 227 checkTrace(o[1]); |
| 228 } | 228 } |
| 229 | 229 |
| 230 core.int buildCounterListTracesResponse = 0; | 230 core.int buildCounterListTracesResponse = 0; |
| 231 buildListTracesResponse() { | 231 buildListTracesResponse() { |
| 232 var o = new api.ListTracesResponse(); | 232 var o = new api.ListTracesResponse(); |
| 233 buildCounterListTracesResponse++; | 233 buildCounterListTracesResponse++; |
| 234 if (buildCounterListTracesResponse < 3) { | 234 if (buildCounterListTracesResponse < 3) { |
| 235 o.nextPageToken = "foo"; | 235 o.nextPageToken = "foo"; |
| 236 o.traces = buildUnnamed2961(); | 236 o.traces = buildUnnamed3067(); |
| 237 } | 237 } |
| 238 buildCounterListTracesResponse--; | 238 buildCounterListTracesResponse--; |
| 239 return o; | 239 return o; |
| 240 } | 240 } |
| 241 | 241 |
| 242 checkListTracesResponse(api.ListTracesResponse o) { | 242 checkListTracesResponse(api.ListTracesResponse o) { |
| 243 buildCounterListTracesResponse++; | 243 buildCounterListTracesResponse++; |
| 244 if (buildCounterListTracesResponse < 3) { | 244 if (buildCounterListTracesResponse < 3) { |
| 245 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 245 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
| 246 checkUnnamed2961(o.traces); | 246 checkUnnamed3067(o.traces); |
| 247 } | 247 } |
| 248 buildCounterListTracesResponse--; | 248 buildCounterListTracesResponse--; |
| 249 } | 249 } |
| 250 | 250 |
| 251 core.int buildCounterModule = 0; | 251 core.int buildCounterModule = 0; |
| 252 buildModule() { | 252 buildModule() { |
| 253 var o = new api.Module(); | 253 var o = new api.Module(); |
| 254 buildCounterModule++; | 254 buildCounterModule++; |
| 255 if (buildCounterModule < 3) { | 255 if (buildCounterModule < 3) { |
| 256 o.buildId = "foo"; | 256 o.buildId = "foo"; |
| (...skipping 30 matching lines...) Expand all Loading... |
| 287 buildCounterNetworkEvent++; | 287 buildCounterNetworkEvent++; |
| 288 if (buildCounterNetworkEvent < 3) { | 288 if (buildCounterNetworkEvent < 3) { |
| 289 unittest.expect(o.kernelTime, unittest.equals('foo')); | 289 unittest.expect(o.kernelTime, unittest.equals('foo')); |
| 290 unittest.expect(o.messageId, unittest.equals('foo')); | 290 unittest.expect(o.messageId, unittest.equals('foo')); |
| 291 unittest.expect(o.messageSize, unittest.equals('foo')); | 291 unittest.expect(o.messageSize, unittest.equals('foo')); |
| 292 unittest.expect(o.type, unittest.equals('foo')); | 292 unittest.expect(o.type, unittest.equals('foo')); |
| 293 } | 293 } |
| 294 buildCounterNetworkEvent--; | 294 buildCounterNetworkEvent--; |
| 295 } | 295 } |
| 296 | 296 |
| 297 buildUnnamed2962() { | 297 buildUnnamed3068() { |
| 298 var o = new core.Map<core.String, api.AttributeValue>(); | 298 var o = new core.Map<core.String, api.AttributeValue>(); |
| 299 o["x"] = buildAttributeValue(); | 299 o["x"] = buildAttributeValue(); |
| 300 o["y"] = buildAttributeValue(); | 300 o["y"] = buildAttributeValue(); |
| 301 return o; | 301 return o; |
| 302 } | 302 } |
| 303 | 303 |
| 304 checkUnnamed2962(core.Map<core.String, api.AttributeValue> o) { | 304 checkUnnamed3068(core.Map<core.String, api.AttributeValue> o) { |
| 305 unittest.expect(o, unittest.hasLength(2)); | 305 unittest.expect(o, unittest.hasLength(2)); |
| 306 checkAttributeValue(o["x"]); | 306 checkAttributeValue(o["x"]); |
| 307 checkAttributeValue(o["y"]); | 307 checkAttributeValue(o["y"]); |
| 308 } | 308 } |
| 309 | 309 |
| 310 buildUnnamed2963() { | 310 buildUnnamed3069() { |
| 311 var o = new core.List<api.Link>(); | 311 var o = new core.List<api.Link>(); |
| 312 o.add(buildLink()); | 312 o.add(buildLink()); |
| 313 o.add(buildLink()); | 313 o.add(buildLink()); |
| 314 return o; | 314 return o; |
| 315 } | 315 } |
| 316 | 316 |
| 317 checkUnnamed2963(core.List<api.Link> o) { | 317 checkUnnamed3069(core.List<api.Link> o) { |
| 318 unittest.expect(o, unittest.hasLength(2)); | 318 unittest.expect(o, unittest.hasLength(2)); |
| 319 checkLink(o[0]); | 319 checkLink(o[0]); |
| 320 checkLink(o[1]); | 320 checkLink(o[1]); |
| 321 } | 321 } |
| 322 | 322 |
| 323 buildUnnamed2964() { | 323 buildUnnamed3070() { |
| 324 var o = new core.List<api.TimeEvent>(); | 324 var o = new core.List<api.TimeEvent>(); |
| 325 o.add(buildTimeEvent()); | 325 o.add(buildTimeEvent()); |
| 326 o.add(buildTimeEvent()); | 326 o.add(buildTimeEvent()); |
| 327 return o; | 327 return o; |
| 328 } | 328 } |
| 329 | 329 |
| 330 checkUnnamed2964(core.List<api.TimeEvent> o) { | 330 checkUnnamed3070(core.List<api.TimeEvent> o) { |
| 331 unittest.expect(o, unittest.hasLength(2)); | 331 unittest.expect(o, unittest.hasLength(2)); |
| 332 checkTimeEvent(o[0]); | 332 checkTimeEvent(o[0]); |
| 333 checkTimeEvent(o[1]); | 333 checkTimeEvent(o[1]); |
| 334 } | 334 } |
| 335 | 335 |
| 336 core.int buildCounterSpan = 0; | 336 core.int buildCounterSpan = 0; |
| 337 buildSpan() { | 337 buildSpan() { |
| 338 var o = new api.Span(); | 338 var o = new api.Span(); |
| 339 buildCounterSpan++; | 339 buildCounterSpan++; |
| 340 if (buildCounterSpan < 3) { | 340 if (buildCounterSpan < 3) { |
| 341 o.attributes = buildUnnamed2962(); | 341 o.attributes = buildUnnamed3068(); |
| 342 o.hasRemoteParent = true; | 342 o.hasRemoteParent = true; |
| 343 o.id = "foo"; | 343 o.id = "foo"; |
| 344 o.links = buildUnnamed2963(); | 344 o.links = buildUnnamed3069(); |
| 345 o.localEndTime = "foo"; | 345 o.localEndTime = "foo"; |
| 346 o.localStartTime = "foo"; | 346 o.localStartTime = "foo"; |
| 347 o.name = "foo"; | 347 o.name = "foo"; |
| 348 o.parentId = "foo"; | 348 o.parentId = "foo"; |
| 349 o.stackTrace = buildStackTrace(); | 349 o.stackTrace = buildStackTrace(); |
| 350 o.status = buildStatus(); | 350 o.status = buildStatus(); |
| 351 o.timeEvents = buildUnnamed2964(); | 351 o.timeEvents = buildUnnamed3070(); |
| 352 } | 352 } |
| 353 buildCounterSpan--; | 353 buildCounterSpan--; |
| 354 return o; | 354 return o; |
| 355 } | 355 } |
| 356 | 356 |
| 357 checkSpan(api.Span o) { | 357 checkSpan(api.Span o) { |
| 358 buildCounterSpan++; | 358 buildCounterSpan++; |
| 359 if (buildCounterSpan < 3) { | 359 if (buildCounterSpan < 3) { |
| 360 checkUnnamed2962(o.attributes); | 360 checkUnnamed3068(o.attributes); |
| 361 unittest.expect(o.hasRemoteParent, unittest.isTrue); | 361 unittest.expect(o.hasRemoteParent, unittest.isTrue); |
| 362 unittest.expect(o.id, unittest.equals('foo')); | 362 unittest.expect(o.id, unittest.equals('foo')); |
| 363 checkUnnamed2963(o.links); | 363 checkUnnamed3069(o.links); |
| 364 unittest.expect(o.localEndTime, unittest.equals('foo')); | 364 unittest.expect(o.localEndTime, unittest.equals('foo')); |
| 365 unittest.expect(o.localStartTime, unittest.equals('foo')); | 365 unittest.expect(o.localStartTime, unittest.equals('foo')); |
| 366 unittest.expect(o.name, unittest.equals('foo')); | 366 unittest.expect(o.name, unittest.equals('foo')); |
| 367 unittest.expect(o.parentId, unittest.equals('foo')); | 367 unittest.expect(o.parentId, unittest.equals('foo')); |
| 368 checkStackTrace(o.stackTrace); | 368 checkStackTrace(o.stackTrace); |
| 369 checkStatus(o.status); | 369 checkStatus(o.status); |
| 370 checkUnnamed2964(o.timeEvents); | 370 checkUnnamed3070(o.timeEvents); |
| 371 } | 371 } |
| 372 buildCounterSpan--; | 372 buildCounterSpan--; |
| 373 } | 373 } |
| 374 | 374 |
| 375 buildUnnamed2965() { | 375 buildUnnamed3071() { |
| 376 var o = new core.List<api.Span>(); | 376 var o = new core.List<api.Span>(); |
| 377 o.add(buildSpan()); | 377 o.add(buildSpan()); |
| 378 o.add(buildSpan()); | 378 o.add(buildSpan()); |
| 379 return o; | 379 return o; |
| 380 } | 380 } |
| 381 | 381 |
| 382 checkUnnamed2965(core.List<api.Span> o) { | 382 checkUnnamed3071(core.List<api.Span> o) { |
| 383 unittest.expect(o, unittest.hasLength(2)); | 383 unittest.expect(o, unittest.hasLength(2)); |
| 384 checkSpan(o[0]); | 384 checkSpan(o[0]); |
| 385 checkSpan(o[1]); | 385 checkSpan(o[1]); |
| 386 } | 386 } |
| 387 | 387 |
| 388 core.int buildCounterSpanUpdates = 0; | 388 core.int buildCounterSpanUpdates = 0; |
| 389 buildSpanUpdates() { | 389 buildSpanUpdates() { |
| 390 var o = new api.SpanUpdates(); | 390 var o = new api.SpanUpdates(); |
| 391 buildCounterSpanUpdates++; | 391 buildCounterSpanUpdates++; |
| 392 if (buildCounterSpanUpdates < 3) { | 392 if (buildCounterSpanUpdates < 3) { |
| 393 o.spans = buildUnnamed2965(); | 393 o.spans = buildUnnamed3071(); |
| 394 } | 394 } |
| 395 buildCounterSpanUpdates--; | 395 buildCounterSpanUpdates--; |
| 396 return o; | 396 return o; |
| 397 } | 397 } |
| 398 | 398 |
| 399 checkSpanUpdates(api.SpanUpdates o) { | 399 checkSpanUpdates(api.SpanUpdates o) { |
| 400 buildCounterSpanUpdates++; | 400 buildCounterSpanUpdates++; |
| 401 if (buildCounterSpanUpdates < 3) { | 401 if (buildCounterSpanUpdates < 3) { |
| 402 checkUnnamed2965(o.spans); | 402 checkUnnamed3071(o.spans); |
| 403 } | 403 } |
| 404 buildCounterSpanUpdates--; | 404 buildCounterSpanUpdates--; |
| 405 } | 405 } |
| 406 | 406 |
| 407 core.int buildCounterStackFrame = 0; | 407 core.int buildCounterStackFrame = 0; |
| 408 buildStackFrame() { | 408 buildStackFrame() { |
| 409 var o = new api.StackFrame(); | 409 var o = new api.StackFrame(); |
| 410 buildCounterStackFrame++; | 410 buildCounterStackFrame++; |
| 411 if (buildCounterStackFrame < 3) { | 411 if (buildCounterStackFrame < 3) { |
| 412 o.columnNumber = "foo"; | 412 o.columnNumber = "foo"; |
| (...skipping 15 matching lines...) Expand all Loading... |
| 428 unittest.expect(o.fileName, unittest.equals('foo')); | 428 unittest.expect(o.fileName, unittest.equals('foo')); |
| 429 unittest.expect(o.functionName, unittest.equals('foo')); | 429 unittest.expect(o.functionName, unittest.equals('foo')); |
| 430 unittest.expect(o.lineNumber, unittest.equals('foo')); | 430 unittest.expect(o.lineNumber, unittest.equals('foo')); |
| 431 checkModule(o.loadModule); | 431 checkModule(o.loadModule); |
| 432 unittest.expect(o.originalFunctionName, unittest.equals('foo')); | 432 unittest.expect(o.originalFunctionName, unittest.equals('foo')); |
| 433 unittest.expect(o.sourceVersion, unittest.equals('foo')); | 433 unittest.expect(o.sourceVersion, unittest.equals('foo')); |
| 434 } | 434 } |
| 435 buildCounterStackFrame--; | 435 buildCounterStackFrame--; |
| 436 } | 436 } |
| 437 | 437 |
| 438 buildUnnamed2966() { | 438 buildUnnamed3072() { |
| 439 var o = new core.List<api.StackFrame>(); | 439 var o = new core.List<api.StackFrame>(); |
| 440 o.add(buildStackFrame()); | 440 o.add(buildStackFrame()); |
| 441 o.add(buildStackFrame()); | 441 o.add(buildStackFrame()); |
| 442 return o; | 442 return o; |
| 443 } | 443 } |
| 444 | 444 |
| 445 checkUnnamed2966(core.List<api.StackFrame> o) { | 445 checkUnnamed3072(core.List<api.StackFrame> o) { |
| 446 unittest.expect(o, unittest.hasLength(2)); | 446 unittest.expect(o, unittest.hasLength(2)); |
| 447 checkStackFrame(o[0]); | 447 checkStackFrame(o[0]); |
| 448 checkStackFrame(o[1]); | 448 checkStackFrame(o[1]); |
| 449 } | 449 } |
| 450 | 450 |
| 451 core.int buildCounterStackTrace = 0; | 451 core.int buildCounterStackTrace = 0; |
| 452 buildStackTrace() { | 452 buildStackTrace() { |
| 453 var o = new api.StackTrace(); | 453 var o = new api.StackTrace(); |
| 454 buildCounterStackTrace++; | 454 buildCounterStackTrace++; |
| 455 if (buildCounterStackTrace < 3) { | 455 if (buildCounterStackTrace < 3) { |
| 456 o.stackFrame = buildUnnamed2966(); | 456 o.stackFrame = buildUnnamed3072(); |
| 457 o.stackTraceHashId = "foo"; | 457 o.stackTraceHashId = "foo"; |
| 458 } | 458 } |
| 459 buildCounterStackTrace--; | 459 buildCounterStackTrace--; |
| 460 return o; | 460 return o; |
| 461 } | 461 } |
| 462 | 462 |
| 463 checkStackTrace(api.StackTrace o) { | 463 checkStackTrace(api.StackTrace o) { |
| 464 buildCounterStackTrace++; | 464 buildCounterStackTrace++; |
| 465 if (buildCounterStackTrace < 3) { | 465 if (buildCounterStackTrace < 3) { |
| 466 checkUnnamed2966(o.stackFrame); | 466 checkUnnamed3072(o.stackFrame); |
| 467 unittest.expect(o.stackTraceHashId, unittest.equals('foo')); | 467 unittest.expect(o.stackTraceHashId, unittest.equals('foo')); |
| 468 } | 468 } |
| 469 buildCounterStackTrace--; | 469 buildCounterStackTrace--; |
| 470 } | 470 } |
| 471 | 471 |
| 472 buildUnnamed2967() { | 472 buildUnnamed3073() { |
| 473 var o = new core.Map<core.String, core.Object>(); | 473 var o = new core.Map<core.String, core.Object>(); |
| 474 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 474 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; |
| 475 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 475 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; |
| 476 return o; | 476 return o; |
| 477 } | 477 } |
| 478 | 478 |
| 479 checkUnnamed2967(core.Map<core.String, core.Object> o) { | 479 checkUnnamed3073(core.Map<core.String, core.Object> o) { |
| 480 unittest.expect(o, unittest.hasLength(2)); | 480 unittest.expect(o, unittest.hasLength(2)); |
| 481 var casted1 = (o["x"]) as core.Map; unittest.expect(casted1, unittest.hasLengt
h(3)); unittest.expect(casted1["list"], unittest.equals([1, 2, 3])); unittest.ex
pect(casted1["bool"], unittest.equals(true)); unittest.expect(casted1["string"],
unittest.equals('foo')); | 481 var casted1 = (o["x"]) as core.Map; unittest.expect(casted1, unittest.hasLengt
h(3)); unittest.expect(casted1["list"], unittest.equals([1, 2, 3])); unittest.ex
pect(casted1["bool"], unittest.equals(true)); unittest.expect(casted1["string"],
unittest.equals('foo')); |
| 482 var casted2 = (o["y"]) as core.Map; unittest.expect(casted2, unittest.hasLengt
h(3)); unittest.expect(casted2["list"], unittest.equals([1, 2, 3])); unittest.ex
pect(casted2["bool"], unittest.equals(true)); unittest.expect(casted2["string"],
unittest.equals('foo')); | 482 var casted2 = (o["y"]) as core.Map; unittest.expect(casted2, unittest.hasLengt
h(3)); unittest.expect(casted2["list"], unittest.equals([1, 2, 3])); unittest.ex
pect(casted2["bool"], unittest.equals(true)); unittest.expect(casted2["string"],
unittest.equals('foo')); |
| 483 } | 483 } |
| 484 | 484 |
| 485 buildUnnamed2968() { | 485 buildUnnamed3074() { |
| 486 var o = new core.List<core.Map<core.String, core.Object>>(); | 486 var o = new core.List<core.Map<core.String, core.Object>>(); |
| 487 o.add(buildUnnamed2967()); | 487 o.add(buildUnnamed3073()); |
| 488 o.add(buildUnnamed2967()); | 488 o.add(buildUnnamed3073()); |
| 489 return o; | 489 return o; |
| 490 } | 490 } |
| 491 | 491 |
| 492 checkUnnamed2968(core.List<core.Map<core.String, core.Object>> o) { | 492 checkUnnamed3074(core.List<core.Map<core.String, core.Object>> o) { |
| 493 unittest.expect(o, unittest.hasLength(2)); | 493 unittest.expect(o, unittest.hasLength(2)); |
| 494 checkUnnamed2967(o[0]); | 494 checkUnnamed3073(o[0]); |
| 495 checkUnnamed2967(o[1]); | 495 checkUnnamed3073(o[1]); |
| 496 } | 496 } |
| 497 | 497 |
| 498 core.int buildCounterStatus = 0; | 498 core.int buildCounterStatus = 0; |
| 499 buildStatus() { | 499 buildStatus() { |
| 500 var o = new api.Status(); | 500 var o = new api.Status(); |
| 501 buildCounterStatus++; | 501 buildCounterStatus++; |
| 502 if (buildCounterStatus < 3) { | 502 if (buildCounterStatus < 3) { |
| 503 o.code = 42; | 503 o.code = 42; |
| 504 o.details = buildUnnamed2968(); | 504 o.details = buildUnnamed3074(); |
| 505 o.message = "foo"; | 505 o.message = "foo"; |
| 506 } | 506 } |
| 507 buildCounterStatus--; | 507 buildCounterStatus--; |
| 508 return o; | 508 return o; |
| 509 } | 509 } |
| 510 | 510 |
| 511 checkStatus(api.Status o) { | 511 checkStatus(api.Status o) { |
| 512 buildCounterStatus++; | 512 buildCounterStatus++; |
| 513 if (buildCounterStatus < 3) { | 513 if (buildCounterStatus < 3) { |
| 514 unittest.expect(o.code, unittest.equals(42)); | 514 unittest.expect(o.code, unittest.equals(42)); |
| 515 checkUnnamed2968(o.details); | 515 checkUnnamed3074(o.details); |
| 516 unittest.expect(o.message, unittest.equals('foo')); | 516 unittest.expect(o.message, unittest.equals('foo')); |
| 517 } | 517 } |
| 518 buildCounterStatus--; | 518 buildCounterStatus--; |
| 519 } | 519 } |
| 520 | 520 |
| 521 core.int buildCounterTimeEvent = 0; | 521 core.int buildCounterTimeEvent = 0; |
| 522 buildTimeEvent() { | 522 buildTimeEvent() { |
| 523 var o = new api.TimeEvent(); | 523 var o = new api.TimeEvent(); |
| 524 buildCounterTimeEvent++; | 524 buildCounterTimeEvent++; |
| 525 if (buildCounterTimeEvent < 3) { | 525 if (buildCounterTimeEvent < 3) { |
| (...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 799 res.get(arg_name).then(unittest.expectAsync(((api.Trace response) { | 799 res.get(arg_name).then(unittest.expectAsync(((api.Trace response) { |
| 800 checkTrace(response); | 800 checkTrace(response); |
| 801 }))); | 801 }))); |
| 802 }); | 802 }); |
| 803 | 803 |
| 804 unittest.test("method--list", () { | 804 unittest.test("method--list", () { |
| 805 | 805 |
| 806 var mock = new HttpServerMock(); | 806 var mock = new HttpServerMock(); |
| 807 api.ProjectsTracesResourceApi res = new api.TracingApi(mock).projects.trac
es; | 807 api.ProjectsTracesResourceApi res = new api.TracingApi(mock).projects.trac
es; |
| 808 var arg_parent = "foo"; | 808 var arg_parent = "foo"; |
| 809 var arg_filter = "foo"; |
| 810 var arg_endTime = "foo"; |
| 811 var arg_startTime = "foo"; |
| 812 var arg_pageToken = "foo"; |
| 809 var arg_pageSize = 42; | 813 var arg_pageSize = 42; |
| 810 var arg_orderBy = "foo"; | 814 var arg_orderBy = "foo"; |
| 811 var arg_filter = "foo"; | |
| 812 var arg_endTime = "foo"; | |
| 813 var arg_pageToken = "foo"; | |
| 814 var arg_startTime = "foo"; | |
| 815 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 815 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 816 var path = (req.url).path; | 816 var path = (req.url).path; |
| 817 var pathOffset = 0; | 817 var pathOffset = 0; |
| 818 var index; | 818 var index; |
| 819 var subPart; | 819 var subPart; |
| 820 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 820 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 821 pathOffset += 1; | 821 pathOffset += 1; |
| 822 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); | 822 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); |
| 823 pathOffset += 3; | 823 pathOffset += 3; |
| 824 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; | 824 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; |
| 825 | 825 |
| 826 var query = (req.url).query; | 826 var query = (req.url).query; |
| 827 var queryOffset = 0; | 827 var queryOffset = 0; |
| 828 var queryMap = {}; | 828 var queryMap = {}; |
| 829 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 829 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 830 parseBool(n) { | 830 parseBool(n) { |
| 831 if (n == "true") return true; | 831 if (n == "true") return true; |
| 832 if (n == "false") return false; | 832 if (n == "false") return false; |
| 833 if (n == null) return null; | 833 if (n == null) return null; |
| 834 throw new core.ArgumentError("Invalid boolean: $n"); | 834 throw new core.ArgumentError("Invalid boolean: $n"); |
| 835 } | 835 } |
| 836 if (query.length > 0) { | 836 if (query.length > 0) { |
| 837 for (var part in query.split("&")) { | 837 for (var part in query.split("&")) { |
| 838 var keyvalue = part.split("="); | 838 var keyvalue = part.split("="); |
| 839 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 839 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 840 } | 840 } |
| 841 } | 841 } |
| 842 unittest.expect(queryMap["filter"].first, unittest.equals(arg_filter)); |
| 843 unittest.expect(queryMap["endTime"].first, unittest.equals(arg_endTime))
; |
| 844 unittest.expect(queryMap["startTime"].first, unittest.equals(arg_startTi
me)); |
| 845 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); |
| 842 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ
als(arg_pageSize)); | 846 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ
als(arg_pageSize)); |
| 843 unittest.expect(queryMap["orderBy"].first, unittest.equals(arg_orderBy))
; | 847 unittest.expect(queryMap["orderBy"].first, unittest.equals(arg_orderBy))
; |
| 844 unittest.expect(queryMap["filter"].first, unittest.equals(arg_filter)); | |
| 845 unittest.expect(queryMap["endTime"].first, unittest.equals(arg_endTime))
; | |
| 846 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | |
| 847 unittest.expect(queryMap["startTime"].first, unittest.equals(arg_startTi
me)); | |
| 848 | 848 |
| 849 | 849 |
| 850 var h = { | 850 var h = { |
| 851 "content-type" : "application/json; charset=utf-8", | 851 "content-type" : "application/json; charset=utf-8", |
| 852 }; | 852 }; |
| 853 var resp = convert.JSON.encode(buildListTracesResponse()); | 853 var resp = convert.JSON.encode(buildListTracesResponse()); |
| 854 return new async.Future.value(stringResponse(200, h, resp)); | 854 return new async.Future.value(stringResponse(200, h, resp)); |
| 855 }), true); | 855 }), true); |
| 856 res.list(arg_parent, pageSize: arg_pageSize, orderBy: arg_orderBy, filter:
arg_filter, endTime: arg_endTime, pageToken: arg_pageToken, startTime: arg_star
tTime).then(unittest.expectAsync(((api.ListTracesResponse response) { | 856 res.list(arg_parent, filter: arg_filter, endTime: arg_endTime, startTime:
arg_startTime, pageToken: arg_pageToken, pageSize: arg_pageSize, orderBy: arg_or
derBy).then(unittest.expectAsync(((api.ListTracesResponse response) { |
| 857 checkListTracesResponse(response); | 857 checkListTracesResponse(response); |
| 858 }))); | 858 }))); |
| 859 }); | 859 }); |
| 860 | 860 |
| 861 unittest.test("method--listSpans", () { | 861 unittest.test("method--listSpans", () { |
| 862 | 862 |
| 863 var mock = new HttpServerMock(); | 863 var mock = new HttpServerMock(); |
| 864 api.ProjectsTracesResourceApi res = new api.TracingApi(mock).projects.trac
es; | 864 api.ProjectsTracesResourceApi res = new api.TracingApi(mock).projects.trac
es; |
| 865 var arg_name = "foo"; | 865 var arg_name = "foo"; |
| 866 var arg_pageToken = "foo"; | 866 var arg_pageToken = "foo"; |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 903 res.listSpans(arg_name, pageToken: arg_pageToken).then(unittest.expectAsyn
c(((api.ListSpansResponse response) { | 903 res.listSpans(arg_name, pageToken: arg_pageToken).then(unittest.expectAsyn
c(((api.ListSpansResponse response) { |
| 904 checkListSpansResponse(response); | 904 checkListSpansResponse(response); |
| 905 }))); | 905 }))); |
| 906 }); | 906 }); |
| 907 | 907 |
| 908 }); | 908 }); |
| 909 | 909 |
| 910 | 910 |
| 911 } | 911 } |
| 912 | 912 |
| OLD | NEW |