| 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 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 84 } | 84 } |
| 85 | 85 |
| 86 checkCheckRequest(api.CheckRequest o) { | 86 checkCheckRequest(api.CheckRequest o) { |
| 87 buildCounterCheckRequest++; | 87 buildCounterCheckRequest++; |
| 88 if (buildCounterCheckRequest < 3) { | 88 if (buildCounterCheckRequest < 3) { |
| 89 checkOperation(o.operation); | 89 checkOperation(o.operation); |
| 90 } | 90 } |
| 91 buildCounterCheckRequest--; | 91 buildCounterCheckRequest--; |
| 92 } | 92 } |
| 93 | 93 |
| 94 buildUnnamed3062() { | 94 buildUnnamed1874() { |
| 95 var o = new core.List<api.CheckError>(); | 95 var o = new core.List<api.CheckError>(); |
| 96 o.add(buildCheckError()); | 96 o.add(buildCheckError()); |
| 97 o.add(buildCheckError()); | 97 o.add(buildCheckError()); |
| 98 return o; | 98 return o; |
| 99 } | 99 } |
| 100 | 100 |
| 101 checkUnnamed3062(core.List<api.CheckError> o) { | 101 checkUnnamed1874(core.List<api.CheckError> o) { |
| 102 unittest.expect(o, unittest.hasLength(2)); | 102 unittest.expect(o, unittest.hasLength(2)); |
| 103 checkCheckError(o[0]); | 103 checkCheckError(o[0]); |
| 104 checkCheckError(o[1]); | 104 checkCheckError(o[1]); |
| 105 } | 105 } |
| 106 | 106 |
| 107 core.int buildCounterCheckResponse = 0; | 107 core.int buildCounterCheckResponse = 0; |
| 108 buildCheckResponse() { | 108 buildCheckResponse() { |
| 109 var o = new api.CheckResponse(); | 109 var o = new api.CheckResponse(); |
| 110 buildCounterCheckResponse++; | 110 buildCounterCheckResponse++; |
| 111 if (buildCounterCheckResponse < 3) { | 111 if (buildCounterCheckResponse < 3) { |
| 112 o.checkErrors = buildUnnamed3062(); | 112 o.checkErrors = buildUnnamed1874(); |
| 113 o.operationId = "foo"; | 113 o.operationId = "foo"; |
| 114 o.serviceConfigId = "foo"; |
| 114 } | 115 } |
| 115 buildCounterCheckResponse--; | 116 buildCounterCheckResponse--; |
| 116 return o; | 117 return o; |
| 117 } | 118 } |
| 118 | 119 |
| 119 checkCheckResponse(api.CheckResponse o) { | 120 checkCheckResponse(api.CheckResponse o) { |
| 120 buildCounterCheckResponse++; | 121 buildCounterCheckResponse++; |
| 121 if (buildCounterCheckResponse < 3) { | 122 if (buildCounterCheckResponse < 3) { |
| 122 checkUnnamed3062(o.checkErrors); | 123 checkUnnamed1874(o.checkErrors); |
| 123 unittest.expect(o.operationId, unittest.equals('foo')); | 124 unittest.expect(o.operationId, unittest.equals('foo')); |
| 125 unittest.expect(o.serviceConfigId, unittest.equals('foo')); |
| 124 } | 126 } |
| 125 buildCounterCheckResponse--; | 127 buildCounterCheckResponse--; |
| 126 } | 128 } |
| 127 | 129 |
| 128 buildUnnamed3063() { | 130 buildUnnamed1875() { |
| 129 var o = new core.List<core.String>(); | 131 var o = new core.List<core.String>(); |
| 130 o.add("foo"); | 132 o.add("foo"); |
| 131 o.add("foo"); | 133 o.add("foo"); |
| 132 return o; | 134 return o; |
| 133 } | 135 } |
| 134 | 136 |
| 135 checkUnnamed3063(core.List<core.String> o) { | 137 checkUnnamed1875(core.List<core.String> o) { |
| 136 unittest.expect(o, unittest.hasLength(2)); | 138 unittest.expect(o, unittest.hasLength(2)); |
| 137 unittest.expect(o[0], unittest.equals('foo')); | 139 unittest.expect(o[0], unittest.equals('foo')); |
| 138 unittest.expect(o[1], unittest.equals('foo')); | 140 unittest.expect(o[1], unittest.equals('foo')); |
| 139 } | 141 } |
| 140 | 142 |
| 141 core.int buildCounterDistribution = 0; | 143 core.int buildCounterDistribution = 0; |
| 142 buildDistribution() { | 144 buildDistribution() { |
| 143 var o = new api.Distribution(); | 145 var o = new api.Distribution(); |
| 144 buildCounterDistribution++; | 146 buildCounterDistribution++; |
| 145 if (buildCounterDistribution < 3) { | 147 if (buildCounterDistribution < 3) { |
| 146 o.bucketCounts = buildUnnamed3063(); | 148 o.bucketCounts = buildUnnamed1875(); |
| 147 o.count = "foo"; | 149 o.count = "foo"; |
| 148 o.explicitBuckets = buildExplicitBuckets(); | 150 o.explicitBuckets = buildExplicitBuckets(); |
| 149 o.exponentialBuckets = buildExponentialBuckets(); | 151 o.exponentialBuckets = buildExponentialBuckets(); |
| 150 o.linearBuckets = buildLinearBuckets(); | 152 o.linearBuckets = buildLinearBuckets(); |
| 151 o.maximum = 42.0; | 153 o.maximum = 42.0; |
| 152 o.mean = 42.0; | 154 o.mean = 42.0; |
| 153 o.minimum = 42.0; | 155 o.minimum = 42.0; |
| 154 o.sumOfSquaredDeviation = 42.0; | 156 o.sumOfSquaredDeviation = 42.0; |
| 155 } | 157 } |
| 156 buildCounterDistribution--; | 158 buildCounterDistribution--; |
| 157 return o; | 159 return o; |
| 158 } | 160 } |
| 159 | 161 |
| 160 checkDistribution(api.Distribution o) { | 162 checkDistribution(api.Distribution o) { |
| 161 buildCounterDistribution++; | 163 buildCounterDistribution++; |
| 162 if (buildCounterDistribution < 3) { | 164 if (buildCounterDistribution < 3) { |
| 163 checkUnnamed3063(o.bucketCounts); | 165 checkUnnamed1875(o.bucketCounts); |
| 164 unittest.expect(o.count, unittest.equals('foo')); | 166 unittest.expect(o.count, unittest.equals('foo')); |
| 165 checkExplicitBuckets(o.explicitBuckets); | 167 checkExplicitBuckets(o.explicitBuckets); |
| 166 checkExponentialBuckets(o.exponentialBuckets); | 168 checkExponentialBuckets(o.exponentialBuckets); |
| 167 checkLinearBuckets(o.linearBuckets); | 169 checkLinearBuckets(o.linearBuckets); |
| 168 unittest.expect(o.maximum, unittest.equals(42.0)); | 170 unittest.expect(o.maximum, unittest.equals(42.0)); |
| 169 unittest.expect(o.mean, unittest.equals(42.0)); | 171 unittest.expect(o.mean, unittest.equals(42.0)); |
| 170 unittest.expect(o.minimum, unittest.equals(42.0)); | 172 unittest.expect(o.minimum, unittest.equals(42.0)); |
| 171 unittest.expect(o.sumOfSquaredDeviation, unittest.equals(42.0)); | 173 unittest.expect(o.sumOfSquaredDeviation, unittest.equals(42.0)); |
| 172 } | 174 } |
| 173 buildCounterDistribution--; | 175 buildCounterDistribution--; |
| 174 } | 176 } |
| 175 | 177 |
| 176 buildUnnamed3064() { | 178 buildUnnamed1876() { |
| 177 var o = new core.List<core.double>(); | 179 var o = new core.List<core.double>(); |
| 178 o.add(42.0); | 180 o.add(42.0); |
| 179 o.add(42.0); | 181 o.add(42.0); |
| 180 return o; | 182 return o; |
| 181 } | 183 } |
| 182 | 184 |
| 183 checkUnnamed3064(core.List<core.double> o) { | 185 checkUnnamed1876(core.List<core.double> o) { |
| 184 unittest.expect(o, unittest.hasLength(2)); | 186 unittest.expect(o, unittest.hasLength(2)); |
| 185 unittest.expect(o[0], unittest.equals(42.0)); | 187 unittest.expect(o[0], unittest.equals(42.0)); |
| 186 unittest.expect(o[1], unittest.equals(42.0)); | 188 unittest.expect(o[1], unittest.equals(42.0)); |
| 187 } | 189 } |
| 188 | 190 |
| 189 core.int buildCounterExplicitBuckets = 0; | 191 core.int buildCounterExplicitBuckets = 0; |
| 190 buildExplicitBuckets() { | 192 buildExplicitBuckets() { |
| 191 var o = new api.ExplicitBuckets(); | 193 var o = new api.ExplicitBuckets(); |
| 192 buildCounterExplicitBuckets++; | 194 buildCounterExplicitBuckets++; |
| 193 if (buildCounterExplicitBuckets < 3) { | 195 if (buildCounterExplicitBuckets < 3) { |
| 194 o.bounds = buildUnnamed3064(); | 196 o.bounds = buildUnnamed1876(); |
| 195 } | 197 } |
| 196 buildCounterExplicitBuckets--; | 198 buildCounterExplicitBuckets--; |
| 197 return o; | 199 return o; |
| 198 } | 200 } |
| 199 | 201 |
| 200 checkExplicitBuckets(api.ExplicitBuckets o) { | 202 checkExplicitBuckets(api.ExplicitBuckets o) { |
| 201 buildCounterExplicitBuckets++; | 203 buildCounterExplicitBuckets++; |
| 202 if (buildCounterExplicitBuckets < 3) { | 204 if (buildCounterExplicitBuckets < 3) { |
| 203 checkUnnamed3064(o.bounds); | 205 checkUnnamed1876(o.bounds); |
| 204 } | 206 } |
| 205 buildCounterExplicitBuckets--; | 207 buildCounterExplicitBuckets--; |
| 206 } | 208 } |
| 207 | 209 |
| 208 core.int buildCounterExponentialBuckets = 0; | 210 core.int buildCounterExponentialBuckets = 0; |
| 209 buildExponentialBuckets() { | 211 buildExponentialBuckets() { |
| 210 var o = new api.ExponentialBuckets(); | 212 var o = new api.ExponentialBuckets(); |
| 211 buildCounterExponentialBuckets++; | 213 buildCounterExponentialBuckets++; |
| 212 if (buildCounterExponentialBuckets < 3) { | 214 if (buildCounterExponentialBuckets < 3) { |
| 213 o.growthFactor = 42.0; | 215 o.growthFactor = 42.0; |
| (...skipping 30 matching lines...) Expand all Loading... |
| 244 checkLinearBuckets(api.LinearBuckets o) { | 246 checkLinearBuckets(api.LinearBuckets o) { |
| 245 buildCounterLinearBuckets++; | 247 buildCounterLinearBuckets++; |
| 246 if (buildCounterLinearBuckets < 3) { | 248 if (buildCounterLinearBuckets < 3) { |
| 247 unittest.expect(o.numFiniteBuckets, unittest.equals(42)); | 249 unittest.expect(o.numFiniteBuckets, unittest.equals(42)); |
| 248 unittest.expect(o.offset, unittest.equals(42.0)); | 250 unittest.expect(o.offset, unittest.equals(42.0)); |
| 249 unittest.expect(o.width, unittest.equals(42.0)); | 251 unittest.expect(o.width, unittest.equals(42.0)); |
| 250 } | 252 } |
| 251 buildCounterLinearBuckets--; | 253 buildCounterLinearBuckets--; |
| 252 } | 254 } |
| 253 | 255 |
| 254 buildUnnamed3065() { | 256 buildUnnamed1877() { |
| 255 var o = new core.Map<core.String, core.String>(); | 257 var o = new core.Map<core.String, core.String>(); |
| 256 o["x"] = "foo"; | 258 o["x"] = "foo"; |
| 257 o["y"] = "foo"; | 259 o["y"] = "foo"; |
| 258 return o; | 260 return o; |
| 259 } | 261 } |
| 260 | 262 |
| 261 checkUnnamed3065(core.Map<core.String, core.String> o) { | 263 checkUnnamed1877(core.Map<core.String, core.String> o) { |
| 262 unittest.expect(o, unittest.hasLength(2)); | 264 unittest.expect(o, unittest.hasLength(2)); |
| 263 unittest.expect(o["x"], unittest.equals('foo')); | 265 unittest.expect(o["x"], unittest.equals('foo')); |
| 264 unittest.expect(o["y"], unittest.equals('foo')); | 266 unittest.expect(o["y"], unittest.equals('foo')); |
| 265 } | 267 } |
| 266 | 268 |
| 267 buildUnnamed3066() { | 269 buildUnnamed1878() { |
| 268 var o = new core.Map<core.String, core.Object>(); | 270 var o = new core.Map<core.String, core.Object>(); |
| 269 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 271 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; |
| 270 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 272 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; |
| 271 return o; | 273 return o; |
| 272 } | 274 } |
| 273 | 275 |
| 274 checkUnnamed3066(core.Map<core.String, core.Object> o) { | 276 checkUnnamed1878(core.Map<core.String, core.Object> o) { |
| 275 unittest.expect(o, unittest.hasLength(2)); | 277 unittest.expect(o, unittest.hasLength(2)); |
| 276 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')); | 278 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')); |
| 277 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')); | 279 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')); |
| 278 } | 280 } |
| 279 | 281 |
| 280 buildUnnamed3067() { | 282 buildUnnamed1879() { |
| 281 var o = new core.Map<core.String, core.Object>(); | 283 var o = new core.Map<core.String, core.Object>(); |
| 282 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 284 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; |
| 283 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 285 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; |
| 284 return o; | 286 return o; |
| 285 } | 287 } |
| 286 | 288 |
| 287 checkUnnamed3067(core.Map<core.String, core.Object> o) { | 289 checkUnnamed1879(core.Map<core.String, core.Object> o) { |
| 288 unittest.expect(o, unittest.hasLength(2)); | 290 unittest.expect(o, unittest.hasLength(2)); |
| 289 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')); | 291 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')); |
| 290 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')); | 292 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')); |
| 291 } | 293 } |
| 292 | 294 |
| 293 core.int buildCounterLogEntry = 0; | 295 core.int buildCounterLogEntry = 0; |
| 294 buildLogEntry() { | 296 buildLogEntry() { |
| 295 var o = new api.LogEntry(); | 297 var o = new api.LogEntry(); |
| 296 buildCounterLogEntry++; | 298 buildCounterLogEntry++; |
| 297 if (buildCounterLogEntry < 3) { | 299 if (buildCounterLogEntry < 3) { |
| 298 o.insertId = "foo"; | 300 o.insertId = "foo"; |
| 299 o.labels = buildUnnamed3065(); | 301 o.labels = buildUnnamed1877(); |
| 300 o.name = "foo"; | 302 o.name = "foo"; |
| 301 o.protoPayload = buildUnnamed3066(); | 303 o.protoPayload = buildUnnamed1878(); |
| 302 o.severity = "foo"; | 304 o.severity = "foo"; |
| 303 o.structPayload = buildUnnamed3067(); | 305 o.structPayload = buildUnnamed1879(); |
| 304 o.textPayload = "foo"; | 306 o.textPayload = "foo"; |
| 305 o.timestamp = "foo"; | 307 o.timestamp = "foo"; |
| 306 } | 308 } |
| 307 buildCounterLogEntry--; | 309 buildCounterLogEntry--; |
| 308 return o; | 310 return o; |
| 309 } | 311 } |
| 310 | 312 |
| 311 checkLogEntry(api.LogEntry o) { | 313 checkLogEntry(api.LogEntry o) { |
| 312 buildCounterLogEntry++; | 314 buildCounterLogEntry++; |
| 313 if (buildCounterLogEntry < 3) { | 315 if (buildCounterLogEntry < 3) { |
| 314 unittest.expect(o.insertId, unittest.equals('foo')); | 316 unittest.expect(o.insertId, unittest.equals('foo')); |
| 315 checkUnnamed3065(o.labels); | 317 checkUnnamed1877(o.labels); |
| 316 unittest.expect(o.name, unittest.equals('foo')); | 318 unittest.expect(o.name, unittest.equals('foo')); |
| 317 checkUnnamed3066(o.protoPayload); | 319 checkUnnamed1878(o.protoPayload); |
| 318 unittest.expect(o.severity, unittest.equals('foo')); | 320 unittest.expect(o.severity, unittest.equals('foo')); |
| 319 checkUnnamed3067(o.structPayload); | 321 checkUnnamed1879(o.structPayload); |
| 320 unittest.expect(o.textPayload, unittest.equals('foo')); | 322 unittest.expect(o.textPayload, unittest.equals('foo')); |
| 321 unittest.expect(o.timestamp, unittest.equals('foo')); | 323 unittest.expect(o.timestamp, unittest.equals('foo')); |
| 322 } | 324 } |
| 323 buildCounterLogEntry--; | 325 buildCounterLogEntry--; |
| 324 } | 326 } |
| 325 | 327 |
| 326 buildUnnamed3068() { | 328 buildUnnamed1880() { |
| 327 var o = new core.Map<core.String, core.String>(); | 329 var o = new core.Map<core.String, core.String>(); |
| 328 o["x"] = "foo"; | 330 o["x"] = "foo"; |
| 329 o["y"] = "foo"; | 331 o["y"] = "foo"; |
| 330 return o; | 332 return o; |
| 331 } | 333 } |
| 332 | 334 |
| 333 checkUnnamed3068(core.Map<core.String, core.String> o) { | 335 checkUnnamed1880(core.Map<core.String, core.String> o) { |
| 334 unittest.expect(o, unittest.hasLength(2)); | 336 unittest.expect(o, unittest.hasLength(2)); |
| 335 unittest.expect(o["x"], unittest.equals('foo')); | 337 unittest.expect(o["x"], unittest.equals('foo')); |
| 336 unittest.expect(o["y"], unittest.equals('foo')); | 338 unittest.expect(o["y"], unittest.equals('foo')); |
| 337 } | 339 } |
| 338 | 340 |
| 339 core.int buildCounterMetricValue = 0; | 341 core.int buildCounterMetricValue = 0; |
| 340 buildMetricValue() { | 342 buildMetricValue() { |
| 341 var o = new api.MetricValue(); | 343 var o = new api.MetricValue(); |
| 342 buildCounterMetricValue++; | 344 buildCounterMetricValue++; |
| 343 if (buildCounterMetricValue < 3) { | 345 if (buildCounterMetricValue < 3) { |
| 344 o.boolValue = true; | 346 o.boolValue = true; |
| 345 o.distributionValue = buildDistribution(); | 347 o.distributionValue = buildDistribution(); |
| 346 o.doubleValue = 42.0; | 348 o.doubleValue = 42.0; |
| 347 o.endTime = "foo"; | 349 o.endTime = "foo"; |
| 348 o.int64Value = "foo"; | 350 o.int64Value = "foo"; |
| 349 o.labels = buildUnnamed3068(); | 351 o.labels = buildUnnamed1880(); |
| 350 o.startTime = "foo"; | 352 o.startTime = "foo"; |
| 351 o.stringValue = "foo"; | 353 o.stringValue = "foo"; |
| 352 } | 354 } |
| 353 buildCounterMetricValue--; | 355 buildCounterMetricValue--; |
| 354 return o; | 356 return o; |
| 355 } | 357 } |
| 356 | 358 |
| 357 checkMetricValue(api.MetricValue o) { | 359 checkMetricValue(api.MetricValue o) { |
| 358 buildCounterMetricValue++; | 360 buildCounterMetricValue++; |
| 359 if (buildCounterMetricValue < 3) { | 361 if (buildCounterMetricValue < 3) { |
| 360 unittest.expect(o.boolValue, unittest.isTrue); | 362 unittest.expect(o.boolValue, unittest.isTrue); |
| 361 checkDistribution(o.distributionValue); | 363 checkDistribution(o.distributionValue); |
| 362 unittest.expect(o.doubleValue, unittest.equals(42.0)); | 364 unittest.expect(o.doubleValue, unittest.equals(42.0)); |
| 363 unittest.expect(o.endTime, unittest.equals('foo')); | 365 unittest.expect(o.endTime, unittest.equals('foo')); |
| 364 unittest.expect(o.int64Value, unittest.equals('foo')); | 366 unittest.expect(o.int64Value, unittest.equals('foo')); |
| 365 checkUnnamed3068(o.labels); | 367 checkUnnamed1880(o.labels); |
| 366 unittest.expect(o.startTime, unittest.equals('foo')); | 368 unittest.expect(o.startTime, unittest.equals('foo')); |
| 367 unittest.expect(o.stringValue, unittest.equals('foo')); | 369 unittest.expect(o.stringValue, unittest.equals('foo')); |
| 368 } | 370 } |
| 369 buildCounterMetricValue--; | 371 buildCounterMetricValue--; |
| 370 } | 372 } |
| 371 | 373 |
| 372 buildUnnamed3069() { | 374 buildUnnamed1881() { |
| 373 var o = new core.List<api.MetricValue>(); | 375 var o = new core.List<api.MetricValue>(); |
| 374 o.add(buildMetricValue()); | 376 o.add(buildMetricValue()); |
| 375 o.add(buildMetricValue()); | 377 o.add(buildMetricValue()); |
| 376 return o; | 378 return o; |
| 377 } | 379 } |
| 378 | 380 |
| 379 checkUnnamed3069(core.List<api.MetricValue> o) { | 381 checkUnnamed1881(core.List<api.MetricValue> o) { |
| 380 unittest.expect(o, unittest.hasLength(2)); | 382 unittest.expect(o, unittest.hasLength(2)); |
| 381 checkMetricValue(o[0]); | 383 checkMetricValue(o[0]); |
| 382 checkMetricValue(o[1]); | 384 checkMetricValue(o[1]); |
| 383 } | 385 } |
| 384 | 386 |
| 385 core.int buildCounterMetricValueSet = 0; | 387 core.int buildCounterMetricValueSet = 0; |
| 386 buildMetricValueSet() { | 388 buildMetricValueSet() { |
| 387 var o = new api.MetricValueSet(); | 389 var o = new api.MetricValueSet(); |
| 388 buildCounterMetricValueSet++; | 390 buildCounterMetricValueSet++; |
| 389 if (buildCounterMetricValueSet < 3) { | 391 if (buildCounterMetricValueSet < 3) { |
| 390 o.metricName = "foo"; | 392 o.metricName = "foo"; |
| 391 o.metricValues = buildUnnamed3069(); | 393 o.metricValues = buildUnnamed1881(); |
| 392 } | 394 } |
| 393 buildCounterMetricValueSet--; | 395 buildCounterMetricValueSet--; |
| 394 return o; | 396 return o; |
| 395 } | 397 } |
| 396 | 398 |
| 397 checkMetricValueSet(api.MetricValueSet o) { | 399 checkMetricValueSet(api.MetricValueSet o) { |
| 398 buildCounterMetricValueSet++; | 400 buildCounterMetricValueSet++; |
| 399 if (buildCounterMetricValueSet < 3) { | 401 if (buildCounterMetricValueSet < 3) { |
| 400 unittest.expect(o.metricName, unittest.equals('foo')); | 402 unittest.expect(o.metricName, unittest.equals('foo')); |
| 401 checkUnnamed3069(o.metricValues); | 403 checkUnnamed1881(o.metricValues); |
| 402 } | 404 } |
| 403 buildCounterMetricValueSet--; | 405 buildCounterMetricValueSet--; |
| 404 } | 406 } |
| 405 | 407 |
| 406 buildUnnamed3070() { | 408 buildUnnamed1882() { |
| 407 var o = new core.Map<core.String, core.String>(); | 409 var o = new core.Map<core.String, core.String>(); |
| 408 o["x"] = "foo"; | 410 o["x"] = "foo"; |
| 409 o["y"] = "foo"; | 411 o["y"] = "foo"; |
| 410 return o; | 412 return o; |
| 411 } | 413 } |
| 412 | 414 |
| 413 checkUnnamed3070(core.Map<core.String, core.String> o) { | 415 checkUnnamed1882(core.Map<core.String, core.String> o) { |
| 414 unittest.expect(o, unittest.hasLength(2)); | 416 unittest.expect(o, unittest.hasLength(2)); |
| 415 unittest.expect(o["x"], unittest.equals('foo')); | 417 unittest.expect(o["x"], unittest.equals('foo')); |
| 416 unittest.expect(o["y"], unittest.equals('foo')); | 418 unittest.expect(o["y"], unittest.equals('foo')); |
| 417 } | 419 } |
| 418 | 420 |
| 419 buildUnnamed3071() { | 421 buildUnnamed1883() { |
| 420 var o = new core.List<api.LogEntry>(); | 422 var o = new core.List<api.LogEntry>(); |
| 421 o.add(buildLogEntry()); | 423 o.add(buildLogEntry()); |
| 422 o.add(buildLogEntry()); | 424 o.add(buildLogEntry()); |
| 423 return o; | 425 return o; |
| 424 } | 426 } |
| 425 | 427 |
| 426 checkUnnamed3071(core.List<api.LogEntry> o) { | 428 checkUnnamed1883(core.List<api.LogEntry> o) { |
| 427 unittest.expect(o, unittest.hasLength(2)); | 429 unittest.expect(o, unittest.hasLength(2)); |
| 428 checkLogEntry(o[0]); | 430 checkLogEntry(o[0]); |
| 429 checkLogEntry(o[1]); | 431 checkLogEntry(o[1]); |
| 430 } | 432 } |
| 431 | 433 |
| 432 buildUnnamed3072() { | 434 buildUnnamed1884() { |
| 433 var o = new core.List<api.MetricValueSet>(); | 435 var o = new core.List<api.MetricValueSet>(); |
| 434 o.add(buildMetricValueSet()); | 436 o.add(buildMetricValueSet()); |
| 435 o.add(buildMetricValueSet()); | 437 o.add(buildMetricValueSet()); |
| 436 return o; | 438 return o; |
| 437 } | 439 } |
| 438 | 440 |
| 439 checkUnnamed3072(core.List<api.MetricValueSet> o) { | 441 checkUnnamed1884(core.List<api.MetricValueSet> o) { |
| 440 unittest.expect(o, unittest.hasLength(2)); | 442 unittest.expect(o, unittest.hasLength(2)); |
| 441 checkMetricValueSet(o[0]); | 443 checkMetricValueSet(o[0]); |
| 442 checkMetricValueSet(o[1]); | 444 checkMetricValueSet(o[1]); |
| 443 } | 445 } |
| 444 | 446 |
| 445 core.int buildCounterOperation = 0; | 447 core.int buildCounterOperation = 0; |
| 446 buildOperation() { | 448 buildOperation() { |
| 447 var o = new api.Operation(); | 449 var o = new api.Operation(); |
| 448 buildCounterOperation++; | 450 buildCounterOperation++; |
| 449 if (buildCounterOperation < 3) { | 451 if (buildCounterOperation < 3) { |
| 450 o.consumerId = "foo"; | 452 o.consumerId = "foo"; |
| 451 o.endTime = "foo"; | 453 o.endTime = "foo"; |
| 452 o.importance = "foo"; | 454 o.importance = "foo"; |
| 453 o.labels = buildUnnamed3070(); | 455 o.labels = buildUnnamed1882(); |
| 454 o.logEntries = buildUnnamed3071(); | 456 o.logEntries = buildUnnamed1883(); |
| 455 o.metricValueSets = buildUnnamed3072(); | 457 o.metricValueSets = buildUnnamed1884(); |
| 456 o.operationId = "foo"; | 458 o.operationId = "foo"; |
| 457 o.operationName = "foo"; | 459 o.operationName = "foo"; |
| 458 o.startTime = "foo"; | 460 o.startTime = "foo"; |
| 459 } | 461 } |
| 460 buildCounterOperation--; | 462 buildCounterOperation--; |
| 461 return o; | 463 return o; |
| 462 } | 464 } |
| 463 | 465 |
| 464 checkOperation(api.Operation o) { | 466 checkOperation(api.Operation o) { |
| 465 buildCounterOperation++; | 467 buildCounterOperation++; |
| 466 if (buildCounterOperation < 3) { | 468 if (buildCounterOperation < 3) { |
| 467 unittest.expect(o.consumerId, unittest.equals('foo')); | 469 unittest.expect(o.consumerId, unittest.equals('foo')); |
| 468 unittest.expect(o.endTime, unittest.equals('foo')); | 470 unittest.expect(o.endTime, unittest.equals('foo')); |
| 469 unittest.expect(o.importance, unittest.equals('foo')); | 471 unittest.expect(o.importance, unittest.equals('foo')); |
| 470 checkUnnamed3070(o.labels); | 472 checkUnnamed1882(o.labels); |
| 471 checkUnnamed3071(o.logEntries); | 473 checkUnnamed1883(o.logEntries); |
| 472 checkUnnamed3072(o.metricValueSets); | 474 checkUnnamed1884(o.metricValueSets); |
| 473 unittest.expect(o.operationId, unittest.equals('foo')); | 475 unittest.expect(o.operationId, unittest.equals('foo')); |
| 474 unittest.expect(o.operationName, unittest.equals('foo')); | 476 unittest.expect(o.operationName, unittest.equals('foo')); |
| 475 unittest.expect(o.startTime, unittest.equals('foo')); | 477 unittest.expect(o.startTime, unittest.equals('foo')); |
| 476 } | 478 } |
| 477 buildCounterOperation--; | 479 buildCounterOperation--; |
| 478 } | 480 } |
| 479 | 481 |
| 480 core.int buildCounterReportError = 0; | 482 core.int buildCounterReportError = 0; |
| 481 buildReportError() { | 483 buildReportError() { |
| 482 var o = new api.ReportError(); | 484 var o = new api.ReportError(); |
| 483 buildCounterReportError++; | 485 buildCounterReportError++; |
| 484 if (buildCounterReportError < 3) { | 486 if (buildCounterReportError < 3) { |
| 485 o.operationId = "foo"; | 487 o.operationId = "foo"; |
| 486 o.status = buildStatus(); | 488 o.status = buildStatus(); |
| 487 } | 489 } |
| 488 buildCounterReportError--; | 490 buildCounterReportError--; |
| 489 return o; | 491 return o; |
| 490 } | 492 } |
| 491 | 493 |
| 492 checkReportError(api.ReportError o) { | 494 checkReportError(api.ReportError o) { |
| 493 buildCounterReportError++; | 495 buildCounterReportError++; |
| 494 if (buildCounterReportError < 3) { | 496 if (buildCounterReportError < 3) { |
| 495 unittest.expect(o.operationId, unittest.equals('foo')); | 497 unittest.expect(o.operationId, unittest.equals('foo')); |
| 496 checkStatus(o.status); | 498 checkStatus(o.status); |
| 497 } | 499 } |
| 498 buildCounterReportError--; | 500 buildCounterReportError--; |
| 499 } | 501 } |
| 500 | 502 |
| 501 buildUnnamed3073() { | 503 buildUnnamed1885() { |
| 502 var o = new core.List<api.Operation>(); | 504 var o = new core.List<api.Operation>(); |
| 503 o.add(buildOperation()); | 505 o.add(buildOperation()); |
| 504 o.add(buildOperation()); | 506 o.add(buildOperation()); |
| 505 return o; | 507 return o; |
| 506 } | 508 } |
| 507 | 509 |
| 508 checkUnnamed3073(core.List<api.Operation> o) { | 510 checkUnnamed1885(core.List<api.Operation> o) { |
| 509 unittest.expect(o, unittest.hasLength(2)); | 511 unittest.expect(o, unittest.hasLength(2)); |
| 510 checkOperation(o[0]); | 512 checkOperation(o[0]); |
| 511 checkOperation(o[1]); | 513 checkOperation(o[1]); |
| 512 } | 514 } |
| 513 | 515 |
| 514 core.int buildCounterReportRequest = 0; | 516 core.int buildCounterReportRequest = 0; |
| 515 buildReportRequest() { | 517 buildReportRequest() { |
| 516 var o = new api.ReportRequest(); | 518 var o = new api.ReportRequest(); |
| 517 buildCounterReportRequest++; | 519 buildCounterReportRequest++; |
| 518 if (buildCounterReportRequest < 3) { | 520 if (buildCounterReportRequest < 3) { |
| 519 o.operations = buildUnnamed3073(); | 521 o.operations = buildUnnamed1885(); |
| 520 } | 522 } |
| 521 buildCounterReportRequest--; | 523 buildCounterReportRequest--; |
| 522 return o; | 524 return o; |
| 523 } | 525 } |
| 524 | 526 |
| 525 checkReportRequest(api.ReportRequest o) { | 527 checkReportRequest(api.ReportRequest o) { |
| 526 buildCounterReportRequest++; | 528 buildCounterReportRequest++; |
| 527 if (buildCounterReportRequest < 3) { | 529 if (buildCounterReportRequest < 3) { |
| 528 checkUnnamed3073(o.operations); | 530 checkUnnamed1885(o.operations); |
| 529 } | 531 } |
| 530 buildCounterReportRequest--; | 532 buildCounterReportRequest--; |
| 531 } | 533 } |
| 532 | 534 |
| 533 buildUnnamed3074() { | 535 buildUnnamed1886() { |
| 534 var o = new core.List<api.ReportError>(); | 536 var o = new core.List<api.ReportError>(); |
| 535 o.add(buildReportError()); | 537 o.add(buildReportError()); |
| 536 o.add(buildReportError()); | 538 o.add(buildReportError()); |
| 537 return o; | 539 return o; |
| 538 } | 540 } |
| 539 | 541 |
| 540 checkUnnamed3074(core.List<api.ReportError> o) { | 542 checkUnnamed1886(core.List<api.ReportError> o) { |
| 541 unittest.expect(o, unittest.hasLength(2)); | 543 unittest.expect(o, unittest.hasLength(2)); |
| 542 checkReportError(o[0]); | 544 checkReportError(o[0]); |
| 543 checkReportError(o[1]); | 545 checkReportError(o[1]); |
| 544 } | 546 } |
| 545 | 547 |
| 546 core.int buildCounterReportResponse = 0; | 548 core.int buildCounterReportResponse = 0; |
| 547 buildReportResponse() { | 549 buildReportResponse() { |
| 548 var o = new api.ReportResponse(); | 550 var o = new api.ReportResponse(); |
| 549 buildCounterReportResponse++; | 551 buildCounterReportResponse++; |
| 550 if (buildCounterReportResponse < 3) { | 552 if (buildCounterReportResponse < 3) { |
| 551 o.reportErrors = buildUnnamed3074(); | 553 o.reportErrors = buildUnnamed1886(); |
| 554 o.serviceConfigId = "foo"; |
| 552 } | 555 } |
| 553 buildCounterReportResponse--; | 556 buildCounterReportResponse--; |
| 554 return o; | 557 return o; |
| 555 } | 558 } |
| 556 | 559 |
| 557 checkReportResponse(api.ReportResponse o) { | 560 checkReportResponse(api.ReportResponse o) { |
| 558 buildCounterReportResponse++; | 561 buildCounterReportResponse++; |
| 559 if (buildCounterReportResponse < 3) { | 562 if (buildCounterReportResponse < 3) { |
| 560 checkUnnamed3074(o.reportErrors); | 563 checkUnnamed1886(o.reportErrors); |
| 564 unittest.expect(o.serviceConfigId, unittest.equals('foo')); |
| 561 } | 565 } |
| 562 buildCounterReportResponse--; | 566 buildCounterReportResponse--; |
| 563 } | 567 } |
| 564 | 568 |
| 565 buildUnnamed3075() { | 569 buildUnnamed1887() { |
| 566 var o = new core.Map<core.String, core.Object>(); | 570 var o = new core.Map<core.String, core.Object>(); |
| 567 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 571 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; |
| 568 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 572 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; |
| 569 return o; | 573 return o; |
| 570 } | 574 } |
| 571 | 575 |
| 572 checkUnnamed3075(core.Map<core.String, core.Object> o) { | 576 checkUnnamed1887(core.Map<core.String, core.Object> o) { |
| 573 unittest.expect(o, unittest.hasLength(2)); | 577 unittest.expect(o, unittest.hasLength(2)); |
| 574 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')); | 578 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')); |
| 575 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')); | 579 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')); |
| 576 } | 580 } |
| 577 | 581 |
| 578 buildUnnamed3076() { | 582 buildUnnamed1888() { |
| 579 var o = new core.List<core.Map<core.String, core.Object>>(); | 583 var o = new core.List<core.Map<core.String, core.Object>>(); |
| 580 o.add(buildUnnamed3075()); | 584 o.add(buildUnnamed1887()); |
| 581 o.add(buildUnnamed3075()); | 585 o.add(buildUnnamed1887()); |
| 582 return o; | 586 return o; |
| 583 } | 587 } |
| 584 | 588 |
| 585 checkUnnamed3076(core.List<core.Map<core.String, core.Object>> o) { | 589 checkUnnamed1888(core.List<core.Map<core.String, core.Object>> o) { |
| 586 unittest.expect(o, unittest.hasLength(2)); | 590 unittest.expect(o, unittest.hasLength(2)); |
| 587 checkUnnamed3075(o[0]); | 591 checkUnnamed1887(o[0]); |
| 588 checkUnnamed3075(o[1]); | 592 checkUnnamed1887(o[1]); |
| 589 } | 593 } |
| 590 | 594 |
| 591 core.int buildCounterStatus = 0; | 595 core.int buildCounterStatus = 0; |
| 592 buildStatus() { | 596 buildStatus() { |
| 593 var o = new api.Status(); | 597 var o = new api.Status(); |
| 594 buildCounterStatus++; | 598 buildCounterStatus++; |
| 595 if (buildCounterStatus < 3) { | 599 if (buildCounterStatus < 3) { |
| 596 o.code = 42; | 600 o.code = 42; |
| 597 o.details = buildUnnamed3076(); | 601 o.details = buildUnnamed1888(); |
| 598 o.message = "foo"; | 602 o.message = "foo"; |
| 599 } | 603 } |
| 600 buildCounterStatus--; | 604 buildCounterStatus--; |
| 601 return o; | 605 return o; |
| 602 } | 606 } |
| 603 | 607 |
| 604 checkStatus(api.Status o) { | 608 checkStatus(api.Status o) { |
| 605 buildCounterStatus++; | 609 buildCounterStatus++; |
| 606 if (buildCounterStatus < 3) { | 610 if (buildCounterStatus < 3) { |
| 607 unittest.expect(o.code, unittest.equals(42)); | 611 unittest.expect(o.code, unittest.equals(42)); |
| 608 checkUnnamed3076(o.details); | 612 checkUnnamed1888(o.details); |
| 609 unittest.expect(o.message, unittest.equals('foo')); | 613 unittest.expect(o.message, unittest.equals('foo')); |
| 610 } | 614 } |
| 611 buildCounterStatus--; | 615 buildCounterStatus--; |
| 612 } | 616 } |
| 613 | 617 |
| 614 | 618 |
| 615 main() { | 619 main() { |
| 616 unittest.group("obj-schema-CheckError", () { | 620 unittest.group("obj-schema-CheckError", () { |
| 617 unittest.test("to-json--from-json", () { | 621 unittest.test("to-json--from-json", () { |
| 618 var o = buildCheckError(); | 622 var o = buildCheckError(); |
| (...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 857 res.report(arg_request, arg_serviceName).then(unittest.expectAsync(((api.R
eportResponse response) { | 861 res.report(arg_request, arg_serviceName).then(unittest.expectAsync(((api.R
eportResponse response) { |
| 858 checkReportResponse(response); | 862 checkReportResponse(response); |
| 859 }))); | 863 }))); |
| 860 }); | 864 }); |
| 861 | 865 |
| 862 }); | 866 }); |
| 863 | 867 |
| 864 | 868 |
| 865 } | 869 } |
| 866 | 870 |
| OLD | NEW |