OLD | NEW |
1 library googleapis.monitoring.v3.test; | 1 library googleapis.monitoring.v3.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 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
67 checkBucketOptions(api.BucketOptions o) { | 67 checkBucketOptions(api.BucketOptions o) { |
68 buildCounterBucketOptions++; | 68 buildCounterBucketOptions++; |
69 if (buildCounterBucketOptions < 3) { | 69 if (buildCounterBucketOptions < 3) { |
70 checkExplicit(o.explicitBuckets); | 70 checkExplicit(o.explicitBuckets); |
71 checkExponential(o.exponentialBuckets); | 71 checkExponential(o.exponentialBuckets); |
72 checkLinear(o.linearBuckets); | 72 checkLinear(o.linearBuckets); |
73 } | 73 } |
74 buildCounterBucketOptions--; | 74 buildCounterBucketOptions--; |
75 } | 75 } |
76 | 76 |
77 buildUnnamed1274() { | 77 buildUnnamed1286() { |
78 var o = new core.Map<core.String, api.TypedValue>(); | 78 var o = new core.Map<core.String, api.TypedValue>(); |
79 o["x"] = buildTypedValue(); | 79 o["x"] = buildTypedValue(); |
80 o["y"] = buildTypedValue(); | 80 o["y"] = buildTypedValue(); |
81 return o; | 81 return o; |
82 } | 82 } |
83 | 83 |
84 checkUnnamed1274(core.Map<core.String, api.TypedValue> o) { | 84 checkUnnamed1286(core.Map<core.String, api.TypedValue> o) { |
85 unittest.expect(o, unittest.hasLength(2)); | 85 unittest.expect(o, unittest.hasLength(2)); |
86 checkTypedValue(o["x"]); | 86 checkTypedValue(o["x"]); |
87 checkTypedValue(o["y"]); | 87 checkTypedValue(o["y"]); |
88 } | 88 } |
89 | 89 |
90 buildUnnamed1275() { | 90 buildUnnamed1287() { |
91 var o = new core.List<api.CollectdValue>(); | 91 var o = new core.List<api.CollectdValue>(); |
92 o.add(buildCollectdValue()); | 92 o.add(buildCollectdValue()); |
93 o.add(buildCollectdValue()); | 93 o.add(buildCollectdValue()); |
94 return o; | 94 return o; |
95 } | 95 } |
96 | 96 |
97 checkUnnamed1275(core.List<api.CollectdValue> o) { | 97 checkUnnamed1287(core.List<api.CollectdValue> o) { |
98 unittest.expect(o, unittest.hasLength(2)); | 98 unittest.expect(o, unittest.hasLength(2)); |
99 checkCollectdValue(o[0]); | 99 checkCollectdValue(o[0]); |
100 checkCollectdValue(o[1]); | 100 checkCollectdValue(o[1]); |
101 } | 101 } |
102 | 102 |
103 core.int buildCounterCollectdPayload = 0; | 103 core.int buildCounterCollectdPayload = 0; |
104 buildCollectdPayload() { | 104 buildCollectdPayload() { |
105 var o = new api.CollectdPayload(); | 105 var o = new api.CollectdPayload(); |
106 buildCounterCollectdPayload++; | 106 buildCounterCollectdPayload++; |
107 if (buildCounterCollectdPayload < 3) { | 107 if (buildCounterCollectdPayload < 3) { |
108 o.endTime = "foo"; | 108 o.endTime = "foo"; |
109 o.metadata = buildUnnamed1274(); | 109 o.metadata = buildUnnamed1286(); |
110 o.plugin = "foo"; | 110 o.plugin = "foo"; |
111 o.pluginInstance = "foo"; | 111 o.pluginInstance = "foo"; |
112 o.startTime = "foo"; | 112 o.startTime = "foo"; |
113 o.type = "foo"; | 113 o.type = "foo"; |
114 o.typeInstance = "foo"; | 114 o.typeInstance = "foo"; |
115 o.values = buildUnnamed1275(); | 115 o.values = buildUnnamed1287(); |
116 } | 116 } |
117 buildCounterCollectdPayload--; | 117 buildCounterCollectdPayload--; |
118 return o; | 118 return o; |
119 } | 119 } |
120 | 120 |
121 checkCollectdPayload(api.CollectdPayload o) { | 121 checkCollectdPayload(api.CollectdPayload o) { |
122 buildCounterCollectdPayload++; | 122 buildCounterCollectdPayload++; |
123 if (buildCounterCollectdPayload < 3) { | 123 if (buildCounterCollectdPayload < 3) { |
124 unittest.expect(o.endTime, unittest.equals('foo')); | 124 unittest.expect(o.endTime, unittest.equals('foo')); |
125 checkUnnamed1274(o.metadata); | 125 checkUnnamed1286(o.metadata); |
126 unittest.expect(o.plugin, unittest.equals('foo')); | 126 unittest.expect(o.plugin, unittest.equals('foo')); |
127 unittest.expect(o.pluginInstance, unittest.equals('foo')); | 127 unittest.expect(o.pluginInstance, unittest.equals('foo')); |
128 unittest.expect(o.startTime, unittest.equals('foo')); | 128 unittest.expect(o.startTime, unittest.equals('foo')); |
129 unittest.expect(o.type, unittest.equals('foo')); | 129 unittest.expect(o.type, unittest.equals('foo')); |
130 unittest.expect(o.typeInstance, unittest.equals('foo')); | 130 unittest.expect(o.typeInstance, unittest.equals('foo')); |
131 checkUnnamed1275(o.values); | 131 checkUnnamed1287(o.values); |
132 } | 132 } |
133 buildCounterCollectdPayload--; | 133 buildCounterCollectdPayload--; |
134 } | 134 } |
135 | 135 |
136 core.int buildCounterCollectdValue = 0; | 136 core.int buildCounterCollectdValue = 0; |
137 buildCollectdValue() { | 137 buildCollectdValue() { |
138 var o = new api.CollectdValue(); | 138 var o = new api.CollectdValue(); |
139 buildCounterCollectdValue++; | 139 buildCounterCollectdValue++; |
140 if (buildCounterCollectdValue < 3) { | 140 if (buildCounterCollectdValue < 3) { |
141 o.dataSourceName = "foo"; | 141 o.dataSourceName = "foo"; |
142 o.dataSourceType = "foo"; | 142 o.dataSourceType = "foo"; |
143 o.value = buildTypedValue(); | 143 o.value = buildTypedValue(); |
144 } | 144 } |
145 buildCounterCollectdValue--; | 145 buildCounterCollectdValue--; |
146 return o; | 146 return o; |
147 } | 147 } |
148 | 148 |
149 checkCollectdValue(api.CollectdValue o) { | 149 checkCollectdValue(api.CollectdValue o) { |
150 buildCounterCollectdValue++; | 150 buildCounterCollectdValue++; |
151 if (buildCounterCollectdValue < 3) { | 151 if (buildCounterCollectdValue < 3) { |
152 unittest.expect(o.dataSourceName, unittest.equals('foo')); | 152 unittest.expect(o.dataSourceName, unittest.equals('foo')); |
153 unittest.expect(o.dataSourceType, unittest.equals('foo')); | 153 unittest.expect(o.dataSourceType, unittest.equals('foo')); |
154 checkTypedValue(o.value); | 154 checkTypedValue(o.value); |
155 } | 155 } |
156 buildCounterCollectdValue--; | 156 buildCounterCollectdValue--; |
157 } | 157 } |
158 | 158 |
159 buildUnnamed1276() { | 159 buildUnnamed1288() { |
160 var o = new core.List<api.CollectdPayload>(); | 160 var o = new core.List<api.CollectdPayload>(); |
161 o.add(buildCollectdPayload()); | 161 o.add(buildCollectdPayload()); |
162 o.add(buildCollectdPayload()); | 162 o.add(buildCollectdPayload()); |
163 return o; | 163 return o; |
164 } | 164 } |
165 | 165 |
166 checkUnnamed1276(core.List<api.CollectdPayload> o) { | 166 checkUnnamed1288(core.List<api.CollectdPayload> o) { |
167 unittest.expect(o, unittest.hasLength(2)); | 167 unittest.expect(o, unittest.hasLength(2)); |
168 checkCollectdPayload(o[0]); | 168 checkCollectdPayload(o[0]); |
169 checkCollectdPayload(o[1]); | 169 checkCollectdPayload(o[1]); |
170 } | 170 } |
171 | 171 |
172 core.int buildCounterCreateCollectdTimeSeriesRequest = 0; | 172 core.int buildCounterCreateCollectdTimeSeriesRequest = 0; |
173 buildCreateCollectdTimeSeriesRequest() { | 173 buildCreateCollectdTimeSeriesRequest() { |
174 var o = new api.CreateCollectdTimeSeriesRequest(); | 174 var o = new api.CreateCollectdTimeSeriesRequest(); |
175 buildCounterCreateCollectdTimeSeriesRequest++; | 175 buildCounterCreateCollectdTimeSeriesRequest++; |
176 if (buildCounterCreateCollectdTimeSeriesRequest < 3) { | 176 if (buildCounterCreateCollectdTimeSeriesRequest < 3) { |
177 o.collectdPayloads = buildUnnamed1276(); | 177 o.collectdPayloads = buildUnnamed1288(); |
178 o.collectdVersion = "foo"; | 178 o.collectdVersion = "foo"; |
179 o.resource = buildMonitoredResource(); | 179 o.resource = buildMonitoredResource(); |
180 } | 180 } |
181 buildCounterCreateCollectdTimeSeriesRequest--; | 181 buildCounterCreateCollectdTimeSeriesRequest--; |
182 return o; | 182 return o; |
183 } | 183 } |
184 | 184 |
185 checkCreateCollectdTimeSeriesRequest(api.CreateCollectdTimeSeriesRequest o) { | 185 checkCreateCollectdTimeSeriesRequest(api.CreateCollectdTimeSeriesRequest o) { |
186 buildCounterCreateCollectdTimeSeriesRequest++; | 186 buildCounterCreateCollectdTimeSeriesRequest++; |
187 if (buildCounterCreateCollectdTimeSeriesRequest < 3) { | 187 if (buildCounterCreateCollectdTimeSeriesRequest < 3) { |
188 checkUnnamed1276(o.collectdPayloads); | 188 checkUnnamed1288(o.collectdPayloads); |
189 unittest.expect(o.collectdVersion, unittest.equals('foo')); | 189 unittest.expect(o.collectdVersion, unittest.equals('foo')); |
190 checkMonitoredResource(o.resource); | 190 checkMonitoredResource(o.resource); |
191 } | 191 } |
192 buildCounterCreateCollectdTimeSeriesRequest--; | 192 buildCounterCreateCollectdTimeSeriesRequest--; |
193 } | 193 } |
194 | 194 |
195 buildUnnamed1277() { | 195 buildUnnamed1289() { |
196 var o = new core.List<api.TimeSeries>(); | 196 var o = new core.List<api.TimeSeries>(); |
197 o.add(buildTimeSeries()); | 197 o.add(buildTimeSeries()); |
198 o.add(buildTimeSeries()); | 198 o.add(buildTimeSeries()); |
199 return o; | 199 return o; |
200 } | 200 } |
201 | 201 |
202 checkUnnamed1277(core.List<api.TimeSeries> o) { | 202 checkUnnamed1289(core.List<api.TimeSeries> o) { |
203 unittest.expect(o, unittest.hasLength(2)); | 203 unittest.expect(o, unittest.hasLength(2)); |
204 checkTimeSeries(o[0]); | 204 checkTimeSeries(o[0]); |
205 checkTimeSeries(o[1]); | 205 checkTimeSeries(o[1]); |
206 } | 206 } |
207 | 207 |
208 core.int buildCounterCreateTimeSeriesRequest = 0; | 208 core.int buildCounterCreateTimeSeriesRequest = 0; |
209 buildCreateTimeSeriesRequest() { | 209 buildCreateTimeSeriesRequest() { |
210 var o = new api.CreateTimeSeriesRequest(); | 210 var o = new api.CreateTimeSeriesRequest(); |
211 buildCounterCreateTimeSeriesRequest++; | 211 buildCounterCreateTimeSeriesRequest++; |
212 if (buildCounterCreateTimeSeriesRequest < 3) { | 212 if (buildCounterCreateTimeSeriesRequest < 3) { |
213 o.timeSeries = buildUnnamed1277(); | 213 o.timeSeries = buildUnnamed1289(); |
214 } | 214 } |
215 buildCounterCreateTimeSeriesRequest--; | 215 buildCounterCreateTimeSeriesRequest--; |
216 return o; | 216 return o; |
217 } | 217 } |
218 | 218 |
219 checkCreateTimeSeriesRequest(api.CreateTimeSeriesRequest o) { | 219 checkCreateTimeSeriesRequest(api.CreateTimeSeriesRequest o) { |
220 buildCounterCreateTimeSeriesRequest++; | 220 buildCounterCreateTimeSeriesRequest++; |
221 if (buildCounterCreateTimeSeriesRequest < 3) { | 221 if (buildCounterCreateTimeSeriesRequest < 3) { |
222 checkUnnamed1277(o.timeSeries); | 222 checkUnnamed1289(o.timeSeries); |
223 } | 223 } |
224 buildCounterCreateTimeSeriesRequest--; | 224 buildCounterCreateTimeSeriesRequest--; |
225 } | 225 } |
226 | 226 |
227 buildUnnamed1278() { | 227 buildUnnamed1290() { |
228 var o = new core.List<core.String>(); | 228 var o = new core.List<core.String>(); |
229 o.add("foo"); | 229 o.add("foo"); |
230 o.add("foo"); | 230 o.add("foo"); |
231 return o; | 231 return o; |
232 } | 232 } |
233 | 233 |
234 checkUnnamed1278(core.List<core.String> o) { | 234 checkUnnamed1290(core.List<core.String> o) { |
235 unittest.expect(o, unittest.hasLength(2)); | 235 unittest.expect(o, unittest.hasLength(2)); |
236 unittest.expect(o[0], unittest.equals('foo')); | 236 unittest.expect(o[0], unittest.equals('foo')); |
237 unittest.expect(o[1], unittest.equals('foo')); | 237 unittest.expect(o[1], unittest.equals('foo')); |
238 } | 238 } |
239 | 239 |
240 core.int buildCounterDistribution = 0; | 240 core.int buildCounterDistribution = 0; |
241 buildDistribution() { | 241 buildDistribution() { |
242 var o = new api.Distribution(); | 242 var o = new api.Distribution(); |
243 buildCounterDistribution++; | 243 buildCounterDistribution++; |
244 if (buildCounterDistribution < 3) { | 244 if (buildCounterDistribution < 3) { |
245 o.bucketCounts = buildUnnamed1278(); | 245 o.bucketCounts = buildUnnamed1290(); |
246 o.bucketOptions = buildBucketOptions(); | 246 o.bucketOptions = buildBucketOptions(); |
247 o.count = "foo"; | 247 o.count = "foo"; |
248 o.mean = 42.0; | 248 o.mean = 42.0; |
249 o.range = buildRange(); | 249 o.range = buildRange(); |
250 o.sumOfSquaredDeviation = 42.0; | 250 o.sumOfSquaredDeviation = 42.0; |
251 } | 251 } |
252 buildCounterDistribution--; | 252 buildCounterDistribution--; |
253 return o; | 253 return o; |
254 } | 254 } |
255 | 255 |
256 checkDistribution(api.Distribution o) { | 256 checkDistribution(api.Distribution o) { |
257 buildCounterDistribution++; | 257 buildCounterDistribution++; |
258 if (buildCounterDistribution < 3) { | 258 if (buildCounterDistribution < 3) { |
259 checkUnnamed1278(o.bucketCounts); | 259 checkUnnamed1290(o.bucketCounts); |
260 checkBucketOptions(o.bucketOptions); | 260 checkBucketOptions(o.bucketOptions); |
261 unittest.expect(o.count, unittest.equals('foo')); | 261 unittest.expect(o.count, unittest.equals('foo')); |
262 unittest.expect(o.mean, unittest.equals(42.0)); | 262 unittest.expect(o.mean, unittest.equals(42.0)); |
263 checkRange(o.range); | 263 checkRange(o.range); |
264 unittest.expect(o.sumOfSquaredDeviation, unittest.equals(42.0)); | 264 unittest.expect(o.sumOfSquaredDeviation, unittest.equals(42.0)); |
265 } | 265 } |
266 buildCounterDistribution--; | 266 buildCounterDistribution--; |
267 } | 267 } |
268 | 268 |
269 core.int buildCounterEmpty = 0; | 269 core.int buildCounterEmpty = 0; |
270 buildEmpty() { | 270 buildEmpty() { |
271 var o = new api.Empty(); | 271 var o = new api.Empty(); |
272 buildCounterEmpty++; | 272 buildCounterEmpty++; |
273 if (buildCounterEmpty < 3) { | 273 if (buildCounterEmpty < 3) { |
274 } | 274 } |
275 buildCounterEmpty--; | 275 buildCounterEmpty--; |
276 return o; | 276 return o; |
277 } | 277 } |
278 | 278 |
279 checkEmpty(api.Empty o) { | 279 checkEmpty(api.Empty o) { |
280 buildCounterEmpty++; | 280 buildCounterEmpty++; |
281 if (buildCounterEmpty < 3) { | 281 if (buildCounterEmpty < 3) { |
282 } | 282 } |
283 buildCounterEmpty--; | 283 buildCounterEmpty--; |
284 } | 284 } |
285 | 285 |
286 buildUnnamed1279() { | 286 buildUnnamed1291() { |
287 var o = new core.List<core.double>(); | 287 var o = new core.List<core.double>(); |
288 o.add(42.0); | 288 o.add(42.0); |
289 o.add(42.0); | 289 o.add(42.0); |
290 return o; | 290 return o; |
291 } | 291 } |
292 | 292 |
293 checkUnnamed1279(core.List<core.double> o) { | 293 checkUnnamed1291(core.List<core.double> o) { |
294 unittest.expect(o, unittest.hasLength(2)); | 294 unittest.expect(o, unittest.hasLength(2)); |
295 unittest.expect(o[0], unittest.equals(42.0)); | 295 unittest.expect(o[0], unittest.equals(42.0)); |
296 unittest.expect(o[1], unittest.equals(42.0)); | 296 unittest.expect(o[1], unittest.equals(42.0)); |
297 } | 297 } |
298 | 298 |
299 core.int buildCounterExplicit = 0; | 299 core.int buildCounterExplicit = 0; |
300 buildExplicit() { | 300 buildExplicit() { |
301 var o = new api.Explicit(); | 301 var o = new api.Explicit(); |
302 buildCounterExplicit++; | 302 buildCounterExplicit++; |
303 if (buildCounterExplicit < 3) { | 303 if (buildCounterExplicit < 3) { |
304 o.bounds = buildUnnamed1279(); | 304 o.bounds = buildUnnamed1291(); |
305 } | 305 } |
306 buildCounterExplicit--; | 306 buildCounterExplicit--; |
307 return o; | 307 return o; |
308 } | 308 } |
309 | 309 |
310 checkExplicit(api.Explicit o) { | 310 checkExplicit(api.Explicit o) { |
311 buildCounterExplicit++; | 311 buildCounterExplicit++; |
312 if (buildCounterExplicit < 3) { | 312 if (buildCounterExplicit < 3) { |
313 checkUnnamed1279(o.bounds); | 313 checkUnnamed1291(o.bounds); |
314 } | 314 } |
315 buildCounterExplicit--; | 315 buildCounterExplicit--; |
316 } | 316 } |
317 | 317 |
318 core.int buildCounterExponential = 0; | 318 core.int buildCounterExponential = 0; |
319 buildExponential() { | 319 buildExponential() { |
320 var o = new api.Exponential(); | 320 var o = new api.Exponential(); |
321 buildCounterExponential++; | 321 buildCounterExponential++; |
322 if (buildCounterExponential < 3) { | 322 if (buildCounterExponential < 3) { |
323 o.growthFactor = 42.0; | 323 o.growthFactor = 42.0; |
324 o.numFiniteBuckets = 42; | 324 o.numFiniteBuckets = 42; |
325 o.scale = 42.0; | 325 o.scale = 42.0; |
326 } | 326 } |
327 buildCounterExponential--; | 327 buildCounterExponential--; |
328 return o; | 328 return o; |
329 } | 329 } |
330 | 330 |
331 checkExponential(api.Exponential o) { | 331 checkExponential(api.Exponential o) { |
332 buildCounterExponential++; | 332 buildCounterExponential++; |
333 if (buildCounterExponential < 3) { | 333 if (buildCounterExponential < 3) { |
334 unittest.expect(o.growthFactor, unittest.equals(42.0)); | 334 unittest.expect(o.growthFactor, unittest.equals(42.0)); |
335 unittest.expect(o.numFiniteBuckets, unittest.equals(42)); | 335 unittest.expect(o.numFiniteBuckets, unittest.equals(42)); |
336 unittest.expect(o.scale, unittest.equals(42.0)); | 336 unittest.expect(o.scale, unittest.equals(42.0)); |
337 } | 337 } |
338 buildCounterExponential--; | 338 buildCounterExponential--; |
339 } | 339 } |
340 | 340 |
341 buildUnnamed1280() { | 341 buildUnnamed1292() { |
342 var o = new core.List<api.Option>(); | 342 var o = new core.List<api.Option>(); |
343 o.add(buildOption()); | 343 o.add(buildOption()); |
344 o.add(buildOption()); | 344 o.add(buildOption()); |
345 return o; | 345 return o; |
346 } | 346 } |
347 | 347 |
348 checkUnnamed1280(core.List<api.Option> o) { | 348 checkUnnamed1292(core.List<api.Option> o) { |
349 unittest.expect(o, unittest.hasLength(2)); | 349 unittest.expect(o, unittest.hasLength(2)); |
350 checkOption(o[0]); | 350 checkOption(o[0]); |
351 checkOption(o[1]); | 351 checkOption(o[1]); |
352 } | 352 } |
353 | 353 |
354 core.int buildCounterField = 0; | 354 core.int buildCounterField = 0; |
355 buildField() { | 355 buildField() { |
356 var o = new api.Field(); | 356 var o = new api.Field(); |
357 buildCounterField++; | 357 buildCounterField++; |
358 if (buildCounterField < 3) { | 358 if (buildCounterField < 3) { |
359 o.cardinality = "foo"; | 359 o.cardinality = "foo"; |
360 o.defaultValue = "foo"; | 360 o.defaultValue = "foo"; |
361 o.jsonName = "foo"; | 361 o.jsonName = "foo"; |
362 o.kind = "foo"; | 362 o.kind = "foo"; |
363 o.name = "foo"; | 363 o.name = "foo"; |
364 o.number = 42; | 364 o.number = 42; |
365 o.oneofIndex = 42; | 365 o.oneofIndex = 42; |
366 o.options = buildUnnamed1280(); | 366 o.options = buildUnnamed1292(); |
367 o.packed = true; | 367 o.packed = true; |
368 o.typeUrl = "foo"; | 368 o.typeUrl = "foo"; |
369 } | 369 } |
370 buildCounterField--; | 370 buildCounterField--; |
371 return o; | 371 return o; |
372 } | 372 } |
373 | 373 |
374 checkField(api.Field o) { | 374 checkField(api.Field o) { |
375 buildCounterField++; | 375 buildCounterField++; |
376 if (buildCounterField < 3) { | 376 if (buildCounterField < 3) { |
377 unittest.expect(o.cardinality, unittest.equals('foo')); | 377 unittest.expect(o.cardinality, unittest.equals('foo')); |
378 unittest.expect(o.defaultValue, unittest.equals('foo')); | 378 unittest.expect(o.defaultValue, unittest.equals('foo')); |
379 unittest.expect(o.jsonName, unittest.equals('foo')); | 379 unittest.expect(o.jsonName, unittest.equals('foo')); |
380 unittest.expect(o.kind, unittest.equals('foo')); | 380 unittest.expect(o.kind, unittest.equals('foo')); |
381 unittest.expect(o.name, unittest.equals('foo')); | 381 unittest.expect(o.name, unittest.equals('foo')); |
382 unittest.expect(o.number, unittest.equals(42)); | 382 unittest.expect(o.number, unittest.equals(42)); |
383 unittest.expect(o.oneofIndex, unittest.equals(42)); | 383 unittest.expect(o.oneofIndex, unittest.equals(42)); |
384 checkUnnamed1280(o.options); | 384 checkUnnamed1292(o.options); |
385 unittest.expect(o.packed, unittest.isTrue); | 385 unittest.expect(o.packed, unittest.isTrue); |
386 unittest.expect(o.typeUrl, unittest.equals('foo')); | 386 unittest.expect(o.typeUrl, unittest.equals('foo')); |
387 } | 387 } |
388 buildCounterField--; | 388 buildCounterField--; |
389 } | 389 } |
390 | 390 |
391 core.int buildCounterGroup = 0; | 391 core.int buildCounterGroup = 0; |
392 buildGroup() { | 392 buildGroup() { |
393 var o = new api.Group(); | 393 var o = new api.Group(); |
394 buildCounterGroup++; | 394 buildCounterGroup++; |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
454 checkLinear(api.Linear o) { | 454 checkLinear(api.Linear o) { |
455 buildCounterLinear++; | 455 buildCounterLinear++; |
456 if (buildCounterLinear < 3) { | 456 if (buildCounterLinear < 3) { |
457 unittest.expect(o.numFiniteBuckets, unittest.equals(42)); | 457 unittest.expect(o.numFiniteBuckets, unittest.equals(42)); |
458 unittest.expect(o.offset, unittest.equals(42.0)); | 458 unittest.expect(o.offset, unittest.equals(42.0)); |
459 unittest.expect(o.width, unittest.equals(42.0)); | 459 unittest.expect(o.width, unittest.equals(42.0)); |
460 } | 460 } |
461 buildCounterLinear--; | 461 buildCounterLinear--; |
462 } | 462 } |
463 | 463 |
464 buildUnnamed1281() { | 464 buildUnnamed1293() { |
465 var o = new core.List<api.MonitoredResource>(); | 465 var o = new core.List<api.MonitoredResource>(); |
466 o.add(buildMonitoredResource()); | 466 o.add(buildMonitoredResource()); |
467 o.add(buildMonitoredResource()); | 467 o.add(buildMonitoredResource()); |
468 return o; | 468 return o; |
469 } | 469 } |
470 | 470 |
471 checkUnnamed1281(core.List<api.MonitoredResource> o) { | 471 checkUnnamed1293(core.List<api.MonitoredResource> o) { |
472 unittest.expect(o, unittest.hasLength(2)); | 472 unittest.expect(o, unittest.hasLength(2)); |
473 checkMonitoredResource(o[0]); | 473 checkMonitoredResource(o[0]); |
474 checkMonitoredResource(o[1]); | 474 checkMonitoredResource(o[1]); |
475 } | 475 } |
476 | 476 |
477 core.int buildCounterListGroupMembersResponse = 0; | 477 core.int buildCounterListGroupMembersResponse = 0; |
478 buildListGroupMembersResponse() { | 478 buildListGroupMembersResponse() { |
479 var o = new api.ListGroupMembersResponse(); | 479 var o = new api.ListGroupMembersResponse(); |
480 buildCounterListGroupMembersResponse++; | 480 buildCounterListGroupMembersResponse++; |
481 if (buildCounterListGroupMembersResponse < 3) { | 481 if (buildCounterListGroupMembersResponse < 3) { |
482 o.members = buildUnnamed1281(); | 482 o.members = buildUnnamed1293(); |
483 o.nextPageToken = "foo"; | 483 o.nextPageToken = "foo"; |
484 o.totalSize = 42; | 484 o.totalSize = 42; |
485 } | 485 } |
486 buildCounterListGroupMembersResponse--; | 486 buildCounterListGroupMembersResponse--; |
487 return o; | 487 return o; |
488 } | 488 } |
489 | 489 |
490 checkListGroupMembersResponse(api.ListGroupMembersResponse o) { | 490 checkListGroupMembersResponse(api.ListGroupMembersResponse o) { |
491 buildCounterListGroupMembersResponse++; | 491 buildCounterListGroupMembersResponse++; |
492 if (buildCounterListGroupMembersResponse < 3) { | 492 if (buildCounterListGroupMembersResponse < 3) { |
493 checkUnnamed1281(o.members); | 493 checkUnnamed1293(o.members); |
494 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 494 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
495 unittest.expect(o.totalSize, unittest.equals(42)); | 495 unittest.expect(o.totalSize, unittest.equals(42)); |
496 } | 496 } |
497 buildCounterListGroupMembersResponse--; | 497 buildCounterListGroupMembersResponse--; |
498 } | 498 } |
499 | 499 |
500 buildUnnamed1282() { | 500 buildUnnamed1294() { |
501 var o = new core.List<api.Group>(); | 501 var o = new core.List<api.Group>(); |
502 o.add(buildGroup()); | 502 o.add(buildGroup()); |
503 o.add(buildGroup()); | 503 o.add(buildGroup()); |
504 return o; | 504 return o; |
505 } | 505 } |
506 | 506 |
507 checkUnnamed1282(core.List<api.Group> o) { | 507 checkUnnamed1294(core.List<api.Group> o) { |
508 unittest.expect(o, unittest.hasLength(2)); | 508 unittest.expect(o, unittest.hasLength(2)); |
509 checkGroup(o[0]); | 509 checkGroup(o[0]); |
510 checkGroup(o[1]); | 510 checkGroup(o[1]); |
511 } | 511 } |
512 | 512 |
513 core.int buildCounterListGroupsResponse = 0; | 513 core.int buildCounterListGroupsResponse = 0; |
514 buildListGroupsResponse() { | 514 buildListGroupsResponse() { |
515 var o = new api.ListGroupsResponse(); | 515 var o = new api.ListGroupsResponse(); |
516 buildCounterListGroupsResponse++; | 516 buildCounterListGroupsResponse++; |
517 if (buildCounterListGroupsResponse < 3) { | 517 if (buildCounterListGroupsResponse < 3) { |
518 o.group = buildUnnamed1282(); | 518 o.group = buildUnnamed1294(); |
519 o.nextPageToken = "foo"; | 519 o.nextPageToken = "foo"; |
520 } | 520 } |
521 buildCounterListGroupsResponse--; | 521 buildCounterListGroupsResponse--; |
522 return o; | 522 return o; |
523 } | 523 } |
524 | 524 |
525 checkListGroupsResponse(api.ListGroupsResponse o) { | 525 checkListGroupsResponse(api.ListGroupsResponse o) { |
526 buildCounterListGroupsResponse++; | 526 buildCounterListGroupsResponse++; |
527 if (buildCounterListGroupsResponse < 3) { | 527 if (buildCounterListGroupsResponse < 3) { |
528 checkUnnamed1282(o.group); | 528 checkUnnamed1294(o.group); |
529 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 529 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
530 } | 530 } |
531 buildCounterListGroupsResponse--; | 531 buildCounterListGroupsResponse--; |
532 } | 532 } |
533 | 533 |
534 buildUnnamed1283() { | 534 buildUnnamed1295() { |
535 var o = new core.List<api.MetricDescriptor>(); | 535 var o = new core.List<api.MetricDescriptor>(); |
536 o.add(buildMetricDescriptor()); | 536 o.add(buildMetricDescriptor()); |
537 o.add(buildMetricDescriptor()); | 537 o.add(buildMetricDescriptor()); |
538 return o; | 538 return o; |
539 } | 539 } |
540 | 540 |
541 checkUnnamed1283(core.List<api.MetricDescriptor> o) { | 541 checkUnnamed1295(core.List<api.MetricDescriptor> o) { |
542 unittest.expect(o, unittest.hasLength(2)); | 542 unittest.expect(o, unittest.hasLength(2)); |
543 checkMetricDescriptor(o[0]); | 543 checkMetricDescriptor(o[0]); |
544 checkMetricDescriptor(o[1]); | 544 checkMetricDescriptor(o[1]); |
545 } | 545 } |
546 | 546 |
547 core.int buildCounterListMetricDescriptorsResponse = 0; | 547 core.int buildCounterListMetricDescriptorsResponse = 0; |
548 buildListMetricDescriptorsResponse() { | 548 buildListMetricDescriptorsResponse() { |
549 var o = new api.ListMetricDescriptorsResponse(); | 549 var o = new api.ListMetricDescriptorsResponse(); |
550 buildCounterListMetricDescriptorsResponse++; | 550 buildCounterListMetricDescriptorsResponse++; |
551 if (buildCounterListMetricDescriptorsResponse < 3) { | 551 if (buildCounterListMetricDescriptorsResponse < 3) { |
552 o.metricDescriptors = buildUnnamed1283(); | 552 o.metricDescriptors = buildUnnamed1295(); |
553 o.nextPageToken = "foo"; | 553 o.nextPageToken = "foo"; |
554 } | 554 } |
555 buildCounterListMetricDescriptorsResponse--; | 555 buildCounterListMetricDescriptorsResponse--; |
556 return o; | 556 return o; |
557 } | 557 } |
558 | 558 |
559 checkListMetricDescriptorsResponse(api.ListMetricDescriptorsResponse o) { | 559 checkListMetricDescriptorsResponse(api.ListMetricDescriptorsResponse o) { |
560 buildCounterListMetricDescriptorsResponse++; | 560 buildCounterListMetricDescriptorsResponse++; |
561 if (buildCounterListMetricDescriptorsResponse < 3) { | 561 if (buildCounterListMetricDescriptorsResponse < 3) { |
562 checkUnnamed1283(o.metricDescriptors); | 562 checkUnnamed1295(o.metricDescriptors); |
563 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 563 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
564 } | 564 } |
565 buildCounterListMetricDescriptorsResponse--; | 565 buildCounterListMetricDescriptorsResponse--; |
566 } | 566 } |
567 | 567 |
568 buildUnnamed1284() { | 568 buildUnnamed1296() { |
569 var o = new core.List<api.MonitoredResourceDescriptor>(); | 569 var o = new core.List<api.MonitoredResourceDescriptor>(); |
570 o.add(buildMonitoredResourceDescriptor()); | 570 o.add(buildMonitoredResourceDescriptor()); |
571 o.add(buildMonitoredResourceDescriptor()); | 571 o.add(buildMonitoredResourceDescriptor()); |
572 return o; | 572 return o; |
573 } | 573 } |
574 | 574 |
575 checkUnnamed1284(core.List<api.MonitoredResourceDescriptor> o) { | 575 checkUnnamed1296(core.List<api.MonitoredResourceDescriptor> o) { |
576 unittest.expect(o, unittest.hasLength(2)); | 576 unittest.expect(o, unittest.hasLength(2)); |
577 checkMonitoredResourceDescriptor(o[0]); | 577 checkMonitoredResourceDescriptor(o[0]); |
578 checkMonitoredResourceDescriptor(o[1]); | 578 checkMonitoredResourceDescriptor(o[1]); |
579 } | 579 } |
580 | 580 |
581 core.int buildCounterListMonitoredResourceDescriptorsResponse = 0; | 581 core.int buildCounterListMonitoredResourceDescriptorsResponse = 0; |
582 buildListMonitoredResourceDescriptorsResponse() { | 582 buildListMonitoredResourceDescriptorsResponse() { |
583 var o = new api.ListMonitoredResourceDescriptorsResponse(); | 583 var o = new api.ListMonitoredResourceDescriptorsResponse(); |
584 buildCounterListMonitoredResourceDescriptorsResponse++; | 584 buildCounterListMonitoredResourceDescriptorsResponse++; |
585 if (buildCounterListMonitoredResourceDescriptorsResponse < 3) { | 585 if (buildCounterListMonitoredResourceDescriptorsResponse < 3) { |
586 o.nextPageToken = "foo"; | 586 o.nextPageToken = "foo"; |
587 o.resourceDescriptors = buildUnnamed1284(); | 587 o.resourceDescriptors = buildUnnamed1296(); |
588 } | 588 } |
589 buildCounterListMonitoredResourceDescriptorsResponse--; | 589 buildCounterListMonitoredResourceDescriptorsResponse--; |
590 return o; | 590 return o; |
591 } | 591 } |
592 | 592 |
593 checkListMonitoredResourceDescriptorsResponse(api.ListMonitoredResourceDescripto
rsResponse o) { | 593 checkListMonitoredResourceDescriptorsResponse(api.ListMonitoredResourceDescripto
rsResponse o) { |
594 buildCounterListMonitoredResourceDescriptorsResponse++; | 594 buildCounterListMonitoredResourceDescriptorsResponse++; |
595 if (buildCounterListMonitoredResourceDescriptorsResponse < 3) { | 595 if (buildCounterListMonitoredResourceDescriptorsResponse < 3) { |
596 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 596 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
597 checkUnnamed1284(o.resourceDescriptors); | 597 checkUnnamed1296(o.resourceDescriptors); |
598 } | 598 } |
599 buildCounterListMonitoredResourceDescriptorsResponse--; | 599 buildCounterListMonitoredResourceDescriptorsResponse--; |
600 } | 600 } |
601 | 601 |
602 buildUnnamed1285() { | 602 buildUnnamed1297() { |
603 var o = new core.List<api.TimeSeries>(); | 603 var o = new core.List<api.TimeSeries>(); |
604 o.add(buildTimeSeries()); | 604 o.add(buildTimeSeries()); |
605 o.add(buildTimeSeries()); | 605 o.add(buildTimeSeries()); |
606 return o; | 606 return o; |
607 } | 607 } |
608 | 608 |
609 checkUnnamed1285(core.List<api.TimeSeries> o) { | 609 checkUnnamed1297(core.List<api.TimeSeries> o) { |
610 unittest.expect(o, unittest.hasLength(2)); | 610 unittest.expect(o, unittest.hasLength(2)); |
611 checkTimeSeries(o[0]); | 611 checkTimeSeries(o[0]); |
612 checkTimeSeries(o[1]); | 612 checkTimeSeries(o[1]); |
613 } | 613 } |
614 | 614 |
615 core.int buildCounterListTimeSeriesResponse = 0; | 615 core.int buildCounterListTimeSeriesResponse = 0; |
616 buildListTimeSeriesResponse() { | 616 buildListTimeSeriesResponse() { |
617 var o = new api.ListTimeSeriesResponse(); | 617 var o = new api.ListTimeSeriesResponse(); |
618 buildCounterListTimeSeriesResponse++; | 618 buildCounterListTimeSeriesResponse++; |
619 if (buildCounterListTimeSeriesResponse < 3) { | 619 if (buildCounterListTimeSeriesResponse < 3) { |
620 o.nextPageToken = "foo"; | 620 o.nextPageToken = "foo"; |
621 o.timeSeries = buildUnnamed1285(); | 621 o.timeSeries = buildUnnamed1297(); |
622 } | 622 } |
623 buildCounterListTimeSeriesResponse--; | 623 buildCounterListTimeSeriesResponse--; |
624 return o; | 624 return o; |
625 } | 625 } |
626 | 626 |
627 checkListTimeSeriesResponse(api.ListTimeSeriesResponse o) { | 627 checkListTimeSeriesResponse(api.ListTimeSeriesResponse o) { |
628 buildCounterListTimeSeriesResponse++; | 628 buildCounterListTimeSeriesResponse++; |
629 if (buildCounterListTimeSeriesResponse < 3) { | 629 if (buildCounterListTimeSeriesResponse < 3) { |
630 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 630 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
631 checkUnnamed1285(o.timeSeries); | 631 checkUnnamed1297(o.timeSeries); |
632 } | 632 } |
633 buildCounterListTimeSeriesResponse--; | 633 buildCounterListTimeSeriesResponse--; |
634 } | 634 } |
635 | 635 |
636 buildUnnamed1286() { | 636 buildUnnamed1298() { |
637 var o = new core.Map<core.String, core.String>(); | 637 var o = new core.Map<core.String, core.String>(); |
638 o["x"] = "foo"; | 638 o["x"] = "foo"; |
639 o["y"] = "foo"; | 639 o["y"] = "foo"; |
640 return o; | 640 return o; |
641 } | 641 } |
642 | 642 |
643 checkUnnamed1286(core.Map<core.String, core.String> o) { | 643 checkUnnamed1298(core.Map<core.String, core.String> o) { |
644 unittest.expect(o, unittest.hasLength(2)); | 644 unittest.expect(o, unittest.hasLength(2)); |
645 unittest.expect(o["x"], unittest.equals('foo')); | 645 unittest.expect(o["x"], unittest.equals('foo')); |
646 unittest.expect(o["y"], unittest.equals('foo')); | 646 unittest.expect(o["y"], unittest.equals('foo')); |
647 } | 647 } |
648 | 648 |
649 core.int buildCounterMetric = 0; | 649 core.int buildCounterMetric = 0; |
650 buildMetric() { | 650 buildMetric() { |
651 var o = new api.Metric(); | 651 var o = new api.Metric(); |
652 buildCounterMetric++; | 652 buildCounterMetric++; |
653 if (buildCounterMetric < 3) { | 653 if (buildCounterMetric < 3) { |
654 o.labels = buildUnnamed1286(); | 654 o.labels = buildUnnamed1298(); |
655 o.type = "foo"; | 655 o.type = "foo"; |
656 } | 656 } |
657 buildCounterMetric--; | 657 buildCounterMetric--; |
658 return o; | 658 return o; |
659 } | 659 } |
660 | 660 |
661 checkMetric(api.Metric o) { | 661 checkMetric(api.Metric o) { |
662 buildCounterMetric++; | 662 buildCounterMetric++; |
663 if (buildCounterMetric < 3) { | 663 if (buildCounterMetric < 3) { |
664 checkUnnamed1286(o.labels); | 664 checkUnnamed1298(o.labels); |
665 unittest.expect(o.type, unittest.equals('foo')); | 665 unittest.expect(o.type, unittest.equals('foo')); |
666 } | 666 } |
667 buildCounterMetric--; | 667 buildCounterMetric--; |
668 } | 668 } |
669 | 669 |
670 buildUnnamed1287() { | 670 buildUnnamed1299() { |
671 var o = new core.List<api.LabelDescriptor>(); | 671 var o = new core.List<api.LabelDescriptor>(); |
672 o.add(buildLabelDescriptor()); | 672 o.add(buildLabelDescriptor()); |
673 o.add(buildLabelDescriptor()); | 673 o.add(buildLabelDescriptor()); |
674 return o; | 674 return o; |
675 } | 675 } |
676 | 676 |
677 checkUnnamed1287(core.List<api.LabelDescriptor> o) { | 677 checkUnnamed1299(core.List<api.LabelDescriptor> o) { |
678 unittest.expect(o, unittest.hasLength(2)); | 678 unittest.expect(o, unittest.hasLength(2)); |
679 checkLabelDescriptor(o[0]); | 679 checkLabelDescriptor(o[0]); |
680 checkLabelDescriptor(o[1]); | 680 checkLabelDescriptor(o[1]); |
681 } | 681 } |
682 | 682 |
683 core.int buildCounterMetricDescriptor = 0; | 683 core.int buildCounterMetricDescriptor = 0; |
684 buildMetricDescriptor() { | 684 buildMetricDescriptor() { |
685 var o = new api.MetricDescriptor(); | 685 var o = new api.MetricDescriptor(); |
686 buildCounterMetricDescriptor++; | 686 buildCounterMetricDescriptor++; |
687 if (buildCounterMetricDescriptor < 3) { | 687 if (buildCounterMetricDescriptor < 3) { |
688 o.description = "foo"; | 688 o.description = "foo"; |
689 o.displayName = "foo"; | 689 o.displayName = "foo"; |
690 o.labels = buildUnnamed1287(); | 690 o.labels = buildUnnamed1299(); |
691 o.metricKind = "foo"; | 691 o.metricKind = "foo"; |
692 o.name = "foo"; | 692 o.name = "foo"; |
693 o.type = "foo"; | 693 o.type = "foo"; |
694 o.unit = "foo"; | 694 o.unit = "foo"; |
695 o.valueType = "foo"; | 695 o.valueType = "foo"; |
696 } | 696 } |
697 buildCounterMetricDescriptor--; | 697 buildCounterMetricDescriptor--; |
698 return o; | 698 return o; |
699 } | 699 } |
700 | 700 |
701 checkMetricDescriptor(api.MetricDescriptor o) { | 701 checkMetricDescriptor(api.MetricDescriptor o) { |
702 buildCounterMetricDescriptor++; | 702 buildCounterMetricDescriptor++; |
703 if (buildCounterMetricDescriptor < 3) { | 703 if (buildCounterMetricDescriptor < 3) { |
704 unittest.expect(o.description, unittest.equals('foo')); | 704 unittest.expect(o.description, unittest.equals('foo')); |
705 unittest.expect(o.displayName, unittest.equals('foo')); | 705 unittest.expect(o.displayName, unittest.equals('foo')); |
706 checkUnnamed1287(o.labels); | 706 checkUnnamed1299(o.labels); |
707 unittest.expect(o.metricKind, unittest.equals('foo')); | 707 unittest.expect(o.metricKind, unittest.equals('foo')); |
708 unittest.expect(o.name, unittest.equals('foo')); | 708 unittest.expect(o.name, unittest.equals('foo')); |
709 unittest.expect(o.type, unittest.equals('foo')); | 709 unittest.expect(o.type, unittest.equals('foo')); |
710 unittest.expect(o.unit, unittest.equals('foo')); | 710 unittest.expect(o.unit, unittest.equals('foo')); |
711 unittest.expect(o.valueType, unittest.equals('foo')); | 711 unittest.expect(o.valueType, unittest.equals('foo')); |
712 } | 712 } |
713 buildCounterMetricDescriptor--; | 713 buildCounterMetricDescriptor--; |
714 } | 714 } |
715 | 715 |
716 buildUnnamed1288() { | 716 buildUnnamed1300() { |
717 var o = new core.Map<core.String, core.String>(); | 717 var o = new core.Map<core.String, core.String>(); |
718 o["x"] = "foo"; | 718 o["x"] = "foo"; |
719 o["y"] = "foo"; | 719 o["y"] = "foo"; |
720 return o; | 720 return o; |
721 } | 721 } |
722 | 722 |
723 checkUnnamed1288(core.Map<core.String, core.String> o) { | 723 checkUnnamed1300(core.Map<core.String, core.String> o) { |
724 unittest.expect(o, unittest.hasLength(2)); | 724 unittest.expect(o, unittest.hasLength(2)); |
725 unittest.expect(o["x"], unittest.equals('foo')); | 725 unittest.expect(o["x"], unittest.equals('foo')); |
726 unittest.expect(o["y"], unittest.equals('foo')); | 726 unittest.expect(o["y"], unittest.equals('foo')); |
727 } | 727 } |
728 | 728 |
729 core.int buildCounterMonitoredResource = 0; | 729 core.int buildCounterMonitoredResource = 0; |
730 buildMonitoredResource() { | 730 buildMonitoredResource() { |
731 var o = new api.MonitoredResource(); | 731 var o = new api.MonitoredResource(); |
732 buildCounterMonitoredResource++; | 732 buildCounterMonitoredResource++; |
733 if (buildCounterMonitoredResource < 3) { | 733 if (buildCounterMonitoredResource < 3) { |
734 o.labels = buildUnnamed1288(); | 734 o.labels = buildUnnamed1300(); |
735 o.type = "foo"; | 735 o.type = "foo"; |
736 } | 736 } |
737 buildCounterMonitoredResource--; | 737 buildCounterMonitoredResource--; |
738 return o; | 738 return o; |
739 } | 739 } |
740 | 740 |
741 checkMonitoredResource(api.MonitoredResource o) { | 741 checkMonitoredResource(api.MonitoredResource o) { |
742 buildCounterMonitoredResource++; | 742 buildCounterMonitoredResource++; |
743 if (buildCounterMonitoredResource < 3) { | 743 if (buildCounterMonitoredResource < 3) { |
744 checkUnnamed1288(o.labels); | 744 checkUnnamed1300(o.labels); |
745 unittest.expect(o.type, unittest.equals('foo')); | 745 unittest.expect(o.type, unittest.equals('foo')); |
746 } | 746 } |
747 buildCounterMonitoredResource--; | 747 buildCounterMonitoredResource--; |
748 } | 748 } |
749 | 749 |
750 buildUnnamed1289() { | 750 buildUnnamed1301() { |
751 var o = new core.List<api.LabelDescriptor>(); | 751 var o = new core.List<api.LabelDescriptor>(); |
752 o.add(buildLabelDescriptor()); | 752 o.add(buildLabelDescriptor()); |
753 o.add(buildLabelDescriptor()); | 753 o.add(buildLabelDescriptor()); |
754 return o; | 754 return o; |
755 } | 755 } |
756 | 756 |
757 checkUnnamed1289(core.List<api.LabelDescriptor> o) { | 757 checkUnnamed1301(core.List<api.LabelDescriptor> o) { |
758 unittest.expect(o, unittest.hasLength(2)); | 758 unittest.expect(o, unittest.hasLength(2)); |
759 checkLabelDescriptor(o[0]); | 759 checkLabelDescriptor(o[0]); |
760 checkLabelDescriptor(o[1]); | 760 checkLabelDescriptor(o[1]); |
761 } | 761 } |
762 | 762 |
763 core.int buildCounterMonitoredResourceDescriptor = 0; | 763 core.int buildCounterMonitoredResourceDescriptor = 0; |
764 buildMonitoredResourceDescriptor() { | 764 buildMonitoredResourceDescriptor() { |
765 var o = new api.MonitoredResourceDescriptor(); | 765 var o = new api.MonitoredResourceDescriptor(); |
766 buildCounterMonitoredResourceDescriptor++; | 766 buildCounterMonitoredResourceDescriptor++; |
767 if (buildCounterMonitoredResourceDescriptor < 3) { | 767 if (buildCounterMonitoredResourceDescriptor < 3) { |
768 o.description = "foo"; | 768 o.description = "foo"; |
769 o.displayName = "foo"; | 769 o.displayName = "foo"; |
770 o.labels = buildUnnamed1289(); | 770 o.labels = buildUnnamed1301(); |
771 o.name = "foo"; | 771 o.name = "foo"; |
772 o.type = "foo"; | 772 o.type = "foo"; |
773 } | 773 } |
774 buildCounterMonitoredResourceDescriptor--; | 774 buildCounterMonitoredResourceDescriptor--; |
775 return o; | 775 return o; |
776 } | 776 } |
777 | 777 |
778 checkMonitoredResourceDescriptor(api.MonitoredResourceDescriptor o) { | 778 checkMonitoredResourceDescriptor(api.MonitoredResourceDescriptor o) { |
779 buildCounterMonitoredResourceDescriptor++; | 779 buildCounterMonitoredResourceDescriptor++; |
780 if (buildCounterMonitoredResourceDescriptor < 3) { | 780 if (buildCounterMonitoredResourceDescriptor < 3) { |
781 unittest.expect(o.description, unittest.equals('foo')); | 781 unittest.expect(o.description, unittest.equals('foo')); |
782 unittest.expect(o.displayName, unittest.equals('foo')); | 782 unittest.expect(o.displayName, unittest.equals('foo')); |
783 checkUnnamed1289(o.labels); | 783 checkUnnamed1301(o.labels); |
784 unittest.expect(o.name, unittest.equals('foo')); | 784 unittest.expect(o.name, unittest.equals('foo')); |
785 unittest.expect(o.type, unittest.equals('foo')); | 785 unittest.expect(o.type, unittest.equals('foo')); |
786 } | 786 } |
787 buildCounterMonitoredResourceDescriptor--; | 787 buildCounterMonitoredResourceDescriptor--; |
788 } | 788 } |
789 | 789 |
790 buildUnnamed1290() { | 790 buildUnnamed1302() { |
791 var o = new core.Map<core.String, core.Object>(); | 791 var o = new core.Map<core.String, core.Object>(); |
792 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 792 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; |
793 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 793 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; |
794 return o; | 794 return o; |
795 } | 795 } |
796 | 796 |
797 checkUnnamed1290(core.Map<core.String, core.Object> o) { | 797 checkUnnamed1302(core.Map<core.String, core.Object> o) { |
798 unittest.expect(o, unittest.hasLength(2)); | 798 unittest.expect(o, unittest.hasLength(2)); |
799 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')); | 799 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')); |
800 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')); | 800 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')); |
801 } | 801 } |
802 | 802 |
803 core.int buildCounterOption = 0; | 803 core.int buildCounterOption = 0; |
804 buildOption() { | 804 buildOption() { |
805 var o = new api.Option(); | 805 var o = new api.Option(); |
806 buildCounterOption++; | 806 buildCounterOption++; |
807 if (buildCounterOption < 3) { | 807 if (buildCounterOption < 3) { |
808 o.name = "foo"; | 808 o.name = "foo"; |
809 o.value = buildUnnamed1290(); | 809 o.value = buildUnnamed1302(); |
810 } | 810 } |
811 buildCounterOption--; | 811 buildCounterOption--; |
812 return o; | 812 return o; |
813 } | 813 } |
814 | 814 |
815 checkOption(api.Option o) { | 815 checkOption(api.Option o) { |
816 buildCounterOption++; | 816 buildCounterOption++; |
817 if (buildCounterOption < 3) { | 817 if (buildCounterOption < 3) { |
818 unittest.expect(o.name, unittest.equals('foo')); | 818 unittest.expect(o.name, unittest.equals('foo')); |
819 checkUnnamed1290(o.value); | 819 checkUnnamed1302(o.value); |
820 } | 820 } |
821 buildCounterOption--; | 821 buildCounterOption--; |
822 } | 822 } |
823 | 823 |
824 core.int buildCounterPoint = 0; | 824 core.int buildCounterPoint = 0; |
825 buildPoint() { | 825 buildPoint() { |
826 var o = new api.Point(); | 826 var o = new api.Point(); |
827 buildCounterPoint++; | 827 buildCounterPoint++; |
828 if (buildCounterPoint < 3) { | 828 if (buildCounterPoint < 3) { |
829 o.interval = buildTimeInterval(); | 829 o.interval = buildTimeInterval(); |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
896 | 896 |
897 checkTimeInterval(api.TimeInterval o) { | 897 checkTimeInterval(api.TimeInterval o) { |
898 buildCounterTimeInterval++; | 898 buildCounterTimeInterval++; |
899 if (buildCounterTimeInterval < 3) { | 899 if (buildCounterTimeInterval < 3) { |
900 unittest.expect(o.endTime, unittest.equals('foo')); | 900 unittest.expect(o.endTime, unittest.equals('foo')); |
901 unittest.expect(o.startTime, unittest.equals('foo')); | 901 unittest.expect(o.startTime, unittest.equals('foo')); |
902 } | 902 } |
903 buildCounterTimeInterval--; | 903 buildCounterTimeInterval--; |
904 } | 904 } |
905 | 905 |
906 buildUnnamed1291() { | 906 buildUnnamed1303() { |
907 var o = new core.List<api.Point>(); | 907 var o = new core.List<api.Point>(); |
908 o.add(buildPoint()); | 908 o.add(buildPoint()); |
909 o.add(buildPoint()); | 909 o.add(buildPoint()); |
910 return o; | 910 return o; |
911 } | 911 } |
912 | 912 |
913 checkUnnamed1291(core.List<api.Point> o) { | 913 checkUnnamed1303(core.List<api.Point> o) { |
914 unittest.expect(o, unittest.hasLength(2)); | 914 unittest.expect(o, unittest.hasLength(2)); |
915 checkPoint(o[0]); | 915 checkPoint(o[0]); |
916 checkPoint(o[1]); | 916 checkPoint(o[1]); |
917 } | 917 } |
918 | 918 |
919 core.int buildCounterTimeSeries = 0; | 919 core.int buildCounterTimeSeries = 0; |
920 buildTimeSeries() { | 920 buildTimeSeries() { |
921 var o = new api.TimeSeries(); | 921 var o = new api.TimeSeries(); |
922 buildCounterTimeSeries++; | 922 buildCounterTimeSeries++; |
923 if (buildCounterTimeSeries < 3) { | 923 if (buildCounterTimeSeries < 3) { |
924 o.metric = buildMetric(); | 924 o.metric = buildMetric(); |
925 o.metricKind = "foo"; | 925 o.metricKind = "foo"; |
926 o.points = buildUnnamed1291(); | 926 o.points = buildUnnamed1303(); |
927 o.resource = buildMonitoredResource(); | 927 o.resource = buildMonitoredResource(); |
928 o.valueType = "foo"; | 928 o.valueType = "foo"; |
929 } | 929 } |
930 buildCounterTimeSeries--; | 930 buildCounterTimeSeries--; |
931 return o; | 931 return o; |
932 } | 932 } |
933 | 933 |
934 checkTimeSeries(api.TimeSeries o) { | 934 checkTimeSeries(api.TimeSeries o) { |
935 buildCounterTimeSeries++; | 935 buildCounterTimeSeries++; |
936 if (buildCounterTimeSeries < 3) { | 936 if (buildCounterTimeSeries < 3) { |
937 checkMetric(o.metric); | 937 checkMetric(o.metric); |
938 unittest.expect(o.metricKind, unittest.equals('foo')); | 938 unittest.expect(o.metricKind, unittest.equals('foo')); |
939 checkUnnamed1291(o.points); | 939 checkUnnamed1303(o.points); |
940 checkMonitoredResource(o.resource); | 940 checkMonitoredResource(o.resource); |
941 unittest.expect(o.valueType, unittest.equals('foo')); | 941 unittest.expect(o.valueType, unittest.equals('foo')); |
942 } | 942 } |
943 buildCounterTimeSeries--; | 943 buildCounterTimeSeries--; |
944 } | 944 } |
945 | 945 |
946 buildUnnamed1292() { | 946 buildUnnamed1304() { |
947 var o = new core.List<api.Field>(); | 947 var o = new core.List<api.Field>(); |
948 o.add(buildField()); | 948 o.add(buildField()); |
949 o.add(buildField()); | 949 o.add(buildField()); |
950 return o; | 950 return o; |
951 } | 951 } |
952 | 952 |
953 checkUnnamed1292(core.List<api.Field> o) { | 953 checkUnnamed1304(core.List<api.Field> o) { |
954 unittest.expect(o, unittest.hasLength(2)); | 954 unittest.expect(o, unittest.hasLength(2)); |
955 checkField(o[0]); | 955 checkField(o[0]); |
956 checkField(o[1]); | 956 checkField(o[1]); |
957 } | 957 } |
958 | 958 |
959 buildUnnamed1293() { | 959 buildUnnamed1305() { |
960 var o = new core.List<core.String>(); | 960 var o = new core.List<core.String>(); |
961 o.add("foo"); | 961 o.add("foo"); |
962 o.add("foo"); | 962 o.add("foo"); |
963 return o; | 963 return o; |
964 } | 964 } |
965 | 965 |
966 checkUnnamed1293(core.List<core.String> o) { | 966 checkUnnamed1305(core.List<core.String> o) { |
967 unittest.expect(o, unittest.hasLength(2)); | 967 unittest.expect(o, unittest.hasLength(2)); |
968 unittest.expect(o[0], unittest.equals('foo')); | 968 unittest.expect(o[0], unittest.equals('foo')); |
969 unittest.expect(o[1], unittest.equals('foo')); | 969 unittest.expect(o[1], unittest.equals('foo')); |
970 } | 970 } |
971 | 971 |
972 buildUnnamed1294() { | 972 buildUnnamed1306() { |
973 var o = new core.List<api.Option>(); | 973 var o = new core.List<api.Option>(); |
974 o.add(buildOption()); | 974 o.add(buildOption()); |
975 o.add(buildOption()); | 975 o.add(buildOption()); |
976 return o; | 976 return o; |
977 } | 977 } |
978 | 978 |
979 checkUnnamed1294(core.List<api.Option> o) { | 979 checkUnnamed1306(core.List<api.Option> o) { |
980 unittest.expect(o, unittest.hasLength(2)); | 980 unittest.expect(o, unittest.hasLength(2)); |
981 checkOption(o[0]); | 981 checkOption(o[0]); |
982 checkOption(o[1]); | 982 checkOption(o[1]); |
983 } | 983 } |
984 | 984 |
985 core.int buildCounterType = 0; | 985 core.int buildCounterType = 0; |
986 buildType() { | 986 buildType() { |
987 var o = new api.Type(); | 987 var o = new api.Type(); |
988 buildCounterType++; | 988 buildCounterType++; |
989 if (buildCounterType < 3) { | 989 if (buildCounterType < 3) { |
990 o.fields = buildUnnamed1292(); | 990 o.fields = buildUnnamed1304(); |
991 o.name = "foo"; | 991 o.name = "foo"; |
992 o.oneofs = buildUnnamed1293(); | 992 o.oneofs = buildUnnamed1305(); |
993 o.options = buildUnnamed1294(); | 993 o.options = buildUnnamed1306(); |
994 o.sourceContext = buildSourceContext(); | 994 o.sourceContext = buildSourceContext(); |
995 o.syntax = "foo"; | 995 o.syntax = "foo"; |
996 } | 996 } |
997 buildCounterType--; | 997 buildCounterType--; |
998 return o; | 998 return o; |
999 } | 999 } |
1000 | 1000 |
1001 checkType(api.Type o) { | 1001 checkType(api.Type o) { |
1002 buildCounterType++; | 1002 buildCounterType++; |
1003 if (buildCounterType < 3) { | 1003 if (buildCounterType < 3) { |
1004 checkUnnamed1292(o.fields); | 1004 checkUnnamed1304(o.fields); |
1005 unittest.expect(o.name, unittest.equals('foo')); | 1005 unittest.expect(o.name, unittest.equals('foo')); |
1006 checkUnnamed1293(o.oneofs); | 1006 checkUnnamed1305(o.oneofs); |
1007 checkUnnamed1294(o.options); | 1007 checkUnnamed1306(o.options); |
1008 checkSourceContext(o.sourceContext); | 1008 checkSourceContext(o.sourceContext); |
1009 unittest.expect(o.syntax, unittest.equals('foo')); | 1009 unittest.expect(o.syntax, unittest.equals('foo')); |
1010 } | 1010 } |
1011 buildCounterType--; | 1011 buildCounterType--; |
1012 } | 1012 } |
1013 | 1013 |
1014 core.int buildCounterTypedValue = 0; | 1014 core.int buildCounterTypedValue = 0; |
1015 buildTypedValue() { | 1015 buildTypedValue() { |
1016 var o = new api.TypedValue(); | 1016 var o = new api.TypedValue(); |
1017 buildCounterTypedValue++; | 1017 buildCounterTypedValue++; |
(...skipping 13 matching lines...) Expand all Loading... |
1031 if (buildCounterTypedValue < 3) { | 1031 if (buildCounterTypedValue < 3) { |
1032 unittest.expect(o.boolValue, unittest.isTrue); | 1032 unittest.expect(o.boolValue, unittest.isTrue); |
1033 checkDistribution(o.distributionValue); | 1033 checkDistribution(o.distributionValue); |
1034 unittest.expect(o.doubleValue, unittest.equals(42.0)); | 1034 unittest.expect(o.doubleValue, unittest.equals(42.0)); |
1035 unittest.expect(o.int64Value, unittest.equals('foo')); | 1035 unittest.expect(o.int64Value, unittest.equals('foo')); |
1036 unittest.expect(o.stringValue, unittest.equals('foo')); | 1036 unittest.expect(o.stringValue, unittest.equals('foo')); |
1037 } | 1037 } |
1038 buildCounterTypedValue--; | 1038 buildCounterTypedValue--; |
1039 } | 1039 } |
1040 | 1040 |
1041 buildUnnamed1295() { | 1041 buildUnnamed1307() { |
1042 var o = new core.List<core.String>(); | 1042 var o = new core.List<core.String>(); |
1043 o.add("foo"); | 1043 o.add("foo"); |
1044 o.add("foo"); | 1044 o.add("foo"); |
1045 return o; | 1045 return o; |
1046 } | 1046 } |
1047 | 1047 |
1048 checkUnnamed1295(core.List<core.String> o) { | 1048 checkUnnamed1307(core.List<core.String> o) { |
1049 unittest.expect(o, unittest.hasLength(2)); | 1049 unittest.expect(o, unittest.hasLength(2)); |
1050 unittest.expect(o[0], unittest.equals('foo')); | 1050 unittest.expect(o[0], unittest.equals('foo')); |
1051 unittest.expect(o[1], unittest.equals('foo')); | 1051 unittest.expect(o[1], unittest.equals('foo')); |
1052 } | 1052 } |
1053 | 1053 |
1054 | 1054 |
1055 main() { | 1055 main() { |
1056 unittest.group("obj-schema-BucketOptions", () { | 1056 unittest.group("obj-schema-BucketOptions", () { |
1057 unittest.test("to-json--from-json", () { | 1057 unittest.test("to-json--from-json", () { |
1058 var o = buildBucketOptions(); | 1058 var o = buildBucketOptions(); |
(...skipping 457 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1516 res.get(arg_name).then(unittest.expectAsync(((api.Group response) { | 1516 res.get(arg_name).then(unittest.expectAsync(((api.Group response) { |
1517 checkGroup(response); | 1517 checkGroup(response); |
1518 }))); | 1518 }))); |
1519 }); | 1519 }); |
1520 | 1520 |
1521 unittest.test("method--list", () { | 1521 unittest.test("method--list", () { |
1522 | 1522 |
1523 var mock = new HttpServerMock(); | 1523 var mock = new HttpServerMock(); |
1524 api.ProjectsGroupsResourceApi res = new api.MonitoringApi(mock).projects.g
roups; | 1524 api.ProjectsGroupsResourceApi res = new api.MonitoringApi(mock).projects.g
roups; |
1525 var arg_name = "foo"; | 1525 var arg_name = "foo"; |
| 1526 var arg_pageToken = "foo"; |
| 1527 var arg_pageSize = 42; |
| 1528 var arg_ancestorsOfGroup = "foo"; |
| 1529 var arg_childrenOfGroup = "foo"; |
1526 var arg_descendantsOfGroup = "foo"; | 1530 var arg_descendantsOfGroup = "foo"; |
1527 var arg_pageSize = 42; | |
1528 var arg_childrenOfGroup = "foo"; | |
1529 var arg_ancestorsOfGroup = "foo"; | |
1530 var arg_pageToken = "foo"; | |
1531 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1531 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
1532 var path = (req.url).path; | 1532 var path = (req.url).path; |
1533 var pathOffset = 0; | 1533 var pathOffset = 0; |
1534 var index; | 1534 var index; |
1535 var subPart; | 1535 var subPart; |
1536 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1536 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
1537 pathOffset += 1; | 1537 pathOffset += 1; |
1538 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v3/")); | 1538 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v3/")); |
1539 pathOffset += 3; | 1539 pathOffset += 3; |
1540 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; | 1540 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; |
1541 | 1541 |
1542 var query = (req.url).query; | 1542 var query = (req.url).query; |
1543 var queryOffset = 0; | 1543 var queryOffset = 0; |
1544 var queryMap = {}; | 1544 var queryMap = {}; |
1545 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 1545 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
1546 parseBool(n) { | 1546 parseBool(n) { |
1547 if (n == "true") return true; | 1547 if (n == "true") return true; |
1548 if (n == "false") return false; | 1548 if (n == "false") return false; |
1549 if (n == null) return null; | 1549 if (n == null) return null; |
1550 throw new core.ArgumentError("Invalid boolean: $n"); | 1550 throw new core.ArgumentError("Invalid boolean: $n"); |
1551 } | 1551 } |
1552 if (query.length > 0) { | 1552 if (query.length > 0) { |
1553 for (var part in query.split("&")) { | 1553 for (var part in query.split("&")) { |
1554 var keyvalue = part.split("="); | 1554 var keyvalue = part.split("="); |
1555 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 1555 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
1556 } | 1556 } |
1557 } | 1557 } |
| 1558 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); |
| 1559 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ
als(arg_pageSize)); |
| 1560 unittest.expect(queryMap["ancestorsOfGroup"].first, unittest.equals(arg_
ancestorsOfGroup)); |
| 1561 unittest.expect(queryMap["childrenOfGroup"].first, unittest.equals(arg_c
hildrenOfGroup)); |
1558 unittest.expect(queryMap["descendantsOfGroup"].first, unittest.equals(ar
g_descendantsOfGroup)); | 1562 unittest.expect(queryMap["descendantsOfGroup"].first, unittest.equals(ar
g_descendantsOfGroup)); |
1559 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ
als(arg_pageSize)); | |
1560 unittest.expect(queryMap["childrenOfGroup"].first, unittest.equals(arg_c
hildrenOfGroup)); | |
1561 unittest.expect(queryMap["ancestorsOfGroup"].first, unittest.equals(arg_
ancestorsOfGroup)); | |
1562 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | |
1563 | 1563 |
1564 | 1564 |
1565 var h = { | 1565 var h = { |
1566 "content-type" : "application/json; charset=utf-8", | 1566 "content-type" : "application/json; charset=utf-8", |
1567 }; | 1567 }; |
1568 var resp = convert.JSON.encode(buildListGroupsResponse()); | 1568 var resp = convert.JSON.encode(buildListGroupsResponse()); |
1569 return new async.Future.value(stringResponse(200, h, resp)); | 1569 return new async.Future.value(stringResponse(200, h, resp)); |
1570 }), true); | 1570 }), true); |
1571 res.list(arg_name, descendantsOfGroup: arg_descendantsOfGroup, pageSize: a
rg_pageSize, childrenOfGroup: arg_childrenOfGroup, ancestorsOfGroup: arg_ancesto
rsOfGroup, pageToken: arg_pageToken).then(unittest.expectAsync(((api.ListGroupsR
esponse response) { | 1571 res.list(arg_name, pageToken: arg_pageToken, pageSize: arg_pageSize, ances
torsOfGroup: arg_ancestorsOfGroup, childrenOfGroup: arg_childrenOfGroup, descend
antsOfGroup: arg_descendantsOfGroup).then(unittest.expectAsync(((api.ListGroupsR
esponse response) { |
1572 checkListGroupsResponse(response); | 1572 checkListGroupsResponse(response); |
1573 }))); | 1573 }))); |
1574 }); | 1574 }); |
1575 | 1575 |
1576 unittest.test("method--update", () { | 1576 unittest.test("method--update", () { |
1577 | 1577 |
1578 var mock = new HttpServerMock(); | 1578 var mock = new HttpServerMock(); |
1579 api.ProjectsGroupsResourceApi res = new api.MonitoringApi(mock).projects.g
roups; | 1579 api.ProjectsGroupsResourceApi res = new api.MonitoringApi(mock).projects.g
roups; |
1580 var arg_request = buildGroup(); | 1580 var arg_request = buildGroup(); |
1581 var arg_name = "foo"; | 1581 var arg_name = "foo"; |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1626 | 1626 |
1627 }); | 1627 }); |
1628 | 1628 |
1629 | 1629 |
1630 unittest.group("resource-ProjectsGroupsMembersResourceApi", () { | 1630 unittest.group("resource-ProjectsGroupsMembersResourceApi", () { |
1631 unittest.test("method--list", () { | 1631 unittest.test("method--list", () { |
1632 | 1632 |
1633 var mock = new HttpServerMock(); | 1633 var mock = new HttpServerMock(); |
1634 api.ProjectsGroupsMembersResourceApi res = new api.MonitoringApi(mock).pro
jects.groups.members; | 1634 api.ProjectsGroupsMembersResourceApi res = new api.MonitoringApi(mock).pro
jects.groups.members; |
1635 var arg_name = "foo"; | 1635 var arg_name = "foo"; |
| 1636 var arg_interval_endTime = "foo"; |
1636 var arg_filter = "foo"; | 1637 var arg_filter = "foo"; |
1637 var arg_interval_endTime = "foo"; | 1638 var arg_pageToken = "foo"; |
1638 var arg_interval_startTime = "foo"; | 1639 var arg_interval_startTime = "foo"; |
1639 var arg_pageSize = 42; | 1640 var arg_pageSize = 42; |
1640 var arg_pageToken = "foo"; | |
1641 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1641 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
1642 var path = (req.url).path; | 1642 var path = (req.url).path; |
1643 var pathOffset = 0; | 1643 var pathOffset = 0; |
1644 var index; | 1644 var index; |
1645 var subPart; | 1645 var subPart; |
1646 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1646 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
1647 pathOffset += 1; | 1647 pathOffset += 1; |
1648 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v3/")); | 1648 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v3/")); |
1649 pathOffset += 3; | 1649 pathOffset += 3; |
1650 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; | 1650 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; |
1651 | 1651 |
1652 var query = (req.url).query; | 1652 var query = (req.url).query; |
1653 var queryOffset = 0; | 1653 var queryOffset = 0; |
1654 var queryMap = {}; | 1654 var queryMap = {}; |
1655 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 1655 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
1656 parseBool(n) { | 1656 parseBool(n) { |
1657 if (n == "true") return true; | 1657 if (n == "true") return true; |
1658 if (n == "false") return false; | 1658 if (n == "false") return false; |
1659 if (n == null) return null; | 1659 if (n == null) return null; |
1660 throw new core.ArgumentError("Invalid boolean: $n"); | 1660 throw new core.ArgumentError("Invalid boolean: $n"); |
1661 } | 1661 } |
1662 if (query.length > 0) { | 1662 if (query.length > 0) { |
1663 for (var part in query.split("&")) { | 1663 for (var part in query.split("&")) { |
1664 var keyvalue = part.split("="); | 1664 var keyvalue = part.split("="); |
1665 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 1665 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
1666 } | 1666 } |
1667 } | 1667 } |
| 1668 unittest.expect(queryMap["interval.endTime"].first, unittest.equals(arg_
interval_endTime)); |
1668 unittest.expect(queryMap["filter"].first, unittest.equals(arg_filter)); | 1669 unittest.expect(queryMap["filter"].first, unittest.equals(arg_filter)); |
1669 unittest.expect(queryMap["interval.endTime"].first, unittest.equals(arg_
interval_endTime)); | 1670 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); |
1670 unittest.expect(queryMap["interval.startTime"].first, unittest.equals(ar
g_interval_startTime)); | 1671 unittest.expect(queryMap["interval.startTime"].first, unittest.equals(ar
g_interval_startTime)); |
1671 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ
als(arg_pageSize)); | 1672 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ
als(arg_pageSize)); |
1672 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | |
1673 | 1673 |
1674 | 1674 |
1675 var h = { | 1675 var h = { |
1676 "content-type" : "application/json; charset=utf-8", | 1676 "content-type" : "application/json; charset=utf-8", |
1677 }; | 1677 }; |
1678 var resp = convert.JSON.encode(buildListGroupMembersResponse()); | 1678 var resp = convert.JSON.encode(buildListGroupMembersResponse()); |
1679 return new async.Future.value(stringResponse(200, h, resp)); | 1679 return new async.Future.value(stringResponse(200, h, resp)); |
1680 }), true); | 1680 }), true); |
1681 res.list(arg_name, filter: arg_filter, interval_endTime: arg_interval_endT
ime, interval_startTime: arg_interval_startTime, pageSize: arg_pageSize, pageTok
en: arg_pageToken).then(unittest.expectAsync(((api.ListGroupMembersResponse resp
onse) { | 1681 res.list(arg_name, interval_endTime: arg_interval_endTime, filter: arg_fil
ter, pageToken: arg_pageToken, interval_startTime: arg_interval_startTime, pageS
ize: arg_pageSize).then(unittest.expectAsync(((api.ListGroupMembersResponse resp
onse) { |
1682 checkListGroupMembersResponse(response); | 1682 checkListGroupMembersResponse(response); |
1683 }))); | 1683 }))); |
1684 }); | 1684 }); |
1685 | 1685 |
1686 }); | 1686 }); |
1687 | 1687 |
1688 | 1688 |
1689 unittest.group("resource-ProjectsMetricDescriptorsResourceApi", () { | 1689 unittest.group("resource-ProjectsMetricDescriptorsResourceApi", () { |
1690 unittest.test("method--create", () { | 1690 unittest.test("method--create", () { |
1691 | 1691 |
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1824 res.get(arg_name).then(unittest.expectAsync(((api.MetricDescriptor respons
e) { | 1824 res.get(arg_name).then(unittest.expectAsync(((api.MetricDescriptor respons
e) { |
1825 checkMetricDescriptor(response); | 1825 checkMetricDescriptor(response); |
1826 }))); | 1826 }))); |
1827 }); | 1827 }); |
1828 | 1828 |
1829 unittest.test("method--list", () { | 1829 unittest.test("method--list", () { |
1830 | 1830 |
1831 var mock = new HttpServerMock(); | 1831 var mock = new HttpServerMock(); |
1832 api.ProjectsMetricDescriptorsResourceApi res = new api.MonitoringApi(mock)
.projects.metricDescriptors; | 1832 api.ProjectsMetricDescriptorsResourceApi res = new api.MonitoringApi(mock)
.projects.metricDescriptors; |
1833 var arg_name = "foo"; | 1833 var arg_name = "foo"; |
| 1834 var arg_pageToken = "foo"; |
1834 var arg_pageSize = 42; | 1835 var arg_pageSize = 42; |
1835 var arg_filter = "foo"; | 1836 var arg_filter = "foo"; |
1836 var arg_pageToken = "foo"; | |
1837 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1837 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
1838 var path = (req.url).path; | 1838 var path = (req.url).path; |
1839 var pathOffset = 0; | 1839 var pathOffset = 0; |
1840 var index; | 1840 var index; |
1841 var subPart; | 1841 var subPart; |
1842 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1842 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
1843 pathOffset += 1; | 1843 pathOffset += 1; |
1844 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v3/")); | 1844 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v3/")); |
1845 pathOffset += 3; | 1845 pathOffset += 3; |
1846 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; | 1846 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; |
1847 | 1847 |
1848 var query = (req.url).query; | 1848 var query = (req.url).query; |
1849 var queryOffset = 0; | 1849 var queryOffset = 0; |
1850 var queryMap = {}; | 1850 var queryMap = {}; |
1851 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 1851 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
1852 parseBool(n) { | 1852 parseBool(n) { |
1853 if (n == "true") return true; | 1853 if (n == "true") return true; |
1854 if (n == "false") return false; | 1854 if (n == "false") return false; |
1855 if (n == null) return null; | 1855 if (n == null) return null; |
1856 throw new core.ArgumentError("Invalid boolean: $n"); | 1856 throw new core.ArgumentError("Invalid boolean: $n"); |
1857 } | 1857 } |
1858 if (query.length > 0) { | 1858 if (query.length > 0) { |
1859 for (var part in query.split("&")) { | 1859 for (var part in query.split("&")) { |
1860 var keyvalue = part.split("="); | 1860 var keyvalue = part.split("="); |
1861 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 1861 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
1862 } | 1862 } |
1863 } | 1863 } |
| 1864 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); |
1864 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ
als(arg_pageSize)); | 1865 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ
als(arg_pageSize)); |
1865 unittest.expect(queryMap["filter"].first, unittest.equals(arg_filter)); | 1866 unittest.expect(queryMap["filter"].first, unittest.equals(arg_filter)); |
1866 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | |
1867 | 1867 |
1868 | 1868 |
1869 var h = { | 1869 var h = { |
1870 "content-type" : "application/json; charset=utf-8", | 1870 "content-type" : "application/json; charset=utf-8", |
1871 }; | 1871 }; |
1872 var resp = convert.JSON.encode(buildListMetricDescriptorsResponse()); | 1872 var resp = convert.JSON.encode(buildListMetricDescriptorsResponse()); |
1873 return new async.Future.value(stringResponse(200, h, resp)); | 1873 return new async.Future.value(stringResponse(200, h, resp)); |
1874 }), true); | 1874 }), true); |
1875 res.list(arg_name, pageSize: arg_pageSize, filter: arg_filter, pageToken:
arg_pageToken).then(unittest.expectAsync(((api.ListMetricDescriptorsResponse res
ponse) { | 1875 res.list(arg_name, pageToken: arg_pageToken, pageSize: arg_pageSize, filte
r: arg_filter).then(unittest.expectAsync(((api.ListMetricDescriptorsResponse res
ponse) { |
1876 checkListMetricDescriptorsResponse(response); | 1876 checkListMetricDescriptorsResponse(response); |
1877 }))); | 1877 }))); |
1878 }); | 1878 }); |
1879 | 1879 |
1880 }); | 1880 }); |
1881 | 1881 |
1882 | 1882 |
1883 unittest.group("resource-ProjectsMonitoredResourceDescriptorsResourceApi", ()
{ | 1883 unittest.group("resource-ProjectsMonitoredResourceDescriptorsResourceApi", ()
{ |
1884 unittest.test("method--get", () { | 1884 unittest.test("method--get", () { |
1885 | 1885 |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1924 res.get(arg_name).then(unittest.expectAsync(((api.MonitoredResourceDescrip
tor response) { | 1924 res.get(arg_name).then(unittest.expectAsync(((api.MonitoredResourceDescrip
tor response) { |
1925 checkMonitoredResourceDescriptor(response); | 1925 checkMonitoredResourceDescriptor(response); |
1926 }))); | 1926 }))); |
1927 }); | 1927 }); |
1928 | 1928 |
1929 unittest.test("method--list", () { | 1929 unittest.test("method--list", () { |
1930 | 1930 |
1931 var mock = new HttpServerMock(); | 1931 var mock = new HttpServerMock(); |
1932 api.ProjectsMonitoredResourceDescriptorsResourceApi res = new api.Monitori
ngApi(mock).projects.monitoredResourceDescriptors; | 1932 api.ProjectsMonitoredResourceDescriptorsResourceApi res = new api.Monitori
ngApi(mock).projects.monitoredResourceDescriptors; |
1933 var arg_name = "foo"; | 1933 var arg_name = "foo"; |
| 1934 var arg_pageToken = "foo"; |
1934 var arg_pageSize = 42; | 1935 var arg_pageSize = 42; |
1935 var arg_filter = "foo"; | 1936 var arg_filter = "foo"; |
1936 var arg_pageToken = "foo"; | |
1937 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1937 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
1938 var path = (req.url).path; | 1938 var path = (req.url).path; |
1939 var pathOffset = 0; | 1939 var pathOffset = 0; |
1940 var index; | 1940 var index; |
1941 var subPart; | 1941 var subPart; |
1942 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1942 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
1943 pathOffset += 1; | 1943 pathOffset += 1; |
1944 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v3/")); | 1944 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v3/")); |
1945 pathOffset += 3; | 1945 pathOffset += 3; |
1946 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; | 1946 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; |
1947 | 1947 |
1948 var query = (req.url).query; | 1948 var query = (req.url).query; |
1949 var queryOffset = 0; | 1949 var queryOffset = 0; |
1950 var queryMap = {}; | 1950 var queryMap = {}; |
1951 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 1951 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
1952 parseBool(n) { | 1952 parseBool(n) { |
1953 if (n == "true") return true; | 1953 if (n == "true") return true; |
1954 if (n == "false") return false; | 1954 if (n == "false") return false; |
1955 if (n == null) return null; | 1955 if (n == null) return null; |
1956 throw new core.ArgumentError("Invalid boolean: $n"); | 1956 throw new core.ArgumentError("Invalid boolean: $n"); |
1957 } | 1957 } |
1958 if (query.length > 0) { | 1958 if (query.length > 0) { |
1959 for (var part in query.split("&")) { | 1959 for (var part in query.split("&")) { |
1960 var keyvalue = part.split("="); | 1960 var keyvalue = part.split("="); |
1961 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 1961 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
1962 } | 1962 } |
1963 } | 1963 } |
| 1964 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); |
1964 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ
als(arg_pageSize)); | 1965 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ
als(arg_pageSize)); |
1965 unittest.expect(queryMap["filter"].first, unittest.equals(arg_filter)); | 1966 unittest.expect(queryMap["filter"].first, unittest.equals(arg_filter)); |
1966 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | |
1967 | 1967 |
1968 | 1968 |
1969 var h = { | 1969 var h = { |
1970 "content-type" : "application/json; charset=utf-8", | 1970 "content-type" : "application/json; charset=utf-8", |
1971 }; | 1971 }; |
1972 var resp = convert.JSON.encode(buildListMonitoredResourceDescriptorsResp
onse()); | 1972 var resp = convert.JSON.encode(buildListMonitoredResourceDescriptorsResp
onse()); |
1973 return new async.Future.value(stringResponse(200, h, resp)); | 1973 return new async.Future.value(stringResponse(200, h, resp)); |
1974 }), true); | 1974 }), true); |
1975 res.list(arg_name, pageSize: arg_pageSize, filter: arg_filter, pageToken:
arg_pageToken).then(unittest.expectAsync(((api.ListMonitoredResourceDescriptorsR
esponse response) { | 1975 res.list(arg_name, pageToken: arg_pageToken, pageSize: arg_pageSize, filte
r: arg_filter).then(unittest.expectAsync(((api.ListMonitoredResourceDescriptorsR
esponse response) { |
1976 checkListMonitoredResourceDescriptorsResponse(response); | 1976 checkListMonitoredResourceDescriptorsResponse(response); |
1977 }))); | 1977 }))); |
1978 }); | 1978 }); |
1979 | 1979 |
1980 }); | 1980 }); |
1981 | 1981 |
1982 | 1982 |
1983 unittest.group("resource-ProjectsTimeSeriesResourceApi", () { | 1983 unittest.group("resource-ProjectsTimeSeriesResourceApi", () { |
1984 unittest.test("method--create", () { | 1984 unittest.test("method--create", () { |
1985 | 1985 |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2028 res.create(arg_request, arg_name).then(unittest.expectAsync(((api.Empty re
sponse) { | 2028 res.create(arg_request, arg_name).then(unittest.expectAsync(((api.Empty re
sponse) { |
2029 checkEmpty(response); | 2029 checkEmpty(response); |
2030 }))); | 2030 }))); |
2031 }); | 2031 }); |
2032 | 2032 |
2033 unittest.test("method--list", () { | 2033 unittest.test("method--list", () { |
2034 | 2034 |
2035 var mock = new HttpServerMock(); | 2035 var mock = new HttpServerMock(); |
2036 api.ProjectsTimeSeriesResourceApi res = new api.MonitoringApi(mock).projec
ts.timeSeries; | 2036 api.ProjectsTimeSeriesResourceApi res = new api.MonitoringApi(mock).projec
ts.timeSeries; |
2037 var arg_name = "foo"; | 2037 var arg_name = "foo"; |
| 2038 var arg_pageToken = "foo"; |
| 2039 var arg_aggregation_perSeriesAligner = "foo"; |
| 2040 var arg_interval_startTime = "foo"; |
| 2041 var arg_view = "foo"; |
| 2042 var arg_aggregation_groupByFields = buildUnnamed1307(); |
| 2043 var arg_interval_endTime = "foo"; |
| 2044 var arg_aggregation_alignmentPeriod = "foo"; |
| 2045 var arg_pageSize = 42; |
| 2046 var arg_orderBy = "foo"; |
| 2047 var arg_aggregation_crossSeriesReducer = "foo"; |
2038 var arg_filter = "foo"; | 2048 var arg_filter = "foo"; |
2039 var arg_aggregation_groupByFields = buildUnnamed1295(); | |
2040 var arg_aggregation_crossSeriesReducer = "foo"; | |
2041 var arg_interval_endTime = "foo"; | |
2042 var arg_interval_startTime = "foo"; | |
2043 var arg_pageSize = 42; | |
2044 var arg_view = "foo"; | |
2045 var arg_aggregation_alignmentPeriod = "foo"; | |
2046 var arg_aggregation_perSeriesAligner = "foo"; | |
2047 var arg_orderBy = "foo"; | |
2048 var arg_pageToken = "foo"; | |
2049 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2049 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
2050 var path = (req.url).path; | 2050 var path = (req.url).path; |
2051 var pathOffset = 0; | 2051 var pathOffset = 0; |
2052 var index; | 2052 var index; |
2053 var subPart; | 2053 var subPart; |
2054 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2054 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
2055 pathOffset += 1; | 2055 pathOffset += 1; |
2056 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v3/")); | 2056 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v3/")); |
2057 pathOffset += 3; | 2057 pathOffset += 3; |
2058 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; | 2058 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; |
2059 | 2059 |
2060 var query = (req.url).query; | 2060 var query = (req.url).query; |
2061 var queryOffset = 0; | 2061 var queryOffset = 0; |
2062 var queryMap = {}; | 2062 var queryMap = {}; |
2063 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 2063 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
2064 parseBool(n) { | 2064 parseBool(n) { |
2065 if (n == "true") return true; | 2065 if (n == "true") return true; |
2066 if (n == "false") return false; | 2066 if (n == "false") return false; |
2067 if (n == null) return null; | 2067 if (n == null) return null; |
2068 throw new core.ArgumentError("Invalid boolean: $n"); | 2068 throw new core.ArgumentError("Invalid boolean: $n"); |
2069 } | 2069 } |
2070 if (query.length > 0) { | 2070 if (query.length > 0) { |
2071 for (var part in query.split("&")) { | 2071 for (var part in query.split("&")) { |
2072 var keyvalue = part.split("="); | 2072 var keyvalue = part.split("="); |
2073 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 2073 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
2074 } | 2074 } |
2075 } | 2075 } |
| 2076 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); |
| 2077 unittest.expect(queryMap["aggregation.perSeriesAligner"].first, unittest
.equals(arg_aggregation_perSeriesAligner)); |
| 2078 unittest.expect(queryMap["interval.startTime"].first, unittest.equals(ar
g_interval_startTime)); |
| 2079 unittest.expect(queryMap["view"].first, unittest.equals(arg_view)); |
| 2080 unittest.expect(queryMap["aggregation.groupByFields"], unittest.equals(a
rg_aggregation_groupByFields)); |
| 2081 unittest.expect(queryMap["interval.endTime"].first, unittest.equals(arg_
interval_endTime)); |
| 2082 unittest.expect(queryMap["aggregation.alignmentPeriod"].first, unittest.
equals(arg_aggregation_alignmentPeriod)); |
| 2083 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ
als(arg_pageSize)); |
| 2084 unittest.expect(queryMap["orderBy"].first, unittest.equals(arg_orderBy))
; |
| 2085 unittest.expect(queryMap["aggregation.crossSeriesReducer"].first, unitte
st.equals(arg_aggregation_crossSeriesReducer)); |
2076 unittest.expect(queryMap["filter"].first, unittest.equals(arg_filter)); | 2086 unittest.expect(queryMap["filter"].first, unittest.equals(arg_filter)); |
2077 unittest.expect(queryMap["aggregation.groupByFields"], unittest.equals(a
rg_aggregation_groupByFields)); | |
2078 unittest.expect(queryMap["aggregation.crossSeriesReducer"].first, unitte
st.equals(arg_aggregation_crossSeriesReducer)); | |
2079 unittest.expect(queryMap["interval.endTime"].first, unittest.equals(arg_
interval_endTime)); | |
2080 unittest.expect(queryMap["interval.startTime"].first, unittest.equals(ar
g_interval_startTime)); | |
2081 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ
als(arg_pageSize)); | |
2082 unittest.expect(queryMap["view"].first, unittest.equals(arg_view)); | |
2083 unittest.expect(queryMap["aggregation.alignmentPeriod"].first, unittest.
equals(arg_aggregation_alignmentPeriod)); | |
2084 unittest.expect(queryMap["aggregation.perSeriesAligner"].first, unittest
.equals(arg_aggregation_perSeriesAligner)); | |
2085 unittest.expect(queryMap["orderBy"].first, unittest.equals(arg_orderBy))
; | |
2086 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | |
2087 | 2087 |
2088 | 2088 |
2089 var h = { | 2089 var h = { |
2090 "content-type" : "application/json; charset=utf-8", | 2090 "content-type" : "application/json; charset=utf-8", |
2091 }; | 2091 }; |
2092 var resp = convert.JSON.encode(buildListTimeSeriesResponse()); | 2092 var resp = convert.JSON.encode(buildListTimeSeriesResponse()); |
2093 return new async.Future.value(stringResponse(200, h, resp)); | 2093 return new async.Future.value(stringResponse(200, h, resp)); |
2094 }), true); | 2094 }), true); |
2095 res.list(arg_name, filter: arg_filter, aggregation_groupByFields: arg_aggr
egation_groupByFields, aggregation_crossSeriesReducer: arg_aggregation_crossSeri
esReducer, interval_endTime: arg_interval_endTime, interval_startTime: arg_inter
val_startTime, pageSize: arg_pageSize, view: arg_view, aggregation_alignmentPeri
od: arg_aggregation_alignmentPeriod, aggregation_perSeriesAligner: arg_aggregati
on_perSeriesAligner, orderBy: arg_orderBy, pageToken: arg_pageToken).then(unitte
st.expectAsync(((api.ListTimeSeriesResponse response) { | 2095 res.list(arg_name, pageToken: arg_pageToken, aggregation_perSeriesAligner:
arg_aggregation_perSeriesAligner, interval_startTime: arg_interval_startTime, v
iew: arg_view, aggregation_groupByFields: arg_aggregation_groupByFields, interva
l_endTime: arg_interval_endTime, aggregation_alignmentPeriod: arg_aggregation_al
ignmentPeriod, pageSize: arg_pageSize, orderBy: arg_orderBy, aggregation_crossSe
riesReducer: arg_aggregation_crossSeriesReducer, filter: arg_filter).then(unitte
st.expectAsync(((api.ListTimeSeriesResponse response) { |
2096 checkListTimeSeriesResponse(response); | 2096 checkListTimeSeriesResponse(response); |
2097 }))); | 2097 }))); |
2098 }); | 2098 }); |
2099 | 2099 |
2100 }); | 2100 }); |
2101 | 2101 |
2102 | 2102 |
2103 } | 2103 } |
2104 | 2104 |
OLD | NEW |