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

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

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