| 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 buildUnnamed179() { | 139 buildUnnamed200() { |
| 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 checkUnnamed179(core.List<core.String> o) { | 146 checkUnnamed200(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 buildUnnamed180() { | 152 buildUnnamed201() { |
| 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 checkUnnamed180(core.List<core.String> o) { | 159 checkUnnamed201(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 = buildUnnamed179(); | 174 o.projectIds = buildUnnamed200(); |
| 175 o.resourceNames = buildUnnamed180(); | 175 o.resourceNames = buildUnnamed201(); |
| 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 checkUnnamed179(o.projectIds); | 188 checkUnnamed200(o.projectIds); |
| 189 checkUnnamed180(o.resourceNames); | 189 checkUnnamed201(o.resourceNames); |
| 190 } | 190 } |
| 191 buildCounterListLogEntriesRequest--; | 191 buildCounterListLogEntriesRequest--; |
| 192 } | 192 } |
| 193 | 193 |
| 194 buildUnnamed181() { | 194 buildUnnamed202() { |
| 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 checkUnnamed181(core.List<api.LogEntry> o) { | 201 checkUnnamed202(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 = buildUnnamed181(); | 212 o.entries = buildUnnamed202(); |
| 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 checkUnnamed181(o.entries); | 222 checkUnnamed202(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 buildUnnamed182() { | 228 buildUnnamed203() { |
| 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 checkUnnamed182(core.List<api.LogMetric> o) { | 235 checkUnnamed203(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 = buildUnnamed182(); | 246 o.metrics = buildUnnamed203(); |
| 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 checkUnnamed182(o.metrics); | 256 checkUnnamed203(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 buildUnnamed183() { | 262 buildUnnamed204() { |
| 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 checkUnnamed183(core.List<core.String> o) { | 269 checkUnnamed204(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 = buildUnnamed183(); | 280 o.logNames = buildUnnamed204(); |
| 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 checkUnnamed183(o.logNames); | 290 checkUnnamed204(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 buildUnnamed184() { | 296 buildUnnamed205() { |
| 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 checkUnnamed184(core.List<api.MonitoredResourceDescriptor> o) { | 303 checkUnnamed205(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 = buildUnnamed184(); | 315 o.resourceDescriptors = buildUnnamed205(); |
| 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 checkUnnamed184(o.resourceDescriptors); | 325 checkUnnamed205(o.resourceDescriptors); |
| 326 } | 326 } |
| 327 buildCounterListMonitoredResourceDescriptorsResponse--; | 327 buildCounterListMonitoredResourceDescriptorsResponse--; |
| 328 } | 328 } |
| 329 | 329 |
| 330 buildUnnamed185() { | 330 buildUnnamed206() { |
| 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 checkUnnamed185(core.List<api.LogSink> o) { | 337 checkUnnamed206(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 = buildUnnamed185(); | 349 o.sinks = buildUnnamed206(); |
| 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 checkUnnamed185(o.sinks); | 359 checkUnnamed206(o.sinks); |
| 360 } | 360 } |
| 361 buildCounterListSinksResponse--; | 361 buildCounterListSinksResponse--; |
| 362 } | 362 } |
| 363 | 363 |
| 364 buildUnnamed186() { | 364 buildUnnamed207() { |
| 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 checkUnnamed186(core.Map<core.String, core.Object> o) { | 371 checkUnnamed207(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 buildUnnamed187() { | 377 buildUnnamed208() { |
| 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 checkUnnamed187(core.Map<core.String, core.String> o) { | 384 checkUnnamed208(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 buildUnnamed188() { | 390 buildUnnamed209() { |
| 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 checkUnnamed188(core.Map<core.String, core.Object> o) { | 397 checkUnnamed209(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 = buildUnnamed186(); | 410 o.jsonPayload = buildUnnamed207(); |
| 411 o.labels = buildUnnamed187(); | 411 o.labels = buildUnnamed208(); |
| 412 o.logName = "foo"; | 412 o.logName = "foo"; |
| 413 o.operation = buildLogEntryOperation(); | 413 o.operation = buildLogEntryOperation(); |
| 414 o.protoPayload = buildUnnamed188(); | 414 o.protoPayload = buildUnnamed209(); |
| 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 checkUnnamed186(o.jsonPayload); | 431 checkUnnamed207(o.jsonPayload); |
| 432 checkUnnamed187(o.labels); | 432 checkUnnamed208(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 checkUnnamed188(o.protoPayload); | 435 checkUnnamed209(o.protoPayload); |
| 436 checkMonitoredResource(o.resource); | 436 checkMonitoredResource(o.resource); |
| 437 unittest.expect(o.severity, unittest.equals('foo')); | 437 unittest.expect(o.severity, unittest.equals('foo')); |
| 438 checkLogEntrySourceLocation(o.sourceLocation); | 438 checkLogEntrySourceLocation(o.sourceLocation); |
| 439 unittest.expect(o.textPayload, unittest.equals('foo')); | 439 unittest.expect(o.textPayload, unittest.equals('foo')); |
| 440 unittest.expect(o.timestamp, unittest.equals('foo')); | 440 unittest.expect(o.timestamp, unittest.equals('foo')); |
| 441 unittest.expect(o.trace, unittest.equals('foo')); | 441 unittest.expect(o.trace, unittest.equals('foo')); |
| 442 } | 442 } |
| 443 buildCounterLogEntry--; | 443 buildCounterLogEntry--; |
| 444 } | 444 } |
| 445 | 445 |
| (...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 565 unittest.expect(o.endTime, unittest.equals('foo')); | 565 unittest.expect(o.endTime, unittest.equals('foo')); |
| 566 unittest.expect(o.filter, unittest.equals('foo')); | 566 unittest.expect(o.filter, unittest.equals('foo')); |
| 567 unittest.expect(o.name, unittest.equals('foo')); | 567 unittest.expect(o.name, unittest.equals('foo')); |
| 568 unittest.expect(o.outputVersionFormat, unittest.equals('foo')); | 568 unittest.expect(o.outputVersionFormat, unittest.equals('foo')); |
| 569 unittest.expect(o.startTime, unittest.equals('foo')); | 569 unittest.expect(o.startTime, unittest.equals('foo')); |
| 570 unittest.expect(o.writerIdentity, unittest.equals('foo')); | 570 unittest.expect(o.writerIdentity, unittest.equals('foo')); |
| 571 } | 571 } |
| 572 buildCounterLogSink--; | 572 buildCounterLogSink--; |
| 573 } | 573 } |
| 574 | 574 |
| 575 buildUnnamed189() { | 575 buildUnnamed210() { |
| 576 var o = new core.Map<core.String, core.String>(); | 576 var o = new core.Map<core.String, core.String>(); |
| 577 o["x"] = "foo"; | 577 o["x"] = "foo"; |
| 578 o["y"] = "foo"; | 578 o["y"] = "foo"; |
| 579 return o; | 579 return o; |
| 580 } | 580 } |
| 581 | 581 |
| 582 checkUnnamed189(core.Map<core.String, core.String> o) { | 582 checkUnnamed210(core.Map<core.String, core.String> o) { |
| 583 unittest.expect(o, unittest.hasLength(2)); | 583 unittest.expect(o, unittest.hasLength(2)); |
| 584 unittest.expect(o["x"], unittest.equals('foo')); | 584 unittest.expect(o["x"], unittest.equals('foo')); |
| 585 unittest.expect(o["y"], unittest.equals('foo')); | 585 unittest.expect(o["y"], unittest.equals('foo')); |
| 586 } | 586 } |
| 587 | 587 |
| 588 core.int buildCounterMonitoredResource = 0; | 588 core.int buildCounterMonitoredResource = 0; |
| 589 buildMonitoredResource() { | 589 buildMonitoredResource() { |
| 590 var o = new api.MonitoredResource(); | 590 var o = new api.MonitoredResource(); |
| 591 buildCounterMonitoredResource++; | 591 buildCounterMonitoredResource++; |
| 592 if (buildCounterMonitoredResource < 3) { | 592 if (buildCounterMonitoredResource < 3) { |
| 593 o.labels = buildUnnamed189(); | 593 o.labels = buildUnnamed210(); |
| 594 o.type = "foo"; | 594 o.type = "foo"; |
| 595 } | 595 } |
| 596 buildCounterMonitoredResource--; | 596 buildCounterMonitoredResource--; |
| 597 return o; | 597 return o; |
| 598 } | 598 } |
| 599 | 599 |
| 600 checkMonitoredResource(api.MonitoredResource o) { | 600 checkMonitoredResource(api.MonitoredResource o) { |
| 601 buildCounterMonitoredResource++; | 601 buildCounterMonitoredResource++; |
| 602 if (buildCounterMonitoredResource < 3) { | 602 if (buildCounterMonitoredResource < 3) { |
| 603 checkUnnamed189(o.labels); | 603 checkUnnamed210(o.labels); |
| 604 unittest.expect(o.type, unittest.equals('foo')); | 604 unittest.expect(o.type, unittest.equals('foo')); |
| 605 } | 605 } |
| 606 buildCounterMonitoredResource--; | 606 buildCounterMonitoredResource--; |
| 607 } | 607 } |
| 608 | 608 |
| 609 buildUnnamed190() { | 609 buildUnnamed211() { |
| 610 var o = new core.List<api.LabelDescriptor>(); | 610 var o = new core.List<api.LabelDescriptor>(); |
| 611 o.add(buildLabelDescriptor()); | 611 o.add(buildLabelDescriptor()); |
| 612 o.add(buildLabelDescriptor()); | 612 o.add(buildLabelDescriptor()); |
| 613 return o; | 613 return o; |
| 614 } | 614 } |
| 615 | 615 |
| 616 checkUnnamed190(core.List<api.LabelDescriptor> o) { | 616 checkUnnamed211(core.List<api.LabelDescriptor> o) { |
| 617 unittest.expect(o, unittest.hasLength(2)); | 617 unittest.expect(o, unittest.hasLength(2)); |
| 618 checkLabelDescriptor(o[0]); | 618 checkLabelDescriptor(o[0]); |
| 619 checkLabelDescriptor(o[1]); | 619 checkLabelDescriptor(o[1]); |
| 620 } | 620 } |
| 621 | 621 |
| 622 core.int buildCounterMonitoredResourceDescriptor = 0; | 622 core.int buildCounterMonitoredResourceDescriptor = 0; |
| 623 buildMonitoredResourceDescriptor() { | 623 buildMonitoredResourceDescriptor() { |
| 624 var o = new api.MonitoredResourceDescriptor(); | 624 var o = new api.MonitoredResourceDescriptor(); |
| 625 buildCounterMonitoredResourceDescriptor++; | 625 buildCounterMonitoredResourceDescriptor++; |
| 626 if (buildCounterMonitoredResourceDescriptor < 3) { | 626 if (buildCounterMonitoredResourceDescriptor < 3) { |
| 627 o.description = "foo"; | 627 o.description = "foo"; |
| 628 o.displayName = "foo"; | 628 o.displayName = "foo"; |
| 629 o.labels = buildUnnamed190(); | 629 o.labels = buildUnnamed211(); |
| 630 o.name = "foo"; | 630 o.name = "foo"; |
| 631 o.type = "foo"; | 631 o.type = "foo"; |
| 632 } | 632 } |
| 633 buildCounterMonitoredResourceDescriptor--; | 633 buildCounterMonitoredResourceDescriptor--; |
| 634 return o; | 634 return o; |
| 635 } | 635 } |
| 636 | 636 |
| 637 checkMonitoredResourceDescriptor(api.MonitoredResourceDescriptor o) { | 637 checkMonitoredResourceDescriptor(api.MonitoredResourceDescriptor o) { |
| 638 buildCounterMonitoredResourceDescriptor++; | 638 buildCounterMonitoredResourceDescriptor++; |
| 639 if (buildCounterMonitoredResourceDescriptor < 3) { | 639 if (buildCounterMonitoredResourceDescriptor < 3) { |
| 640 unittest.expect(o.description, unittest.equals('foo')); | 640 unittest.expect(o.description, unittest.equals('foo')); |
| 641 unittest.expect(o.displayName, unittest.equals('foo')); | 641 unittest.expect(o.displayName, unittest.equals('foo')); |
| 642 checkUnnamed190(o.labels); | 642 checkUnnamed211(o.labels); |
| 643 unittest.expect(o.name, unittest.equals('foo')); | 643 unittest.expect(o.name, unittest.equals('foo')); |
| 644 unittest.expect(o.type, unittest.equals('foo')); | 644 unittest.expect(o.type, unittest.equals('foo')); |
| 645 } | 645 } |
| 646 buildCounterMonitoredResourceDescriptor--; | 646 buildCounterMonitoredResourceDescriptor--; |
| 647 } | 647 } |
| 648 | 648 |
| 649 buildUnnamed191() { | 649 buildUnnamed212() { |
| 650 var o = new core.List<api.LogLine>(); | 650 var o = new core.List<api.LogLine>(); |
| 651 o.add(buildLogLine()); | 651 o.add(buildLogLine()); |
| 652 o.add(buildLogLine()); | 652 o.add(buildLogLine()); |
| 653 return o; | 653 return o; |
| 654 } | 654 } |
| 655 | 655 |
| 656 checkUnnamed191(core.List<api.LogLine> o) { | 656 checkUnnamed212(core.List<api.LogLine> o) { |
| 657 unittest.expect(o, unittest.hasLength(2)); | 657 unittest.expect(o, unittest.hasLength(2)); |
| 658 checkLogLine(o[0]); | 658 checkLogLine(o[0]); |
| 659 checkLogLine(o[1]); | 659 checkLogLine(o[1]); |
| 660 } | 660 } |
| 661 | 661 |
| 662 buildUnnamed192() { | 662 buildUnnamed213() { |
| 663 var o = new core.List<api.SourceReference>(); | 663 var o = new core.List<api.SourceReference>(); |
| 664 o.add(buildSourceReference()); | 664 o.add(buildSourceReference()); |
| 665 o.add(buildSourceReference()); | 665 o.add(buildSourceReference()); |
| 666 return o; | 666 return o; |
| 667 } | 667 } |
| 668 | 668 |
| 669 checkUnnamed192(core.List<api.SourceReference> o) { | 669 checkUnnamed213(core.List<api.SourceReference> o) { |
| 670 unittest.expect(o, unittest.hasLength(2)); | 670 unittest.expect(o, unittest.hasLength(2)); |
| 671 checkSourceReference(o[0]); | 671 checkSourceReference(o[0]); |
| 672 checkSourceReference(o[1]); | 672 checkSourceReference(o[1]); |
| 673 } | 673 } |
| 674 | 674 |
| 675 core.int buildCounterRequestLog = 0; | 675 core.int buildCounterRequestLog = 0; |
| 676 buildRequestLog() { | 676 buildRequestLog() { |
| 677 var o = new api.RequestLog(); | 677 var o = new api.RequestLog(); |
| 678 buildCounterRequestLog++; | 678 buildCounterRequestLog++; |
| 679 if (buildCounterRequestLog < 3) { | 679 if (buildCounterRequestLog < 3) { |
| 680 o.appEngineRelease = "foo"; | 680 o.appEngineRelease = "foo"; |
| 681 o.appId = "foo"; | 681 o.appId = "foo"; |
| 682 o.cost = 42.0; | 682 o.cost = 42.0; |
| 683 o.endTime = "foo"; | 683 o.endTime = "foo"; |
| 684 o.finished = true; | 684 o.finished = true; |
| 685 o.first = true; | 685 o.first = true; |
| 686 o.host = "foo"; | 686 o.host = "foo"; |
| 687 o.httpVersion = "foo"; | 687 o.httpVersion = "foo"; |
| 688 o.instanceId = "foo"; | 688 o.instanceId = "foo"; |
| 689 o.instanceIndex = 42; | 689 o.instanceIndex = 42; |
| 690 o.ip = "foo"; | 690 o.ip = "foo"; |
| 691 o.latency = "foo"; | 691 o.latency = "foo"; |
| 692 o.line = buildUnnamed191(); | 692 o.line = buildUnnamed212(); |
| 693 o.megaCycles = "foo"; | 693 o.megaCycles = "foo"; |
| 694 o.method = "foo"; | 694 o.method = "foo"; |
| 695 o.moduleId = "foo"; | 695 o.moduleId = "foo"; |
| 696 o.nickname = "foo"; | 696 o.nickname = "foo"; |
| 697 o.pendingTime = "foo"; | 697 o.pendingTime = "foo"; |
| 698 o.referrer = "foo"; | 698 o.referrer = "foo"; |
| 699 o.requestId = "foo"; | 699 o.requestId = "foo"; |
| 700 o.resource = "foo"; | 700 o.resource = "foo"; |
| 701 o.responseSize = "foo"; | 701 o.responseSize = "foo"; |
| 702 o.sourceReference = buildUnnamed192(); | 702 o.sourceReference = buildUnnamed213(); |
| 703 o.startTime = "foo"; | 703 o.startTime = "foo"; |
| 704 o.status = 42; | 704 o.status = 42; |
| 705 o.taskName = "foo"; | 705 o.taskName = "foo"; |
| 706 o.taskQueueName = "foo"; | 706 o.taskQueueName = "foo"; |
| 707 o.traceId = "foo"; | 707 o.traceId = "foo"; |
| 708 o.urlMapEntry = "foo"; | 708 o.urlMapEntry = "foo"; |
| 709 o.userAgent = "foo"; | 709 o.userAgent = "foo"; |
| 710 o.versionId = "foo"; | 710 o.versionId = "foo"; |
| 711 o.wasLoadingRequest = true; | 711 o.wasLoadingRequest = true; |
| 712 } | 712 } |
| 713 buildCounterRequestLog--; | 713 buildCounterRequestLog--; |
| 714 return o; | 714 return o; |
| 715 } | 715 } |
| 716 | 716 |
| 717 checkRequestLog(api.RequestLog o) { | 717 checkRequestLog(api.RequestLog o) { |
| 718 buildCounterRequestLog++; | 718 buildCounterRequestLog++; |
| 719 if (buildCounterRequestLog < 3) { | 719 if (buildCounterRequestLog < 3) { |
| 720 unittest.expect(o.appEngineRelease, unittest.equals('foo')); | 720 unittest.expect(o.appEngineRelease, unittest.equals('foo')); |
| 721 unittest.expect(o.appId, unittest.equals('foo')); | 721 unittest.expect(o.appId, unittest.equals('foo')); |
| 722 unittest.expect(o.cost, unittest.equals(42.0)); | 722 unittest.expect(o.cost, unittest.equals(42.0)); |
| 723 unittest.expect(o.endTime, unittest.equals('foo')); | 723 unittest.expect(o.endTime, unittest.equals('foo')); |
| 724 unittest.expect(o.finished, unittest.isTrue); | 724 unittest.expect(o.finished, unittest.isTrue); |
| 725 unittest.expect(o.first, unittest.isTrue); | 725 unittest.expect(o.first, unittest.isTrue); |
| 726 unittest.expect(o.host, unittest.equals('foo')); | 726 unittest.expect(o.host, unittest.equals('foo')); |
| 727 unittest.expect(o.httpVersion, unittest.equals('foo')); | 727 unittest.expect(o.httpVersion, unittest.equals('foo')); |
| 728 unittest.expect(o.instanceId, unittest.equals('foo')); | 728 unittest.expect(o.instanceId, unittest.equals('foo')); |
| 729 unittest.expect(o.instanceIndex, unittest.equals(42)); | 729 unittest.expect(o.instanceIndex, unittest.equals(42)); |
| 730 unittest.expect(o.ip, unittest.equals('foo')); | 730 unittest.expect(o.ip, unittest.equals('foo')); |
| 731 unittest.expect(o.latency, unittest.equals('foo')); | 731 unittest.expect(o.latency, unittest.equals('foo')); |
| 732 checkUnnamed191(o.line); | 732 checkUnnamed212(o.line); |
| 733 unittest.expect(o.megaCycles, unittest.equals('foo')); | 733 unittest.expect(o.megaCycles, unittest.equals('foo')); |
| 734 unittest.expect(o.method, unittest.equals('foo')); | 734 unittest.expect(o.method, unittest.equals('foo')); |
| 735 unittest.expect(o.moduleId, unittest.equals('foo')); | 735 unittest.expect(o.moduleId, unittest.equals('foo')); |
| 736 unittest.expect(o.nickname, unittest.equals('foo')); | 736 unittest.expect(o.nickname, unittest.equals('foo')); |
| 737 unittest.expect(o.pendingTime, unittest.equals('foo')); | 737 unittest.expect(o.pendingTime, unittest.equals('foo')); |
| 738 unittest.expect(o.referrer, unittest.equals('foo')); | 738 unittest.expect(o.referrer, unittest.equals('foo')); |
| 739 unittest.expect(o.requestId, unittest.equals('foo')); | 739 unittest.expect(o.requestId, unittest.equals('foo')); |
| 740 unittest.expect(o.resource, unittest.equals('foo')); | 740 unittest.expect(o.resource, unittest.equals('foo')); |
| 741 unittest.expect(o.responseSize, unittest.equals('foo')); | 741 unittest.expect(o.responseSize, unittest.equals('foo')); |
| 742 checkUnnamed192(o.sourceReference); | 742 checkUnnamed213(o.sourceReference); |
| 743 unittest.expect(o.startTime, unittest.equals('foo')); | 743 unittest.expect(o.startTime, unittest.equals('foo')); |
| 744 unittest.expect(o.status, unittest.equals(42)); | 744 unittest.expect(o.status, unittest.equals(42)); |
| 745 unittest.expect(o.taskName, unittest.equals('foo')); | 745 unittest.expect(o.taskName, unittest.equals('foo')); |
| 746 unittest.expect(o.taskQueueName, unittest.equals('foo')); | 746 unittest.expect(o.taskQueueName, unittest.equals('foo')); |
| 747 unittest.expect(o.traceId, unittest.equals('foo')); | 747 unittest.expect(o.traceId, unittest.equals('foo')); |
| 748 unittest.expect(o.urlMapEntry, unittest.equals('foo')); | 748 unittest.expect(o.urlMapEntry, unittest.equals('foo')); |
| 749 unittest.expect(o.userAgent, unittest.equals('foo')); | 749 unittest.expect(o.userAgent, unittest.equals('foo')); |
| 750 unittest.expect(o.versionId, unittest.equals('foo')); | 750 unittest.expect(o.versionId, unittest.equals('foo')); |
| 751 unittest.expect(o.wasLoadingRequest, unittest.isTrue); | 751 unittest.expect(o.wasLoadingRequest, unittest.isTrue); |
| 752 } | 752 } |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 790 | 790 |
| 791 checkSourceReference(api.SourceReference o) { | 791 checkSourceReference(api.SourceReference o) { |
| 792 buildCounterSourceReference++; | 792 buildCounterSourceReference++; |
| 793 if (buildCounterSourceReference < 3) { | 793 if (buildCounterSourceReference < 3) { |
| 794 unittest.expect(o.repository, unittest.equals('foo')); | 794 unittest.expect(o.repository, unittest.equals('foo')); |
| 795 unittest.expect(o.revisionId, unittest.equals('foo')); | 795 unittest.expect(o.revisionId, unittest.equals('foo')); |
| 796 } | 796 } |
| 797 buildCounterSourceReference--; | 797 buildCounterSourceReference--; |
| 798 } | 798 } |
| 799 | 799 |
| 800 buildUnnamed193() { | 800 buildUnnamed214() { |
| 801 var o = new core.List<api.LogEntry>(); | 801 var o = new core.List<api.LogEntry>(); |
| 802 o.add(buildLogEntry()); | 802 o.add(buildLogEntry()); |
| 803 o.add(buildLogEntry()); | 803 o.add(buildLogEntry()); |
| 804 return o; | 804 return o; |
| 805 } | 805 } |
| 806 | 806 |
| 807 checkUnnamed193(core.List<api.LogEntry> o) { | 807 checkUnnamed214(core.List<api.LogEntry> o) { |
| 808 unittest.expect(o, unittest.hasLength(2)); | 808 unittest.expect(o, unittest.hasLength(2)); |
| 809 checkLogEntry(o[0]); | 809 checkLogEntry(o[0]); |
| 810 checkLogEntry(o[1]); | 810 checkLogEntry(o[1]); |
| 811 } | 811 } |
| 812 | 812 |
| 813 buildUnnamed194() { | 813 buildUnnamed215() { |
| 814 var o = new core.Map<core.String, core.String>(); | 814 var o = new core.Map<core.String, core.String>(); |
| 815 o["x"] = "foo"; | 815 o["x"] = "foo"; |
| 816 o["y"] = "foo"; | 816 o["y"] = "foo"; |
| 817 return o; | 817 return o; |
| 818 } | 818 } |
| 819 | 819 |
| 820 checkUnnamed194(core.Map<core.String, core.String> o) { | 820 checkUnnamed215(core.Map<core.String, core.String> o) { |
| 821 unittest.expect(o, unittest.hasLength(2)); | 821 unittest.expect(o, unittest.hasLength(2)); |
| 822 unittest.expect(o["x"], unittest.equals('foo')); | 822 unittest.expect(o["x"], unittest.equals('foo')); |
| 823 unittest.expect(o["y"], unittest.equals('foo')); | 823 unittest.expect(o["y"], unittest.equals('foo')); |
| 824 } | 824 } |
| 825 | 825 |
| 826 core.int buildCounterWriteLogEntriesRequest = 0; | 826 core.int buildCounterWriteLogEntriesRequest = 0; |
| 827 buildWriteLogEntriesRequest() { | 827 buildWriteLogEntriesRequest() { |
| 828 var o = new api.WriteLogEntriesRequest(); | 828 var o = new api.WriteLogEntriesRequest(); |
| 829 buildCounterWriteLogEntriesRequest++; | 829 buildCounterWriteLogEntriesRequest++; |
| 830 if (buildCounterWriteLogEntriesRequest < 3) { | 830 if (buildCounterWriteLogEntriesRequest < 3) { |
| 831 o.entries = buildUnnamed193(); | 831 o.entries = buildUnnamed214(); |
| 832 o.labels = buildUnnamed194(); | 832 o.labels = buildUnnamed215(); |
| 833 o.logName = "foo"; | 833 o.logName = "foo"; |
| 834 o.partialSuccess = true; | 834 o.partialSuccess = true; |
| 835 o.resource = buildMonitoredResource(); | 835 o.resource = buildMonitoredResource(); |
| 836 } | 836 } |
| 837 buildCounterWriteLogEntriesRequest--; | 837 buildCounterWriteLogEntriesRequest--; |
| 838 return o; | 838 return o; |
| 839 } | 839 } |
| 840 | 840 |
| 841 checkWriteLogEntriesRequest(api.WriteLogEntriesRequest o) { | 841 checkWriteLogEntriesRequest(api.WriteLogEntriesRequest o) { |
| 842 buildCounterWriteLogEntriesRequest++; | 842 buildCounterWriteLogEntriesRequest++; |
| 843 if (buildCounterWriteLogEntriesRequest < 3) { | 843 if (buildCounterWriteLogEntriesRequest < 3) { |
| 844 checkUnnamed193(o.entries); | 844 checkUnnamed214(o.entries); |
| 845 checkUnnamed194(o.labels); | 845 checkUnnamed215(o.labels); |
| 846 unittest.expect(o.logName, unittest.equals('foo')); | 846 unittest.expect(o.logName, unittest.equals('foo')); |
| 847 unittest.expect(o.partialSuccess, unittest.isTrue); | 847 unittest.expect(o.partialSuccess, unittest.isTrue); |
| 848 checkMonitoredResource(o.resource); | 848 checkMonitoredResource(o.resource); |
| 849 } | 849 } |
| 850 buildCounterWriteLogEntriesRequest--; | 850 buildCounterWriteLogEntriesRequest--; |
| 851 } | 851 } |
| 852 | 852 |
| 853 core.int buildCounterWriteLogEntriesResponse = 0; | 853 core.int buildCounterWriteLogEntriesResponse = 0; |
| 854 buildWriteLogEntriesResponse() { | 854 buildWriteLogEntriesResponse() { |
| 855 var o = new api.WriteLogEntriesResponse(); | 855 var o = new api.WriteLogEntriesResponse(); |
| (...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1111 res.delete(arg_logName).then(unittest.expectAsync(((api.Empty response) { | 1111 res.delete(arg_logName).then(unittest.expectAsync(((api.Empty response) { |
| 1112 checkEmpty(response); | 1112 checkEmpty(response); |
| 1113 }))); | 1113 }))); |
| 1114 }); | 1114 }); |
| 1115 | 1115 |
| 1116 unittest.test("method--list", () { | 1116 unittest.test("method--list", () { |
| 1117 | 1117 |
| 1118 var mock = new HttpServerMock(); | 1118 var mock = new HttpServerMock(); |
| 1119 api.BillingAccountsLogsResourceApi res = new api.LoggingApi(mock).billingA
ccounts.logs; | 1119 api.BillingAccountsLogsResourceApi res = new api.LoggingApi(mock).billingA
ccounts.logs; |
| 1120 var arg_parent = "foo"; | 1120 var arg_parent = "foo"; |
| 1121 var arg_pageSize = 42; |
| 1121 var arg_pageToken = "foo"; | 1122 var arg_pageToken = "foo"; |
| 1122 var arg_pageSize = 42; | |
| 1123 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1123 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 1124 var path = (req.url).path; | 1124 var path = (req.url).path; |
| 1125 var pathOffset = 0; | 1125 var pathOffset = 0; |
| 1126 var index; | 1126 var index; |
| 1127 var subPart; | 1127 var subPart; |
| 1128 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1128 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 1129 pathOffset += 1; | 1129 pathOffset += 1; |
| 1130 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v2/")); | 1130 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v2/")); |
| 1131 pathOffset += 3; | 1131 pathOffset += 3; |
| 1132 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; | 1132 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; |
| 1133 | 1133 |
| 1134 var query = (req.url).query; | 1134 var query = (req.url).query; |
| 1135 var queryOffset = 0; | 1135 var queryOffset = 0; |
| 1136 var queryMap = {}; | 1136 var queryMap = {}; |
| 1137 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 1137 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 1138 parseBool(n) { | 1138 parseBool(n) { |
| 1139 if (n == "true") return true; | 1139 if (n == "true") return true; |
| 1140 if (n == "false") return false; | 1140 if (n == "false") return false; |
| 1141 if (n == null) return null; | 1141 if (n == null) return null; |
| 1142 throw new core.ArgumentError("Invalid boolean: $n"); | 1142 throw new core.ArgumentError("Invalid boolean: $n"); |
| 1143 } | 1143 } |
| 1144 if (query.length > 0) { | 1144 if (query.length > 0) { |
| 1145 for (var part in query.split("&")) { | 1145 for (var part in query.split("&")) { |
| 1146 var keyvalue = part.split("="); | 1146 var keyvalue = part.split("="); |
| 1147 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 1147 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 1148 } | 1148 } |
| 1149 } | 1149 } |
| 1150 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ
als(arg_pageSize)); |
| 1150 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | 1151 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); |
| 1151 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ
als(arg_pageSize)); | |
| 1152 | 1152 |
| 1153 | 1153 |
| 1154 var h = { | 1154 var h = { |
| 1155 "content-type" : "application/json; charset=utf-8", | 1155 "content-type" : "application/json; charset=utf-8", |
| 1156 }; | 1156 }; |
| 1157 var resp = convert.JSON.encode(buildListLogsResponse()); | 1157 var resp = convert.JSON.encode(buildListLogsResponse()); |
| 1158 return new async.Future.value(stringResponse(200, h, resp)); | 1158 return new async.Future.value(stringResponse(200, h, resp)); |
| 1159 }), true); | 1159 }), true); |
| 1160 res.list(arg_parent, pageToken: arg_pageToken, pageSize: arg_pageSize).the
n(unittest.expectAsync(((api.ListLogsResponse response) { | 1160 res.list(arg_parent, pageSize: arg_pageSize, pageToken: arg_pageToken).the
n(unittest.expectAsync(((api.ListLogsResponse response) { |
| 1161 checkListLogsResponse(response); | 1161 checkListLogsResponse(response); |
| 1162 }))); | 1162 }))); |
| 1163 }); | 1163 }); |
| 1164 | 1164 |
| 1165 }); | 1165 }); |
| 1166 | 1166 |
| 1167 | 1167 |
| 1168 unittest.group("resource-BillingAccountsSinksResourceApi", () { | 1168 unittest.group("resource-BillingAccountsSinksResourceApi", () { |
| 1169 unittest.test("method--create", () { | 1169 unittest.test("method--create", () { |
| 1170 | 1170 |
| (...skipping 575 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1746 res.get(arg_sinkName).then(unittest.expectAsync(((api.LogSink response) { | 1746 res.get(arg_sinkName).then(unittest.expectAsync(((api.LogSink response) { |
| 1747 checkLogSink(response); | 1747 checkLogSink(response); |
| 1748 }))); | 1748 }))); |
| 1749 }); | 1749 }); |
| 1750 | 1750 |
| 1751 unittest.test("method--list", () { | 1751 unittest.test("method--list", () { |
| 1752 | 1752 |
| 1753 var mock = new HttpServerMock(); | 1753 var mock = new HttpServerMock(); |
| 1754 api.FoldersSinksResourceApi res = new api.LoggingApi(mock).folders.sinks; | 1754 api.FoldersSinksResourceApi res = new api.LoggingApi(mock).folders.sinks; |
| 1755 var arg_parent = "foo"; | 1755 var arg_parent = "foo"; |
| 1756 var arg_pageSize = 42; |
| 1756 var arg_pageToken = "foo"; | 1757 var arg_pageToken = "foo"; |
| 1757 var arg_pageSize = 42; | |
| 1758 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1758 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 1759 var path = (req.url).path; | 1759 var path = (req.url).path; |
| 1760 var pathOffset = 0; | 1760 var pathOffset = 0; |
| 1761 var index; | 1761 var index; |
| 1762 var subPart; | 1762 var subPart; |
| 1763 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1763 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 1764 pathOffset += 1; | 1764 pathOffset += 1; |
| 1765 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v2/")); | 1765 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v2/")); |
| 1766 pathOffset += 3; | 1766 pathOffset += 3; |
| 1767 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; | 1767 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; |
| 1768 | 1768 |
| 1769 var query = (req.url).query; | 1769 var query = (req.url).query; |
| 1770 var queryOffset = 0; | 1770 var queryOffset = 0; |
| 1771 var queryMap = {}; | 1771 var queryMap = {}; |
| 1772 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 1772 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 1773 parseBool(n) { | 1773 parseBool(n) { |
| 1774 if (n == "true") return true; | 1774 if (n == "true") return true; |
| 1775 if (n == "false") return false; | 1775 if (n == "false") return false; |
| 1776 if (n == null) return null; | 1776 if (n == null) return null; |
| 1777 throw new core.ArgumentError("Invalid boolean: $n"); | 1777 throw new core.ArgumentError("Invalid boolean: $n"); |
| 1778 } | 1778 } |
| 1779 if (query.length > 0) { | 1779 if (query.length > 0) { |
| 1780 for (var part in query.split("&")) { | 1780 for (var part in query.split("&")) { |
| 1781 var keyvalue = part.split("="); | 1781 var keyvalue = part.split("="); |
| 1782 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 1782 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 1783 } | 1783 } |
| 1784 } | 1784 } |
| 1785 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ
als(arg_pageSize)); |
| 1785 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | 1786 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); |
| 1786 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ
als(arg_pageSize)); | |
| 1787 | 1787 |
| 1788 | 1788 |
| 1789 var h = { | 1789 var h = { |
| 1790 "content-type" : "application/json; charset=utf-8", | 1790 "content-type" : "application/json; charset=utf-8", |
| 1791 }; | 1791 }; |
| 1792 var resp = convert.JSON.encode(buildListSinksResponse()); | 1792 var resp = convert.JSON.encode(buildListSinksResponse()); |
| 1793 return new async.Future.value(stringResponse(200, h, resp)); | 1793 return new async.Future.value(stringResponse(200, h, resp)); |
| 1794 }), true); | 1794 }), true); |
| 1795 res.list(arg_parent, pageToken: arg_pageToken, pageSize: arg_pageSize).the
n(unittest.expectAsync(((api.ListSinksResponse response) { | 1795 res.list(arg_parent, pageSize: arg_pageSize, pageToken: arg_pageToken).the
n(unittest.expectAsync(((api.ListSinksResponse response) { |
| 1796 checkListSinksResponse(response); | 1796 checkListSinksResponse(response); |
| 1797 }))); | 1797 }))); |
| 1798 }); | 1798 }); |
| 1799 | 1799 |
| 1800 unittest.test("method--update", () { | 1800 unittest.test("method--update", () { |
| 1801 | 1801 |
| 1802 var mock = new HttpServerMock(); | 1802 var mock = new HttpServerMock(); |
| 1803 api.FoldersSinksResourceApi res = new api.LoggingApi(mock).folders.sinks; | 1803 api.FoldersSinksResourceApi res = new api.LoggingApi(mock).folders.sinks; |
| 1804 var arg_request = buildLogSink(); | 1804 var arg_request = buildLogSink(); |
| 1805 var arg_sinkName = "foo"; | 1805 var arg_sinkName = "foo"; |
| (...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1946 res.delete(arg_logName).then(unittest.expectAsync(((api.Empty response) { | 1946 res.delete(arg_logName).then(unittest.expectAsync(((api.Empty response) { |
| 1947 checkEmpty(response); | 1947 checkEmpty(response); |
| 1948 }))); | 1948 }))); |
| 1949 }); | 1949 }); |
| 1950 | 1950 |
| 1951 unittest.test("method--list", () { | 1951 unittest.test("method--list", () { |
| 1952 | 1952 |
| 1953 var mock = new HttpServerMock(); | 1953 var mock = new HttpServerMock(); |
| 1954 api.OrganizationsLogsResourceApi res = new api.LoggingApi(mock).organizati
ons.logs; | 1954 api.OrganizationsLogsResourceApi res = new api.LoggingApi(mock).organizati
ons.logs; |
| 1955 var arg_parent = "foo"; | 1955 var arg_parent = "foo"; |
| 1956 var arg_pageSize = 42; |
| 1956 var arg_pageToken = "foo"; | 1957 var arg_pageToken = "foo"; |
| 1957 var arg_pageSize = 42; | |
| 1958 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1958 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 1959 var path = (req.url).path; | 1959 var path = (req.url).path; |
| 1960 var pathOffset = 0; | 1960 var pathOffset = 0; |
| 1961 var index; | 1961 var index; |
| 1962 var subPart; | 1962 var subPart; |
| 1963 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1963 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 1964 pathOffset += 1; | 1964 pathOffset += 1; |
| 1965 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v2/")); | 1965 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v2/")); |
| 1966 pathOffset += 3; | 1966 pathOffset += 3; |
| 1967 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; | 1967 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; |
| 1968 | 1968 |
| 1969 var query = (req.url).query; | 1969 var query = (req.url).query; |
| 1970 var queryOffset = 0; | 1970 var queryOffset = 0; |
| 1971 var queryMap = {}; | 1971 var queryMap = {}; |
| 1972 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 1972 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 1973 parseBool(n) { | 1973 parseBool(n) { |
| 1974 if (n == "true") return true; | 1974 if (n == "true") return true; |
| 1975 if (n == "false") return false; | 1975 if (n == "false") return false; |
| 1976 if (n == null) return null; | 1976 if (n == null) return null; |
| 1977 throw new core.ArgumentError("Invalid boolean: $n"); | 1977 throw new core.ArgumentError("Invalid boolean: $n"); |
| 1978 } | 1978 } |
| 1979 if (query.length > 0) { | 1979 if (query.length > 0) { |
| 1980 for (var part in query.split("&")) { | 1980 for (var part in query.split("&")) { |
| 1981 var keyvalue = part.split("="); | 1981 var keyvalue = part.split("="); |
| 1982 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 1982 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 1983 } | 1983 } |
| 1984 } | 1984 } |
| 1985 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ
als(arg_pageSize)); |
| 1985 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | 1986 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); |
| 1986 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ
als(arg_pageSize)); | |
| 1987 | 1987 |
| 1988 | 1988 |
| 1989 var h = { | 1989 var h = { |
| 1990 "content-type" : "application/json; charset=utf-8", | 1990 "content-type" : "application/json; charset=utf-8", |
| 1991 }; | 1991 }; |
| 1992 var resp = convert.JSON.encode(buildListLogsResponse()); | 1992 var resp = convert.JSON.encode(buildListLogsResponse()); |
| 1993 return new async.Future.value(stringResponse(200, h, resp)); | 1993 return new async.Future.value(stringResponse(200, h, resp)); |
| 1994 }), true); | 1994 }), true); |
| 1995 res.list(arg_parent, pageToken: arg_pageToken, pageSize: arg_pageSize).the
n(unittest.expectAsync(((api.ListLogsResponse response) { | 1995 res.list(arg_parent, pageSize: arg_pageSize, pageToken: arg_pageToken).the
n(unittest.expectAsync(((api.ListLogsResponse response) { |
| 1996 checkListLogsResponse(response); | 1996 checkListLogsResponse(response); |
| 1997 }))); | 1997 }))); |
| 1998 }); | 1998 }); |
| 1999 | 1999 |
| 2000 }); | 2000 }); |
| 2001 | 2001 |
| 2002 | 2002 |
| 2003 unittest.group("resource-OrganizationsSinksResourceApi", () { | 2003 unittest.group("resource-OrganizationsSinksResourceApi", () { |
| 2004 unittest.test("method--create", () { | 2004 unittest.test("method--create", () { |
| 2005 | 2005 |
| (...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2140 res.get(arg_sinkName).then(unittest.expectAsync(((api.LogSink response) { | 2140 res.get(arg_sinkName).then(unittest.expectAsync(((api.LogSink response) { |
| 2141 checkLogSink(response); | 2141 checkLogSink(response); |
| 2142 }))); | 2142 }))); |
| 2143 }); | 2143 }); |
| 2144 | 2144 |
| 2145 unittest.test("method--list", () { | 2145 unittest.test("method--list", () { |
| 2146 | 2146 |
| 2147 var mock = new HttpServerMock(); | 2147 var mock = new HttpServerMock(); |
| 2148 api.OrganizationsSinksResourceApi res = new api.LoggingApi(mock).organizat
ions.sinks; | 2148 api.OrganizationsSinksResourceApi res = new api.LoggingApi(mock).organizat
ions.sinks; |
| 2149 var arg_parent = "foo"; | 2149 var arg_parent = "foo"; |
| 2150 var arg_pageSize = 42; |
| 2150 var arg_pageToken = "foo"; | 2151 var arg_pageToken = "foo"; |
| 2151 var arg_pageSize = 42; | |
| 2152 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2152 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 2153 var path = (req.url).path; | 2153 var path = (req.url).path; |
| 2154 var pathOffset = 0; | 2154 var pathOffset = 0; |
| 2155 var index; | 2155 var index; |
| 2156 var subPart; | 2156 var subPart; |
| 2157 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2157 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 2158 pathOffset += 1; | 2158 pathOffset += 1; |
| 2159 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v2/")); | 2159 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v2/")); |
| 2160 pathOffset += 3; | 2160 pathOffset += 3; |
| 2161 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; | 2161 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; |
| 2162 | 2162 |
| 2163 var query = (req.url).query; | 2163 var query = (req.url).query; |
| 2164 var queryOffset = 0; | 2164 var queryOffset = 0; |
| 2165 var queryMap = {}; | 2165 var queryMap = {}; |
| 2166 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 2166 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 2167 parseBool(n) { | 2167 parseBool(n) { |
| 2168 if (n == "true") return true; | 2168 if (n == "true") return true; |
| 2169 if (n == "false") return false; | 2169 if (n == "false") return false; |
| 2170 if (n == null) return null; | 2170 if (n == null) return null; |
| 2171 throw new core.ArgumentError("Invalid boolean: $n"); | 2171 throw new core.ArgumentError("Invalid boolean: $n"); |
| 2172 } | 2172 } |
| 2173 if (query.length > 0) { | 2173 if (query.length > 0) { |
| 2174 for (var part in query.split("&")) { | 2174 for (var part in query.split("&")) { |
| 2175 var keyvalue = part.split("="); | 2175 var keyvalue = part.split("="); |
| 2176 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 2176 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 2177 } | 2177 } |
| 2178 } | 2178 } |
| 2179 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ
als(arg_pageSize)); |
| 2179 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | 2180 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); |
| 2180 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ
als(arg_pageSize)); | |
| 2181 | 2181 |
| 2182 | 2182 |
| 2183 var h = { | 2183 var h = { |
| 2184 "content-type" : "application/json; charset=utf-8", | 2184 "content-type" : "application/json; charset=utf-8", |
| 2185 }; | 2185 }; |
| 2186 var resp = convert.JSON.encode(buildListSinksResponse()); | 2186 var resp = convert.JSON.encode(buildListSinksResponse()); |
| 2187 return new async.Future.value(stringResponse(200, h, resp)); | 2187 return new async.Future.value(stringResponse(200, h, resp)); |
| 2188 }), true); | 2188 }), true); |
| 2189 res.list(arg_parent, pageToken: arg_pageToken, pageSize: arg_pageSize).the
n(unittest.expectAsync(((api.ListSinksResponse response) { | 2189 res.list(arg_parent, pageSize: arg_pageSize, pageToken: arg_pageToken).the
n(unittest.expectAsync(((api.ListSinksResponse response) { |
| 2190 checkListSinksResponse(response); | 2190 checkListSinksResponse(response); |
| 2191 }))); | 2191 }))); |
| 2192 }); | 2192 }); |
| 2193 | 2193 |
| 2194 unittest.test("method--update", () { | 2194 unittest.test("method--update", () { |
| 2195 | 2195 |
| 2196 var mock = new HttpServerMock(); | 2196 var mock = new HttpServerMock(); |
| 2197 api.OrganizationsSinksResourceApi res = new api.LoggingApi(mock).organizat
ions.sinks; | 2197 api.OrganizationsSinksResourceApi res = new api.LoggingApi(mock).organizat
ions.sinks; |
| 2198 var arg_request = buildLogSink(); | 2198 var arg_request = buildLogSink(); |
| 2199 var arg_sinkName = "foo"; | 2199 var arg_sinkName = "foo"; |
| (...skipping 624 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) { | 2824 res.update(arg_request, arg_sinkName, uniqueWriterIdentity: arg_uniqueWrit
erIdentity).then(unittest.expectAsync(((api.LogSink response) { |
| 2825 checkLogSink(response); | 2825 checkLogSink(response); |
| 2826 }))); | 2826 }))); |
| 2827 }); | 2827 }); |
| 2828 | 2828 |
| 2829 }); | 2829 }); |
| 2830 | 2830 |
| 2831 | 2831 |
| 2832 } | 2832 } |
| 2833 | 2833 |
| OLD | NEW |