| 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 buildUnnamed3582() { | 119 buildUnnamed3293() { |
| 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 checkUnnamed3582(core.List<api.TrackingIssue> o) { | 126 checkUnnamed3293(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 = buildUnnamed3582(); | 139 o.trackingIssues = buildUnnamed3293(); |
| 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 checkUnnamed3582(o.trackingIssues); | 150 checkUnnamed3293(o.trackingIssues); |
| 151 } | 151 } |
| 152 buildCounterErrorGroup--; | 152 buildCounterErrorGroup--; |
| 153 } | 153 } |
| 154 | 154 |
| 155 buildUnnamed3583() { | 155 buildUnnamed3294() { |
| 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 checkUnnamed3583(core.List<api.ServiceContext> o) { | 162 checkUnnamed3294(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 buildUnnamed3584() { | 168 buildUnnamed3295() { |
| 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 checkUnnamed3584(core.List<api.TimedCount> o) { | 175 checkUnnamed3295(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 = buildUnnamed3583(); | 186 o.affectedServices = buildUnnamed3294(); |
| 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 = buildUnnamed3584(); | 194 o.timedCounts = buildUnnamed3295(); |
| 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 checkUnnamed3583(o.affectedServices); | 203 checkUnnamed3294(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 checkUnnamed3584(o.timedCounts); | 211 checkUnnamed3295(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 buildUnnamed3585() { | 245 buildUnnamed3296() { |
| 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 checkUnnamed3585(core.List<api.ErrorEvent> o) { | 252 checkUnnamed3296(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 = buildUnnamed3585(); | 263 o.errorEvents = buildUnnamed3296(); |
| 264 o.nextPageToken = "foo"; | 264 o.nextPageToken = "foo"; |
| 265 o.timeRangeBegin = "foo"; | 265 o.timeRangeBegin = "foo"; |
| 266 } | 266 } |
| 267 buildCounterListEventsResponse--; | 267 buildCounterListEventsResponse--; |
| 268 return o; | 268 return o; |
| 269 } | 269 } |
| 270 | 270 |
| 271 checkListEventsResponse(api.ListEventsResponse o) { | 271 checkListEventsResponse(api.ListEventsResponse o) { |
| 272 buildCounterListEventsResponse++; | 272 buildCounterListEventsResponse++; |
| 273 if (buildCounterListEventsResponse < 3) { | 273 if (buildCounterListEventsResponse < 3) { |
| 274 checkUnnamed3585(o.errorEvents); | 274 checkUnnamed3296(o.errorEvents); |
| 275 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 275 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
| 276 unittest.expect(o.timeRangeBegin, unittest.equals('foo')); | 276 unittest.expect(o.timeRangeBegin, unittest.equals('foo')); |
| 277 } | 277 } |
| 278 buildCounterListEventsResponse--; | 278 buildCounterListEventsResponse--; |
| 279 } | 279 } |
| 280 | 280 |
| 281 buildUnnamed3586() { | 281 buildUnnamed3297() { |
| 282 var o = new core.List<api.ErrorGroupStats>(); | 282 var o = new core.List<api.ErrorGroupStats>(); |
| 283 o.add(buildErrorGroupStats()); | 283 o.add(buildErrorGroupStats()); |
| 284 o.add(buildErrorGroupStats()); | 284 o.add(buildErrorGroupStats()); |
| 285 return o; | 285 return o; |
| 286 } | 286 } |
| 287 | 287 |
| 288 checkUnnamed3586(core.List<api.ErrorGroupStats> o) { | 288 checkUnnamed3297(core.List<api.ErrorGroupStats> o) { |
| 289 unittest.expect(o, unittest.hasLength(2)); | 289 unittest.expect(o, unittest.hasLength(2)); |
| 290 checkErrorGroupStats(o[0]); | 290 checkErrorGroupStats(o[0]); |
| 291 checkErrorGroupStats(o[1]); | 291 checkErrorGroupStats(o[1]); |
| 292 } | 292 } |
| 293 | 293 |
| 294 core.int buildCounterListGroupStatsResponse = 0; | 294 core.int buildCounterListGroupStatsResponse = 0; |
| 295 buildListGroupStatsResponse() { | 295 buildListGroupStatsResponse() { |
| 296 var o = new api.ListGroupStatsResponse(); | 296 var o = new api.ListGroupStatsResponse(); |
| 297 buildCounterListGroupStatsResponse++; | 297 buildCounterListGroupStatsResponse++; |
| 298 if (buildCounterListGroupStatsResponse < 3) { | 298 if (buildCounterListGroupStatsResponse < 3) { |
| 299 o.errorGroupStats = buildUnnamed3586(); | 299 o.errorGroupStats = buildUnnamed3297(); |
| 300 o.nextPageToken = "foo"; | 300 o.nextPageToken = "foo"; |
| 301 o.timeRangeBegin = "foo"; | 301 o.timeRangeBegin = "foo"; |
| 302 } | 302 } |
| 303 buildCounterListGroupStatsResponse--; | 303 buildCounterListGroupStatsResponse--; |
| 304 return o; | 304 return o; |
| 305 } | 305 } |
| 306 | 306 |
| 307 checkListGroupStatsResponse(api.ListGroupStatsResponse o) { | 307 checkListGroupStatsResponse(api.ListGroupStatsResponse o) { |
| 308 buildCounterListGroupStatsResponse++; | 308 buildCounterListGroupStatsResponse++; |
| 309 if (buildCounterListGroupStatsResponse < 3) { | 309 if (buildCounterListGroupStatsResponse < 3) { |
| 310 checkUnnamed3586(o.errorGroupStats); | 310 checkUnnamed3297(o.errorGroupStats); |
| 311 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 311 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
| 312 unittest.expect(o.timeRangeBegin, unittest.equals('foo')); | 312 unittest.expect(o.timeRangeBegin, unittest.equals('foo')); |
| 313 } | 313 } |
| 314 buildCounterListGroupStatsResponse--; | 314 buildCounterListGroupStatsResponse--; |
| 315 } | 315 } |
| 316 | 316 |
| 317 core.int buildCounterReportErrorEventResponse = 0; | 317 core.int buildCounterReportErrorEventResponse = 0; |
| 318 buildReportErrorEventResponse() { | 318 buildReportErrorEventResponse() { |
| 319 var o = new api.ReportErrorEventResponse(); | 319 var o = new api.ReportErrorEventResponse(); |
| 320 buildCounterReportErrorEventResponse++; | 320 buildCounterReportErrorEventResponse++; |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 354 checkServiceContext(o.serviceContext); | 354 checkServiceContext(o.serviceContext); |
| 355 } | 355 } |
| 356 buildCounterReportedErrorEvent--; | 356 buildCounterReportedErrorEvent--; |
| 357 } | 357 } |
| 358 | 358 |
| 359 core.int buildCounterServiceContext = 0; | 359 core.int buildCounterServiceContext = 0; |
| 360 buildServiceContext() { | 360 buildServiceContext() { |
| 361 var o = new api.ServiceContext(); | 361 var o = new api.ServiceContext(); |
| 362 buildCounterServiceContext++; | 362 buildCounterServiceContext++; |
| 363 if (buildCounterServiceContext < 3) { | 363 if (buildCounterServiceContext < 3) { |
| 364 o.resourceType = "foo"; |
| 364 o.service = "foo"; | 365 o.service = "foo"; |
| 365 o.version = "foo"; | 366 o.version = "foo"; |
| 366 } | 367 } |
| 367 buildCounterServiceContext--; | 368 buildCounterServiceContext--; |
| 368 return o; | 369 return o; |
| 369 } | 370 } |
| 370 | 371 |
| 371 checkServiceContext(api.ServiceContext o) { | 372 checkServiceContext(api.ServiceContext o) { |
| 372 buildCounterServiceContext++; | 373 buildCounterServiceContext++; |
| 373 if (buildCounterServiceContext < 3) { | 374 if (buildCounterServiceContext < 3) { |
| 375 unittest.expect(o.resourceType, unittest.equals('foo')); |
| 374 unittest.expect(o.service, unittest.equals('foo')); | 376 unittest.expect(o.service, unittest.equals('foo')); |
| 375 unittest.expect(o.version, unittest.equals('foo')); | 377 unittest.expect(o.version, unittest.equals('foo')); |
| 376 } | 378 } |
| 377 buildCounterServiceContext--; | 379 buildCounterServiceContext--; |
| 378 } | 380 } |
| 379 | 381 |
| 380 core.int buildCounterSourceLocation = 0; | 382 core.int buildCounterSourceLocation = 0; |
| 381 buildSourceLocation() { | 383 buildSourceLocation() { |
| 382 var o = new api.SourceLocation(); | 384 var o = new api.SourceLocation(); |
| 383 buildCounterSourceLocation++; | 385 buildCounterSourceLocation++; |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 435 } | 437 } |
| 436 | 438 |
| 437 checkTrackingIssue(api.TrackingIssue o) { | 439 checkTrackingIssue(api.TrackingIssue o) { |
| 438 buildCounterTrackingIssue++; | 440 buildCounterTrackingIssue++; |
| 439 if (buildCounterTrackingIssue < 3) { | 441 if (buildCounterTrackingIssue < 3) { |
| 440 unittest.expect(o.url, unittest.equals('foo')); | 442 unittest.expect(o.url, unittest.equals('foo')); |
| 441 } | 443 } |
| 442 buildCounterTrackingIssue--; | 444 buildCounterTrackingIssue--; |
| 443 } | 445 } |
| 444 | 446 |
| 445 buildUnnamed3587() { | 447 buildUnnamed3298() { |
| 446 var o = new core.List<core.String>(); | 448 var o = new core.List<core.String>(); |
| 447 o.add("foo"); | 449 o.add("foo"); |
| 448 o.add("foo"); | 450 o.add("foo"); |
| 449 return o; | 451 return o; |
| 450 } | 452 } |
| 451 | 453 |
| 452 checkUnnamed3587(core.List<core.String> o) { | 454 checkUnnamed3298(core.List<core.String> o) { |
| 453 unittest.expect(o, unittest.hasLength(2)); | 455 unittest.expect(o, unittest.hasLength(2)); |
| 454 unittest.expect(o[0], unittest.equals('foo')); | 456 unittest.expect(o[0], unittest.equals('foo')); |
| 455 unittest.expect(o[1], unittest.equals('foo')); | 457 unittest.expect(o[1], unittest.equals('foo')); |
| 456 } | 458 } |
| 457 | 459 |
| 458 | 460 |
| 459 main() { | 461 main() { |
| 460 unittest.group("obj-schema-DeleteEventsResponse", () { | 462 unittest.group("obj-schema-DeleteEventsResponse", () { |
| 461 unittest.test("to-json--from-json", () { | 463 unittest.test("to-json--from-json", () { |
| 462 var o = buildDeleteEventsResponse(); | 464 var o = buildDeleteEventsResponse(); |
| (...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 632 }); | 634 }); |
| 633 | 635 |
| 634 | 636 |
| 635 unittest.group("resource-ProjectsEventsResourceApi", () { | 637 unittest.group("resource-ProjectsEventsResourceApi", () { |
| 636 unittest.test("method--list", () { | 638 unittest.test("method--list", () { |
| 637 | 639 |
| 638 var mock = new HttpServerMock(); | 640 var mock = new HttpServerMock(); |
| 639 api.ProjectsEventsResourceApi res = new api.ClouderrorreportingApi(mock).p
rojects.events; | 641 api.ProjectsEventsResourceApi res = new api.ClouderrorreportingApi(mock).p
rojects.events; |
| 640 var arg_projectName = "foo"; | 642 var arg_projectName = "foo"; |
| 641 var arg_timeRange_period = "foo"; | 643 var arg_timeRange_period = "foo"; |
| 644 var arg_serviceFilter_resourceType = "foo"; |
| 642 var arg_serviceFilter_service = "foo"; | 645 var arg_serviceFilter_service = "foo"; |
| 643 var arg_groupId = "foo"; | 646 var arg_groupId = "foo"; |
| 644 var arg_serviceFilter_version = "foo"; | 647 var arg_serviceFilter_version = "foo"; |
| 645 var arg_pageSize = 42; | 648 var arg_pageSize = 42; |
| 646 var arg_pageToken = "foo"; | 649 var arg_pageToken = "foo"; |
| 647 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 650 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 648 var path = (req.url).path; | 651 var path = (req.url).path; |
| 649 var pathOffset = 0; | 652 var pathOffset = 0; |
| 650 var index; | 653 var index; |
| 651 var subPart; | 654 var subPart; |
| (...skipping 13 matching lines...) Expand all Loading... |
| 665 if (n == null) return null; | 668 if (n == null) return null; |
| 666 throw new core.ArgumentError("Invalid boolean: $n"); | 669 throw new core.ArgumentError("Invalid boolean: $n"); |
| 667 } | 670 } |
| 668 if (query.length > 0) { | 671 if (query.length > 0) { |
| 669 for (var part in query.split("&")) { | 672 for (var part in query.split("&")) { |
| 670 var keyvalue = part.split("="); | 673 var keyvalue = part.split("="); |
| 671 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 674 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 672 } | 675 } |
| 673 } | 676 } |
| 674 unittest.expect(queryMap["timeRange.period"].first, unittest.equals(arg_
timeRange_period)); | 677 unittest.expect(queryMap["timeRange.period"].first, unittest.equals(arg_
timeRange_period)); |
| 678 unittest.expect(queryMap["serviceFilter.resourceType"].first, unittest.e
quals(arg_serviceFilter_resourceType)); |
| 675 unittest.expect(queryMap["serviceFilter.service"].first, unittest.equals
(arg_serviceFilter_service)); | 679 unittest.expect(queryMap["serviceFilter.service"].first, unittest.equals
(arg_serviceFilter_service)); |
| 676 unittest.expect(queryMap["groupId"].first, unittest.equals(arg_groupId))
; | 680 unittest.expect(queryMap["groupId"].first, unittest.equals(arg_groupId))
; |
| 677 unittest.expect(queryMap["serviceFilter.version"].first, unittest.equals
(arg_serviceFilter_version)); | 681 unittest.expect(queryMap["serviceFilter.version"].first, unittest.equals
(arg_serviceFilter_version)); |
| 678 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ
als(arg_pageSize)); | 682 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ
als(arg_pageSize)); |
| 679 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | 683 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); |
| 680 | 684 |
| 681 | 685 |
| 682 var h = { | 686 var h = { |
| 683 "content-type" : "application/json; charset=utf-8", | 687 "content-type" : "application/json; charset=utf-8", |
| 684 }; | 688 }; |
| 685 var resp = convert.JSON.encode(buildListEventsResponse()); | 689 var resp = convert.JSON.encode(buildListEventsResponse()); |
| 686 return new async.Future.value(stringResponse(200, h, resp)); | 690 return new async.Future.value(stringResponse(200, h, resp)); |
| 687 }), true); | 691 }), true); |
| 688 res.list(arg_projectName, timeRange_period: arg_timeRange_period, serviceF
ilter_service: arg_serviceFilter_service, groupId: arg_groupId, serviceFilter_ve
rsion: arg_serviceFilter_version, pageSize: arg_pageSize, pageToken: arg_pageTok
en).then(unittest.expectAsync(((api.ListEventsResponse response) { | 692 res.list(arg_projectName, timeRange_period: arg_timeRange_period, serviceF
ilter_resourceType: arg_serviceFilter_resourceType, serviceFilter_service: arg_s
erviceFilter_service, groupId: arg_groupId, serviceFilter_version: arg_serviceFi
lter_version, pageSize: arg_pageSize, pageToken: arg_pageToken).then(unittest.ex
pectAsync(((api.ListEventsResponse response) { |
| 689 checkListEventsResponse(response); | 693 checkListEventsResponse(response); |
| 690 }))); | 694 }))); |
| 691 }); | 695 }); |
| 692 | 696 |
| 693 unittest.test("method--report", () { | 697 unittest.test("method--report", () { |
| 694 | 698 |
| 695 var mock = new HttpServerMock(); | 699 var mock = new HttpServerMock(); |
| 696 api.ProjectsEventsResourceApi res = new api.ClouderrorreportingApi(mock).p
rojects.events; | 700 api.ProjectsEventsResourceApi res = new api.ClouderrorreportingApi(mock).p
rojects.events; |
| 697 var arg_request = buildReportedErrorEvent(); | 701 var arg_request = buildReportedErrorEvent(); |
| 698 var arg_projectName = "foo"; | 702 var arg_projectName = "foo"; |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 743 | 747 |
| 744 | 748 |
| 745 unittest.group("resource-ProjectsGroupStatsResourceApi", () { | 749 unittest.group("resource-ProjectsGroupStatsResourceApi", () { |
| 746 unittest.test("method--list", () { | 750 unittest.test("method--list", () { |
| 747 | 751 |
| 748 var mock = new HttpServerMock(); | 752 var mock = new HttpServerMock(); |
| 749 api.ProjectsGroupStatsResourceApi res = new api.ClouderrorreportingApi(moc
k).projects.groupStats; | 753 api.ProjectsGroupStatsResourceApi res = new api.ClouderrorreportingApi(moc
k).projects.groupStats; |
| 750 var arg_projectName = "foo"; | 754 var arg_projectName = "foo"; |
| 751 var arg_alignment = "foo"; | 755 var arg_alignment = "foo"; |
| 752 var arg_timeRange_period = "foo"; | 756 var arg_timeRange_period = "foo"; |
| 757 var arg_serviceFilter_resourceType = "foo"; |
| 753 var arg_order = "foo"; | 758 var arg_order = "foo"; |
| 754 var arg_groupId = buildUnnamed3587(); | 759 var arg_groupId = buildUnnamed3298(); |
| 755 var arg_serviceFilter_service = "foo"; | 760 var arg_serviceFilter_service = "foo"; |
| 756 var arg_alignmentTime = "foo"; | 761 var arg_alignmentTime = "foo"; |
| 757 var arg_serviceFilter_version = "foo"; | 762 var arg_serviceFilter_version = "foo"; |
| 758 var arg_pageSize = 42; | 763 var arg_pageSize = 42; |
| 759 var arg_timedCountDuration = "foo"; | 764 var arg_timedCountDuration = "foo"; |
| 760 var arg_pageToken = "foo"; | 765 var arg_pageToken = "foo"; |
| 761 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 766 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 762 var path = (req.url).path; | 767 var path = (req.url).path; |
| 763 var pathOffset = 0; | 768 var pathOffset = 0; |
| 764 var index; | 769 var index; |
| (...skipping 15 matching lines...) Expand all Loading... |
| 780 throw new core.ArgumentError("Invalid boolean: $n"); | 785 throw new core.ArgumentError("Invalid boolean: $n"); |
| 781 } | 786 } |
| 782 if (query.length > 0) { | 787 if (query.length > 0) { |
| 783 for (var part in query.split("&")) { | 788 for (var part in query.split("&")) { |
| 784 var keyvalue = part.split("="); | 789 var keyvalue = part.split("="); |
| 785 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 790 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 786 } | 791 } |
| 787 } | 792 } |
| 788 unittest.expect(queryMap["alignment"].first, unittest.equals(arg_alignme
nt)); | 793 unittest.expect(queryMap["alignment"].first, unittest.equals(arg_alignme
nt)); |
| 789 unittest.expect(queryMap["timeRange.period"].first, unittest.equals(arg_
timeRange_period)); | 794 unittest.expect(queryMap["timeRange.period"].first, unittest.equals(arg_
timeRange_period)); |
| 795 unittest.expect(queryMap["serviceFilter.resourceType"].first, unittest.e
quals(arg_serviceFilter_resourceType)); |
| 790 unittest.expect(queryMap["order"].first, unittest.equals(arg_order)); | 796 unittest.expect(queryMap["order"].first, unittest.equals(arg_order)); |
| 791 unittest.expect(queryMap["groupId"], unittest.equals(arg_groupId)); | 797 unittest.expect(queryMap["groupId"], unittest.equals(arg_groupId)); |
| 792 unittest.expect(queryMap["serviceFilter.service"].first, unittest.equals
(arg_serviceFilter_service)); | 798 unittest.expect(queryMap["serviceFilter.service"].first, unittest.equals
(arg_serviceFilter_service)); |
| 793 unittest.expect(queryMap["alignmentTime"].first, unittest.equals(arg_ali
gnmentTime)); | 799 unittest.expect(queryMap["alignmentTime"].first, unittest.equals(arg_ali
gnmentTime)); |
| 794 unittest.expect(queryMap["serviceFilter.version"].first, unittest.equals
(arg_serviceFilter_version)); | 800 unittest.expect(queryMap["serviceFilter.version"].first, unittest.equals
(arg_serviceFilter_version)); |
| 795 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ
als(arg_pageSize)); | 801 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ
als(arg_pageSize)); |
| 796 unittest.expect(queryMap["timedCountDuration"].first, unittest.equals(ar
g_timedCountDuration)); | 802 unittest.expect(queryMap["timedCountDuration"].first, unittest.equals(ar
g_timedCountDuration)); |
| 797 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | 803 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); |
| 798 | 804 |
| 799 | 805 |
| 800 var h = { | 806 var h = { |
| 801 "content-type" : "application/json; charset=utf-8", | 807 "content-type" : "application/json; charset=utf-8", |
| 802 }; | 808 }; |
| 803 var resp = convert.JSON.encode(buildListGroupStatsResponse()); | 809 var resp = convert.JSON.encode(buildListGroupStatsResponse()); |
| 804 return new async.Future.value(stringResponse(200, h, resp)); | 810 return new async.Future.value(stringResponse(200, h, resp)); |
| 805 }), true); | 811 }), true); |
| 806 res.list(arg_projectName, alignment: arg_alignment, timeRange_period: arg_
timeRange_period, order: arg_order, groupId: arg_groupId, serviceFilter_service:
arg_serviceFilter_service, alignmentTime: arg_alignmentTime, serviceFilter_vers
ion: arg_serviceFilter_version, pageSize: arg_pageSize, timedCountDuration: arg_
timedCountDuration, pageToken: arg_pageToken).then(unittest.expectAsync(((api.Li
stGroupStatsResponse response) { | 812 res.list(arg_projectName, alignment: arg_alignment, timeRange_period: arg_
timeRange_period, serviceFilter_resourceType: arg_serviceFilter_resourceType, or
der: arg_order, groupId: arg_groupId, serviceFilter_service: arg_serviceFilter_s
ervice, alignmentTime: arg_alignmentTime, serviceFilter_version: arg_serviceFilt
er_version, pageSize: arg_pageSize, timedCountDuration: arg_timedCountDuration,
pageToken: arg_pageToken).then(unittest.expectAsync(((api.ListGroupStatsResponse
response) { |
| 807 checkListGroupStatsResponse(response); | 813 checkListGroupStatsResponse(response); |
| 808 }))); | 814 }))); |
| 809 }); | 815 }); |
| 810 | 816 |
| 811 }); | 817 }); |
| 812 | 818 |
| 813 | 819 |
| 814 unittest.group("resource-ProjectsGroupsResourceApi", () { | 820 unittest.group("resource-ProjectsGroupsResourceApi", () { |
| 815 unittest.test("method--get", () { | 821 unittest.test("method--get", () { |
| 816 | 822 |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 904 res.update(arg_request, arg_name).then(unittest.expectAsync(((api.ErrorGro
up response) { | 910 res.update(arg_request, arg_name).then(unittest.expectAsync(((api.ErrorGro
up response) { |
| 905 checkErrorGroup(response); | 911 checkErrorGroup(response); |
| 906 }))); | 912 }))); |
| 907 }); | 913 }); |
| 908 | 914 |
| 909 }); | 915 }); |
| 910 | 916 |
| 911 | 917 |
| 912 } | 918 } |
| 913 | 919 |
| OLD | NEW |