| OLD | NEW |
| 1 library googleapis.servicecontrol.v1.test; | 1 library googleapis.servicecontrol.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 core.int buildCounterAllocateQuotaRequest = 0; |
| 55 buildAllocateQuotaRequest() { |
| 56 var o = new api.AllocateQuotaRequest(); |
| 57 buildCounterAllocateQuotaRequest++; |
| 58 if (buildCounterAllocateQuotaRequest < 3) { |
| 59 o.allocateOperation = buildQuotaOperation(); |
| 60 o.allocationMode = "foo"; |
| 61 o.serviceConfigId = "foo"; |
| 62 } |
| 63 buildCounterAllocateQuotaRequest--; |
| 64 return o; |
| 65 } |
| 66 |
| 67 checkAllocateQuotaRequest(api.AllocateQuotaRequest o) { |
| 68 buildCounterAllocateQuotaRequest++; |
| 69 if (buildCounterAllocateQuotaRequest < 3) { |
| 70 checkQuotaOperation(o.allocateOperation); |
| 71 unittest.expect(o.allocationMode, unittest.equals('foo')); |
| 72 unittest.expect(o.serviceConfigId, unittest.equals('foo')); |
| 73 } |
| 74 buildCounterAllocateQuotaRequest--; |
| 75 } |
| 76 |
| 77 buildUnnamed1654() { |
| 78 var o = new core.List<api.QuotaError>(); |
| 79 o.add(buildQuotaError()); |
| 80 o.add(buildQuotaError()); |
| 81 return o; |
| 82 } |
| 83 |
| 84 checkUnnamed1654(core.List<api.QuotaError> o) { |
| 85 unittest.expect(o, unittest.hasLength(2)); |
| 86 checkQuotaError(o[0]); |
| 87 checkQuotaError(o[1]); |
| 88 } |
| 89 |
| 90 buildUnnamed1655() { |
| 91 var o = new core.List<api.MetricValueSet>(); |
| 92 o.add(buildMetricValueSet()); |
| 93 o.add(buildMetricValueSet()); |
| 94 return o; |
| 95 } |
| 96 |
| 97 checkUnnamed1655(core.List<api.MetricValueSet> o) { |
| 98 unittest.expect(o, unittest.hasLength(2)); |
| 99 checkMetricValueSet(o[0]); |
| 100 checkMetricValueSet(o[1]); |
| 101 } |
| 102 |
| 103 core.int buildCounterAllocateQuotaResponse = 0; |
| 104 buildAllocateQuotaResponse() { |
| 105 var o = new api.AllocateQuotaResponse(); |
| 106 buildCounterAllocateQuotaResponse++; |
| 107 if (buildCounterAllocateQuotaResponse < 3) { |
| 108 o.allocateErrors = buildUnnamed1654(); |
| 109 o.operationId = "foo"; |
| 110 o.quotaMetrics = buildUnnamed1655(); |
| 111 o.serviceConfigId = "foo"; |
| 112 } |
| 113 buildCounterAllocateQuotaResponse--; |
| 114 return o; |
| 115 } |
| 116 |
| 117 checkAllocateQuotaResponse(api.AllocateQuotaResponse o) { |
| 118 buildCounterAllocateQuotaResponse++; |
| 119 if (buildCounterAllocateQuotaResponse < 3) { |
| 120 checkUnnamed1654(o.allocateErrors); |
| 121 unittest.expect(o.operationId, unittest.equals('foo')); |
| 122 checkUnnamed1655(o.quotaMetrics); |
| 123 unittest.expect(o.serviceConfigId, unittest.equals('foo')); |
| 124 } |
| 125 buildCounterAllocateQuotaResponse--; |
| 126 } |
| 127 |
| 128 buildUnnamed1656() { |
| 129 var o = new core.List<api.AuthorizationInfo>(); |
| 130 o.add(buildAuthorizationInfo()); |
| 131 o.add(buildAuthorizationInfo()); |
| 132 return o; |
| 133 } |
| 134 |
| 135 checkUnnamed1656(core.List<api.AuthorizationInfo> o) { |
| 136 unittest.expect(o, unittest.hasLength(2)); |
| 137 checkAuthorizationInfo(o[0]); |
| 138 checkAuthorizationInfo(o[1]); |
| 139 } |
| 140 |
| 141 buildUnnamed1657() { |
| 142 var o = new core.Map<core.String, core.Object>(); |
| 143 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; |
| 144 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; |
| 145 return o; |
| 146 } |
| 147 |
| 148 checkUnnamed1657(core.Map<core.String, core.Object> o) { |
| 149 unittest.expect(o, unittest.hasLength(2)); |
| 150 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')); |
| 151 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')); |
| 152 } |
| 153 |
| 154 buildUnnamed1658() { |
| 155 var o = new core.Map<core.String, core.Object>(); |
| 156 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; |
| 157 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; |
| 158 return o; |
| 159 } |
| 160 |
| 161 checkUnnamed1658(core.Map<core.String, core.Object> o) { |
| 162 unittest.expect(o, unittest.hasLength(2)); |
| 163 var casted3 = (o["x"]) as core.Map; unittest.expect(casted3, unittest.hasLengt
h(3)); unittest.expect(casted3["list"], unittest.equals([1, 2, 3])); unittest.ex
pect(casted3["bool"], unittest.equals(true)); unittest.expect(casted3["string"],
unittest.equals('foo')); |
| 164 var casted4 = (o["y"]) as core.Map; unittest.expect(casted4, unittest.hasLengt
h(3)); unittest.expect(casted4["list"], unittest.equals([1, 2, 3])); unittest.ex
pect(casted4["bool"], unittest.equals(true)); unittest.expect(casted4["string"],
unittest.equals('foo')); |
| 165 } |
| 166 |
| 167 buildUnnamed1659() { |
| 168 var o = new core.Map<core.String, core.Object>(); |
| 169 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; |
| 170 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; |
| 171 return o; |
| 172 } |
| 173 |
| 174 checkUnnamed1659(core.Map<core.String, core.Object> o) { |
| 175 unittest.expect(o, unittest.hasLength(2)); |
| 176 var casted5 = (o["x"]) as core.Map; unittest.expect(casted5, unittest.hasLengt
h(3)); unittest.expect(casted5["list"], unittest.equals([1, 2, 3])); unittest.ex
pect(casted5["bool"], unittest.equals(true)); unittest.expect(casted5["string"],
unittest.equals('foo')); |
| 177 var casted6 = (o["y"]) as core.Map; unittest.expect(casted6, unittest.hasLengt
h(3)); unittest.expect(casted6["list"], unittest.equals([1, 2, 3])); unittest.ex
pect(casted6["bool"], unittest.equals(true)); unittest.expect(casted6["string"],
unittest.equals('foo')); |
| 178 } |
| 179 |
| 180 core.int buildCounterAuditLog = 0; |
| 181 buildAuditLog() { |
| 182 var o = new api.AuditLog(); |
| 183 buildCounterAuditLog++; |
| 184 if (buildCounterAuditLog < 3) { |
| 185 o.authenticationInfo = buildAuthenticationInfo(); |
| 186 o.authorizationInfo = buildUnnamed1656(); |
| 187 o.methodName = "foo"; |
| 188 o.numResponseItems = "foo"; |
| 189 o.request = buildUnnamed1657(); |
| 190 o.requestMetadata = buildRequestMetadata(); |
| 191 o.resourceName = "foo"; |
| 192 o.response = buildUnnamed1658(); |
| 193 o.serviceData = buildUnnamed1659(); |
| 194 o.serviceName = "foo"; |
| 195 o.status = buildStatus(); |
| 196 } |
| 197 buildCounterAuditLog--; |
| 198 return o; |
| 199 } |
| 200 |
| 201 checkAuditLog(api.AuditLog o) { |
| 202 buildCounterAuditLog++; |
| 203 if (buildCounterAuditLog < 3) { |
| 204 checkAuthenticationInfo(o.authenticationInfo); |
| 205 checkUnnamed1656(o.authorizationInfo); |
| 206 unittest.expect(o.methodName, unittest.equals('foo')); |
| 207 unittest.expect(o.numResponseItems, unittest.equals('foo')); |
| 208 checkUnnamed1657(o.request); |
| 209 checkRequestMetadata(o.requestMetadata); |
| 210 unittest.expect(o.resourceName, unittest.equals('foo')); |
| 211 checkUnnamed1658(o.response); |
| 212 checkUnnamed1659(o.serviceData); |
| 213 unittest.expect(o.serviceName, unittest.equals('foo')); |
| 214 checkStatus(o.status); |
| 215 } |
| 216 buildCounterAuditLog--; |
| 217 } |
| 218 |
| 219 core.int buildCounterAuthenticationInfo = 0; |
| 220 buildAuthenticationInfo() { |
| 221 var o = new api.AuthenticationInfo(); |
| 222 buildCounterAuthenticationInfo++; |
| 223 if (buildCounterAuthenticationInfo < 3) { |
| 224 o.authoritySelector = "foo"; |
| 225 o.principalEmail = "foo"; |
| 226 } |
| 227 buildCounterAuthenticationInfo--; |
| 228 return o; |
| 229 } |
| 230 |
| 231 checkAuthenticationInfo(api.AuthenticationInfo o) { |
| 232 buildCounterAuthenticationInfo++; |
| 233 if (buildCounterAuthenticationInfo < 3) { |
| 234 unittest.expect(o.authoritySelector, unittest.equals('foo')); |
| 235 unittest.expect(o.principalEmail, unittest.equals('foo')); |
| 236 } |
| 237 buildCounterAuthenticationInfo--; |
| 238 } |
| 239 |
| 240 core.int buildCounterAuthorizationInfo = 0; |
| 241 buildAuthorizationInfo() { |
| 242 var o = new api.AuthorizationInfo(); |
| 243 buildCounterAuthorizationInfo++; |
| 244 if (buildCounterAuthorizationInfo < 3) { |
| 245 o.granted = true; |
| 246 o.permission = "foo"; |
| 247 o.resource = "foo"; |
| 248 } |
| 249 buildCounterAuthorizationInfo--; |
| 250 return o; |
| 251 } |
| 252 |
| 253 checkAuthorizationInfo(api.AuthorizationInfo o) { |
| 254 buildCounterAuthorizationInfo++; |
| 255 if (buildCounterAuthorizationInfo < 3) { |
| 256 unittest.expect(o.granted, unittest.isTrue); |
| 257 unittest.expect(o.permission, unittest.equals('foo')); |
| 258 unittest.expect(o.resource, unittest.equals('foo')); |
| 259 } |
| 260 buildCounterAuthorizationInfo--; |
| 261 } |
| 262 |
| 54 core.int buildCounterCheckError = 0; | 263 core.int buildCounterCheckError = 0; |
| 55 buildCheckError() { | 264 buildCheckError() { |
| 56 var o = new api.CheckError(); | 265 var o = new api.CheckError(); |
| 57 buildCounterCheckError++; | 266 buildCounterCheckError++; |
| 58 if (buildCounterCheckError < 3) { | 267 if (buildCounterCheckError < 3) { |
| 59 o.code = "foo"; | 268 o.code = "foo"; |
| 60 o.detail = "foo"; | 269 o.detail = "foo"; |
| 61 } | 270 } |
| 62 buildCounterCheckError--; | 271 buildCounterCheckError--; |
| 63 return o; | 272 return o; |
| 64 } | 273 } |
| 65 | 274 |
| 66 checkCheckError(api.CheckError o) { | 275 checkCheckError(api.CheckError o) { |
| 67 buildCounterCheckError++; | 276 buildCounterCheckError++; |
| 68 if (buildCounterCheckError < 3) { | 277 if (buildCounterCheckError < 3) { |
| 69 unittest.expect(o.code, unittest.equals('foo')); | 278 unittest.expect(o.code, unittest.equals('foo')); |
| 70 unittest.expect(o.detail, unittest.equals('foo')); | 279 unittest.expect(o.detail, unittest.equals('foo')); |
| 71 } | 280 } |
| 72 buildCounterCheckError--; | 281 buildCounterCheckError--; |
| 73 } | 282 } |
| 74 | 283 |
| 284 buildUnnamed1660() { |
| 285 var o = new core.List<core.String>(); |
| 286 o.add("foo"); |
| 287 o.add("foo"); |
| 288 return o; |
| 289 } |
| 290 |
| 291 checkUnnamed1660(core.List<core.String> o) { |
| 292 unittest.expect(o, unittest.hasLength(2)); |
| 293 unittest.expect(o[0], unittest.equals('foo')); |
| 294 unittest.expect(o[1], unittest.equals('foo')); |
| 295 } |
| 296 |
| 297 core.int buildCounterCheckInfo = 0; |
| 298 buildCheckInfo() { |
| 299 var o = new api.CheckInfo(); |
| 300 buildCounterCheckInfo++; |
| 301 if (buildCounterCheckInfo < 3) { |
| 302 o.unusedArguments = buildUnnamed1660(); |
| 303 } |
| 304 buildCounterCheckInfo--; |
| 305 return o; |
| 306 } |
| 307 |
| 308 checkCheckInfo(api.CheckInfo o) { |
| 309 buildCounterCheckInfo++; |
| 310 if (buildCounterCheckInfo < 3) { |
| 311 checkUnnamed1660(o.unusedArguments); |
| 312 } |
| 313 buildCounterCheckInfo--; |
| 314 } |
| 315 |
| 75 core.int buildCounterCheckRequest = 0; | 316 core.int buildCounterCheckRequest = 0; |
| 76 buildCheckRequest() { | 317 buildCheckRequest() { |
| 77 var o = new api.CheckRequest(); | 318 var o = new api.CheckRequest(); |
| 78 buildCounterCheckRequest++; | 319 buildCounterCheckRequest++; |
| 79 if (buildCounterCheckRequest < 3) { | 320 if (buildCounterCheckRequest < 3) { |
| 80 o.operation = buildOperation(); | 321 o.operation = buildOperation(); |
| 322 o.requestProjectSettings = true; |
| 81 o.serviceConfigId = "foo"; | 323 o.serviceConfigId = "foo"; |
| 324 o.skipActivationCheck = true; |
| 82 } | 325 } |
| 83 buildCounterCheckRequest--; | 326 buildCounterCheckRequest--; |
| 84 return o; | 327 return o; |
| 85 } | 328 } |
| 86 | 329 |
| 87 checkCheckRequest(api.CheckRequest o) { | 330 checkCheckRequest(api.CheckRequest o) { |
| 88 buildCounterCheckRequest++; | 331 buildCounterCheckRequest++; |
| 89 if (buildCounterCheckRequest < 3) { | 332 if (buildCounterCheckRequest < 3) { |
| 90 checkOperation(o.operation); | 333 checkOperation(o.operation); |
| 334 unittest.expect(o.requestProjectSettings, unittest.isTrue); |
| 91 unittest.expect(o.serviceConfigId, unittest.equals('foo')); | 335 unittest.expect(o.serviceConfigId, unittest.equals('foo')); |
| 336 unittest.expect(o.skipActivationCheck, unittest.isTrue); |
| 92 } | 337 } |
| 93 buildCounterCheckRequest--; | 338 buildCounterCheckRequest--; |
| 94 } | 339 } |
| 95 | 340 |
| 96 buildUnnamed1642() { | 341 buildUnnamed1661() { |
| 97 var o = new core.List<api.CheckError>(); | 342 var o = new core.List<api.CheckError>(); |
| 98 o.add(buildCheckError()); | 343 o.add(buildCheckError()); |
| 99 o.add(buildCheckError()); | 344 o.add(buildCheckError()); |
| 100 return o; | 345 return o; |
| 101 } | 346 } |
| 102 | 347 |
| 103 checkUnnamed1642(core.List<api.CheckError> o) { | 348 checkUnnamed1661(core.List<api.CheckError> o) { |
| 104 unittest.expect(o, unittest.hasLength(2)); | 349 unittest.expect(o, unittest.hasLength(2)); |
| 105 checkCheckError(o[0]); | 350 checkCheckError(o[0]); |
| 106 checkCheckError(o[1]); | 351 checkCheckError(o[1]); |
| 107 } | 352 } |
| 108 | 353 |
| 109 core.int buildCounterCheckResponse = 0; | 354 core.int buildCounterCheckResponse = 0; |
| 110 buildCheckResponse() { | 355 buildCheckResponse() { |
| 111 var o = new api.CheckResponse(); | 356 var o = new api.CheckResponse(); |
| 112 buildCounterCheckResponse++; | 357 buildCounterCheckResponse++; |
| 113 if (buildCounterCheckResponse < 3) { | 358 if (buildCounterCheckResponse < 3) { |
| 114 o.checkErrors = buildUnnamed1642(); | 359 o.checkErrors = buildUnnamed1661(); |
| 360 o.checkInfo = buildCheckInfo(); |
| 115 o.operationId = "foo"; | 361 o.operationId = "foo"; |
| 362 o.quotaInfo = buildQuotaInfo(); |
| 116 o.serviceConfigId = "foo"; | 363 o.serviceConfigId = "foo"; |
| 117 } | 364 } |
| 118 buildCounterCheckResponse--; | 365 buildCounterCheckResponse--; |
| 119 return o; | 366 return o; |
| 120 } | 367 } |
| 121 | 368 |
| 122 checkCheckResponse(api.CheckResponse o) { | 369 checkCheckResponse(api.CheckResponse o) { |
| 123 buildCounterCheckResponse++; | 370 buildCounterCheckResponse++; |
| 124 if (buildCounterCheckResponse < 3) { | 371 if (buildCounterCheckResponse < 3) { |
| 125 checkUnnamed1642(o.checkErrors); | 372 checkUnnamed1661(o.checkErrors); |
| 373 checkCheckInfo(o.checkInfo); |
| 126 unittest.expect(o.operationId, unittest.equals('foo')); | 374 unittest.expect(o.operationId, unittest.equals('foo')); |
| 375 checkQuotaInfo(o.quotaInfo); |
| 127 unittest.expect(o.serviceConfigId, unittest.equals('foo')); | 376 unittest.expect(o.serviceConfigId, unittest.equals('foo')); |
| 128 } | 377 } |
| 129 buildCounterCheckResponse--; | 378 buildCounterCheckResponse--; |
| 130 } | 379 } |
| 131 | 380 |
| 132 buildUnnamed1643() { | 381 buildUnnamed1662() { |
| 133 var o = new core.List<core.String>(); | 382 var o = new core.List<core.String>(); |
| 134 o.add("foo"); | 383 o.add("foo"); |
| 135 o.add("foo"); | 384 o.add("foo"); |
| 136 return o; | 385 return o; |
| 137 } | 386 } |
| 138 | 387 |
| 139 checkUnnamed1643(core.List<core.String> o) { | 388 checkUnnamed1662(core.List<core.String> o) { |
| 140 unittest.expect(o, unittest.hasLength(2)); | 389 unittest.expect(o, unittest.hasLength(2)); |
| 141 unittest.expect(o[0], unittest.equals('foo')); | 390 unittest.expect(o[0], unittest.equals('foo')); |
| 142 unittest.expect(o[1], unittest.equals('foo')); | 391 unittest.expect(o[1], unittest.equals('foo')); |
| 143 } | 392 } |
| 144 | 393 |
| 145 core.int buildCounterDistribution = 0; | 394 core.int buildCounterDistribution = 0; |
| 146 buildDistribution() { | 395 buildDistribution() { |
| 147 var o = new api.Distribution(); | 396 var o = new api.Distribution(); |
| 148 buildCounterDistribution++; | 397 buildCounterDistribution++; |
| 149 if (buildCounterDistribution < 3) { | 398 if (buildCounterDistribution < 3) { |
| 150 o.bucketCounts = buildUnnamed1643(); | 399 o.bucketCounts = buildUnnamed1662(); |
| 151 o.count = "foo"; | 400 o.count = "foo"; |
| 152 o.explicitBuckets = buildExplicitBuckets(); | 401 o.explicitBuckets = buildExplicitBuckets(); |
| 153 o.exponentialBuckets = buildExponentialBuckets(); | 402 o.exponentialBuckets = buildExponentialBuckets(); |
| 154 o.linearBuckets = buildLinearBuckets(); | 403 o.linearBuckets = buildLinearBuckets(); |
| 155 o.maximum = 42.0; | 404 o.maximum = 42.0; |
| 156 o.mean = 42.0; | 405 o.mean = 42.0; |
| 157 o.minimum = 42.0; | 406 o.minimum = 42.0; |
| 158 o.sumOfSquaredDeviation = 42.0; | 407 o.sumOfSquaredDeviation = 42.0; |
| 159 } | 408 } |
| 160 buildCounterDistribution--; | 409 buildCounterDistribution--; |
| 161 return o; | 410 return o; |
| 162 } | 411 } |
| 163 | 412 |
| 164 checkDistribution(api.Distribution o) { | 413 checkDistribution(api.Distribution o) { |
| 165 buildCounterDistribution++; | 414 buildCounterDistribution++; |
| 166 if (buildCounterDistribution < 3) { | 415 if (buildCounterDistribution < 3) { |
| 167 checkUnnamed1643(o.bucketCounts); | 416 checkUnnamed1662(o.bucketCounts); |
| 168 unittest.expect(o.count, unittest.equals('foo')); | 417 unittest.expect(o.count, unittest.equals('foo')); |
| 169 checkExplicitBuckets(o.explicitBuckets); | 418 checkExplicitBuckets(o.explicitBuckets); |
| 170 checkExponentialBuckets(o.exponentialBuckets); | 419 checkExponentialBuckets(o.exponentialBuckets); |
| 171 checkLinearBuckets(o.linearBuckets); | 420 checkLinearBuckets(o.linearBuckets); |
| 172 unittest.expect(o.maximum, unittest.equals(42.0)); | 421 unittest.expect(o.maximum, unittest.equals(42.0)); |
| 173 unittest.expect(o.mean, unittest.equals(42.0)); | 422 unittest.expect(o.mean, unittest.equals(42.0)); |
| 174 unittest.expect(o.minimum, unittest.equals(42.0)); | 423 unittest.expect(o.minimum, unittest.equals(42.0)); |
| 175 unittest.expect(o.sumOfSquaredDeviation, unittest.equals(42.0)); | 424 unittest.expect(o.sumOfSquaredDeviation, unittest.equals(42.0)); |
| 176 } | 425 } |
| 177 buildCounterDistribution--; | 426 buildCounterDistribution--; |
| 178 } | 427 } |
| 179 | 428 |
| 180 buildUnnamed1644() { | 429 core.int buildCounterEndReconciliationRequest = 0; |
| 430 buildEndReconciliationRequest() { |
| 431 var o = new api.EndReconciliationRequest(); |
| 432 buildCounterEndReconciliationRequest++; |
| 433 if (buildCounterEndReconciliationRequest < 3) { |
| 434 o.reconciliationOperation = buildQuotaOperation(); |
| 435 o.serviceConfigId = "foo"; |
| 436 } |
| 437 buildCounterEndReconciliationRequest--; |
| 438 return o; |
| 439 } |
| 440 |
| 441 checkEndReconciliationRequest(api.EndReconciliationRequest o) { |
| 442 buildCounterEndReconciliationRequest++; |
| 443 if (buildCounterEndReconciliationRequest < 3) { |
| 444 checkQuotaOperation(o.reconciliationOperation); |
| 445 unittest.expect(o.serviceConfigId, unittest.equals('foo')); |
| 446 } |
| 447 buildCounterEndReconciliationRequest--; |
| 448 } |
| 449 |
| 450 buildUnnamed1663() { |
| 451 var o = new core.List<api.MetricValueSet>(); |
| 452 o.add(buildMetricValueSet()); |
| 453 o.add(buildMetricValueSet()); |
| 454 return o; |
| 455 } |
| 456 |
| 457 checkUnnamed1663(core.List<api.MetricValueSet> o) { |
| 458 unittest.expect(o, unittest.hasLength(2)); |
| 459 checkMetricValueSet(o[0]); |
| 460 checkMetricValueSet(o[1]); |
| 461 } |
| 462 |
| 463 buildUnnamed1664() { |
| 464 var o = new core.List<api.QuotaError>(); |
| 465 o.add(buildQuotaError()); |
| 466 o.add(buildQuotaError()); |
| 467 return o; |
| 468 } |
| 469 |
| 470 checkUnnamed1664(core.List<api.QuotaError> o) { |
| 471 unittest.expect(o, unittest.hasLength(2)); |
| 472 checkQuotaError(o[0]); |
| 473 checkQuotaError(o[1]); |
| 474 } |
| 475 |
| 476 core.int buildCounterEndReconciliationResponse = 0; |
| 477 buildEndReconciliationResponse() { |
| 478 var o = new api.EndReconciliationResponse(); |
| 479 buildCounterEndReconciliationResponse++; |
| 480 if (buildCounterEndReconciliationResponse < 3) { |
| 481 o.operationId = "foo"; |
| 482 o.quotaMetrics = buildUnnamed1663(); |
| 483 o.reconciliationErrors = buildUnnamed1664(); |
| 484 o.serviceConfigId = "foo"; |
| 485 } |
| 486 buildCounterEndReconciliationResponse--; |
| 487 return o; |
| 488 } |
| 489 |
| 490 checkEndReconciliationResponse(api.EndReconciliationResponse o) { |
| 491 buildCounterEndReconciliationResponse++; |
| 492 if (buildCounterEndReconciliationResponse < 3) { |
| 493 unittest.expect(o.operationId, unittest.equals('foo')); |
| 494 checkUnnamed1663(o.quotaMetrics); |
| 495 checkUnnamed1664(o.reconciliationErrors); |
| 496 unittest.expect(o.serviceConfigId, unittest.equals('foo')); |
| 497 } |
| 498 buildCounterEndReconciliationResponse--; |
| 499 } |
| 500 |
| 501 buildUnnamed1665() { |
| 181 var o = new core.List<core.double>(); | 502 var o = new core.List<core.double>(); |
| 182 o.add(42.0); | 503 o.add(42.0); |
| 183 o.add(42.0); | 504 o.add(42.0); |
| 184 return o; | 505 return o; |
| 185 } | 506 } |
| 186 | 507 |
| 187 checkUnnamed1644(core.List<core.double> o) { | 508 checkUnnamed1665(core.List<core.double> o) { |
| 188 unittest.expect(o, unittest.hasLength(2)); | 509 unittest.expect(o, unittest.hasLength(2)); |
| 189 unittest.expect(o[0], unittest.equals(42.0)); | 510 unittest.expect(o[0], unittest.equals(42.0)); |
| 190 unittest.expect(o[1], unittest.equals(42.0)); | 511 unittest.expect(o[1], unittest.equals(42.0)); |
| 191 } | 512 } |
| 192 | 513 |
| 193 core.int buildCounterExplicitBuckets = 0; | 514 core.int buildCounterExplicitBuckets = 0; |
| 194 buildExplicitBuckets() { | 515 buildExplicitBuckets() { |
| 195 var o = new api.ExplicitBuckets(); | 516 var o = new api.ExplicitBuckets(); |
| 196 buildCounterExplicitBuckets++; | 517 buildCounterExplicitBuckets++; |
| 197 if (buildCounterExplicitBuckets < 3) { | 518 if (buildCounterExplicitBuckets < 3) { |
| 198 o.bounds = buildUnnamed1644(); | 519 o.bounds = buildUnnamed1665(); |
| 199 } | 520 } |
| 200 buildCounterExplicitBuckets--; | 521 buildCounterExplicitBuckets--; |
| 201 return o; | 522 return o; |
| 202 } | 523 } |
| 203 | 524 |
| 204 checkExplicitBuckets(api.ExplicitBuckets o) { | 525 checkExplicitBuckets(api.ExplicitBuckets o) { |
| 205 buildCounterExplicitBuckets++; | 526 buildCounterExplicitBuckets++; |
| 206 if (buildCounterExplicitBuckets < 3) { | 527 if (buildCounterExplicitBuckets < 3) { |
| 207 checkUnnamed1644(o.bounds); | 528 checkUnnamed1665(o.bounds); |
| 208 } | 529 } |
| 209 buildCounterExplicitBuckets--; | 530 buildCounterExplicitBuckets--; |
| 210 } | 531 } |
| 211 | 532 |
| 212 core.int buildCounterExponentialBuckets = 0; | 533 core.int buildCounterExponentialBuckets = 0; |
| 213 buildExponentialBuckets() { | 534 buildExponentialBuckets() { |
| 214 var o = new api.ExponentialBuckets(); | 535 var o = new api.ExponentialBuckets(); |
| 215 buildCounterExponentialBuckets++; | 536 buildCounterExponentialBuckets++; |
| 216 if (buildCounterExponentialBuckets < 3) { | 537 if (buildCounterExponentialBuckets < 3) { |
| 217 o.growthFactor = 42.0; | 538 o.growthFactor = 42.0; |
| (...skipping 30 matching lines...) Expand all Loading... |
| 248 checkLinearBuckets(api.LinearBuckets o) { | 569 checkLinearBuckets(api.LinearBuckets o) { |
| 249 buildCounterLinearBuckets++; | 570 buildCounterLinearBuckets++; |
| 250 if (buildCounterLinearBuckets < 3) { | 571 if (buildCounterLinearBuckets < 3) { |
| 251 unittest.expect(o.numFiniteBuckets, unittest.equals(42)); | 572 unittest.expect(o.numFiniteBuckets, unittest.equals(42)); |
| 252 unittest.expect(o.offset, unittest.equals(42.0)); | 573 unittest.expect(o.offset, unittest.equals(42.0)); |
| 253 unittest.expect(o.width, unittest.equals(42.0)); | 574 unittest.expect(o.width, unittest.equals(42.0)); |
| 254 } | 575 } |
| 255 buildCounterLinearBuckets--; | 576 buildCounterLinearBuckets--; |
| 256 } | 577 } |
| 257 | 578 |
| 258 buildUnnamed1645() { | 579 buildUnnamed1666() { |
| 259 var o = new core.Map<core.String, core.String>(); | 580 var o = new core.Map<core.String, core.String>(); |
| 260 o["x"] = "foo"; | 581 o["x"] = "foo"; |
| 261 o["y"] = "foo"; | 582 o["y"] = "foo"; |
| 262 return o; | 583 return o; |
| 263 } | 584 } |
| 264 | 585 |
| 265 checkUnnamed1645(core.Map<core.String, core.String> o) { | 586 checkUnnamed1666(core.Map<core.String, core.String> o) { |
| 266 unittest.expect(o, unittest.hasLength(2)); | 587 unittest.expect(o, unittest.hasLength(2)); |
| 267 unittest.expect(o["x"], unittest.equals('foo')); | 588 unittest.expect(o["x"], unittest.equals('foo')); |
| 268 unittest.expect(o["y"], unittest.equals('foo')); | 589 unittest.expect(o["y"], unittest.equals('foo')); |
| 269 } | 590 } |
| 270 | 591 |
| 271 buildUnnamed1646() { | 592 buildUnnamed1667() { |
| 272 var o = new core.Map<core.String, core.Object>(); | 593 var o = new core.Map<core.String, core.Object>(); |
| 273 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 594 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; |
| 274 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 595 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; |
| 275 return o; | 596 return o; |
| 276 } | 597 } |
| 277 | 598 |
| 278 checkUnnamed1646(core.Map<core.String, core.Object> o) { | 599 checkUnnamed1667(core.Map<core.String, core.Object> o) { |
| 279 unittest.expect(o, unittest.hasLength(2)); | 600 unittest.expect(o, unittest.hasLength(2)); |
| 280 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')); | 601 var casted7 = (o["x"]) as core.Map; unittest.expect(casted7, unittest.hasLengt
h(3)); unittest.expect(casted7["list"], unittest.equals([1, 2, 3])); unittest.ex
pect(casted7["bool"], unittest.equals(true)); unittest.expect(casted7["string"],
unittest.equals('foo')); |
| 281 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')); | 602 var casted8 = (o["y"]) as core.Map; unittest.expect(casted8, unittest.hasLengt
h(3)); unittest.expect(casted8["list"], unittest.equals([1, 2, 3])); unittest.ex
pect(casted8["bool"], unittest.equals(true)); unittest.expect(casted8["string"],
unittest.equals('foo')); |
| 282 } | 603 } |
| 283 | 604 |
| 284 buildUnnamed1647() { | 605 buildUnnamed1668() { |
| 285 var o = new core.Map<core.String, core.Object>(); | 606 var o = new core.Map<core.String, core.Object>(); |
| 286 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 607 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; |
| 287 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 608 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; |
| 288 return o; | 609 return o; |
| 289 } | 610 } |
| 290 | 611 |
| 291 checkUnnamed1647(core.Map<core.String, core.Object> o) { | 612 checkUnnamed1668(core.Map<core.String, core.Object> o) { |
| 292 unittest.expect(o, unittest.hasLength(2)); | 613 unittest.expect(o, unittest.hasLength(2)); |
| 293 var casted3 = (o["x"]) as core.Map; unittest.expect(casted3, unittest.hasLengt
h(3)); unittest.expect(casted3["list"], unittest.equals([1, 2, 3])); unittest.ex
pect(casted3["bool"], unittest.equals(true)); unittest.expect(casted3["string"],
unittest.equals('foo')); | 614 var casted9 = (o["x"]) as core.Map; unittest.expect(casted9, unittest.hasLengt
h(3)); unittest.expect(casted9["list"], unittest.equals([1, 2, 3])); unittest.ex
pect(casted9["bool"], unittest.equals(true)); unittest.expect(casted9["string"],
unittest.equals('foo')); |
| 294 var casted4 = (o["y"]) as core.Map; unittest.expect(casted4, unittest.hasLengt
h(3)); unittest.expect(casted4["list"], unittest.equals([1, 2, 3])); unittest.ex
pect(casted4["bool"], unittest.equals(true)); unittest.expect(casted4["string"],
unittest.equals('foo')); | 615 var casted10 = (o["y"]) as core.Map; unittest.expect(casted10, unittest.hasLen
gth(3)); unittest.expect(casted10["list"], unittest.equals([1, 2, 3])); unittest
.expect(casted10["bool"], unittest.equals(true)); unittest.expect(casted10["stri
ng"], unittest.equals('foo')); |
| 295 } | 616 } |
| 296 | 617 |
| 297 core.int buildCounterLogEntry = 0; | 618 core.int buildCounterLogEntry = 0; |
| 298 buildLogEntry() { | 619 buildLogEntry() { |
| 299 var o = new api.LogEntry(); | 620 var o = new api.LogEntry(); |
| 300 buildCounterLogEntry++; | 621 buildCounterLogEntry++; |
| 301 if (buildCounterLogEntry < 3) { | 622 if (buildCounterLogEntry < 3) { |
| 302 o.insertId = "foo"; | 623 o.insertId = "foo"; |
| 303 o.labels = buildUnnamed1645(); | 624 o.labels = buildUnnamed1666(); |
| 304 o.name = "foo"; | 625 o.name = "foo"; |
| 305 o.protoPayload = buildUnnamed1646(); | 626 o.protoPayload = buildUnnamed1667(); |
| 306 o.severity = "foo"; | 627 o.severity = "foo"; |
| 307 o.structPayload = buildUnnamed1647(); | 628 o.structPayload = buildUnnamed1668(); |
| 308 o.textPayload = "foo"; | 629 o.textPayload = "foo"; |
| 309 o.timestamp = "foo"; | 630 o.timestamp = "foo"; |
| 310 } | 631 } |
| 311 buildCounterLogEntry--; | 632 buildCounterLogEntry--; |
| 312 return o; | 633 return o; |
| 313 } | 634 } |
| 314 | 635 |
| 315 checkLogEntry(api.LogEntry o) { | 636 checkLogEntry(api.LogEntry o) { |
| 316 buildCounterLogEntry++; | 637 buildCounterLogEntry++; |
| 317 if (buildCounterLogEntry < 3) { | 638 if (buildCounterLogEntry < 3) { |
| 318 unittest.expect(o.insertId, unittest.equals('foo')); | 639 unittest.expect(o.insertId, unittest.equals('foo')); |
| 319 checkUnnamed1645(o.labels); | 640 checkUnnamed1666(o.labels); |
| 320 unittest.expect(o.name, unittest.equals('foo')); | 641 unittest.expect(o.name, unittest.equals('foo')); |
| 321 checkUnnamed1646(o.protoPayload); | 642 checkUnnamed1667(o.protoPayload); |
| 322 unittest.expect(o.severity, unittest.equals('foo')); | 643 unittest.expect(o.severity, unittest.equals('foo')); |
| 323 checkUnnamed1647(o.structPayload); | 644 checkUnnamed1668(o.structPayload); |
| 324 unittest.expect(o.textPayload, unittest.equals('foo')); | 645 unittest.expect(o.textPayload, unittest.equals('foo')); |
| 325 unittest.expect(o.timestamp, unittest.equals('foo')); | 646 unittest.expect(o.timestamp, unittest.equals('foo')); |
| 326 } | 647 } |
| 327 buildCounterLogEntry--; | 648 buildCounterLogEntry--; |
| 328 } | 649 } |
| 329 | 650 |
| 330 buildUnnamed1648() { | 651 buildUnnamed1669() { |
| 331 var o = new core.Map<core.String, core.String>(); | 652 var o = new core.Map<core.String, core.String>(); |
| 332 o["x"] = "foo"; | 653 o["x"] = "foo"; |
| 333 o["y"] = "foo"; | 654 o["y"] = "foo"; |
| 334 return o; | 655 return o; |
| 335 } | 656 } |
| 336 | 657 |
| 337 checkUnnamed1648(core.Map<core.String, core.String> o) { | 658 checkUnnamed1669(core.Map<core.String, core.String> o) { |
| 338 unittest.expect(o, unittest.hasLength(2)); | 659 unittest.expect(o, unittest.hasLength(2)); |
| 339 unittest.expect(o["x"], unittest.equals('foo')); | 660 unittest.expect(o["x"], unittest.equals('foo')); |
| 340 unittest.expect(o["y"], unittest.equals('foo')); | 661 unittest.expect(o["y"], unittest.equals('foo')); |
| 341 } | 662 } |
| 342 | 663 |
| 343 core.int buildCounterMetricValue = 0; | 664 core.int buildCounterMetricValue = 0; |
| 344 buildMetricValue() { | 665 buildMetricValue() { |
| 345 var o = new api.MetricValue(); | 666 var o = new api.MetricValue(); |
| 346 buildCounterMetricValue++; | 667 buildCounterMetricValue++; |
| 347 if (buildCounterMetricValue < 3) { | 668 if (buildCounterMetricValue < 3) { |
| 348 o.boolValue = true; | 669 o.boolValue = true; |
| 349 o.distributionValue = buildDistribution(); | 670 o.distributionValue = buildDistribution(); |
| 350 o.doubleValue = 42.0; | 671 o.doubleValue = 42.0; |
| 351 o.endTime = "foo"; | 672 o.endTime = "foo"; |
| 352 o.int64Value = "foo"; | 673 o.int64Value = "foo"; |
| 353 o.labels = buildUnnamed1648(); | 674 o.labels = buildUnnamed1669(); |
| 675 o.moneyValue = buildMoney(); |
| 354 o.startTime = "foo"; | 676 o.startTime = "foo"; |
| 355 o.stringValue = "foo"; | 677 o.stringValue = "foo"; |
| 356 } | 678 } |
| 357 buildCounterMetricValue--; | 679 buildCounterMetricValue--; |
| 358 return o; | 680 return o; |
| 359 } | 681 } |
| 360 | 682 |
| 361 checkMetricValue(api.MetricValue o) { | 683 checkMetricValue(api.MetricValue o) { |
| 362 buildCounterMetricValue++; | 684 buildCounterMetricValue++; |
| 363 if (buildCounterMetricValue < 3) { | 685 if (buildCounterMetricValue < 3) { |
| 364 unittest.expect(o.boolValue, unittest.isTrue); | 686 unittest.expect(o.boolValue, unittest.isTrue); |
| 365 checkDistribution(o.distributionValue); | 687 checkDistribution(o.distributionValue); |
| 366 unittest.expect(o.doubleValue, unittest.equals(42.0)); | 688 unittest.expect(o.doubleValue, unittest.equals(42.0)); |
| 367 unittest.expect(o.endTime, unittest.equals('foo')); | 689 unittest.expect(o.endTime, unittest.equals('foo')); |
| 368 unittest.expect(o.int64Value, unittest.equals('foo')); | 690 unittest.expect(o.int64Value, unittest.equals('foo')); |
| 369 checkUnnamed1648(o.labels); | 691 checkUnnamed1669(o.labels); |
| 692 checkMoney(o.moneyValue); |
| 370 unittest.expect(o.startTime, unittest.equals('foo')); | 693 unittest.expect(o.startTime, unittest.equals('foo')); |
| 371 unittest.expect(o.stringValue, unittest.equals('foo')); | 694 unittest.expect(o.stringValue, unittest.equals('foo')); |
| 372 } | 695 } |
| 373 buildCounterMetricValue--; | 696 buildCounterMetricValue--; |
| 374 } | 697 } |
| 375 | 698 |
| 376 buildUnnamed1649() { | 699 buildUnnamed1670() { |
| 377 var o = new core.List<api.MetricValue>(); | 700 var o = new core.List<api.MetricValue>(); |
| 378 o.add(buildMetricValue()); | 701 o.add(buildMetricValue()); |
| 379 o.add(buildMetricValue()); | 702 o.add(buildMetricValue()); |
| 380 return o; | 703 return o; |
| 381 } | 704 } |
| 382 | 705 |
| 383 checkUnnamed1649(core.List<api.MetricValue> o) { | 706 checkUnnamed1670(core.List<api.MetricValue> o) { |
| 384 unittest.expect(o, unittest.hasLength(2)); | 707 unittest.expect(o, unittest.hasLength(2)); |
| 385 checkMetricValue(o[0]); | 708 checkMetricValue(o[0]); |
| 386 checkMetricValue(o[1]); | 709 checkMetricValue(o[1]); |
| 387 } | 710 } |
| 388 | 711 |
| 389 core.int buildCounterMetricValueSet = 0; | 712 core.int buildCounterMetricValueSet = 0; |
| 390 buildMetricValueSet() { | 713 buildMetricValueSet() { |
| 391 var o = new api.MetricValueSet(); | 714 var o = new api.MetricValueSet(); |
| 392 buildCounterMetricValueSet++; | 715 buildCounterMetricValueSet++; |
| 393 if (buildCounterMetricValueSet < 3) { | 716 if (buildCounterMetricValueSet < 3) { |
| 394 o.metricName = "foo"; | 717 o.metricName = "foo"; |
| 395 o.metricValues = buildUnnamed1649(); | 718 o.metricValues = buildUnnamed1670(); |
| 396 } | 719 } |
| 397 buildCounterMetricValueSet--; | 720 buildCounterMetricValueSet--; |
| 398 return o; | 721 return o; |
| 399 } | 722 } |
| 400 | 723 |
| 401 checkMetricValueSet(api.MetricValueSet o) { | 724 checkMetricValueSet(api.MetricValueSet o) { |
| 402 buildCounterMetricValueSet++; | 725 buildCounterMetricValueSet++; |
| 403 if (buildCounterMetricValueSet < 3) { | 726 if (buildCounterMetricValueSet < 3) { |
| 404 unittest.expect(o.metricName, unittest.equals('foo')); | 727 unittest.expect(o.metricName, unittest.equals('foo')); |
| 405 checkUnnamed1649(o.metricValues); | 728 checkUnnamed1670(o.metricValues); |
| 406 } | 729 } |
| 407 buildCounterMetricValueSet--; | 730 buildCounterMetricValueSet--; |
| 408 } | 731 } |
| 409 | 732 |
| 410 buildUnnamed1650() { | 733 core.int buildCounterMoney = 0; |
| 734 buildMoney() { |
| 735 var o = new api.Money(); |
| 736 buildCounterMoney++; |
| 737 if (buildCounterMoney < 3) { |
| 738 o.currencyCode = "foo"; |
| 739 o.nanos = 42; |
| 740 o.units = "foo"; |
| 741 } |
| 742 buildCounterMoney--; |
| 743 return o; |
| 744 } |
| 745 |
| 746 checkMoney(api.Money o) { |
| 747 buildCounterMoney++; |
| 748 if (buildCounterMoney < 3) { |
| 749 unittest.expect(o.currencyCode, unittest.equals('foo')); |
| 750 unittest.expect(o.nanos, unittest.equals(42)); |
| 751 unittest.expect(o.units, unittest.equals('foo')); |
| 752 } |
| 753 buildCounterMoney--; |
| 754 } |
| 755 |
| 756 buildUnnamed1671() { |
| 411 var o = new core.Map<core.String, core.String>(); | 757 var o = new core.Map<core.String, core.String>(); |
| 412 o["x"] = "foo"; | 758 o["x"] = "foo"; |
| 413 o["y"] = "foo"; | 759 o["y"] = "foo"; |
| 414 return o; | 760 return o; |
| 415 } | 761 } |
| 416 | 762 |
| 417 checkUnnamed1650(core.Map<core.String, core.String> o) { | 763 checkUnnamed1671(core.Map<core.String, core.String> o) { |
| 418 unittest.expect(o, unittest.hasLength(2)); | 764 unittest.expect(o, unittest.hasLength(2)); |
| 419 unittest.expect(o["x"], unittest.equals('foo')); | 765 unittest.expect(o["x"], unittest.equals('foo')); |
| 420 unittest.expect(o["y"], unittest.equals('foo')); | 766 unittest.expect(o["y"], unittest.equals('foo')); |
| 421 } | 767 } |
| 422 | 768 |
| 423 buildUnnamed1651() { | 769 buildUnnamed1672() { |
| 424 var o = new core.List<api.LogEntry>(); | 770 var o = new core.List<api.LogEntry>(); |
| 425 o.add(buildLogEntry()); | 771 o.add(buildLogEntry()); |
| 426 o.add(buildLogEntry()); | 772 o.add(buildLogEntry()); |
| 427 return o; | 773 return o; |
| 428 } | 774 } |
| 429 | 775 |
| 430 checkUnnamed1651(core.List<api.LogEntry> o) { | 776 checkUnnamed1672(core.List<api.LogEntry> o) { |
| 431 unittest.expect(o, unittest.hasLength(2)); | 777 unittest.expect(o, unittest.hasLength(2)); |
| 432 checkLogEntry(o[0]); | 778 checkLogEntry(o[0]); |
| 433 checkLogEntry(o[1]); | 779 checkLogEntry(o[1]); |
| 434 } | 780 } |
| 435 | 781 |
| 436 buildUnnamed1652() { | 782 buildUnnamed1673() { |
| 437 var o = new core.List<api.MetricValueSet>(); | 783 var o = new core.List<api.MetricValueSet>(); |
| 438 o.add(buildMetricValueSet()); | 784 o.add(buildMetricValueSet()); |
| 439 o.add(buildMetricValueSet()); | 785 o.add(buildMetricValueSet()); |
| 440 return o; | 786 return o; |
| 441 } | 787 } |
| 442 | 788 |
| 443 checkUnnamed1652(core.List<api.MetricValueSet> o) { | 789 checkUnnamed1673(core.List<api.MetricValueSet> o) { |
| 444 unittest.expect(o, unittest.hasLength(2)); | 790 unittest.expect(o, unittest.hasLength(2)); |
| 445 checkMetricValueSet(o[0]); | 791 checkMetricValueSet(o[0]); |
| 446 checkMetricValueSet(o[1]); | 792 checkMetricValueSet(o[1]); |
| 447 } | 793 } |
| 448 | 794 |
| 795 buildUnnamed1674() { |
| 796 var o = new core.Map<core.String, core.String>(); |
| 797 o["x"] = "foo"; |
| 798 o["y"] = "foo"; |
| 799 return o; |
| 800 } |
| 801 |
| 802 checkUnnamed1674(core.Map<core.String, core.String> o) { |
| 803 unittest.expect(o, unittest.hasLength(2)); |
| 804 unittest.expect(o["x"], unittest.equals('foo')); |
| 805 unittest.expect(o["y"], unittest.equals('foo')); |
| 806 } |
| 807 |
| 449 core.int buildCounterOperation = 0; | 808 core.int buildCounterOperation = 0; |
| 450 buildOperation() { | 809 buildOperation() { |
| 451 var o = new api.Operation(); | 810 var o = new api.Operation(); |
| 452 buildCounterOperation++; | 811 buildCounterOperation++; |
| 453 if (buildCounterOperation < 3) { | 812 if (buildCounterOperation < 3) { |
| 454 o.consumerId = "foo"; | 813 o.consumerId = "foo"; |
| 455 o.endTime = "foo"; | 814 o.endTime = "foo"; |
| 456 o.importance = "foo"; | 815 o.importance = "foo"; |
| 457 o.labels = buildUnnamed1650(); | 816 o.labels = buildUnnamed1671(); |
| 458 o.logEntries = buildUnnamed1651(); | 817 o.logEntries = buildUnnamed1672(); |
| 459 o.metricValueSets = buildUnnamed1652(); | 818 o.metricValueSets = buildUnnamed1673(); |
| 460 o.operationId = "foo"; | 819 o.operationId = "foo"; |
| 461 o.operationName = "foo"; | 820 o.operationName = "foo"; |
| 821 o.quotaProperties = buildQuotaProperties(); |
| 822 o.resourceContainer = "foo"; |
| 462 o.startTime = "foo"; | 823 o.startTime = "foo"; |
| 824 o.userLabels = buildUnnamed1674(); |
| 463 } | 825 } |
| 464 buildCounterOperation--; | 826 buildCounterOperation--; |
| 465 return o; | 827 return o; |
| 466 } | 828 } |
| 467 | 829 |
| 468 checkOperation(api.Operation o) { | 830 checkOperation(api.Operation o) { |
| 469 buildCounterOperation++; | 831 buildCounterOperation++; |
| 470 if (buildCounterOperation < 3) { | 832 if (buildCounterOperation < 3) { |
| 471 unittest.expect(o.consumerId, unittest.equals('foo')); | 833 unittest.expect(o.consumerId, unittest.equals('foo')); |
| 472 unittest.expect(o.endTime, unittest.equals('foo')); | 834 unittest.expect(o.endTime, unittest.equals('foo')); |
| 473 unittest.expect(o.importance, unittest.equals('foo')); | 835 unittest.expect(o.importance, unittest.equals('foo')); |
| 474 checkUnnamed1650(o.labels); | 836 checkUnnamed1671(o.labels); |
| 475 checkUnnamed1651(o.logEntries); | 837 checkUnnamed1672(o.logEntries); |
| 476 checkUnnamed1652(o.metricValueSets); | 838 checkUnnamed1673(o.metricValueSets); |
| 477 unittest.expect(o.operationId, unittest.equals('foo')); | 839 unittest.expect(o.operationId, unittest.equals('foo')); |
| 478 unittest.expect(o.operationName, unittest.equals('foo')); | 840 unittest.expect(o.operationName, unittest.equals('foo')); |
| 841 checkQuotaProperties(o.quotaProperties); |
| 842 unittest.expect(o.resourceContainer, unittest.equals('foo')); |
| 479 unittest.expect(o.startTime, unittest.equals('foo')); | 843 unittest.expect(o.startTime, unittest.equals('foo')); |
| 844 checkUnnamed1674(o.userLabels); |
| 480 } | 845 } |
| 481 buildCounterOperation--; | 846 buildCounterOperation--; |
| 482 } | 847 } |
| 483 | 848 |
| 849 core.int buildCounterQuotaError = 0; |
| 850 buildQuotaError() { |
| 851 var o = new api.QuotaError(); |
| 852 buildCounterQuotaError++; |
| 853 if (buildCounterQuotaError < 3) { |
| 854 o.code = "foo"; |
| 855 o.description = "foo"; |
| 856 o.subject = "foo"; |
| 857 } |
| 858 buildCounterQuotaError--; |
| 859 return o; |
| 860 } |
| 861 |
| 862 checkQuotaError(api.QuotaError o) { |
| 863 buildCounterQuotaError++; |
| 864 if (buildCounterQuotaError < 3) { |
| 865 unittest.expect(o.code, unittest.equals('foo')); |
| 866 unittest.expect(o.description, unittest.equals('foo')); |
| 867 unittest.expect(o.subject, unittest.equals('foo')); |
| 868 } |
| 869 buildCounterQuotaError--; |
| 870 } |
| 871 |
| 872 buildUnnamed1675() { |
| 873 var o = new core.List<core.String>(); |
| 874 o.add("foo"); |
| 875 o.add("foo"); |
| 876 return o; |
| 877 } |
| 878 |
| 879 checkUnnamed1675(core.List<core.String> o) { |
| 880 unittest.expect(o, unittest.hasLength(2)); |
| 881 unittest.expect(o[0], unittest.equals('foo')); |
| 882 unittest.expect(o[1], unittest.equals('foo')); |
| 883 } |
| 884 |
| 885 buildUnnamed1676() { |
| 886 var o = new core.Map<core.String, core.int>(); |
| 887 o["x"] = 42; |
| 888 o["y"] = 42; |
| 889 return o; |
| 890 } |
| 891 |
| 892 checkUnnamed1676(core.Map<core.String, core.int> o) { |
| 893 unittest.expect(o, unittest.hasLength(2)); |
| 894 unittest.expect(o["x"], unittest.equals(42)); |
| 895 unittest.expect(o["y"], unittest.equals(42)); |
| 896 } |
| 897 |
| 898 buildUnnamed1677() { |
| 899 var o = new core.List<api.MetricValueSet>(); |
| 900 o.add(buildMetricValueSet()); |
| 901 o.add(buildMetricValueSet()); |
| 902 return o; |
| 903 } |
| 904 |
| 905 checkUnnamed1677(core.List<api.MetricValueSet> o) { |
| 906 unittest.expect(o, unittest.hasLength(2)); |
| 907 checkMetricValueSet(o[0]); |
| 908 checkMetricValueSet(o[1]); |
| 909 } |
| 910 |
| 911 core.int buildCounterQuotaInfo = 0; |
| 912 buildQuotaInfo() { |
| 913 var o = new api.QuotaInfo(); |
| 914 buildCounterQuotaInfo++; |
| 915 if (buildCounterQuotaInfo < 3) { |
| 916 o.limitExceeded = buildUnnamed1675(); |
| 917 o.quotaConsumed = buildUnnamed1676(); |
| 918 o.quotaMetrics = buildUnnamed1677(); |
| 919 } |
| 920 buildCounterQuotaInfo--; |
| 921 return o; |
| 922 } |
| 923 |
| 924 checkQuotaInfo(api.QuotaInfo o) { |
| 925 buildCounterQuotaInfo++; |
| 926 if (buildCounterQuotaInfo < 3) { |
| 927 checkUnnamed1675(o.limitExceeded); |
| 928 checkUnnamed1676(o.quotaConsumed); |
| 929 checkUnnamed1677(o.quotaMetrics); |
| 930 } |
| 931 buildCounterQuotaInfo--; |
| 932 } |
| 933 |
| 934 buildUnnamed1678() { |
| 935 var o = new core.Map<core.String, core.String>(); |
| 936 o["x"] = "foo"; |
| 937 o["y"] = "foo"; |
| 938 return o; |
| 939 } |
| 940 |
| 941 checkUnnamed1678(core.Map<core.String, core.String> o) { |
| 942 unittest.expect(o, unittest.hasLength(2)); |
| 943 unittest.expect(o["x"], unittest.equals('foo')); |
| 944 unittest.expect(o["y"], unittest.equals('foo')); |
| 945 } |
| 946 |
| 947 buildUnnamed1679() { |
| 948 var o = new core.List<api.MetricValueSet>(); |
| 949 o.add(buildMetricValueSet()); |
| 950 o.add(buildMetricValueSet()); |
| 951 return o; |
| 952 } |
| 953 |
| 954 checkUnnamed1679(core.List<api.MetricValueSet> o) { |
| 955 unittest.expect(o, unittest.hasLength(2)); |
| 956 checkMetricValueSet(o[0]); |
| 957 checkMetricValueSet(o[1]); |
| 958 } |
| 959 |
| 960 core.int buildCounterQuotaOperation = 0; |
| 961 buildQuotaOperation() { |
| 962 var o = new api.QuotaOperation(); |
| 963 buildCounterQuotaOperation++; |
| 964 if (buildCounterQuotaOperation < 3) { |
| 965 o.consumerId = "foo"; |
| 966 o.labels = buildUnnamed1678(); |
| 967 o.methodName = "foo"; |
| 968 o.operationId = "foo"; |
| 969 o.quotaMetrics = buildUnnamed1679(); |
| 970 o.quotaMode = "foo"; |
| 971 } |
| 972 buildCounterQuotaOperation--; |
| 973 return o; |
| 974 } |
| 975 |
| 976 checkQuotaOperation(api.QuotaOperation o) { |
| 977 buildCounterQuotaOperation++; |
| 978 if (buildCounterQuotaOperation < 3) { |
| 979 unittest.expect(o.consumerId, unittest.equals('foo')); |
| 980 checkUnnamed1678(o.labels); |
| 981 unittest.expect(o.methodName, unittest.equals('foo')); |
| 982 unittest.expect(o.operationId, unittest.equals('foo')); |
| 983 checkUnnamed1679(o.quotaMetrics); |
| 984 unittest.expect(o.quotaMode, unittest.equals('foo')); |
| 985 } |
| 986 buildCounterQuotaOperation--; |
| 987 } |
| 988 |
| 989 buildUnnamed1680() { |
| 990 var o = new core.Map<core.String, core.String>(); |
| 991 o["x"] = "foo"; |
| 992 o["y"] = "foo"; |
| 993 return o; |
| 994 } |
| 995 |
| 996 checkUnnamed1680(core.Map<core.String, core.String> o) { |
| 997 unittest.expect(o, unittest.hasLength(2)); |
| 998 unittest.expect(o["x"], unittest.equals('foo')); |
| 999 unittest.expect(o["y"], unittest.equals('foo')); |
| 1000 } |
| 1001 |
| 1002 core.int buildCounterQuotaProperties = 0; |
| 1003 buildQuotaProperties() { |
| 1004 var o = new api.QuotaProperties(); |
| 1005 buildCounterQuotaProperties++; |
| 1006 if (buildCounterQuotaProperties < 3) { |
| 1007 o.limitByIds = buildUnnamed1680(); |
| 1008 o.quotaMode = "foo"; |
| 1009 } |
| 1010 buildCounterQuotaProperties--; |
| 1011 return o; |
| 1012 } |
| 1013 |
| 1014 checkQuotaProperties(api.QuotaProperties o) { |
| 1015 buildCounterQuotaProperties++; |
| 1016 if (buildCounterQuotaProperties < 3) { |
| 1017 checkUnnamed1680(o.limitByIds); |
| 1018 unittest.expect(o.quotaMode, unittest.equals('foo')); |
| 1019 } |
| 1020 buildCounterQuotaProperties--; |
| 1021 } |
| 1022 |
| 1023 core.int buildCounterReleaseQuotaRequest = 0; |
| 1024 buildReleaseQuotaRequest() { |
| 1025 var o = new api.ReleaseQuotaRequest(); |
| 1026 buildCounterReleaseQuotaRequest++; |
| 1027 if (buildCounterReleaseQuotaRequest < 3) { |
| 1028 o.releaseOperation = buildQuotaOperation(); |
| 1029 o.serviceConfigId = "foo"; |
| 1030 } |
| 1031 buildCounterReleaseQuotaRequest--; |
| 1032 return o; |
| 1033 } |
| 1034 |
| 1035 checkReleaseQuotaRequest(api.ReleaseQuotaRequest o) { |
| 1036 buildCounterReleaseQuotaRequest++; |
| 1037 if (buildCounterReleaseQuotaRequest < 3) { |
| 1038 checkQuotaOperation(o.releaseOperation); |
| 1039 unittest.expect(o.serviceConfigId, unittest.equals('foo')); |
| 1040 } |
| 1041 buildCounterReleaseQuotaRequest--; |
| 1042 } |
| 1043 |
| 1044 buildUnnamed1681() { |
| 1045 var o = new core.List<api.MetricValueSet>(); |
| 1046 o.add(buildMetricValueSet()); |
| 1047 o.add(buildMetricValueSet()); |
| 1048 return o; |
| 1049 } |
| 1050 |
| 1051 checkUnnamed1681(core.List<api.MetricValueSet> o) { |
| 1052 unittest.expect(o, unittest.hasLength(2)); |
| 1053 checkMetricValueSet(o[0]); |
| 1054 checkMetricValueSet(o[1]); |
| 1055 } |
| 1056 |
| 1057 buildUnnamed1682() { |
| 1058 var o = new core.List<api.QuotaError>(); |
| 1059 o.add(buildQuotaError()); |
| 1060 o.add(buildQuotaError()); |
| 1061 return o; |
| 1062 } |
| 1063 |
| 1064 checkUnnamed1682(core.List<api.QuotaError> o) { |
| 1065 unittest.expect(o, unittest.hasLength(2)); |
| 1066 checkQuotaError(o[0]); |
| 1067 checkQuotaError(o[1]); |
| 1068 } |
| 1069 |
| 1070 core.int buildCounterReleaseQuotaResponse = 0; |
| 1071 buildReleaseQuotaResponse() { |
| 1072 var o = new api.ReleaseQuotaResponse(); |
| 1073 buildCounterReleaseQuotaResponse++; |
| 1074 if (buildCounterReleaseQuotaResponse < 3) { |
| 1075 o.operationId = "foo"; |
| 1076 o.quotaMetrics = buildUnnamed1681(); |
| 1077 o.releaseErrors = buildUnnamed1682(); |
| 1078 o.serviceConfigId = "foo"; |
| 1079 } |
| 1080 buildCounterReleaseQuotaResponse--; |
| 1081 return o; |
| 1082 } |
| 1083 |
| 1084 checkReleaseQuotaResponse(api.ReleaseQuotaResponse o) { |
| 1085 buildCounterReleaseQuotaResponse++; |
| 1086 if (buildCounterReleaseQuotaResponse < 3) { |
| 1087 unittest.expect(o.operationId, unittest.equals('foo')); |
| 1088 checkUnnamed1681(o.quotaMetrics); |
| 1089 checkUnnamed1682(o.releaseErrors); |
| 1090 unittest.expect(o.serviceConfigId, unittest.equals('foo')); |
| 1091 } |
| 1092 buildCounterReleaseQuotaResponse--; |
| 1093 } |
| 1094 |
| 484 core.int buildCounterReportError = 0; | 1095 core.int buildCounterReportError = 0; |
| 485 buildReportError() { | 1096 buildReportError() { |
| 486 var o = new api.ReportError(); | 1097 var o = new api.ReportError(); |
| 487 buildCounterReportError++; | 1098 buildCounterReportError++; |
| 488 if (buildCounterReportError < 3) { | 1099 if (buildCounterReportError < 3) { |
| 489 o.operationId = "foo"; | 1100 o.operationId = "foo"; |
| 490 o.status = buildStatus(); | 1101 o.status = buildStatus(); |
| 491 } | 1102 } |
| 492 buildCounterReportError--; | 1103 buildCounterReportError--; |
| 493 return o; | 1104 return o; |
| 494 } | 1105 } |
| 495 | 1106 |
| 496 checkReportError(api.ReportError o) { | 1107 checkReportError(api.ReportError o) { |
| 497 buildCounterReportError++; | 1108 buildCounterReportError++; |
| 498 if (buildCounterReportError < 3) { | 1109 if (buildCounterReportError < 3) { |
| 499 unittest.expect(o.operationId, unittest.equals('foo')); | 1110 unittest.expect(o.operationId, unittest.equals('foo')); |
| 500 checkStatus(o.status); | 1111 checkStatus(o.status); |
| 501 } | 1112 } |
| 502 buildCounterReportError--; | 1113 buildCounterReportError--; |
| 503 } | 1114 } |
| 504 | 1115 |
| 505 buildUnnamed1653() { | 1116 core.int buildCounterReportInfo = 0; |
| 1117 buildReportInfo() { |
| 1118 var o = new api.ReportInfo(); |
| 1119 buildCounterReportInfo++; |
| 1120 if (buildCounterReportInfo < 3) { |
| 1121 o.operationId = "foo"; |
| 1122 o.quotaInfo = buildQuotaInfo(); |
| 1123 } |
| 1124 buildCounterReportInfo--; |
| 1125 return o; |
| 1126 } |
| 1127 |
| 1128 checkReportInfo(api.ReportInfo o) { |
| 1129 buildCounterReportInfo++; |
| 1130 if (buildCounterReportInfo < 3) { |
| 1131 unittest.expect(o.operationId, unittest.equals('foo')); |
| 1132 checkQuotaInfo(o.quotaInfo); |
| 1133 } |
| 1134 buildCounterReportInfo--; |
| 1135 } |
| 1136 |
| 1137 buildUnnamed1683() { |
| 506 var o = new core.List<api.Operation>(); | 1138 var o = new core.List<api.Operation>(); |
| 507 o.add(buildOperation()); | 1139 o.add(buildOperation()); |
| 508 o.add(buildOperation()); | 1140 o.add(buildOperation()); |
| 509 return o; | 1141 return o; |
| 510 } | 1142 } |
| 511 | 1143 |
| 512 checkUnnamed1653(core.List<api.Operation> o) { | 1144 checkUnnamed1683(core.List<api.Operation> o) { |
| 513 unittest.expect(o, unittest.hasLength(2)); | 1145 unittest.expect(o, unittest.hasLength(2)); |
| 514 checkOperation(o[0]); | 1146 checkOperation(o[0]); |
| 515 checkOperation(o[1]); | 1147 checkOperation(o[1]); |
| 516 } | 1148 } |
| 517 | 1149 |
| 518 core.int buildCounterReportRequest = 0; | 1150 core.int buildCounterReportRequest = 0; |
| 519 buildReportRequest() { | 1151 buildReportRequest() { |
| 520 var o = new api.ReportRequest(); | 1152 var o = new api.ReportRequest(); |
| 521 buildCounterReportRequest++; | 1153 buildCounterReportRequest++; |
| 522 if (buildCounterReportRequest < 3) { | 1154 if (buildCounterReportRequest < 3) { |
| 523 o.operations = buildUnnamed1653(); | 1155 o.operations = buildUnnamed1683(); |
| 524 o.serviceConfigId = "foo"; | 1156 o.serviceConfigId = "foo"; |
| 525 } | 1157 } |
| 526 buildCounterReportRequest--; | 1158 buildCounterReportRequest--; |
| 527 return o; | 1159 return o; |
| 528 } | 1160 } |
| 529 | 1161 |
| 530 checkReportRequest(api.ReportRequest o) { | 1162 checkReportRequest(api.ReportRequest o) { |
| 531 buildCounterReportRequest++; | 1163 buildCounterReportRequest++; |
| 532 if (buildCounterReportRequest < 3) { | 1164 if (buildCounterReportRequest < 3) { |
| 533 checkUnnamed1653(o.operations); | 1165 checkUnnamed1683(o.operations); |
| 534 unittest.expect(o.serviceConfigId, unittest.equals('foo')); | 1166 unittest.expect(o.serviceConfigId, unittest.equals('foo')); |
| 535 } | 1167 } |
| 536 buildCounterReportRequest--; | 1168 buildCounterReportRequest--; |
| 537 } | 1169 } |
| 538 | 1170 |
| 539 buildUnnamed1654() { | 1171 buildUnnamed1684() { |
| 540 var o = new core.List<api.ReportError>(); | 1172 var o = new core.List<api.ReportError>(); |
| 541 o.add(buildReportError()); | 1173 o.add(buildReportError()); |
| 542 o.add(buildReportError()); | 1174 o.add(buildReportError()); |
| 543 return o; | 1175 return o; |
| 544 } | 1176 } |
| 545 | 1177 |
| 546 checkUnnamed1654(core.List<api.ReportError> o) { | 1178 checkUnnamed1684(core.List<api.ReportError> o) { |
| 547 unittest.expect(o, unittest.hasLength(2)); | 1179 unittest.expect(o, unittest.hasLength(2)); |
| 548 checkReportError(o[0]); | 1180 checkReportError(o[0]); |
| 549 checkReportError(o[1]); | 1181 checkReportError(o[1]); |
| 550 } | 1182 } |
| 551 | 1183 |
| 1184 buildUnnamed1685() { |
| 1185 var o = new core.List<api.ReportInfo>(); |
| 1186 o.add(buildReportInfo()); |
| 1187 o.add(buildReportInfo()); |
| 1188 return o; |
| 1189 } |
| 1190 |
| 1191 checkUnnamed1685(core.List<api.ReportInfo> o) { |
| 1192 unittest.expect(o, unittest.hasLength(2)); |
| 1193 checkReportInfo(o[0]); |
| 1194 checkReportInfo(o[1]); |
| 1195 } |
| 1196 |
| 552 core.int buildCounterReportResponse = 0; | 1197 core.int buildCounterReportResponse = 0; |
| 553 buildReportResponse() { | 1198 buildReportResponse() { |
| 554 var o = new api.ReportResponse(); | 1199 var o = new api.ReportResponse(); |
| 555 buildCounterReportResponse++; | 1200 buildCounterReportResponse++; |
| 556 if (buildCounterReportResponse < 3) { | 1201 if (buildCounterReportResponse < 3) { |
| 557 o.reportErrors = buildUnnamed1654(); | 1202 o.reportErrors = buildUnnamed1684(); |
| 1203 o.reportInfos = buildUnnamed1685(); |
| 558 o.serviceConfigId = "foo"; | 1204 o.serviceConfigId = "foo"; |
| 559 } | 1205 } |
| 560 buildCounterReportResponse--; | 1206 buildCounterReportResponse--; |
| 561 return o; | 1207 return o; |
| 562 } | 1208 } |
| 563 | 1209 |
| 564 checkReportResponse(api.ReportResponse o) { | 1210 checkReportResponse(api.ReportResponse o) { |
| 565 buildCounterReportResponse++; | 1211 buildCounterReportResponse++; |
| 566 if (buildCounterReportResponse < 3) { | 1212 if (buildCounterReportResponse < 3) { |
| 567 checkUnnamed1654(o.reportErrors); | 1213 checkUnnamed1684(o.reportErrors); |
| 1214 checkUnnamed1685(o.reportInfos); |
| 568 unittest.expect(o.serviceConfigId, unittest.equals('foo')); | 1215 unittest.expect(o.serviceConfigId, unittest.equals('foo')); |
| 569 } | 1216 } |
| 570 buildCounterReportResponse--; | 1217 buildCounterReportResponse--; |
| 571 } | 1218 } |
| 572 | 1219 |
| 573 buildUnnamed1655() { | 1220 core.int buildCounterRequestMetadata = 0; |
| 1221 buildRequestMetadata() { |
| 1222 var o = new api.RequestMetadata(); |
| 1223 buildCounterRequestMetadata++; |
| 1224 if (buildCounterRequestMetadata < 3) { |
| 1225 o.callerIp = "foo"; |
| 1226 o.callerSuppliedUserAgent = "foo"; |
| 1227 } |
| 1228 buildCounterRequestMetadata--; |
| 1229 return o; |
| 1230 } |
| 1231 |
| 1232 checkRequestMetadata(api.RequestMetadata o) { |
| 1233 buildCounterRequestMetadata++; |
| 1234 if (buildCounterRequestMetadata < 3) { |
| 1235 unittest.expect(o.callerIp, unittest.equals('foo')); |
| 1236 unittest.expect(o.callerSuppliedUserAgent, unittest.equals('foo')); |
| 1237 } |
| 1238 buildCounterRequestMetadata--; |
| 1239 } |
| 1240 |
| 1241 core.int buildCounterStartReconciliationRequest = 0; |
| 1242 buildStartReconciliationRequest() { |
| 1243 var o = new api.StartReconciliationRequest(); |
| 1244 buildCounterStartReconciliationRequest++; |
| 1245 if (buildCounterStartReconciliationRequest < 3) { |
| 1246 o.reconciliationOperation = buildQuotaOperation(); |
| 1247 o.serviceConfigId = "foo"; |
| 1248 } |
| 1249 buildCounterStartReconciliationRequest--; |
| 1250 return o; |
| 1251 } |
| 1252 |
| 1253 checkStartReconciliationRequest(api.StartReconciliationRequest o) { |
| 1254 buildCounterStartReconciliationRequest++; |
| 1255 if (buildCounterStartReconciliationRequest < 3) { |
| 1256 checkQuotaOperation(o.reconciliationOperation); |
| 1257 unittest.expect(o.serviceConfigId, unittest.equals('foo')); |
| 1258 } |
| 1259 buildCounterStartReconciliationRequest--; |
| 1260 } |
| 1261 |
| 1262 buildUnnamed1686() { |
| 1263 var o = new core.List<api.MetricValueSet>(); |
| 1264 o.add(buildMetricValueSet()); |
| 1265 o.add(buildMetricValueSet()); |
| 1266 return o; |
| 1267 } |
| 1268 |
| 1269 checkUnnamed1686(core.List<api.MetricValueSet> o) { |
| 1270 unittest.expect(o, unittest.hasLength(2)); |
| 1271 checkMetricValueSet(o[0]); |
| 1272 checkMetricValueSet(o[1]); |
| 1273 } |
| 1274 |
| 1275 buildUnnamed1687() { |
| 1276 var o = new core.List<api.QuotaError>(); |
| 1277 o.add(buildQuotaError()); |
| 1278 o.add(buildQuotaError()); |
| 1279 return o; |
| 1280 } |
| 1281 |
| 1282 checkUnnamed1687(core.List<api.QuotaError> o) { |
| 1283 unittest.expect(o, unittest.hasLength(2)); |
| 1284 checkQuotaError(o[0]); |
| 1285 checkQuotaError(o[1]); |
| 1286 } |
| 1287 |
| 1288 core.int buildCounterStartReconciliationResponse = 0; |
| 1289 buildStartReconciliationResponse() { |
| 1290 var o = new api.StartReconciliationResponse(); |
| 1291 buildCounterStartReconciliationResponse++; |
| 1292 if (buildCounterStartReconciliationResponse < 3) { |
| 1293 o.operationId = "foo"; |
| 1294 o.quotaMetrics = buildUnnamed1686(); |
| 1295 o.reconciliationErrors = buildUnnamed1687(); |
| 1296 o.serviceConfigId = "foo"; |
| 1297 } |
| 1298 buildCounterStartReconciliationResponse--; |
| 1299 return o; |
| 1300 } |
| 1301 |
| 1302 checkStartReconciliationResponse(api.StartReconciliationResponse o) { |
| 1303 buildCounterStartReconciliationResponse++; |
| 1304 if (buildCounterStartReconciliationResponse < 3) { |
| 1305 unittest.expect(o.operationId, unittest.equals('foo')); |
| 1306 checkUnnamed1686(o.quotaMetrics); |
| 1307 checkUnnamed1687(o.reconciliationErrors); |
| 1308 unittest.expect(o.serviceConfigId, unittest.equals('foo')); |
| 1309 } |
| 1310 buildCounterStartReconciliationResponse--; |
| 1311 } |
| 1312 |
| 1313 buildUnnamed1688() { |
| 574 var o = new core.Map<core.String, core.Object>(); | 1314 var o = new core.Map<core.String, core.Object>(); |
| 575 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 1315 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; |
| 576 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 1316 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; |
| 577 return o; | 1317 return o; |
| 578 } | 1318 } |
| 579 | 1319 |
| 580 checkUnnamed1655(core.Map<core.String, core.Object> o) { | 1320 checkUnnamed1688(core.Map<core.String, core.Object> o) { |
| 581 unittest.expect(o, unittest.hasLength(2)); | 1321 unittest.expect(o, unittest.hasLength(2)); |
| 582 var casted5 = (o["x"]) as core.Map; unittest.expect(casted5, unittest.hasLengt
h(3)); unittest.expect(casted5["list"], unittest.equals([1, 2, 3])); unittest.ex
pect(casted5["bool"], unittest.equals(true)); unittest.expect(casted5["string"],
unittest.equals('foo')); | 1322 var casted11 = (o["x"]) as core.Map; unittest.expect(casted11, unittest.hasLen
gth(3)); unittest.expect(casted11["list"], unittest.equals([1, 2, 3])); unittest
.expect(casted11["bool"], unittest.equals(true)); unittest.expect(casted11["stri
ng"], unittest.equals('foo')); |
| 583 var casted6 = (o["y"]) as core.Map; unittest.expect(casted6, unittest.hasLengt
h(3)); unittest.expect(casted6["list"], unittest.equals([1, 2, 3])); unittest.ex
pect(casted6["bool"], unittest.equals(true)); unittest.expect(casted6["string"],
unittest.equals('foo')); | 1323 var casted12 = (o["y"]) as core.Map; unittest.expect(casted12, unittest.hasLen
gth(3)); unittest.expect(casted12["list"], unittest.equals([1, 2, 3])); unittest
.expect(casted12["bool"], unittest.equals(true)); unittest.expect(casted12["stri
ng"], unittest.equals('foo')); |
| 584 } | 1324 } |
| 585 | 1325 |
| 586 buildUnnamed1656() { | 1326 buildUnnamed1689() { |
| 587 var o = new core.List<core.Map<core.String, core.Object>>(); | 1327 var o = new core.List<core.Map<core.String, core.Object>>(); |
| 588 o.add(buildUnnamed1655()); | 1328 o.add(buildUnnamed1688()); |
| 589 o.add(buildUnnamed1655()); | 1329 o.add(buildUnnamed1688()); |
| 590 return o; | 1330 return o; |
| 591 } | 1331 } |
| 592 | 1332 |
| 593 checkUnnamed1656(core.List<core.Map<core.String, core.Object>> o) { | 1333 checkUnnamed1689(core.List<core.Map<core.String, core.Object>> o) { |
| 594 unittest.expect(o, unittest.hasLength(2)); | 1334 unittest.expect(o, unittest.hasLength(2)); |
| 595 checkUnnamed1655(o[0]); | 1335 checkUnnamed1688(o[0]); |
| 596 checkUnnamed1655(o[1]); | 1336 checkUnnamed1688(o[1]); |
| 597 } | 1337 } |
| 598 | 1338 |
| 599 core.int buildCounterStatus = 0; | 1339 core.int buildCounterStatus = 0; |
| 600 buildStatus() { | 1340 buildStatus() { |
| 601 var o = new api.Status(); | 1341 var o = new api.Status(); |
| 602 buildCounterStatus++; | 1342 buildCounterStatus++; |
| 603 if (buildCounterStatus < 3) { | 1343 if (buildCounterStatus < 3) { |
| 604 o.code = 42; | 1344 o.code = 42; |
| 605 o.details = buildUnnamed1656(); | 1345 o.details = buildUnnamed1689(); |
| 606 o.message = "foo"; | 1346 o.message = "foo"; |
| 607 } | 1347 } |
| 608 buildCounterStatus--; | 1348 buildCounterStatus--; |
| 609 return o; | 1349 return o; |
| 610 } | 1350 } |
| 611 | 1351 |
| 612 checkStatus(api.Status o) { | 1352 checkStatus(api.Status o) { |
| 613 buildCounterStatus++; | 1353 buildCounterStatus++; |
| 614 if (buildCounterStatus < 3) { | 1354 if (buildCounterStatus < 3) { |
| 615 unittest.expect(o.code, unittest.equals(42)); | 1355 unittest.expect(o.code, unittest.equals(42)); |
| 616 checkUnnamed1656(o.details); | 1356 checkUnnamed1689(o.details); |
| 617 unittest.expect(o.message, unittest.equals('foo')); | 1357 unittest.expect(o.message, unittest.equals('foo')); |
| 618 } | 1358 } |
| 619 buildCounterStatus--; | 1359 buildCounterStatus--; |
| 620 } | 1360 } |
| 621 | 1361 |
| 622 | 1362 |
| 623 main() { | 1363 main() { |
| 1364 unittest.group("obj-schema-AllocateQuotaRequest", () { |
| 1365 unittest.test("to-json--from-json", () { |
| 1366 var o = buildAllocateQuotaRequest(); |
| 1367 var od = new api.AllocateQuotaRequest.fromJson(o.toJson()); |
| 1368 checkAllocateQuotaRequest(od); |
| 1369 }); |
| 1370 }); |
| 1371 |
| 1372 |
| 1373 unittest.group("obj-schema-AllocateQuotaResponse", () { |
| 1374 unittest.test("to-json--from-json", () { |
| 1375 var o = buildAllocateQuotaResponse(); |
| 1376 var od = new api.AllocateQuotaResponse.fromJson(o.toJson()); |
| 1377 checkAllocateQuotaResponse(od); |
| 1378 }); |
| 1379 }); |
| 1380 |
| 1381 |
| 1382 unittest.group("obj-schema-AuditLog", () { |
| 1383 unittest.test("to-json--from-json", () { |
| 1384 var o = buildAuditLog(); |
| 1385 var od = new api.AuditLog.fromJson(o.toJson()); |
| 1386 checkAuditLog(od); |
| 1387 }); |
| 1388 }); |
| 1389 |
| 1390 |
| 1391 unittest.group("obj-schema-AuthenticationInfo", () { |
| 1392 unittest.test("to-json--from-json", () { |
| 1393 var o = buildAuthenticationInfo(); |
| 1394 var od = new api.AuthenticationInfo.fromJson(o.toJson()); |
| 1395 checkAuthenticationInfo(od); |
| 1396 }); |
| 1397 }); |
| 1398 |
| 1399 |
| 1400 unittest.group("obj-schema-AuthorizationInfo", () { |
| 1401 unittest.test("to-json--from-json", () { |
| 1402 var o = buildAuthorizationInfo(); |
| 1403 var od = new api.AuthorizationInfo.fromJson(o.toJson()); |
| 1404 checkAuthorizationInfo(od); |
| 1405 }); |
| 1406 }); |
| 1407 |
| 1408 |
| 624 unittest.group("obj-schema-CheckError", () { | 1409 unittest.group("obj-schema-CheckError", () { |
| 625 unittest.test("to-json--from-json", () { | 1410 unittest.test("to-json--from-json", () { |
| 626 var o = buildCheckError(); | 1411 var o = buildCheckError(); |
| 627 var od = new api.CheckError.fromJson(o.toJson()); | 1412 var od = new api.CheckError.fromJson(o.toJson()); |
| 628 checkCheckError(od); | 1413 checkCheckError(od); |
| 629 }); | 1414 }); |
| 630 }); | 1415 }); |
| 631 | 1416 |
| 632 | 1417 |
| 1418 unittest.group("obj-schema-CheckInfo", () { |
| 1419 unittest.test("to-json--from-json", () { |
| 1420 var o = buildCheckInfo(); |
| 1421 var od = new api.CheckInfo.fromJson(o.toJson()); |
| 1422 checkCheckInfo(od); |
| 1423 }); |
| 1424 }); |
| 1425 |
| 1426 |
| 633 unittest.group("obj-schema-CheckRequest", () { | 1427 unittest.group("obj-schema-CheckRequest", () { |
| 634 unittest.test("to-json--from-json", () { | 1428 unittest.test("to-json--from-json", () { |
| 635 var o = buildCheckRequest(); | 1429 var o = buildCheckRequest(); |
| 636 var od = new api.CheckRequest.fromJson(o.toJson()); | 1430 var od = new api.CheckRequest.fromJson(o.toJson()); |
| 637 checkCheckRequest(od); | 1431 checkCheckRequest(od); |
| 638 }); | 1432 }); |
| 639 }); | 1433 }); |
| 640 | 1434 |
| 641 | 1435 |
| 642 unittest.group("obj-schema-CheckResponse", () { | 1436 unittest.group("obj-schema-CheckResponse", () { |
| 643 unittest.test("to-json--from-json", () { | 1437 unittest.test("to-json--from-json", () { |
| 644 var o = buildCheckResponse(); | 1438 var o = buildCheckResponse(); |
| 645 var od = new api.CheckResponse.fromJson(o.toJson()); | 1439 var od = new api.CheckResponse.fromJson(o.toJson()); |
| 646 checkCheckResponse(od); | 1440 checkCheckResponse(od); |
| 647 }); | 1441 }); |
| 648 }); | 1442 }); |
| 649 | 1443 |
| 650 | 1444 |
| 651 unittest.group("obj-schema-Distribution", () { | 1445 unittest.group("obj-schema-Distribution", () { |
| 652 unittest.test("to-json--from-json", () { | 1446 unittest.test("to-json--from-json", () { |
| 653 var o = buildDistribution(); | 1447 var o = buildDistribution(); |
| 654 var od = new api.Distribution.fromJson(o.toJson()); | 1448 var od = new api.Distribution.fromJson(o.toJson()); |
| 655 checkDistribution(od); | 1449 checkDistribution(od); |
| 656 }); | 1450 }); |
| 657 }); | 1451 }); |
| 658 | 1452 |
| 659 | 1453 |
| 1454 unittest.group("obj-schema-EndReconciliationRequest", () { |
| 1455 unittest.test("to-json--from-json", () { |
| 1456 var o = buildEndReconciliationRequest(); |
| 1457 var od = new api.EndReconciliationRequest.fromJson(o.toJson()); |
| 1458 checkEndReconciliationRequest(od); |
| 1459 }); |
| 1460 }); |
| 1461 |
| 1462 |
| 1463 unittest.group("obj-schema-EndReconciliationResponse", () { |
| 1464 unittest.test("to-json--from-json", () { |
| 1465 var o = buildEndReconciliationResponse(); |
| 1466 var od = new api.EndReconciliationResponse.fromJson(o.toJson()); |
| 1467 checkEndReconciliationResponse(od); |
| 1468 }); |
| 1469 }); |
| 1470 |
| 1471 |
| 660 unittest.group("obj-schema-ExplicitBuckets", () { | 1472 unittest.group("obj-schema-ExplicitBuckets", () { |
| 661 unittest.test("to-json--from-json", () { | 1473 unittest.test("to-json--from-json", () { |
| 662 var o = buildExplicitBuckets(); | 1474 var o = buildExplicitBuckets(); |
| 663 var od = new api.ExplicitBuckets.fromJson(o.toJson()); | 1475 var od = new api.ExplicitBuckets.fromJson(o.toJson()); |
| 664 checkExplicitBuckets(od); | 1476 checkExplicitBuckets(od); |
| 665 }); | 1477 }); |
| 666 }); | 1478 }); |
| 667 | 1479 |
| 668 | 1480 |
| 669 unittest.group("obj-schema-ExponentialBuckets", () { | 1481 unittest.group("obj-schema-ExponentialBuckets", () { |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 704 | 1516 |
| 705 unittest.group("obj-schema-MetricValueSet", () { | 1517 unittest.group("obj-schema-MetricValueSet", () { |
| 706 unittest.test("to-json--from-json", () { | 1518 unittest.test("to-json--from-json", () { |
| 707 var o = buildMetricValueSet(); | 1519 var o = buildMetricValueSet(); |
| 708 var od = new api.MetricValueSet.fromJson(o.toJson()); | 1520 var od = new api.MetricValueSet.fromJson(o.toJson()); |
| 709 checkMetricValueSet(od); | 1521 checkMetricValueSet(od); |
| 710 }); | 1522 }); |
| 711 }); | 1523 }); |
| 712 | 1524 |
| 713 | 1525 |
| 1526 unittest.group("obj-schema-Money", () { |
| 1527 unittest.test("to-json--from-json", () { |
| 1528 var o = buildMoney(); |
| 1529 var od = new api.Money.fromJson(o.toJson()); |
| 1530 checkMoney(od); |
| 1531 }); |
| 1532 }); |
| 1533 |
| 1534 |
| 714 unittest.group("obj-schema-Operation", () { | 1535 unittest.group("obj-schema-Operation", () { |
| 715 unittest.test("to-json--from-json", () { | 1536 unittest.test("to-json--from-json", () { |
| 716 var o = buildOperation(); | 1537 var o = buildOperation(); |
| 717 var od = new api.Operation.fromJson(o.toJson()); | 1538 var od = new api.Operation.fromJson(o.toJson()); |
| 718 checkOperation(od); | 1539 checkOperation(od); |
| 719 }); | 1540 }); |
| 720 }); | 1541 }); |
| 721 | 1542 |
| 722 | 1543 |
| 1544 unittest.group("obj-schema-QuotaError", () { |
| 1545 unittest.test("to-json--from-json", () { |
| 1546 var o = buildQuotaError(); |
| 1547 var od = new api.QuotaError.fromJson(o.toJson()); |
| 1548 checkQuotaError(od); |
| 1549 }); |
| 1550 }); |
| 1551 |
| 1552 |
| 1553 unittest.group("obj-schema-QuotaInfo", () { |
| 1554 unittest.test("to-json--from-json", () { |
| 1555 var o = buildQuotaInfo(); |
| 1556 var od = new api.QuotaInfo.fromJson(o.toJson()); |
| 1557 checkQuotaInfo(od); |
| 1558 }); |
| 1559 }); |
| 1560 |
| 1561 |
| 1562 unittest.group("obj-schema-QuotaOperation", () { |
| 1563 unittest.test("to-json--from-json", () { |
| 1564 var o = buildQuotaOperation(); |
| 1565 var od = new api.QuotaOperation.fromJson(o.toJson()); |
| 1566 checkQuotaOperation(od); |
| 1567 }); |
| 1568 }); |
| 1569 |
| 1570 |
| 1571 unittest.group("obj-schema-QuotaProperties", () { |
| 1572 unittest.test("to-json--from-json", () { |
| 1573 var o = buildQuotaProperties(); |
| 1574 var od = new api.QuotaProperties.fromJson(o.toJson()); |
| 1575 checkQuotaProperties(od); |
| 1576 }); |
| 1577 }); |
| 1578 |
| 1579 |
| 1580 unittest.group("obj-schema-ReleaseQuotaRequest", () { |
| 1581 unittest.test("to-json--from-json", () { |
| 1582 var o = buildReleaseQuotaRequest(); |
| 1583 var od = new api.ReleaseQuotaRequest.fromJson(o.toJson()); |
| 1584 checkReleaseQuotaRequest(od); |
| 1585 }); |
| 1586 }); |
| 1587 |
| 1588 |
| 1589 unittest.group("obj-schema-ReleaseQuotaResponse", () { |
| 1590 unittest.test("to-json--from-json", () { |
| 1591 var o = buildReleaseQuotaResponse(); |
| 1592 var od = new api.ReleaseQuotaResponse.fromJson(o.toJson()); |
| 1593 checkReleaseQuotaResponse(od); |
| 1594 }); |
| 1595 }); |
| 1596 |
| 1597 |
| 723 unittest.group("obj-schema-ReportError", () { | 1598 unittest.group("obj-schema-ReportError", () { |
| 724 unittest.test("to-json--from-json", () { | 1599 unittest.test("to-json--from-json", () { |
| 725 var o = buildReportError(); | 1600 var o = buildReportError(); |
| 726 var od = new api.ReportError.fromJson(o.toJson()); | 1601 var od = new api.ReportError.fromJson(o.toJson()); |
| 727 checkReportError(od); | 1602 checkReportError(od); |
| 728 }); | 1603 }); |
| 729 }); | 1604 }); |
| 730 | 1605 |
| 731 | 1606 |
| 1607 unittest.group("obj-schema-ReportInfo", () { |
| 1608 unittest.test("to-json--from-json", () { |
| 1609 var o = buildReportInfo(); |
| 1610 var od = new api.ReportInfo.fromJson(o.toJson()); |
| 1611 checkReportInfo(od); |
| 1612 }); |
| 1613 }); |
| 1614 |
| 1615 |
| 732 unittest.group("obj-schema-ReportRequest", () { | 1616 unittest.group("obj-schema-ReportRequest", () { |
| 733 unittest.test("to-json--from-json", () { | 1617 unittest.test("to-json--from-json", () { |
| 734 var o = buildReportRequest(); | 1618 var o = buildReportRequest(); |
| 735 var od = new api.ReportRequest.fromJson(o.toJson()); | 1619 var od = new api.ReportRequest.fromJson(o.toJson()); |
| 736 checkReportRequest(od); | 1620 checkReportRequest(od); |
| 737 }); | 1621 }); |
| 738 }); | 1622 }); |
| 739 | 1623 |
| 740 | 1624 |
| 741 unittest.group("obj-schema-ReportResponse", () { | 1625 unittest.group("obj-schema-ReportResponse", () { |
| 742 unittest.test("to-json--from-json", () { | 1626 unittest.test("to-json--from-json", () { |
| 743 var o = buildReportResponse(); | 1627 var o = buildReportResponse(); |
| 744 var od = new api.ReportResponse.fromJson(o.toJson()); | 1628 var od = new api.ReportResponse.fromJson(o.toJson()); |
| 745 checkReportResponse(od); | 1629 checkReportResponse(od); |
| 746 }); | 1630 }); |
| 747 }); | 1631 }); |
| 748 | 1632 |
| 749 | 1633 |
| 1634 unittest.group("obj-schema-RequestMetadata", () { |
| 1635 unittest.test("to-json--from-json", () { |
| 1636 var o = buildRequestMetadata(); |
| 1637 var od = new api.RequestMetadata.fromJson(o.toJson()); |
| 1638 checkRequestMetadata(od); |
| 1639 }); |
| 1640 }); |
| 1641 |
| 1642 |
| 1643 unittest.group("obj-schema-StartReconciliationRequest", () { |
| 1644 unittest.test("to-json--from-json", () { |
| 1645 var o = buildStartReconciliationRequest(); |
| 1646 var od = new api.StartReconciliationRequest.fromJson(o.toJson()); |
| 1647 checkStartReconciliationRequest(od); |
| 1648 }); |
| 1649 }); |
| 1650 |
| 1651 |
| 1652 unittest.group("obj-schema-StartReconciliationResponse", () { |
| 1653 unittest.test("to-json--from-json", () { |
| 1654 var o = buildStartReconciliationResponse(); |
| 1655 var od = new api.StartReconciliationResponse.fromJson(o.toJson()); |
| 1656 checkStartReconciliationResponse(od); |
| 1657 }); |
| 1658 }); |
| 1659 |
| 1660 |
| 750 unittest.group("obj-schema-Status", () { | 1661 unittest.group("obj-schema-Status", () { |
| 751 unittest.test("to-json--from-json", () { | 1662 unittest.test("to-json--from-json", () { |
| 752 var o = buildStatus(); | 1663 var o = buildStatus(); |
| 753 var od = new api.Status.fromJson(o.toJson()); | 1664 var od = new api.Status.fromJson(o.toJson()); |
| 754 checkStatus(od); | 1665 checkStatus(od); |
| 755 }); | 1666 }); |
| 756 }); | 1667 }); |
| 757 | 1668 |
| 758 | 1669 |
| 759 unittest.group("resource-ServicesResourceApi", () { | 1670 unittest.group("resource-ServicesResourceApi", () { |
| 1671 unittest.test("method--allocateQuota", () { |
| 1672 |
| 1673 var mock = new HttpServerMock(); |
| 1674 api.ServicesResourceApi res = new api.ServicecontrolApi(mock).services; |
| 1675 var arg_request = buildAllocateQuotaRequest(); |
| 1676 var arg_serviceName = "foo"; |
| 1677 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 1678 var obj = new api.AllocateQuotaRequest.fromJson(json); |
| 1679 checkAllocateQuotaRequest(obj); |
| 1680 |
| 1681 var path = (req.url).path; |
| 1682 var pathOffset = 0; |
| 1683 var index; |
| 1684 var subPart; |
| 1685 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 1686 pathOffset += 1; |
| 1687 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("v1/services/")); |
| 1688 pathOffset += 12; |
| 1689 index = path.indexOf(":allocateQuota", pathOffset); |
| 1690 unittest.expect(index >= 0, unittest.isTrue); |
| 1691 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); |
| 1692 pathOffset = index; |
| 1693 unittest.expect(subPart, unittest.equals("$arg_serviceName")); |
| 1694 unittest.expect(path.substring(pathOffset, pathOffset + 14), unittest.eq
uals(":allocateQuota")); |
| 1695 pathOffset += 14; |
| 1696 |
| 1697 var query = (req.url).query; |
| 1698 var queryOffset = 0; |
| 1699 var queryMap = {}; |
| 1700 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 1701 parseBool(n) { |
| 1702 if (n == "true") return true; |
| 1703 if (n == "false") return false; |
| 1704 if (n == null) return null; |
| 1705 throw new core.ArgumentError("Invalid boolean: $n"); |
| 1706 } |
| 1707 if (query.length > 0) { |
| 1708 for (var part in query.split("&")) { |
| 1709 var keyvalue = part.split("="); |
| 1710 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 1711 } |
| 1712 } |
| 1713 |
| 1714 |
| 1715 var h = { |
| 1716 "content-type" : "application/json; charset=utf-8", |
| 1717 }; |
| 1718 var resp = convert.JSON.encode(buildAllocateQuotaResponse()); |
| 1719 return new async.Future.value(stringResponse(200, h, resp)); |
| 1720 }), true); |
| 1721 res.allocateQuota(arg_request, arg_serviceName).then(unittest.expectAsync(
((api.AllocateQuotaResponse response) { |
| 1722 checkAllocateQuotaResponse(response); |
| 1723 }))); |
| 1724 }); |
| 1725 |
| 760 unittest.test("method--check", () { | 1726 unittest.test("method--check", () { |
| 761 | 1727 |
| 762 var mock = new HttpServerMock(); | 1728 var mock = new HttpServerMock(); |
| 763 api.ServicesResourceApi res = new api.ServicecontrolApi(mock).services; | 1729 api.ServicesResourceApi res = new api.ServicecontrolApi(mock).services; |
| 764 var arg_request = buildCheckRequest(); | 1730 var arg_request = buildCheckRequest(); |
| 765 var arg_serviceName = "foo"; | 1731 var arg_serviceName = "foo"; |
| 766 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1732 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 767 var obj = new api.CheckRequest.fromJson(json); | 1733 var obj = new api.CheckRequest.fromJson(json); |
| 768 checkCheckRequest(obj); | 1734 checkCheckRequest(obj); |
| 769 | 1735 |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 805 "content-type" : "application/json; charset=utf-8", | 1771 "content-type" : "application/json; charset=utf-8", |
| 806 }; | 1772 }; |
| 807 var resp = convert.JSON.encode(buildCheckResponse()); | 1773 var resp = convert.JSON.encode(buildCheckResponse()); |
| 808 return new async.Future.value(stringResponse(200, h, resp)); | 1774 return new async.Future.value(stringResponse(200, h, resp)); |
| 809 }), true); | 1775 }), true); |
| 810 res.check(arg_request, arg_serviceName).then(unittest.expectAsync(((api.Ch
eckResponse response) { | 1776 res.check(arg_request, arg_serviceName).then(unittest.expectAsync(((api.Ch
eckResponse response) { |
| 811 checkCheckResponse(response); | 1777 checkCheckResponse(response); |
| 812 }))); | 1778 }))); |
| 813 }); | 1779 }); |
| 814 | 1780 |
| 1781 unittest.test("method--endReconciliation", () { |
| 1782 |
| 1783 var mock = new HttpServerMock(); |
| 1784 api.ServicesResourceApi res = new api.ServicecontrolApi(mock).services; |
| 1785 var arg_request = buildEndReconciliationRequest(); |
| 1786 var arg_serviceName = "foo"; |
| 1787 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 1788 var obj = new api.EndReconciliationRequest.fromJson(json); |
| 1789 checkEndReconciliationRequest(obj); |
| 1790 |
| 1791 var path = (req.url).path; |
| 1792 var pathOffset = 0; |
| 1793 var index; |
| 1794 var subPart; |
| 1795 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 1796 pathOffset += 1; |
| 1797 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("v1/services/")); |
| 1798 pathOffset += 12; |
| 1799 index = path.indexOf(":endReconciliation", pathOffset); |
| 1800 unittest.expect(index >= 0, unittest.isTrue); |
| 1801 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); |
| 1802 pathOffset = index; |
| 1803 unittest.expect(subPart, unittest.equals("$arg_serviceName")); |
| 1804 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals(":endReconciliation")); |
| 1805 pathOffset += 18; |
| 1806 |
| 1807 var query = (req.url).query; |
| 1808 var queryOffset = 0; |
| 1809 var queryMap = {}; |
| 1810 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 1811 parseBool(n) { |
| 1812 if (n == "true") return true; |
| 1813 if (n == "false") return false; |
| 1814 if (n == null) return null; |
| 1815 throw new core.ArgumentError("Invalid boolean: $n"); |
| 1816 } |
| 1817 if (query.length > 0) { |
| 1818 for (var part in query.split("&")) { |
| 1819 var keyvalue = part.split("="); |
| 1820 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 1821 } |
| 1822 } |
| 1823 |
| 1824 |
| 1825 var h = { |
| 1826 "content-type" : "application/json; charset=utf-8", |
| 1827 }; |
| 1828 var resp = convert.JSON.encode(buildEndReconciliationResponse()); |
| 1829 return new async.Future.value(stringResponse(200, h, resp)); |
| 1830 }), true); |
| 1831 res.endReconciliation(arg_request, arg_serviceName).then(unittest.expectAs
ync(((api.EndReconciliationResponse response) { |
| 1832 checkEndReconciliationResponse(response); |
| 1833 }))); |
| 1834 }); |
| 1835 |
| 1836 unittest.test("method--releaseQuota", () { |
| 1837 |
| 1838 var mock = new HttpServerMock(); |
| 1839 api.ServicesResourceApi res = new api.ServicecontrolApi(mock).services; |
| 1840 var arg_request = buildReleaseQuotaRequest(); |
| 1841 var arg_serviceName = "foo"; |
| 1842 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 1843 var obj = new api.ReleaseQuotaRequest.fromJson(json); |
| 1844 checkReleaseQuotaRequest(obj); |
| 1845 |
| 1846 var path = (req.url).path; |
| 1847 var pathOffset = 0; |
| 1848 var index; |
| 1849 var subPart; |
| 1850 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 1851 pathOffset += 1; |
| 1852 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("v1/services/")); |
| 1853 pathOffset += 12; |
| 1854 index = path.indexOf(":releaseQuota", pathOffset); |
| 1855 unittest.expect(index >= 0, unittest.isTrue); |
| 1856 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); |
| 1857 pathOffset = index; |
| 1858 unittest.expect(subPart, unittest.equals("$arg_serviceName")); |
| 1859 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals(":releaseQuota")); |
| 1860 pathOffset += 13; |
| 1861 |
| 1862 var query = (req.url).query; |
| 1863 var queryOffset = 0; |
| 1864 var queryMap = {}; |
| 1865 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 1866 parseBool(n) { |
| 1867 if (n == "true") return true; |
| 1868 if (n == "false") return false; |
| 1869 if (n == null) return null; |
| 1870 throw new core.ArgumentError("Invalid boolean: $n"); |
| 1871 } |
| 1872 if (query.length > 0) { |
| 1873 for (var part in query.split("&")) { |
| 1874 var keyvalue = part.split("="); |
| 1875 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 1876 } |
| 1877 } |
| 1878 |
| 1879 |
| 1880 var h = { |
| 1881 "content-type" : "application/json; charset=utf-8", |
| 1882 }; |
| 1883 var resp = convert.JSON.encode(buildReleaseQuotaResponse()); |
| 1884 return new async.Future.value(stringResponse(200, h, resp)); |
| 1885 }), true); |
| 1886 res.releaseQuota(arg_request, arg_serviceName).then(unittest.expectAsync((
(api.ReleaseQuotaResponse response) { |
| 1887 checkReleaseQuotaResponse(response); |
| 1888 }))); |
| 1889 }); |
| 1890 |
| 815 unittest.test("method--report", () { | 1891 unittest.test("method--report", () { |
| 816 | 1892 |
| 817 var mock = new HttpServerMock(); | 1893 var mock = new HttpServerMock(); |
| 818 api.ServicesResourceApi res = new api.ServicecontrolApi(mock).services; | 1894 api.ServicesResourceApi res = new api.ServicecontrolApi(mock).services; |
| 819 var arg_request = buildReportRequest(); | 1895 var arg_request = buildReportRequest(); |
| 820 var arg_serviceName = "foo"; | 1896 var arg_serviceName = "foo"; |
| 821 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1897 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 822 var obj = new api.ReportRequest.fromJson(json); | 1898 var obj = new api.ReportRequest.fromJson(json); |
| 823 checkReportRequest(obj); | 1899 checkReportRequest(obj); |
| 824 | 1900 |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 860 "content-type" : "application/json; charset=utf-8", | 1936 "content-type" : "application/json; charset=utf-8", |
| 861 }; | 1937 }; |
| 862 var resp = convert.JSON.encode(buildReportResponse()); | 1938 var resp = convert.JSON.encode(buildReportResponse()); |
| 863 return new async.Future.value(stringResponse(200, h, resp)); | 1939 return new async.Future.value(stringResponse(200, h, resp)); |
| 864 }), true); | 1940 }), true); |
| 865 res.report(arg_request, arg_serviceName).then(unittest.expectAsync(((api.R
eportResponse response) { | 1941 res.report(arg_request, arg_serviceName).then(unittest.expectAsync(((api.R
eportResponse response) { |
| 866 checkReportResponse(response); | 1942 checkReportResponse(response); |
| 867 }))); | 1943 }))); |
| 868 }); | 1944 }); |
| 869 | 1945 |
| 1946 unittest.test("method--startReconciliation", () { |
| 1947 |
| 1948 var mock = new HttpServerMock(); |
| 1949 api.ServicesResourceApi res = new api.ServicecontrolApi(mock).services; |
| 1950 var arg_request = buildStartReconciliationRequest(); |
| 1951 var arg_serviceName = "foo"; |
| 1952 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 1953 var obj = new api.StartReconciliationRequest.fromJson(json); |
| 1954 checkStartReconciliationRequest(obj); |
| 1955 |
| 1956 var path = (req.url).path; |
| 1957 var pathOffset = 0; |
| 1958 var index; |
| 1959 var subPart; |
| 1960 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 1961 pathOffset += 1; |
| 1962 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("v1/services/")); |
| 1963 pathOffset += 12; |
| 1964 index = path.indexOf(":startReconciliation", pathOffset); |
| 1965 unittest.expect(index >= 0, unittest.isTrue); |
| 1966 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); |
| 1967 pathOffset = index; |
| 1968 unittest.expect(subPart, unittest.equals("$arg_serviceName")); |
| 1969 unittest.expect(path.substring(pathOffset, pathOffset + 20), unittest.eq
uals(":startReconciliation")); |
| 1970 pathOffset += 20; |
| 1971 |
| 1972 var query = (req.url).query; |
| 1973 var queryOffset = 0; |
| 1974 var queryMap = {}; |
| 1975 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 1976 parseBool(n) { |
| 1977 if (n == "true") return true; |
| 1978 if (n == "false") return false; |
| 1979 if (n == null) return null; |
| 1980 throw new core.ArgumentError("Invalid boolean: $n"); |
| 1981 } |
| 1982 if (query.length > 0) { |
| 1983 for (var part in query.split("&")) { |
| 1984 var keyvalue = part.split("="); |
| 1985 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 1986 } |
| 1987 } |
| 1988 |
| 1989 |
| 1990 var h = { |
| 1991 "content-type" : "application/json; charset=utf-8", |
| 1992 }; |
| 1993 var resp = convert.JSON.encode(buildStartReconciliationResponse()); |
| 1994 return new async.Future.value(stringResponse(200, h, resp)); |
| 1995 }), true); |
| 1996 res.startReconciliation(arg_request, arg_serviceName).then(unittest.expect
Async(((api.StartReconciliationResponse response) { |
| 1997 checkStartReconciliationResponse(response); |
| 1998 }))); |
| 1999 }); |
| 2000 |
| 870 }); | 2001 }); |
| 871 | 2002 |
| 872 | 2003 |
| 873 } | 2004 } |
| 874 | 2005 |
| OLD | NEW |