OLD | NEW |
1 library googleapis.logging.v2.test; | 1 library googleapis.logging.v2.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:test/test.dart' as unittest; | 10 import 'package:test/test.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 buildUnnamed200() { | 139 buildUnnamed275() { |
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 checkUnnamed200(core.List<core.String> o) { | 146 checkUnnamed275(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 buildUnnamed201() { | 152 buildUnnamed276() { |
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 checkUnnamed201(core.List<core.String> o) { | 159 checkUnnamed276(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 = buildUnnamed200(); | 174 o.projectIds = buildUnnamed275(); |
175 o.resourceNames = buildUnnamed201(); | 175 o.resourceNames = buildUnnamed276(); |
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 checkUnnamed200(o.projectIds); | 188 checkUnnamed275(o.projectIds); |
189 checkUnnamed201(o.resourceNames); | 189 checkUnnamed276(o.resourceNames); |
190 } | 190 } |
191 buildCounterListLogEntriesRequest--; | 191 buildCounterListLogEntriesRequest--; |
192 } | 192 } |
193 | 193 |
194 buildUnnamed202() { | 194 buildUnnamed277() { |
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 checkUnnamed202(core.List<api.LogEntry> o) { | 201 checkUnnamed277(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 = buildUnnamed202(); | 212 o.entries = buildUnnamed277(); |
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 checkUnnamed202(o.entries); | 222 checkUnnamed277(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 buildUnnamed203() { | 228 buildUnnamed278() { |
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 checkUnnamed203(core.List<api.LogMetric> o) { | 235 checkUnnamed278(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 = buildUnnamed203(); | 246 o.metrics = buildUnnamed278(); |
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 checkUnnamed203(o.metrics); | 256 checkUnnamed278(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 buildUnnamed204() { | 262 buildUnnamed279() { |
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 checkUnnamed204(core.List<core.String> o) { | 269 checkUnnamed279(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 = buildUnnamed204(); | 280 o.logNames = buildUnnamed279(); |
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 checkUnnamed204(o.logNames); | 290 checkUnnamed279(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 buildUnnamed205() { | 296 buildUnnamed280() { |
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 checkUnnamed205(core.List<api.MonitoredResourceDescriptor> o) { | 303 checkUnnamed280(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 = buildUnnamed205(); | 315 o.resourceDescriptors = buildUnnamed280(); |
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 checkUnnamed205(o.resourceDescriptors); | 325 checkUnnamed280(o.resourceDescriptors); |
326 } | 326 } |
327 buildCounterListMonitoredResourceDescriptorsResponse--; | 327 buildCounterListMonitoredResourceDescriptorsResponse--; |
328 } | 328 } |
329 | 329 |
330 buildUnnamed206() { | 330 buildUnnamed281() { |
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 checkUnnamed206(core.List<api.LogSink> o) { | 337 checkUnnamed281(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 = buildUnnamed206(); | 349 o.sinks = buildUnnamed281(); |
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 checkUnnamed206(o.sinks); | 359 checkUnnamed281(o.sinks); |
360 } | 360 } |
361 buildCounterListSinksResponse--; | 361 buildCounterListSinksResponse--; |
362 } | 362 } |
363 | 363 |
364 buildUnnamed207() { | 364 buildUnnamed282() { |
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 checkUnnamed207(core.Map<core.String, core.Object> o) { | 371 checkUnnamed282(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 buildUnnamed208() { | 377 buildUnnamed283() { |
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 checkUnnamed208(core.Map<core.String, core.String> o) { | 384 checkUnnamed283(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 buildUnnamed209() { | 390 buildUnnamed284() { |
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 checkUnnamed209(core.Map<core.String, core.Object> o) { | 397 checkUnnamed284(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 = buildUnnamed207(); | 410 o.jsonPayload = buildUnnamed282(); |
411 o.labels = buildUnnamed208(); | 411 o.labels = buildUnnamed283(); |
412 o.logName = "foo"; | 412 o.logName = "foo"; |
413 o.operation = buildLogEntryOperation(); | 413 o.operation = buildLogEntryOperation(); |
414 o.protoPayload = buildUnnamed209(); | 414 o.protoPayload = buildUnnamed284(); |
415 o.receiveTimestamp = "foo"; | 415 o.receiveTimestamp = "foo"; |
416 o.resource = buildMonitoredResource(); | 416 o.resource = buildMonitoredResource(); |
417 o.severity = "foo"; | 417 o.severity = "foo"; |
418 o.sourceLocation = buildLogEntrySourceLocation(); | 418 o.sourceLocation = buildLogEntrySourceLocation(); |
419 o.textPayload = "foo"; | 419 o.textPayload = "foo"; |
420 o.timestamp = "foo"; | 420 o.timestamp = "foo"; |
421 o.trace = "foo"; | 421 o.trace = "foo"; |
422 } | 422 } |
423 buildCounterLogEntry--; | 423 buildCounterLogEntry--; |
424 return o; | 424 return o; |
425 } | 425 } |
426 | 426 |
427 checkLogEntry(api.LogEntry o) { | 427 checkLogEntry(api.LogEntry o) { |
428 buildCounterLogEntry++; | 428 buildCounterLogEntry++; |
429 if (buildCounterLogEntry < 3) { | 429 if (buildCounterLogEntry < 3) { |
430 checkHttpRequest(o.httpRequest); | 430 checkHttpRequest(o.httpRequest); |
431 unittest.expect(o.insertId, unittest.equals('foo')); | 431 unittest.expect(o.insertId, unittest.equals('foo')); |
432 checkUnnamed207(o.jsonPayload); | 432 checkUnnamed282(o.jsonPayload); |
433 checkUnnamed208(o.labels); | 433 checkUnnamed283(o.labels); |
434 unittest.expect(o.logName, unittest.equals('foo')); | 434 unittest.expect(o.logName, unittest.equals('foo')); |
435 checkLogEntryOperation(o.operation); | 435 checkLogEntryOperation(o.operation); |
436 checkUnnamed209(o.protoPayload); | 436 checkUnnamed284(o.protoPayload); |
437 unittest.expect(o.receiveTimestamp, unittest.equals('foo')); | 437 unittest.expect(o.receiveTimestamp, unittest.equals('foo')); |
438 checkMonitoredResource(o.resource); | 438 checkMonitoredResource(o.resource); |
439 unittest.expect(o.severity, unittest.equals('foo')); | 439 unittest.expect(o.severity, unittest.equals('foo')); |
440 checkLogEntrySourceLocation(o.sourceLocation); | 440 checkLogEntrySourceLocation(o.sourceLocation); |
441 unittest.expect(o.textPayload, unittest.equals('foo')); | 441 unittest.expect(o.textPayload, unittest.equals('foo')); |
442 unittest.expect(o.timestamp, unittest.equals('foo')); | 442 unittest.expect(o.timestamp, unittest.equals('foo')); |
443 unittest.expect(o.trace, unittest.equals('foo')); | 443 unittest.expect(o.trace, unittest.equals('foo')); |
444 } | 444 } |
445 buildCounterLogEntry--; | 445 buildCounterLogEntry--; |
446 } | 446 } |
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
569 unittest.expect(o.filter, unittest.equals('foo')); | 569 unittest.expect(o.filter, unittest.equals('foo')); |
570 unittest.expect(o.includeChildren, unittest.isTrue); | 570 unittest.expect(o.includeChildren, unittest.isTrue); |
571 unittest.expect(o.name, unittest.equals('foo')); | 571 unittest.expect(o.name, unittest.equals('foo')); |
572 unittest.expect(o.outputVersionFormat, unittest.equals('foo')); | 572 unittest.expect(o.outputVersionFormat, unittest.equals('foo')); |
573 unittest.expect(o.startTime, unittest.equals('foo')); | 573 unittest.expect(o.startTime, unittest.equals('foo')); |
574 unittest.expect(o.writerIdentity, unittest.equals('foo')); | 574 unittest.expect(o.writerIdentity, unittest.equals('foo')); |
575 } | 575 } |
576 buildCounterLogSink--; | 576 buildCounterLogSink--; |
577 } | 577 } |
578 | 578 |
579 buildUnnamed210() { | 579 buildUnnamed285() { |
580 var o = new core.Map<core.String, core.String>(); | 580 var o = new core.Map<core.String, core.String>(); |
581 o["x"] = "foo"; | 581 o["x"] = "foo"; |
582 o["y"] = "foo"; | 582 o["y"] = "foo"; |
583 return o; | 583 return o; |
584 } | 584 } |
585 | 585 |
586 checkUnnamed210(core.Map<core.String, core.String> o) { | 586 checkUnnamed285(core.Map<core.String, core.String> o) { |
587 unittest.expect(o, unittest.hasLength(2)); | 587 unittest.expect(o, unittest.hasLength(2)); |
588 unittest.expect(o["x"], unittest.equals('foo')); | 588 unittest.expect(o["x"], unittest.equals('foo')); |
589 unittest.expect(o["y"], unittest.equals('foo')); | 589 unittest.expect(o["y"], unittest.equals('foo')); |
590 } | 590 } |
591 | 591 |
592 core.int buildCounterMonitoredResource = 0; | 592 core.int buildCounterMonitoredResource = 0; |
593 buildMonitoredResource() { | 593 buildMonitoredResource() { |
594 var o = new api.MonitoredResource(); | 594 var o = new api.MonitoredResource(); |
595 buildCounterMonitoredResource++; | 595 buildCounterMonitoredResource++; |
596 if (buildCounterMonitoredResource < 3) { | 596 if (buildCounterMonitoredResource < 3) { |
597 o.labels = buildUnnamed210(); | 597 o.labels = buildUnnamed285(); |
598 o.type = "foo"; | 598 o.type = "foo"; |
599 } | 599 } |
600 buildCounterMonitoredResource--; | 600 buildCounterMonitoredResource--; |
601 return o; | 601 return o; |
602 } | 602 } |
603 | 603 |
604 checkMonitoredResource(api.MonitoredResource o) { | 604 checkMonitoredResource(api.MonitoredResource o) { |
605 buildCounterMonitoredResource++; | 605 buildCounterMonitoredResource++; |
606 if (buildCounterMonitoredResource < 3) { | 606 if (buildCounterMonitoredResource < 3) { |
607 checkUnnamed210(o.labels); | 607 checkUnnamed285(o.labels); |
608 unittest.expect(o.type, unittest.equals('foo')); | 608 unittest.expect(o.type, unittest.equals('foo')); |
609 } | 609 } |
610 buildCounterMonitoredResource--; | 610 buildCounterMonitoredResource--; |
611 } | 611 } |
612 | 612 |
613 buildUnnamed211() { | 613 buildUnnamed286() { |
614 var o = new core.List<api.LabelDescriptor>(); | 614 var o = new core.List<api.LabelDescriptor>(); |
615 o.add(buildLabelDescriptor()); | 615 o.add(buildLabelDescriptor()); |
616 o.add(buildLabelDescriptor()); | 616 o.add(buildLabelDescriptor()); |
617 return o; | 617 return o; |
618 } | 618 } |
619 | 619 |
620 checkUnnamed211(core.List<api.LabelDescriptor> o) { | 620 checkUnnamed286(core.List<api.LabelDescriptor> o) { |
621 unittest.expect(o, unittest.hasLength(2)); | 621 unittest.expect(o, unittest.hasLength(2)); |
622 checkLabelDescriptor(o[0]); | 622 checkLabelDescriptor(o[0]); |
623 checkLabelDescriptor(o[1]); | 623 checkLabelDescriptor(o[1]); |
624 } | 624 } |
625 | 625 |
626 core.int buildCounterMonitoredResourceDescriptor = 0; | 626 core.int buildCounterMonitoredResourceDescriptor = 0; |
627 buildMonitoredResourceDescriptor() { | 627 buildMonitoredResourceDescriptor() { |
628 var o = new api.MonitoredResourceDescriptor(); | 628 var o = new api.MonitoredResourceDescriptor(); |
629 buildCounterMonitoredResourceDescriptor++; | 629 buildCounterMonitoredResourceDescriptor++; |
630 if (buildCounterMonitoredResourceDescriptor < 3) { | 630 if (buildCounterMonitoredResourceDescriptor < 3) { |
631 o.description = "foo"; | 631 o.description = "foo"; |
632 o.displayName = "foo"; | 632 o.displayName = "foo"; |
633 o.labels = buildUnnamed211(); | 633 o.labels = buildUnnamed286(); |
634 o.name = "foo"; | 634 o.name = "foo"; |
635 o.type = "foo"; | 635 o.type = "foo"; |
636 } | 636 } |
637 buildCounterMonitoredResourceDescriptor--; | 637 buildCounterMonitoredResourceDescriptor--; |
638 return o; | 638 return o; |
639 } | 639 } |
640 | 640 |
641 checkMonitoredResourceDescriptor(api.MonitoredResourceDescriptor o) { | 641 checkMonitoredResourceDescriptor(api.MonitoredResourceDescriptor o) { |
642 buildCounterMonitoredResourceDescriptor++; | 642 buildCounterMonitoredResourceDescriptor++; |
643 if (buildCounterMonitoredResourceDescriptor < 3) { | 643 if (buildCounterMonitoredResourceDescriptor < 3) { |
644 unittest.expect(o.description, unittest.equals('foo')); | 644 unittest.expect(o.description, unittest.equals('foo')); |
645 unittest.expect(o.displayName, unittest.equals('foo')); | 645 unittest.expect(o.displayName, unittest.equals('foo')); |
646 checkUnnamed211(o.labels); | 646 checkUnnamed286(o.labels); |
647 unittest.expect(o.name, unittest.equals('foo')); | 647 unittest.expect(o.name, unittest.equals('foo')); |
648 unittest.expect(o.type, unittest.equals('foo')); | 648 unittest.expect(o.type, unittest.equals('foo')); |
649 } | 649 } |
650 buildCounterMonitoredResourceDescriptor--; | 650 buildCounterMonitoredResourceDescriptor--; |
651 } | 651 } |
652 | 652 |
653 buildUnnamed212() { | 653 buildUnnamed287() { |
654 var o = new core.List<api.LogLine>(); | 654 var o = new core.List<api.LogLine>(); |
655 o.add(buildLogLine()); | 655 o.add(buildLogLine()); |
656 o.add(buildLogLine()); | 656 o.add(buildLogLine()); |
657 return o; | 657 return o; |
658 } | 658 } |
659 | 659 |
660 checkUnnamed212(core.List<api.LogLine> o) { | 660 checkUnnamed287(core.List<api.LogLine> o) { |
661 unittest.expect(o, unittest.hasLength(2)); | 661 unittest.expect(o, unittest.hasLength(2)); |
662 checkLogLine(o[0]); | 662 checkLogLine(o[0]); |
663 checkLogLine(o[1]); | 663 checkLogLine(o[1]); |
664 } | 664 } |
665 | 665 |
666 buildUnnamed213() { | 666 buildUnnamed288() { |
667 var o = new core.List<api.SourceReference>(); | 667 var o = new core.List<api.SourceReference>(); |
668 o.add(buildSourceReference()); | 668 o.add(buildSourceReference()); |
669 o.add(buildSourceReference()); | 669 o.add(buildSourceReference()); |
670 return o; | 670 return o; |
671 } | 671 } |
672 | 672 |
673 checkUnnamed213(core.List<api.SourceReference> o) { | 673 checkUnnamed288(core.List<api.SourceReference> o) { |
674 unittest.expect(o, unittest.hasLength(2)); | 674 unittest.expect(o, unittest.hasLength(2)); |
675 checkSourceReference(o[0]); | 675 checkSourceReference(o[0]); |
676 checkSourceReference(o[1]); | 676 checkSourceReference(o[1]); |
677 } | 677 } |
678 | 678 |
679 core.int buildCounterRequestLog = 0; | 679 core.int buildCounterRequestLog = 0; |
680 buildRequestLog() { | 680 buildRequestLog() { |
681 var o = new api.RequestLog(); | 681 var o = new api.RequestLog(); |
682 buildCounterRequestLog++; | 682 buildCounterRequestLog++; |
683 if (buildCounterRequestLog < 3) { | 683 if (buildCounterRequestLog < 3) { |
684 o.appEngineRelease = "foo"; | 684 o.appEngineRelease = "foo"; |
685 o.appId = "foo"; | 685 o.appId = "foo"; |
686 o.cost = 42.0; | 686 o.cost = 42.0; |
687 o.endTime = "foo"; | 687 o.endTime = "foo"; |
688 o.finished = true; | 688 o.finished = true; |
689 o.first = true; | 689 o.first = true; |
690 o.host = "foo"; | 690 o.host = "foo"; |
691 o.httpVersion = "foo"; | 691 o.httpVersion = "foo"; |
692 o.instanceId = "foo"; | 692 o.instanceId = "foo"; |
693 o.instanceIndex = 42; | 693 o.instanceIndex = 42; |
694 o.ip = "foo"; | 694 o.ip = "foo"; |
695 o.latency = "foo"; | 695 o.latency = "foo"; |
696 o.line = buildUnnamed212(); | 696 o.line = buildUnnamed287(); |
697 o.megaCycles = "foo"; | 697 o.megaCycles = "foo"; |
698 o.method = "foo"; | 698 o.method = "foo"; |
699 o.moduleId = "foo"; | 699 o.moduleId = "foo"; |
700 o.nickname = "foo"; | 700 o.nickname = "foo"; |
701 o.pendingTime = "foo"; | 701 o.pendingTime = "foo"; |
702 o.referrer = "foo"; | 702 o.referrer = "foo"; |
703 o.requestId = "foo"; | 703 o.requestId = "foo"; |
704 o.resource = "foo"; | 704 o.resource = "foo"; |
705 o.responseSize = "foo"; | 705 o.responseSize = "foo"; |
706 o.sourceReference = buildUnnamed213(); | 706 o.sourceReference = buildUnnamed288(); |
707 o.startTime = "foo"; | 707 o.startTime = "foo"; |
708 o.status = 42; | 708 o.status = 42; |
709 o.taskName = "foo"; | 709 o.taskName = "foo"; |
710 o.taskQueueName = "foo"; | 710 o.taskQueueName = "foo"; |
711 o.traceId = "foo"; | 711 o.traceId = "foo"; |
712 o.urlMapEntry = "foo"; | 712 o.urlMapEntry = "foo"; |
713 o.userAgent = "foo"; | 713 o.userAgent = "foo"; |
714 o.versionId = "foo"; | 714 o.versionId = "foo"; |
715 o.wasLoadingRequest = true; | 715 o.wasLoadingRequest = true; |
716 } | 716 } |
717 buildCounterRequestLog--; | 717 buildCounterRequestLog--; |
718 return o; | 718 return o; |
719 } | 719 } |
720 | 720 |
721 checkRequestLog(api.RequestLog o) { | 721 checkRequestLog(api.RequestLog o) { |
722 buildCounterRequestLog++; | 722 buildCounterRequestLog++; |
723 if (buildCounterRequestLog < 3) { | 723 if (buildCounterRequestLog < 3) { |
724 unittest.expect(o.appEngineRelease, unittest.equals('foo')); | 724 unittest.expect(o.appEngineRelease, unittest.equals('foo')); |
725 unittest.expect(o.appId, unittest.equals('foo')); | 725 unittest.expect(o.appId, unittest.equals('foo')); |
726 unittest.expect(o.cost, unittest.equals(42.0)); | 726 unittest.expect(o.cost, unittest.equals(42.0)); |
727 unittest.expect(o.endTime, unittest.equals('foo')); | 727 unittest.expect(o.endTime, unittest.equals('foo')); |
728 unittest.expect(o.finished, unittest.isTrue); | 728 unittest.expect(o.finished, unittest.isTrue); |
729 unittest.expect(o.first, unittest.isTrue); | 729 unittest.expect(o.first, unittest.isTrue); |
730 unittest.expect(o.host, unittest.equals('foo')); | 730 unittest.expect(o.host, unittest.equals('foo')); |
731 unittest.expect(o.httpVersion, unittest.equals('foo')); | 731 unittest.expect(o.httpVersion, unittest.equals('foo')); |
732 unittest.expect(o.instanceId, unittest.equals('foo')); | 732 unittest.expect(o.instanceId, unittest.equals('foo')); |
733 unittest.expect(o.instanceIndex, unittest.equals(42)); | 733 unittest.expect(o.instanceIndex, unittest.equals(42)); |
734 unittest.expect(o.ip, unittest.equals('foo')); | 734 unittest.expect(o.ip, unittest.equals('foo')); |
735 unittest.expect(o.latency, unittest.equals('foo')); | 735 unittest.expect(o.latency, unittest.equals('foo')); |
736 checkUnnamed212(o.line); | 736 checkUnnamed287(o.line); |
737 unittest.expect(o.megaCycles, unittest.equals('foo')); | 737 unittest.expect(o.megaCycles, unittest.equals('foo')); |
738 unittest.expect(o.method, unittest.equals('foo')); | 738 unittest.expect(o.method, unittest.equals('foo')); |
739 unittest.expect(o.moduleId, unittest.equals('foo')); | 739 unittest.expect(o.moduleId, unittest.equals('foo')); |
740 unittest.expect(o.nickname, unittest.equals('foo')); | 740 unittest.expect(o.nickname, unittest.equals('foo')); |
741 unittest.expect(o.pendingTime, unittest.equals('foo')); | 741 unittest.expect(o.pendingTime, unittest.equals('foo')); |
742 unittest.expect(o.referrer, unittest.equals('foo')); | 742 unittest.expect(o.referrer, unittest.equals('foo')); |
743 unittest.expect(o.requestId, unittest.equals('foo')); | 743 unittest.expect(o.requestId, unittest.equals('foo')); |
744 unittest.expect(o.resource, unittest.equals('foo')); | 744 unittest.expect(o.resource, unittest.equals('foo')); |
745 unittest.expect(o.responseSize, unittest.equals('foo')); | 745 unittest.expect(o.responseSize, unittest.equals('foo')); |
746 checkUnnamed213(o.sourceReference); | 746 checkUnnamed288(o.sourceReference); |
747 unittest.expect(o.startTime, unittest.equals('foo')); | 747 unittest.expect(o.startTime, unittest.equals('foo')); |
748 unittest.expect(o.status, unittest.equals(42)); | 748 unittest.expect(o.status, unittest.equals(42)); |
749 unittest.expect(o.taskName, unittest.equals('foo')); | 749 unittest.expect(o.taskName, unittest.equals('foo')); |
750 unittest.expect(o.taskQueueName, unittest.equals('foo')); | 750 unittest.expect(o.taskQueueName, unittest.equals('foo')); |
751 unittest.expect(o.traceId, unittest.equals('foo')); | 751 unittest.expect(o.traceId, unittest.equals('foo')); |
752 unittest.expect(o.urlMapEntry, unittest.equals('foo')); | 752 unittest.expect(o.urlMapEntry, unittest.equals('foo')); |
753 unittest.expect(o.userAgent, unittest.equals('foo')); | 753 unittest.expect(o.userAgent, unittest.equals('foo')); |
754 unittest.expect(o.versionId, unittest.equals('foo')); | 754 unittest.expect(o.versionId, unittest.equals('foo')); |
755 unittest.expect(o.wasLoadingRequest, unittest.isTrue); | 755 unittest.expect(o.wasLoadingRequest, unittest.isTrue); |
756 } | 756 } |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
794 | 794 |
795 checkSourceReference(api.SourceReference o) { | 795 checkSourceReference(api.SourceReference o) { |
796 buildCounterSourceReference++; | 796 buildCounterSourceReference++; |
797 if (buildCounterSourceReference < 3) { | 797 if (buildCounterSourceReference < 3) { |
798 unittest.expect(o.repository, unittest.equals('foo')); | 798 unittest.expect(o.repository, unittest.equals('foo')); |
799 unittest.expect(o.revisionId, unittest.equals('foo')); | 799 unittest.expect(o.revisionId, unittest.equals('foo')); |
800 } | 800 } |
801 buildCounterSourceReference--; | 801 buildCounterSourceReference--; |
802 } | 802 } |
803 | 803 |
804 buildUnnamed214() { | 804 buildUnnamed289() { |
805 var o = new core.List<api.LogEntry>(); | 805 var o = new core.List<api.LogEntry>(); |
806 o.add(buildLogEntry()); | 806 o.add(buildLogEntry()); |
807 o.add(buildLogEntry()); | 807 o.add(buildLogEntry()); |
808 return o; | 808 return o; |
809 } | 809 } |
810 | 810 |
811 checkUnnamed214(core.List<api.LogEntry> o) { | 811 checkUnnamed289(core.List<api.LogEntry> o) { |
812 unittest.expect(o, unittest.hasLength(2)); | 812 unittest.expect(o, unittest.hasLength(2)); |
813 checkLogEntry(o[0]); | 813 checkLogEntry(o[0]); |
814 checkLogEntry(o[1]); | 814 checkLogEntry(o[1]); |
815 } | 815 } |
816 | 816 |
817 buildUnnamed215() { | 817 buildUnnamed290() { |
818 var o = new core.Map<core.String, core.String>(); | 818 var o = new core.Map<core.String, core.String>(); |
819 o["x"] = "foo"; | 819 o["x"] = "foo"; |
820 o["y"] = "foo"; | 820 o["y"] = "foo"; |
821 return o; | 821 return o; |
822 } | 822 } |
823 | 823 |
824 checkUnnamed215(core.Map<core.String, core.String> o) { | 824 checkUnnamed290(core.Map<core.String, core.String> o) { |
825 unittest.expect(o, unittest.hasLength(2)); | 825 unittest.expect(o, unittest.hasLength(2)); |
826 unittest.expect(o["x"], unittest.equals('foo')); | 826 unittest.expect(o["x"], unittest.equals('foo')); |
827 unittest.expect(o["y"], unittest.equals('foo')); | 827 unittest.expect(o["y"], unittest.equals('foo')); |
828 } | 828 } |
829 | 829 |
830 core.int buildCounterWriteLogEntriesRequest = 0; | 830 core.int buildCounterWriteLogEntriesRequest = 0; |
831 buildWriteLogEntriesRequest() { | 831 buildWriteLogEntriesRequest() { |
832 var o = new api.WriteLogEntriesRequest(); | 832 var o = new api.WriteLogEntriesRequest(); |
833 buildCounterWriteLogEntriesRequest++; | 833 buildCounterWriteLogEntriesRequest++; |
834 if (buildCounterWriteLogEntriesRequest < 3) { | 834 if (buildCounterWriteLogEntriesRequest < 3) { |
835 o.entries = buildUnnamed214(); | 835 o.entries = buildUnnamed289(); |
836 o.labels = buildUnnamed215(); | 836 o.labels = buildUnnamed290(); |
837 o.logName = "foo"; | 837 o.logName = "foo"; |
838 o.partialSuccess = true; | 838 o.partialSuccess = true; |
839 o.resource = buildMonitoredResource(); | 839 o.resource = buildMonitoredResource(); |
840 } | 840 } |
841 buildCounterWriteLogEntriesRequest--; | 841 buildCounterWriteLogEntriesRequest--; |
842 return o; | 842 return o; |
843 } | 843 } |
844 | 844 |
845 checkWriteLogEntriesRequest(api.WriteLogEntriesRequest o) { | 845 checkWriteLogEntriesRequest(api.WriteLogEntriesRequest o) { |
846 buildCounterWriteLogEntriesRequest++; | 846 buildCounterWriteLogEntriesRequest++; |
847 if (buildCounterWriteLogEntriesRequest < 3) { | 847 if (buildCounterWriteLogEntriesRequest < 3) { |
848 checkUnnamed214(o.entries); | 848 checkUnnamed289(o.entries); |
849 checkUnnamed215(o.labels); | 849 checkUnnamed290(o.labels); |
850 unittest.expect(o.logName, unittest.equals('foo')); | 850 unittest.expect(o.logName, unittest.equals('foo')); |
851 unittest.expect(o.partialSuccess, unittest.isTrue); | 851 unittest.expect(o.partialSuccess, unittest.isTrue); |
852 checkMonitoredResource(o.resource); | 852 checkMonitoredResource(o.resource); |
853 } | 853 } |
854 buildCounterWriteLogEntriesRequest--; | 854 buildCounterWriteLogEntriesRequest--; |
855 } | 855 } |
856 | 856 |
857 core.int buildCounterWriteLogEntriesResponse = 0; | 857 core.int buildCounterWriteLogEntriesResponse = 0; |
858 buildWriteLogEntriesResponse() { | 858 buildWriteLogEntriesResponse() { |
859 var o = new api.WriteLogEntriesResponse(); | 859 var o = new api.WriteLogEntriesResponse(); |
(...skipping 1284 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2144 res.get(arg_sinkName).then(unittest.expectAsync1(((api.LogSink response) { | 2144 res.get(arg_sinkName).then(unittest.expectAsync1(((api.LogSink response) { |
2145 checkLogSink(response); | 2145 checkLogSink(response); |
2146 }))); | 2146 }))); |
2147 }); | 2147 }); |
2148 | 2148 |
2149 unittest.test("method--list", () { | 2149 unittest.test("method--list", () { |
2150 | 2150 |
2151 var mock = new HttpServerMock(); | 2151 var mock = new HttpServerMock(); |
2152 api.OrganizationsSinksResourceApi res = new api.LoggingApi(mock).organizat
ions.sinks; | 2152 api.OrganizationsSinksResourceApi res = new api.LoggingApi(mock).organizat
ions.sinks; |
2153 var arg_parent = "foo"; | 2153 var arg_parent = "foo"; |
| 2154 var arg_pageToken = "foo"; |
2154 var arg_pageSize = 42; | 2155 var arg_pageSize = 42; |
2155 var arg_pageToken = "foo"; | |
2156 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 2156 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
2157 var path = (req.url).path; | 2157 var path = (req.url).path; |
2158 var pathOffset = 0; | 2158 var pathOffset = 0; |
2159 var index; | 2159 var index; |
2160 var subPart; | 2160 var subPart; |
2161 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2161 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
2162 pathOffset += 1; | 2162 pathOffset += 1; |
2163 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v2/")); | 2163 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v2/")); |
2164 pathOffset += 3; | 2164 pathOffset += 3; |
2165 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; | 2165 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; |
2166 | 2166 |
2167 var query = (req.url).query; | 2167 var query = (req.url).query; |
2168 var queryOffset = 0; | 2168 var queryOffset = 0; |
2169 var queryMap = {}; | 2169 var queryMap = {}; |
2170 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 2170 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
2171 parseBool(n) { | 2171 parseBool(n) { |
2172 if (n == "true") return true; | 2172 if (n == "true") return true; |
2173 if (n == "false") return false; | 2173 if (n == "false") return false; |
2174 if (n == null) return null; | 2174 if (n == null) return null; |
2175 throw new core.ArgumentError("Invalid boolean: $n"); | 2175 throw new core.ArgumentError("Invalid boolean: $n"); |
2176 } | 2176 } |
2177 if (query.length > 0) { | 2177 if (query.length > 0) { |
2178 for (var part in query.split("&")) { | 2178 for (var part in query.split("&")) { |
2179 var keyvalue = part.split("="); | 2179 var keyvalue = part.split("="); |
2180 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 2180 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
2181 } | 2181 } |
2182 } | 2182 } |
| 2183 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); |
2183 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ
als(arg_pageSize)); | 2184 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ
als(arg_pageSize)); |
2184 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | |
2185 | 2185 |
2186 | 2186 |
2187 var h = { | 2187 var h = { |
2188 "content-type" : "application/json; charset=utf-8", | 2188 "content-type" : "application/json; charset=utf-8", |
2189 }; | 2189 }; |
2190 var resp = convert.JSON.encode(buildListSinksResponse()); | 2190 var resp = convert.JSON.encode(buildListSinksResponse()); |
2191 return new async.Future.value(stringResponse(200, h, resp)); | 2191 return new async.Future.value(stringResponse(200, h, resp)); |
2192 }), true); | 2192 }), true); |
2193 res.list(arg_parent, pageSize: arg_pageSize, pageToken: arg_pageToken).the
n(unittest.expectAsync1(((api.ListSinksResponse response) { | 2193 res.list(arg_parent, pageToken: arg_pageToken, pageSize: arg_pageSize).the
n(unittest.expectAsync1(((api.ListSinksResponse response) { |
2194 checkListSinksResponse(response); | 2194 checkListSinksResponse(response); |
2195 }))); | 2195 }))); |
2196 }); | 2196 }); |
2197 | 2197 |
2198 unittest.test("method--update", () { | 2198 unittest.test("method--update", () { |
2199 | 2199 |
2200 var mock = new HttpServerMock(); | 2200 var mock = new HttpServerMock(); |
2201 api.OrganizationsSinksResourceApi res = new api.LoggingApi(mock).organizat
ions.sinks; | 2201 api.OrganizationsSinksResourceApi res = new api.LoggingApi(mock).organizat
ions.sinks; |
2202 var arg_request = buildLogSink(); | 2202 var arg_request = buildLogSink(); |
2203 var arg_sinkName = "foo"; | 2203 var arg_sinkName = "foo"; |
(...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2485 res.get(arg_metricName).then(unittest.expectAsync1(((api.LogMetric respons
e) { | 2485 res.get(arg_metricName).then(unittest.expectAsync1(((api.LogMetric respons
e) { |
2486 checkLogMetric(response); | 2486 checkLogMetric(response); |
2487 }))); | 2487 }))); |
2488 }); | 2488 }); |
2489 | 2489 |
2490 unittest.test("method--list", () { | 2490 unittest.test("method--list", () { |
2491 | 2491 |
2492 var mock = new HttpServerMock(); | 2492 var mock = new HttpServerMock(); |
2493 api.ProjectsMetricsResourceApi res = new api.LoggingApi(mock).projects.met
rics; | 2493 api.ProjectsMetricsResourceApi res = new api.LoggingApi(mock).projects.met
rics; |
2494 var arg_parent = "foo"; | 2494 var arg_parent = "foo"; |
| 2495 var arg_pageSize = 42; |
2495 var arg_pageToken = "foo"; | 2496 var arg_pageToken = "foo"; |
2496 var arg_pageSize = 42; | |
2497 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 2497 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
2498 var path = (req.url).path; | 2498 var path = (req.url).path; |
2499 var pathOffset = 0; | 2499 var pathOffset = 0; |
2500 var index; | 2500 var index; |
2501 var subPart; | 2501 var subPart; |
2502 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2502 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
2503 pathOffset += 1; | 2503 pathOffset += 1; |
2504 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v2/")); | 2504 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v2/")); |
2505 pathOffset += 3; | 2505 pathOffset += 3; |
2506 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; | 2506 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; |
2507 | 2507 |
2508 var query = (req.url).query; | 2508 var query = (req.url).query; |
2509 var queryOffset = 0; | 2509 var queryOffset = 0; |
2510 var queryMap = {}; | 2510 var queryMap = {}; |
2511 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 2511 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
2512 parseBool(n) { | 2512 parseBool(n) { |
2513 if (n == "true") return true; | 2513 if (n == "true") return true; |
2514 if (n == "false") return false; | 2514 if (n == "false") return false; |
2515 if (n == null) return null; | 2515 if (n == null) return null; |
2516 throw new core.ArgumentError("Invalid boolean: $n"); | 2516 throw new core.ArgumentError("Invalid boolean: $n"); |
2517 } | 2517 } |
2518 if (query.length > 0) { | 2518 if (query.length > 0) { |
2519 for (var part in query.split("&")) { | 2519 for (var part in query.split("&")) { |
2520 var keyvalue = part.split("="); | 2520 var keyvalue = part.split("="); |
2521 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 2521 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
2522 } | 2522 } |
2523 } | 2523 } |
| 2524 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ
als(arg_pageSize)); |
2524 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | 2525 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); |
2525 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ
als(arg_pageSize)); | |
2526 | 2526 |
2527 | 2527 |
2528 var h = { | 2528 var h = { |
2529 "content-type" : "application/json; charset=utf-8", | 2529 "content-type" : "application/json; charset=utf-8", |
2530 }; | 2530 }; |
2531 var resp = convert.JSON.encode(buildListLogMetricsResponse()); | 2531 var resp = convert.JSON.encode(buildListLogMetricsResponse()); |
2532 return new async.Future.value(stringResponse(200, h, resp)); | 2532 return new async.Future.value(stringResponse(200, h, resp)); |
2533 }), true); | 2533 }), true); |
2534 res.list(arg_parent, pageToken: arg_pageToken, pageSize: arg_pageSize).the
n(unittest.expectAsync1(((api.ListLogMetricsResponse response) { | 2534 res.list(arg_parent, pageSize: arg_pageSize, pageToken: arg_pageToken).the
n(unittest.expectAsync1(((api.ListLogMetricsResponse response) { |
2535 checkListLogMetricsResponse(response); | 2535 checkListLogMetricsResponse(response); |
2536 }))); | 2536 }))); |
2537 }); | 2537 }); |
2538 | 2538 |
2539 unittest.test("method--update", () { | 2539 unittest.test("method--update", () { |
2540 | 2540 |
2541 var mock = new HttpServerMock(); | 2541 var mock = new HttpServerMock(); |
2542 api.ProjectsMetricsResourceApi res = new api.LoggingApi(mock).projects.met
rics; | 2542 api.ProjectsMetricsResourceApi res = new api.LoggingApi(mock).projects.met
rics; |
2543 var arg_request = buildLogMetric(); | 2543 var arg_request = buildLogMetric(); |
2544 var arg_metricName = "foo"; | 2544 var arg_metricName = "foo"; |
(...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2828 res.update(arg_request, arg_sinkName, uniqueWriterIdentity: arg_uniqueWrit
erIdentity).then(unittest.expectAsync1(((api.LogSink response) { | 2828 res.update(arg_request, arg_sinkName, uniqueWriterIdentity: arg_uniqueWrit
erIdentity).then(unittest.expectAsync1(((api.LogSink response) { |
2829 checkLogSink(response); | 2829 checkLogSink(response); |
2830 }))); | 2830 }))); |
2831 }); | 2831 }); |
2832 | 2832 |
2833 }); | 2833 }); |
2834 | 2834 |
2835 | 2835 |
2836 } | 2836 } |
2837 | 2837 |
OLD | NEW |