| OLD | NEW |
| 1 library googleapis.cloudtrace.v1.test; | 1 library googleapis.cloudtrace.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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 61 return o; | 61 return o; |
| 62 } | 62 } |
| 63 | 63 |
| 64 checkEmpty(api.Empty o) { | 64 checkEmpty(api.Empty o) { |
| 65 buildCounterEmpty++; | 65 buildCounterEmpty++; |
| 66 if (buildCounterEmpty < 3) { | 66 if (buildCounterEmpty < 3) { |
| 67 } | 67 } |
| 68 buildCounterEmpty--; | 68 buildCounterEmpty--; |
| 69 } | 69 } |
| 70 | 70 |
| 71 buildUnnamed129() { | 71 buildUnnamed132() { |
| 72 var o = new core.List<api.Trace>(); | 72 var o = new core.List<api.Trace>(); |
| 73 o.add(buildTrace()); | 73 o.add(buildTrace()); |
| 74 o.add(buildTrace()); | 74 o.add(buildTrace()); |
| 75 return o; | 75 return o; |
| 76 } | 76 } |
| 77 | 77 |
| 78 checkUnnamed129(core.List<api.Trace> o) { | 78 checkUnnamed132(core.List<api.Trace> o) { |
| 79 unittest.expect(o, unittest.hasLength(2)); | 79 unittest.expect(o, unittest.hasLength(2)); |
| 80 checkTrace(o[0]); | 80 checkTrace(o[0]); |
| 81 checkTrace(o[1]); | 81 checkTrace(o[1]); |
| 82 } | 82 } |
| 83 | 83 |
| 84 core.int buildCounterListTracesResponse = 0; | 84 core.int buildCounterListTracesResponse = 0; |
| 85 buildListTracesResponse() { | 85 buildListTracesResponse() { |
| 86 var o = new api.ListTracesResponse(); | 86 var o = new api.ListTracesResponse(); |
| 87 buildCounterListTracesResponse++; | 87 buildCounterListTracesResponse++; |
| 88 if (buildCounterListTracesResponse < 3) { | 88 if (buildCounterListTracesResponse < 3) { |
| 89 o.nextPageToken = "foo"; | 89 o.nextPageToken = "foo"; |
| 90 o.traces = buildUnnamed129(); | 90 o.traces = buildUnnamed132(); |
| 91 } | 91 } |
| 92 buildCounterListTracesResponse--; | 92 buildCounterListTracesResponse--; |
| 93 return o; | 93 return o; |
| 94 } | 94 } |
| 95 | 95 |
| 96 checkListTracesResponse(api.ListTracesResponse o) { | 96 checkListTracesResponse(api.ListTracesResponse o) { |
| 97 buildCounterListTracesResponse++; | 97 buildCounterListTracesResponse++; |
| 98 if (buildCounterListTracesResponse < 3) { | 98 if (buildCounterListTracesResponse < 3) { |
| 99 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 99 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
| 100 checkUnnamed129(o.traces); | 100 checkUnnamed132(o.traces); |
| 101 } | 101 } |
| 102 buildCounterListTracesResponse--; | 102 buildCounterListTracesResponse--; |
| 103 } | 103 } |
| 104 | 104 |
| 105 buildUnnamed130() { | 105 buildUnnamed133() { |
| 106 var o = new core.List<api.TraceSpan>(); | 106 var o = new core.List<api.TraceSpan>(); |
| 107 o.add(buildTraceSpan()); | 107 o.add(buildTraceSpan()); |
| 108 o.add(buildTraceSpan()); | 108 o.add(buildTraceSpan()); |
| 109 return o; | 109 return o; |
| 110 } | 110 } |
| 111 | 111 |
| 112 checkUnnamed130(core.List<api.TraceSpan> o) { | 112 checkUnnamed133(core.List<api.TraceSpan> o) { |
| 113 unittest.expect(o, unittest.hasLength(2)); | 113 unittest.expect(o, unittest.hasLength(2)); |
| 114 checkTraceSpan(o[0]); | 114 checkTraceSpan(o[0]); |
| 115 checkTraceSpan(o[1]); | 115 checkTraceSpan(o[1]); |
| 116 } | 116 } |
| 117 | 117 |
| 118 core.int buildCounterTrace = 0; | 118 core.int buildCounterTrace = 0; |
| 119 buildTrace() { | 119 buildTrace() { |
| 120 var o = new api.Trace(); | 120 var o = new api.Trace(); |
| 121 buildCounterTrace++; | 121 buildCounterTrace++; |
| 122 if (buildCounterTrace < 3) { | 122 if (buildCounterTrace < 3) { |
| 123 o.projectId = "foo"; | 123 o.projectId = "foo"; |
| 124 o.spans = buildUnnamed130(); | 124 o.spans = buildUnnamed133(); |
| 125 o.traceId = "foo"; | 125 o.traceId = "foo"; |
| 126 } | 126 } |
| 127 buildCounterTrace--; | 127 buildCounterTrace--; |
| 128 return o; | 128 return o; |
| 129 } | 129 } |
| 130 | 130 |
| 131 checkTrace(api.Trace o) { | 131 checkTrace(api.Trace o) { |
| 132 buildCounterTrace++; | 132 buildCounterTrace++; |
| 133 if (buildCounterTrace < 3) { | 133 if (buildCounterTrace < 3) { |
| 134 unittest.expect(o.projectId, unittest.equals('foo')); | 134 unittest.expect(o.projectId, unittest.equals('foo')); |
| 135 checkUnnamed130(o.spans); | 135 checkUnnamed133(o.spans); |
| 136 unittest.expect(o.traceId, unittest.equals('foo')); | 136 unittest.expect(o.traceId, unittest.equals('foo')); |
| 137 } | 137 } |
| 138 buildCounterTrace--; | 138 buildCounterTrace--; |
| 139 } | 139 } |
| 140 | 140 |
| 141 buildUnnamed131() { | 141 buildUnnamed134() { |
| 142 var o = new core.Map<core.String, core.String>(); | 142 var o = new core.Map<core.String, core.String>(); |
| 143 o["x"] = "foo"; | 143 o["x"] = "foo"; |
| 144 o["y"] = "foo"; | 144 o["y"] = "foo"; |
| 145 return o; | 145 return o; |
| 146 } | 146 } |
| 147 | 147 |
| 148 checkUnnamed131(core.Map<core.String, core.String> o) { | 148 checkUnnamed134(core.Map<core.String, core.String> o) { |
| 149 unittest.expect(o, unittest.hasLength(2)); | 149 unittest.expect(o, unittest.hasLength(2)); |
| 150 unittest.expect(o["x"], unittest.equals('foo')); | 150 unittest.expect(o["x"], unittest.equals('foo')); |
| 151 unittest.expect(o["y"], unittest.equals('foo')); | 151 unittest.expect(o["y"], unittest.equals('foo')); |
| 152 } | 152 } |
| 153 | 153 |
| 154 core.int buildCounterTraceSpan = 0; | 154 core.int buildCounterTraceSpan = 0; |
| 155 buildTraceSpan() { | 155 buildTraceSpan() { |
| 156 var o = new api.TraceSpan(); | 156 var o = new api.TraceSpan(); |
| 157 buildCounterTraceSpan++; | 157 buildCounterTraceSpan++; |
| 158 if (buildCounterTraceSpan < 3) { | 158 if (buildCounterTraceSpan < 3) { |
| 159 o.endTime = "foo"; | 159 o.endTime = "foo"; |
| 160 o.kind = "foo"; | 160 o.kind = "foo"; |
| 161 o.labels = buildUnnamed131(); | 161 o.labels = buildUnnamed134(); |
| 162 o.name = "foo"; | 162 o.name = "foo"; |
| 163 o.parentSpanId = "foo"; | 163 o.parentSpanId = "foo"; |
| 164 o.spanId = "foo"; | 164 o.spanId = "foo"; |
| 165 o.startTime = "foo"; | 165 o.startTime = "foo"; |
| 166 } | 166 } |
| 167 buildCounterTraceSpan--; | 167 buildCounterTraceSpan--; |
| 168 return o; | 168 return o; |
| 169 } | 169 } |
| 170 | 170 |
| 171 checkTraceSpan(api.TraceSpan o) { | 171 checkTraceSpan(api.TraceSpan o) { |
| 172 buildCounterTraceSpan++; | 172 buildCounterTraceSpan++; |
| 173 if (buildCounterTraceSpan < 3) { | 173 if (buildCounterTraceSpan < 3) { |
| 174 unittest.expect(o.endTime, unittest.equals('foo')); | 174 unittest.expect(o.endTime, unittest.equals('foo')); |
| 175 unittest.expect(o.kind, unittest.equals('foo')); | 175 unittest.expect(o.kind, unittest.equals('foo')); |
| 176 checkUnnamed131(o.labels); | 176 checkUnnamed134(o.labels); |
| 177 unittest.expect(o.name, unittest.equals('foo')); | 177 unittest.expect(o.name, unittest.equals('foo')); |
| 178 unittest.expect(o.parentSpanId, unittest.equals('foo')); | 178 unittest.expect(o.parentSpanId, unittest.equals('foo')); |
| 179 unittest.expect(o.spanId, unittest.equals('foo')); | 179 unittest.expect(o.spanId, unittest.equals('foo')); |
| 180 unittest.expect(o.startTime, unittest.equals('foo')); | 180 unittest.expect(o.startTime, unittest.equals('foo')); |
| 181 } | 181 } |
| 182 buildCounterTraceSpan--; | 182 buildCounterTraceSpan--; |
| 183 } | 183 } |
| 184 | 184 |
| 185 buildUnnamed132() { | 185 buildUnnamed135() { |
| 186 var o = new core.List<api.Trace>(); | 186 var o = new core.List<api.Trace>(); |
| 187 o.add(buildTrace()); | 187 o.add(buildTrace()); |
| 188 o.add(buildTrace()); | 188 o.add(buildTrace()); |
| 189 return o; | 189 return o; |
| 190 } | 190 } |
| 191 | 191 |
| 192 checkUnnamed132(core.List<api.Trace> o) { | 192 checkUnnamed135(core.List<api.Trace> o) { |
| 193 unittest.expect(o, unittest.hasLength(2)); | 193 unittest.expect(o, unittest.hasLength(2)); |
| 194 checkTrace(o[0]); | 194 checkTrace(o[0]); |
| 195 checkTrace(o[1]); | 195 checkTrace(o[1]); |
| 196 } | 196 } |
| 197 | 197 |
| 198 core.int buildCounterTraces = 0; | 198 core.int buildCounterTraces = 0; |
| 199 buildTraces() { | 199 buildTraces() { |
| 200 var o = new api.Traces(); | 200 var o = new api.Traces(); |
| 201 buildCounterTraces++; | 201 buildCounterTraces++; |
| 202 if (buildCounterTraces < 3) { | 202 if (buildCounterTraces < 3) { |
| 203 o.traces = buildUnnamed132(); | 203 o.traces = buildUnnamed135(); |
| 204 } | 204 } |
| 205 buildCounterTraces--; | 205 buildCounterTraces--; |
| 206 return o; | 206 return o; |
| 207 } | 207 } |
| 208 | 208 |
| 209 checkTraces(api.Traces o) { | 209 checkTraces(api.Traces o) { |
| 210 buildCounterTraces++; | 210 buildCounterTraces++; |
| 211 if (buildCounterTraces < 3) { | 211 if (buildCounterTraces < 3) { |
| 212 checkUnnamed132(o.traces); | 212 checkUnnamed135(o.traces); |
| 213 } | 213 } |
| 214 buildCounterTraces--; | 214 buildCounterTraces--; |
| 215 } | 215 } |
| 216 | 216 |
| 217 | 217 |
| 218 main() { | 218 main() { |
| 219 unittest.group("obj-schema-Empty", () { | 219 unittest.group("obj-schema-Empty", () { |
| 220 unittest.test("to-json--from-json", () { | 220 unittest.test("to-json--from-json", () { |
| 221 var o = buildEmpty(); | 221 var o = buildEmpty(); |
| 222 var od = new api.Empty.fromJson(o.toJson()); | 222 var od = new api.Empty.fromJson(o.toJson()); |
| (...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 439 res.list(arg_projectId, view: arg_view, pageSize: arg_pageSize, pageToken:
arg_pageToken, startTime: arg_startTime, endTime: arg_endTime, filter: arg_filt
er, orderBy: arg_orderBy).then(unittest.expectAsync(((api.ListTracesResponse res
ponse) { | 439 res.list(arg_projectId, view: arg_view, pageSize: arg_pageSize, pageToken:
arg_pageToken, startTime: arg_startTime, endTime: arg_endTime, filter: arg_filt
er, orderBy: arg_orderBy).then(unittest.expectAsync(((api.ListTracesResponse res
ponse) { |
| 440 checkListTracesResponse(response); | 440 checkListTracesResponse(response); |
| 441 }))); | 441 }))); |
| 442 }); | 442 }); |
| 443 | 443 |
| 444 }); | 444 }); |
| 445 | 445 |
| 446 | 446 |
| 447 } | 447 } |
| 448 | 448 |
| OLD | NEW |