| 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:test/test.dart' as unittest; | 10 import 'package:test/test.dart' as unittest; |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 core.int buildCounterHttpRequest = 0; | 71 core.int buildCounterHttpRequest = 0; |
| 72 buildHttpRequest() { | 72 buildHttpRequest() { |
| 73 var o = new api.HttpRequest(); | 73 var o = new api.HttpRequest(); |
| 74 buildCounterHttpRequest++; | 74 buildCounterHttpRequest++; |
| 75 if (buildCounterHttpRequest < 3) { | 75 if (buildCounterHttpRequest < 3) { |
| 76 o.cacheFillBytes = "foo"; | 76 o.cacheFillBytes = "foo"; |
| 77 o.cacheHit = true; | 77 o.cacheHit = true; |
| 78 o.cacheLookup = true; | 78 o.cacheLookup = true; |
| 79 o.cacheValidatedWithOriginServer = true; | 79 o.cacheValidatedWithOriginServer = true; |
| 80 o.latency = "foo"; | 80 o.latency = "foo"; |
| 81 o.protocol = "foo"; |
| 81 o.referer = "foo"; | 82 o.referer = "foo"; |
| 82 o.remoteIp = "foo"; | 83 o.remoteIp = "foo"; |
| 83 o.requestMethod = "foo"; | 84 o.requestMethod = "foo"; |
| 84 o.requestSize = "foo"; | 85 o.requestSize = "foo"; |
| 85 o.requestUrl = "foo"; | 86 o.requestUrl = "foo"; |
| 86 o.responseSize = "foo"; | 87 o.responseSize = "foo"; |
| 87 o.serverIp = "foo"; | 88 o.serverIp = "foo"; |
| 88 o.status = 42; | 89 o.status = 42; |
| 89 o.userAgent = "foo"; | 90 o.userAgent = "foo"; |
| 90 } | 91 } |
| 91 buildCounterHttpRequest--; | 92 buildCounterHttpRequest--; |
| 92 return o; | 93 return o; |
| 93 } | 94 } |
| 94 | 95 |
| 95 checkHttpRequest(api.HttpRequest o) { | 96 checkHttpRequest(api.HttpRequest o) { |
| 96 buildCounterHttpRequest++; | 97 buildCounterHttpRequest++; |
| 97 if (buildCounterHttpRequest < 3) { | 98 if (buildCounterHttpRequest < 3) { |
| 98 unittest.expect(o.cacheFillBytes, unittest.equals('foo')); | 99 unittest.expect(o.cacheFillBytes, unittest.equals('foo')); |
| 99 unittest.expect(o.cacheHit, unittest.isTrue); | 100 unittest.expect(o.cacheHit, unittest.isTrue); |
| 100 unittest.expect(o.cacheLookup, unittest.isTrue); | 101 unittest.expect(o.cacheLookup, unittest.isTrue); |
| 101 unittest.expect(o.cacheValidatedWithOriginServer, unittest.isTrue); | 102 unittest.expect(o.cacheValidatedWithOriginServer, unittest.isTrue); |
| 102 unittest.expect(o.latency, unittest.equals('foo')); | 103 unittest.expect(o.latency, unittest.equals('foo')); |
| 104 unittest.expect(o.protocol, unittest.equals('foo')); |
| 103 unittest.expect(o.referer, unittest.equals('foo')); | 105 unittest.expect(o.referer, unittest.equals('foo')); |
| 104 unittest.expect(o.remoteIp, unittest.equals('foo')); | 106 unittest.expect(o.remoteIp, unittest.equals('foo')); |
| 105 unittest.expect(o.requestMethod, unittest.equals('foo')); | 107 unittest.expect(o.requestMethod, unittest.equals('foo')); |
| 106 unittest.expect(o.requestSize, unittest.equals('foo')); | 108 unittest.expect(o.requestSize, unittest.equals('foo')); |
| 107 unittest.expect(o.requestUrl, unittest.equals('foo')); | 109 unittest.expect(o.requestUrl, unittest.equals('foo')); |
| 108 unittest.expect(o.responseSize, unittest.equals('foo')); | 110 unittest.expect(o.responseSize, unittest.equals('foo')); |
| 109 unittest.expect(o.serverIp, unittest.equals('foo')); | 111 unittest.expect(o.serverIp, unittest.equals('foo')); |
| 110 unittest.expect(o.status, unittest.equals(42)); | 112 unittest.expect(o.status, unittest.equals(42)); |
| 111 unittest.expect(o.userAgent, unittest.equals('foo')); | 113 unittest.expect(o.userAgent, unittest.equals('foo')); |
| 112 } | 114 } |
| (...skipping 16 matching lines...) Expand all Loading... |
| 129 checkLabelDescriptor(api.LabelDescriptor o) { | 131 checkLabelDescriptor(api.LabelDescriptor o) { |
| 130 buildCounterLabelDescriptor++; | 132 buildCounterLabelDescriptor++; |
| 131 if (buildCounterLabelDescriptor < 3) { | 133 if (buildCounterLabelDescriptor < 3) { |
| 132 unittest.expect(o.description, unittest.equals('foo')); | 134 unittest.expect(o.description, unittest.equals('foo')); |
| 133 unittest.expect(o.key, unittest.equals('foo')); | 135 unittest.expect(o.key, unittest.equals('foo')); |
| 134 unittest.expect(o.valueType, unittest.equals('foo')); | 136 unittest.expect(o.valueType, unittest.equals('foo')); |
| 135 } | 137 } |
| 136 buildCounterLabelDescriptor--; | 138 buildCounterLabelDescriptor--; |
| 137 } | 139 } |
| 138 | 140 |
| 139 buildUnnamed3450() { | 141 buildUnnamed3482() { |
| 140 var o = new core.List<core.String>(); | 142 var o = new core.List<core.String>(); |
| 141 o.add("foo"); | 143 o.add("foo"); |
| 142 o.add("foo"); | 144 o.add("foo"); |
| 143 return o; | 145 return o; |
| 144 } | 146 } |
| 145 | 147 |
| 146 checkUnnamed3450(core.List<core.String> o) { | 148 checkUnnamed3482(core.List<core.String> o) { |
| 147 unittest.expect(o, unittest.hasLength(2)); | 149 unittest.expect(o, unittest.hasLength(2)); |
| 148 unittest.expect(o[0], unittest.equals('foo')); | 150 unittest.expect(o[0], unittest.equals('foo')); |
| 149 unittest.expect(o[1], unittest.equals('foo')); | 151 unittest.expect(o[1], unittest.equals('foo')); |
| 150 } | 152 } |
| 151 | 153 |
| 152 buildUnnamed3451() { | 154 buildUnnamed3483() { |
| 153 var o = new core.List<core.String>(); | 155 var o = new core.List<core.String>(); |
| 154 o.add("foo"); | 156 o.add("foo"); |
| 155 o.add("foo"); | 157 o.add("foo"); |
| 156 return o; | 158 return o; |
| 157 } | 159 } |
| 158 | 160 |
| 159 checkUnnamed3451(core.List<core.String> o) { | 161 checkUnnamed3483(core.List<core.String> o) { |
| 160 unittest.expect(o, unittest.hasLength(2)); | 162 unittest.expect(o, unittest.hasLength(2)); |
| 161 unittest.expect(o[0], unittest.equals('foo')); | 163 unittest.expect(o[0], unittest.equals('foo')); |
| 162 unittest.expect(o[1], unittest.equals('foo')); | 164 unittest.expect(o[1], unittest.equals('foo')); |
| 163 } | 165 } |
| 164 | 166 |
| 165 core.int buildCounterListLogEntriesRequest = 0; | 167 core.int buildCounterListLogEntriesRequest = 0; |
| 166 buildListLogEntriesRequest() { | 168 buildListLogEntriesRequest() { |
| 167 var o = new api.ListLogEntriesRequest(); | 169 var o = new api.ListLogEntriesRequest(); |
| 168 buildCounterListLogEntriesRequest++; | 170 buildCounterListLogEntriesRequest++; |
| 169 if (buildCounterListLogEntriesRequest < 3) { | 171 if (buildCounterListLogEntriesRequest < 3) { |
| 170 o.filter = "foo"; | 172 o.filter = "foo"; |
| 171 o.orderBy = "foo"; | 173 o.orderBy = "foo"; |
| 172 o.pageSize = 42; | 174 o.pageSize = 42; |
| 173 o.pageToken = "foo"; | 175 o.pageToken = "foo"; |
| 174 o.projectIds = buildUnnamed3450(); | 176 o.projectIds = buildUnnamed3482(); |
| 175 o.resourceNames = buildUnnamed3451(); | 177 o.resourceNames = buildUnnamed3483(); |
| 176 } | 178 } |
| 177 buildCounterListLogEntriesRequest--; | 179 buildCounterListLogEntriesRequest--; |
| 178 return o; | 180 return o; |
| 179 } | 181 } |
| 180 | 182 |
| 181 checkListLogEntriesRequest(api.ListLogEntriesRequest o) { | 183 checkListLogEntriesRequest(api.ListLogEntriesRequest o) { |
| 182 buildCounterListLogEntriesRequest++; | 184 buildCounterListLogEntriesRequest++; |
| 183 if (buildCounterListLogEntriesRequest < 3) { | 185 if (buildCounterListLogEntriesRequest < 3) { |
| 184 unittest.expect(o.filter, unittest.equals('foo')); | 186 unittest.expect(o.filter, unittest.equals('foo')); |
| 185 unittest.expect(o.orderBy, unittest.equals('foo')); | 187 unittest.expect(o.orderBy, unittest.equals('foo')); |
| 186 unittest.expect(o.pageSize, unittest.equals(42)); | 188 unittest.expect(o.pageSize, unittest.equals(42)); |
| 187 unittest.expect(o.pageToken, unittest.equals('foo')); | 189 unittest.expect(o.pageToken, unittest.equals('foo')); |
| 188 checkUnnamed3450(o.projectIds); | 190 checkUnnamed3482(o.projectIds); |
| 189 checkUnnamed3451(o.resourceNames); | 191 checkUnnamed3483(o.resourceNames); |
| 190 } | 192 } |
| 191 buildCounterListLogEntriesRequest--; | 193 buildCounterListLogEntriesRequest--; |
| 192 } | 194 } |
| 193 | 195 |
| 194 buildUnnamed3452() { | 196 buildUnnamed3484() { |
| 195 var o = new core.List<api.LogEntry>(); | 197 var o = new core.List<api.LogEntry>(); |
| 196 o.add(buildLogEntry()); | 198 o.add(buildLogEntry()); |
| 197 o.add(buildLogEntry()); | 199 o.add(buildLogEntry()); |
| 198 return o; | 200 return o; |
| 199 } | 201 } |
| 200 | 202 |
| 201 checkUnnamed3452(core.List<api.LogEntry> o) { | 203 checkUnnamed3484(core.List<api.LogEntry> o) { |
| 202 unittest.expect(o, unittest.hasLength(2)); | 204 unittest.expect(o, unittest.hasLength(2)); |
| 203 checkLogEntry(o[0]); | 205 checkLogEntry(o[0]); |
| 204 checkLogEntry(o[1]); | 206 checkLogEntry(o[1]); |
| 205 } | 207 } |
| 206 | 208 |
| 207 core.int buildCounterListLogEntriesResponse = 0; | 209 core.int buildCounterListLogEntriesResponse = 0; |
| 208 buildListLogEntriesResponse() { | 210 buildListLogEntriesResponse() { |
| 209 var o = new api.ListLogEntriesResponse(); | 211 var o = new api.ListLogEntriesResponse(); |
| 210 buildCounterListLogEntriesResponse++; | 212 buildCounterListLogEntriesResponse++; |
| 211 if (buildCounterListLogEntriesResponse < 3) { | 213 if (buildCounterListLogEntriesResponse < 3) { |
| 212 o.entries = buildUnnamed3452(); | 214 o.entries = buildUnnamed3484(); |
| 213 o.nextPageToken = "foo"; | 215 o.nextPageToken = "foo"; |
| 214 } | 216 } |
| 215 buildCounterListLogEntriesResponse--; | 217 buildCounterListLogEntriesResponse--; |
| 216 return o; | 218 return o; |
| 217 } | 219 } |
| 218 | 220 |
| 219 checkListLogEntriesResponse(api.ListLogEntriesResponse o) { | 221 checkListLogEntriesResponse(api.ListLogEntriesResponse o) { |
| 220 buildCounterListLogEntriesResponse++; | 222 buildCounterListLogEntriesResponse++; |
| 221 if (buildCounterListLogEntriesResponse < 3) { | 223 if (buildCounterListLogEntriesResponse < 3) { |
| 222 checkUnnamed3452(o.entries); | 224 checkUnnamed3484(o.entries); |
| 223 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 225 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
| 224 } | 226 } |
| 225 buildCounterListLogEntriesResponse--; | 227 buildCounterListLogEntriesResponse--; |
| 226 } | 228 } |
| 227 | 229 |
| 228 buildUnnamed3453() { | 230 buildUnnamed3485() { |
| 229 var o = new core.List<api.LogMetric>(); | 231 var o = new core.List<api.LogMetric>(); |
| 230 o.add(buildLogMetric()); | 232 o.add(buildLogMetric()); |
| 231 o.add(buildLogMetric()); | 233 o.add(buildLogMetric()); |
| 232 return o; | 234 return o; |
| 233 } | 235 } |
| 234 | 236 |
| 235 checkUnnamed3453(core.List<api.LogMetric> o) { | 237 checkUnnamed3485(core.List<api.LogMetric> o) { |
| 236 unittest.expect(o, unittest.hasLength(2)); | 238 unittest.expect(o, unittest.hasLength(2)); |
| 237 checkLogMetric(o[0]); | 239 checkLogMetric(o[0]); |
| 238 checkLogMetric(o[1]); | 240 checkLogMetric(o[1]); |
| 239 } | 241 } |
| 240 | 242 |
| 241 core.int buildCounterListLogMetricsResponse = 0; | 243 core.int buildCounterListLogMetricsResponse = 0; |
| 242 buildListLogMetricsResponse() { | 244 buildListLogMetricsResponse() { |
| 243 var o = new api.ListLogMetricsResponse(); | 245 var o = new api.ListLogMetricsResponse(); |
| 244 buildCounterListLogMetricsResponse++; | 246 buildCounterListLogMetricsResponse++; |
| 245 if (buildCounterListLogMetricsResponse < 3) { | 247 if (buildCounterListLogMetricsResponse < 3) { |
| 246 o.metrics = buildUnnamed3453(); | 248 o.metrics = buildUnnamed3485(); |
| 247 o.nextPageToken = "foo"; | 249 o.nextPageToken = "foo"; |
| 248 } | 250 } |
| 249 buildCounterListLogMetricsResponse--; | 251 buildCounterListLogMetricsResponse--; |
| 250 return o; | 252 return o; |
| 251 } | 253 } |
| 252 | 254 |
| 253 checkListLogMetricsResponse(api.ListLogMetricsResponse o) { | 255 checkListLogMetricsResponse(api.ListLogMetricsResponse o) { |
| 254 buildCounterListLogMetricsResponse++; | 256 buildCounterListLogMetricsResponse++; |
| 255 if (buildCounterListLogMetricsResponse < 3) { | 257 if (buildCounterListLogMetricsResponse < 3) { |
| 256 checkUnnamed3453(o.metrics); | 258 checkUnnamed3485(o.metrics); |
| 257 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 259 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
| 258 } | 260 } |
| 259 buildCounterListLogMetricsResponse--; | 261 buildCounterListLogMetricsResponse--; |
| 260 } | 262 } |
| 261 | 263 |
| 262 buildUnnamed3454() { | 264 buildUnnamed3486() { |
| 263 var o = new core.List<core.String>(); | 265 var o = new core.List<core.String>(); |
| 264 o.add("foo"); | 266 o.add("foo"); |
| 265 o.add("foo"); | 267 o.add("foo"); |
| 266 return o; | 268 return o; |
| 267 } | 269 } |
| 268 | 270 |
| 269 checkUnnamed3454(core.List<core.String> o) { | 271 checkUnnamed3486(core.List<core.String> o) { |
| 270 unittest.expect(o, unittest.hasLength(2)); | 272 unittest.expect(o, unittest.hasLength(2)); |
| 271 unittest.expect(o[0], unittest.equals('foo')); | 273 unittest.expect(o[0], unittest.equals('foo')); |
| 272 unittest.expect(o[1], unittest.equals('foo')); | 274 unittest.expect(o[1], unittest.equals('foo')); |
| 273 } | 275 } |
| 274 | 276 |
| 275 core.int buildCounterListLogsResponse = 0; | 277 core.int buildCounterListLogsResponse = 0; |
| 276 buildListLogsResponse() { | 278 buildListLogsResponse() { |
| 277 var o = new api.ListLogsResponse(); | 279 var o = new api.ListLogsResponse(); |
| 278 buildCounterListLogsResponse++; | 280 buildCounterListLogsResponse++; |
| 279 if (buildCounterListLogsResponse < 3) { | 281 if (buildCounterListLogsResponse < 3) { |
| 280 o.logNames = buildUnnamed3454(); | 282 o.logNames = buildUnnamed3486(); |
| 281 o.nextPageToken = "foo"; | 283 o.nextPageToken = "foo"; |
| 282 } | 284 } |
| 283 buildCounterListLogsResponse--; | 285 buildCounterListLogsResponse--; |
| 284 return o; | 286 return o; |
| 285 } | 287 } |
| 286 | 288 |
| 287 checkListLogsResponse(api.ListLogsResponse o) { | 289 checkListLogsResponse(api.ListLogsResponse o) { |
| 288 buildCounterListLogsResponse++; | 290 buildCounterListLogsResponse++; |
| 289 if (buildCounterListLogsResponse < 3) { | 291 if (buildCounterListLogsResponse < 3) { |
| 290 checkUnnamed3454(o.logNames); | 292 checkUnnamed3486(o.logNames); |
| 291 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 293 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
| 292 } | 294 } |
| 293 buildCounterListLogsResponse--; | 295 buildCounterListLogsResponse--; |
| 294 } | 296 } |
| 295 | 297 |
| 296 buildUnnamed3455() { | 298 buildUnnamed3487() { |
| 297 var o = new core.List<api.MonitoredResourceDescriptor>(); | 299 var o = new core.List<api.MonitoredResourceDescriptor>(); |
| 298 o.add(buildMonitoredResourceDescriptor()); | 300 o.add(buildMonitoredResourceDescriptor()); |
| 299 o.add(buildMonitoredResourceDescriptor()); | 301 o.add(buildMonitoredResourceDescriptor()); |
| 300 return o; | 302 return o; |
| 301 } | 303 } |
| 302 | 304 |
| 303 checkUnnamed3455(core.List<api.MonitoredResourceDescriptor> o) { | 305 checkUnnamed3487(core.List<api.MonitoredResourceDescriptor> o) { |
| 304 unittest.expect(o, unittest.hasLength(2)); | 306 unittest.expect(o, unittest.hasLength(2)); |
| 305 checkMonitoredResourceDescriptor(o[0]); | 307 checkMonitoredResourceDescriptor(o[0]); |
| 306 checkMonitoredResourceDescriptor(o[1]); | 308 checkMonitoredResourceDescriptor(o[1]); |
| 307 } | 309 } |
| 308 | 310 |
| 309 core.int buildCounterListMonitoredResourceDescriptorsResponse = 0; | 311 core.int buildCounterListMonitoredResourceDescriptorsResponse = 0; |
| 310 buildListMonitoredResourceDescriptorsResponse() { | 312 buildListMonitoredResourceDescriptorsResponse() { |
| 311 var o = new api.ListMonitoredResourceDescriptorsResponse(); | 313 var o = new api.ListMonitoredResourceDescriptorsResponse(); |
| 312 buildCounterListMonitoredResourceDescriptorsResponse++; | 314 buildCounterListMonitoredResourceDescriptorsResponse++; |
| 313 if (buildCounterListMonitoredResourceDescriptorsResponse < 3) { | 315 if (buildCounterListMonitoredResourceDescriptorsResponse < 3) { |
| 314 o.nextPageToken = "foo"; | 316 o.nextPageToken = "foo"; |
| 315 o.resourceDescriptors = buildUnnamed3455(); | 317 o.resourceDescriptors = buildUnnamed3487(); |
| 316 } | 318 } |
| 317 buildCounterListMonitoredResourceDescriptorsResponse--; | 319 buildCounterListMonitoredResourceDescriptorsResponse--; |
| 318 return o; | 320 return o; |
| 319 } | 321 } |
| 320 | 322 |
| 321 checkListMonitoredResourceDescriptorsResponse(api.ListMonitoredResourceDescripto
rsResponse o) { | 323 checkListMonitoredResourceDescriptorsResponse(api.ListMonitoredResourceDescripto
rsResponse o) { |
| 322 buildCounterListMonitoredResourceDescriptorsResponse++; | 324 buildCounterListMonitoredResourceDescriptorsResponse++; |
| 323 if (buildCounterListMonitoredResourceDescriptorsResponse < 3) { | 325 if (buildCounterListMonitoredResourceDescriptorsResponse < 3) { |
| 324 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 326 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
| 325 checkUnnamed3455(o.resourceDescriptors); | 327 checkUnnamed3487(o.resourceDescriptors); |
| 326 } | 328 } |
| 327 buildCounterListMonitoredResourceDescriptorsResponse--; | 329 buildCounterListMonitoredResourceDescriptorsResponse--; |
| 328 } | 330 } |
| 329 | 331 |
| 330 buildUnnamed3456() { | 332 buildUnnamed3488() { |
| 331 var o = new core.List<api.LogSink>(); | 333 var o = new core.List<api.LogSink>(); |
| 332 o.add(buildLogSink()); | 334 o.add(buildLogSink()); |
| 333 o.add(buildLogSink()); | 335 o.add(buildLogSink()); |
| 334 return o; | 336 return o; |
| 335 } | 337 } |
| 336 | 338 |
| 337 checkUnnamed3456(core.List<api.LogSink> o) { | 339 checkUnnamed3488(core.List<api.LogSink> o) { |
| 338 unittest.expect(o, unittest.hasLength(2)); | 340 unittest.expect(o, unittest.hasLength(2)); |
| 339 checkLogSink(o[0]); | 341 checkLogSink(o[0]); |
| 340 checkLogSink(o[1]); | 342 checkLogSink(o[1]); |
| 341 } | 343 } |
| 342 | 344 |
| 343 core.int buildCounterListSinksResponse = 0; | 345 core.int buildCounterListSinksResponse = 0; |
| 344 buildListSinksResponse() { | 346 buildListSinksResponse() { |
| 345 var o = new api.ListSinksResponse(); | 347 var o = new api.ListSinksResponse(); |
| 346 buildCounterListSinksResponse++; | 348 buildCounterListSinksResponse++; |
| 347 if (buildCounterListSinksResponse < 3) { | 349 if (buildCounterListSinksResponse < 3) { |
| 348 o.nextPageToken = "foo"; | 350 o.nextPageToken = "foo"; |
| 349 o.sinks = buildUnnamed3456(); | 351 o.sinks = buildUnnamed3488(); |
| 350 } | 352 } |
| 351 buildCounterListSinksResponse--; | 353 buildCounterListSinksResponse--; |
| 352 return o; | 354 return o; |
| 353 } | 355 } |
| 354 | 356 |
| 355 checkListSinksResponse(api.ListSinksResponse o) { | 357 checkListSinksResponse(api.ListSinksResponse o) { |
| 356 buildCounterListSinksResponse++; | 358 buildCounterListSinksResponse++; |
| 357 if (buildCounterListSinksResponse < 3) { | 359 if (buildCounterListSinksResponse < 3) { |
| 358 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 360 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
| 359 checkUnnamed3456(o.sinks); | 361 checkUnnamed3488(o.sinks); |
| 360 } | 362 } |
| 361 buildCounterListSinksResponse--; | 363 buildCounterListSinksResponse--; |
| 362 } | 364 } |
| 363 | 365 |
| 364 buildUnnamed3457() { | 366 buildUnnamed3489() { |
| 365 var o = new core.Map<core.String, core.Object>(); | 367 var o = new core.Map<core.String, core.Object>(); |
| 366 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 368 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; |
| 367 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 369 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; |
| 368 return o; | 370 return o; |
| 369 } | 371 } |
| 370 | 372 |
| 371 checkUnnamed3457(core.Map<core.String, core.Object> o) { | 373 checkUnnamed3489(core.Map<core.String, core.Object> o) { |
| 372 unittest.expect(o, unittest.hasLength(2)); | 374 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')); | 375 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')); | 376 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 } | 377 } |
| 376 | 378 |
| 377 buildUnnamed3458() { | 379 buildUnnamed3490() { |
| 378 var o = new core.Map<core.String, core.String>(); | 380 var o = new core.Map<core.String, core.String>(); |
| 379 o["x"] = "foo"; | 381 o["x"] = "foo"; |
| 380 o["y"] = "foo"; | 382 o["y"] = "foo"; |
| 381 return o; | 383 return o; |
| 382 } | 384 } |
| 383 | 385 |
| 384 checkUnnamed3458(core.Map<core.String, core.String> o) { | 386 checkUnnamed3490(core.Map<core.String, core.String> o) { |
| 385 unittest.expect(o, unittest.hasLength(2)); | 387 unittest.expect(o, unittest.hasLength(2)); |
| 386 unittest.expect(o["x"], unittest.equals('foo')); | 388 unittest.expect(o["x"], unittest.equals('foo')); |
| 387 unittest.expect(o["y"], unittest.equals('foo')); | 389 unittest.expect(o["y"], unittest.equals('foo')); |
| 388 } | 390 } |
| 389 | 391 |
| 390 buildUnnamed3459() { | 392 buildUnnamed3491() { |
| 391 var o = new core.Map<core.String, core.Object>(); | 393 var o = new core.Map<core.String, core.Object>(); |
| 392 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 394 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; |
| 393 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 395 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; |
| 394 return o; | 396 return o; |
| 395 } | 397 } |
| 396 | 398 |
| 397 checkUnnamed3459(core.Map<core.String, core.Object> o) { | 399 checkUnnamed3491(core.Map<core.String, core.Object> o) { |
| 398 unittest.expect(o, unittest.hasLength(2)); | 400 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')); | 401 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')); | 402 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 } | 403 } |
| 402 | 404 |
| 403 core.int buildCounterLogEntry = 0; | 405 core.int buildCounterLogEntry = 0; |
| 404 buildLogEntry() { | 406 buildLogEntry() { |
| 405 var o = new api.LogEntry(); | 407 var o = new api.LogEntry(); |
| 406 buildCounterLogEntry++; | 408 buildCounterLogEntry++; |
| 407 if (buildCounterLogEntry < 3) { | 409 if (buildCounterLogEntry < 3) { |
| 408 o.httpRequest = buildHttpRequest(); | 410 o.httpRequest = buildHttpRequest(); |
| 409 o.insertId = "foo"; | 411 o.insertId = "foo"; |
| 410 o.jsonPayload = buildUnnamed3457(); | 412 o.jsonPayload = buildUnnamed3489(); |
| 411 o.labels = buildUnnamed3458(); | 413 o.labels = buildUnnamed3490(); |
| 412 o.logName = "foo"; | 414 o.logName = "foo"; |
| 413 o.operation = buildLogEntryOperation(); | 415 o.operation = buildLogEntryOperation(); |
| 414 o.protoPayload = buildUnnamed3459(); | 416 o.protoPayload = buildUnnamed3491(); |
| 415 o.receiveTimestamp = "foo"; | 417 o.receiveTimestamp = "foo"; |
| 416 o.resource = buildMonitoredResource(); | 418 o.resource = buildMonitoredResource(); |
| 417 o.severity = "foo"; | 419 o.severity = "foo"; |
| 418 o.sourceLocation = buildLogEntrySourceLocation(); | 420 o.sourceLocation = buildLogEntrySourceLocation(); |
| 419 o.textPayload = "foo"; | 421 o.textPayload = "foo"; |
| 420 o.timestamp = "foo"; | 422 o.timestamp = "foo"; |
| 421 o.trace = "foo"; | 423 o.trace = "foo"; |
| 422 } | 424 } |
| 423 buildCounterLogEntry--; | 425 buildCounterLogEntry--; |
| 424 return o; | 426 return o; |
| 425 } | 427 } |
| 426 | 428 |
| 427 checkLogEntry(api.LogEntry o) { | 429 checkLogEntry(api.LogEntry o) { |
| 428 buildCounterLogEntry++; | 430 buildCounterLogEntry++; |
| 429 if (buildCounterLogEntry < 3) { | 431 if (buildCounterLogEntry < 3) { |
| 430 checkHttpRequest(o.httpRequest); | 432 checkHttpRequest(o.httpRequest); |
| 431 unittest.expect(o.insertId, unittest.equals('foo')); | 433 unittest.expect(o.insertId, unittest.equals('foo')); |
| 432 checkUnnamed3457(o.jsonPayload); | 434 checkUnnamed3489(o.jsonPayload); |
| 433 checkUnnamed3458(o.labels); | 435 checkUnnamed3490(o.labels); |
| 434 unittest.expect(o.logName, unittest.equals('foo')); | 436 unittest.expect(o.logName, unittest.equals('foo')); |
| 435 checkLogEntryOperation(o.operation); | 437 checkLogEntryOperation(o.operation); |
| 436 checkUnnamed3459(o.protoPayload); | 438 checkUnnamed3491(o.protoPayload); |
| 437 unittest.expect(o.receiveTimestamp, unittest.equals('foo')); | 439 unittest.expect(o.receiveTimestamp, unittest.equals('foo')); |
| 438 checkMonitoredResource(o.resource); | 440 checkMonitoredResource(o.resource); |
| 439 unittest.expect(o.severity, unittest.equals('foo')); | 441 unittest.expect(o.severity, unittest.equals('foo')); |
| 440 checkLogEntrySourceLocation(o.sourceLocation); | 442 checkLogEntrySourceLocation(o.sourceLocation); |
| 441 unittest.expect(o.textPayload, unittest.equals('foo')); | 443 unittest.expect(o.textPayload, unittest.equals('foo')); |
| 442 unittest.expect(o.timestamp, unittest.equals('foo')); | 444 unittest.expect(o.timestamp, unittest.equals('foo')); |
| 443 unittest.expect(o.trace, unittest.equals('foo')); | 445 unittest.expect(o.trace, unittest.equals('foo')); |
| 444 } | 446 } |
| 445 buildCounterLogEntry--; | 447 buildCounterLogEntry--; |
| 446 } | 448 } |
| (...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 569 unittest.expect(o.filter, unittest.equals('foo')); | 571 unittest.expect(o.filter, unittest.equals('foo')); |
| 570 unittest.expect(o.includeChildren, unittest.isTrue); | 572 unittest.expect(o.includeChildren, unittest.isTrue); |
| 571 unittest.expect(o.name, unittest.equals('foo')); | 573 unittest.expect(o.name, unittest.equals('foo')); |
| 572 unittest.expect(o.outputVersionFormat, unittest.equals('foo')); | 574 unittest.expect(o.outputVersionFormat, unittest.equals('foo')); |
| 573 unittest.expect(o.startTime, unittest.equals('foo')); | 575 unittest.expect(o.startTime, unittest.equals('foo')); |
| 574 unittest.expect(o.writerIdentity, unittest.equals('foo')); | 576 unittest.expect(o.writerIdentity, unittest.equals('foo')); |
| 575 } | 577 } |
| 576 buildCounterLogSink--; | 578 buildCounterLogSink--; |
| 577 } | 579 } |
| 578 | 580 |
| 579 buildUnnamed3460() { | 581 buildUnnamed3492() { |
| 580 var o = new core.Map<core.String, core.String>(); | 582 var o = new core.Map<core.String, core.String>(); |
| 581 o["x"] = "foo"; | 583 o["x"] = "foo"; |
| 582 o["y"] = "foo"; | 584 o["y"] = "foo"; |
| 583 return o; | 585 return o; |
| 584 } | 586 } |
| 585 | 587 |
| 586 checkUnnamed3460(core.Map<core.String, core.String> o) { | 588 checkUnnamed3492(core.Map<core.String, core.String> o) { |
| 587 unittest.expect(o, unittest.hasLength(2)); | 589 unittest.expect(o, unittest.hasLength(2)); |
| 588 unittest.expect(o["x"], unittest.equals('foo')); | 590 unittest.expect(o["x"], unittest.equals('foo')); |
| 589 unittest.expect(o["y"], unittest.equals('foo')); | 591 unittest.expect(o["y"], unittest.equals('foo')); |
| 590 } | 592 } |
| 591 | 593 |
| 592 core.int buildCounterMonitoredResource = 0; | 594 core.int buildCounterMonitoredResource = 0; |
| 593 buildMonitoredResource() { | 595 buildMonitoredResource() { |
| 594 var o = new api.MonitoredResource(); | 596 var o = new api.MonitoredResource(); |
| 595 buildCounterMonitoredResource++; | 597 buildCounterMonitoredResource++; |
| 596 if (buildCounterMonitoredResource < 3) { | 598 if (buildCounterMonitoredResource < 3) { |
| 597 o.labels = buildUnnamed3460(); | 599 o.labels = buildUnnamed3492(); |
| 598 o.type = "foo"; | 600 o.type = "foo"; |
| 599 } | 601 } |
| 600 buildCounterMonitoredResource--; | 602 buildCounterMonitoredResource--; |
| 601 return o; | 603 return o; |
| 602 } | 604 } |
| 603 | 605 |
| 604 checkMonitoredResource(api.MonitoredResource o) { | 606 checkMonitoredResource(api.MonitoredResource o) { |
| 605 buildCounterMonitoredResource++; | 607 buildCounterMonitoredResource++; |
| 606 if (buildCounterMonitoredResource < 3) { | 608 if (buildCounterMonitoredResource < 3) { |
| 607 checkUnnamed3460(o.labels); | 609 checkUnnamed3492(o.labels); |
| 608 unittest.expect(o.type, unittest.equals('foo')); | 610 unittest.expect(o.type, unittest.equals('foo')); |
| 609 } | 611 } |
| 610 buildCounterMonitoredResource--; | 612 buildCounterMonitoredResource--; |
| 611 } | 613 } |
| 612 | 614 |
| 613 buildUnnamed3461() { | 615 buildUnnamed3493() { |
| 614 var o = new core.List<api.LabelDescriptor>(); | 616 var o = new core.List<api.LabelDescriptor>(); |
| 615 o.add(buildLabelDescriptor()); | 617 o.add(buildLabelDescriptor()); |
| 616 o.add(buildLabelDescriptor()); | 618 o.add(buildLabelDescriptor()); |
| 617 return o; | 619 return o; |
| 618 } | 620 } |
| 619 | 621 |
| 620 checkUnnamed3461(core.List<api.LabelDescriptor> o) { | 622 checkUnnamed3493(core.List<api.LabelDescriptor> o) { |
| 621 unittest.expect(o, unittest.hasLength(2)); | 623 unittest.expect(o, unittest.hasLength(2)); |
| 622 checkLabelDescriptor(o[0]); | 624 checkLabelDescriptor(o[0]); |
| 623 checkLabelDescriptor(o[1]); | 625 checkLabelDescriptor(o[1]); |
| 624 } | 626 } |
| 625 | 627 |
| 626 core.int buildCounterMonitoredResourceDescriptor = 0; | 628 core.int buildCounterMonitoredResourceDescriptor = 0; |
| 627 buildMonitoredResourceDescriptor() { | 629 buildMonitoredResourceDescriptor() { |
| 628 var o = new api.MonitoredResourceDescriptor(); | 630 var o = new api.MonitoredResourceDescriptor(); |
| 629 buildCounterMonitoredResourceDescriptor++; | 631 buildCounterMonitoredResourceDescriptor++; |
| 630 if (buildCounterMonitoredResourceDescriptor < 3) { | 632 if (buildCounterMonitoredResourceDescriptor < 3) { |
| 631 o.description = "foo"; | 633 o.description = "foo"; |
| 632 o.displayName = "foo"; | 634 o.displayName = "foo"; |
| 633 o.labels = buildUnnamed3461(); | 635 o.labels = buildUnnamed3493(); |
| 634 o.name = "foo"; | 636 o.name = "foo"; |
| 635 o.type = "foo"; | 637 o.type = "foo"; |
| 636 } | 638 } |
| 637 buildCounterMonitoredResourceDescriptor--; | 639 buildCounterMonitoredResourceDescriptor--; |
| 638 return o; | 640 return o; |
| 639 } | 641 } |
| 640 | 642 |
| 641 checkMonitoredResourceDescriptor(api.MonitoredResourceDescriptor o) { | 643 checkMonitoredResourceDescriptor(api.MonitoredResourceDescriptor o) { |
| 642 buildCounterMonitoredResourceDescriptor++; | 644 buildCounterMonitoredResourceDescriptor++; |
| 643 if (buildCounterMonitoredResourceDescriptor < 3) { | 645 if (buildCounterMonitoredResourceDescriptor < 3) { |
| 644 unittest.expect(o.description, unittest.equals('foo')); | 646 unittest.expect(o.description, unittest.equals('foo')); |
| 645 unittest.expect(o.displayName, unittest.equals('foo')); | 647 unittest.expect(o.displayName, unittest.equals('foo')); |
| 646 checkUnnamed3461(o.labels); | 648 checkUnnamed3493(o.labels); |
| 647 unittest.expect(o.name, unittest.equals('foo')); | 649 unittest.expect(o.name, unittest.equals('foo')); |
| 648 unittest.expect(o.type, unittest.equals('foo')); | 650 unittest.expect(o.type, unittest.equals('foo')); |
| 649 } | 651 } |
| 650 buildCounterMonitoredResourceDescriptor--; | 652 buildCounterMonitoredResourceDescriptor--; |
| 651 } | 653 } |
| 652 | 654 |
| 653 buildUnnamed3462() { | 655 buildUnnamed3494() { |
| 654 var o = new core.List<api.LogLine>(); | 656 var o = new core.List<api.LogLine>(); |
| 655 o.add(buildLogLine()); | 657 o.add(buildLogLine()); |
| 656 o.add(buildLogLine()); | 658 o.add(buildLogLine()); |
| 657 return o; | 659 return o; |
| 658 } | 660 } |
| 659 | 661 |
| 660 checkUnnamed3462(core.List<api.LogLine> o) { | 662 checkUnnamed3494(core.List<api.LogLine> o) { |
| 661 unittest.expect(o, unittest.hasLength(2)); | 663 unittest.expect(o, unittest.hasLength(2)); |
| 662 checkLogLine(o[0]); | 664 checkLogLine(o[0]); |
| 663 checkLogLine(o[1]); | 665 checkLogLine(o[1]); |
| 664 } | 666 } |
| 665 | 667 |
| 666 buildUnnamed3463() { | 668 buildUnnamed3495() { |
| 667 var o = new core.List<api.SourceReference>(); | 669 var o = new core.List<api.SourceReference>(); |
| 668 o.add(buildSourceReference()); | 670 o.add(buildSourceReference()); |
| 669 o.add(buildSourceReference()); | 671 o.add(buildSourceReference()); |
| 670 return o; | 672 return o; |
| 671 } | 673 } |
| 672 | 674 |
| 673 checkUnnamed3463(core.List<api.SourceReference> o) { | 675 checkUnnamed3495(core.List<api.SourceReference> o) { |
| 674 unittest.expect(o, unittest.hasLength(2)); | 676 unittest.expect(o, unittest.hasLength(2)); |
| 675 checkSourceReference(o[0]); | 677 checkSourceReference(o[0]); |
| 676 checkSourceReference(o[1]); | 678 checkSourceReference(o[1]); |
| 677 } | 679 } |
| 678 | 680 |
| 679 core.int buildCounterRequestLog = 0; | 681 core.int buildCounterRequestLog = 0; |
| 680 buildRequestLog() { | 682 buildRequestLog() { |
| 681 var o = new api.RequestLog(); | 683 var o = new api.RequestLog(); |
| 682 buildCounterRequestLog++; | 684 buildCounterRequestLog++; |
| 683 if (buildCounterRequestLog < 3) { | 685 if (buildCounterRequestLog < 3) { |
| 684 o.appEngineRelease = "foo"; | 686 o.appEngineRelease = "foo"; |
| 685 o.appId = "foo"; | 687 o.appId = "foo"; |
| 686 o.cost = 42.0; | 688 o.cost = 42.0; |
| 687 o.endTime = "foo"; | 689 o.endTime = "foo"; |
| 688 o.finished = true; | 690 o.finished = true; |
| 689 o.first = true; | 691 o.first = true; |
| 690 o.host = "foo"; | 692 o.host = "foo"; |
| 691 o.httpVersion = "foo"; | 693 o.httpVersion = "foo"; |
| 692 o.instanceId = "foo"; | 694 o.instanceId = "foo"; |
| 693 o.instanceIndex = 42; | 695 o.instanceIndex = 42; |
| 694 o.ip = "foo"; | 696 o.ip = "foo"; |
| 695 o.latency = "foo"; | 697 o.latency = "foo"; |
| 696 o.line = buildUnnamed3462(); | 698 o.line = buildUnnamed3494(); |
| 697 o.megaCycles = "foo"; | 699 o.megaCycles = "foo"; |
| 698 o.method = "foo"; | 700 o.method = "foo"; |
| 699 o.moduleId = "foo"; | 701 o.moduleId = "foo"; |
| 700 o.nickname = "foo"; | 702 o.nickname = "foo"; |
| 701 o.pendingTime = "foo"; | 703 o.pendingTime = "foo"; |
| 702 o.referrer = "foo"; | 704 o.referrer = "foo"; |
| 703 o.requestId = "foo"; | 705 o.requestId = "foo"; |
| 704 o.resource = "foo"; | 706 o.resource = "foo"; |
| 705 o.responseSize = "foo"; | 707 o.responseSize = "foo"; |
| 706 o.sourceReference = buildUnnamed3463(); | 708 o.sourceReference = buildUnnamed3495(); |
| 707 o.startTime = "foo"; | 709 o.startTime = "foo"; |
| 708 o.status = 42; | 710 o.status = 42; |
| 709 o.taskName = "foo"; | 711 o.taskName = "foo"; |
| 710 o.taskQueueName = "foo"; | 712 o.taskQueueName = "foo"; |
| 711 o.traceId = "foo"; | 713 o.traceId = "foo"; |
| 712 o.urlMapEntry = "foo"; | 714 o.urlMapEntry = "foo"; |
| 713 o.userAgent = "foo"; | 715 o.userAgent = "foo"; |
| 714 o.versionId = "foo"; | 716 o.versionId = "foo"; |
| 715 o.wasLoadingRequest = true; | 717 o.wasLoadingRequest = true; |
| 716 } | 718 } |
| 717 buildCounterRequestLog--; | 719 buildCounterRequestLog--; |
| 718 return o; | 720 return o; |
| 719 } | 721 } |
| 720 | 722 |
| 721 checkRequestLog(api.RequestLog o) { | 723 checkRequestLog(api.RequestLog o) { |
| 722 buildCounterRequestLog++; | 724 buildCounterRequestLog++; |
| 723 if (buildCounterRequestLog < 3) { | 725 if (buildCounterRequestLog < 3) { |
| 724 unittest.expect(o.appEngineRelease, unittest.equals('foo')); | 726 unittest.expect(o.appEngineRelease, unittest.equals('foo')); |
| 725 unittest.expect(o.appId, unittest.equals('foo')); | 727 unittest.expect(o.appId, unittest.equals('foo')); |
| 726 unittest.expect(o.cost, unittest.equals(42.0)); | 728 unittest.expect(o.cost, unittest.equals(42.0)); |
| 727 unittest.expect(o.endTime, unittest.equals('foo')); | 729 unittest.expect(o.endTime, unittest.equals('foo')); |
| 728 unittest.expect(o.finished, unittest.isTrue); | 730 unittest.expect(o.finished, unittest.isTrue); |
| 729 unittest.expect(o.first, unittest.isTrue); | 731 unittest.expect(o.first, unittest.isTrue); |
| 730 unittest.expect(o.host, unittest.equals('foo')); | 732 unittest.expect(o.host, unittest.equals('foo')); |
| 731 unittest.expect(o.httpVersion, unittest.equals('foo')); | 733 unittest.expect(o.httpVersion, unittest.equals('foo')); |
| 732 unittest.expect(o.instanceId, unittest.equals('foo')); | 734 unittest.expect(o.instanceId, unittest.equals('foo')); |
| 733 unittest.expect(o.instanceIndex, unittest.equals(42)); | 735 unittest.expect(o.instanceIndex, unittest.equals(42)); |
| 734 unittest.expect(o.ip, unittest.equals('foo')); | 736 unittest.expect(o.ip, unittest.equals('foo')); |
| 735 unittest.expect(o.latency, unittest.equals('foo')); | 737 unittest.expect(o.latency, unittest.equals('foo')); |
| 736 checkUnnamed3462(o.line); | 738 checkUnnamed3494(o.line); |
| 737 unittest.expect(o.megaCycles, unittest.equals('foo')); | 739 unittest.expect(o.megaCycles, unittest.equals('foo')); |
| 738 unittest.expect(o.method, unittest.equals('foo')); | 740 unittest.expect(o.method, unittest.equals('foo')); |
| 739 unittest.expect(o.moduleId, unittest.equals('foo')); | 741 unittest.expect(o.moduleId, unittest.equals('foo')); |
| 740 unittest.expect(o.nickname, unittest.equals('foo')); | 742 unittest.expect(o.nickname, unittest.equals('foo')); |
| 741 unittest.expect(o.pendingTime, unittest.equals('foo')); | 743 unittest.expect(o.pendingTime, unittest.equals('foo')); |
| 742 unittest.expect(o.referrer, unittest.equals('foo')); | 744 unittest.expect(o.referrer, unittest.equals('foo')); |
| 743 unittest.expect(o.requestId, unittest.equals('foo')); | 745 unittest.expect(o.requestId, unittest.equals('foo')); |
| 744 unittest.expect(o.resource, unittest.equals('foo')); | 746 unittest.expect(o.resource, unittest.equals('foo')); |
| 745 unittest.expect(o.responseSize, unittest.equals('foo')); | 747 unittest.expect(o.responseSize, unittest.equals('foo')); |
| 746 checkUnnamed3463(o.sourceReference); | 748 checkUnnamed3495(o.sourceReference); |
| 747 unittest.expect(o.startTime, unittest.equals('foo')); | 749 unittest.expect(o.startTime, unittest.equals('foo')); |
| 748 unittest.expect(o.status, unittest.equals(42)); | 750 unittest.expect(o.status, unittest.equals(42)); |
| 749 unittest.expect(o.taskName, unittest.equals('foo')); | 751 unittest.expect(o.taskName, unittest.equals('foo')); |
| 750 unittest.expect(o.taskQueueName, unittest.equals('foo')); | 752 unittest.expect(o.taskQueueName, unittest.equals('foo')); |
| 751 unittest.expect(o.traceId, unittest.equals('foo')); | 753 unittest.expect(o.traceId, unittest.equals('foo')); |
| 752 unittest.expect(o.urlMapEntry, unittest.equals('foo')); | 754 unittest.expect(o.urlMapEntry, unittest.equals('foo')); |
| 753 unittest.expect(o.userAgent, unittest.equals('foo')); | 755 unittest.expect(o.userAgent, unittest.equals('foo')); |
| 754 unittest.expect(o.versionId, unittest.equals('foo')); | 756 unittest.expect(o.versionId, unittest.equals('foo')); |
| 755 unittest.expect(o.wasLoadingRequest, unittest.isTrue); | 757 unittest.expect(o.wasLoadingRequest, unittest.isTrue); |
| 756 } | 758 } |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 794 | 796 |
| 795 checkSourceReference(api.SourceReference o) { | 797 checkSourceReference(api.SourceReference o) { |
| 796 buildCounterSourceReference++; | 798 buildCounterSourceReference++; |
| 797 if (buildCounterSourceReference < 3) { | 799 if (buildCounterSourceReference < 3) { |
| 798 unittest.expect(o.repository, unittest.equals('foo')); | 800 unittest.expect(o.repository, unittest.equals('foo')); |
| 799 unittest.expect(o.revisionId, unittest.equals('foo')); | 801 unittest.expect(o.revisionId, unittest.equals('foo')); |
| 800 } | 802 } |
| 801 buildCounterSourceReference--; | 803 buildCounterSourceReference--; |
| 802 } | 804 } |
| 803 | 805 |
| 804 buildUnnamed3464() { | 806 buildUnnamed3496() { |
| 805 var o = new core.List<api.LogEntry>(); | 807 var o = new core.List<api.LogEntry>(); |
| 806 o.add(buildLogEntry()); | 808 o.add(buildLogEntry()); |
| 807 o.add(buildLogEntry()); | 809 o.add(buildLogEntry()); |
| 808 return o; | 810 return o; |
| 809 } | 811 } |
| 810 | 812 |
| 811 checkUnnamed3464(core.List<api.LogEntry> o) { | 813 checkUnnamed3496(core.List<api.LogEntry> o) { |
| 812 unittest.expect(o, unittest.hasLength(2)); | 814 unittest.expect(o, unittest.hasLength(2)); |
| 813 checkLogEntry(o[0]); | 815 checkLogEntry(o[0]); |
| 814 checkLogEntry(o[1]); | 816 checkLogEntry(o[1]); |
| 815 } | 817 } |
| 816 | 818 |
| 817 buildUnnamed3465() { | 819 buildUnnamed3497() { |
| 818 var o = new core.Map<core.String, core.String>(); | 820 var o = new core.Map<core.String, core.String>(); |
| 819 o["x"] = "foo"; | 821 o["x"] = "foo"; |
| 820 o["y"] = "foo"; | 822 o["y"] = "foo"; |
| 821 return o; | 823 return o; |
| 822 } | 824 } |
| 823 | 825 |
| 824 checkUnnamed3465(core.Map<core.String, core.String> o) { | 826 checkUnnamed3497(core.Map<core.String, core.String> o) { |
| 825 unittest.expect(o, unittest.hasLength(2)); | 827 unittest.expect(o, unittest.hasLength(2)); |
| 826 unittest.expect(o["x"], unittest.equals('foo')); | 828 unittest.expect(o["x"], unittest.equals('foo')); |
| 827 unittest.expect(o["y"], unittest.equals('foo')); | 829 unittest.expect(o["y"], unittest.equals('foo')); |
| 828 } | 830 } |
| 829 | 831 |
| 830 core.int buildCounterWriteLogEntriesRequest = 0; | 832 core.int buildCounterWriteLogEntriesRequest = 0; |
| 831 buildWriteLogEntriesRequest() { | 833 buildWriteLogEntriesRequest() { |
| 832 var o = new api.WriteLogEntriesRequest(); | 834 var o = new api.WriteLogEntriesRequest(); |
| 833 buildCounterWriteLogEntriesRequest++; | 835 buildCounterWriteLogEntriesRequest++; |
| 834 if (buildCounterWriteLogEntriesRequest < 3) { | 836 if (buildCounterWriteLogEntriesRequest < 3) { |
| 835 o.entries = buildUnnamed3464(); | 837 o.entries = buildUnnamed3496(); |
| 836 o.labels = buildUnnamed3465(); | 838 o.labels = buildUnnamed3497(); |
| 837 o.logName = "foo"; | 839 o.logName = "foo"; |
| 838 o.partialSuccess = true; | 840 o.partialSuccess = true; |
| 839 o.resource = buildMonitoredResource(); | 841 o.resource = buildMonitoredResource(); |
| 840 } | 842 } |
| 841 buildCounterWriteLogEntriesRequest--; | 843 buildCounterWriteLogEntriesRequest--; |
| 842 return o; | 844 return o; |
| 843 } | 845 } |
| 844 | 846 |
| 845 checkWriteLogEntriesRequest(api.WriteLogEntriesRequest o) { | 847 checkWriteLogEntriesRequest(api.WriteLogEntriesRequest o) { |
| 846 buildCounterWriteLogEntriesRequest++; | 848 buildCounterWriteLogEntriesRequest++; |
| 847 if (buildCounterWriteLogEntriesRequest < 3) { | 849 if (buildCounterWriteLogEntriesRequest < 3) { |
| 848 checkUnnamed3464(o.entries); | 850 checkUnnamed3496(o.entries); |
| 849 checkUnnamed3465(o.labels); | 851 checkUnnamed3497(o.labels); |
| 850 unittest.expect(o.logName, unittest.equals('foo')); | 852 unittest.expect(o.logName, unittest.equals('foo')); |
| 851 unittest.expect(o.partialSuccess, unittest.isTrue); | 853 unittest.expect(o.partialSuccess, unittest.isTrue); |
| 852 checkMonitoredResource(o.resource); | 854 checkMonitoredResource(o.resource); |
| 853 } | 855 } |
| 854 buildCounterWriteLogEntriesRequest--; | 856 buildCounterWriteLogEntriesRequest--; |
| 855 } | 857 } |
| 856 | 858 |
| 857 core.int buildCounterWriteLogEntriesResponse = 0; | 859 core.int buildCounterWriteLogEntriesResponse = 0; |
| 858 buildWriteLogEntriesResponse() { | 860 buildWriteLogEntriesResponse() { |
| 859 var o = new api.WriteLogEntriesResponse(); | 861 var o = new api.WriteLogEntriesResponse(); |
| (...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1115 res.delete(arg_logName).then(unittest.expectAsync1(((api.Empty response) { | 1117 res.delete(arg_logName).then(unittest.expectAsync1(((api.Empty response) { |
| 1116 checkEmpty(response); | 1118 checkEmpty(response); |
| 1117 }))); | 1119 }))); |
| 1118 }); | 1120 }); |
| 1119 | 1121 |
| 1120 unittest.test("method--list", () { | 1122 unittest.test("method--list", () { |
| 1121 | 1123 |
| 1122 var mock = new HttpServerMock(); | 1124 var mock = new HttpServerMock(); |
| 1123 api.BillingAccountsLogsResourceApi res = new api.LoggingApi(mock).billingA
ccounts.logs; | 1125 api.BillingAccountsLogsResourceApi res = new api.LoggingApi(mock).billingA
ccounts.logs; |
| 1124 var arg_parent = "foo"; | 1126 var arg_parent = "foo"; |
| 1127 var arg_pageSize = 42; |
| 1125 var arg_pageToken = "foo"; | 1128 var arg_pageToken = "foo"; |
| 1126 var arg_pageSize = 42; | |
| 1127 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 1129 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 1128 var path = (req.url).path; | 1130 var path = (req.url).path; |
| 1129 var pathOffset = 0; | 1131 var pathOffset = 0; |
| 1130 var index; | 1132 var index; |
| 1131 var subPart; | 1133 var subPart; |
| 1132 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1134 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 1133 pathOffset += 1; | 1135 pathOffset += 1; |
| 1134 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("v2beta1/")); | 1136 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("v2beta1/")); |
| 1135 pathOffset += 8; | 1137 pathOffset += 8; |
| 1136 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; | 1138 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; |
| 1137 | 1139 |
| 1138 var query = (req.url).query; | 1140 var query = (req.url).query; |
| 1139 var queryOffset = 0; | 1141 var queryOffset = 0; |
| 1140 var queryMap = {}; | 1142 var queryMap = {}; |
| 1141 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 1143 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 1142 parseBool(n) { | 1144 parseBool(n) { |
| 1143 if (n == "true") return true; | 1145 if (n == "true") return true; |
| 1144 if (n == "false") return false; | 1146 if (n == "false") return false; |
| 1145 if (n == null) return null; | 1147 if (n == null) return null; |
| 1146 throw new core.ArgumentError("Invalid boolean: $n"); | 1148 throw new core.ArgumentError("Invalid boolean: $n"); |
| 1147 } | 1149 } |
| 1148 if (query.length > 0) { | 1150 if (query.length > 0) { |
| 1149 for (var part in query.split("&")) { | 1151 for (var part in query.split("&")) { |
| 1150 var keyvalue = part.split("="); | 1152 var keyvalue = part.split("="); |
| 1151 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 1153 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 1152 } | 1154 } |
| 1153 } | 1155 } |
| 1156 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ
als(arg_pageSize)); |
| 1154 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | 1157 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); |
| 1155 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ
als(arg_pageSize)); | |
| 1156 | 1158 |
| 1157 | 1159 |
| 1158 var h = { | 1160 var h = { |
| 1159 "content-type" : "application/json; charset=utf-8", | 1161 "content-type" : "application/json; charset=utf-8", |
| 1160 }; | 1162 }; |
| 1161 var resp = convert.JSON.encode(buildListLogsResponse()); | 1163 var resp = convert.JSON.encode(buildListLogsResponse()); |
| 1162 return new async.Future.value(stringResponse(200, h, resp)); | 1164 return new async.Future.value(stringResponse(200, h, resp)); |
| 1163 }), true); | 1165 }), true); |
| 1164 res.list(arg_parent, pageToken: arg_pageToken, pageSize: arg_pageSize).the
n(unittest.expectAsync1(((api.ListLogsResponse response) { | 1166 res.list(arg_parent, pageSize: arg_pageSize, pageToken: arg_pageToken).the
n(unittest.expectAsync1(((api.ListLogsResponse response) { |
| 1165 checkListLogsResponse(response); | 1167 checkListLogsResponse(response); |
| 1166 }))); | 1168 }))); |
| 1167 }); | 1169 }); |
| 1168 | 1170 |
| 1169 }); | 1171 }); |
| 1170 | 1172 |
| 1171 | 1173 |
| 1172 unittest.group("resource-EntriesResourceApi", () { | 1174 unittest.group("resource-EntriesResourceApi", () { |
| 1173 unittest.test("method--list", () { | 1175 unittest.test("method--list", () { |
| 1174 | 1176 |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1265 }); | 1267 }); |
| 1266 | 1268 |
| 1267 }); | 1269 }); |
| 1268 | 1270 |
| 1269 | 1271 |
| 1270 unittest.group("resource-MonitoredResourceDescriptorsResourceApi", () { | 1272 unittest.group("resource-MonitoredResourceDescriptorsResourceApi", () { |
| 1271 unittest.test("method--list", () { | 1273 unittest.test("method--list", () { |
| 1272 | 1274 |
| 1273 var mock = new HttpServerMock(); | 1275 var mock = new HttpServerMock(); |
| 1274 api.MonitoredResourceDescriptorsResourceApi res = new api.LoggingApi(mock)
.monitoredResourceDescriptors; | 1276 api.MonitoredResourceDescriptorsResourceApi res = new api.LoggingApi(mock)
.monitoredResourceDescriptors; |
| 1277 var arg_pageSize = 42; |
| 1275 var arg_pageToken = "foo"; | 1278 var arg_pageToken = "foo"; |
| 1276 var arg_pageSize = 42; | |
| 1277 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 1279 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 1278 var path = (req.url).path; | 1280 var path = (req.url).path; |
| 1279 var pathOffset = 0; | 1281 var pathOffset = 0; |
| 1280 var index; | 1282 var index; |
| 1281 var subPart; | 1283 var subPart; |
| 1282 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1284 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 1283 pathOffset += 1; | 1285 pathOffset += 1; |
| 1284 unittest.expect(path.substring(pathOffset, pathOffset + 36), unittest.eq
uals("v2beta1/monitoredResourceDescriptors")); | 1286 unittest.expect(path.substring(pathOffset, pathOffset + 36), unittest.eq
uals("v2beta1/monitoredResourceDescriptors")); |
| 1285 pathOffset += 36; | 1287 pathOffset += 36; |
| 1286 | 1288 |
| 1287 var query = (req.url).query; | 1289 var query = (req.url).query; |
| 1288 var queryOffset = 0; | 1290 var queryOffset = 0; |
| 1289 var queryMap = {}; | 1291 var queryMap = {}; |
| 1290 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 1292 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 1291 parseBool(n) { | 1293 parseBool(n) { |
| 1292 if (n == "true") return true; | 1294 if (n == "true") return true; |
| 1293 if (n == "false") return false; | 1295 if (n == "false") return false; |
| 1294 if (n == null) return null; | 1296 if (n == null) return null; |
| 1295 throw new core.ArgumentError("Invalid boolean: $n"); | 1297 throw new core.ArgumentError("Invalid boolean: $n"); |
| 1296 } | 1298 } |
| 1297 if (query.length > 0) { | 1299 if (query.length > 0) { |
| 1298 for (var part in query.split("&")) { | 1300 for (var part in query.split("&")) { |
| 1299 var keyvalue = part.split("="); | 1301 var keyvalue = part.split("="); |
| 1300 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 1302 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 1301 } | 1303 } |
| 1302 } | 1304 } |
| 1305 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ
als(arg_pageSize)); |
| 1303 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | 1306 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); |
| 1304 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ
als(arg_pageSize)); | |
| 1305 | 1307 |
| 1306 | 1308 |
| 1307 var h = { | 1309 var h = { |
| 1308 "content-type" : "application/json; charset=utf-8", | 1310 "content-type" : "application/json; charset=utf-8", |
| 1309 }; | 1311 }; |
| 1310 var resp = convert.JSON.encode(buildListMonitoredResourceDescriptorsResp
onse()); | 1312 var resp = convert.JSON.encode(buildListMonitoredResourceDescriptorsResp
onse()); |
| 1311 return new async.Future.value(stringResponse(200, h, resp)); | 1313 return new async.Future.value(stringResponse(200, h, resp)); |
| 1312 }), true); | 1314 }), true); |
| 1313 res.list(pageToken: arg_pageToken, pageSize: arg_pageSize).then(unittest.e
xpectAsync1(((api.ListMonitoredResourceDescriptorsResponse response) { | 1315 res.list(pageSize: arg_pageSize, pageToken: arg_pageToken).then(unittest.e
xpectAsync1(((api.ListMonitoredResourceDescriptorsResponse response) { |
| 1314 checkListMonitoredResourceDescriptorsResponse(response); | 1316 checkListMonitoredResourceDescriptorsResponse(response); |
| 1315 }))); | 1317 }))); |
| 1316 }); | 1318 }); |
| 1317 | 1319 |
| 1318 }); | 1320 }); |
| 1319 | 1321 |
| 1320 | 1322 |
| 1321 unittest.group("resource-OrganizationsLogsResourceApi", () { | 1323 unittest.group("resource-OrganizationsLogsResourceApi", () { |
| 1322 unittest.test("method--delete", () { | 1324 unittest.test("method--delete", () { |
| 1323 | 1325 |
| (...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1460 res.delete(arg_logName).then(unittest.expectAsync1(((api.Empty response) { | 1462 res.delete(arg_logName).then(unittest.expectAsync1(((api.Empty response) { |
| 1461 checkEmpty(response); | 1463 checkEmpty(response); |
| 1462 }))); | 1464 }))); |
| 1463 }); | 1465 }); |
| 1464 | 1466 |
| 1465 unittest.test("method--list", () { | 1467 unittest.test("method--list", () { |
| 1466 | 1468 |
| 1467 var mock = new HttpServerMock(); | 1469 var mock = new HttpServerMock(); |
| 1468 api.ProjectsLogsResourceApi res = new api.LoggingApi(mock).projects.logs; | 1470 api.ProjectsLogsResourceApi res = new api.LoggingApi(mock).projects.logs; |
| 1469 var arg_parent = "foo"; | 1471 var arg_parent = "foo"; |
| 1472 var arg_pageSize = 42; |
| 1470 var arg_pageToken = "foo"; | 1473 var arg_pageToken = "foo"; |
| 1471 var arg_pageSize = 42; | |
| 1472 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 1474 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 1473 var path = (req.url).path; | 1475 var path = (req.url).path; |
| 1474 var pathOffset = 0; | 1476 var pathOffset = 0; |
| 1475 var index; | 1477 var index; |
| 1476 var subPart; | 1478 var subPart; |
| 1477 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1479 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 1478 pathOffset += 1; | 1480 pathOffset += 1; |
| 1479 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("v2beta1/")); | 1481 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("v2beta1/")); |
| 1480 pathOffset += 8; | 1482 pathOffset += 8; |
| 1481 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; | 1483 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; |
| 1482 | 1484 |
| 1483 var query = (req.url).query; | 1485 var query = (req.url).query; |
| 1484 var queryOffset = 0; | 1486 var queryOffset = 0; |
| 1485 var queryMap = {}; | 1487 var queryMap = {}; |
| 1486 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 1488 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 1487 parseBool(n) { | 1489 parseBool(n) { |
| 1488 if (n == "true") return true; | 1490 if (n == "true") return true; |
| 1489 if (n == "false") return false; | 1491 if (n == "false") return false; |
| 1490 if (n == null) return null; | 1492 if (n == null) return null; |
| 1491 throw new core.ArgumentError("Invalid boolean: $n"); | 1493 throw new core.ArgumentError("Invalid boolean: $n"); |
| 1492 } | 1494 } |
| 1493 if (query.length > 0) { | 1495 if (query.length > 0) { |
| 1494 for (var part in query.split("&")) { | 1496 for (var part in query.split("&")) { |
| 1495 var keyvalue = part.split("="); | 1497 var keyvalue = part.split("="); |
| 1496 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 1498 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 1497 } | 1499 } |
| 1498 } | 1500 } |
| 1501 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ
als(arg_pageSize)); |
| 1499 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | 1502 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); |
| 1500 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ
als(arg_pageSize)); | |
| 1501 | 1503 |
| 1502 | 1504 |
| 1503 var h = { | 1505 var h = { |
| 1504 "content-type" : "application/json; charset=utf-8", | 1506 "content-type" : "application/json; charset=utf-8", |
| 1505 }; | 1507 }; |
| 1506 var resp = convert.JSON.encode(buildListLogsResponse()); | 1508 var resp = convert.JSON.encode(buildListLogsResponse()); |
| 1507 return new async.Future.value(stringResponse(200, h, resp)); | 1509 return new async.Future.value(stringResponse(200, h, resp)); |
| 1508 }), true); | 1510 }), true); |
| 1509 res.list(arg_parent, pageToken: arg_pageToken, pageSize: arg_pageSize).the
n(unittest.expectAsync1(((api.ListLogsResponse response) { | 1511 res.list(arg_parent, pageSize: arg_pageSize, pageToken: arg_pageToken).the
n(unittest.expectAsync1(((api.ListLogsResponse response) { |
| 1510 checkListLogsResponse(response); | 1512 checkListLogsResponse(response); |
| 1511 }))); | 1513 }))); |
| 1512 }); | 1514 }); |
| 1513 | 1515 |
| 1514 }); | 1516 }); |
| 1515 | 1517 |
| 1516 | 1518 |
| 1517 unittest.group("resource-ProjectsMetricsResourceApi", () { | 1519 unittest.group("resource-ProjectsMetricsResourceApi", () { |
| 1518 unittest.test("method--create", () { | 1520 unittest.test("method--create", () { |
| 1519 | 1521 |
| (...skipping 375 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1895 res.get(arg_sinkName).then(unittest.expectAsync1(((api.LogSink response) { | 1897 res.get(arg_sinkName).then(unittest.expectAsync1(((api.LogSink response) { |
| 1896 checkLogSink(response); | 1898 checkLogSink(response); |
| 1897 }))); | 1899 }))); |
| 1898 }); | 1900 }); |
| 1899 | 1901 |
| 1900 unittest.test("method--list", () { | 1902 unittest.test("method--list", () { |
| 1901 | 1903 |
| 1902 var mock = new HttpServerMock(); | 1904 var mock = new HttpServerMock(); |
| 1903 api.ProjectsSinksResourceApi res = new api.LoggingApi(mock).projects.sinks
; | 1905 api.ProjectsSinksResourceApi res = new api.LoggingApi(mock).projects.sinks
; |
| 1904 var arg_parent = "foo"; | 1906 var arg_parent = "foo"; |
| 1907 var arg_pageSize = 42; |
| 1905 var arg_pageToken = "foo"; | 1908 var arg_pageToken = "foo"; |
| 1906 var arg_pageSize = 42; | |
| 1907 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 1909 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 1908 var path = (req.url).path; | 1910 var path = (req.url).path; |
| 1909 var pathOffset = 0; | 1911 var pathOffset = 0; |
| 1910 var index; | 1912 var index; |
| 1911 var subPart; | 1913 var subPart; |
| 1912 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1914 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 1913 pathOffset += 1; | 1915 pathOffset += 1; |
| 1914 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("v2beta1/")); | 1916 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("v2beta1/")); |
| 1915 pathOffset += 8; | 1917 pathOffset += 8; |
| 1916 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; | 1918 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; |
| 1917 | 1919 |
| 1918 var query = (req.url).query; | 1920 var query = (req.url).query; |
| 1919 var queryOffset = 0; | 1921 var queryOffset = 0; |
| 1920 var queryMap = {}; | 1922 var queryMap = {}; |
| 1921 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 1923 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 1922 parseBool(n) { | 1924 parseBool(n) { |
| 1923 if (n == "true") return true; | 1925 if (n == "true") return true; |
| 1924 if (n == "false") return false; | 1926 if (n == "false") return false; |
| 1925 if (n == null) return null; | 1927 if (n == null) return null; |
| 1926 throw new core.ArgumentError("Invalid boolean: $n"); | 1928 throw new core.ArgumentError("Invalid boolean: $n"); |
| 1927 } | 1929 } |
| 1928 if (query.length > 0) { | 1930 if (query.length > 0) { |
| 1929 for (var part in query.split("&")) { | 1931 for (var part in query.split("&")) { |
| 1930 var keyvalue = part.split("="); | 1932 var keyvalue = part.split("="); |
| 1931 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 1933 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 1932 } | 1934 } |
| 1933 } | 1935 } |
| 1936 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ
als(arg_pageSize)); |
| 1934 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | 1937 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); |
| 1935 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ
als(arg_pageSize)); | |
| 1936 | 1938 |
| 1937 | 1939 |
| 1938 var h = { | 1940 var h = { |
| 1939 "content-type" : "application/json; charset=utf-8", | 1941 "content-type" : "application/json; charset=utf-8", |
| 1940 }; | 1942 }; |
| 1941 var resp = convert.JSON.encode(buildListSinksResponse()); | 1943 var resp = convert.JSON.encode(buildListSinksResponse()); |
| 1942 return new async.Future.value(stringResponse(200, h, resp)); | 1944 return new async.Future.value(stringResponse(200, h, resp)); |
| 1943 }), true); | 1945 }), true); |
| 1944 res.list(arg_parent, pageToken: arg_pageToken, pageSize: arg_pageSize).the
n(unittest.expectAsync1(((api.ListSinksResponse response) { | 1946 res.list(arg_parent, pageSize: arg_pageSize, pageToken: arg_pageToken).the
n(unittest.expectAsync1(((api.ListSinksResponse response) { |
| 1945 checkListSinksResponse(response); | 1947 checkListSinksResponse(response); |
| 1946 }))); | 1948 }))); |
| 1947 }); | 1949 }); |
| 1948 | 1950 |
| 1949 unittest.test("method--update", () { | 1951 unittest.test("method--update", () { |
| 1950 | 1952 |
| 1951 var mock = new HttpServerMock(); | 1953 var mock = new HttpServerMock(); |
| 1952 api.ProjectsSinksResourceApi res = new api.LoggingApi(mock).projects.sinks
; | 1954 api.ProjectsSinksResourceApi res = new api.LoggingApi(mock).projects.sinks
; |
| 1953 var arg_request = buildLogSink(); | 1955 var arg_request = buildLogSink(); |
| 1954 var arg_sinkName = "foo"; | 1956 var arg_sinkName = "foo"; |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1995 res.update(arg_request, arg_sinkName, uniqueWriterIdentity: arg_uniqueWrit
erIdentity).then(unittest.expectAsync1(((api.LogSink response) { | 1997 res.update(arg_request, arg_sinkName, uniqueWriterIdentity: arg_uniqueWrit
erIdentity).then(unittest.expectAsync1(((api.LogSink response) { |
| 1996 checkLogSink(response); | 1998 checkLogSink(response); |
| 1997 }))); | 1999 }))); |
| 1998 }); | 2000 }); |
| 1999 | 2001 |
| 2000 }); | 2002 }); |
| 2001 | 2003 |
| 2002 | 2004 |
| 2003 } | 2005 } |
| 2004 | 2006 |
| OLD | NEW |