OLD | NEW |
1 library googleapis_beta.clouderrorreporting.v1beta1.test; | 1 library googleapis_beta.clouderrorreporting.v1beta1.test; |
2 | 2 |
3 import "dart:core" as core; | 3 import "dart:core" as core; |
4 import "dart:collection" as collection; | 4 import "dart:collection" as collection; |
5 import "dart:async" as async; | 5 import "dart:async" as async; |
6 import "dart:convert" as convert; | 6 import "dart:convert" as convert; |
7 | 7 |
8 import 'package:http/http.dart' as http; | 8 import 'package:http/http.dart' as http; |
9 import 'package:http/testing.dart' as http_testing; | 9 import 'package:http/testing.dart' as http_testing; |
10 import 'package:unittest/unittest.dart' as unittest; | 10 import 'package:unittest/unittest.dart' as unittest; |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
109 buildCounterErrorEvent++; | 109 buildCounterErrorEvent++; |
110 if (buildCounterErrorEvent < 3) { | 110 if (buildCounterErrorEvent < 3) { |
111 checkErrorContext(o.context); | 111 checkErrorContext(o.context); |
112 unittest.expect(o.eventTime, unittest.equals('foo')); | 112 unittest.expect(o.eventTime, unittest.equals('foo')); |
113 unittest.expect(o.message, unittest.equals('foo')); | 113 unittest.expect(o.message, unittest.equals('foo')); |
114 checkServiceContext(o.serviceContext); | 114 checkServiceContext(o.serviceContext); |
115 } | 115 } |
116 buildCounterErrorEvent--; | 116 buildCounterErrorEvent--; |
117 } | 117 } |
118 | 118 |
119 buildUnnamed3019() { | 119 buildUnnamed3242() { |
120 var o = new core.List<api.TrackingIssue>(); | 120 var o = new core.List<api.TrackingIssue>(); |
121 o.add(buildTrackingIssue()); | 121 o.add(buildTrackingIssue()); |
122 o.add(buildTrackingIssue()); | 122 o.add(buildTrackingIssue()); |
123 return o; | 123 return o; |
124 } | 124 } |
125 | 125 |
126 checkUnnamed3019(core.List<api.TrackingIssue> o) { | 126 checkUnnamed3242(core.List<api.TrackingIssue> o) { |
127 unittest.expect(o, unittest.hasLength(2)); | 127 unittest.expect(o, unittest.hasLength(2)); |
128 checkTrackingIssue(o[0]); | 128 checkTrackingIssue(o[0]); |
129 checkTrackingIssue(o[1]); | 129 checkTrackingIssue(o[1]); |
130 } | 130 } |
131 | 131 |
132 core.int buildCounterErrorGroup = 0; | 132 core.int buildCounterErrorGroup = 0; |
133 buildErrorGroup() { | 133 buildErrorGroup() { |
134 var o = new api.ErrorGroup(); | 134 var o = new api.ErrorGroup(); |
135 buildCounterErrorGroup++; | 135 buildCounterErrorGroup++; |
136 if (buildCounterErrorGroup < 3) { | 136 if (buildCounterErrorGroup < 3) { |
137 o.groupId = "foo"; | 137 o.groupId = "foo"; |
138 o.name = "foo"; | 138 o.name = "foo"; |
139 o.trackingIssues = buildUnnamed3019(); | 139 o.trackingIssues = buildUnnamed3242(); |
140 } | 140 } |
141 buildCounterErrorGroup--; | 141 buildCounterErrorGroup--; |
142 return o; | 142 return o; |
143 } | 143 } |
144 | 144 |
145 checkErrorGroup(api.ErrorGroup o) { | 145 checkErrorGroup(api.ErrorGroup o) { |
146 buildCounterErrorGroup++; | 146 buildCounterErrorGroup++; |
147 if (buildCounterErrorGroup < 3) { | 147 if (buildCounterErrorGroup < 3) { |
148 unittest.expect(o.groupId, unittest.equals('foo')); | 148 unittest.expect(o.groupId, unittest.equals('foo')); |
149 unittest.expect(o.name, unittest.equals('foo')); | 149 unittest.expect(o.name, unittest.equals('foo')); |
150 checkUnnamed3019(o.trackingIssues); | 150 checkUnnamed3242(o.trackingIssues); |
151 } | 151 } |
152 buildCounterErrorGroup--; | 152 buildCounterErrorGroup--; |
153 } | 153 } |
154 | 154 |
155 buildUnnamed3020() { | 155 buildUnnamed3243() { |
156 var o = new core.List<api.ServiceContext>(); | 156 var o = new core.List<api.ServiceContext>(); |
157 o.add(buildServiceContext()); | 157 o.add(buildServiceContext()); |
158 o.add(buildServiceContext()); | 158 o.add(buildServiceContext()); |
159 return o; | 159 return o; |
160 } | 160 } |
161 | 161 |
162 checkUnnamed3020(core.List<api.ServiceContext> o) { | 162 checkUnnamed3243(core.List<api.ServiceContext> o) { |
163 unittest.expect(o, unittest.hasLength(2)); | 163 unittest.expect(o, unittest.hasLength(2)); |
164 checkServiceContext(o[0]); | 164 checkServiceContext(o[0]); |
165 checkServiceContext(o[1]); | 165 checkServiceContext(o[1]); |
166 } | 166 } |
167 | 167 |
168 buildUnnamed3021() { | 168 buildUnnamed3244() { |
169 var o = new core.List<api.TimedCount>(); | 169 var o = new core.List<api.TimedCount>(); |
170 o.add(buildTimedCount()); | 170 o.add(buildTimedCount()); |
171 o.add(buildTimedCount()); | 171 o.add(buildTimedCount()); |
172 return o; | 172 return o; |
173 } | 173 } |
174 | 174 |
175 checkUnnamed3021(core.List<api.TimedCount> o) { | 175 checkUnnamed3244(core.List<api.TimedCount> o) { |
176 unittest.expect(o, unittest.hasLength(2)); | 176 unittest.expect(o, unittest.hasLength(2)); |
177 checkTimedCount(o[0]); | 177 checkTimedCount(o[0]); |
178 checkTimedCount(o[1]); | 178 checkTimedCount(o[1]); |
179 } | 179 } |
180 | 180 |
181 core.int buildCounterErrorGroupStats = 0; | 181 core.int buildCounterErrorGroupStats = 0; |
182 buildErrorGroupStats() { | 182 buildErrorGroupStats() { |
183 var o = new api.ErrorGroupStats(); | 183 var o = new api.ErrorGroupStats(); |
184 buildCounterErrorGroupStats++; | 184 buildCounterErrorGroupStats++; |
185 if (buildCounterErrorGroupStats < 3) { | 185 if (buildCounterErrorGroupStats < 3) { |
186 o.affectedServices = buildUnnamed3020(); | 186 o.affectedServices = buildUnnamed3243(); |
187 o.affectedUsersCount = "foo"; | 187 o.affectedUsersCount = "foo"; |
188 o.count = "foo"; | 188 o.count = "foo"; |
189 o.firstSeenTime = "foo"; | 189 o.firstSeenTime = "foo"; |
190 o.group = buildErrorGroup(); | 190 o.group = buildErrorGroup(); |
191 o.lastSeenTime = "foo"; | 191 o.lastSeenTime = "foo"; |
192 o.numAffectedServices = 42; | 192 o.numAffectedServices = 42; |
193 o.representative = buildErrorEvent(); | 193 o.representative = buildErrorEvent(); |
194 o.timedCounts = buildUnnamed3021(); | 194 o.timedCounts = buildUnnamed3244(); |
195 } | 195 } |
196 buildCounterErrorGroupStats--; | 196 buildCounterErrorGroupStats--; |
197 return o; | 197 return o; |
198 } | 198 } |
199 | 199 |
200 checkErrorGroupStats(api.ErrorGroupStats o) { | 200 checkErrorGroupStats(api.ErrorGroupStats o) { |
201 buildCounterErrorGroupStats++; | 201 buildCounterErrorGroupStats++; |
202 if (buildCounterErrorGroupStats < 3) { | 202 if (buildCounterErrorGroupStats < 3) { |
203 checkUnnamed3020(o.affectedServices); | 203 checkUnnamed3243(o.affectedServices); |
204 unittest.expect(o.affectedUsersCount, unittest.equals('foo')); | 204 unittest.expect(o.affectedUsersCount, unittest.equals('foo')); |
205 unittest.expect(o.count, unittest.equals('foo')); | 205 unittest.expect(o.count, unittest.equals('foo')); |
206 unittest.expect(o.firstSeenTime, unittest.equals('foo')); | 206 unittest.expect(o.firstSeenTime, unittest.equals('foo')); |
207 checkErrorGroup(o.group); | 207 checkErrorGroup(o.group); |
208 unittest.expect(o.lastSeenTime, unittest.equals('foo')); | 208 unittest.expect(o.lastSeenTime, unittest.equals('foo')); |
209 unittest.expect(o.numAffectedServices, unittest.equals(42)); | 209 unittest.expect(o.numAffectedServices, unittest.equals(42)); |
210 checkErrorEvent(o.representative); | 210 checkErrorEvent(o.representative); |
211 checkUnnamed3021(o.timedCounts); | 211 checkUnnamed3244(o.timedCounts); |
212 } | 212 } |
213 buildCounterErrorGroupStats--; | 213 buildCounterErrorGroupStats--; |
214 } | 214 } |
215 | 215 |
216 core.int buildCounterHttpRequestContext = 0; | 216 core.int buildCounterHttpRequestContext = 0; |
217 buildHttpRequestContext() { | 217 buildHttpRequestContext() { |
218 var o = new api.HttpRequestContext(); | 218 var o = new api.HttpRequestContext(); |
219 buildCounterHttpRequestContext++; | 219 buildCounterHttpRequestContext++; |
220 if (buildCounterHttpRequestContext < 3) { | 220 if (buildCounterHttpRequestContext < 3) { |
221 o.method = "foo"; | 221 o.method = "foo"; |
(...skipping 13 matching lines...) Expand all Loading... |
235 unittest.expect(o.method, unittest.equals('foo')); | 235 unittest.expect(o.method, unittest.equals('foo')); |
236 unittest.expect(o.referrer, unittest.equals('foo')); | 236 unittest.expect(o.referrer, unittest.equals('foo')); |
237 unittest.expect(o.remoteIp, unittest.equals('foo')); | 237 unittest.expect(o.remoteIp, unittest.equals('foo')); |
238 unittest.expect(o.responseStatusCode, unittest.equals(42)); | 238 unittest.expect(o.responseStatusCode, unittest.equals(42)); |
239 unittest.expect(o.url, unittest.equals('foo')); | 239 unittest.expect(o.url, unittest.equals('foo')); |
240 unittest.expect(o.userAgent, unittest.equals('foo')); | 240 unittest.expect(o.userAgent, unittest.equals('foo')); |
241 } | 241 } |
242 buildCounterHttpRequestContext--; | 242 buildCounterHttpRequestContext--; |
243 } | 243 } |
244 | 244 |
245 buildUnnamed3022() { | 245 buildUnnamed3245() { |
246 var o = new core.List<api.ErrorEvent>(); | 246 var o = new core.List<api.ErrorEvent>(); |
247 o.add(buildErrorEvent()); | 247 o.add(buildErrorEvent()); |
248 o.add(buildErrorEvent()); | 248 o.add(buildErrorEvent()); |
249 return o; | 249 return o; |
250 } | 250 } |
251 | 251 |
252 checkUnnamed3022(core.List<api.ErrorEvent> o) { | 252 checkUnnamed3245(core.List<api.ErrorEvent> o) { |
253 unittest.expect(o, unittest.hasLength(2)); | 253 unittest.expect(o, unittest.hasLength(2)); |
254 checkErrorEvent(o[0]); | 254 checkErrorEvent(o[0]); |
255 checkErrorEvent(o[1]); | 255 checkErrorEvent(o[1]); |
256 } | 256 } |
257 | 257 |
258 core.int buildCounterListEventsResponse = 0; | 258 core.int buildCounterListEventsResponse = 0; |
259 buildListEventsResponse() { | 259 buildListEventsResponse() { |
260 var o = new api.ListEventsResponse(); | 260 var o = new api.ListEventsResponse(); |
261 buildCounterListEventsResponse++; | 261 buildCounterListEventsResponse++; |
262 if (buildCounterListEventsResponse < 3) { | 262 if (buildCounterListEventsResponse < 3) { |
263 o.errorEvents = buildUnnamed3022(); | 263 o.errorEvents = buildUnnamed3245(); |
264 o.nextPageToken = "foo"; | 264 o.nextPageToken = "foo"; |
265 } | 265 } |
266 buildCounterListEventsResponse--; | 266 buildCounterListEventsResponse--; |
267 return o; | 267 return o; |
268 } | 268 } |
269 | 269 |
270 checkListEventsResponse(api.ListEventsResponse o) { | 270 checkListEventsResponse(api.ListEventsResponse o) { |
271 buildCounterListEventsResponse++; | 271 buildCounterListEventsResponse++; |
272 if (buildCounterListEventsResponse < 3) { | 272 if (buildCounterListEventsResponse < 3) { |
273 checkUnnamed3022(o.errorEvents); | 273 checkUnnamed3245(o.errorEvents); |
274 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 274 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
275 } | 275 } |
276 buildCounterListEventsResponse--; | 276 buildCounterListEventsResponse--; |
277 } | 277 } |
278 | 278 |
279 buildUnnamed3023() { | 279 buildUnnamed3246() { |
280 var o = new core.List<api.ErrorGroupStats>(); | 280 var o = new core.List<api.ErrorGroupStats>(); |
281 o.add(buildErrorGroupStats()); | 281 o.add(buildErrorGroupStats()); |
282 o.add(buildErrorGroupStats()); | 282 o.add(buildErrorGroupStats()); |
283 return o; | 283 return o; |
284 } | 284 } |
285 | 285 |
286 checkUnnamed3023(core.List<api.ErrorGroupStats> o) { | 286 checkUnnamed3246(core.List<api.ErrorGroupStats> o) { |
287 unittest.expect(o, unittest.hasLength(2)); | 287 unittest.expect(o, unittest.hasLength(2)); |
288 checkErrorGroupStats(o[0]); | 288 checkErrorGroupStats(o[0]); |
289 checkErrorGroupStats(o[1]); | 289 checkErrorGroupStats(o[1]); |
290 } | 290 } |
291 | 291 |
292 core.int buildCounterListGroupStatsResponse = 0; | 292 core.int buildCounterListGroupStatsResponse = 0; |
293 buildListGroupStatsResponse() { | 293 buildListGroupStatsResponse() { |
294 var o = new api.ListGroupStatsResponse(); | 294 var o = new api.ListGroupStatsResponse(); |
295 buildCounterListGroupStatsResponse++; | 295 buildCounterListGroupStatsResponse++; |
296 if (buildCounterListGroupStatsResponse < 3) { | 296 if (buildCounterListGroupStatsResponse < 3) { |
297 o.errorGroupStats = buildUnnamed3023(); | 297 o.errorGroupStats = buildUnnamed3246(); |
298 o.nextPageToken = "foo"; | 298 o.nextPageToken = "foo"; |
299 } | 299 } |
300 buildCounterListGroupStatsResponse--; | 300 buildCounterListGroupStatsResponse--; |
301 return o; | 301 return o; |
302 } | 302 } |
303 | 303 |
304 checkListGroupStatsResponse(api.ListGroupStatsResponse o) { | 304 checkListGroupStatsResponse(api.ListGroupStatsResponse o) { |
305 buildCounterListGroupStatsResponse++; | 305 buildCounterListGroupStatsResponse++; |
306 if (buildCounterListGroupStatsResponse < 3) { | 306 if (buildCounterListGroupStatsResponse < 3) { |
307 checkUnnamed3023(o.errorGroupStats); | 307 checkUnnamed3246(o.errorGroupStats); |
308 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 308 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
309 } | 309 } |
310 buildCounterListGroupStatsResponse--; | 310 buildCounterListGroupStatsResponse--; |
311 } | 311 } |
312 | 312 |
313 core.int buildCounterServiceContext = 0; | 313 core.int buildCounterServiceContext = 0; |
314 buildServiceContext() { | 314 buildServiceContext() { |
315 var o = new api.ServiceContext(); | 315 var o = new api.ServiceContext(); |
316 buildCounterServiceContext++; | 316 buildCounterServiceContext++; |
317 if (buildCounterServiceContext < 3) { | 317 if (buildCounterServiceContext < 3) { |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
389 } | 389 } |
390 | 390 |
391 checkTrackingIssue(api.TrackingIssue o) { | 391 checkTrackingIssue(api.TrackingIssue o) { |
392 buildCounterTrackingIssue++; | 392 buildCounterTrackingIssue++; |
393 if (buildCounterTrackingIssue < 3) { | 393 if (buildCounterTrackingIssue < 3) { |
394 unittest.expect(o.url, unittest.equals('foo')); | 394 unittest.expect(o.url, unittest.equals('foo')); |
395 } | 395 } |
396 buildCounterTrackingIssue--; | 396 buildCounterTrackingIssue--; |
397 } | 397 } |
398 | 398 |
399 buildUnnamed3024() { | 399 buildUnnamed3247() { |
400 var o = new core.List<core.String>(); | 400 var o = new core.List<core.String>(); |
401 o.add("foo"); | 401 o.add("foo"); |
402 o.add("foo"); | 402 o.add("foo"); |
403 return o; | 403 return o; |
404 } | 404 } |
405 | 405 |
406 checkUnnamed3024(core.List<core.String> o) { | 406 checkUnnamed3247(core.List<core.String> o) { |
407 unittest.expect(o, unittest.hasLength(2)); | 407 unittest.expect(o, unittest.hasLength(2)); |
408 unittest.expect(o[0], unittest.equals('foo')); | 408 unittest.expect(o[0], unittest.equals('foo')); |
409 unittest.expect(o[1], unittest.equals('foo')); | 409 unittest.expect(o[1], unittest.equals('foo')); |
410 } | 410 } |
411 | 411 |
412 | 412 |
413 main() { | 413 main() { |
414 unittest.group("obj-schema-DeleteEventsResponse", () { | 414 unittest.group("obj-schema-DeleteEventsResponse", () { |
415 unittest.test("to-json--from-json", () { | 415 unittest.test("to-json--from-json", () { |
416 var o = buildDeleteEventsResponse(); | 416 var o = buildDeleteEventsResponse(); |
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
631 | 631 |
632 unittest.group("resource-ProjectsGroupStatsResourceApi", () { | 632 unittest.group("resource-ProjectsGroupStatsResourceApi", () { |
633 unittest.test("method--list", () { | 633 unittest.test("method--list", () { |
634 | 634 |
635 var mock = new HttpServerMock(); | 635 var mock = new HttpServerMock(); |
636 api.ProjectsGroupStatsResourceApi res = new api.ClouderrorreportingApi(moc
k).projects.groupStats; | 636 api.ProjectsGroupStatsResourceApi res = new api.ClouderrorreportingApi(moc
k).projects.groupStats; |
637 var arg_projectName = "foo"; | 637 var arg_projectName = "foo"; |
638 var arg_alignment = "foo"; | 638 var arg_alignment = "foo"; |
639 var arg_timeRange_period = "foo"; | 639 var arg_timeRange_period = "foo"; |
640 var arg_order = "foo"; | 640 var arg_order = "foo"; |
641 var arg_groupId = buildUnnamed3024(); | 641 var arg_groupId = buildUnnamed3247(); |
642 var arg_serviceFilter_service = "foo"; | 642 var arg_serviceFilter_service = "foo"; |
643 var arg_alignmentTime = "foo"; | 643 var arg_alignmentTime = "foo"; |
644 var arg_serviceFilter_version = "foo"; | 644 var arg_serviceFilter_version = "foo"; |
645 var arg_pageSize = 42; | 645 var arg_pageSize = 42; |
646 var arg_timedCountDuration = "foo"; | 646 var arg_timedCountDuration = "foo"; |
647 var arg_pageToken = "foo"; | 647 var arg_pageToken = "foo"; |
648 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 648 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
649 var path = (req.url).path; | 649 var path = (req.url).path; |
650 var pathOffset = 0; | 650 var pathOffset = 0; |
651 var index; | 651 var index; |
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
791 res.update(arg_request, arg_name).then(unittest.expectAsync(((api.ErrorGro
up response) { | 791 res.update(arg_request, arg_name).then(unittest.expectAsync(((api.ErrorGro
up response) { |
792 checkErrorGroup(response); | 792 checkErrorGroup(response); |
793 }))); | 793 }))); |
794 }); | 794 }); |
795 | 795 |
796 }); | 796 }); |
797 | 797 |
798 | 798 |
799 } | 799 } |
800 | 800 |
OLD | NEW |