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: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 buildUnnamed200() { | 139 buildUnnamed198() { |
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 checkUnnamed198(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 buildUnnamed199() { |
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 checkUnnamed199(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 = buildUnnamed198(); |
175 o.resourceNames = buildUnnamed201(); | 175 o.resourceNames = buildUnnamed199(); |
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 checkUnnamed198(o.projectIds); |
189 checkUnnamed201(o.resourceNames); | 189 checkUnnamed199(o.resourceNames); |
190 } | 190 } |
191 buildCounterListLogEntriesRequest--; | 191 buildCounterListLogEntriesRequest--; |
192 } | 192 } |
193 | 193 |
194 buildUnnamed202() { | 194 buildUnnamed200() { |
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 checkUnnamed200(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 = buildUnnamed200(); |
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 checkUnnamed200(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 buildUnnamed201() { |
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 checkUnnamed201(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 = buildUnnamed201(); |
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 checkUnnamed201(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 buildUnnamed202() { |
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 checkUnnamed202(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 = buildUnnamed202(); |
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 checkUnnamed202(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 buildUnnamed203() { |
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 checkUnnamed203(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 = buildUnnamed203(); |
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 checkUnnamed203(o.resourceDescriptors); |
326 } | 326 } |
327 buildCounterListMonitoredResourceDescriptorsResponse--; | 327 buildCounterListMonitoredResourceDescriptorsResponse--; |
328 } | 328 } |
329 | 329 |
330 buildUnnamed206() { | 330 buildUnnamed204() { |
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 checkUnnamed204(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 = buildUnnamed204(); |
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 checkUnnamed204(o.sinks); |
360 } | 360 } |
361 buildCounterListSinksResponse--; | 361 buildCounterListSinksResponse--; |
362 } | 362 } |
363 | 363 |
| 364 buildUnnamed205() { |
| 365 var o = new core.Map<core.String, core.Object>(); |
| 366 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; |
| 367 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; |
| 368 return o; |
| 369 } |
| 370 |
| 371 checkUnnamed205(core.Map<core.String, core.Object> o) { |
| 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')); |
| 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 } |
| 376 |
| 377 buildUnnamed206() { |
| 378 var o = new core.Map<core.String, core.String>(); |
| 379 o["x"] = "foo"; |
| 380 o["y"] = "foo"; |
| 381 return o; |
| 382 } |
| 383 |
| 384 checkUnnamed206(core.Map<core.String, core.String> o) { |
| 385 unittest.expect(o, unittest.hasLength(2)); |
| 386 unittest.expect(o["x"], unittest.equals('foo')); |
| 387 unittest.expect(o["y"], unittest.equals('foo')); |
| 388 } |
| 389 |
364 buildUnnamed207() { | 390 buildUnnamed207() { |
365 var o = new core.Map<core.String, core.Object>(); | 391 var o = new core.Map<core.String, core.Object>(); |
366 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 392 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; |
367 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 393 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; |
368 return o; | 394 return o; |
369 } | 395 } |
370 | 396 |
371 checkUnnamed207(core.Map<core.String, core.Object> o) { | 397 checkUnnamed207(core.Map<core.String, core.Object> o) { |
372 unittest.expect(o, unittest.hasLength(2)); | 398 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')); | |
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 } | |
376 | |
377 buildUnnamed208() { | |
378 var o = new core.Map<core.String, core.String>(); | |
379 o["x"] = "foo"; | |
380 o["y"] = "foo"; | |
381 return o; | |
382 } | |
383 | |
384 checkUnnamed208(core.Map<core.String, core.String> o) { | |
385 unittest.expect(o, unittest.hasLength(2)); | |
386 unittest.expect(o["x"], unittest.equals('foo')); | |
387 unittest.expect(o["y"], unittest.equals('foo')); | |
388 } | |
389 | |
390 buildUnnamed209() { | |
391 var o = new core.Map<core.String, core.Object>(); | |
392 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | |
393 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | |
394 return o; | |
395 } | |
396 | |
397 checkUnnamed209(core.Map<core.String, core.Object> o) { | |
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 = buildUnnamed205(); |
411 o.labels = buildUnnamed208(); | 411 o.labels = buildUnnamed206(); |
412 o.logName = "foo"; | 412 o.logName = "foo"; |
413 o.operation = buildLogEntryOperation(); | 413 o.operation = buildLogEntryOperation(); |
414 o.protoPayload = buildUnnamed209(); | 414 o.protoPayload = buildUnnamed207(); |
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 checkUnnamed207(o.jsonPayload); | 431 checkUnnamed205(o.jsonPayload); |
432 checkUnnamed208(o.labels); | 432 checkUnnamed206(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 checkUnnamed209(o.protoPayload); | 435 checkUnnamed207(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 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
542 } | 542 } |
543 | 543 |
544 core.int buildCounterLogSink = 0; | 544 core.int buildCounterLogSink = 0; |
545 buildLogSink() { | 545 buildLogSink() { |
546 var o = new api.LogSink(); | 546 var o = new api.LogSink(); |
547 buildCounterLogSink++; | 547 buildCounterLogSink++; |
548 if (buildCounterLogSink < 3) { | 548 if (buildCounterLogSink < 3) { |
549 o.destination = "foo"; | 549 o.destination = "foo"; |
550 o.endTime = "foo"; | 550 o.endTime = "foo"; |
551 o.filter = "foo"; | 551 o.filter = "foo"; |
| 552 o.includeChildren = true; |
552 o.name = "foo"; | 553 o.name = "foo"; |
553 o.outputVersionFormat = "foo"; | 554 o.outputVersionFormat = "foo"; |
554 o.startTime = "foo"; | 555 o.startTime = "foo"; |
555 o.writerIdentity = "foo"; | 556 o.writerIdentity = "foo"; |
556 } | 557 } |
557 buildCounterLogSink--; | 558 buildCounterLogSink--; |
558 return o; | 559 return o; |
559 } | 560 } |
560 | 561 |
561 checkLogSink(api.LogSink o) { | 562 checkLogSink(api.LogSink o) { |
562 buildCounterLogSink++; | 563 buildCounterLogSink++; |
563 if (buildCounterLogSink < 3) { | 564 if (buildCounterLogSink < 3) { |
564 unittest.expect(o.destination, unittest.equals('foo')); | 565 unittest.expect(o.destination, unittest.equals('foo')); |
565 unittest.expect(o.endTime, unittest.equals('foo')); | 566 unittest.expect(o.endTime, unittest.equals('foo')); |
566 unittest.expect(o.filter, unittest.equals('foo')); | 567 unittest.expect(o.filter, unittest.equals('foo')); |
| 568 unittest.expect(o.includeChildren, unittest.isTrue); |
567 unittest.expect(o.name, unittest.equals('foo')); | 569 unittest.expect(o.name, unittest.equals('foo')); |
568 unittest.expect(o.outputVersionFormat, unittest.equals('foo')); | 570 unittest.expect(o.outputVersionFormat, unittest.equals('foo')); |
569 unittest.expect(o.startTime, unittest.equals('foo')); | 571 unittest.expect(o.startTime, unittest.equals('foo')); |
570 unittest.expect(o.writerIdentity, unittest.equals('foo')); | 572 unittest.expect(o.writerIdentity, unittest.equals('foo')); |
571 } | 573 } |
572 buildCounterLogSink--; | 574 buildCounterLogSink--; |
573 } | 575 } |
574 | 576 |
575 buildUnnamed210() { | 577 buildUnnamed208() { |
576 var o = new core.Map<core.String, core.String>(); | 578 var o = new core.Map<core.String, core.String>(); |
577 o["x"] = "foo"; | 579 o["x"] = "foo"; |
578 o["y"] = "foo"; | 580 o["y"] = "foo"; |
579 return o; | 581 return o; |
580 } | 582 } |
581 | 583 |
582 checkUnnamed210(core.Map<core.String, core.String> o) { | 584 checkUnnamed208(core.Map<core.String, core.String> o) { |
583 unittest.expect(o, unittest.hasLength(2)); | 585 unittest.expect(o, unittest.hasLength(2)); |
584 unittest.expect(o["x"], unittest.equals('foo')); | 586 unittest.expect(o["x"], unittest.equals('foo')); |
585 unittest.expect(o["y"], unittest.equals('foo')); | 587 unittest.expect(o["y"], unittest.equals('foo')); |
586 } | 588 } |
587 | 589 |
588 core.int buildCounterMonitoredResource = 0; | 590 core.int buildCounterMonitoredResource = 0; |
589 buildMonitoredResource() { | 591 buildMonitoredResource() { |
590 var o = new api.MonitoredResource(); | 592 var o = new api.MonitoredResource(); |
591 buildCounterMonitoredResource++; | 593 buildCounterMonitoredResource++; |
592 if (buildCounterMonitoredResource < 3) { | 594 if (buildCounterMonitoredResource < 3) { |
593 o.labels = buildUnnamed210(); | 595 o.labels = buildUnnamed208(); |
594 o.type = "foo"; | 596 o.type = "foo"; |
595 } | 597 } |
596 buildCounterMonitoredResource--; | 598 buildCounterMonitoredResource--; |
597 return o; | 599 return o; |
598 } | 600 } |
599 | 601 |
600 checkMonitoredResource(api.MonitoredResource o) { | 602 checkMonitoredResource(api.MonitoredResource o) { |
601 buildCounterMonitoredResource++; | 603 buildCounterMonitoredResource++; |
602 if (buildCounterMonitoredResource < 3) { | 604 if (buildCounterMonitoredResource < 3) { |
603 checkUnnamed210(o.labels); | 605 checkUnnamed208(o.labels); |
604 unittest.expect(o.type, unittest.equals('foo')); | 606 unittest.expect(o.type, unittest.equals('foo')); |
605 } | 607 } |
606 buildCounterMonitoredResource--; | 608 buildCounterMonitoredResource--; |
607 } | 609 } |
608 | 610 |
609 buildUnnamed211() { | 611 buildUnnamed209() { |
610 var o = new core.List<api.LabelDescriptor>(); | 612 var o = new core.List<api.LabelDescriptor>(); |
611 o.add(buildLabelDescriptor()); | 613 o.add(buildLabelDescriptor()); |
612 o.add(buildLabelDescriptor()); | 614 o.add(buildLabelDescriptor()); |
613 return o; | 615 return o; |
614 } | 616 } |
615 | 617 |
616 checkUnnamed211(core.List<api.LabelDescriptor> o) { | 618 checkUnnamed209(core.List<api.LabelDescriptor> o) { |
617 unittest.expect(o, unittest.hasLength(2)); | 619 unittest.expect(o, unittest.hasLength(2)); |
618 checkLabelDescriptor(o[0]); | 620 checkLabelDescriptor(o[0]); |
619 checkLabelDescriptor(o[1]); | 621 checkLabelDescriptor(o[1]); |
620 } | 622 } |
621 | 623 |
622 core.int buildCounterMonitoredResourceDescriptor = 0; | 624 core.int buildCounterMonitoredResourceDescriptor = 0; |
623 buildMonitoredResourceDescriptor() { | 625 buildMonitoredResourceDescriptor() { |
624 var o = new api.MonitoredResourceDescriptor(); | 626 var o = new api.MonitoredResourceDescriptor(); |
625 buildCounterMonitoredResourceDescriptor++; | 627 buildCounterMonitoredResourceDescriptor++; |
626 if (buildCounterMonitoredResourceDescriptor < 3) { | 628 if (buildCounterMonitoredResourceDescriptor < 3) { |
627 o.description = "foo"; | 629 o.description = "foo"; |
628 o.displayName = "foo"; | 630 o.displayName = "foo"; |
629 o.labels = buildUnnamed211(); | 631 o.labels = buildUnnamed209(); |
630 o.name = "foo"; | 632 o.name = "foo"; |
631 o.type = "foo"; | 633 o.type = "foo"; |
632 } | 634 } |
633 buildCounterMonitoredResourceDescriptor--; | 635 buildCounterMonitoredResourceDescriptor--; |
634 return o; | 636 return o; |
635 } | 637 } |
636 | 638 |
637 checkMonitoredResourceDescriptor(api.MonitoredResourceDescriptor o) { | 639 checkMonitoredResourceDescriptor(api.MonitoredResourceDescriptor o) { |
638 buildCounterMonitoredResourceDescriptor++; | 640 buildCounterMonitoredResourceDescriptor++; |
639 if (buildCounterMonitoredResourceDescriptor < 3) { | 641 if (buildCounterMonitoredResourceDescriptor < 3) { |
640 unittest.expect(o.description, unittest.equals('foo')); | 642 unittest.expect(o.description, unittest.equals('foo')); |
641 unittest.expect(o.displayName, unittest.equals('foo')); | 643 unittest.expect(o.displayName, unittest.equals('foo')); |
642 checkUnnamed211(o.labels); | 644 checkUnnamed209(o.labels); |
643 unittest.expect(o.name, unittest.equals('foo')); | 645 unittest.expect(o.name, unittest.equals('foo')); |
644 unittest.expect(o.type, unittest.equals('foo')); | 646 unittest.expect(o.type, unittest.equals('foo')); |
645 } | 647 } |
646 buildCounterMonitoredResourceDescriptor--; | 648 buildCounterMonitoredResourceDescriptor--; |
647 } | 649 } |
648 | 650 |
649 buildUnnamed212() { | 651 buildUnnamed210() { |
650 var o = new core.List<api.LogLine>(); | 652 var o = new core.List<api.LogLine>(); |
651 o.add(buildLogLine()); | 653 o.add(buildLogLine()); |
652 o.add(buildLogLine()); | 654 o.add(buildLogLine()); |
653 return o; | 655 return o; |
654 } | 656 } |
655 | 657 |
656 checkUnnamed212(core.List<api.LogLine> o) { | 658 checkUnnamed210(core.List<api.LogLine> o) { |
657 unittest.expect(o, unittest.hasLength(2)); | 659 unittest.expect(o, unittest.hasLength(2)); |
658 checkLogLine(o[0]); | 660 checkLogLine(o[0]); |
659 checkLogLine(o[1]); | 661 checkLogLine(o[1]); |
660 } | 662 } |
661 | 663 |
662 buildUnnamed213() { | 664 buildUnnamed211() { |
663 var o = new core.List<api.SourceReference>(); | 665 var o = new core.List<api.SourceReference>(); |
664 o.add(buildSourceReference()); | 666 o.add(buildSourceReference()); |
665 o.add(buildSourceReference()); | 667 o.add(buildSourceReference()); |
666 return o; | 668 return o; |
667 } | 669 } |
668 | 670 |
669 checkUnnamed213(core.List<api.SourceReference> o) { | 671 checkUnnamed211(core.List<api.SourceReference> o) { |
670 unittest.expect(o, unittest.hasLength(2)); | 672 unittest.expect(o, unittest.hasLength(2)); |
671 checkSourceReference(o[0]); | 673 checkSourceReference(o[0]); |
672 checkSourceReference(o[1]); | 674 checkSourceReference(o[1]); |
673 } | 675 } |
674 | 676 |
675 core.int buildCounterRequestLog = 0; | 677 core.int buildCounterRequestLog = 0; |
676 buildRequestLog() { | 678 buildRequestLog() { |
677 var o = new api.RequestLog(); | 679 var o = new api.RequestLog(); |
678 buildCounterRequestLog++; | 680 buildCounterRequestLog++; |
679 if (buildCounterRequestLog < 3) { | 681 if (buildCounterRequestLog < 3) { |
680 o.appEngineRelease = "foo"; | 682 o.appEngineRelease = "foo"; |
681 o.appId = "foo"; | 683 o.appId = "foo"; |
682 o.cost = 42.0; | 684 o.cost = 42.0; |
683 o.endTime = "foo"; | 685 o.endTime = "foo"; |
684 o.finished = true; | 686 o.finished = true; |
685 o.first = true; | 687 o.first = true; |
686 o.host = "foo"; | 688 o.host = "foo"; |
687 o.httpVersion = "foo"; | 689 o.httpVersion = "foo"; |
688 o.instanceId = "foo"; | 690 o.instanceId = "foo"; |
689 o.instanceIndex = 42; | 691 o.instanceIndex = 42; |
690 o.ip = "foo"; | 692 o.ip = "foo"; |
691 o.latency = "foo"; | 693 o.latency = "foo"; |
692 o.line = buildUnnamed212(); | 694 o.line = buildUnnamed210(); |
693 o.megaCycles = "foo"; | 695 o.megaCycles = "foo"; |
694 o.method = "foo"; | 696 o.method = "foo"; |
695 o.moduleId = "foo"; | 697 o.moduleId = "foo"; |
696 o.nickname = "foo"; | 698 o.nickname = "foo"; |
697 o.pendingTime = "foo"; | 699 o.pendingTime = "foo"; |
698 o.referrer = "foo"; | 700 o.referrer = "foo"; |
699 o.requestId = "foo"; | 701 o.requestId = "foo"; |
700 o.resource = "foo"; | 702 o.resource = "foo"; |
701 o.responseSize = "foo"; | 703 o.responseSize = "foo"; |
702 o.sourceReference = buildUnnamed213(); | 704 o.sourceReference = buildUnnamed211(); |
703 o.startTime = "foo"; | 705 o.startTime = "foo"; |
704 o.status = 42; | 706 o.status = 42; |
705 o.taskName = "foo"; | 707 o.taskName = "foo"; |
706 o.taskQueueName = "foo"; | 708 o.taskQueueName = "foo"; |
707 o.traceId = "foo"; | 709 o.traceId = "foo"; |
708 o.urlMapEntry = "foo"; | 710 o.urlMapEntry = "foo"; |
709 o.userAgent = "foo"; | 711 o.userAgent = "foo"; |
710 o.versionId = "foo"; | 712 o.versionId = "foo"; |
711 o.wasLoadingRequest = true; | 713 o.wasLoadingRequest = true; |
712 } | 714 } |
713 buildCounterRequestLog--; | 715 buildCounterRequestLog--; |
714 return o; | 716 return o; |
715 } | 717 } |
716 | 718 |
717 checkRequestLog(api.RequestLog o) { | 719 checkRequestLog(api.RequestLog o) { |
718 buildCounterRequestLog++; | 720 buildCounterRequestLog++; |
719 if (buildCounterRequestLog < 3) { | 721 if (buildCounterRequestLog < 3) { |
720 unittest.expect(o.appEngineRelease, unittest.equals('foo')); | 722 unittest.expect(o.appEngineRelease, unittest.equals('foo')); |
721 unittest.expect(o.appId, unittest.equals('foo')); | 723 unittest.expect(o.appId, unittest.equals('foo')); |
722 unittest.expect(o.cost, unittest.equals(42.0)); | 724 unittest.expect(o.cost, unittest.equals(42.0)); |
723 unittest.expect(o.endTime, unittest.equals('foo')); | 725 unittest.expect(o.endTime, unittest.equals('foo')); |
724 unittest.expect(o.finished, unittest.isTrue); | 726 unittest.expect(o.finished, unittest.isTrue); |
725 unittest.expect(o.first, unittest.isTrue); | 727 unittest.expect(o.first, unittest.isTrue); |
726 unittest.expect(o.host, unittest.equals('foo')); | 728 unittest.expect(o.host, unittest.equals('foo')); |
727 unittest.expect(o.httpVersion, unittest.equals('foo')); | 729 unittest.expect(o.httpVersion, unittest.equals('foo')); |
728 unittest.expect(o.instanceId, unittest.equals('foo')); | 730 unittest.expect(o.instanceId, unittest.equals('foo')); |
729 unittest.expect(o.instanceIndex, unittest.equals(42)); | 731 unittest.expect(o.instanceIndex, unittest.equals(42)); |
730 unittest.expect(o.ip, unittest.equals('foo')); | 732 unittest.expect(o.ip, unittest.equals('foo')); |
731 unittest.expect(o.latency, unittest.equals('foo')); | 733 unittest.expect(o.latency, unittest.equals('foo')); |
732 checkUnnamed212(o.line); | 734 checkUnnamed210(o.line); |
733 unittest.expect(o.megaCycles, unittest.equals('foo')); | 735 unittest.expect(o.megaCycles, unittest.equals('foo')); |
734 unittest.expect(o.method, unittest.equals('foo')); | 736 unittest.expect(o.method, unittest.equals('foo')); |
735 unittest.expect(o.moduleId, unittest.equals('foo')); | 737 unittest.expect(o.moduleId, unittest.equals('foo')); |
736 unittest.expect(o.nickname, unittest.equals('foo')); | 738 unittest.expect(o.nickname, unittest.equals('foo')); |
737 unittest.expect(o.pendingTime, unittest.equals('foo')); | 739 unittest.expect(o.pendingTime, unittest.equals('foo')); |
738 unittest.expect(o.referrer, unittest.equals('foo')); | 740 unittest.expect(o.referrer, unittest.equals('foo')); |
739 unittest.expect(o.requestId, unittest.equals('foo')); | 741 unittest.expect(o.requestId, unittest.equals('foo')); |
740 unittest.expect(o.resource, unittest.equals('foo')); | 742 unittest.expect(o.resource, unittest.equals('foo')); |
741 unittest.expect(o.responseSize, unittest.equals('foo')); | 743 unittest.expect(o.responseSize, unittest.equals('foo')); |
742 checkUnnamed213(o.sourceReference); | 744 checkUnnamed211(o.sourceReference); |
743 unittest.expect(o.startTime, unittest.equals('foo')); | 745 unittest.expect(o.startTime, unittest.equals('foo')); |
744 unittest.expect(o.status, unittest.equals(42)); | 746 unittest.expect(o.status, unittest.equals(42)); |
745 unittest.expect(o.taskName, unittest.equals('foo')); | 747 unittest.expect(o.taskName, unittest.equals('foo')); |
746 unittest.expect(o.taskQueueName, unittest.equals('foo')); | 748 unittest.expect(o.taskQueueName, unittest.equals('foo')); |
747 unittest.expect(o.traceId, unittest.equals('foo')); | 749 unittest.expect(o.traceId, unittest.equals('foo')); |
748 unittest.expect(o.urlMapEntry, unittest.equals('foo')); | 750 unittest.expect(o.urlMapEntry, unittest.equals('foo')); |
749 unittest.expect(o.userAgent, unittest.equals('foo')); | 751 unittest.expect(o.userAgent, unittest.equals('foo')); |
750 unittest.expect(o.versionId, unittest.equals('foo')); | 752 unittest.expect(o.versionId, unittest.equals('foo')); |
751 unittest.expect(o.wasLoadingRequest, unittest.isTrue); | 753 unittest.expect(o.wasLoadingRequest, unittest.isTrue); |
752 } | 754 } |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
790 | 792 |
791 checkSourceReference(api.SourceReference o) { | 793 checkSourceReference(api.SourceReference o) { |
792 buildCounterSourceReference++; | 794 buildCounterSourceReference++; |
793 if (buildCounterSourceReference < 3) { | 795 if (buildCounterSourceReference < 3) { |
794 unittest.expect(o.repository, unittest.equals('foo')); | 796 unittest.expect(o.repository, unittest.equals('foo')); |
795 unittest.expect(o.revisionId, unittest.equals('foo')); | 797 unittest.expect(o.revisionId, unittest.equals('foo')); |
796 } | 798 } |
797 buildCounterSourceReference--; | 799 buildCounterSourceReference--; |
798 } | 800 } |
799 | 801 |
800 buildUnnamed214() { | 802 buildUnnamed212() { |
801 var o = new core.List<api.LogEntry>(); | 803 var o = new core.List<api.LogEntry>(); |
802 o.add(buildLogEntry()); | 804 o.add(buildLogEntry()); |
803 o.add(buildLogEntry()); | 805 o.add(buildLogEntry()); |
804 return o; | 806 return o; |
805 } | 807 } |
806 | 808 |
807 checkUnnamed214(core.List<api.LogEntry> o) { | 809 checkUnnamed212(core.List<api.LogEntry> o) { |
808 unittest.expect(o, unittest.hasLength(2)); | 810 unittest.expect(o, unittest.hasLength(2)); |
809 checkLogEntry(o[0]); | 811 checkLogEntry(o[0]); |
810 checkLogEntry(o[1]); | 812 checkLogEntry(o[1]); |
811 } | 813 } |
812 | 814 |
813 buildUnnamed215() { | 815 buildUnnamed213() { |
814 var o = new core.Map<core.String, core.String>(); | 816 var o = new core.Map<core.String, core.String>(); |
815 o["x"] = "foo"; | 817 o["x"] = "foo"; |
816 o["y"] = "foo"; | 818 o["y"] = "foo"; |
817 return o; | 819 return o; |
818 } | 820 } |
819 | 821 |
820 checkUnnamed215(core.Map<core.String, core.String> o) { | 822 checkUnnamed213(core.Map<core.String, core.String> o) { |
821 unittest.expect(o, unittest.hasLength(2)); | 823 unittest.expect(o, unittest.hasLength(2)); |
822 unittest.expect(o["x"], unittest.equals('foo')); | 824 unittest.expect(o["x"], unittest.equals('foo')); |
823 unittest.expect(o["y"], unittest.equals('foo')); | 825 unittest.expect(o["y"], unittest.equals('foo')); |
824 } | 826 } |
825 | 827 |
826 core.int buildCounterWriteLogEntriesRequest = 0; | 828 core.int buildCounterWriteLogEntriesRequest = 0; |
827 buildWriteLogEntriesRequest() { | 829 buildWriteLogEntriesRequest() { |
828 var o = new api.WriteLogEntriesRequest(); | 830 var o = new api.WriteLogEntriesRequest(); |
829 buildCounterWriteLogEntriesRequest++; | 831 buildCounterWriteLogEntriesRequest++; |
830 if (buildCounterWriteLogEntriesRequest < 3) { | 832 if (buildCounterWriteLogEntriesRequest < 3) { |
831 o.entries = buildUnnamed214(); | 833 o.entries = buildUnnamed212(); |
832 o.labels = buildUnnamed215(); | 834 o.labels = buildUnnamed213(); |
833 o.logName = "foo"; | 835 o.logName = "foo"; |
834 o.partialSuccess = true; | 836 o.partialSuccess = true; |
835 o.resource = buildMonitoredResource(); | 837 o.resource = buildMonitoredResource(); |
836 } | 838 } |
837 buildCounterWriteLogEntriesRequest--; | 839 buildCounterWriteLogEntriesRequest--; |
838 return o; | 840 return o; |
839 } | 841 } |
840 | 842 |
841 checkWriteLogEntriesRequest(api.WriteLogEntriesRequest o) { | 843 checkWriteLogEntriesRequest(api.WriteLogEntriesRequest o) { |
842 buildCounterWriteLogEntriesRequest++; | 844 buildCounterWriteLogEntriesRequest++; |
843 if (buildCounterWriteLogEntriesRequest < 3) { | 845 if (buildCounterWriteLogEntriesRequest < 3) { |
844 checkUnnamed214(o.entries); | 846 checkUnnamed212(o.entries); |
845 checkUnnamed215(o.labels); | 847 checkUnnamed213(o.labels); |
846 unittest.expect(o.logName, unittest.equals('foo')); | 848 unittest.expect(o.logName, unittest.equals('foo')); |
847 unittest.expect(o.partialSuccess, unittest.isTrue); | 849 unittest.expect(o.partialSuccess, unittest.isTrue); |
848 checkMonitoredResource(o.resource); | 850 checkMonitoredResource(o.resource); |
849 } | 851 } |
850 buildCounterWriteLogEntriesRequest--; | 852 buildCounterWriteLogEntriesRequest--; |
851 } | 853 } |
852 | 854 |
853 core.int buildCounterWriteLogEntriesResponse = 0; | 855 core.int buildCounterWriteLogEntriesResponse = 0; |
854 buildWriteLogEntriesResponse() { | 856 buildWriteLogEntriesResponse() { |
855 var o = new api.WriteLogEntriesResponse(); | 857 var o = new api.WriteLogEntriesResponse(); |
(...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1111 res.delete(arg_logName).then(unittest.expectAsync(((api.Empty response) { | 1113 res.delete(arg_logName).then(unittest.expectAsync(((api.Empty response) { |
1112 checkEmpty(response); | 1114 checkEmpty(response); |
1113 }))); | 1115 }))); |
1114 }); | 1116 }); |
1115 | 1117 |
1116 unittest.test("method--list", () { | 1118 unittest.test("method--list", () { |
1117 | 1119 |
1118 var mock = new HttpServerMock(); | 1120 var mock = new HttpServerMock(); |
1119 api.BillingAccountsLogsResourceApi res = new api.LoggingApi(mock).billingA
ccounts.logs; | 1121 api.BillingAccountsLogsResourceApi res = new api.LoggingApi(mock).billingA
ccounts.logs; |
1120 var arg_parent = "foo"; | 1122 var arg_parent = "foo"; |
| 1123 var arg_pageToken = "foo"; |
1121 var arg_pageSize = 42; | 1124 var arg_pageSize = 42; |
1122 var arg_pageToken = "foo"; | |
1123 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1125 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
1124 var path = (req.url).path; | 1126 var path = (req.url).path; |
1125 var pathOffset = 0; | 1127 var pathOffset = 0; |
1126 var index; | 1128 var index; |
1127 var subPart; | 1129 var subPart; |
1128 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1130 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
1129 pathOffset += 1; | 1131 pathOffset += 1; |
1130 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v2/")); | 1132 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v2/")); |
1131 pathOffset += 3; | 1133 pathOffset += 3; |
1132 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; | 1134 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; |
1133 | 1135 |
1134 var query = (req.url).query; | 1136 var query = (req.url).query; |
1135 var queryOffset = 0; | 1137 var queryOffset = 0; |
1136 var queryMap = {}; | 1138 var queryMap = {}; |
1137 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 1139 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
1138 parseBool(n) { | 1140 parseBool(n) { |
1139 if (n == "true") return true; | 1141 if (n == "true") return true; |
1140 if (n == "false") return false; | 1142 if (n == "false") return false; |
1141 if (n == null) return null; | 1143 if (n == null) return null; |
1142 throw new core.ArgumentError("Invalid boolean: $n"); | 1144 throw new core.ArgumentError("Invalid boolean: $n"); |
1143 } | 1145 } |
1144 if (query.length > 0) { | 1146 if (query.length > 0) { |
1145 for (var part in query.split("&")) { | 1147 for (var part in query.split("&")) { |
1146 var keyvalue = part.split("="); | 1148 var keyvalue = part.split("="); |
1147 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 1149 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
1148 } | 1150 } |
1149 } | 1151 } |
| 1152 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); |
1150 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ
als(arg_pageSize)); | 1153 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ
als(arg_pageSize)); |
1151 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | |
1152 | 1154 |
1153 | 1155 |
1154 var h = { | 1156 var h = { |
1155 "content-type" : "application/json; charset=utf-8", | 1157 "content-type" : "application/json; charset=utf-8", |
1156 }; | 1158 }; |
1157 var resp = convert.JSON.encode(buildListLogsResponse()); | 1159 var resp = convert.JSON.encode(buildListLogsResponse()); |
1158 return new async.Future.value(stringResponse(200, h, resp)); | 1160 return new async.Future.value(stringResponse(200, h, resp)); |
1159 }), true); | 1161 }), true); |
1160 res.list(arg_parent, pageSize: arg_pageSize, pageToken: arg_pageToken).the
n(unittest.expectAsync(((api.ListLogsResponse response) { | 1162 res.list(arg_parent, pageToken: arg_pageToken, pageSize: arg_pageSize).the
n(unittest.expectAsync(((api.ListLogsResponse response) { |
1161 checkListLogsResponse(response); | 1163 checkListLogsResponse(response); |
1162 }))); | 1164 }))); |
1163 }); | 1165 }); |
1164 | 1166 |
1165 }); | 1167 }); |
1166 | 1168 |
1167 | 1169 |
1168 unittest.group("resource-BillingAccountsSinksResourceApi", () { | 1170 unittest.group("resource-BillingAccountsSinksResourceApi", () { |
1169 unittest.test("method--create", () { | 1171 unittest.test("method--create", () { |
1170 | 1172 |
(...skipping 575 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1746 res.get(arg_sinkName).then(unittest.expectAsync(((api.LogSink response) { | 1748 res.get(arg_sinkName).then(unittest.expectAsync(((api.LogSink response) { |
1747 checkLogSink(response); | 1749 checkLogSink(response); |
1748 }))); | 1750 }))); |
1749 }); | 1751 }); |
1750 | 1752 |
1751 unittest.test("method--list", () { | 1753 unittest.test("method--list", () { |
1752 | 1754 |
1753 var mock = new HttpServerMock(); | 1755 var mock = new HttpServerMock(); |
1754 api.FoldersSinksResourceApi res = new api.LoggingApi(mock).folders.sinks; | 1756 api.FoldersSinksResourceApi res = new api.LoggingApi(mock).folders.sinks; |
1755 var arg_parent = "foo"; | 1757 var arg_parent = "foo"; |
| 1758 var arg_pageToken = "foo"; |
1756 var arg_pageSize = 42; | 1759 var arg_pageSize = 42; |
1757 var arg_pageToken = "foo"; | |
1758 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1760 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
1759 var path = (req.url).path; | 1761 var path = (req.url).path; |
1760 var pathOffset = 0; | 1762 var pathOffset = 0; |
1761 var index; | 1763 var index; |
1762 var subPart; | 1764 var subPart; |
1763 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1765 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
1764 pathOffset += 1; | 1766 pathOffset += 1; |
1765 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v2/")); | 1767 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v2/")); |
1766 pathOffset += 3; | 1768 pathOffset += 3; |
1767 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; | 1769 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; |
1768 | 1770 |
1769 var query = (req.url).query; | 1771 var query = (req.url).query; |
1770 var queryOffset = 0; | 1772 var queryOffset = 0; |
1771 var queryMap = {}; | 1773 var queryMap = {}; |
1772 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 1774 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
1773 parseBool(n) { | 1775 parseBool(n) { |
1774 if (n == "true") return true; | 1776 if (n == "true") return true; |
1775 if (n == "false") return false; | 1777 if (n == "false") return false; |
1776 if (n == null) return null; | 1778 if (n == null) return null; |
1777 throw new core.ArgumentError("Invalid boolean: $n"); | 1779 throw new core.ArgumentError("Invalid boolean: $n"); |
1778 } | 1780 } |
1779 if (query.length > 0) { | 1781 if (query.length > 0) { |
1780 for (var part in query.split("&")) { | 1782 for (var part in query.split("&")) { |
1781 var keyvalue = part.split("="); | 1783 var keyvalue = part.split("="); |
1782 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 1784 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
1783 } | 1785 } |
1784 } | 1786 } |
| 1787 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); |
1785 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ
als(arg_pageSize)); | 1788 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ
als(arg_pageSize)); |
1786 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | |
1787 | 1789 |
1788 | 1790 |
1789 var h = { | 1791 var h = { |
1790 "content-type" : "application/json; charset=utf-8", | 1792 "content-type" : "application/json; charset=utf-8", |
1791 }; | 1793 }; |
1792 var resp = convert.JSON.encode(buildListSinksResponse()); | 1794 var resp = convert.JSON.encode(buildListSinksResponse()); |
1793 return new async.Future.value(stringResponse(200, h, resp)); | 1795 return new async.Future.value(stringResponse(200, h, resp)); |
1794 }), true); | 1796 }), true); |
1795 res.list(arg_parent, pageSize: arg_pageSize, pageToken: arg_pageToken).the
n(unittest.expectAsync(((api.ListSinksResponse response) { | 1797 res.list(arg_parent, pageToken: arg_pageToken, pageSize: arg_pageSize).the
n(unittest.expectAsync(((api.ListSinksResponse response) { |
1796 checkListSinksResponse(response); | 1798 checkListSinksResponse(response); |
1797 }))); | 1799 }))); |
1798 }); | 1800 }); |
1799 | 1801 |
1800 unittest.test("method--update", () { | 1802 unittest.test("method--update", () { |
1801 | 1803 |
1802 var mock = new HttpServerMock(); | 1804 var mock = new HttpServerMock(); |
1803 api.FoldersSinksResourceApi res = new api.LoggingApi(mock).folders.sinks; | 1805 api.FoldersSinksResourceApi res = new api.LoggingApi(mock).folders.sinks; |
1804 var arg_request = buildLogSink(); | 1806 var arg_request = buildLogSink(); |
1805 var arg_sinkName = "foo"; | 1807 var arg_sinkName = "foo"; |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1849 }); | 1851 }); |
1850 | 1852 |
1851 }); | 1853 }); |
1852 | 1854 |
1853 | 1855 |
1854 unittest.group("resource-MonitoredResourceDescriptorsResourceApi", () { | 1856 unittest.group("resource-MonitoredResourceDescriptorsResourceApi", () { |
1855 unittest.test("method--list", () { | 1857 unittest.test("method--list", () { |
1856 | 1858 |
1857 var mock = new HttpServerMock(); | 1859 var mock = new HttpServerMock(); |
1858 api.MonitoredResourceDescriptorsResourceApi res = new api.LoggingApi(mock)
.monitoredResourceDescriptors; | 1860 api.MonitoredResourceDescriptorsResourceApi res = new api.LoggingApi(mock)
.monitoredResourceDescriptors; |
| 1861 var arg_pageToken = "foo"; |
1859 var arg_pageSize = 42; | 1862 var arg_pageSize = 42; |
1860 var arg_pageToken = "foo"; | |
1861 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1863 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
1862 var path = (req.url).path; | 1864 var path = (req.url).path; |
1863 var pathOffset = 0; | 1865 var pathOffset = 0; |
1864 var index; | 1866 var index; |
1865 var subPart; | 1867 var subPart; |
1866 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1868 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
1867 pathOffset += 1; | 1869 pathOffset += 1; |
1868 unittest.expect(path.substring(pathOffset, pathOffset + 31), unittest.eq
uals("v2/monitoredResourceDescriptors")); | 1870 unittest.expect(path.substring(pathOffset, pathOffset + 31), unittest.eq
uals("v2/monitoredResourceDescriptors")); |
1869 pathOffset += 31; | 1871 pathOffset += 31; |
1870 | 1872 |
1871 var query = (req.url).query; | 1873 var query = (req.url).query; |
1872 var queryOffset = 0; | 1874 var queryOffset = 0; |
1873 var queryMap = {}; | 1875 var queryMap = {}; |
1874 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 1876 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
1875 parseBool(n) { | 1877 parseBool(n) { |
1876 if (n == "true") return true; | 1878 if (n == "true") return true; |
1877 if (n == "false") return false; | 1879 if (n == "false") return false; |
1878 if (n == null) return null; | 1880 if (n == null) return null; |
1879 throw new core.ArgumentError("Invalid boolean: $n"); | 1881 throw new core.ArgumentError("Invalid boolean: $n"); |
1880 } | 1882 } |
1881 if (query.length > 0) { | 1883 if (query.length > 0) { |
1882 for (var part in query.split("&")) { | 1884 for (var part in query.split("&")) { |
1883 var keyvalue = part.split("="); | 1885 var keyvalue = part.split("="); |
1884 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 1886 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
1885 } | 1887 } |
1886 } | 1888 } |
| 1889 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); |
1887 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ
als(arg_pageSize)); | 1890 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ
als(arg_pageSize)); |
1888 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | |
1889 | 1891 |
1890 | 1892 |
1891 var h = { | 1893 var h = { |
1892 "content-type" : "application/json; charset=utf-8", | 1894 "content-type" : "application/json; charset=utf-8", |
1893 }; | 1895 }; |
1894 var resp = convert.JSON.encode(buildListMonitoredResourceDescriptorsResp
onse()); | 1896 var resp = convert.JSON.encode(buildListMonitoredResourceDescriptorsResp
onse()); |
1895 return new async.Future.value(stringResponse(200, h, resp)); | 1897 return new async.Future.value(stringResponse(200, h, resp)); |
1896 }), true); | 1898 }), true); |
1897 res.list(pageSize: arg_pageSize, pageToken: arg_pageToken).then(unittest.e
xpectAsync(((api.ListMonitoredResourceDescriptorsResponse response) { | 1899 res.list(pageToken: arg_pageToken, pageSize: arg_pageSize).then(unittest.e
xpectAsync(((api.ListMonitoredResourceDescriptorsResponse response) { |
1898 checkListMonitoredResourceDescriptorsResponse(response); | 1900 checkListMonitoredResourceDescriptorsResponse(response); |
1899 }))); | 1901 }))); |
1900 }); | 1902 }); |
1901 | 1903 |
1902 }); | 1904 }); |
1903 | 1905 |
1904 | 1906 |
1905 unittest.group("resource-OrganizationsLogsResourceApi", () { | 1907 unittest.group("resource-OrganizationsLogsResourceApi", () { |
1906 unittest.test("method--delete", () { | 1908 unittest.test("method--delete", () { |
1907 | 1909 |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1946 res.delete(arg_logName).then(unittest.expectAsync(((api.Empty response) { | 1948 res.delete(arg_logName).then(unittest.expectAsync(((api.Empty response) { |
1947 checkEmpty(response); | 1949 checkEmpty(response); |
1948 }))); | 1950 }))); |
1949 }); | 1951 }); |
1950 | 1952 |
1951 unittest.test("method--list", () { | 1953 unittest.test("method--list", () { |
1952 | 1954 |
1953 var mock = new HttpServerMock(); | 1955 var mock = new HttpServerMock(); |
1954 api.OrganizationsLogsResourceApi res = new api.LoggingApi(mock).organizati
ons.logs; | 1956 api.OrganizationsLogsResourceApi res = new api.LoggingApi(mock).organizati
ons.logs; |
1955 var arg_parent = "foo"; | 1957 var arg_parent = "foo"; |
| 1958 var arg_pageToken = "foo"; |
1956 var arg_pageSize = 42; | 1959 var arg_pageSize = 42; |
1957 var arg_pageToken = "foo"; | |
1958 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1960 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
1959 var path = (req.url).path; | 1961 var path = (req.url).path; |
1960 var pathOffset = 0; | 1962 var pathOffset = 0; |
1961 var index; | 1963 var index; |
1962 var subPart; | 1964 var subPart; |
1963 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1965 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
1964 pathOffset += 1; | 1966 pathOffset += 1; |
1965 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v2/")); | 1967 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v2/")); |
1966 pathOffset += 3; | 1968 pathOffset += 3; |
1967 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; | 1969 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; |
1968 | 1970 |
1969 var query = (req.url).query; | 1971 var query = (req.url).query; |
1970 var queryOffset = 0; | 1972 var queryOffset = 0; |
1971 var queryMap = {}; | 1973 var queryMap = {}; |
1972 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 1974 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
1973 parseBool(n) { | 1975 parseBool(n) { |
1974 if (n == "true") return true; | 1976 if (n == "true") return true; |
1975 if (n == "false") return false; | 1977 if (n == "false") return false; |
1976 if (n == null) return null; | 1978 if (n == null) return null; |
1977 throw new core.ArgumentError("Invalid boolean: $n"); | 1979 throw new core.ArgumentError("Invalid boolean: $n"); |
1978 } | 1980 } |
1979 if (query.length > 0) { | 1981 if (query.length > 0) { |
1980 for (var part in query.split("&")) { | 1982 for (var part in query.split("&")) { |
1981 var keyvalue = part.split("="); | 1983 var keyvalue = part.split("="); |
1982 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 1984 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
1983 } | 1985 } |
1984 } | 1986 } |
| 1987 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); |
1985 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ
als(arg_pageSize)); | 1988 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ
als(arg_pageSize)); |
1986 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | |
1987 | 1989 |
1988 | 1990 |
1989 var h = { | 1991 var h = { |
1990 "content-type" : "application/json; charset=utf-8", | 1992 "content-type" : "application/json; charset=utf-8", |
1991 }; | 1993 }; |
1992 var resp = convert.JSON.encode(buildListLogsResponse()); | 1994 var resp = convert.JSON.encode(buildListLogsResponse()); |
1993 return new async.Future.value(stringResponse(200, h, resp)); | 1995 return new async.Future.value(stringResponse(200, h, resp)); |
1994 }), true); | 1996 }), true); |
1995 res.list(arg_parent, pageSize: arg_pageSize, pageToken: arg_pageToken).the
n(unittest.expectAsync(((api.ListLogsResponse response) { | 1997 res.list(arg_parent, pageToken: arg_pageToken, pageSize: arg_pageSize).the
n(unittest.expectAsync(((api.ListLogsResponse response) { |
1996 checkListLogsResponse(response); | 1998 checkListLogsResponse(response); |
1997 }))); | 1999 }))); |
1998 }); | 2000 }); |
1999 | 2001 |
2000 }); | 2002 }); |
2001 | 2003 |
2002 | 2004 |
2003 unittest.group("resource-OrganizationsSinksResourceApi", () { | 2005 unittest.group("resource-OrganizationsSinksResourceApi", () { |
2004 unittest.test("method--create", () { | 2006 unittest.test("method--create", () { |
2005 | 2007 |
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2140 res.get(arg_sinkName).then(unittest.expectAsync(((api.LogSink response) { | 2142 res.get(arg_sinkName).then(unittest.expectAsync(((api.LogSink response) { |
2141 checkLogSink(response); | 2143 checkLogSink(response); |
2142 }))); | 2144 }))); |
2143 }); | 2145 }); |
2144 | 2146 |
2145 unittest.test("method--list", () { | 2147 unittest.test("method--list", () { |
2146 | 2148 |
2147 var mock = new HttpServerMock(); | 2149 var mock = new HttpServerMock(); |
2148 api.OrganizationsSinksResourceApi res = new api.LoggingApi(mock).organizat
ions.sinks; | 2150 api.OrganizationsSinksResourceApi res = new api.LoggingApi(mock).organizat
ions.sinks; |
2149 var arg_parent = "foo"; | 2151 var arg_parent = "foo"; |
| 2152 var arg_pageToken = "foo"; |
2150 var arg_pageSize = 42; | 2153 var arg_pageSize = 42; |
2151 var arg_pageToken = "foo"; | |
2152 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2154 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
2153 var path = (req.url).path; | 2155 var path = (req.url).path; |
2154 var pathOffset = 0; | 2156 var pathOffset = 0; |
2155 var index; | 2157 var index; |
2156 var subPart; | 2158 var subPart; |
2157 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2159 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
2158 pathOffset += 1; | 2160 pathOffset += 1; |
2159 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v2/")); | 2161 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v2/")); |
2160 pathOffset += 3; | 2162 pathOffset += 3; |
2161 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; | 2163 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; |
2162 | 2164 |
2163 var query = (req.url).query; | 2165 var query = (req.url).query; |
2164 var queryOffset = 0; | 2166 var queryOffset = 0; |
2165 var queryMap = {}; | 2167 var queryMap = {}; |
2166 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 2168 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
2167 parseBool(n) { | 2169 parseBool(n) { |
2168 if (n == "true") return true; | 2170 if (n == "true") return true; |
2169 if (n == "false") return false; | 2171 if (n == "false") return false; |
2170 if (n == null) return null; | 2172 if (n == null) return null; |
2171 throw new core.ArgumentError("Invalid boolean: $n"); | 2173 throw new core.ArgumentError("Invalid boolean: $n"); |
2172 } | 2174 } |
2173 if (query.length > 0) { | 2175 if (query.length > 0) { |
2174 for (var part in query.split("&")) { | 2176 for (var part in query.split("&")) { |
2175 var keyvalue = part.split("="); | 2177 var keyvalue = part.split("="); |
2176 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 2178 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
2177 } | 2179 } |
2178 } | 2180 } |
| 2181 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); |
2179 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ
als(arg_pageSize)); | 2182 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ
als(arg_pageSize)); |
2180 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | |
2181 | 2183 |
2182 | 2184 |
2183 var h = { | 2185 var h = { |
2184 "content-type" : "application/json; charset=utf-8", | 2186 "content-type" : "application/json; charset=utf-8", |
2185 }; | 2187 }; |
2186 var resp = convert.JSON.encode(buildListSinksResponse()); | 2188 var resp = convert.JSON.encode(buildListSinksResponse()); |
2187 return new async.Future.value(stringResponse(200, h, resp)); | 2189 return new async.Future.value(stringResponse(200, h, resp)); |
2188 }), true); | 2190 }), true); |
2189 res.list(arg_parent, pageSize: arg_pageSize, pageToken: arg_pageToken).the
n(unittest.expectAsync(((api.ListSinksResponse response) { | 2191 res.list(arg_parent, pageToken: arg_pageToken, pageSize: arg_pageSize).the
n(unittest.expectAsync(((api.ListSinksResponse response) { |
2190 checkListSinksResponse(response); | 2192 checkListSinksResponse(response); |
2191 }))); | 2193 }))); |
2192 }); | 2194 }); |
2193 | 2195 |
2194 unittest.test("method--update", () { | 2196 unittest.test("method--update", () { |
2195 | 2197 |
2196 var mock = new HttpServerMock(); | 2198 var mock = new HttpServerMock(); |
2197 api.OrganizationsSinksResourceApi res = new api.LoggingApi(mock).organizat
ions.sinks; | 2199 api.OrganizationsSinksResourceApi res = new api.LoggingApi(mock).organizat
ions.sinks; |
2198 var arg_request = buildLogSink(); | 2200 var arg_request = buildLogSink(); |
2199 var arg_sinkName = "foo"; | 2201 var arg_sinkName = "foo"; |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2289 res.delete(arg_logName).then(unittest.expectAsync(((api.Empty response) { | 2291 res.delete(arg_logName).then(unittest.expectAsync(((api.Empty response) { |
2290 checkEmpty(response); | 2292 checkEmpty(response); |
2291 }))); | 2293 }))); |
2292 }); | 2294 }); |
2293 | 2295 |
2294 unittest.test("method--list", () { | 2296 unittest.test("method--list", () { |
2295 | 2297 |
2296 var mock = new HttpServerMock(); | 2298 var mock = new HttpServerMock(); |
2297 api.ProjectsLogsResourceApi res = new api.LoggingApi(mock).projects.logs; | 2299 api.ProjectsLogsResourceApi res = new api.LoggingApi(mock).projects.logs; |
2298 var arg_parent = "foo"; | 2300 var arg_parent = "foo"; |
| 2301 var arg_pageToken = "foo"; |
2299 var arg_pageSize = 42; | 2302 var arg_pageSize = 42; |
2300 var arg_pageToken = "foo"; | |
2301 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2303 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
2302 var path = (req.url).path; | 2304 var path = (req.url).path; |
2303 var pathOffset = 0; | 2305 var pathOffset = 0; |
2304 var index; | 2306 var index; |
2305 var subPart; | 2307 var subPart; |
2306 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2308 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
2307 pathOffset += 1; | 2309 pathOffset += 1; |
2308 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v2/")); | 2310 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v2/")); |
2309 pathOffset += 3; | 2311 pathOffset += 3; |
2310 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; | 2312 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; |
2311 | 2313 |
2312 var query = (req.url).query; | 2314 var query = (req.url).query; |
2313 var queryOffset = 0; | 2315 var queryOffset = 0; |
2314 var queryMap = {}; | 2316 var queryMap = {}; |
2315 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 2317 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
2316 parseBool(n) { | 2318 parseBool(n) { |
2317 if (n == "true") return true; | 2319 if (n == "true") return true; |
2318 if (n == "false") return false; | 2320 if (n == "false") return false; |
2319 if (n == null) return null; | 2321 if (n == null) return null; |
2320 throw new core.ArgumentError("Invalid boolean: $n"); | 2322 throw new core.ArgumentError("Invalid boolean: $n"); |
2321 } | 2323 } |
2322 if (query.length > 0) { | 2324 if (query.length > 0) { |
2323 for (var part in query.split("&")) { | 2325 for (var part in query.split("&")) { |
2324 var keyvalue = part.split("="); | 2326 var keyvalue = part.split("="); |
2325 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 2327 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
2326 } | 2328 } |
2327 } | 2329 } |
| 2330 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); |
2328 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ
als(arg_pageSize)); | 2331 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ
als(arg_pageSize)); |
2329 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | |
2330 | 2332 |
2331 | 2333 |
2332 var h = { | 2334 var h = { |
2333 "content-type" : "application/json; charset=utf-8", | 2335 "content-type" : "application/json; charset=utf-8", |
2334 }; | 2336 }; |
2335 var resp = convert.JSON.encode(buildListLogsResponse()); | 2337 var resp = convert.JSON.encode(buildListLogsResponse()); |
2336 return new async.Future.value(stringResponse(200, h, resp)); | 2338 return new async.Future.value(stringResponse(200, h, resp)); |
2337 }), true); | 2339 }), true); |
2338 res.list(arg_parent, pageSize: arg_pageSize, pageToken: arg_pageToken).the
n(unittest.expectAsync(((api.ListLogsResponse response) { | 2340 res.list(arg_parent, pageToken: arg_pageToken, pageSize: arg_pageSize).the
n(unittest.expectAsync(((api.ListLogsResponse response) { |
2339 checkListLogsResponse(response); | 2341 checkListLogsResponse(response); |
2340 }))); | 2342 }))); |
2341 }); | 2343 }); |
2342 | 2344 |
2343 }); | 2345 }); |
2344 | 2346 |
2345 | 2347 |
2346 unittest.group("resource-ProjectsMetricsResourceApi", () { | 2348 unittest.group("resource-ProjectsMetricsResourceApi", () { |
2347 unittest.test("method--create", () { | 2349 unittest.test("method--create", () { |
2348 | 2350 |
(...skipping 475 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2824 res.update(arg_request, arg_sinkName, uniqueWriterIdentity: arg_uniqueWrit
erIdentity).then(unittest.expectAsync(((api.LogSink response) { | 2826 res.update(arg_request, arg_sinkName, uniqueWriterIdentity: arg_uniqueWrit
erIdentity).then(unittest.expectAsync(((api.LogSink response) { |
2825 checkLogSink(response); | 2827 checkLogSink(response); |
2826 }))); | 2828 }))); |
2827 }); | 2829 }); |
2828 | 2830 |
2829 }); | 2831 }); |
2830 | 2832 |
2831 | 2833 |
2832 } | 2834 } |
2833 | 2835 |
OLD | NEW |