| OLD | NEW |
| 1 library googleapis_beta.logging.v2beta1.test; | 1 library googleapis_beta.logging.v2beta1.test; |
| 2 | 2 |
| 3 import "dart:core" as core; | 3 import "dart:core" as core; |
| 4 import "dart:collection" as collection; | 4 import "dart:collection" as collection; |
| 5 import "dart:async" as async; | 5 import "dart:async" as async; |
| 6 import "dart:convert" as convert; | 6 import "dart:convert" as convert; |
| 7 | 7 |
| 8 import 'package:http/http.dart' as http; | 8 import 'package:http/http.dart' as http; |
| 9 import 'package:http/testing.dart' as http_testing; | 9 import 'package:http/testing.dart' as http_testing; |
| 10 import 'package:unittest/unittest.dart' as unittest; | 10 import 'package:test/test.dart' as unittest; |
| 11 | 11 |
| 12 import 'package:googleapis_beta/logging/v2beta1.dart' as api; | 12 import 'package:googleapis_beta/logging/v2beta1.dart' as api; |
| 13 | 13 |
| 14 class HttpServerMock extends http.BaseClient { | 14 class HttpServerMock extends http.BaseClient { |
| 15 core.Function _callback; | 15 core.Function _callback; |
| 16 core.bool _expectJson; | 16 core.bool _expectJson; |
| 17 | 17 |
| 18 void register(core.Function callback, core.bool expectJson) { | 18 void register(core.Function callback, core.bool expectJson) { |
| 19 _callback = callback; | 19 _callback = callback; |
| 20 _expectJson = expectJson; | 20 _expectJson = expectJson; |
| (...skipping 18 matching lines...) Expand all Loading... |
| 39 } else { | 39 } else { |
| 40 return stream.toBytes().then((data) { | 40 return stream.toBytes().then((data) { |
| 41 return _callback(request, data); | 41 return _callback(request, data); |
| 42 }); | 42 }); |
| 43 } | 43 } |
| 44 } | 44 } |
| 45 } | 45 } |
| 46 } | 46 } |
| 47 | 47 |
| 48 http.StreamedResponse stringResponse( | 48 http.StreamedResponse stringResponse( |
| 49 core.int status, core.Map headers, core.String body) { | 49 core.int status, core.Map<core.String, core.String> headers, core.String bod
y) { |
| 50 var stream = new async.Stream.fromIterable([convert.UTF8.encode(body)]); | 50 var stream = new async.Stream.fromIterable([convert.UTF8.encode(body)]); |
| 51 return new http.StreamedResponse(stream, status, headers: headers); | 51 return new http.StreamedResponse(stream, status, headers: headers); |
| 52 } | 52 } |
| 53 | 53 |
| 54 core.int buildCounterEmpty = 0; | 54 core.int buildCounterEmpty = 0; |
| 55 buildEmpty() { | 55 buildEmpty() { |
| 56 var o = new api.Empty(); | 56 var o = new api.Empty(); |
| 57 buildCounterEmpty++; | 57 buildCounterEmpty++; |
| 58 if (buildCounterEmpty < 3) { | 58 if (buildCounterEmpty < 3) { |
| 59 } | 59 } |
| (...skipping 69 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 buildUnnamed3851() { | 139 buildUnnamed3325() { |
| 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 checkUnnamed3851(core.List<core.String> o) { | 146 checkUnnamed3325(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 buildUnnamed3852() { | 152 buildUnnamed3326() { |
| 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 checkUnnamed3852(core.List<core.String> o) { | 159 checkUnnamed3326(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 = buildUnnamed3851(); | 174 o.projectIds = buildUnnamed3325(); |
| 175 o.resourceNames = buildUnnamed3852(); | 175 o.resourceNames = buildUnnamed3326(); |
| 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 checkUnnamed3851(o.projectIds); | 188 checkUnnamed3325(o.projectIds); |
| 189 checkUnnamed3852(o.resourceNames); | 189 checkUnnamed3326(o.resourceNames); |
| 190 } | 190 } |
| 191 buildCounterListLogEntriesRequest--; | 191 buildCounterListLogEntriesRequest--; |
| 192 } | 192 } |
| 193 | 193 |
| 194 buildUnnamed3853() { | 194 buildUnnamed3327() { |
| 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 checkUnnamed3853(core.List<api.LogEntry> o) { | 201 checkUnnamed3327(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 = buildUnnamed3853(); | 212 o.entries = buildUnnamed3327(); |
| 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 checkUnnamed3853(o.entries); | 222 checkUnnamed3327(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 buildUnnamed3854() { | 228 buildUnnamed3328() { |
| 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 checkUnnamed3854(core.List<api.LogMetric> o) { | 235 checkUnnamed3328(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 = buildUnnamed3854(); | 246 o.metrics = buildUnnamed3328(); |
| 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 checkUnnamed3854(o.metrics); | 256 checkUnnamed3328(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 buildUnnamed3855() { | 262 buildUnnamed3329() { |
| 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 checkUnnamed3855(core.List<core.String> o) { | 269 checkUnnamed3329(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 = buildUnnamed3855(); | 280 o.logNames = buildUnnamed3329(); |
| 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 checkUnnamed3855(o.logNames); | 290 checkUnnamed3329(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 buildUnnamed3856() { | 296 buildUnnamed3330() { |
| 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 checkUnnamed3856(core.List<api.MonitoredResourceDescriptor> o) { | 303 checkUnnamed3330(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 = buildUnnamed3856(); | 315 o.resourceDescriptors = buildUnnamed3330(); |
| 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 checkUnnamed3856(o.resourceDescriptors); | 325 checkUnnamed3330(o.resourceDescriptors); |
| 326 } | 326 } |
| 327 buildCounterListMonitoredResourceDescriptorsResponse--; | 327 buildCounterListMonitoredResourceDescriptorsResponse--; |
| 328 } | 328 } |
| 329 | 329 |
| 330 buildUnnamed3857() { | 330 buildUnnamed3331() { |
| 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 checkUnnamed3857(core.List<api.LogSink> o) { | 337 checkUnnamed3331(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 = buildUnnamed3857(); | 349 o.sinks = buildUnnamed3331(); |
| 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 checkUnnamed3857(o.sinks); | 359 checkUnnamed3331(o.sinks); |
| 360 } | 360 } |
| 361 buildCounterListSinksResponse--; | 361 buildCounterListSinksResponse--; |
| 362 } | 362 } |
| 363 | 363 |
| 364 buildUnnamed3858() { | 364 buildUnnamed3332() { |
| 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 checkUnnamed3858(core.Map<core.String, core.Object> o) { | 371 checkUnnamed3332(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 buildUnnamed3859() { | 377 buildUnnamed3333() { |
| 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 checkUnnamed3859(core.Map<core.String, core.String> o) { | 384 checkUnnamed3333(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 buildUnnamed3860() { | 390 buildUnnamed3334() { |
| 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 checkUnnamed3860(core.Map<core.String, core.Object> o) { | 397 checkUnnamed3334(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 = buildUnnamed3858(); | 410 o.jsonPayload = buildUnnamed3332(); |
| 411 o.labels = buildUnnamed3859(); | 411 o.labels = buildUnnamed3333(); |
| 412 o.logName = "foo"; | 412 o.logName = "foo"; |
| 413 o.operation = buildLogEntryOperation(); | 413 o.operation = buildLogEntryOperation(); |
| 414 o.protoPayload = buildUnnamed3860(); | 414 o.protoPayload = buildUnnamed3334(); |
| 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 checkUnnamed3858(o.jsonPayload); | 432 checkUnnamed3332(o.jsonPayload); |
| 433 checkUnnamed3859(o.labels); | 433 checkUnnamed3333(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 checkUnnamed3860(o.protoPayload); | 436 checkUnnamed3334(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 buildUnnamed3861() { | 579 buildUnnamed3335() { |
| 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 checkUnnamed3861(core.Map<core.String, core.String> o) { | 586 checkUnnamed3335(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 = buildUnnamed3861(); | 597 o.labels = buildUnnamed3335(); |
| 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 checkUnnamed3861(o.labels); | 607 checkUnnamed3335(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 buildUnnamed3862() { | 613 buildUnnamed3336() { |
| 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 checkUnnamed3862(core.List<api.LabelDescriptor> o) { | 620 checkUnnamed3336(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 = buildUnnamed3862(); | 633 o.labels = buildUnnamed3336(); |
| 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 checkUnnamed3862(o.labels); | 646 checkUnnamed3336(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 buildUnnamed3863() { | 653 buildUnnamed3337() { |
| 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 checkUnnamed3863(core.List<api.LogLine> o) { | 660 checkUnnamed3337(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 buildUnnamed3864() { | 666 buildUnnamed3338() { |
| 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 checkUnnamed3864(core.List<api.SourceReference> o) { | 673 checkUnnamed3338(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 = buildUnnamed3863(); | 696 o.line = buildUnnamed3337(); |
| 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 = buildUnnamed3864(); | 706 o.sourceReference = buildUnnamed3338(); |
| 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 checkUnnamed3863(o.line); | 736 checkUnnamed3337(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 checkUnnamed3864(o.sourceReference); | 746 checkUnnamed3338(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 buildUnnamed3865() { | 804 buildUnnamed3339() { |
| 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 checkUnnamed3865(core.List<api.LogEntry> o) { | 811 checkUnnamed3339(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 buildUnnamed3866() { | 817 buildUnnamed3340() { |
| 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 checkUnnamed3866(core.Map<core.String, core.String> o) { | 824 checkUnnamed3340(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 = buildUnnamed3865(); | 835 o.entries = buildUnnamed3339(); |
| 836 o.labels = buildUnnamed3866(); | 836 o.labels = buildUnnamed3340(); |
| 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 checkUnnamed3865(o.entries); | 848 checkUnnamed3339(o.entries); |
| 849 checkUnnamed3866(o.labels); | 849 checkUnnamed3340(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 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1070 }); | 1070 }); |
| 1071 }); | 1071 }); |
| 1072 | 1072 |
| 1073 | 1073 |
| 1074 unittest.group("resource-BillingAccountsLogsResourceApi", () { | 1074 unittest.group("resource-BillingAccountsLogsResourceApi", () { |
| 1075 unittest.test("method--delete", () { | 1075 unittest.test("method--delete", () { |
| 1076 | 1076 |
| 1077 var mock = new HttpServerMock(); | 1077 var mock = new HttpServerMock(); |
| 1078 api.BillingAccountsLogsResourceApi res = new api.LoggingApi(mock).billingA
ccounts.logs; | 1078 api.BillingAccountsLogsResourceApi res = new api.LoggingApi(mock).billingA
ccounts.logs; |
| 1079 var arg_logName = "foo"; | 1079 var arg_logName = "foo"; |
| 1080 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1080 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 1081 var path = (req.url).path; | 1081 var path = (req.url).path; |
| 1082 var pathOffset = 0; | 1082 var pathOffset = 0; |
| 1083 var index; | 1083 var index; |
| 1084 var subPart; | 1084 var subPart; |
| 1085 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1085 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 1086 pathOffset += 1; | 1086 pathOffset += 1; |
| 1087 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("v2beta1/")); | 1087 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("v2beta1/")); |
| 1088 pathOffset += 8; | 1088 pathOffset += 8; |
| 1089 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; | 1089 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; |
| 1090 | 1090 |
| (...skipping 14 matching lines...) Expand all Loading... |
| 1105 } | 1105 } |
| 1106 } | 1106 } |
| 1107 | 1107 |
| 1108 | 1108 |
| 1109 var h = { | 1109 var h = { |
| 1110 "content-type" : "application/json; charset=utf-8", | 1110 "content-type" : "application/json; charset=utf-8", |
| 1111 }; | 1111 }; |
| 1112 var resp = convert.JSON.encode(buildEmpty()); | 1112 var resp = convert.JSON.encode(buildEmpty()); |
| 1113 return new async.Future.value(stringResponse(200, h, resp)); | 1113 return new async.Future.value(stringResponse(200, h, resp)); |
| 1114 }), true); | 1114 }), true); |
| 1115 res.delete(arg_logName).then(unittest.expectAsync(((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_pageToken = "foo"; | 1125 var arg_pageToken = "foo"; |
| 1126 var arg_pageSize = 42; | 1126 var arg_pageSize = 42; |
| 1127 mock.register(unittest.expectAsync((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 + 8), unittest.equ
als("v2beta1/")); | 1134 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("v2beta1/")); |
| 1135 pathOffset += 8; | 1135 pathOffset += 8; |
| 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 |
| (...skipping 16 matching lines...) Expand all Loading... |
| 1154 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | 1154 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); |
| 1155 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ
als(arg_pageSize)); | 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.expectAsync(((api.ListLogsResponse response) { | 1164 res.list(arg_parent, pageToken: arg_pageToken, pageSize: arg_pageSize).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-EntriesResourceApi", () { | 1172 unittest.group("resource-EntriesResourceApi", () { |
| 1173 unittest.test("method--list", () { | 1173 unittest.test("method--list", () { |
| 1174 | 1174 |
| 1175 var mock = new HttpServerMock(); | 1175 var mock = new HttpServerMock(); |
| 1176 api.EntriesResourceApi res = new api.LoggingApi(mock).entries; | 1176 api.EntriesResourceApi res = new api.LoggingApi(mock).entries; |
| 1177 var arg_request = buildListLogEntriesRequest(); | 1177 var arg_request = buildListLogEntriesRequest(); |
| 1178 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1178 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 1179 var obj = new api.ListLogEntriesRequest.fromJson(json); | 1179 var obj = new api.ListLogEntriesRequest.fromJson(json); |
| 1180 checkListLogEntriesRequest(obj); | 1180 checkListLogEntriesRequest(obj); |
| 1181 | 1181 |
| 1182 var path = (req.url).path; | 1182 var path = (req.url).path; |
| 1183 var pathOffset = 0; | 1183 var pathOffset = 0; |
| 1184 var index; | 1184 var index; |
| 1185 var subPart; | 1185 var subPart; |
| 1186 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1186 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 1187 pathOffset += 1; | 1187 pathOffset += 1; |
| 1188 unittest.expect(path.substring(pathOffset, pathOffset + 20), unittest.eq
uals("v2beta1/entries:list")); | 1188 unittest.expect(path.substring(pathOffset, pathOffset + 20), unittest.eq
uals("v2beta1/entries:list")); |
| (...skipping 16 matching lines...) Expand all Loading... |
| 1205 } | 1205 } |
| 1206 } | 1206 } |
| 1207 | 1207 |
| 1208 | 1208 |
| 1209 var h = { | 1209 var h = { |
| 1210 "content-type" : "application/json; charset=utf-8", | 1210 "content-type" : "application/json; charset=utf-8", |
| 1211 }; | 1211 }; |
| 1212 var resp = convert.JSON.encode(buildListLogEntriesResponse()); | 1212 var resp = convert.JSON.encode(buildListLogEntriesResponse()); |
| 1213 return new async.Future.value(stringResponse(200, h, resp)); | 1213 return new async.Future.value(stringResponse(200, h, resp)); |
| 1214 }), true); | 1214 }), true); |
| 1215 res.list(arg_request).then(unittest.expectAsync(((api.ListLogEntriesRespon
se response) { | 1215 res.list(arg_request).then(unittest.expectAsync1(((api.ListLogEntriesRespo
nse response) { |
| 1216 checkListLogEntriesResponse(response); | 1216 checkListLogEntriesResponse(response); |
| 1217 }))); | 1217 }))); |
| 1218 }); | 1218 }); |
| 1219 | 1219 |
| 1220 unittest.test("method--write", () { | 1220 unittest.test("method--write", () { |
| 1221 | 1221 |
| 1222 var mock = new HttpServerMock(); | 1222 var mock = new HttpServerMock(); |
| 1223 api.EntriesResourceApi res = new api.LoggingApi(mock).entries; | 1223 api.EntriesResourceApi res = new api.LoggingApi(mock).entries; |
| 1224 var arg_request = buildWriteLogEntriesRequest(); | 1224 var arg_request = buildWriteLogEntriesRequest(); |
| 1225 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1225 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 1226 var obj = new api.WriteLogEntriesRequest.fromJson(json); | 1226 var obj = new api.WriteLogEntriesRequest.fromJson(json); |
| 1227 checkWriteLogEntriesRequest(obj); | 1227 checkWriteLogEntriesRequest(obj); |
| 1228 | 1228 |
| 1229 var path = (req.url).path; | 1229 var path = (req.url).path; |
| 1230 var pathOffset = 0; | 1230 var pathOffset = 0; |
| 1231 var index; | 1231 var index; |
| 1232 var subPart; | 1232 var subPart; |
| 1233 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1233 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 1234 pathOffset += 1; | 1234 pathOffset += 1; |
| 1235 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq
uals("v2beta1/entries:write")); | 1235 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq
uals("v2beta1/entries:write")); |
| (...skipping 16 matching lines...) Expand all Loading... |
| 1252 } | 1252 } |
| 1253 } | 1253 } |
| 1254 | 1254 |
| 1255 | 1255 |
| 1256 var h = { | 1256 var h = { |
| 1257 "content-type" : "application/json; charset=utf-8", | 1257 "content-type" : "application/json; charset=utf-8", |
| 1258 }; | 1258 }; |
| 1259 var resp = convert.JSON.encode(buildWriteLogEntriesResponse()); | 1259 var resp = convert.JSON.encode(buildWriteLogEntriesResponse()); |
| 1260 return new async.Future.value(stringResponse(200, h, resp)); | 1260 return new async.Future.value(stringResponse(200, h, resp)); |
| 1261 }), true); | 1261 }), true); |
| 1262 res.write(arg_request).then(unittest.expectAsync(((api.WriteLogEntriesResp
onse response) { | 1262 res.write(arg_request).then(unittest.expectAsync1(((api.WriteLogEntriesRes
ponse response) { |
| 1263 checkWriteLogEntriesResponse(response); | 1263 checkWriteLogEntriesResponse(response); |
| 1264 }))); | 1264 }))); |
| 1265 }); | 1265 }); |
| 1266 | 1266 |
| 1267 }); | 1267 }); |
| 1268 | 1268 |
| 1269 | 1269 |
| 1270 unittest.group("resource-MonitoredResourceDescriptorsResourceApi", () { | 1270 unittest.group("resource-MonitoredResourceDescriptorsResourceApi", () { |
| 1271 unittest.test("method--list", () { | 1271 unittest.test("method--list", () { |
| 1272 | 1272 |
| 1273 var mock = new HttpServerMock(); | 1273 var mock = new HttpServerMock(); |
| 1274 api.MonitoredResourceDescriptorsResourceApi res = new api.LoggingApi(mock)
.monitoredResourceDescriptors; | 1274 api.MonitoredResourceDescriptorsResourceApi res = new api.LoggingApi(mock)
.monitoredResourceDescriptors; |
| 1275 var arg_pageToken = "foo"; | 1275 var arg_pageToken = "foo"; |
| 1276 var arg_pageSize = 42; | 1276 var arg_pageSize = 42; |
| 1277 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1277 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 1278 var path = (req.url).path; | 1278 var path = (req.url).path; |
| 1279 var pathOffset = 0; | 1279 var pathOffset = 0; |
| 1280 var index; | 1280 var index; |
| 1281 var subPart; | 1281 var subPart; |
| 1282 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1282 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 1283 pathOffset += 1; | 1283 pathOffset += 1; |
| 1284 unittest.expect(path.substring(pathOffset, pathOffset + 36), unittest.eq
uals("v2beta1/monitoredResourceDescriptors")); | 1284 unittest.expect(path.substring(pathOffset, pathOffset + 36), unittest.eq
uals("v2beta1/monitoredResourceDescriptors")); |
| 1285 pathOffset += 36; | 1285 pathOffset += 36; |
| 1286 | 1286 |
| 1287 var query = (req.url).query; | 1287 var query = (req.url).query; |
| (...skipping 15 matching lines...) Expand all Loading... |
| 1303 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | 1303 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); |
| 1304 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ
als(arg_pageSize)); | 1304 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ
als(arg_pageSize)); |
| 1305 | 1305 |
| 1306 | 1306 |
| 1307 var h = { | 1307 var h = { |
| 1308 "content-type" : "application/json; charset=utf-8", | 1308 "content-type" : "application/json; charset=utf-8", |
| 1309 }; | 1309 }; |
| 1310 var resp = convert.JSON.encode(buildListMonitoredResourceDescriptorsResp
onse()); | 1310 var resp = convert.JSON.encode(buildListMonitoredResourceDescriptorsResp
onse()); |
| 1311 return new async.Future.value(stringResponse(200, h, resp)); | 1311 return new async.Future.value(stringResponse(200, h, resp)); |
| 1312 }), true); | 1312 }), true); |
| 1313 res.list(pageToken: arg_pageToken, pageSize: arg_pageSize).then(unittest.e
xpectAsync(((api.ListMonitoredResourceDescriptorsResponse response) { | 1313 res.list(pageToken: arg_pageToken, pageSize: arg_pageSize).then(unittest.e
xpectAsync1(((api.ListMonitoredResourceDescriptorsResponse response) { |
| 1314 checkListMonitoredResourceDescriptorsResponse(response); | 1314 checkListMonitoredResourceDescriptorsResponse(response); |
| 1315 }))); | 1315 }))); |
| 1316 }); | 1316 }); |
| 1317 | 1317 |
| 1318 }); | 1318 }); |
| 1319 | 1319 |
| 1320 | 1320 |
| 1321 unittest.group("resource-OrganizationsLogsResourceApi", () { | 1321 unittest.group("resource-OrganizationsLogsResourceApi", () { |
| 1322 unittest.test("method--delete", () { | 1322 unittest.test("method--delete", () { |
| 1323 | 1323 |
| 1324 var mock = new HttpServerMock(); | 1324 var mock = new HttpServerMock(); |
| 1325 api.OrganizationsLogsResourceApi res = new api.LoggingApi(mock).organizati
ons.logs; | 1325 api.OrganizationsLogsResourceApi res = new api.LoggingApi(mock).organizati
ons.logs; |
| 1326 var arg_logName = "foo"; | 1326 var arg_logName = "foo"; |
| 1327 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1327 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 1328 var path = (req.url).path; | 1328 var path = (req.url).path; |
| 1329 var pathOffset = 0; | 1329 var pathOffset = 0; |
| 1330 var index; | 1330 var index; |
| 1331 var subPart; | 1331 var subPart; |
| 1332 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1332 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 1333 pathOffset += 1; | 1333 pathOffset += 1; |
| 1334 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("v2beta1/")); | 1334 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("v2beta1/")); |
| 1335 pathOffset += 8; | 1335 pathOffset += 8; |
| 1336 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; | 1336 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; |
| 1337 | 1337 |
| (...skipping 14 matching lines...) Expand all Loading... |
| 1352 } | 1352 } |
| 1353 } | 1353 } |
| 1354 | 1354 |
| 1355 | 1355 |
| 1356 var h = { | 1356 var h = { |
| 1357 "content-type" : "application/json; charset=utf-8", | 1357 "content-type" : "application/json; charset=utf-8", |
| 1358 }; | 1358 }; |
| 1359 var resp = convert.JSON.encode(buildEmpty()); | 1359 var resp = convert.JSON.encode(buildEmpty()); |
| 1360 return new async.Future.value(stringResponse(200, h, resp)); | 1360 return new async.Future.value(stringResponse(200, h, resp)); |
| 1361 }), true); | 1361 }), true); |
| 1362 res.delete(arg_logName).then(unittest.expectAsync(((api.Empty response) { | 1362 res.delete(arg_logName).then(unittest.expectAsync1(((api.Empty response) { |
| 1363 checkEmpty(response); | 1363 checkEmpty(response); |
| 1364 }))); | 1364 }))); |
| 1365 }); | 1365 }); |
| 1366 | 1366 |
| 1367 unittest.test("method--list", () { | 1367 unittest.test("method--list", () { |
| 1368 | 1368 |
| 1369 var mock = new HttpServerMock(); | 1369 var mock = new HttpServerMock(); |
| 1370 api.OrganizationsLogsResourceApi res = new api.LoggingApi(mock).organizati
ons.logs; | 1370 api.OrganizationsLogsResourceApi res = new api.LoggingApi(mock).organizati
ons.logs; |
| 1371 var arg_parent = "foo"; | 1371 var arg_parent = "foo"; |
| 1372 var arg_pageToken = "foo"; | 1372 var arg_pageToken = "foo"; |
| 1373 var arg_pageSize = 42; | 1373 var arg_pageSize = 42; |
| 1374 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1374 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 1375 var path = (req.url).path; | 1375 var path = (req.url).path; |
| 1376 var pathOffset = 0; | 1376 var pathOffset = 0; |
| 1377 var index; | 1377 var index; |
| 1378 var subPart; | 1378 var subPart; |
| 1379 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1379 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 1380 pathOffset += 1; | 1380 pathOffset += 1; |
| 1381 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("v2beta1/")); | 1381 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("v2beta1/")); |
| 1382 pathOffset += 8; | 1382 pathOffset += 8; |
| 1383 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; | 1383 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; |
| 1384 | 1384 |
| (...skipping 16 matching lines...) Expand all Loading... |
| 1401 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | 1401 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); |
| 1402 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ
als(arg_pageSize)); | 1402 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ
als(arg_pageSize)); |
| 1403 | 1403 |
| 1404 | 1404 |
| 1405 var h = { | 1405 var h = { |
| 1406 "content-type" : "application/json; charset=utf-8", | 1406 "content-type" : "application/json; charset=utf-8", |
| 1407 }; | 1407 }; |
| 1408 var resp = convert.JSON.encode(buildListLogsResponse()); | 1408 var resp = convert.JSON.encode(buildListLogsResponse()); |
| 1409 return new async.Future.value(stringResponse(200, h, resp)); | 1409 return new async.Future.value(stringResponse(200, h, resp)); |
| 1410 }), true); | 1410 }), true); |
| 1411 res.list(arg_parent, pageToken: arg_pageToken, pageSize: arg_pageSize).the
n(unittest.expectAsync(((api.ListLogsResponse response) { | 1411 res.list(arg_parent, pageToken: arg_pageToken, pageSize: arg_pageSize).the
n(unittest.expectAsync1(((api.ListLogsResponse response) { |
| 1412 checkListLogsResponse(response); | 1412 checkListLogsResponse(response); |
| 1413 }))); | 1413 }))); |
| 1414 }); | 1414 }); |
| 1415 | 1415 |
| 1416 }); | 1416 }); |
| 1417 | 1417 |
| 1418 | 1418 |
| 1419 unittest.group("resource-ProjectsLogsResourceApi", () { | 1419 unittest.group("resource-ProjectsLogsResourceApi", () { |
| 1420 unittest.test("method--delete", () { | 1420 unittest.test("method--delete", () { |
| 1421 | 1421 |
| 1422 var mock = new HttpServerMock(); | 1422 var mock = new HttpServerMock(); |
| 1423 api.ProjectsLogsResourceApi res = new api.LoggingApi(mock).projects.logs; | 1423 api.ProjectsLogsResourceApi res = new api.LoggingApi(mock).projects.logs; |
| 1424 var arg_logName = "foo"; | 1424 var arg_logName = "foo"; |
| 1425 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1425 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 1426 var path = (req.url).path; | 1426 var path = (req.url).path; |
| 1427 var pathOffset = 0; | 1427 var pathOffset = 0; |
| 1428 var index; | 1428 var index; |
| 1429 var subPart; | 1429 var subPart; |
| 1430 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1430 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 1431 pathOffset += 1; | 1431 pathOffset += 1; |
| 1432 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("v2beta1/")); | 1432 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("v2beta1/")); |
| 1433 pathOffset += 8; | 1433 pathOffset += 8; |
| 1434 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; | 1434 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; |
| 1435 | 1435 |
| (...skipping 14 matching lines...) Expand all Loading... |
| 1450 } | 1450 } |
| 1451 } | 1451 } |
| 1452 | 1452 |
| 1453 | 1453 |
| 1454 var h = { | 1454 var h = { |
| 1455 "content-type" : "application/json; charset=utf-8", | 1455 "content-type" : "application/json; charset=utf-8", |
| 1456 }; | 1456 }; |
| 1457 var resp = convert.JSON.encode(buildEmpty()); | 1457 var resp = convert.JSON.encode(buildEmpty()); |
| 1458 return new async.Future.value(stringResponse(200, h, resp)); | 1458 return new async.Future.value(stringResponse(200, h, resp)); |
| 1459 }), true); | 1459 }), true); |
| 1460 res.delete(arg_logName).then(unittest.expectAsync(((api.Empty response) { | 1460 res.delete(arg_logName).then(unittest.expectAsync1(((api.Empty response) { |
| 1461 checkEmpty(response); | 1461 checkEmpty(response); |
| 1462 }))); | 1462 }))); |
| 1463 }); | 1463 }); |
| 1464 | 1464 |
| 1465 unittest.test("method--list", () { | 1465 unittest.test("method--list", () { |
| 1466 | 1466 |
| 1467 var mock = new HttpServerMock(); | 1467 var mock = new HttpServerMock(); |
| 1468 api.ProjectsLogsResourceApi res = new api.LoggingApi(mock).projects.logs; | 1468 api.ProjectsLogsResourceApi res = new api.LoggingApi(mock).projects.logs; |
| 1469 var arg_parent = "foo"; | 1469 var arg_parent = "foo"; |
| 1470 var arg_pageToken = "foo"; | 1470 var arg_pageToken = "foo"; |
| 1471 var arg_pageSize = 42; | 1471 var arg_pageSize = 42; |
| 1472 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1472 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 1473 var path = (req.url).path; | 1473 var path = (req.url).path; |
| 1474 var pathOffset = 0; | 1474 var pathOffset = 0; |
| 1475 var index; | 1475 var index; |
| 1476 var subPart; | 1476 var subPart; |
| 1477 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1477 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 1478 pathOffset += 1; | 1478 pathOffset += 1; |
| 1479 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("v2beta1/")); | 1479 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("v2beta1/")); |
| 1480 pathOffset += 8; | 1480 pathOffset += 8; |
| 1481 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; | 1481 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; |
| 1482 | 1482 |
| (...skipping 16 matching lines...) Expand all Loading... |
| 1499 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | 1499 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); |
| 1500 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ
als(arg_pageSize)); | 1500 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ
als(arg_pageSize)); |
| 1501 | 1501 |
| 1502 | 1502 |
| 1503 var h = { | 1503 var h = { |
| 1504 "content-type" : "application/json; charset=utf-8", | 1504 "content-type" : "application/json; charset=utf-8", |
| 1505 }; | 1505 }; |
| 1506 var resp = convert.JSON.encode(buildListLogsResponse()); | 1506 var resp = convert.JSON.encode(buildListLogsResponse()); |
| 1507 return new async.Future.value(stringResponse(200, h, resp)); | 1507 return new async.Future.value(stringResponse(200, h, resp)); |
| 1508 }), true); | 1508 }), true); |
| 1509 res.list(arg_parent, pageToken: arg_pageToken, pageSize: arg_pageSize).the
n(unittest.expectAsync(((api.ListLogsResponse response) { | 1509 res.list(arg_parent, pageToken: arg_pageToken, pageSize: arg_pageSize).the
n(unittest.expectAsync1(((api.ListLogsResponse response) { |
| 1510 checkListLogsResponse(response); | 1510 checkListLogsResponse(response); |
| 1511 }))); | 1511 }))); |
| 1512 }); | 1512 }); |
| 1513 | 1513 |
| 1514 }); | 1514 }); |
| 1515 | 1515 |
| 1516 | 1516 |
| 1517 unittest.group("resource-ProjectsMetricsResourceApi", () { | 1517 unittest.group("resource-ProjectsMetricsResourceApi", () { |
| 1518 unittest.test("method--create", () { | 1518 unittest.test("method--create", () { |
| 1519 | 1519 |
| 1520 var mock = new HttpServerMock(); | 1520 var mock = new HttpServerMock(); |
| 1521 api.ProjectsMetricsResourceApi res = new api.LoggingApi(mock).projects.met
rics; | 1521 api.ProjectsMetricsResourceApi res = new api.LoggingApi(mock).projects.met
rics; |
| 1522 var arg_request = buildLogMetric(); | 1522 var arg_request = buildLogMetric(); |
| 1523 var arg_parent = "foo"; | 1523 var arg_parent = "foo"; |
| 1524 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1524 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 1525 var obj = new api.LogMetric.fromJson(json); | 1525 var obj = new api.LogMetric.fromJson(json); |
| 1526 checkLogMetric(obj); | 1526 checkLogMetric(obj); |
| 1527 | 1527 |
| 1528 var path = (req.url).path; | 1528 var path = (req.url).path; |
| 1529 var pathOffset = 0; | 1529 var pathOffset = 0; |
| 1530 var index; | 1530 var index; |
| 1531 var subPart; | 1531 var subPart; |
| 1532 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1532 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 1533 pathOffset += 1; | 1533 pathOffset += 1; |
| 1534 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("v2beta1/")); | 1534 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("v2beta1/")); |
| (...skipping 17 matching lines...) Expand all Loading... |
| 1552 } | 1552 } |
| 1553 } | 1553 } |
| 1554 | 1554 |
| 1555 | 1555 |
| 1556 var h = { | 1556 var h = { |
| 1557 "content-type" : "application/json; charset=utf-8", | 1557 "content-type" : "application/json; charset=utf-8", |
| 1558 }; | 1558 }; |
| 1559 var resp = convert.JSON.encode(buildLogMetric()); | 1559 var resp = convert.JSON.encode(buildLogMetric()); |
| 1560 return new async.Future.value(stringResponse(200, h, resp)); | 1560 return new async.Future.value(stringResponse(200, h, resp)); |
| 1561 }), true); | 1561 }), true); |
| 1562 res.create(arg_request, arg_parent).then(unittest.expectAsync(((api.LogMet
ric response) { | 1562 res.create(arg_request, arg_parent).then(unittest.expectAsync1(((api.LogMe
tric response) { |
| 1563 checkLogMetric(response); | 1563 checkLogMetric(response); |
| 1564 }))); | 1564 }))); |
| 1565 }); | 1565 }); |
| 1566 | 1566 |
| 1567 unittest.test("method--delete", () { | 1567 unittest.test("method--delete", () { |
| 1568 | 1568 |
| 1569 var mock = new HttpServerMock(); | 1569 var mock = new HttpServerMock(); |
| 1570 api.ProjectsMetricsResourceApi res = new api.LoggingApi(mock).projects.met
rics; | 1570 api.ProjectsMetricsResourceApi res = new api.LoggingApi(mock).projects.met
rics; |
| 1571 var arg_metricName = "foo"; | 1571 var arg_metricName = "foo"; |
| 1572 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1572 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 1573 var path = (req.url).path; | 1573 var path = (req.url).path; |
| 1574 var pathOffset = 0; | 1574 var pathOffset = 0; |
| 1575 var index; | 1575 var index; |
| 1576 var subPart; | 1576 var subPart; |
| 1577 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1577 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 1578 pathOffset += 1; | 1578 pathOffset += 1; |
| 1579 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("v2beta1/")); | 1579 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("v2beta1/")); |
| 1580 pathOffset += 8; | 1580 pathOffset += 8; |
| 1581 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; | 1581 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; |
| 1582 | 1582 |
| (...skipping 14 matching lines...) Expand all Loading... |
| 1597 } | 1597 } |
| 1598 } | 1598 } |
| 1599 | 1599 |
| 1600 | 1600 |
| 1601 var h = { | 1601 var h = { |
| 1602 "content-type" : "application/json; charset=utf-8", | 1602 "content-type" : "application/json; charset=utf-8", |
| 1603 }; | 1603 }; |
| 1604 var resp = convert.JSON.encode(buildEmpty()); | 1604 var resp = convert.JSON.encode(buildEmpty()); |
| 1605 return new async.Future.value(stringResponse(200, h, resp)); | 1605 return new async.Future.value(stringResponse(200, h, resp)); |
| 1606 }), true); | 1606 }), true); |
| 1607 res.delete(arg_metricName).then(unittest.expectAsync(((api.Empty response)
{ | 1607 res.delete(arg_metricName).then(unittest.expectAsync1(((api.Empty response
) { |
| 1608 checkEmpty(response); | 1608 checkEmpty(response); |
| 1609 }))); | 1609 }))); |
| 1610 }); | 1610 }); |
| 1611 | 1611 |
| 1612 unittest.test("method--get", () { | 1612 unittest.test("method--get", () { |
| 1613 | 1613 |
| 1614 var mock = new HttpServerMock(); | 1614 var mock = new HttpServerMock(); |
| 1615 api.ProjectsMetricsResourceApi res = new api.LoggingApi(mock).projects.met
rics; | 1615 api.ProjectsMetricsResourceApi res = new api.LoggingApi(mock).projects.met
rics; |
| 1616 var arg_metricName = "foo"; | 1616 var arg_metricName = "foo"; |
| 1617 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1617 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 1618 var path = (req.url).path; | 1618 var path = (req.url).path; |
| 1619 var pathOffset = 0; | 1619 var pathOffset = 0; |
| 1620 var index; | 1620 var index; |
| 1621 var subPart; | 1621 var subPart; |
| 1622 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1622 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 1623 pathOffset += 1; | 1623 pathOffset += 1; |
| 1624 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("v2beta1/")); | 1624 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("v2beta1/")); |
| 1625 pathOffset += 8; | 1625 pathOffset += 8; |
| 1626 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; | 1626 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; |
| 1627 | 1627 |
| (...skipping 14 matching lines...) Expand all Loading... |
| 1642 } | 1642 } |
| 1643 } | 1643 } |
| 1644 | 1644 |
| 1645 | 1645 |
| 1646 var h = { | 1646 var h = { |
| 1647 "content-type" : "application/json; charset=utf-8", | 1647 "content-type" : "application/json; charset=utf-8", |
| 1648 }; | 1648 }; |
| 1649 var resp = convert.JSON.encode(buildLogMetric()); | 1649 var resp = convert.JSON.encode(buildLogMetric()); |
| 1650 return new async.Future.value(stringResponse(200, h, resp)); | 1650 return new async.Future.value(stringResponse(200, h, resp)); |
| 1651 }), true); | 1651 }), true); |
| 1652 res.get(arg_metricName).then(unittest.expectAsync(((api.LogMetric response
) { | 1652 res.get(arg_metricName).then(unittest.expectAsync1(((api.LogMetric respons
e) { |
| 1653 checkLogMetric(response); | 1653 checkLogMetric(response); |
| 1654 }))); | 1654 }))); |
| 1655 }); | 1655 }); |
| 1656 | 1656 |
| 1657 unittest.test("method--list", () { | 1657 unittest.test("method--list", () { |
| 1658 | 1658 |
| 1659 var mock = new HttpServerMock(); | 1659 var mock = new HttpServerMock(); |
| 1660 api.ProjectsMetricsResourceApi res = new api.LoggingApi(mock).projects.met
rics; | 1660 api.ProjectsMetricsResourceApi res = new api.LoggingApi(mock).projects.met
rics; |
| 1661 var arg_parent = "foo"; | 1661 var arg_parent = "foo"; |
| 1662 var arg_pageToken = "foo"; | 1662 var arg_pageToken = "foo"; |
| 1663 var arg_pageSize = 42; | 1663 var arg_pageSize = 42; |
| 1664 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1664 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 1665 var path = (req.url).path; | 1665 var path = (req.url).path; |
| 1666 var pathOffset = 0; | 1666 var pathOffset = 0; |
| 1667 var index; | 1667 var index; |
| 1668 var subPart; | 1668 var subPart; |
| 1669 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1669 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 1670 pathOffset += 1; | 1670 pathOffset += 1; |
| 1671 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("v2beta1/")); | 1671 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("v2beta1/")); |
| 1672 pathOffset += 8; | 1672 pathOffset += 8; |
| 1673 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; | 1673 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; |
| 1674 | 1674 |
| (...skipping 16 matching lines...) Expand all Loading... |
| 1691 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | 1691 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); |
| 1692 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ
als(arg_pageSize)); | 1692 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ
als(arg_pageSize)); |
| 1693 | 1693 |
| 1694 | 1694 |
| 1695 var h = { | 1695 var h = { |
| 1696 "content-type" : "application/json; charset=utf-8", | 1696 "content-type" : "application/json; charset=utf-8", |
| 1697 }; | 1697 }; |
| 1698 var resp = convert.JSON.encode(buildListLogMetricsResponse()); | 1698 var resp = convert.JSON.encode(buildListLogMetricsResponse()); |
| 1699 return new async.Future.value(stringResponse(200, h, resp)); | 1699 return new async.Future.value(stringResponse(200, h, resp)); |
| 1700 }), true); | 1700 }), true); |
| 1701 res.list(arg_parent, pageToken: arg_pageToken, pageSize: arg_pageSize).the
n(unittest.expectAsync(((api.ListLogMetricsResponse response) { | 1701 res.list(arg_parent, pageToken: arg_pageToken, pageSize: arg_pageSize).the
n(unittest.expectAsync1(((api.ListLogMetricsResponse response) { |
| 1702 checkListLogMetricsResponse(response); | 1702 checkListLogMetricsResponse(response); |
| 1703 }))); | 1703 }))); |
| 1704 }); | 1704 }); |
| 1705 | 1705 |
| 1706 unittest.test("method--update", () { | 1706 unittest.test("method--update", () { |
| 1707 | 1707 |
| 1708 var mock = new HttpServerMock(); | 1708 var mock = new HttpServerMock(); |
| 1709 api.ProjectsMetricsResourceApi res = new api.LoggingApi(mock).projects.met
rics; | 1709 api.ProjectsMetricsResourceApi res = new api.LoggingApi(mock).projects.met
rics; |
| 1710 var arg_request = buildLogMetric(); | 1710 var arg_request = buildLogMetric(); |
| 1711 var arg_metricName = "foo"; | 1711 var arg_metricName = "foo"; |
| 1712 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1712 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 1713 var obj = new api.LogMetric.fromJson(json); | 1713 var obj = new api.LogMetric.fromJson(json); |
| 1714 checkLogMetric(obj); | 1714 checkLogMetric(obj); |
| 1715 | 1715 |
| 1716 var path = (req.url).path; | 1716 var path = (req.url).path; |
| 1717 var pathOffset = 0; | 1717 var pathOffset = 0; |
| 1718 var index; | 1718 var index; |
| 1719 var subPart; | 1719 var subPart; |
| 1720 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1720 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 1721 pathOffset += 1; | 1721 pathOffset += 1; |
| 1722 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("v2beta1/")); | 1722 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("v2beta1/")); |
| (...skipping 17 matching lines...) Expand all Loading... |
| 1740 } | 1740 } |
| 1741 } | 1741 } |
| 1742 | 1742 |
| 1743 | 1743 |
| 1744 var h = { | 1744 var h = { |
| 1745 "content-type" : "application/json; charset=utf-8", | 1745 "content-type" : "application/json; charset=utf-8", |
| 1746 }; | 1746 }; |
| 1747 var resp = convert.JSON.encode(buildLogMetric()); | 1747 var resp = convert.JSON.encode(buildLogMetric()); |
| 1748 return new async.Future.value(stringResponse(200, h, resp)); | 1748 return new async.Future.value(stringResponse(200, h, resp)); |
| 1749 }), true); | 1749 }), true); |
| 1750 res.update(arg_request, arg_metricName).then(unittest.expectAsync(((api.Lo
gMetric response) { | 1750 res.update(arg_request, arg_metricName).then(unittest.expectAsync1(((api.L
ogMetric response) { |
| 1751 checkLogMetric(response); | 1751 checkLogMetric(response); |
| 1752 }))); | 1752 }))); |
| 1753 }); | 1753 }); |
| 1754 | 1754 |
| 1755 }); | 1755 }); |
| 1756 | 1756 |
| 1757 | 1757 |
| 1758 unittest.group("resource-ProjectsSinksResourceApi", () { | 1758 unittest.group("resource-ProjectsSinksResourceApi", () { |
| 1759 unittest.test("method--create", () { | 1759 unittest.test("method--create", () { |
| 1760 | 1760 |
| 1761 var mock = new HttpServerMock(); | 1761 var mock = new HttpServerMock(); |
| 1762 api.ProjectsSinksResourceApi res = new api.LoggingApi(mock).projects.sinks
; | 1762 api.ProjectsSinksResourceApi res = new api.LoggingApi(mock).projects.sinks
; |
| 1763 var arg_request = buildLogSink(); | 1763 var arg_request = buildLogSink(); |
| 1764 var arg_parent = "foo"; | 1764 var arg_parent = "foo"; |
| 1765 var arg_uniqueWriterIdentity = true; | 1765 var arg_uniqueWriterIdentity = true; |
| 1766 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1766 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 1767 var obj = new api.LogSink.fromJson(json); | 1767 var obj = new api.LogSink.fromJson(json); |
| 1768 checkLogSink(obj); | 1768 checkLogSink(obj); |
| 1769 | 1769 |
| 1770 var path = (req.url).path; | 1770 var path = (req.url).path; |
| 1771 var pathOffset = 0; | 1771 var pathOffset = 0; |
| 1772 var index; | 1772 var index; |
| 1773 var subPart; | 1773 var subPart; |
| 1774 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1774 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 1775 pathOffset += 1; | 1775 pathOffset += 1; |
| 1776 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("v2beta1/")); | 1776 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("v2beta1/")); |
| (...skipping 18 matching lines...) Expand all Loading... |
| 1795 } | 1795 } |
| 1796 unittest.expect(queryMap["uniqueWriterIdentity"].first, unittest.equals(
"$arg_uniqueWriterIdentity")); | 1796 unittest.expect(queryMap["uniqueWriterIdentity"].first, unittest.equals(
"$arg_uniqueWriterIdentity")); |
| 1797 | 1797 |
| 1798 | 1798 |
| 1799 var h = { | 1799 var h = { |
| 1800 "content-type" : "application/json; charset=utf-8", | 1800 "content-type" : "application/json; charset=utf-8", |
| 1801 }; | 1801 }; |
| 1802 var resp = convert.JSON.encode(buildLogSink()); | 1802 var resp = convert.JSON.encode(buildLogSink()); |
| 1803 return new async.Future.value(stringResponse(200, h, resp)); | 1803 return new async.Future.value(stringResponse(200, h, resp)); |
| 1804 }), true); | 1804 }), true); |
| 1805 res.create(arg_request, arg_parent, uniqueWriterIdentity: arg_uniqueWriter
Identity).then(unittest.expectAsync(((api.LogSink response) { | 1805 res.create(arg_request, arg_parent, uniqueWriterIdentity: arg_uniqueWriter
Identity).then(unittest.expectAsync1(((api.LogSink response) { |
| 1806 checkLogSink(response); | 1806 checkLogSink(response); |
| 1807 }))); | 1807 }))); |
| 1808 }); | 1808 }); |
| 1809 | 1809 |
| 1810 unittest.test("method--delete", () { | 1810 unittest.test("method--delete", () { |
| 1811 | 1811 |
| 1812 var mock = new HttpServerMock(); | 1812 var mock = new HttpServerMock(); |
| 1813 api.ProjectsSinksResourceApi res = new api.LoggingApi(mock).projects.sinks
; | 1813 api.ProjectsSinksResourceApi res = new api.LoggingApi(mock).projects.sinks
; |
| 1814 var arg_sinkName = "foo"; | 1814 var arg_sinkName = "foo"; |
| 1815 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1815 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 1816 var path = (req.url).path; | 1816 var path = (req.url).path; |
| 1817 var pathOffset = 0; | 1817 var pathOffset = 0; |
| 1818 var index; | 1818 var index; |
| 1819 var subPart; | 1819 var subPart; |
| 1820 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1820 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 1821 pathOffset += 1; | 1821 pathOffset += 1; |
| 1822 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("v2beta1/")); | 1822 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("v2beta1/")); |
| 1823 pathOffset += 8; | 1823 pathOffset += 8; |
| 1824 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; | 1824 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; |
| 1825 | 1825 |
| (...skipping 14 matching lines...) Expand all Loading... |
| 1840 } | 1840 } |
| 1841 } | 1841 } |
| 1842 | 1842 |
| 1843 | 1843 |
| 1844 var h = { | 1844 var h = { |
| 1845 "content-type" : "application/json; charset=utf-8", | 1845 "content-type" : "application/json; charset=utf-8", |
| 1846 }; | 1846 }; |
| 1847 var resp = convert.JSON.encode(buildEmpty()); | 1847 var resp = convert.JSON.encode(buildEmpty()); |
| 1848 return new async.Future.value(stringResponse(200, h, resp)); | 1848 return new async.Future.value(stringResponse(200, h, resp)); |
| 1849 }), true); | 1849 }), true); |
| 1850 res.delete(arg_sinkName).then(unittest.expectAsync(((api.Empty response) { | 1850 res.delete(arg_sinkName).then(unittest.expectAsync1(((api.Empty response)
{ |
| 1851 checkEmpty(response); | 1851 checkEmpty(response); |
| 1852 }))); | 1852 }))); |
| 1853 }); | 1853 }); |
| 1854 | 1854 |
| 1855 unittest.test("method--get", () { | 1855 unittest.test("method--get", () { |
| 1856 | 1856 |
| 1857 var mock = new HttpServerMock(); | 1857 var mock = new HttpServerMock(); |
| 1858 api.ProjectsSinksResourceApi res = new api.LoggingApi(mock).projects.sinks
; | 1858 api.ProjectsSinksResourceApi res = new api.LoggingApi(mock).projects.sinks
; |
| 1859 var arg_sinkName = "foo"; | 1859 var arg_sinkName = "foo"; |
| 1860 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1860 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 1861 var path = (req.url).path; | 1861 var path = (req.url).path; |
| 1862 var pathOffset = 0; | 1862 var pathOffset = 0; |
| 1863 var index; | 1863 var index; |
| 1864 var subPart; | 1864 var subPart; |
| 1865 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1865 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 1866 pathOffset += 1; | 1866 pathOffset += 1; |
| 1867 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("v2beta1/")); | 1867 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("v2beta1/")); |
| 1868 pathOffset += 8; | 1868 pathOffset += 8; |
| 1869 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; | 1869 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; |
| 1870 | 1870 |
| (...skipping 14 matching lines...) Expand all Loading... |
| 1885 } | 1885 } |
| 1886 } | 1886 } |
| 1887 | 1887 |
| 1888 | 1888 |
| 1889 var h = { | 1889 var h = { |
| 1890 "content-type" : "application/json; charset=utf-8", | 1890 "content-type" : "application/json; charset=utf-8", |
| 1891 }; | 1891 }; |
| 1892 var resp = convert.JSON.encode(buildLogSink()); | 1892 var resp = convert.JSON.encode(buildLogSink()); |
| 1893 return new async.Future.value(stringResponse(200, h, resp)); | 1893 return new async.Future.value(stringResponse(200, h, resp)); |
| 1894 }), true); | 1894 }), true); |
| 1895 res.get(arg_sinkName).then(unittest.expectAsync(((api.LogSink response) { | 1895 res.get(arg_sinkName).then(unittest.expectAsync1(((api.LogSink response) { |
| 1896 checkLogSink(response); | 1896 checkLogSink(response); |
| 1897 }))); | 1897 }))); |
| 1898 }); | 1898 }); |
| 1899 | 1899 |
| 1900 unittest.test("method--list", () { | 1900 unittest.test("method--list", () { |
| 1901 | 1901 |
| 1902 var mock = new HttpServerMock(); | 1902 var mock = new HttpServerMock(); |
| 1903 api.ProjectsSinksResourceApi res = new api.LoggingApi(mock).projects.sinks
; | 1903 api.ProjectsSinksResourceApi res = new api.LoggingApi(mock).projects.sinks
; |
| 1904 var arg_parent = "foo"; | 1904 var arg_parent = "foo"; |
| 1905 var arg_pageToken = "foo"; | 1905 var arg_pageToken = "foo"; |
| 1906 var arg_pageSize = 42; | 1906 var arg_pageSize = 42; |
| 1907 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1907 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 1908 var path = (req.url).path; | 1908 var path = (req.url).path; |
| 1909 var pathOffset = 0; | 1909 var pathOffset = 0; |
| 1910 var index; | 1910 var index; |
| 1911 var subPart; | 1911 var subPart; |
| 1912 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1912 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 1913 pathOffset += 1; | 1913 pathOffset += 1; |
| 1914 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("v2beta1/")); | 1914 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("v2beta1/")); |
| 1915 pathOffset += 8; | 1915 pathOffset += 8; |
| 1916 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; | 1916 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; |
| 1917 | 1917 |
| (...skipping 16 matching lines...) Expand all Loading... |
| 1934 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | 1934 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); |
| 1935 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ
als(arg_pageSize)); | 1935 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ
als(arg_pageSize)); |
| 1936 | 1936 |
| 1937 | 1937 |
| 1938 var h = { | 1938 var h = { |
| 1939 "content-type" : "application/json; charset=utf-8", | 1939 "content-type" : "application/json; charset=utf-8", |
| 1940 }; | 1940 }; |
| 1941 var resp = convert.JSON.encode(buildListSinksResponse()); | 1941 var resp = convert.JSON.encode(buildListSinksResponse()); |
| 1942 return new async.Future.value(stringResponse(200, h, resp)); | 1942 return new async.Future.value(stringResponse(200, h, resp)); |
| 1943 }), true); | 1943 }), true); |
| 1944 res.list(arg_parent, pageToken: arg_pageToken, pageSize: arg_pageSize).the
n(unittest.expectAsync(((api.ListSinksResponse response) { | 1944 res.list(arg_parent, pageToken: arg_pageToken, pageSize: arg_pageSize).the
n(unittest.expectAsync1(((api.ListSinksResponse response) { |
| 1945 checkListSinksResponse(response); | 1945 checkListSinksResponse(response); |
| 1946 }))); | 1946 }))); |
| 1947 }); | 1947 }); |
| 1948 | 1948 |
| 1949 unittest.test("method--update", () { | 1949 unittest.test("method--update", () { |
| 1950 | 1950 |
| 1951 var mock = new HttpServerMock(); | 1951 var mock = new HttpServerMock(); |
| 1952 api.ProjectsSinksResourceApi res = new api.LoggingApi(mock).projects.sinks
; | 1952 api.ProjectsSinksResourceApi res = new api.LoggingApi(mock).projects.sinks
; |
| 1953 var arg_request = buildLogSink(); | 1953 var arg_request = buildLogSink(); |
| 1954 var arg_sinkName = "foo"; | 1954 var arg_sinkName = "foo"; |
| 1955 var arg_uniqueWriterIdentity = true; | 1955 var arg_uniqueWriterIdentity = true; |
| 1956 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1956 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 1957 var obj = new api.LogSink.fromJson(json); | 1957 var obj = new api.LogSink.fromJson(json); |
| 1958 checkLogSink(obj); | 1958 checkLogSink(obj); |
| 1959 | 1959 |
| 1960 var path = (req.url).path; | 1960 var path = (req.url).path; |
| 1961 var pathOffset = 0; | 1961 var pathOffset = 0; |
| 1962 var index; | 1962 var index; |
| 1963 var subPart; | 1963 var subPart; |
| 1964 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1964 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 1965 pathOffset += 1; | 1965 pathOffset += 1; |
| 1966 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("v2beta1/")); | 1966 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("v2beta1/")); |
| (...skipping 18 matching lines...) Expand all Loading... |
| 1985 } | 1985 } |
| 1986 unittest.expect(queryMap["uniqueWriterIdentity"].first, unittest.equals(
"$arg_uniqueWriterIdentity")); | 1986 unittest.expect(queryMap["uniqueWriterIdentity"].first, unittest.equals(
"$arg_uniqueWriterIdentity")); |
| 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(buildLogSink()); | 1992 var resp = convert.JSON.encode(buildLogSink()); |
| 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.update(arg_request, arg_sinkName, uniqueWriterIdentity: arg_uniqueWrit
erIdentity).then(unittest.expectAsync(((api.LogSink response) { | 1995 res.update(arg_request, arg_sinkName, uniqueWriterIdentity: arg_uniqueWrit
erIdentity).then(unittest.expectAsync1(((api.LogSink response) { |
| 1996 checkLogSink(response); | 1996 checkLogSink(response); |
| 1997 }))); | 1997 }))); |
| 1998 }); | 1998 }); |
| 1999 | 1999 |
| 2000 }); | 2000 }); |
| 2001 | 2001 |
| 2002 | 2002 |
| 2003 } | 2003 } |
| 2004 | 2004 |
| OLD | NEW |