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 buildUnnamed275() { | 139 buildUnnamed250() { |
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 checkUnnamed275(core.List<core.String> o) { | 146 checkUnnamed250(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 buildUnnamed276() { | 152 buildUnnamed251() { |
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 checkUnnamed276(core.List<core.String> o) { | 159 checkUnnamed251(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 = buildUnnamed275(); | 174 o.projectIds = buildUnnamed250(); |
175 o.resourceNames = buildUnnamed276(); | 175 o.resourceNames = buildUnnamed251(); |
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 checkUnnamed275(o.projectIds); | 188 checkUnnamed250(o.projectIds); |
189 checkUnnamed276(o.resourceNames); | 189 checkUnnamed251(o.resourceNames); |
190 } | 190 } |
191 buildCounterListLogEntriesRequest--; | 191 buildCounterListLogEntriesRequest--; |
192 } | 192 } |
193 | 193 |
194 buildUnnamed277() { | 194 buildUnnamed252() { |
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 checkUnnamed277(core.List<api.LogEntry> o) { | 201 checkUnnamed252(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 = buildUnnamed277(); | 212 o.entries = buildUnnamed252(); |
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 checkUnnamed277(o.entries); | 222 checkUnnamed252(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 buildUnnamed278() { | 228 buildUnnamed253() { |
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 checkUnnamed278(core.List<api.LogMetric> o) { | 235 checkUnnamed253(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 = buildUnnamed278(); | 246 o.metrics = buildUnnamed253(); |
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 checkUnnamed278(o.metrics); | 256 checkUnnamed253(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 buildUnnamed279() { | 262 buildUnnamed254() { |
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 checkUnnamed279(core.List<core.String> o) { | 269 checkUnnamed254(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 = buildUnnamed279(); | 280 o.logNames = buildUnnamed254(); |
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 checkUnnamed279(o.logNames); | 290 checkUnnamed254(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 buildUnnamed280() { | 296 buildUnnamed255() { |
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 checkUnnamed280(core.List<api.MonitoredResourceDescriptor> o) { | 303 checkUnnamed255(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 = buildUnnamed280(); | 315 o.resourceDescriptors = buildUnnamed255(); |
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 checkUnnamed280(o.resourceDescriptors); | 325 checkUnnamed255(o.resourceDescriptors); |
326 } | 326 } |
327 buildCounterListMonitoredResourceDescriptorsResponse--; | 327 buildCounterListMonitoredResourceDescriptorsResponse--; |
328 } | 328 } |
329 | 329 |
330 buildUnnamed281() { | 330 buildUnnamed256() { |
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 checkUnnamed281(core.List<api.LogSink> o) { | 337 checkUnnamed256(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 = buildUnnamed281(); | 349 o.sinks = buildUnnamed256(); |
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 checkUnnamed281(o.sinks); | 359 checkUnnamed256(o.sinks); |
360 } | 360 } |
361 buildCounterListSinksResponse--; | 361 buildCounterListSinksResponse--; |
362 } | 362 } |
363 | 363 |
364 buildUnnamed282() { | 364 buildUnnamed257() { |
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 checkUnnamed282(core.Map<core.String, core.Object> o) { | 371 checkUnnamed257(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 buildUnnamed283() { | 377 buildUnnamed258() { |
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 checkUnnamed283(core.Map<core.String, core.String> o) { | 384 checkUnnamed258(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 buildUnnamed284() { | 390 buildUnnamed259() { |
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 checkUnnamed284(core.Map<core.String, core.Object> o) { | 397 checkUnnamed259(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 = buildUnnamed282(); | 410 o.jsonPayload = buildUnnamed257(); |
411 o.labels = buildUnnamed283(); | 411 o.labels = buildUnnamed258(); |
412 o.logName = "foo"; | 412 o.logName = "foo"; |
413 o.operation = buildLogEntryOperation(); | 413 o.operation = buildLogEntryOperation(); |
414 o.protoPayload = buildUnnamed284(); | 414 o.protoPayload = buildUnnamed259(); |
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 checkUnnamed282(o.jsonPayload); | 432 checkUnnamed257(o.jsonPayload); |
433 checkUnnamed283(o.labels); | 433 checkUnnamed258(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 checkUnnamed284(o.protoPayload); | 436 checkUnnamed259(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 buildUnnamed285() { | 579 buildUnnamed260() { |
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 checkUnnamed285(core.Map<core.String, core.String> o) { | 586 checkUnnamed260(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 = buildUnnamed285(); | 597 o.labels = buildUnnamed260(); |
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 checkUnnamed285(o.labels); | 607 checkUnnamed260(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 buildUnnamed286() { | 613 buildUnnamed261() { |
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 checkUnnamed286(core.List<api.LabelDescriptor> o) { | 620 checkUnnamed261(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 = buildUnnamed286(); | 633 o.labels = buildUnnamed261(); |
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 checkUnnamed286(o.labels); | 646 checkUnnamed261(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 buildUnnamed287() { | 653 buildUnnamed262() { |
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 checkUnnamed287(core.List<api.LogLine> o) { | 660 checkUnnamed262(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 buildUnnamed288() { | 666 buildUnnamed263() { |
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 checkUnnamed288(core.List<api.SourceReference> o) { | 673 checkUnnamed263(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 = buildUnnamed287(); | 696 o.line = buildUnnamed262(); |
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 = buildUnnamed288(); | 706 o.sourceReference = buildUnnamed263(); |
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 checkUnnamed287(o.line); | 736 checkUnnamed262(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 checkUnnamed288(o.sourceReference); | 746 checkUnnamed263(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 buildUnnamed289() { | 804 buildUnnamed264() { |
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 checkUnnamed289(core.List<api.LogEntry> o) { | 811 checkUnnamed264(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 buildUnnamed290() { | 817 buildUnnamed265() { |
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 checkUnnamed290(core.Map<core.String, core.String> o) { | 824 checkUnnamed265(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 = buildUnnamed289(); | 835 o.entries = buildUnnamed264(); |
836 o.labels = buildUnnamed290(); | 836 o.labels = buildUnnamed265(); |
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 checkUnnamed289(o.entries); | 848 checkUnnamed264(o.entries); |
849 checkUnnamed290(o.labels); | 849 checkUnnamed265(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 255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1115 res.delete(arg_logName).then(unittest.expectAsync1(((api.Empty response) { | 1115 res.delete(arg_logName).then(unittest.expectAsync1(((api.Empty response) { |
1116 checkEmpty(response); | 1116 checkEmpty(response); |
1117 }))); | 1117 }))); |
1118 }); | 1118 }); |
1119 | 1119 |
1120 unittest.test("method--list", () { | 1120 unittest.test("method--list", () { |
1121 | 1121 |
1122 var mock = new HttpServerMock(); | 1122 var mock = new HttpServerMock(); |
1123 api.BillingAccountsLogsResourceApi res = new api.LoggingApi(mock).billingA
ccounts.logs; | 1123 api.BillingAccountsLogsResourceApi res = new api.LoggingApi(mock).billingA
ccounts.logs; |
1124 var arg_parent = "foo"; | 1124 var arg_parent = "foo"; |
| 1125 var arg_pageSize = 42; |
1125 var arg_pageToken = "foo"; | 1126 var arg_pageToken = "foo"; |
1126 var arg_pageSize = 42; | |
1127 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 1127 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
1128 var path = (req.url).path; | 1128 var path = (req.url).path; |
1129 var pathOffset = 0; | 1129 var pathOffset = 0; |
1130 var index; | 1130 var index; |
1131 var subPart; | 1131 var subPart; |
1132 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1132 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
1133 pathOffset += 1; | 1133 pathOffset += 1; |
1134 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v2/")); | 1134 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v2/")); |
1135 pathOffset += 3; | 1135 pathOffset += 3; |
1136 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; | 1136 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; |
1137 | 1137 |
1138 var query = (req.url).query; | 1138 var query = (req.url).query; |
1139 var queryOffset = 0; | 1139 var queryOffset = 0; |
1140 var queryMap = {}; | 1140 var queryMap = {}; |
1141 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 1141 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
1142 parseBool(n) { | 1142 parseBool(n) { |
1143 if (n == "true") return true; | 1143 if (n == "true") return true; |
1144 if (n == "false") return false; | 1144 if (n == "false") return false; |
1145 if (n == null) return null; | 1145 if (n == null) return null; |
1146 throw new core.ArgumentError("Invalid boolean: $n"); | 1146 throw new core.ArgumentError("Invalid boolean: $n"); |
1147 } | 1147 } |
1148 if (query.length > 0) { | 1148 if (query.length > 0) { |
1149 for (var part in query.split("&")) { | 1149 for (var part in query.split("&")) { |
1150 var keyvalue = part.split("="); | 1150 var keyvalue = part.split("="); |
1151 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 1151 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
1152 } | 1152 } |
1153 } | 1153 } |
| 1154 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ
als(arg_pageSize)); |
1154 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | 1155 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); |
1155 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ
als(arg_pageSize)); | |
1156 | 1156 |
1157 | 1157 |
1158 var h = { | 1158 var h = { |
1159 "content-type" : "application/json; charset=utf-8", | 1159 "content-type" : "application/json; charset=utf-8", |
1160 }; | 1160 }; |
1161 var resp = convert.JSON.encode(buildListLogsResponse()); | 1161 var resp = convert.JSON.encode(buildListLogsResponse()); |
1162 return new async.Future.value(stringResponse(200, h, resp)); | 1162 return new async.Future.value(stringResponse(200, h, resp)); |
1163 }), true); | 1163 }), true); |
1164 res.list(arg_parent, pageToken: arg_pageToken, pageSize: arg_pageSize).the
n(unittest.expectAsync1(((api.ListLogsResponse response) { | 1164 res.list(arg_parent, pageSize: arg_pageSize, pageToken: arg_pageToken).the
n(unittest.expectAsync1(((api.ListLogsResponse response) { |
1165 checkListLogsResponse(response); | 1165 checkListLogsResponse(response); |
1166 }))); | 1166 }))); |
1167 }); | 1167 }); |
1168 | 1168 |
1169 }); | 1169 }); |
1170 | 1170 |
1171 | 1171 |
1172 unittest.group("resource-BillingAccountsSinksResourceApi", () { | 1172 unittest.group("resource-BillingAccountsSinksResourceApi", () { |
1173 unittest.test("method--create", () { | 1173 unittest.test("method--create", () { |
1174 | 1174 |
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1309 res.get(arg_sinkName).then(unittest.expectAsync1(((api.LogSink response) { | 1309 res.get(arg_sinkName).then(unittest.expectAsync1(((api.LogSink response) { |
1310 checkLogSink(response); | 1310 checkLogSink(response); |
1311 }))); | 1311 }))); |
1312 }); | 1312 }); |
1313 | 1313 |
1314 unittest.test("method--list", () { | 1314 unittest.test("method--list", () { |
1315 | 1315 |
1316 var mock = new HttpServerMock(); | 1316 var mock = new HttpServerMock(); |
1317 api.BillingAccountsSinksResourceApi res = new api.LoggingApi(mock).billing
Accounts.sinks; | 1317 api.BillingAccountsSinksResourceApi res = new api.LoggingApi(mock).billing
Accounts.sinks; |
1318 var arg_parent = "foo"; | 1318 var arg_parent = "foo"; |
| 1319 var arg_pageSize = 42; |
1319 var arg_pageToken = "foo"; | 1320 var arg_pageToken = "foo"; |
1320 var arg_pageSize = 42; | |
1321 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 1321 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
1322 var path = (req.url).path; | 1322 var path = (req.url).path; |
1323 var pathOffset = 0; | 1323 var pathOffset = 0; |
1324 var index; | 1324 var index; |
1325 var subPart; | 1325 var subPart; |
1326 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1326 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
1327 pathOffset += 1; | 1327 pathOffset += 1; |
1328 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v2/")); | 1328 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v2/")); |
1329 pathOffset += 3; | 1329 pathOffset += 3; |
1330 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; | 1330 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; |
1331 | 1331 |
1332 var query = (req.url).query; | 1332 var query = (req.url).query; |
1333 var queryOffset = 0; | 1333 var queryOffset = 0; |
1334 var queryMap = {}; | 1334 var queryMap = {}; |
1335 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 1335 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
1336 parseBool(n) { | 1336 parseBool(n) { |
1337 if (n == "true") return true; | 1337 if (n == "true") return true; |
1338 if (n == "false") return false; | 1338 if (n == "false") return false; |
1339 if (n == null) return null; | 1339 if (n == null) return null; |
1340 throw new core.ArgumentError("Invalid boolean: $n"); | 1340 throw new core.ArgumentError("Invalid boolean: $n"); |
1341 } | 1341 } |
1342 if (query.length > 0) { | 1342 if (query.length > 0) { |
1343 for (var part in query.split("&")) { | 1343 for (var part in query.split("&")) { |
1344 var keyvalue = part.split("="); | 1344 var keyvalue = part.split("="); |
1345 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 1345 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
1346 } | 1346 } |
1347 } | 1347 } |
| 1348 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ
als(arg_pageSize)); |
1348 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | 1349 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); |
1349 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ
als(arg_pageSize)); | |
1350 | 1350 |
1351 | 1351 |
1352 var h = { | 1352 var h = { |
1353 "content-type" : "application/json; charset=utf-8", | 1353 "content-type" : "application/json; charset=utf-8", |
1354 }; | 1354 }; |
1355 var resp = convert.JSON.encode(buildListSinksResponse()); | 1355 var resp = convert.JSON.encode(buildListSinksResponse()); |
1356 return new async.Future.value(stringResponse(200, h, resp)); | 1356 return new async.Future.value(stringResponse(200, h, resp)); |
1357 }), true); | 1357 }), true); |
1358 res.list(arg_parent, pageToken: arg_pageToken, pageSize: arg_pageSize).the
n(unittest.expectAsync1(((api.ListSinksResponse response) { | 1358 res.list(arg_parent, pageSize: arg_pageSize, pageToken: arg_pageToken).the
n(unittest.expectAsync1(((api.ListSinksResponse response) { |
1359 checkListSinksResponse(response); | 1359 checkListSinksResponse(response); |
1360 }))); | 1360 }))); |
1361 }); | 1361 }); |
1362 | 1362 |
1363 unittest.test("method--update", () { | 1363 unittest.test("method--update", () { |
1364 | 1364 |
1365 var mock = new HttpServerMock(); | 1365 var mock = new HttpServerMock(); |
1366 api.BillingAccountsSinksResourceApi res = new api.LoggingApi(mock).billing
Accounts.sinks; | 1366 api.BillingAccountsSinksResourceApi res = new api.LoggingApi(mock).billing
Accounts.sinks; |
1367 var arg_request = buildLogSink(); | 1367 var arg_request = buildLogSink(); |
1368 var arg_sinkName = "foo"; | 1368 var arg_sinkName = "foo"; |
(...skipping 381 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1750 res.get(arg_sinkName).then(unittest.expectAsync1(((api.LogSink response) { | 1750 res.get(arg_sinkName).then(unittest.expectAsync1(((api.LogSink response) { |
1751 checkLogSink(response); | 1751 checkLogSink(response); |
1752 }))); | 1752 }))); |
1753 }); | 1753 }); |
1754 | 1754 |
1755 unittest.test("method--list", () { | 1755 unittest.test("method--list", () { |
1756 | 1756 |
1757 var mock = new HttpServerMock(); | 1757 var mock = new HttpServerMock(); |
1758 api.FoldersSinksResourceApi res = new api.LoggingApi(mock).folders.sinks; | 1758 api.FoldersSinksResourceApi res = new api.LoggingApi(mock).folders.sinks; |
1759 var arg_parent = "foo"; | 1759 var arg_parent = "foo"; |
| 1760 var arg_pageSize = 42; |
1760 var arg_pageToken = "foo"; | 1761 var arg_pageToken = "foo"; |
1761 var arg_pageSize = 42; | |
1762 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 1762 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
1763 var path = (req.url).path; | 1763 var path = (req.url).path; |
1764 var pathOffset = 0; | 1764 var pathOffset = 0; |
1765 var index; | 1765 var index; |
1766 var subPart; | 1766 var subPart; |
1767 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1767 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
1768 pathOffset += 1; | 1768 pathOffset += 1; |
1769 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v2/")); | 1769 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v2/")); |
1770 pathOffset += 3; | 1770 pathOffset += 3; |
1771 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; | 1771 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; |
1772 | 1772 |
1773 var query = (req.url).query; | 1773 var query = (req.url).query; |
1774 var queryOffset = 0; | 1774 var queryOffset = 0; |
1775 var queryMap = {}; | 1775 var queryMap = {}; |
1776 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 1776 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
1777 parseBool(n) { | 1777 parseBool(n) { |
1778 if (n == "true") return true; | 1778 if (n == "true") return true; |
1779 if (n == "false") return false; | 1779 if (n == "false") return false; |
1780 if (n == null) return null; | 1780 if (n == null) return null; |
1781 throw new core.ArgumentError("Invalid boolean: $n"); | 1781 throw new core.ArgumentError("Invalid boolean: $n"); |
1782 } | 1782 } |
1783 if (query.length > 0) { | 1783 if (query.length > 0) { |
1784 for (var part in query.split("&")) { | 1784 for (var part in query.split("&")) { |
1785 var keyvalue = part.split("="); | 1785 var keyvalue = part.split("="); |
1786 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 1786 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
1787 } | 1787 } |
1788 } | 1788 } |
| 1789 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ
als(arg_pageSize)); |
1789 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | 1790 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); |
1790 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ
als(arg_pageSize)); | |
1791 | 1791 |
1792 | 1792 |
1793 var h = { | 1793 var h = { |
1794 "content-type" : "application/json; charset=utf-8", | 1794 "content-type" : "application/json; charset=utf-8", |
1795 }; | 1795 }; |
1796 var resp = convert.JSON.encode(buildListSinksResponse()); | 1796 var resp = convert.JSON.encode(buildListSinksResponse()); |
1797 return new async.Future.value(stringResponse(200, h, resp)); | 1797 return new async.Future.value(stringResponse(200, h, resp)); |
1798 }), true); | 1798 }), true); |
1799 res.list(arg_parent, pageToken: arg_pageToken, pageSize: arg_pageSize).the
n(unittest.expectAsync1(((api.ListSinksResponse response) { | 1799 res.list(arg_parent, pageSize: arg_pageSize, pageToken: arg_pageToken).the
n(unittest.expectAsync1(((api.ListSinksResponse response) { |
1800 checkListSinksResponse(response); | 1800 checkListSinksResponse(response); |
1801 }))); | 1801 }))); |
1802 }); | 1802 }); |
1803 | 1803 |
1804 unittest.test("method--update", () { | 1804 unittest.test("method--update", () { |
1805 | 1805 |
1806 var mock = new HttpServerMock(); | 1806 var mock = new HttpServerMock(); |
1807 api.FoldersSinksResourceApi res = new api.LoggingApi(mock).folders.sinks; | 1807 api.FoldersSinksResourceApi res = new api.LoggingApi(mock).folders.sinks; |
1808 var arg_request = buildLogSink(); | 1808 var arg_request = buildLogSink(); |
1809 var arg_sinkName = "foo"; | 1809 var arg_sinkName = "foo"; |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1853 }); | 1853 }); |
1854 | 1854 |
1855 }); | 1855 }); |
1856 | 1856 |
1857 | 1857 |
1858 unittest.group("resource-MonitoredResourceDescriptorsResourceApi", () { | 1858 unittest.group("resource-MonitoredResourceDescriptorsResourceApi", () { |
1859 unittest.test("method--list", () { | 1859 unittest.test("method--list", () { |
1860 | 1860 |
1861 var mock = new HttpServerMock(); | 1861 var mock = new HttpServerMock(); |
1862 api.MonitoredResourceDescriptorsResourceApi res = new api.LoggingApi(mock)
.monitoredResourceDescriptors; | 1862 api.MonitoredResourceDescriptorsResourceApi res = new api.LoggingApi(mock)
.monitoredResourceDescriptors; |
| 1863 var arg_pageSize = 42; |
1863 var arg_pageToken = "foo"; | 1864 var arg_pageToken = "foo"; |
1864 var arg_pageSize = 42; | |
1865 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 1865 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
1866 var path = (req.url).path; | 1866 var path = (req.url).path; |
1867 var pathOffset = 0; | 1867 var pathOffset = 0; |
1868 var index; | 1868 var index; |
1869 var subPart; | 1869 var subPart; |
1870 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1870 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
1871 pathOffset += 1; | 1871 pathOffset += 1; |
1872 unittest.expect(path.substring(pathOffset, pathOffset + 31), unittest.eq
uals("v2/monitoredResourceDescriptors")); | 1872 unittest.expect(path.substring(pathOffset, pathOffset + 31), unittest.eq
uals("v2/monitoredResourceDescriptors")); |
1873 pathOffset += 31; | 1873 pathOffset += 31; |
1874 | 1874 |
1875 var query = (req.url).query; | 1875 var query = (req.url).query; |
1876 var queryOffset = 0; | 1876 var queryOffset = 0; |
1877 var queryMap = {}; | 1877 var queryMap = {}; |
1878 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 1878 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
1879 parseBool(n) { | 1879 parseBool(n) { |
1880 if (n == "true") return true; | 1880 if (n == "true") return true; |
1881 if (n == "false") return false; | 1881 if (n == "false") return false; |
1882 if (n == null) return null; | 1882 if (n == null) return null; |
1883 throw new core.ArgumentError("Invalid boolean: $n"); | 1883 throw new core.ArgumentError("Invalid boolean: $n"); |
1884 } | 1884 } |
1885 if (query.length > 0) { | 1885 if (query.length > 0) { |
1886 for (var part in query.split("&")) { | 1886 for (var part in query.split("&")) { |
1887 var keyvalue = part.split("="); | 1887 var keyvalue = part.split("="); |
1888 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 1888 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
1889 } | 1889 } |
1890 } | 1890 } |
| 1891 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ
als(arg_pageSize)); |
1891 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | 1892 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); |
1892 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ
als(arg_pageSize)); | |
1893 | 1893 |
1894 | 1894 |
1895 var h = { | 1895 var h = { |
1896 "content-type" : "application/json; charset=utf-8", | 1896 "content-type" : "application/json; charset=utf-8", |
1897 }; | 1897 }; |
1898 var resp = convert.JSON.encode(buildListMonitoredResourceDescriptorsResp
onse()); | 1898 var resp = convert.JSON.encode(buildListMonitoredResourceDescriptorsResp
onse()); |
1899 return new async.Future.value(stringResponse(200, h, resp)); | 1899 return new async.Future.value(stringResponse(200, h, resp)); |
1900 }), true); | 1900 }), true); |
1901 res.list(pageToken: arg_pageToken, pageSize: arg_pageSize).then(unittest.e
xpectAsync1(((api.ListMonitoredResourceDescriptorsResponse response) { | 1901 res.list(pageSize: arg_pageSize, pageToken: arg_pageToken).then(unittest.e
xpectAsync1(((api.ListMonitoredResourceDescriptorsResponse response) { |
1902 checkListMonitoredResourceDescriptorsResponse(response); | 1902 checkListMonitoredResourceDescriptorsResponse(response); |
1903 }))); | 1903 }))); |
1904 }); | 1904 }); |
1905 | 1905 |
1906 }); | 1906 }); |
1907 | 1907 |
1908 | 1908 |
1909 unittest.group("resource-OrganizationsLogsResourceApi", () { | 1909 unittest.group("resource-OrganizationsLogsResourceApi", () { |
1910 unittest.test("method--delete", () { | 1910 unittest.test("method--delete", () { |
1911 | 1911 |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1950 res.delete(arg_logName).then(unittest.expectAsync1(((api.Empty response) { | 1950 res.delete(arg_logName).then(unittest.expectAsync1(((api.Empty response) { |
1951 checkEmpty(response); | 1951 checkEmpty(response); |
1952 }))); | 1952 }))); |
1953 }); | 1953 }); |
1954 | 1954 |
1955 unittest.test("method--list", () { | 1955 unittest.test("method--list", () { |
1956 | 1956 |
1957 var mock = new HttpServerMock(); | 1957 var mock = new HttpServerMock(); |
1958 api.OrganizationsLogsResourceApi res = new api.LoggingApi(mock).organizati
ons.logs; | 1958 api.OrganizationsLogsResourceApi res = new api.LoggingApi(mock).organizati
ons.logs; |
1959 var arg_parent = "foo"; | 1959 var arg_parent = "foo"; |
| 1960 var arg_pageToken = "foo"; |
1960 var arg_pageSize = 42; | 1961 var arg_pageSize = 42; |
1961 var arg_pageToken = "foo"; | |
1962 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 1962 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
1963 var path = (req.url).path; | 1963 var path = (req.url).path; |
1964 var pathOffset = 0; | 1964 var pathOffset = 0; |
1965 var index; | 1965 var index; |
1966 var subPart; | 1966 var subPart; |
1967 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1967 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
1968 pathOffset += 1; | 1968 pathOffset += 1; |
1969 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v2/")); | 1969 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v2/")); |
1970 pathOffset += 3; | 1970 pathOffset += 3; |
1971 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; | 1971 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; |
1972 | 1972 |
1973 var query = (req.url).query; | 1973 var query = (req.url).query; |
1974 var queryOffset = 0; | 1974 var queryOffset = 0; |
1975 var queryMap = {}; | 1975 var queryMap = {}; |
1976 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 1976 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
1977 parseBool(n) { | 1977 parseBool(n) { |
1978 if (n == "true") return true; | 1978 if (n == "true") return true; |
1979 if (n == "false") return false; | 1979 if (n == "false") return false; |
1980 if (n == null) return null; | 1980 if (n == null) return null; |
1981 throw new core.ArgumentError("Invalid boolean: $n"); | 1981 throw new core.ArgumentError("Invalid boolean: $n"); |
1982 } | 1982 } |
1983 if (query.length > 0) { | 1983 if (query.length > 0) { |
1984 for (var part in query.split("&")) { | 1984 for (var part in query.split("&")) { |
1985 var keyvalue = part.split("="); | 1985 var keyvalue = part.split("="); |
1986 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 1986 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
1987 } | 1987 } |
1988 } | 1988 } |
| 1989 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); |
1989 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ
als(arg_pageSize)); | 1990 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ
als(arg_pageSize)); |
1990 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | |
1991 | 1991 |
1992 | 1992 |
1993 var h = { | 1993 var h = { |
1994 "content-type" : "application/json; charset=utf-8", | 1994 "content-type" : "application/json; charset=utf-8", |
1995 }; | 1995 }; |
1996 var resp = convert.JSON.encode(buildListLogsResponse()); | 1996 var resp = convert.JSON.encode(buildListLogsResponse()); |
1997 return new async.Future.value(stringResponse(200, h, resp)); | 1997 return new async.Future.value(stringResponse(200, h, resp)); |
1998 }), true); | 1998 }), true); |
1999 res.list(arg_parent, pageSize: arg_pageSize, pageToken: arg_pageToken).the
n(unittest.expectAsync1(((api.ListLogsResponse response) { | 1999 res.list(arg_parent, pageToken: arg_pageToken, pageSize: arg_pageSize).the
n(unittest.expectAsync1(((api.ListLogsResponse response) { |
2000 checkListLogsResponse(response); | 2000 checkListLogsResponse(response); |
2001 }))); | 2001 }))); |
2002 }); | 2002 }); |
2003 | 2003 |
2004 }); | 2004 }); |
2005 | 2005 |
2006 | 2006 |
2007 unittest.group("resource-OrganizationsSinksResourceApi", () { | 2007 unittest.group("resource-OrganizationsSinksResourceApi", () { |
2008 unittest.test("method--create", () { | 2008 unittest.test("method--create", () { |
2009 | 2009 |
(...skipping 818 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 |