Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(232)

Side by Side Diff: generated/googleapis/test/servicecontrol/v1_test.dart

Issue 2571553005: Api-roll 43: 2016-12-13 (Closed)
Patch Set: Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 86
87 checkCheckRequest(api.CheckRequest o) { 87 checkCheckRequest(api.CheckRequest o) {
88 buildCounterCheckRequest++; 88 buildCounterCheckRequest++;
89 if (buildCounterCheckRequest < 3) { 89 if (buildCounterCheckRequest < 3) {
90 checkOperation(o.operation); 90 checkOperation(o.operation);
91 unittest.expect(o.serviceConfigId, unittest.equals('foo')); 91 unittest.expect(o.serviceConfigId, unittest.equals('foo'));
92 } 92 }
93 buildCounterCheckRequest--; 93 buildCounterCheckRequest--;
94 } 94 }
95 95
96 buildUnnamed1889() { 96 buildUnnamed1642() {
97 var o = new core.List<api.CheckError>(); 97 var o = new core.List<api.CheckError>();
98 o.add(buildCheckError()); 98 o.add(buildCheckError());
99 o.add(buildCheckError()); 99 o.add(buildCheckError());
100 return o; 100 return o;
101 } 101 }
102 102
103 checkUnnamed1889(core.List<api.CheckError> o) { 103 checkUnnamed1642(core.List<api.CheckError> o) {
104 unittest.expect(o, unittest.hasLength(2)); 104 unittest.expect(o, unittest.hasLength(2));
105 checkCheckError(o[0]); 105 checkCheckError(o[0]);
106 checkCheckError(o[1]); 106 checkCheckError(o[1]);
107 } 107 }
108 108
109 core.int buildCounterCheckResponse = 0; 109 core.int buildCounterCheckResponse = 0;
110 buildCheckResponse() { 110 buildCheckResponse() {
111 var o = new api.CheckResponse(); 111 var o = new api.CheckResponse();
112 buildCounterCheckResponse++; 112 buildCounterCheckResponse++;
113 if (buildCounterCheckResponse < 3) { 113 if (buildCounterCheckResponse < 3) {
114 o.checkErrors = buildUnnamed1889(); 114 o.checkErrors = buildUnnamed1642();
115 o.operationId = "foo"; 115 o.operationId = "foo";
116 o.serviceConfigId = "foo"; 116 o.serviceConfigId = "foo";
117 } 117 }
118 buildCounterCheckResponse--; 118 buildCounterCheckResponse--;
119 return o; 119 return o;
120 } 120 }
121 121
122 checkCheckResponse(api.CheckResponse o) { 122 checkCheckResponse(api.CheckResponse o) {
123 buildCounterCheckResponse++; 123 buildCounterCheckResponse++;
124 if (buildCounterCheckResponse < 3) { 124 if (buildCounterCheckResponse < 3) {
125 checkUnnamed1889(o.checkErrors); 125 checkUnnamed1642(o.checkErrors);
126 unittest.expect(o.operationId, unittest.equals('foo')); 126 unittest.expect(o.operationId, unittest.equals('foo'));
127 unittest.expect(o.serviceConfigId, unittest.equals('foo')); 127 unittest.expect(o.serviceConfigId, unittest.equals('foo'));
128 } 128 }
129 buildCounterCheckResponse--; 129 buildCounterCheckResponse--;
130 } 130 }
131 131
132 buildUnnamed1890() { 132 buildUnnamed1643() {
133 var o = new core.List<core.String>(); 133 var o = new core.List<core.String>();
134 o.add("foo"); 134 o.add("foo");
135 o.add("foo"); 135 o.add("foo");
136 return o; 136 return o;
137 } 137 }
138 138
139 checkUnnamed1890(core.List<core.String> o) { 139 checkUnnamed1643(core.List<core.String> o) {
140 unittest.expect(o, unittest.hasLength(2)); 140 unittest.expect(o, unittest.hasLength(2));
141 unittest.expect(o[0], unittest.equals('foo')); 141 unittest.expect(o[0], unittest.equals('foo'));
142 unittest.expect(o[1], unittest.equals('foo')); 142 unittest.expect(o[1], unittest.equals('foo'));
143 } 143 }
144 144
145 core.int buildCounterDistribution = 0; 145 core.int buildCounterDistribution = 0;
146 buildDistribution() { 146 buildDistribution() {
147 var o = new api.Distribution(); 147 var o = new api.Distribution();
148 buildCounterDistribution++; 148 buildCounterDistribution++;
149 if (buildCounterDistribution < 3) { 149 if (buildCounterDistribution < 3) {
150 o.bucketCounts = buildUnnamed1890(); 150 o.bucketCounts = buildUnnamed1643();
151 o.count = "foo"; 151 o.count = "foo";
152 o.explicitBuckets = buildExplicitBuckets(); 152 o.explicitBuckets = buildExplicitBuckets();
153 o.exponentialBuckets = buildExponentialBuckets(); 153 o.exponentialBuckets = buildExponentialBuckets();
154 o.linearBuckets = buildLinearBuckets(); 154 o.linearBuckets = buildLinearBuckets();
155 o.maximum = 42.0; 155 o.maximum = 42.0;
156 o.mean = 42.0; 156 o.mean = 42.0;
157 o.minimum = 42.0; 157 o.minimum = 42.0;
158 o.sumOfSquaredDeviation = 42.0; 158 o.sumOfSquaredDeviation = 42.0;
159 } 159 }
160 buildCounterDistribution--; 160 buildCounterDistribution--;
161 return o; 161 return o;
162 } 162 }
163 163
164 checkDistribution(api.Distribution o) { 164 checkDistribution(api.Distribution o) {
165 buildCounterDistribution++; 165 buildCounterDistribution++;
166 if (buildCounterDistribution < 3) { 166 if (buildCounterDistribution < 3) {
167 checkUnnamed1890(o.bucketCounts); 167 checkUnnamed1643(o.bucketCounts);
168 unittest.expect(o.count, unittest.equals('foo')); 168 unittest.expect(o.count, unittest.equals('foo'));
169 checkExplicitBuckets(o.explicitBuckets); 169 checkExplicitBuckets(o.explicitBuckets);
170 checkExponentialBuckets(o.exponentialBuckets); 170 checkExponentialBuckets(o.exponentialBuckets);
171 checkLinearBuckets(o.linearBuckets); 171 checkLinearBuckets(o.linearBuckets);
172 unittest.expect(o.maximum, unittest.equals(42.0)); 172 unittest.expect(o.maximum, unittest.equals(42.0));
173 unittest.expect(o.mean, unittest.equals(42.0)); 173 unittest.expect(o.mean, unittest.equals(42.0));
174 unittest.expect(o.minimum, unittest.equals(42.0)); 174 unittest.expect(o.minimum, unittest.equals(42.0));
175 unittest.expect(o.sumOfSquaredDeviation, unittest.equals(42.0)); 175 unittest.expect(o.sumOfSquaredDeviation, unittest.equals(42.0));
176 } 176 }
177 buildCounterDistribution--; 177 buildCounterDistribution--;
178 } 178 }
179 179
180 buildUnnamed1891() { 180 buildUnnamed1644() {
181 var o = new core.List<core.double>(); 181 var o = new core.List<core.double>();
182 o.add(42.0); 182 o.add(42.0);
183 o.add(42.0); 183 o.add(42.0);
184 return o; 184 return o;
185 } 185 }
186 186
187 checkUnnamed1891(core.List<core.double> o) { 187 checkUnnamed1644(core.List<core.double> o) {
188 unittest.expect(o, unittest.hasLength(2)); 188 unittest.expect(o, unittest.hasLength(2));
189 unittest.expect(o[0], unittest.equals(42.0)); 189 unittest.expect(o[0], unittest.equals(42.0));
190 unittest.expect(o[1], unittest.equals(42.0)); 190 unittest.expect(o[1], unittest.equals(42.0));
191 } 191 }
192 192
193 core.int buildCounterExplicitBuckets = 0; 193 core.int buildCounterExplicitBuckets = 0;
194 buildExplicitBuckets() { 194 buildExplicitBuckets() {
195 var o = new api.ExplicitBuckets(); 195 var o = new api.ExplicitBuckets();
196 buildCounterExplicitBuckets++; 196 buildCounterExplicitBuckets++;
197 if (buildCounterExplicitBuckets < 3) { 197 if (buildCounterExplicitBuckets < 3) {
198 o.bounds = buildUnnamed1891(); 198 o.bounds = buildUnnamed1644();
199 } 199 }
200 buildCounterExplicitBuckets--; 200 buildCounterExplicitBuckets--;
201 return o; 201 return o;
202 } 202 }
203 203
204 checkExplicitBuckets(api.ExplicitBuckets o) { 204 checkExplicitBuckets(api.ExplicitBuckets o) {
205 buildCounterExplicitBuckets++; 205 buildCounterExplicitBuckets++;
206 if (buildCounterExplicitBuckets < 3) { 206 if (buildCounterExplicitBuckets < 3) {
207 checkUnnamed1891(o.bounds); 207 checkUnnamed1644(o.bounds);
208 } 208 }
209 buildCounterExplicitBuckets--; 209 buildCounterExplicitBuckets--;
210 } 210 }
211 211
212 core.int buildCounterExponentialBuckets = 0; 212 core.int buildCounterExponentialBuckets = 0;
213 buildExponentialBuckets() { 213 buildExponentialBuckets() {
214 var o = new api.ExponentialBuckets(); 214 var o = new api.ExponentialBuckets();
215 buildCounterExponentialBuckets++; 215 buildCounterExponentialBuckets++;
216 if (buildCounterExponentialBuckets < 3) { 216 if (buildCounterExponentialBuckets < 3) {
217 o.growthFactor = 42.0; 217 o.growthFactor = 42.0;
(...skipping 30 matching lines...) Expand all
248 checkLinearBuckets(api.LinearBuckets o) { 248 checkLinearBuckets(api.LinearBuckets o) {
249 buildCounterLinearBuckets++; 249 buildCounterLinearBuckets++;
250 if (buildCounterLinearBuckets < 3) { 250 if (buildCounterLinearBuckets < 3) {
251 unittest.expect(o.numFiniteBuckets, unittest.equals(42)); 251 unittest.expect(o.numFiniteBuckets, unittest.equals(42));
252 unittest.expect(o.offset, unittest.equals(42.0)); 252 unittest.expect(o.offset, unittest.equals(42.0));
253 unittest.expect(o.width, unittest.equals(42.0)); 253 unittest.expect(o.width, unittest.equals(42.0));
254 } 254 }
255 buildCounterLinearBuckets--; 255 buildCounterLinearBuckets--;
256 } 256 }
257 257
258 buildUnnamed1892() { 258 buildUnnamed1645() {
259 var o = new core.Map<core.String, core.String>(); 259 var o = new core.Map<core.String, core.String>();
260 o["x"] = "foo"; 260 o["x"] = "foo";
261 o["y"] = "foo"; 261 o["y"] = "foo";
262 return o; 262 return o;
263 } 263 }
264 264
265 checkUnnamed1892(core.Map<core.String, core.String> o) { 265 checkUnnamed1645(core.Map<core.String, core.String> o) {
266 unittest.expect(o, unittest.hasLength(2)); 266 unittest.expect(o, unittest.hasLength(2));
267 unittest.expect(o["x"], unittest.equals('foo')); 267 unittest.expect(o["x"], unittest.equals('foo'));
268 unittest.expect(o["y"], unittest.equals('foo')); 268 unittest.expect(o["y"], unittest.equals('foo'));
269 } 269 }
270 270
271 buildUnnamed1893() { 271 buildUnnamed1646() {
272 var o = new core.Map<core.String, core.Object>(); 272 var o = new core.Map<core.String, core.Object>();
273 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; 273 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'};
274 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; 274 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'};
275 return o; 275 return o;
276 } 276 }
277 277
278 checkUnnamed1893(core.Map<core.String, core.Object> o) { 278 checkUnnamed1646(core.Map<core.String, core.Object> o) {
279 unittest.expect(o, unittest.hasLength(2)); 279 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')); 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'));
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')); 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'));
282 } 282 }
283 283
284 buildUnnamed1894() { 284 buildUnnamed1647() {
285 var o = new core.Map<core.String, core.Object>(); 285 var o = new core.Map<core.String, core.Object>();
286 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; 286 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'};
287 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; 287 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'};
288 return o; 288 return o;
289 } 289 }
290 290
291 checkUnnamed1894(core.Map<core.String, core.Object> o) { 291 checkUnnamed1647(core.Map<core.String, core.Object> o) {
292 unittest.expect(o, unittest.hasLength(2)); 292 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')); 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'));
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')); 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'));
295 } 295 }
296 296
297 core.int buildCounterLogEntry = 0; 297 core.int buildCounterLogEntry = 0;
298 buildLogEntry() { 298 buildLogEntry() {
299 var o = new api.LogEntry(); 299 var o = new api.LogEntry();
300 buildCounterLogEntry++; 300 buildCounterLogEntry++;
301 if (buildCounterLogEntry < 3) { 301 if (buildCounterLogEntry < 3) {
302 o.insertId = "foo"; 302 o.insertId = "foo";
303 o.labels = buildUnnamed1892(); 303 o.labels = buildUnnamed1645();
304 o.name = "foo"; 304 o.name = "foo";
305 o.protoPayload = buildUnnamed1893(); 305 o.protoPayload = buildUnnamed1646();
306 o.severity = "foo"; 306 o.severity = "foo";
307 o.structPayload = buildUnnamed1894(); 307 o.structPayload = buildUnnamed1647();
308 o.textPayload = "foo"; 308 o.textPayload = "foo";
309 o.timestamp = "foo"; 309 o.timestamp = "foo";
310 } 310 }
311 buildCounterLogEntry--; 311 buildCounterLogEntry--;
312 return o; 312 return o;
313 } 313 }
314 314
315 checkLogEntry(api.LogEntry o) { 315 checkLogEntry(api.LogEntry o) {
316 buildCounterLogEntry++; 316 buildCounterLogEntry++;
317 if (buildCounterLogEntry < 3) { 317 if (buildCounterLogEntry < 3) {
318 unittest.expect(o.insertId, unittest.equals('foo')); 318 unittest.expect(o.insertId, unittest.equals('foo'));
319 checkUnnamed1892(o.labels); 319 checkUnnamed1645(o.labels);
320 unittest.expect(o.name, unittest.equals('foo')); 320 unittest.expect(o.name, unittest.equals('foo'));
321 checkUnnamed1893(o.protoPayload); 321 checkUnnamed1646(o.protoPayload);
322 unittest.expect(o.severity, unittest.equals('foo')); 322 unittest.expect(o.severity, unittest.equals('foo'));
323 checkUnnamed1894(o.structPayload); 323 checkUnnamed1647(o.structPayload);
324 unittest.expect(o.textPayload, unittest.equals('foo')); 324 unittest.expect(o.textPayload, unittest.equals('foo'));
325 unittest.expect(o.timestamp, unittest.equals('foo')); 325 unittest.expect(o.timestamp, unittest.equals('foo'));
326 } 326 }
327 buildCounterLogEntry--; 327 buildCounterLogEntry--;
328 } 328 }
329 329
330 buildUnnamed1895() { 330 buildUnnamed1648() {
331 var o = new core.Map<core.String, core.String>(); 331 var o = new core.Map<core.String, core.String>();
332 o["x"] = "foo"; 332 o["x"] = "foo";
333 o["y"] = "foo"; 333 o["y"] = "foo";
334 return o; 334 return o;
335 } 335 }
336 336
337 checkUnnamed1895(core.Map<core.String, core.String> o) { 337 checkUnnamed1648(core.Map<core.String, core.String> o) {
338 unittest.expect(o, unittest.hasLength(2)); 338 unittest.expect(o, unittest.hasLength(2));
339 unittest.expect(o["x"], unittest.equals('foo')); 339 unittest.expect(o["x"], unittest.equals('foo'));
340 unittest.expect(o["y"], unittest.equals('foo')); 340 unittest.expect(o["y"], unittest.equals('foo'));
341 } 341 }
342 342
343 core.int buildCounterMetricValue = 0; 343 core.int buildCounterMetricValue = 0;
344 buildMetricValue() { 344 buildMetricValue() {
345 var o = new api.MetricValue(); 345 var o = new api.MetricValue();
346 buildCounterMetricValue++; 346 buildCounterMetricValue++;
347 if (buildCounterMetricValue < 3) { 347 if (buildCounterMetricValue < 3) {
348 o.boolValue = true; 348 o.boolValue = true;
349 o.distributionValue = buildDistribution(); 349 o.distributionValue = buildDistribution();
350 o.doubleValue = 42.0; 350 o.doubleValue = 42.0;
351 o.endTime = "foo"; 351 o.endTime = "foo";
352 o.int64Value = "foo"; 352 o.int64Value = "foo";
353 o.labels = buildUnnamed1895(); 353 o.labels = buildUnnamed1648();
354 o.startTime = "foo"; 354 o.startTime = "foo";
355 o.stringValue = "foo"; 355 o.stringValue = "foo";
356 } 356 }
357 buildCounterMetricValue--; 357 buildCounterMetricValue--;
358 return o; 358 return o;
359 } 359 }
360 360
361 checkMetricValue(api.MetricValue o) { 361 checkMetricValue(api.MetricValue o) {
362 buildCounterMetricValue++; 362 buildCounterMetricValue++;
363 if (buildCounterMetricValue < 3) { 363 if (buildCounterMetricValue < 3) {
364 unittest.expect(o.boolValue, unittest.isTrue); 364 unittest.expect(o.boolValue, unittest.isTrue);
365 checkDistribution(o.distributionValue); 365 checkDistribution(o.distributionValue);
366 unittest.expect(o.doubleValue, unittest.equals(42.0)); 366 unittest.expect(o.doubleValue, unittest.equals(42.0));
367 unittest.expect(o.endTime, unittest.equals('foo')); 367 unittest.expect(o.endTime, unittest.equals('foo'));
368 unittest.expect(o.int64Value, unittest.equals('foo')); 368 unittest.expect(o.int64Value, unittest.equals('foo'));
369 checkUnnamed1895(o.labels); 369 checkUnnamed1648(o.labels);
370 unittest.expect(o.startTime, unittest.equals('foo')); 370 unittest.expect(o.startTime, unittest.equals('foo'));
371 unittest.expect(o.stringValue, unittest.equals('foo')); 371 unittest.expect(o.stringValue, unittest.equals('foo'));
372 } 372 }
373 buildCounterMetricValue--; 373 buildCounterMetricValue--;
374 } 374 }
375 375
376 buildUnnamed1896() { 376 buildUnnamed1649() {
377 var o = new core.List<api.MetricValue>(); 377 var o = new core.List<api.MetricValue>();
378 o.add(buildMetricValue()); 378 o.add(buildMetricValue());
379 o.add(buildMetricValue()); 379 o.add(buildMetricValue());
380 return o; 380 return o;
381 } 381 }
382 382
383 checkUnnamed1896(core.List<api.MetricValue> o) { 383 checkUnnamed1649(core.List<api.MetricValue> o) {
384 unittest.expect(o, unittest.hasLength(2)); 384 unittest.expect(o, unittest.hasLength(2));
385 checkMetricValue(o[0]); 385 checkMetricValue(o[0]);
386 checkMetricValue(o[1]); 386 checkMetricValue(o[1]);
387 } 387 }
388 388
389 core.int buildCounterMetricValueSet = 0; 389 core.int buildCounterMetricValueSet = 0;
390 buildMetricValueSet() { 390 buildMetricValueSet() {
391 var o = new api.MetricValueSet(); 391 var o = new api.MetricValueSet();
392 buildCounterMetricValueSet++; 392 buildCounterMetricValueSet++;
393 if (buildCounterMetricValueSet < 3) { 393 if (buildCounterMetricValueSet < 3) {
394 o.metricName = "foo"; 394 o.metricName = "foo";
395 o.metricValues = buildUnnamed1896(); 395 o.metricValues = buildUnnamed1649();
396 } 396 }
397 buildCounterMetricValueSet--; 397 buildCounterMetricValueSet--;
398 return o; 398 return o;
399 } 399 }
400 400
401 checkMetricValueSet(api.MetricValueSet o) { 401 checkMetricValueSet(api.MetricValueSet o) {
402 buildCounterMetricValueSet++; 402 buildCounterMetricValueSet++;
403 if (buildCounterMetricValueSet < 3) { 403 if (buildCounterMetricValueSet < 3) {
404 unittest.expect(o.metricName, unittest.equals('foo')); 404 unittest.expect(o.metricName, unittest.equals('foo'));
405 checkUnnamed1896(o.metricValues); 405 checkUnnamed1649(o.metricValues);
406 } 406 }
407 buildCounterMetricValueSet--; 407 buildCounterMetricValueSet--;
408 } 408 }
409 409
410 buildUnnamed1897() { 410 buildUnnamed1650() {
411 var o = new core.Map<core.String, core.String>(); 411 var o = new core.Map<core.String, core.String>();
412 o["x"] = "foo"; 412 o["x"] = "foo";
413 o["y"] = "foo"; 413 o["y"] = "foo";
414 return o; 414 return o;
415 } 415 }
416 416
417 checkUnnamed1897(core.Map<core.String, core.String> o) { 417 checkUnnamed1650(core.Map<core.String, core.String> o) {
418 unittest.expect(o, unittest.hasLength(2)); 418 unittest.expect(o, unittest.hasLength(2));
419 unittest.expect(o["x"], unittest.equals('foo')); 419 unittest.expect(o["x"], unittest.equals('foo'));
420 unittest.expect(o["y"], unittest.equals('foo')); 420 unittest.expect(o["y"], unittest.equals('foo'));
421 } 421 }
422 422
423 buildUnnamed1898() { 423 buildUnnamed1651() {
424 var o = new core.List<api.LogEntry>(); 424 var o = new core.List<api.LogEntry>();
425 o.add(buildLogEntry()); 425 o.add(buildLogEntry());
426 o.add(buildLogEntry()); 426 o.add(buildLogEntry());
427 return o; 427 return o;
428 } 428 }
429 429
430 checkUnnamed1898(core.List<api.LogEntry> o) { 430 checkUnnamed1651(core.List<api.LogEntry> o) {
431 unittest.expect(o, unittest.hasLength(2)); 431 unittest.expect(o, unittest.hasLength(2));
432 checkLogEntry(o[0]); 432 checkLogEntry(o[0]);
433 checkLogEntry(o[1]); 433 checkLogEntry(o[1]);
434 } 434 }
435 435
436 buildUnnamed1899() { 436 buildUnnamed1652() {
437 var o = new core.List<api.MetricValueSet>(); 437 var o = new core.List<api.MetricValueSet>();
438 o.add(buildMetricValueSet()); 438 o.add(buildMetricValueSet());
439 o.add(buildMetricValueSet()); 439 o.add(buildMetricValueSet());
440 return o; 440 return o;
441 } 441 }
442 442
443 checkUnnamed1899(core.List<api.MetricValueSet> o) { 443 checkUnnamed1652(core.List<api.MetricValueSet> o) {
444 unittest.expect(o, unittest.hasLength(2)); 444 unittest.expect(o, unittest.hasLength(2));
445 checkMetricValueSet(o[0]); 445 checkMetricValueSet(o[0]);
446 checkMetricValueSet(o[1]); 446 checkMetricValueSet(o[1]);
447 } 447 }
448 448
449 core.int buildCounterOperation = 0; 449 core.int buildCounterOperation = 0;
450 buildOperation() { 450 buildOperation() {
451 var o = new api.Operation(); 451 var o = new api.Operation();
452 buildCounterOperation++; 452 buildCounterOperation++;
453 if (buildCounterOperation < 3) { 453 if (buildCounterOperation < 3) {
454 o.consumerId = "foo"; 454 o.consumerId = "foo";
455 o.endTime = "foo"; 455 o.endTime = "foo";
456 o.importance = "foo"; 456 o.importance = "foo";
457 o.labels = buildUnnamed1897(); 457 o.labels = buildUnnamed1650();
458 o.logEntries = buildUnnamed1898(); 458 o.logEntries = buildUnnamed1651();
459 o.metricValueSets = buildUnnamed1899(); 459 o.metricValueSets = buildUnnamed1652();
460 o.operationId = "foo"; 460 o.operationId = "foo";
461 o.operationName = "foo"; 461 o.operationName = "foo";
462 o.startTime = "foo"; 462 o.startTime = "foo";
463 } 463 }
464 buildCounterOperation--; 464 buildCounterOperation--;
465 return o; 465 return o;
466 } 466 }
467 467
468 checkOperation(api.Operation o) { 468 checkOperation(api.Operation o) {
469 buildCounterOperation++; 469 buildCounterOperation++;
470 if (buildCounterOperation < 3) { 470 if (buildCounterOperation < 3) {
471 unittest.expect(o.consumerId, unittest.equals('foo')); 471 unittest.expect(o.consumerId, unittest.equals('foo'));
472 unittest.expect(o.endTime, unittest.equals('foo')); 472 unittest.expect(o.endTime, unittest.equals('foo'));
473 unittest.expect(o.importance, unittest.equals('foo')); 473 unittest.expect(o.importance, unittest.equals('foo'));
474 checkUnnamed1897(o.labels); 474 checkUnnamed1650(o.labels);
475 checkUnnamed1898(o.logEntries); 475 checkUnnamed1651(o.logEntries);
476 checkUnnamed1899(o.metricValueSets); 476 checkUnnamed1652(o.metricValueSets);
477 unittest.expect(o.operationId, unittest.equals('foo')); 477 unittest.expect(o.operationId, unittest.equals('foo'));
478 unittest.expect(o.operationName, unittest.equals('foo')); 478 unittest.expect(o.operationName, unittest.equals('foo'));
479 unittest.expect(o.startTime, unittest.equals('foo')); 479 unittest.expect(o.startTime, unittest.equals('foo'));
480 } 480 }
481 buildCounterOperation--; 481 buildCounterOperation--;
482 } 482 }
483 483
484 core.int buildCounterReportError = 0; 484 core.int buildCounterReportError = 0;
485 buildReportError() { 485 buildReportError() {
486 var o = new api.ReportError(); 486 var o = new api.ReportError();
487 buildCounterReportError++; 487 buildCounterReportError++;
488 if (buildCounterReportError < 3) { 488 if (buildCounterReportError < 3) {
489 o.operationId = "foo"; 489 o.operationId = "foo";
490 o.status = buildStatus(); 490 o.status = buildStatus();
491 } 491 }
492 buildCounterReportError--; 492 buildCounterReportError--;
493 return o; 493 return o;
494 } 494 }
495 495
496 checkReportError(api.ReportError o) { 496 checkReportError(api.ReportError o) {
497 buildCounterReportError++; 497 buildCounterReportError++;
498 if (buildCounterReportError < 3) { 498 if (buildCounterReportError < 3) {
499 unittest.expect(o.operationId, unittest.equals('foo')); 499 unittest.expect(o.operationId, unittest.equals('foo'));
500 checkStatus(o.status); 500 checkStatus(o.status);
501 } 501 }
502 buildCounterReportError--; 502 buildCounterReportError--;
503 } 503 }
504 504
505 buildUnnamed1900() { 505 buildUnnamed1653() {
506 var o = new core.List<api.Operation>(); 506 var o = new core.List<api.Operation>();
507 o.add(buildOperation()); 507 o.add(buildOperation());
508 o.add(buildOperation()); 508 o.add(buildOperation());
509 return o; 509 return o;
510 } 510 }
511 511
512 checkUnnamed1900(core.List<api.Operation> o) { 512 checkUnnamed1653(core.List<api.Operation> o) {
513 unittest.expect(o, unittest.hasLength(2)); 513 unittest.expect(o, unittest.hasLength(2));
514 checkOperation(o[0]); 514 checkOperation(o[0]);
515 checkOperation(o[1]); 515 checkOperation(o[1]);
516 } 516 }
517 517
518 core.int buildCounterReportRequest = 0; 518 core.int buildCounterReportRequest = 0;
519 buildReportRequest() { 519 buildReportRequest() {
520 var o = new api.ReportRequest(); 520 var o = new api.ReportRequest();
521 buildCounterReportRequest++; 521 buildCounterReportRequest++;
522 if (buildCounterReportRequest < 3) { 522 if (buildCounterReportRequest < 3) {
523 o.operations = buildUnnamed1900(); 523 o.operations = buildUnnamed1653();
524 o.serviceConfigId = "foo"; 524 o.serviceConfigId = "foo";
525 } 525 }
526 buildCounterReportRequest--; 526 buildCounterReportRequest--;
527 return o; 527 return o;
528 } 528 }
529 529
530 checkReportRequest(api.ReportRequest o) { 530 checkReportRequest(api.ReportRequest o) {
531 buildCounterReportRequest++; 531 buildCounterReportRequest++;
532 if (buildCounterReportRequest < 3) { 532 if (buildCounterReportRequest < 3) {
533 checkUnnamed1900(o.operations); 533 checkUnnamed1653(o.operations);
534 unittest.expect(o.serviceConfigId, unittest.equals('foo')); 534 unittest.expect(o.serviceConfigId, unittest.equals('foo'));
535 } 535 }
536 buildCounterReportRequest--; 536 buildCounterReportRequest--;
537 } 537 }
538 538
539 buildUnnamed1901() { 539 buildUnnamed1654() {
540 var o = new core.List<api.ReportError>(); 540 var o = new core.List<api.ReportError>();
541 o.add(buildReportError()); 541 o.add(buildReportError());
542 o.add(buildReportError()); 542 o.add(buildReportError());
543 return o; 543 return o;
544 } 544 }
545 545
546 checkUnnamed1901(core.List<api.ReportError> o) { 546 checkUnnamed1654(core.List<api.ReportError> o) {
547 unittest.expect(o, unittest.hasLength(2)); 547 unittest.expect(o, unittest.hasLength(2));
548 checkReportError(o[0]); 548 checkReportError(o[0]);
549 checkReportError(o[1]); 549 checkReportError(o[1]);
550 } 550 }
551 551
552 core.int buildCounterReportResponse = 0; 552 core.int buildCounterReportResponse = 0;
553 buildReportResponse() { 553 buildReportResponse() {
554 var o = new api.ReportResponse(); 554 var o = new api.ReportResponse();
555 buildCounterReportResponse++; 555 buildCounterReportResponse++;
556 if (buildCounterReportResponse < 3) { 556 if (buildCounterReportResponse < 3) {
557 o.reportErrors = buildUnnamed1901(); 557 o.reportErrors = buildUnnamed1654();
558 o.serviceConfigId = "foo"; 558 o.serviceConfigId = "foo";
559 } 559 }
560 buildCounterReportResponse--; 560 buildCounterReportResponse--;
561 return o; 561 return o;
562 } 562 }
563 563
564 checkReportResponse(api.ReportResponse o) { 564 checkReportResponse(api.ReportResponse o) {
565 buildCounterReportResponse++; 565 buildCounterReportResponse++;
566 if (buildCounterReportResponse < 3) { 566 if (buildCounterReportResponse < 3) {
567 checkUnnamed1901(o.reportErrors); 567 checkUnnamed1654(o.reportErrors);
568 unittest.expect(o.serviceConfigId, unittest.equals('foo')); 568 unittest.expect(o.serviceConfigId, unittest.equals('foo'));
569 } 569 }
570 buildCounterReportResponse--; 570 buildCounterReportResponse--;
571 } 571 }
572 572
573 buildUnnamed1902() { 573 buildUnnamed1655() {
574 var o = new core.Map<core.String, core.Object>(); 574 var o = new core.Map<core.String, core.Object>();
575 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; 575 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'};
576 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; 576 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'};
577 return o; 577 return o;
578 } 578 }
579 579
580 checkUnnamed1902(core.Map<core.String, core.Object> o) { 580 checkUnnamed1655(core.Map<core.String, core.Object> o) {
581 unittest.expect(o, unittest.hasLength(2)); 581 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')); 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'));
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')); 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'));
584 } 584 }
585 585
586 buildUnnamed1903() { 586 buildUnnamed1656() {
587 var o = new core.List<core.Map<core.String, core.Object>>(); 587 var o = new core.List<core.Map<core.String, core.Object>>();
588 o.add(buildUnnamed1902()); 588 o.add(buildUnnamed1655());
589 o.add(buildUnnamed1902()); 589 o.add(buildUnnamed1655());
590 return o; 590 return o;
591 } 591 }
592 592
593 checkUnnamed1903(core.List<core.Map<core.String, core.Object>> o) { 593 checkUnnamed1656(core.List<core.Map<core.String, core.Object>> o) {
594 unittest.expect(o, unittest.hasLength(2)); 594 unittest.expect(o, unittest.hasLength(2));
595 checkUnnamed1902(o[0]); 595 checkUnnamed1655(o[0]);
596 checkUnnamed1902(o[1]); 596 checkUnnamed1655(o[1]);
597 } 597 }
598 598
599 core.int buildCounterStatus = 0; 599 core.int buildCounterStatus = 0;
600 buildStatus() { 600 buildStatus() {
601 var o = new api.Status(); 601 var o = new api.Status();
602 buildCounterStatus++; 602 buildCounterStatus++;
603 if (buildCounterStatus < 3) { 603 if (buildCounterStatus < 3) {
604 o.code = 42; 604 o.code = 42;
605 o.details = buildUnnamed1903(); 605 o.details = buildUnnamed1656();
606 o.message = "foo"; 606 o.message = "foo";
607 } 607 }
608 buildCounterStatus--; 608 buildCounterStatus--;
609 return o; 609 return o;
610 } 610 }
611 611
612 checkStatus(api.Status o) { 612 checkStatus(api.Status o) {
613 buildCounterStatus++; 613 buildCounterStatus++;
614 if (buildCounterStatus < 3) { 614 if (buildCounterStatus < 3) {
615 unittest.expect(o.code, unittest.equals(42)); 615 unittest.expect(o.code, unittest.equals(42));
616 checkUnnamed1903(o.details); 616 checkUnnamed1656(o.details);
617 unittest.expect(o.message, unittest.equals('foo')); 617 unittest.expect(o.message, unittest.equals('foo'));
618 } 618 }
619 buildCounterStatus--; 619 buildCounterStatus--;
620 } 620 }
621 621
622 622
623 main() { 623 main() {
624 unittest.group("obj-schema-CheckError", () { 624 unittest.group("obj-schema-CheckError", () {
625 unittest.test("to-json--from-json", () { 625 unittest.test("to-json--from-json", () {
626 var o = buildCheckError(); 626 var o = buildCheckError();
(...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after
865 res.report(arg_request, arg_serviceName).then(unittest.expectAsync(((api.R eportResponse response) { 865 res.report(arg_request, arg_serviceName).then(unittest.expectAsync(((api.R eportResponse response) {
866 checkReportResponse(response); 866 checkReportResponse(response);
867 }))); 867 })));
868 }); 868 });
869 869
870 }); 870 });
871 871
872 872
873 } 873 }
874 874
OLDNEW
« no previous file with comments | « generated/googleapis/test/script/v1_test.dart ('k') | generated/googleapis/test/servicemanagement/v1_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698