OLD | NEW |
1 library googleapis_beta.logging.v2beta1.test; | 1 library googleapis_beta.logging.v2beta1.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 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
129 checkLabelDescriptor(api.LabelDescriptor o) { | 129 checkLabelDescriptor(api.LabelDescriptor o) { |
130 buildCounterLabelDescriptor++; | 130 buildCounterLabelDescriptor++; |
131 if (buildCounterLabelDescriptor < 3) { | 131 if (buildCounterLabelDescriptor < 3) { |
132 unittest.expect(o.description, unittest.equals('foo')); | 132 unittest.expect(o.description, unittest.equals('foo')); |
133 unittest.expect(o.key, unittest.equals('foo')); | 133 unittest.expect(o.key, unittest.equals('foo')); |
134 unittest.expect(o.valueType, unittest.equals('foo')); | 134 unittest.expect(o.valueType, unittest.equals('foo')); |
135 } | 135 } |
136 buildCounterLabelDescriptor--; | 136 buildCounterLabelDescriptor--; |
137 } | 137 } |
138 | 138 |
139 buildUnnamed3712() { | 139 buildUnnamed3804() { |
140 var o = new core.List<core.String>(); | 140 var o = new core.List<core.String>(); |
141 o.add("foo"); | 141 o.add("foo"); |
142 o.add("foo"); | 142 o.add("foo"); |
143 return o; | 143 return o; |
144 } | 144 } |
145 | 145 |
146 checkUnnamed3712(core.List<core.String> o) { | 146 checkUnnamed3804(core.List<core.String> o) { |
147 unittest.expect(o, unittest.hasLength(2)); | 147 unittest.expect(o, unittest.hasLength(2)); |
148 unittest.expect(o[0], unittest.equals('foo')); | 148 unittest.expect(o[0], unittest.equals('foo')); |
149 unittest.expect(o[1], unittest.equals('foo')); | 149 unittest.expect(o[1], unittest.equals('foo')); |
150 } | 150 } |
151 | 151 |
152 buildUnnamed3713() { | 152 buildUnnamed3805() { |
153 var o = new core.List<core.String>(); | 153 var o = new core.List<core.String>(); |
154 o.add("foo"); | 154 o.add("foo"); |
155 o.add("foo"); | 155 o.add("foo"); |
156 return o; | 156 return o; |
157 } | 157 } |
158 | 158 |
159 checkUnnamed3713(core.List<core.String> o) { | 159 checkUnnamed3805(core.List<core.String> o) { |
160 unittest.expect(o, unittest.hasLength(2)); | 160 unittest.expect(o, unittest.hasLength(2)); |
161 unittest.expect(o[0], unittest.equals('foo')); | 161 unittest.expect(o[0], unittest.equals('foo')); |
162 unittest.expect(o[1], unittest.equals('foo')); | 162 unittest.expect(o[1], unittest.equals('foo')); |
163 } | 163 } |
164 | 164 |
165 core.int buildCounterListLogEntriesRequest = 0; | 165 core.int buildCounterListLogEntriesRequest = 0; |
166 buildListLogEntriesRequest() { | 166 buildListLogEntriesRequest() { |
167 var o = new api.ListLogEntriesRequest(); | 167 var o = new api.ListLogEntriesRequest(); |
168 buildCounterListLogEntriesRequest++; | 168 buildCounterListLogEntriesRequest++; |
169 if (buildCounterListLogEntriesRequest < 3) { | 169 if (buildCounterListLogEntriesRequest < 3) { |
170 o.filter = "foo"; | 170 o.filter = "foo"; |
171 o.orderBy = "foo"; | 171 o.orderBy = "foo"; |
172 o.pageSize = 42; | 172 o.pageSize = 42; |
173 o.pageToken = "foo"; | 173 o.pageToken = "foo"; |
174 o.projectIds = buildUnnamed3712(); | 174 o.projectIds = buildUnnamed3804(); |
175 o.resourceNames = buildUnnamed3713(); | 175 o.resourceNames = buildUnnamed3805(); |
176 } | 176 } |
177 buildCounterListLogEntriesRequest--; | 177 buildCounterListLogEntriesRequest--; |
178 return o; | 178 return o; |
179 } | 179 } |
180 | 180 |
181 checkListLogEntriesRequest(api.ListLogEntriesRequest o) { | 181 checkListLogEntriesRequest(api.ListLogEntriesRequest o) { |
182 buildCounterListLogEntriesRequest++; | 182 buildCounterListLogEntriesRequest++; |
183 if (buildCounterListLogEntriesRequest < 3) { | 183 if (buildCounterListLogEntriesRequest < 3) { |
184 unittest.expect(o.filter, unittest.equals('foo')); | 184 unittest.expect(o.filter, unittest.equals('foo')); |
185 unittest.expect(o.orderBy, unittest.equals('foo')); | 185 unittest.expect(o.orderBy, unittest.equals('foo')); |
186 unittest.expect(o.pageSize, unittest.equals(42)); | 186 unittest.expect(o.pageSize, unittest.equals(42)); |
187 unittest.expect(o.pageToken, unittest.equals('foo')); | 187 unittest.expect(o.pageToken, unittest.equals('foo')); |
188 checkUnnamed3712(o.projectIds); | 188 checkUnnamed3804(o.projectIds); |
189 checkUnnamed3713(o.resourceNames); | 189 checkUnnamed3805(o.resourceNames); |
190 } | 190 } |
191 buildCounterListLogEntriesRequest--; | 191 buildCounterListLogEntriesRequest--; |
192 } | 192 } |
193 | 193 |
194 buildUnnamed3714() { | 194 buildUnnamed3806() { |
195 var o = new core.List<api.LogEntry>(); | 195 var o = new core.List<api.LogEntry>(); |
196 o.add(buildLogEntry()); | 196 o.add(buildLogEntry()); |
197 o.add(buildLogEntry()); | 197 o.add(buildLogEntry()); |
198 return o; | 198 return o; |
199 } | 199 } |
200 | 200 |
201 checkUnnamed3714(core.List<api.LogEntry> o) { | 201 checkUnnamed3806(core.List<api.LogEntry> o) { |
202 unittest.expect(o, unittest.hasLength(2)); | 202 unittest.expect(o, unittest.hasLength(2)); |
203 checkLogEntry(o[0]); | 203 checkLogEntry(o[0]); |
204 checkLogEntry(o[1]); | 204 checkLogEntry(o[1]); |
205 } | 205 } |
206 | 206 |
207 core.int buildCounterListLogEntriesResponse = 0; | 207 core.int buildCounterListLogEntriesResponse = 0; |
208 buildListLogEntriesResponse() { | 208 buildListLogEntriesResponse() { |
209 var o = new api.ListLogEntriesResponse(); | 209 var o = new api.ListLogEntriesResponse(); |
210 buildCounterListLogEntriesResponse++; | 210 buildCounterListLogEntriesResponse++; |
211 if (buildCounterListLogEntriesResponse < 3) { | 211 if (buildCounterListLogEntriesResponse < 3) { |
212 o.entries = buildUnnamed3714(); | 212 o.entries = buildUnnamed3806(); |
213 o.nextPageToken = "foo"; | 213 o.nextPageToken = "foo"; |
214 } | 214 } |
215 buildCounterListLogEntriesResponse--; | 215 buildCounterListLogEntriesResponse--; |
216 return o; | 216 return o; |
217 } | 217 } |
218 | 218 |
219 checkListLogEntriesResponse(api.ListLogEntriesResponse o) { | 219 checkListLogEntriesResponse(api.ListLogEntriesResponse o) { |
220 buildCounterListLogEntriesResponse++; | 220 buildCounterListLogEntriesResponse++; |
221 if (buildCounterListLogEntriesResponse < 3) { | 221 if (buildCounterListLogEntriesResponse < 3) { |
222 checkUnnamed3714(o.entries); | 222 checkUnnamed3806(o.entries); |
223 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 223 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
224 } | 224 } |
225 buildCounterListLogEntriesResponse--; | 225 buildCounterListLogEntriesResponse--; |
226 } | 226 } |
227 | 227 |
228 buildUnnamed3715() { | 228 buildUnnamed3807() { |
229 var o = new core.List<api.LogMetric>(); | 229 var o = new core.List<api.LogMetric>(); |
230 o.add(buildLogMetric()); | 230 o.add(buildLogMetric()); |
231 o.add(buildLogMetric()); | 231 o.add(buildLogMetric()); |
232 return o; | 232 return o; |
233 } | 233 } |
234 | 234 |
235 checkUnnamed3715(core.List<api.LogMetric> o) { | 235 checkUnnamed3807(core.List<api.LogMetric> o) { |
236 unittest.expect(o, unittest.hasLength(2)); | 236 unittest.expect(o, unittest.hasLength(2)); |
237 checkLogMetric(o[0]); | 237 checkLogMetric(o[0]); |
238 checkLogMetric(o[1]); | 238 checkLogMetric(o[1]); |
239 } | 239 } |
240 | 240 |
241 core.int buildCounterListLogMetricsResponse = 0; | 241 core.int buildCounterListLogMetricsResponse = 0; |
242 buildListLogMetricsResponse() { | 242 buildListLogMetricsResponse() { |
243 var o = new api.ListLogMetricsResponse(); | 243 var o = new api.ListLogMetricsResponse(); |
244 buildCounterListLogMetricsResponse++; | 244 buildCounterListLogMetricsResponse++; |
245 if (buildCounterListLogMetricsResponse < 3) { | 245 if (buildCounterListLogMetricsResponse < 3) { |
246 o.metrics = buildUnnamed3715(); | 246 o.metrics = buildUnnamed3807(); |
247 o.nextPageToken = "foo"; | 247 o.nextPageToken = "foo"; |
248 } | 248 } |
249 buildCounterListLogMetricsResponse--; | 249 buildCounterListLogMetricsResponse--; |
250 return o; | 250 return o; |
251 } | 251 } |
252 | 252 |
253 checkListLogMetricsResponse(api.ListLogMetricsResponse o) { | 253 checkListLogMetricsResponse(api.ListLogMetricsResponse o) { |
254 buildCounterListLogMetricsResponse++; | 254 buildCounterListLogMetricsResponse++; |
255 if (buildCounterListLogMetricsResponse < 3) { | 255 if (buildCounterListLogMetricsResponse < 3) { |
256 checkUnnamed3715(o.metrics); | 256 checkUnnamed3807(o.metrics); |
257 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 257 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
258 } | 258 } |
259 buildCounterListLogMetricsResponse--; | 259 buildCounterListLogMetricsResponse--; |
260 } | 260 } |
261 | 261 |
262 buildUnnamed3716() { | 262 buildUnnamed3808() { |
263 var o = new core.List<core.String>(); | 263 var o = new core.List<core.String>(); |
264 o.add("foo"); | 264 o.add("foo"); |
265 o.add("foo"); | 265 o.add("foo"); |
266 return o; | 266 return o; |
267 } | 267 } |
268 | 268 |
269 checkUnnamed3716(core.List<core.String> o) { | 269 checkUnnamed3808(core.List<core.String> o) { |
270 unittest.expect(o, unittest.hasLength(2)); | 270 unittest.expect(o, unittest.hasLength(2)); |
271 unittest.expect(o[0], unittest.equals('foo')); | 271 unittest.expect(o[0], unittest.equals('foo')); |
272 unittest.expect(o[1], unittest.equals('foo')); | 272 unittest.expect(o[1], unittest.equals('foo')); |
273 } | 273 } |
274 | 274 |
275 core.int buildCounterListLogsResponse = 0; | 275 core.int buildCounterListLogsResponse = 0; |
276 buildListLogsResponse() { | 276 buildListLogsResponse() { |
277 var o = new api.ListLogsResponse(); | 277 var o = new api.ListLogsResponse(); |
278 buildCounterListLogsResponse++; | 278 buildCounterListLogsResponse++; |
279 if (buildCounterListLogsResponse < 3) { | 279 if (buildCounterListLogsResponse < 3) { |
280 o.logNames = buildUnnamed3716(); | 280 o.logNames = buildUnnamed3808(); |
281 o.nextPageToken = "foo"; | 281 o.nextPageToken = "foo"; |
282 } | 282 } |
283 buildCounterListLogsResponse--; | 283 buildCounterListLogsResponse--; |
284 return o; | 284 return o; |
285 } | 285 } |
286 | 286 |
287 checkListLogsResponse(api.ListLogsResponse o) { | 287 checkListLogsResponse(api.ListLogsResponse o) { |
288 buildCounterListLogsResponse++; | 288 buildCounterListLogsResponse++; |
289 if (buildCounterListLogsResponse < 3) { | 289 if (buildCounterListLogsResponse < 3) { |
290 checkUnnamed3716(o.logNames); | 290 checkUnnamed3808(o.logNames); |
291 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 291 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
292 } | 292 } |
293 buildCounterListLogsResponse--; | 293 buildCounterListLogsResponse--; |
294 } | 294 } |
295 | 295 |
296 buildUnnamed3717() { | 296 buildUnnamed3809() { |
297 var o = new core.List<api.MonitoredResourceDescriptor>(); | 297 var o = new core.List<api.MonitoredResourceDescriptor>(); |
298 o.add(buildMonitoredResourceDescriptor()); | 298 o.add(buildMonitoredResourceDescriptor()); |
299 o.add(buildMonitoredResourceDescriptor()); | 299 o.add(buildMonitoredResourceDescriptor()); |
300 return o; | 300 return o; |
301 } | 301 } |
302 | 302 |
303 checkUnnamed3717(core.List<api.MonitoredResourceDescriptor> o) { | 303 checkUnnamed3809(core.List<api.MonitoredResourceDescriptor> o) { |
304 unittest.expect(o, unittest.hasLength(2)); | 304 unittest.expect(o, unittest.hasLength(2)); |
305 checkMonitoredResourceDescriptor(o[0]); | 305 checkMonitoredResourceDescriptor(o[0]); |
306 checkMonitoredResourceDescriptor(o[1]); | 306 checkMonitoredResourceDescriptor(o[1]); |
307 } | 307 } |
308 | 308 |
309 core.int buildCounterListMonitoredResourceDescriptorsResponse = 0; | 309 core.int buildCounterListMonitoredResourceDescriptorsResponse = 0; |
310 buildListMonitoredResourceDescriptorsResponse() { | 310 buildListMonitoredResourceDescriptorsResponse() { |
311 var o = new api.ListMonitoredResourceDescriptorsResponse(); | 311 var o = new api.ListMonitoredResourceDescriptorsResponse(); |
312 buildCounterListMonitoredResourceDescriptorsResponse++; | 312 buildCounterListMonitoredResourceDescriptorsResponse++; |
313 if (buildCounterListMonitoredResourceDescriptorsResponse < 3) { | 313 if (buildCounterListMonitoredResourceDescriptorsResponse < 3) { |
314 o.nextPageToken = "foo"; | 314 o.nextPageToken = "foo"; |
315 o.resourceDescriptors = buildUnnamed3717(); | 315 o.resourceDescriptors = buildUnnamed3809(); |
316 } | 316 } |
317 buildCounterListMonitoredResourceDescriptorsResponse--; | 317 buildCounterListMonitoredResourceDescriptorsResponse--; |
318 return o; | 318 return o; |
319 } | 319 } |
320 | 320 |
321 checkListMonitoredResourceDescriptorsResponse(api.ListMonitoredResourceDescripto
rsResponse o) { | 321 checkListMonitoredResourceDescriptorsResponse(api.ListMonitoredResourceDescripto
rsResponse o) { |
322 buildCounterListMonitoredResourceDescriptorsResponse++; | 322 buildCounterListMonitoredResourceDescriptorsResponse++; |
323 if (buildCounterListMonitoredResourceDescriptorsResponse < 3) { | 323 if (buildCounterListMonitoredResourceDescriptorsResponse < 3) { |
324 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 324 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
325 checkUnnamed3717(o.resourceDescriptors); | 325 checkUnnamed3809(o.resourceDescriptors); |
326 } | 326 } |
327 buildCounterListMonitoredResourceDescriptorsResponse--; | 327 buildCounterListMonitoredResourceDescriptorsResponse--; |
328 } | 328 } |
329 | 329 |
330 buildUnnamed3718() { | 330 buildUnnamed3810() { |
331 var o = new core.List<api.LogSink>(); | 331 var o = new core.List<api.LogSink>(); |
332 o.add(buildLogSink()); | 332 o.add(buildLogSink()); |
333 o.add(buildLogSink()); | 333 o.add(buildLogSink()); |
334 return o; | 334 return o; |
335 } | 335 } |
336 | 336 |
337 checkUnnamed3718(core.List<api.LogSink> o) { | 337 checkUnnamed3810(core.List<api.LogSink> o) { |
338 unittest.expect(o, unittest.hasLength(2)); | 338 unittest.expect(o, unittest.hasLength(2)); |
339 checkLogSink(o[0]); | 339 checkLogSink(o[0]); |
340 checkLogSink(o[1]); | 340 checkLogSink(o[1]); |
341 } | 341 } |
342 | 342 |
343 core.int buildCounterListSinksResponse = 0; | 343 core.int buildCounterListSinksResponse = 0; |
344 buildListSinksResponse() { | 344 buildListSinksResponse() { |
345 var o = new api.ListSinksResponse(); | 345 var o = new api.ListSinksResponse(); |
346 buildCounterListSinksResponse++; | 346 buildCounterListSinksResponse++; |
347 if (buildCounterListSinksResponse < 3) { | 347 if (buildCounterListSinksResponse < 3) { |
348 o.nextPageToken = "foo"; | 348 o.nextPageToken = "foo"; |
349 o.sinks = buildUnnamed3718(); | 349 o.sinks = buildUnnamed3810(); |
350 } | 350 } |
351 buildCounterListSinksResponse--; | 351 buildCounterListSinksResponse--; |
352 return o; | 352 return o; |
353 } | 353 } |
354 | 354 |
355 checkListSinksResponse(api.ListSinksResponse o) { | 355 checkListSinksResponse(api.ListSinksResponse o) { |
356 buildCounterListSinksResponse++; | 356 buildCounterListSinksResponse++; |
357 if (buildCounterListSinksResponse < 3) { | 357 if (buildCounterListSinksResponse < 3) { |
358 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 358 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
359 checkUnnamed3718(o.sinks); | 359 checkUnnamed3810(o.sinks); |
360 } | 360 } |
361 buildCounterListSinksResponse--; | 361 buildCounterListSinksResponse--; |
362 } | 362 } |
363 | 363 |
364 buildUnnamed3719() { | 364 buildUnnamed3811() { |
365 var o = new core.Map<core.String, core.Object>(); | 365 var o = new core.Map<core.String, core.Object>(); |
366 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 366 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; |
367 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 367 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; |
368 return o; | 368 return o; |
369 } | 369 } |
370 | 370 |
371 checkUnnamed3719(core.Map<core.String, core.Object> o) { | 371 checkUnnamed3811(core.Map<core.String, core.Object> o) { |
372 unittest.expect(o, unittest.hasLength(2)); | 372 unittest.expect(o, unittest.hasLength(2)); |
373 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')); | 373 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')); |
374 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')); | 374 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')); |
375 } | 375 } |
376 | 376 |
377 buildUnnamed3720() { | 377 buildUnnamed3812() { |
378 var o = new core.Map<core.String, core.String>(); | 378 var o = new core.Map<core.String, core.String>(); |
379 o["x"] = "foo"; | 379 o["x"] = "foo"; |
380 o["y"] = "foo"; | 380 o["y"] = "foo"; |
381 return o; | 381 return o; |
382 } | 382 } |
383 | 383 |
384 checkUnnamed3720(core.Map<core.String, core.String> o) { | 384 checkUnnamed3812(core.Map<core.String, core.String> o) { |
385 unittest.expect(o, unittest.hasLength(2)); | 385 unittest.expect(o, unittest.hasLength(2)); |
386 unittest.expect(o["x"], unittest.equals('foo')); | 386 unittest.expect(o["x"], unittest.equals('foo')); |
387 unittest.expect(o["y"], unittest.equals('foo')); | 387 unittest.expect(o["y"], unittest.equals('foo')); |
388 } | 388 } |
389 | 389 |
390 buildUnnamed3721() { | 390 buildUnnamed3813() { |
391 var o = new core.Map<core.String, core.Object>(); | 391 var o = new core.Map<core.String, core.Object>(); |
392 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 392 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; |
393 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 393 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; |
394 return o; | 394 return o; |
395 } | 395 } |
396 | 396 |
397 checkUnnamed3721(core.Map<core.String, core.Object> o) { | 397 checkUnnamed3813(core.Map<core.String, core.Object> o) { |
398 unittest.expect(o, unittest.hasLength(2)); | 398 unittest.expect(o, unittest.hasLength(2)); |
399 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')); | 399 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')); |
400 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')); | 400 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')); |
401 } | 401 } |
402 | 402 |
403 core.int buildCounterLogEntry = 0; | 403 core.int buildCounterLogEntry = 0; |
404 buildLogEntry() { | 404 buildLogEntry() { |
405 var o = new api.LogEntry(); | 405 var o = new api.LogEntry(); |
406 buildCounterLogEntry++; | 406 buildCounterLogEntry++; |
407 if (buildCounterLogEntry < 3) { | 407 if (buildCounterLogEntry < 3) { |
408 o.httpRequest = buildHttpRequest(); | 408 o.httpRequest = buildHttpRequest(); |
409 o.insertId = "foo"; | 409 o.insertId = "foo"; |
410 o.jsonPayload = buildUnnamed3719(); | 410 o.jsonPayload = buildUnnamed3811(); |
411 o.labels = buildUnnamed3720(); | 411 o.labels = buildUnnamed3812(); |
412 o.logName = "foo"; | 412 o.logName = "foo"; |
413 o.operation = buildLogEntryOperation(); | 413 o.operation = buildLogEntryOperation(); |
414 o.protoPayload = buildUnnamed3721(); | 414 o.protoPayload = buildUnnamed3813(); |
415 o.resource = buildMonitoredResource(); | 415 o.resource = buildMonitoredResource(); |
416 o.severity = "foo"; | 416 o.severity = "foo"; |
417 o.sourceLocation = buildLogEntrySourceLocation(); | 417 o.sourceLocation = buildLogEntrySourceLocation(); |
418 o.textPayload = "foo"; | 418 o.textPayload = "foo"; |
419 o.timestamp = "foo"; | 419 o.timestamp = "foo"; |
420 o.trace = "foo"; | 420 o.trace = "foo"; |
421 } | 421 } |
422 buildCounterLogEntry--; | 422 buildCounterLogEntry--; |
423 return o; | 423 return o; |
424 } | 424 } |
425 | 425 |
426 checkLogEntry(api.LogEntry o) { | 426 checkLogEntry(api.LogEntry o) { |
427 buildCounterLogEntry++; | 427 buildCounterLogEntry++; |
428 if (buildCounterLogEntry < 3) { | 428 if (buildCounterLogEntry < 3) { |
429 checkHttpRequest(o.httpRequest); | 429 checkHttpRequest(o.httpRequest); |
430 unittest.expect(o.insertId, unittest.equals('foo')); | 430 unittest.expect(o.insertId, unittest.equals('foo')); |
431 checkUnnamed3719(o.jsonPayload); | 431 checkUnnamed3811(o.jsonPayload); |
432 checkUnnamed3720(o.labels); | 432 checkUnnamed3812(o.labels); |
433 unittest.expect(o.logName, unittest.equals('foo')); | 433 unittest.expect(o.logName, unittest.equals('foo')); |
434 checkLogEntryOperation(o.operation); | 434 checkLogEntryOperation(o.operation); |
435 checkUnnamed3721(o.protoPayload); | 435 checkUnnamed3813(o.protoPayload); |
436 checkMonitoredResource(o.resource); | 436 checkMonitoredResource(o.resource); |
437 unittest.expect(o.severity, unittest.equals('foo')); | 437 unittest.expect(o.severity, unittest.equals('foo')); |
438 checkLogEntrySourceLocation(o.sourceLocation); | 438 checkLogEntrySourceLocation(o.sourceLocation); |
439 unittest.expect(o.textPayload, unittest.equals('foo')); | 439 unittest.expect(o.textPayload, unittest.equals('foo')); |
440 unittest.expect(o.timestamp, unittest.equals('foo')); | 440 unittest.expect(o.timestamp, unittest.equals('foo')); |
441 unittest.expect(o.trace, unittest.equals('foo')); | 441 unittest.expect(o.trace, unittest.equals('foo')); |
442 } | 442 } |
443 buildCounterLogEntry--; | 443 buildCounterLogEntry--; |
444 } | 444 } |
445 | 445 |
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
565 unittest.expect(o.endTime, unittest.equals('foo')); | 565 unittest.expect(o.endTime, unittest.equals('foo')); |
566 unittest.expect(o.filter, unittest.equals('foo')); | 566 unittest.expect(o.filter, unittest.equals('foo')); |
567 unittest.expect(o.name, unittest.equals('foo')); | 567 unittest.expect(o.name, unittest.equals('foo')); |
568 unittest.expect(o.outputVersionFormat, unittest.equals('foo')); | 568 unittest.expect(o.outputVersionFormat, unittest.equals('foo')); |
569 unittest.expect(o.startTime, unittest.equals('foo')); | 569 unittest.expect(o.startTime, unittest.equals('foo')); |
570 unittest.expect(o.writerIdentity, unittest.equals('foo')); | 570 unittest.expect(o.writerIdentity, unittest.equals('foo')); |
571 } | 571 } |
572 buildCounterLogSink--; | 572 buildCounterLogSink--; |
573 } | 573 } |
574 | 574 |
575 buildUnnamed3722() { | 575 buildUnnamed3814() { |
576 var o = new core.Map<core.String, core.String>(); | 576 var o = new core.Map<core.String, core.String>(); |
577 o["x"] = "foo"; | 577 o["x"] = "foo"; |
578 o["y"] = "foo"; | 578 o["y"] = "foo"; |
579 return o; | 579 return o; |
580 } | 580 } |
581 | 581 |
582 checkUnnamed3722(core.Map<core.String, core.String> o) { | 582 checkUnnamed3814(core.Map<core.String, core.String> o) { |
583 unittest.expect(o, unittest.hasLength(2)); | 583 unittest.expect(o, unittest.hasLength(2)); |
584 unittest.expect(o["x"], unittest.equals('foo')); | 584 unittest.expect(o["x"], unittest.equals('foo')); |
585 unittest.expect(o["y"], unittest.equals('foo')); | 585 unittest.expect(o["y"], unittest.equals('foo')); |
586 } | 586 } |
587 | 587 |
588 core.int buildCounterMonitoredResource = 0; | 588 core.int buildCounterMonitoredResource = 0; |
589 buildMonitoredResource() { | 589 buildMonitoredResource() { |
590 var o = new api.MonitoredResource(); | 590 var o = new api.MonitoredResource(); |
591 buildCounterMonitoredResource++; | 591 buildCounterMonitoredResource++; |
592 if (buildCounterMonitoredResource < 3) { | 592 if (buildCounterMonitoredResource < 3) { |
593 o.labels = buildUnnamed3722(); | 593 o.labels = buildUnnamed3814(); |
594 o.type = "foo"; | 594 o.type = "foo"; |
595 } | 595 } |
596 buildCounterMonitoredResource--; | 596 buildCounterMonitoredResource--; |
597 return o; | 597 return o; |
598 } | 598 } |
599 | 599 |
600 checkMonitoredResource(api.MonitoredResource o) { | 600 checkMonitoredResource(api.MonitoredResource o) { |
601 buildCounterMonitoredResource++; | 601 buildCounterMonitoredResource++; |
602 if (buildCounterMonitoredResource < 3) { | 602 if (buildCounterMonitoredResource < 3) { |
603 checkUnnamed3722(o.labels); | 603 checkUnnamed3814(o.labels); |
604 unittest.expect(o.type, unittest.equals('foo')); | 604 unittest.expect(o.type, unittest.equals('foo')); |
605 } | 605 } |
606 buildCounterMonitoredResource--; | 606 buildCounterMonitoredResource--; |
607 } | 607 } |
608 | 608 |
609 buildUnnamed3723() { | 609 buildUnnamed3815() { |
610 var o = new core.List<api.LabelDescriptor>(); | 610 var o = new core.List<api.LabelDescriptor>(); |
611 o.add(buildLabelDescriptor()); | 611 o.add(buildLabelDescriptor()); |
612 o.add(buildLabelDescriptor()); | 612 o.add(buildLabelDescriptor()); |
613 return o; | 613 return o; |
614 } | 614 } |
615 | 615 |
616 checkUnnamed3723(core.List<api.LabelDescriptor> o) { | 616 checkUnnamed3815(core.List<api.LabelDescriptor> o) { |
617 unittest.expect(o, unittest.hasLength(2)); | 617 unittest.expect(o, unittest.hasLength(2)); |
618 checkLabelDescriptor(o[0]); | 618 checkLabelDescriptor(o[0]); |
619 checkLabelDescriptor(o[1]); | 619 checkLabelDescriptor(o[1]); |
620 } | 620 } |
621 | 621 |
622 core.int buildCounterMonitoredResourceDescriptor = 0; | 622 core.int buildCounterMonitoredResourceDescriptor = 0; |
623 buildMonitoredResourceDescriptor() { | 623 buildMonitoredResourceDescriptor() { |
624 var o = new api.MonitoredResourceDescriptor(); | 624 var o = new api.MonitoredResourceDescriptor(); |
625 buildCounterMonitoredResourceDescriptor++; | 625 buildCounterMonitoredResourceDescriptor++; |
626 if (buildCounterMonitoredResourceDescriptor < 3) { | 626 if (buildCounterMonitoredResourceDescriptor < 3) { |
627 o.description = "foo"; | 627 o.description = "foo"; |
628 o.displayName = "foo"; | 628 o.displayName = "foo"; |
629 o.labels = buildUnnamed3723(); | 629 o.labels = buildUnnamed3815(); |
630 o.name = "foo"; | 630 o.name = "foo"; |
631 o.type = "foo"; | 631 o.type = "foo"; |
632 } | 632 } |
633 buildCounterMonitoredResourceDescriptor--; | 633 buildCounterMonitoredResourceDescriptor--; |
634 return o; | 634 return o; |
635 } | 635 } |
636 | 636 |
637 checkMonitoredResourceDescriptor(api.MonitoredResourceDescriptor o) { | 637 checkMonitoredResourceDescriptor(api.MonitoredResourceDescriptor o) { |
638 buildCounterMonitoredResourceDescriptor++; | 638 buildCounterMonitoredResourceDescriptor++; |
639 if (buildCounterMonitoredResourceDescriptor < 3) { | 639 if (buildCounterMonitoredResourceDescriptor < 3) { |
640 unittest.expect(o.description, unittest.equals('foo')); | 640 unittest.expect(o.description, unittest.equals('foo')); |
641 unittest.expect(o.displayName, unittest.equals('foo')); | 641 unittest.expect(o.displayName, unittest.equals('foo')); |
642 checkUnnamed3723(o.labels); | 642 checkUnnamed3815(o.labels); |
643 unittest.expect(o.name, unittest.equals('foo')); | 643 unittest.expect(o.name, unittest.equals('foo')); |
644 unittest.expect(o.type, unittest.equals('foo')); | 644 unittest.expect(o.type, unittest.equals('foo')); |
645 } | 645 } |
646 buildCounterMonitoredResourceDescriptor--; | 646 buildCounterMonitoredResourceDescriptor--; |
647 } | 647 } |
648 | 648 |
649 buildUnnamed3724() { | 649 buildUnnamed3816() { |
650 var o = new core.List<api.LogLine>(); | 650 var o = new core.List<api.LogLine>(); |
651 o.add(buildLogLine()); | 651 o.add(buildLogLine()); |
652 o.add(buildLogLine()); | 652 o.add(buildLogLine()); |
653 return o; | 653 return o; |
654 } | 654 } |
655 | 655 |
656 checkUnnamed3724(core.List<api.LogLine> o) { | 656 checkUnnamed3816(core.List<api.LogLine> o) { |
657 unittest.expect(o, unittest.hasLength(2)); | 657 unittest.expect(o, unittest.hasLength(2)); |
658 checkLogLine(o[0]); | 658 checkLogLine(o[0]); |
659 checkLogLine(o[1]); | 659 checkLogLine(o[1]); |
660 } | 660 } |
661 | 661 |
662 buildUnnamed3725() { | 662 buildUnnamed3817() { |
663 var o = new core.List<api.SourceReference>(); | 663 var o = new core.List<api.SourceReference>(); |
664 o.add(buildSourceReference()); | 664 o.add(buildSourceReference()); |
665 o.add(buildSourceReference()); | 665 o.add(buildSourceReference()); |
666 return o; | 666 return o; |
667 } | 667 } |
668 | 668 |
669 checkUnnamed3725(core.List<api.SourceReference> o) { | 669 checkUnnamed3817(core.List<api.SourceReference> o) { |
670 unittest.expect(o, unittest.hasLength(2)); | 670 unittest.expect(o, unittest.hasLength(2)); |
671 checkSourceReference(o[0]); | 671 checkSourceReference(o[0]); |
672 checkSourceReference(o[1]); | 672 checkSourceReference(o[1]); |
673 } | 673 } |
674 | 674 |
675 core.int buildCounterRequestLog = 0; | 675 core.int buildCounterRequestLog = 0; |
676 buildRequestLog() { | 676 buildRequestLog() { |
677 var o = new api.RequestLog(); | 677 var o = new api.RequestLog(); |
678 buildCounterRequestLog++; | 678 buildCounterRequestLog++; |
679 if (buildCounterRequestLog < 3) { | 679 if (buildCounterRequestLog < 3) { |
680 o.appEngineRelease = "foo"; | 680 o.appEngineRelease = "foo"; |
681 o.appId = "foo"; | 681 o.appId = "foo"; |
682 o.cost = 42.0; | 682 o.cost = 42.0; |
683 o.endTime = "foo"; | 683 o.endTime = "foo"; |
684 o.finished = true; | 684 o.finished = true; |
685 o.first = true; | 685 o.first = true; |
686 o.host = "foo"; | 686 o.host = "foo"; |
687 o.httpVersion = "foo"; | 687 o.httpVersion = "foo"; |
688 o.instanceId = "foo"; | 688 o.instanceId = "foo"; |
689 o.instanceIndex = 42; | 689 o.instanceIndex = 42; |
690 o.ip = "foo"; | 690 o.ip = "foo"; |
691 o.latency = "foo"; | 691 o.latency = "foo"; |
692 o.line = buildUnnamed3724(); | 692 o.line = buildUnnamed3816(); |
693 o.megaCycles = "foo"; | 693 o.megaCycles = "foo"; |
694 o.method = "foo"; | 694 o.method = "foo"; |
695 o.moduleId = "foo"; | 695 o.moduleId = "foo"; |
696 o.nickname = "foo"; | 696 o.nickname = "foo"; |
697 o.pendingTime = "foo"; | 697 o.pendingTime = "foo"; |
698 o.referrer = "foo"; | 698 o.referrer = "foo"; |
699 o.requestId = "foo"; | 699 o.requestId = "foo"; |
700 o.resource = "foo"; | 700 o.resource = "foo"; |
701 o.responseSize = "foo"; | 701 o.responseSize = "foo"; |
702 o.sourceReference = buildUnnamed3725(); | 702 o.sourceReference = buildUnnamed3817(); |
703 o.startTime = "foo"; | 703 o.startTime = "foo"; |
704 o.status = 42; | 704 o.status = 42; |
705 o.taskName = "foo"; | 705 o.taskName = "foo"; |
706 o.taskQueueName = "foo"; | 706 o.taskQueueName = "foo"; |
707 o.traceId = "foo"; | 707 o.traceId = "foo"; |
708 o.urlMapEntry = "foo"; | 708 o.urlMapEntry = "foo"; |
709 o.userAgent = "foo"; | 709 o.userAgent = "foo"; |
710 o.versionId = "foo"; | 710 o.versionId = "foo"; |
711 o.wasLoadingRequest = true; | 711 o.wasLoadingRequest = true; |
712 } | 712 } |
713 buildCounterRequestLog--; | 713 buildCounterRequestLog--; |
714 return o; | 714 return o; |
715 } | 715 } |
716 | 716 |
717 checkRequestLog(api.RequestLog o) { | 717 checkRequestLog(api.RequestLog o) { |
718 buildCounterRequestLog++; | 718 buildCounterRequestLog++; |
719 if (buildCounterRequestLog < 3) { | 719 if (buildCounterRequestLog < 3) { |
720 unittest.expect(o.appEngineRelease, unittest.equals('foo')); | 720 unittest.expect(o.appEngineRelease, unittest.equals('foo')); |
721 unittest.expect(o.appId, unittest.equals('foo')); | 721 unittest.expect(o.appId, unittest.equals('foo')); |
722 unittest.expect(o.cost, unittest.equals(42.0)); | 722 unittest.expect(o.cost, unittest.equals(42.0)); |
723 unittest.expect(o.endTime, unittest.equals('foo')); | 723 unittest.expect(o.endTime, unittest.equals('foo')); |
724 unittest.expect(o.finished, unittest.isTrue); | 724 unittest.expect(o.finished, unittest.isTrue); |
725 unittest.expect(o.first, unittest.isTrue); | 725 unittest.expect(o.first, unittest.isTrue); |
726 unittest.expect(o.host, unittest.equals('foo')); | 726 unittest.expect(o.host, unittest.equals('foo')); |
727 unittest.expect(o.httpVersion, unittest.equals('foo')); | 727 unittest.expect(o.httpVersion, unittest.equals('foo')); |
728 unittest.expect(o.instanceId, unittest.equals('foo')); | 728 unittest.expect(o.instanceId, unittest.equals('foo')); |
729 unittest.expect(o.instanceIndex, unittest.equals(42)); | 729 unittest.expect(o.instanceIndex, unittest.equals(42)); |
730 unittest.expect(o.ip, unittest.equals('foo')); | 730 unittest.expect(o.ip, unittest.equals('foo')); |
731 unittest.expect(o.latency, unittest.equals('foo')); | 731 unittest.expect(o.latency, unittest.equals('foo')); |
732 checkUnnamed3724(o.line); | 732 checkUnnamed3816(o.line); |
733 unittest.expect(o.megaCycles, unittest.equals('foo')); | 733 unittest.expect(o.megaCycles, unittest.equals('foo')); |
734 unittest.expect(o.method, unittest.equals('foo')); | 734 unittest.expect(o.method, unittest.equals('foo')); |
735 unittest.expect(o.moduleId, unittest.equals('foo')); | 735 unittest.expect(o.moduleId, unittest.equals('foo')); |
736 unittest.expect(o.nickname, unittest.equals('foo')); | 736 unittest.expect(o.nickname, unittest.equals('foo')); |
737 unittest.expect(o.pendingTime, unittest.equals('foo')); | 737 unittest.expect(o.pendingTime, unittest.equals('foo')); |
738 unittest.expect(o.referrer, unittest.equals('foo')); | 738 unittest.expect(o.referrer, unittest.equals('foo')); |
739 unittest.expect(o.requestId, unittest.equals('foo')); | 739 unittest.expect(o.requestId, unittest.equals('foo')); |
740 unittest.expect(o.resource, unittest.equals('foo')); | 740 unittest.expect(o.resource, unittest.equals('foo')); |
741 unittest.expect(o.responseSize, unittest.equals('foo')); | 741 unittest.expect(o.responseSize, unittest.equals('foo')); |
742 checkUnnamed3725(o.sourceReference); | 742 checkUnnamed3817(o.sourceReference); |
743 unittest.expect(o.startTime, unittest.equals('foo')); | 743 unittest.expect(o.startTime, unittest.equals('foo')); |
744 unittest.expect(o.status, unittest.equals(42)); | 744 unittest.expect(o.status, unittest.equals(42)); |
745 unittest.expect(o.taskName, unittest.equals('foo')); | 745 unittest.expect(o.taskName, unittest.equals('foo')); |
746 unittest.expect(o.taskQueueName, unittest.equals('foo')); | 746 unittest.expect(o.taskQueueName, unittest.equals('foo')); |
747 unittest.expect(o.traceId, unittest.equals('foo')); | 747 unittest.expect(o.traceId, unittest.equals('foo')); |
748 unittest.expect(o.urlMapEntry, unittest.equals('foo')); | 748 unittest.expect(o.urlMapEntry, unittest.equals('foo')); |
749 unittest.expect(o.userAgent, unittest.equals('foo')); | 749 unittest.expect(o.userAgent, unittest.equals('foo')); |
750 unittest.expect(o.versionId, unittest.equals('foo')); | 750 unittest.expect(o.versionId, unittest.equals('foo')); |
751 unittest.expect(o.wasLoadingRequest, unittest.isTrue); | 751 unittest.expect(o.wasLoadingRequest, unittest.isTrue); |
752 } | 752 } |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
790 | 790 |
791 checkSourceReference(api.SourceReference o) { | 791 checkSourceReference(api.SourceReference o) { |
792 buildCounterSourceReference++; | 792 buildCounterSourceReference++; |
793 if (buildCounterSourceReference < 3) { | 793 if (buildCounterSourceReference < 3) { |
794 unittest.expect(o.repository, unittest.equals('foo')); | 794 unittest.expect(o.repository, unittest.equals('foo')); |
795 unittest.expect(o.revisionId, unittest.equals('foo')); | 795 unittest.expect(o.revisionId, unittest.equals('foo')); |
796 } | 796 } |
797 buildCounterSourceReference--; | 797 buildCounterSourceReference--; |
798 } | 798 } |
799 | 799 |
800 buildUnnamed3726() { | 800 buildUnnamed3818() { |
801 var o = new core.List<api.LogEntry>(); | 801 var o = new core.List<api.LogEntry>(); |
802 o.add(buildLogEntry()); | 802 o.add(buildLogEntry()); |
803 o.add(buildLogEntry()); | 803 o.add(buildLogEntry()); |
804 return o; | 804 return o; |
805 } | 805 } |
806 | 806 |
807 checkUnnamed3726(core.List<api.LogEntry> o) { | 807 checkUnnamed3818(core.List<api.LogEntry> o) { |
808 unittest.expect(o, unittest.hasLength(2)); | 808 unittest.expect(o, unittest.hasLength(2)); |
809 checkLogEntry(o[0]); | 809 checkLogEntry(o[0]); |
810 checkLogEntry(o[1]); | 810 checkLogEntry(o[1]); |
811 } | 811 } |
812 | 812 |
813 buildUnnamed3727() { | 813 buildUnnamed3819() { |
814 var o = new core.Map<core.String, core.String>(); | 814 var o = new core.Map<core.String, core.String>(); |
815 o["x"] = "foo"; | 815 o["x"] = "foo"; |
816 o["y"] = "foo"; | 816 o["y"] = "foo"; |
817 return o; | 817 return o; |
818 } | 818 } |
819 | 819 |
820 checkUnnamed3727(core.Map<core.String, core.String> o) { | 820 checkUnnamed3819(core.Map<core.String, core.String> o) { |
821 unittest.expect(o, unittest.hasLength(2)); | 821 unittest.expect(o, unittest.hasLength(2)); |
822 unittest.expect(o["x"], unittest.equals('foo')); | 822 unittest.expect(o["x"], unittest.equals('foo')); |
823 unittest.expect(o["y"], unittest.equals('foo')); | 823 unittest.expect(o["y"], unittest.equals('foo')); |
824 } | 824 } |
825 | 825 |
826 core.int buildCounterWriteLogEntriesRequest = 0; | 826 core.int buildCounterWriteLogEntriesRequest = 0; |
827 buildWriteLogEntriesRequest() { | 827 buildWriteLogEntriesRequest() { |
828 var o = new api.WriteLogEntriesRequest(); | 828 var o = new api.WriteLogEntriesRequest(); |
829 buildCounterWriteLogEntriesRequest++; | 829 buildCounterWriteLogEntriesRequest++; |
830 if (buildCounterWriteLogEntriesRequest < 3) { | 830 if (buildCounterWriteLogEntriesRequest < 3) { |
831 o.entries = buildUnnamed3726(); | 831 o.entries = buildUnnamed3818(); |
832 o.labels = buildUnnamed3727(); | 832 o.labels = buildUnnamed3819(); |
833 o.logName = "foo"; | 833 o.logName = "foo"; |
834 o.partialSuccess = true; | 834 o.partialSuccess = true; |
835 o.resource = buildMonitoredResource(); | 835 o.resource = buildMonitoredResource(); |
836 } | 836 } |
837 buildCounterWriteLogEntriesRequest--; | 837 buildCounterWriteLogEntriesRequest--; |
838 return o; | 838 return o; |
839 } | 839 } |
840 | 840 |
841 checkWriteLogEntriesRequest(api.WriteLogEntriesRequest o) { | 841 checkWriteLogEntriesRequest(api.WriteLogEntriesRequest o) { |
842 buildCounterWriteLogEntriesRequest++; | 842 buildCounterWriteLogEntriesRequest++; |
843 if (buildCounterWriteLogEntriesRequest < 3) { | 843 if (buildCounterWriteLogEntriesRequest < 3) { |
844 checkUnnamed3726(o.entries); | 844 checkUnnamed3818(o.entries); |
845 checkUnnamed3727(o.labels); | 845 checkUnnamed3819(o.labels); |
846 unittest.expect(o.logName, unittest.equals('foo')); | 846 unittest.expect(o.logName, unittest.equals('foo')); |
847 unittest.expect(o.partialSuccess, unittest.isTrue); | 847 unittest.expect(o.partialSuccess, unittest.isTrue); |
848 checkMonitoredResource(o.resource); | 848 checkMonitoredResource(o.resource); |
849 } | 849 } |
850 buildCounterWriteLogEntriesRequest--; | 850 buildCounterWriteLogEntriesRequest--; |
851 } | 851 } |
852 | 852 |
853 core.int buildCounterWriteLogEntriesResponse = 0; | 853 core.int buildCounterWriteLogEntriesResponse = 0; |
854 buildWriteLogEntriesResponse() { | 854 buildWriteLogEntriesResponse() { |
855 var o = new api.WriteLogEntriesResponse(); | 855 var o = new api.WriteLogEntriesResponse(); |
(...skipping 792 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1648 res.get(arg_metricName).then(unittest.expectAsync(((api.LogMetric response
) { | 1648 res.get(arg_metricName).then(unittest.expectAsync(((api.LogMetric response
) { |
1649 checkLogMetric(response); | 1649 checkLogMetric(response); |
1650 }))); | 1650 }))); |
1651 }); | 1651 }); |
1652 | 1652 |
1653 unittest.test("method--list", () { | 1653 unittest.test("method--list", () { |
1654 | 1654 |
1655 var mock = new HttpServerMock(); | 1655 var mock = new HttpServerMock(); |
1656 api.ProjectsMetricsResourceApi res = new api.LoggingApi(mock).projects.met
rics; | 1656 api.ProjectsMetricsResourceApi res = new api.LoggingApi(mock).projects.met
rics; |
1657 var arg_parent = "foo"; | 1657 var arg_parent = "foo"; |
| 1658 var arg_pageToken = "foo"; |
1658 var arg_pageSize = 42; | 1659 var arg_pageSize = 42; |
1659 var arg_pageToken = "foo"; | |
1660 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1660 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
1661 var path = (req.url).path; | 1661 var path = (req.url).path; |
1662 var pathOffset = 0; | 1662 var pathOffset = 0; |
1663 var index; | 1663 var index; |
1664 var subPart; | 1664 var subPart; |
1665 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1665 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
1666 pathOffset += 1; | 1666 pathOffset += 1; |
1667 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("v2beta1/")); | 1667 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("v2beta1/")); |
1668 pathOffset += 8; | 1668 pathOffset += 8; |
1669 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; | 1669 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; |
1670 | 1670 |
1671 var query = (req.url).query; | 1671 var query = (req.url).query; |
1672 var queryOffset = 0; | 1672 var queryOffset = 0; |
1673 var queryMap = {}; | 1673 var queryMap = {}; |
1674 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 1674 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
1675 parseBool(n) { | 1675 parseBool(n) { |
1676 if (n == "true") return true; | 1676 if (n == "true") return true; |
1677 if (n == "false") return false; | 1677 if (n == "false") return false; |
1678 if (n == null) return null; | 1678 if (n == null) return null; |
1679 throw new core.ArgumentError("Invalid boolean: $n"); | 1679 throw new core.ArgumentError("Invalid boolean: $n"); |
1680 } | 1680 } |
1681 if (query.length > 0) { | 1681 if (query.length > 0) { |
1682 for (var part in query.split("&")) { | 1682 for (var part in query.split("&")) { |
1683 var keyvalue = part.split("="); | 1683 var keyvalue = part.split("="); |
1684 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 1684 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
1685 } | 1685 } |
1686 } | 1686 } |
| 1687 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); |
1687 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ
als(arg_pageSize)); | 1688 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ
als(arg_pageSize)); |
1688 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | |
1689 | 1689 |
1690 | 1690 |
1691 var h = { | 1691 var h = { |
1692 "content-type" : "application/json; charset=utf-8", | 1692 "content-type" : "application/json; charset=utf-8", |
1693 }; | 1693 }; |
1694 var resp = convert.JSON.encode(buildListLogMetricsResponse()); | 1694 var resp = convert.JSON.encode(buildListLogMetricsResponse()); |
1695 return new async.Future.value(stringResponse(200, h, resp)); | 1695 return new async.Future.value(stringResponse(200, h, resp)); |
1696 }), true); | 1696 }), true); |
1697 res.list(arg_parent, pageSize: arg_pageSize, pageToken: arg_pageToken).the
n(unittest.expectAsync(((api.ListLogMetricsResponse response) { | 1697 res.list(arg_parent, pageToken: arg_pageToken, pageSize: arg_pageSize).the
n(unittest.expectAsync(((api.ListLogMetricsResponse response) { |
1698 checkListLogMetricsResponse(response); | 1698 checkListLogMetricsResponse(response); |
1699 }))); | 1699 }))); |
1700 }); | 1700 }); |
1701 | 1701 |
1702 unittest.test("method--update", () { | 1702 unittest.test("method--update", () { |
1703 | 1703 |
1704 var mock = new HttpServerMock(); | 1704 var mock = new HttpServerMock(); |
1705 api.ProjectsMetricsResourceApi res = new api.LoggingApi(mock).projects.met
rics; | 1705 api.ProjectsMetricsResourceApi res = new api.LoggingApi(mock).projects.met
rics; |
1706 var arg_request = buildLogMetric(); | 1706 var arg_request = buildLogMetric(); |
1707 var arg_metricName = "foo"; | 1707 var arg_metricName = "foo"; |
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1891 res.get(arg_sinkName).then(unittest.expectAsync(((api.LogSink response) { | 1891 res.get(arg_sinkName).then(unittest.expectAsync(((api.LogSink response) { |
1892 checkLogSink(response); | 1892 checkLogSink(response); |
1893 }))); | 1893 }))); |
1894 }); | 1894 }); |
1895 | 1895 |
1896 unittest.test("method--list", () { | 1896 unittest.test("method--list", () { |
1897 | 1897 |
1898 var mock = new HttpServerMock(); | 1898 var mock = new HttpServerMock(); |
1899 api.ProjectsSinksResourceApi res = new api.LoggingApi(mock).projects.sinks
; | 1899 api.ProjectsSinksResourceApi res = new api.LoggingApi(mock).projects.sinks
; |
1900 var arg_parent = "foo"; | 1900 var arg_parent = "foo"; |
| 1901 var arg_pageSize = 42; |
1901 var arg_pageToken = "foo"; | 1902 var arg_pageToken = "foo"; |
1902 var arg_pageSize = 42; | |
1903 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1903 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
1904 var path = (req.url).path; | 1904 var path = (req.url).path; |
1905 var pathOffset = 0; | 1905 var pathOffset = 0; |
1906 var index; | 1906 var index; |
1907 var subPart; | 1907 var subPart; |
1908 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1908 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
1909 pathOffset += 1; | 1909 pathOffset += 1; |
1910 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("v2beta1/")); | 1910 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("v2beta1/")); |
1911 pathOffset += 8; | 1911 pathOffset += 8; |
1912 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; | 1912 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; |
1913 | 1913 |
1914 var query = (req.url).query; | 1914 var query = (req.url).query; |
1915 var queryOffset = 0; | 1915 var queryOffset = 0; |
1916 var queryMap = {}; | 1916 var queryMap = {}; |
1917 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 1917 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
1918 parseBool(n) { | 1918 parseBool(n) { |
1919 if (n == "true") return true; | 1919 if (n == "true") return true; |
1920 if (n == "false") return false; | 1920 if (n == "false") return false; |
1921 if (n == null) return null; | 1921 if (n == null) return null; |
1922 throw new core.ArgumentError("Invalid boolean: $n"); | 1922 throw new core.ArgumentError("Invalid boolean: $n"); |
1923 } | 1923 } |
1924 if (query.length > 0) { | 1924 if (query.length > 0) { |
1925 for (var part in query.split("&")) { | 1925 for (var part in query.split("&")) { |
1926 var keyvalue = part.split("="); | 1926 var keyvalue = part.split("="); |
1927 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 1927 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
1928 } | 1928 } |
1929 } | 1929 } |
| 1930 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ
als(arg_pageSize)); |
1930 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | 1931 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); |
1931 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ
als(arg_pageSize)); | |
1932 | 1932 |
1933 | 1933 |
1934 var h = { | 1934 var h = { |
1935 "content-type" : "application/json; charset=utf-8", | 1935 "content-type" : "application/json; charset=utf-8", |
1936 }; | 1936 }; |
1937 var resp = convert.JSON.encode(buildListSinksResponse()); | 1937 var resp = convert.JSON.encode(buildListSinksResponse()); |
1938 return new async.Future.value(stringResponse(200, h, resp)); | 1938 return new async.Future.value(stringResponse(200, h, resp)); |
1939 }), true); | 1939 }), true); |
1940 res.list(arg_parent, pageToken: arg_pageToken, pageSize: arg_pageSize).the
n(unittest.expectAsync(((api.ListSinksResponse response) { | 1940 res.list(arg_parent, pageSize: arg_pageSize, pageToken: arg_pageToken).the
n(unittest.expectAsync(((api.ListSinksResponse response) { |
1941 checkListSinksResponse(response); | 1941 checkListSinksResponse(response); |
1942 }))); | 1942 }))); |
1943 }); | 1943 }); |
1944 | 1944 |
1945 unittest.test("method--update", () { | 1945 unittest.test("method--update", () { |
1946 | 1946 |
1947 var mock = new HttpServerMock(); | 1947 var mock = new HttpServerMock(); |
1948 api.ProjectsSinksResourceApi res = new api.LoggingApi(mock).projects.sinks
; | 1948 api.ProjectsSinksResourceApi res = new api.LoggingApi(mock).projects.sinks
; |
1949 var arg_request = buildLogSink(); | 1949 var arg_request = buildLogSink(); |
1950 var arg_sinkName = "foo"; | 1950 var arg_sinkName = "foo"; |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1991 res.update(arg_request, arg_sinkName, uniqueWriterIdentity: arg_uniqueWrit
erIdentity).then(unittest.expectAsync(((api.LogSink response) { | 1991 res.update(arg_request, arg_sinkName, uniqueWriterIdentity: arg_uniqueWrit
erIdentity).then(unittest.expectAsync(((api.LogSink response) { |
1992 checkLogSink(response); | 1992 checkLogSink(response); |
1993 }))); | 1993 }))); |
1994 }); | 1994 }); |
1995 | 1995 |
1996 }); | 1996 }); |
1997 | 1997 |
1998 | 1998 |
1999 } | 1999 } |
2000 | 2000 |
OLD | NEW |