| OLD | NEW |
| 1 library googleapis.coordinate.v1.test; | 1 library googleapis.coordinate.v1.test; |
| 2 | 2 |
| 3 import "dart:core" as core; | 3 import "dart:core" as core; |
| 4 import "dart:collection" as collection; | 4 import "dart:collection" as collection; |
| 5 import "dart:async" as async; | 5 import "dart:async" as async; |
| 6 import "dart:convert" as convert; | 6 import "dart:convert" as convert; |
| 7 | 7 |
| 8 import 'package:http/http.dart' as http; | 8 import 'package:http/http.dart' as http; |
| 9 import 'package:http/testing.dart' as http_testing; | 9 import 'package:http/testing.dart' as http_testing; |
| 10 import 'package:unittest/unittest.dart' as unittest; | 10 import 'package:unittest/unittest.dart' as unittest; |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 61 unittest.expect(o.enabled, unittest.isTrue); | 61 unittest.expect(o.enabled, unittest.isTrue); |
| 62 unittest.expect(o.id, unittest.equals('foo')); | 62 unittest.expect(o.id, unittest.equals('foo')); |
| 63 unittest.expect(o.kind, unittest.equals('foo')); | 63 unittest.expect(o.kind, unittest.equals('foo')); |
| 64 unittest.expect(o.name, unittest.equals('foo')); | 64 unittest.expect(o.name, unittest.equals('foo')); |
| 65 unittest.expect(o.requiredForCheckout, unittest.isTrue); | 65 unittest.expect(o.requiredForCheckout, unittest.isTrue); |
| 66 unittest.expect(o.type, unittest.equals('foo')); | 66 unittest.expect(o.type, unittest.equals('foo')); |
| 67 } | 67 } |
| 68 buildCounterCustomFieldDef--; | 68 buildCounterCustomFieldDef--; |
| 69 } | 69 } |
| 70 | 70 |
| 71 buildUnnamed445() { | 71 buildUnnamed470() { |
| 72 var o = new core.List<api.CustomFieldDef>(); | 72 var o = new core.List<api.CustomFieldDef>(); |
| 73 o.add(buildCustomFieldDef()); | 73 o.add(buildCustomFieldDef()); |
| 74 o.add(buildCustomFieldDef()); | 74 o.add(buildCustomFieldDef()); |
| 75 return o; | 75 return o; |
| 76 } | 76 } |
| 77 | 77 |
| 78 checkUnnamed445(core.List<api.CustomFieldDef> o) { | 78 checkUnnamed470(core.List<api.CustomFieldDef> o) { |
| 79 unittest.expect(o, unittest.hasLength(2)); | 79 unittest.expect(o, unittest.hasLength(2)); |
| 80 checkCustomFieldDef(o[0]); | 80 checkCustomFieldDef(o[0]); |
| 81 checkCustomFieldDef(o[1]); | 81 checkCustomFieldDef(o[1]); |
| 82 } | 82 } |
| 83 | 83 |
| 84 core.int buildCounterCustomFieldDefListResponse = 0; | 84 core.int buildCounterCustomFieldDefListResponse = 0; |
| 85 buildCustomFieldDefListResponse() { | 85 buildCustomFieldDefListResponse() { |
| 86 var o = new api.CustomFieldDefListResponse(); | 86 var o = new api.CustomFieldDefListResponse(); |
| 87 buildCounterCustomFieldDefListResponse++; | 87 buildCounterCustomFieldDefListResponse++; |
| 88 if (buildCounterCustomFieldDefListResponse < 3) { | 88 if (buildCounterCustomFieldDefListResponse < 3) { |
| 89 o.items = buildUnnamed445(); | 89 o.items = buildUnnamed470(); |
| 90 o.kind = "foo"; | 90 o.kind = "foo"; |
| 91 } | 91 } |
| 92 buildCounterCustomFieldDefListResponse--; | 92 buildCounterCustomFieldDefListResponse--; |
| 93 return o; | 93 return o; |
| 94 } | 94 } |
| 95 | 95 |
| 96 checkCustomFieldDefListResponse(api.CustomFieldDefListResponse o) { | 96 checkCustomFieldDefListResponse(api.CustomFieldDefListResponse o) { |
| 97 buildCounterCustomFieldDefListResponse++; | 97 buildCounterCustomFieldDefListResponse++; |
| 98 if (buildCounterCustomFieldDefListResponse < 3) { | 98 if (buildCounterCustomFieldDefListResponse < 3) { |
| 99 checkUnnamed445(o.items); | 99 checkUnnamed470(o.items); |
| 100 unittest.expect(o.kind, unittest.equals('foo')); | 100 unittest.expect(o.kind, unittest.equals('foo')); |
| 101 } | 101 } |
| 102 buildCounterCustomFieldDefListResponse--; | 102 buildCounterCustomFieldDefListResponse--; |
| 103 } | 103 } |
| 104 | 104 |
| 105 buildUnnamed446() { | 105 buildUnnamed471() { |
| 106 var o = new core.List<api.CustomField>(); | 106 var o = new core.List<api.CustomField>(); |
| 107 o.add(buildCustomField()); | 107 o.add(buildCustomField()); |
| 108 o.add(buildCustomField()); | 108 o.add(buildCustomField()); |
| 109 return o; | 109 return o; |
| 110 } | 110 } |
| 111 | 111 |
| 112 checkUnnamed446(core.List<api.CustomField> o) { | 112 checkUnnamed471(core.List<api.CustomField> o) { |
| 113 unittest.expect(o, unittest.hasLength(2)); | 113 unittest.expect(o, unittest.hasLength(2)); |
| 114 checkCustomField(o[0]); | 114 checkCustomField(o[0]); |
| 115 checkCustomField(o[1]); | 115 checkCustomField(o[1]); |
| 116 } | 116 } |
| 117 | 117 |
| 118 core.int buildCounterCustomFields = 0; | 118 core.int buildCounterCustomFields = 0; |
| 119 buildCustomFields() { | 119 buildCustomFields() { |
| 120 var o = new api.CustomFields(); | 120 var o = new api.CustomFields(); |
| 121 buildCounterCustomFields++; | 121 buildCounterCustomFields++; |
| 122 if (buildCounterCustomFields < 3) { | 122 if (buildCounterCustomFields < 3) { |
| 123 o.customField = buildUnnamed446(); | 123 o.customField = buildUnnamed471(); |
| 124 o.kind = "foo"; | 124 o.kind = "foo"; |
| 125 } | 125 } |
| 126 buildCounterCustomFields--; | 126 buildCounterCustomFields--; |
| 127 return o; | 127 return o; |
| 128 } | 128 } |
| 129 | 129 |
| 130 checkCustomFields(api.CustomFields o) { | 130 checkCustomFields(api.CustomFields o) { |
| 131 buildCounterCustomFields++; | 131 buildCounterCustomFields++; |
| 132 if (buildCounterCustomFields < 3) { | 132 if (buildCounterCustomFields < 3) { |
| 133 checkUnnamed446(o.customField); | 133 checkUnnamed471(o.customField); |
| 134 unittest.expect(o.kind, unittest.equals('foo')); | 134 unittest.expect(o.kind, unittest.equals('foo')); |
| 135 } | 135 } |
| 136 buildCounterCustomFields--; | 136 buildCounterCustomFields--; |
| 137 } | 137 } |
| 138 | 138 |
| 139 buildUnnamed447() { | 139 buildUnnamed472() { |
| 140 var o = new core.List<api.JobChange>(); | 140 var o = new core.List<api.JobChange>(); |
| 141 o.add(buildJobChange()); | 141 o.add(buildJobChange()); |
| 142 o.add(buildJobChange()); | 142 o.add(buildJobChange()); |
| 143 return o; | 143 return o; |
| 144 } | 144 } |
| 145 | 145 |
| 146 checkUnnamed447(core.List<api.JobChange> o) { | 146 checkUnnamed472(core.List<api.JobChange> o) { |
| 147 unittest.expect(o, unittest.hasLength(2)); | 147 unittest.expect(o, unittest.hasLength(2)); |
| 148 checkJobChange(o[0]); | 148 checkJobChange(o[0]); |
| 149 checkJobChange(o[1]); | 149 checkJobChange(o[1]); |
| 150 } | 150 } |
| 151 | 151 |
| 152 core.int buildCounterJob = 0; | 152 core.int buildCounterJob = 0; |
| 153 buildJob() { | 153 buildJob() { |
| 154 var o = new api.Job(); | 154 var o = new api.Job(); |
| 155 buildCounterJob++; | 155 buildCounterJob++; |
| 156 if (buildCounterJob < 3) { | 156 if (buildCounterJob < 3) { |
| 157 o.id = "foo"; | 157 o.id = "foo"; |
| 158 o.jobChange = buildUnnamed447(); | 158 o.jobChange = buildUnnamed472(); |
| 159 o.kind = "foo"; | 159 o.kind = "foo"; |
| 160 o.state = buildJobState(); | 160 o.state = buildJobState(); |
| 161 } | 161 } |
| 162 buildCounterJob--; | 162 buildCounterJob--; |
| 163 return o; | 163 return o; |
| 164 } | 164 } |
| 165 | 165 |
| 166 checkJob(api.Job o) { | 166 checkJob(api.Job o) { |
| 167 buildCounterJob++; | 167 buildCounterJob++; |
| 168 if (buildCounterJob < 3) { | 168 if (buildCounterJob < 3) { |
| 169 unittest.expect(o.id, unittest.equals('foo')); | 169 unittest.expect(o.id, unittest.equals('foo')); |
| 170 checkUnnamed447(o.jobChange); | 170 checkUnnamed472(o.jobChange); |
| 171 unittest.expect(o.kind, unittest.equals('foo')); | 171 unittest.expect(o.kind, unittest.equals('foo')); |
| 172 checkJobState(o.state); | 172 checkJobState(o.state); |
| 173 } | 173 } |
| 174 buildCounterJob--; | 174 buildCounterJob--; |
| 175 } | 175 } |
| 176 | 176 |
| 177 core.int buildCounterJobChange = 0; | 177 core.int buildCounterJobChange = 0; |
| 178 buildJobChange() { | 178 buildJobChange() { |
| 179 var o = new api.JobChange(); | 179 var o = new api.JobChange(); |
| 180 buildCounterJobChange++; | 180 buildCounterJobChange++; |
| 181 if (buildCounterJobChange < 3) { | 181 if (buildCounterJobChange < 3) { |
| 182 o.kind = "foo"; | 182 o.kind = "foo"; |
| 183 o.state = buildJobState(); | 183 o.state = buildJobState(); |
| 184 o.timestamp = "foo"; | 184 o.timestamp = "foo"; |
| 185 } | 185 } |
| 186 buildCounterJobChange--; | 186 buildCounterJobChange--; |
| 187 return o; | 187 return o; |
| 188 } | 188 } |
| 189 | 189 |
| 190 checkJobChange(api.JobChange o) { | 190 checkJobChange(api.JobChange o) { |
| 191 buildCounterJobChange++; | 191 buildCounterJobChange++; |
| 192 if (buildCounterJobChange < 3) { | 192 if (buildCounterJobChange < 3) { |
| 193 unittest.expect(o.kind, unittest.equals('foo')); | 193 unittest.expect(o.kind, unittest.equals('foo')); |
| 194 checkJobState(o.state); | 194 checkJobState(o.state); |
| 195 unittest.expect(o.timestamp, unittest.equals('foo')); | 195 unittest.expect(o.timestamp, unittest.equals('foo')); |
| 196 } | 196 } |
| 197 buildCounterJobChange--; | 197 buildCounterJobChange--; |
| 198 } | 198 } |
| 199 | 199 |
| 200 buildUnnamed448() { | 200 buildUnnamed473() { |
| 201 var o = new core.List<api.Job>(); | 201 var o = new core.List<api.Job>(); |
| 202 o.add(buildJob()); | 202 o.add(buildJob()); |
| 203 o.add(buildJob()); | 203 o.add(buildJob()); |
| 204 return o; | 204 return o; |
| 205 } | 205 } |
| 206 | 206 |
| 207 checkUnnamed448(core.List<api.Job> o) { | 207 checkUnnamed473(core.List<api.Job> o) { |
| 208 unittest.expect(o, unittest.hasLength(2)); | 208 unittest.expect(o, unittest.hasLength(2)); |
| 209 checkJob(o[0]); | 209 checkJob(o[0]); |
| 210 checkJob(o[1]); | 210 checkJob(o[1]); |
| 211 } | 211 } |
| 212 | 212 |
| 213 core.int buildCounterJobListResponse = 0; | 213 core.int buildCounterJobListResponse = 0; |
| 214 buildJobListResponse() { | 214 buildJobListResponse() { |
| 215 var o = new api.JobListResponse(); | 215 var o = new api.JobListResponse(); |
| 216 buildCounterJobListResponse++; | 216 buildCounterJobListResponse++; |
| 217 if (buildCounterJobListResponse < 3) { | 217 if (buildCounterJobListResponse < 3) { |
| 218 o.items = buildUnnamed448(); | 218 o.items = buildUnnamed473(); |
| 219 o.kind = "foo"; | 219 o.kind = "foo"; |
| 220 o.nextPageToken = "foo"; | 220 o.nextPageToken = "foo"; |
| 221 } | 221 } |
| 222 buildCounterJobListResponse--; | 222 buildCounterJobListResponse--; |
| 223 return o; | 223 return o; |
| 224 } | 224 } |
| 225 | 225 |
| 226 checkJobListResponse(api.JobListResponse o) { | 226 checkJobListResponse(api.JobListResponse o) { |
| 227 buildCounterJobListResponse++; | 227 buildCounterJobListResponse++; |
| 228 if (buildCounterJobListResponse < 3) { | 228 if (buildCounterJobListResponse < 3) { |
| 229 checkUnnamed448(o.items); | 229 checkUnnamed473(o.items); |
| 230 unittest.expect(o.kind, unittest.equals('foo')); | 230 unittest.expect(o.kind, unittest.equals('foo')); |
| 231 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 231 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
| 232 } | 232 } |
| 233 buildCounterJobListResponse--; | 233 buildCounterJobListResponse--; |
| 234 } | 234 } |
| 235 | 235 |
| 236 buildUnnamed449() { | 236 buildUnnamed474() { |
| 237 var o = new core.List<core.String>(); | 237 var o = new core.List<core.String>(); |
| 238 o.add("foo"); | 238 o.add("foo"); |
| 239 o.add("foo"); | 239 o.add("foo"); |
| 240 return o; | 240 return o; |
| 241 } | 241 } |
| 242 | 242 |
| 243 checkUnnamed449(core.List<core.String> o) { | 243 checkUnnamed474(core.List<core.String> o) { |
| 244 unittest.expect(o, unittest.hasLength(2)); | 244 unittest.expect(o, unittest.hasLength(2)); |
| 245 unittest.expect(o[0], unittest.equals('foo')); | 245 unittest.expect(o[0], unittest.equals('foo')); |
| 246 unittest.expect(o[1], unittest.equals('foo')); | 246 unittest.expect(o[1], unittest.equals('foo')); |
| 247 } | 247 } |
| 248 | 248 |
| 249 core.int buildCounterJobState = 0; | 249 core.int buildCounterJobState = 0; |
| 250 buildJobState() { | 250 buildJobState() { |
| 251 var o = new api.JobState(); | 251 var o = new api.JobState(); |
| 252 buildCounterJobState++; | 252 buildCounterJobState++; |
| 253 if (buildCounterJobState < 3) { | 253 if (buildCounterJobState < 3) { |
| 254 o.assignee = "foo"; | 254 o.assignee = "foo"; |
| 255 o.customFields = buildCustomFields(); | 255 o.customFields = buildCustomFields(); |
| 256 o.customerName = "foo"; | 256 o.customerName = "foo"; |
| 257 o.customerPhoneNumber = "foo"; | 257 o.customerPhoneNumber = "foo"; |
| 258 o.kind = "foo"; | 258 o.kind = "foo"; |
| 259 o.location = buildLocation(); | 259 o.location = buildLocation(); |
| 260 o.note = buildUnnamed449(); | 260 o.note = buildUnnamed474(); |
| 261 o.progress = "foo"; | 261 o.progress = "foo"; |
| 262 o.title = "foo"; | 262 o.title = "foo"; |
| 263 } | 263 } |
| 264 buildCounterJobState--; | 264 buildCounterJobState--; |
| 265 return o; | 265 return o; |
| 266 } | 266 } |
| 267 | 267 |
| 268 checkJobState(api.JobState o) { | 268 checkJobState(api.JobState o) { |
| 269 buildCounterJobState++; | 269 buildCounterJobState++; |
| 270 if (buildCounterJobState < 3) { | 270 if (buildCounterJobState < 3) { |
| 271 unittest.expect(o.assignee, unittest.equals('foo')); | 271 unittest.expect(o.assignee, unittest.equals('foo')); |
| 272 checkCustomFields(o.customFields); | 272 checkCustomFields(o.customFields); |
| 273 unittest.expect(o.customerName, unittest.equals('foo')); | 273 unittest.expect(o.customerName, unittest.equals('foo')); |
| 274 unittest.expect(o.customerPhoneNumber, unittest.equals('foo')); | 274 unittest.expect(o.customerPhoneNumber, unittest.equals('foo')); |
| 275 unittest.expect(o.kind, unittest.equals('foo')); | 275 unittest.expect(o.kind, unittest.equals('foo')); |
| 276 checkLocation(o.location); | 276 checkLocation(o.location); |
| 277 checkUnnamed449(o.note); | 277 checkUnnamed474(o.note); |
| 278 unittest.expect(o.progress, unittest.equals('foo')); | 278 unittest.expect(o.progress, unittest.equals('foo')); |
| 279 unittest.expect(o.title, unittest.equals('foo')); | 279 unittest.expect(o.title, unittest.equals('foo')); |
| 280 } | 280 } |
| 281 buildCounterJobState--; | 281 buildCounterJobState--; |
| 282 } | 282 } |
| 283 | 283 |
| 284 buildUnnamed450() { | 284 buildUnnamed475() { |
| 285 var o = new core.List<core.String>(); | 285 var o = new core.List<core.String>(); |
| 286 o.add("foo"); | 286 o.add("foo"); |
| 287 o.add("foo"); | 287 o.add("foo"); |
| 288 return o; | 288 return o; |
| 289 } | 289 } |
| 290 | 290 |
| 291 checkUnnamed450(core.List<core.String> o) { | 291 checkUnnamed475(core.List<core.String> o) { |
| 292 unittest.expect(o, unittest.hasLength(2)); | 292 unittest.expect(o, unittest.hasLength(2)); |
| 293 unittest.expect(o[0], unittest.equals('foo')); | 293 unittest.expect(o[0], unittest.equals('foo')); |
| 294 unittest.expect(o[1], unittest.equals('foo')); | 294 unittest.expect(o[1], unittest.equals('foo')); |
| 295 } | 295 } |
| 296 | 296 |
| 297 core.int buildCounterLocation = 0; | 297 core.int buildCounterLocation = 0; |
| 298 buildLocation() { | 298 buildLocation() { |
| 299 var o = new api.Location(); | 299 var o = new api.Location(); |
| 300 buildCounterLocation++; | 300 buildCounterLocation++; |
| 301 if (buildCounterLocation < 3) { | 301 if (buildCounterLocation < 3) { |
| 302 o.addressLine = buildUnnamed450(); | 302 o.addressLine = buildUnnamed475(); |
| 303 o.kind = "foo"; | 303 o.kind = "foo"; |
| 304 o.lat = 42.0; | 304 o.lat = 42.0; |
| 305 o.lng = 42.0; | 305 o.lng = 42.0; |
| 306 } | 306 } |
| 307 buildCounterLocation--; | 307 buildCounterLocation--; |
| 308 return o; | 308 return o; |
| 309 } | 309 } |
| 310 | 310 |
| 311 checkLocation(api.Location o) { | 311 checkLocation(api.Location o) { |
| 312 buildCounterLocation++; | 312 buildCounterLocation++; |
| 313 if (buildCounterLocation < 3) { | 313 if (buildCounterLocation < 3) { |
| 314 checkUnnamed450(o.addressLine); | 314 checkUnnamed475(o.addressLine); |
| 315 unittest.expect(o.kind, unittest.equals('foo')); | 315 unittest.expect(o.kind, unittest.equals('foo')); |
| 316 unittest.expect(o.lat, unittest.equals(42.0)); | 316 unittest.expect(o.lat, unittest.equals(42.0)); |
| 317 unittest.expect(o.lng, unittest.equals(42.0)); | 317 unittest.expect(o.lng, unittest.equals(42.0)); |
| 318 } | 318 } |
| 319 buildCounterLocation--; | 319 buildCounterLocation--; |
| 320 } | 320 } |
| 321 | 321 |
| 322 buildUnnamed451() { | 322 buildUnnamed476() { |
| 323 var o = new core.List<api.LocationRecord>(); | 323 var o = new core.List<api.LocationRecord>(); |
| 324 o.add(buildLocationRecord()); | 324 o.add(buildLocationRecord()); |
| 325 o.add(buildLocationRecord()); | 325 o.add(buildLocationRecord()); |
| 326 return o; | 326 return o; |
| 327 } | 327 } |
| 328 | 328 |
| 329 checkUnnamed451(core.List<api.LocationRecord> o) { | 329 checkUnnamed476(core.List<api.LocationRecord> o) { |
| 330 unittest.expect(o, unittest.hasLength(2)); | 330 unittest.expect(o, unittest.hasLength(2)); |
| 331 checkLocationRecord(o[0]); | 331 checkLocationRecord(o[0]); |
| 332 checkLocationRecord(o[1]); | 332 checkLocationRecord(o[1]); |
| 333 } | 333 } |
| 334 | 334 |
| 335 core.int buildCounterLocationListResponse = 0; | 335 core.int buildCounterLocationListResponse = 0; |
| 336 buildLocationListResponse() { | 336 buildLocationListResponse() { |
| 337 var o = new api.LocationListResponse(); | 337 var o = new api.LocationListResponse(); |
| 338 buildCounterLocationListResponse++; | 338 buildCounterLocationListResponse++; |
| 339 if (buildCounterLocationListResponse < 3) { | 339 if (buildCounterLocationListResponse < 3) { |
| 340 o.items = buildUnnamed451(); | 340 o.items = buildUnnamed476(); |
| 341 o.kind = "foo"; | 341 o.kind = "foo"; |
| 342 o.nextPageToken = "foo"; | 342 o.nextPageToken = "foo"; |
| 343 o.tokenPagination = buildTokenPagination(); | 343 o.tokenPagination = buildTokenPagination(); |
| 344 } | 344 } |
| 345 buildCounterLocationListResponse--; | 345 buildCounterLocationListResponse--; |
| 346 return o; | 346 return o; |
| 347 } | 347 } |
| 348 | 348 |
| 349 checkLocationListResponse(api.LocationListResponse o) { | 349 checkLocationListResponse(api.LocationListResponse o) { |
| 350 buildCounterLocationListResponse++; | 350 buildCounterLocationListResponse++; |
| 351 if (buildCounterLocationListResponse < 3) { | 351 if (buildCounterLocationListResponse < 3) { |
| 352 checkUnnamed451(o.items); | 352 checkUnnamed476(o.items); |
| 353 unittest.expect(o.kind, unittest.equals('foo')); | 353 unittest.expect(o.kind, unittest.equals('foo')); |
| 354 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 354 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
| 355 checkTokenPagination(o.tokenPagination); | 355 checkTokenPagination(o.tokenPagination); |
| 356 } | 356 } |
| 357 buildCounterLocationListResponse--; | 357 buildCounterLocationListResponse--; |
| 358 } | 358 } |
| 359 | 359 |
| 360 core.int buildCounterLocationRecord = 0; | 360 core.int buildCounterLocationRecord = 0; |
| 361 buildLocationRecord() { | 361 buildLocationRecord() { |
| 362 var o = new api.LocationRecord(); | 362 var o = new api.LocationRecord(); |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 448 | 448 |
| 449 checkWorker(api.Worker o) { | 449 checkWorker(api.Worker o) { |
| 450 buildCounterWorker++; | 450 buildCounterWorker++; |
| 451 if (buildCounterWorker < 3) { | 451 if (buildCounterWorker < 3) { |
| 452 unittest.expect(o.id, unittest.equals('foo')); | 452 unittest.expect(o.id, unittest.equals('foo')); |
| 453 unittest.expect(o.kind, unittest.equals('foo')); | 453 unittest.expect(o.kind, unittest.equals('foo')); |
| 454 } | 454 } |
| 455 buildCounterWorker--; | 455 buildCounterWorker--; |
| 456 } | 456 } |
| 457 | 457 |
| 458 buildUnnamed452() { | 458 buildUnnamed477() { |
| 459 var o = new core.List<api.Worker>(); | 459 var o = new core.List<api.Worker>(); |
| 460 o.add(buildWorker()); | 460 o.add(buildWorker()); |
| 461 o.add(buildWorker()); | 461 o.add(buildWorker()); |
| 462 return o; | 462 return o; |
| 463 } | 463 } |
| 464 | 464 |
| 465 checkUnnamed452(core.List<api.Worker> o) { | 465 checkUnnamed477(core.List<api.Worker> o) { |
| 466 unittest.expect(o, unittest.hasLength(2)); | 466 unittest.expect(o, unittest.hasLength(2)); |
| 467 checkWorker(o[0]); | 467 checkWorker(o[0]); |
| 468 checkWorker(o[1]); | 468 checkWorker(o[1]); |
| 469 } | 469 } |
| 470 | 470 |
| 471 core.int buildCounterWorkerListResponse = 0; | 471 core.int buildCounterWorkerListResponse = 0; |
| 472 buildWorkerListResponse() { | 472 buildWorkerListResponse() { |
| 473 var o = new api.WorkerListResponse(); | 473 var o = new api.WorkerListResponse(); |
| 474 buildCounterWorkerListResponse++; | 474 buildCounterWorkerListResponse++; |
| 475 if (buildCounterWorkerListResponse < 3) { | 475 if (buildCounterWorkerListResponse < 3) { |
| 476 o.items = buildUnnamed452(); | 476 o.items = buildUnnamed477(); |
| 477 o.kind = "foo"; | 477 o.kind = "foo"; |
| 478 } | 478 } |
| 479 buildCounterWorkerListResponse--; | 479 buildCounterWorkerListResponse--; |
| 480 return o; | 480 return o; |
| 481 } | 481 } |
| 482 | 482 |
| 483 checkWorkerListResponse(api.WorkerListResponse o) { | 483 checkWorkerListResponse(api.WorkerListResponse o) { |
| 484 buildCounterWorkerListResponse++; | 484 buildCounterWorkerListResponse++; |
| 485 if (buildCounterWorkerListResponse < 3) { | 485 if (buildCounterWorkerListResponse < 3) { |
| 486 checkUnnamed452(o.items); | 486 checkUnnamed477(o.items); |
| 487 unittest.expect(o.kind, unittest.equals('foo')); | 487 unittest.expect(o.kind, unittest.equals('foo')); |
| 488 } | 488 } |
| 489 buildCounterWorkerListResponse--; | 489 buildCounterWorkerListResponse--; |
| 490 } | 490 } |
| 491 | 491 |
| 492 buildUnnamed453() { | 492 buildUnnamed478() { |
| 493 var o = new core.List<core.String>(); | 493 var o = new core.List<core.String>(); |
| 494 o.add("foo"); | 494 o.add("foo"); |
| 495 o.add("foo"); | 495 o.add("foo"); |
| 496 return o; | 496 return o; |
| 497 } | 497 } |
| 498 | 498 |
| 499 checkUnnamed453(core.List<core.String> o) { | 499 checkUnnamed478(core.List<core.String> o) { |
| 500 unittest.expect(o, unittest.hasLength(2)); | 500 unittest.expect(o, unittest.hasLength(2)); |
| 501 unittest.expect(o[0], unittest.equals('foo')); | 501 unittest.expect(o[0], unittest.equals('foo')); |
| 502 unittest.expect(o[1], unittest.equals('foo')); | 502 unittest.expect(o[1], unittest.equals('foo')); |
| 503 } | 503 } |
| 504 | 504 |
| 505 buildUnnamed454() { | 505 buildUnnamed479() { |
| 506 var o = new core.List<core.String>(); | 506 var o = new core.List<core.String>(); |
| 507 o.add("foo"); | 507 o.add("foo"); |
| 508 o.add("foo"); | 508 o.add("foo"); |
| 509 return o; | 509 return o; |
| 510 } | 510 } |
| 511 | 511 |
| 512 checkUnnamed454(core.List<core.String> o) { | 512 checkUnnamed479(core.List<core.String> o) { |
| 513 unittest.expect(o, unittest.hasLength(2)); | 513 unittest.expect(o, unittest.hasLength(2)); |
| 514 unittest.expect(o[0], unittest.equals('foo')); | 514 unittest.expect(o[0], unittest.equals('foo')); |
| 515 unittest.expect(o[1], unittest.equals('foo')); | 515 unittest.expect(o[1], unittest.equals('foo')); |
| 516 } | 516 } |
| 517 | 517 |
| 518 buildUnnamed455() { | 518 buildUnnamed480() { |
| 519 var o = new core.List<core.String>(); | 519 var o = new core.List<core.String>(); |
| 520 o.add("foo"); | 520 o.add("foo"); |
| 521 o.add("foo"); | 521 o.add("foo"); |
| 522 return o; | 522 return o; |
| 523 } | 523 } |
| 524 | 524 |
| 525 checkUnnamed455(core.List<core.String> o) { | 525 checkUnnamed480(core.List<core.String> o) { |
| 526 unittest.expect(o, unittest.hasLength(2)); | 526 unittest.expect(o, unittest.hasLength(2)); |
| 527 unittest.expect(o[0], unittest.equals('foo')); | 527 unittest.expect(o[0], unittest.equals('foo')); |
| 528 unittest.expect(o[1], unittest.equals('foo')); | 528 unittest.expect(o[1], unittest.equals('foo')); |
| 529 } | 529 } |
| 530 | 530 |
| 531 | 531 |
| 532 main() { | 532 main() { |
| 533 unittest.group("obj-schema-CustomField", () { | 533 unittest.group("obj-schema-CustomField", () { |
| 534 unittest.test("to-json--from-json", () { | 534 unittest.test("to-json--from-json", () { |
| 535 var o = buildCustomField(); | 535 var o = buildCustomField(); |
| (...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 669 unittest.test("method--list", () { | 669 unittest.test("method--list", () { |
| 670 | 670 |
| 671 var mock = new common_test.HttpServerMock(); | 671 var mock = new common_test.HttpServerMock(); |
| 672 api.CustomFieldDefResourceApi res = new api.CoordinateApi(mock).customFiel
dDef; | 672 api.CustomFieldDefResourceApi res = new api.CoordinateApi(mock).customFiel
dDef; |
| 673 var arg_teamId = "foo"; | 673 var arg_teamId = "foo"; |
| 674 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 674 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 675 var path = (req.url).path; | 675 var path = (req.url).path; |
| 676 var pathOffset = 0; | 676 var pathOffset = 0; |
| 677 var index; | 677 var index; |
| 678 var subPart; | 678 var subPart; |
| 679 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq
uals("/coordinate/v1/teams/")); | 679 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 680 pathOffset += 21; | 680 pathOffset += 1; |
| 681 index = path.indexOf("/custom_fields", pathOffset); | |
| 682 unittest.expect(index >= 0, unittest.isTrue); | |
| 683 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 684 pathOffset = index; | |
| 685 unittest.expect(subPart, unittest.equals("$arg_teamId")); | |
| 686 unittest.expect(path.substring(pathOffset, pathOffset + 14), unittest.eq
uals("/custom_fields")); | |
| 687 pathOffset += 14; | |
| 688 | 681 |
| 689 var query = (req.url).query; | 682 var query = (req.url).query; |
| 690 var queryOffset = 0; | 683 var queryOffset = 0; |
| 691 var queryMap = {}; | 684 var queryMap = {}; |
| 692 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 685 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 693 parseBool(n) { | 686 parseBool(n) { |
| 694 if (n == "true") return true; | 687 if (n == "true") return true; |
| 695 if (n == "false") return false; | 688 if (n == "false") return false; |
| 696 if (n == null) return null; | 689 if (n == null) return null; |
| 697 throw new core.ArgumentError("Invalid boolean: $n"); | 690 throw new core.ArgumentError("Invalid boolean: $n"); |
| (...skipping 25 matching lines...) Expand all Loading... |
| 723 | 716 |
| 724 var mock = new common_test.HttpServerMock(); | 717 var mock = new common_test.HttpServerMock(); |
| 725 api.JobsResourceApi res = new api.CoordinateApi(mock).jobs; | 718 api.JobsResourceApi res = new api.CoordinateApi(mock).jobs; |
| 726 var arg_teamId = "foo"; | 719 var arg_teamId = "foo"; |
| 727 var arg_jobId = "foo"; | 720 var arg_jobId = "foo"; |
| 728 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 721 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 729 var path = (req.url).path; | 722 var path = (req.url).path; |
| 730 var pathOffset = 0; | 723 var pathOffset = 0; |
| 731 var index; | 724 var index; |
| 732 var subPart; | 725 var subPart; |
| 733 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq
uals("/coordinate/v1/teams/")); | 726 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 734 pathOffset += 21; | 727 pathOffset += 1; |
| 735 index = path.indexOf("/jobs/", pathOffset); | |
| 736 unittest.expect(index >= 0, unittest.isTrue); | |
| 737 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 738 pathOffset = index; | |
| 739 unittest.expect(subPart, unittest.equals("$arg_teamId")); | |
| 740 unittest.expect(path.substring(pathOffset, pathOffset + 6), unittest.equ
als("/jobs/")); | |
| 741 pathOffset += 6; | |
| 742 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 743 pathOffset = path.length; | |
| 744 unittest.expect(subPart, unittest.equals("$arg_jobId")); | |
| 745 | 728 |
| 746 var query = (req.url).query; | 729 var query = (req.url).query; |
| 747 var queryOffset = 0; | 730 var queryOffset = 0; |
| 748 var queryMap = {}; | 731 var queryMap = {}; |
| 749 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 732 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 750 parseBool(n) { | 733 parseBool(n) { |
| 751 if (n == "true") return true; | 734 if (n == "true") return true; |
| 752 if (n == "false") return false; | 735 if (n == "false") return false; |
| 753 if (n == null) return null; | 736 if (n == null) return null; |
| 754 throw new core.ArgumentError("Invalid boolean: $n"); | 737 throw new core.ArgumentError("Invalid boolean: $n"); |
| (...skipping 21 matching lines...) Expand all Loading... |
| 776 | 759 |
| 777 var mock = new common_test.HttpServerMock(); | 760 var mock = new common_test.HttpServerMock(); |
| 778 api.JobsResourceApi res = new api.CoordinateApi(mock).jobs; | 761 api.JobsResourceApi res = new api.CoordinateApi(mock).jobs; |
| 779 var arg_request = buildJob(); | 762 var arg_request = buildJob(); |
| 780 var arg_teamId = "foo"; | 763 var arg_teamId = "foo"; |
| 781 var arg_address = "foo"; | 764 var arg_address = "foo"; |
| 782 var arg_lat = 42.0; | 765 var arg_lat = 42.0; |
| 783 var arg_lng = 42.0; | 766 var arg_lng = 42.0; |
| 784 var arg_title = "foo"; | 767 var arg_title = "foo"; |
| 785 var arg_assignee = "foo"; | 768 var arg_assignee = "foo"; |
| 786 var arg_customField = buildUnnamed453(); | 769 var arg_customField = buildUnnamed478(); |
| 787 var arg_customerName = "foo"; | 770 var arg_customerName = "foo"; |
| 788 var arg_customerPhoneNumber = "foo"; | 771 var arg_customerPhoneNumber = "foo"; |
| 789 var arg_note = "foo"; | 772 var arg_note = "foo"; |
| 790 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 773 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 791 var obj = new api.Job.fromJson(json); | 774 var obj = new api.Job.fromJson(json); |
| 792 checkJob(obj); | 775 checkJob(obj); |
| 793 | 776 |
| 794 var path = (req.url).path; | 777 var path = (req.url).path; |
| 795 var pathOffset = 0; | 778 var pathOffset = 0; |
| 796 var index; | 779 var index; |
| 797 var subPart; | 780 var subPart; |
| 798 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq
uals("/coordinate/v1/teams/")); | 781 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 799 pathOffset += 21; | 782 pathOffset += 1; |
| 800 index = path.indexOf("/jobs", pathOffset); | |
| 801 unittest.expect(index >= 0, unittest.isTrue); | |
| 802 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 803 pathOffset = index; | |
| 804 unittest.expect(subPart, unittest.equals("$arg_teamId")); | |
| 805 unittest.expect(path.substring(pathOffset, pathOffset + 5), unittest.equ
als("/jobs")); | |
| 806 pathOffset += 5; | |
| 807 | 783 |
| 808 var query = (req.url).query; | 784 var query = (req.url).query; |
| 809 var queryOffset = 0; | 785 var queryOffset = 0; |
| 810 var queryMap = {}; | 786 var queryMap = {}; |
| 811 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 787 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 812 parseBool(n) { | 788 parseBool(n) { |
| 813 if (n == "true") return true; | 789 if (n == "true") return true; |
| 814 if (n == "false") return false; | 790 if (n == "false") return false; |
| 815 if (n == null) return null; | 791 if (n == null) return null; |
| 816 throw new core.ArgumentError("Invalid boolean: $n"); | 792 throw new core.ArgumentError("Invalid boolean: $n"); |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 849 api.JobsResourceApi res = new api.CoordinateApi(mock).jobs; | 825 api.JobsResourceApi res = new api.CoordinateApi(mock).jobs; |
| 850 var arg_teamId = "foo"; | 826 var arg_teamId = "foo"; |
| 851 var arg_maxResults = 42; | 827 var arg_maxResults = 42; |
| 852 var arg_minModifiedTimestampMs = "foo"; | 828 var arg_minModifiedTimestampMs = "foo"; |
| 853 var arg_pageToken = "foo"; | 829 var arg_pageToken = "foo"; |
| 854 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 830 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 855 var path = (req.url).path; | 831 var path = (req.url).path; |
| 856 var pathOffset = 0; | 832 var pathOffset = 0; |
| 857 var index; | 833 var index; |
| 858 var subPart; | 834 var subPart; |
| 859 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq
uals("/coordinate/v1/teams/")); | 835 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 860 pathOffset += 21; | 836 pathOffset += 1; |
| 861 index = path.indexOf("/jobs", pathOffset); | |
| 862 unittest.expect(index >= 0, unittest.isTrue); | |
| 863 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 864 pathOffset = index; | |
| 865 unittest.expect(subPart, unittest.equals("$arg_teamId")); | |
| 866 unittest.expect(path.substring(pathOffset, pathOffset + 5), unittest.equ
als("/jobs")); | |
| 867 pathOffset += 5; | |
| 868 | 837 |
| 869 var query = (req.url).query; | 838 var query = (req.url).query; |
| 870 var queryOffset = 0; | 839 var queryOffset = 0; |
| 871 var queryMap = {}; | 840 var queryMap = {}; |
| 872 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 841 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 873 parseBool(n) { | 842 parseBool(n) { |
| 874 if (n == "true") return true; | 843 if (n == "true") return true; |
| 875 if (n == "false") return false; | 844 if (n == "false") return false; |
| 876 if (n == null) return null; | 845 if (n == null) return null; |
| 877 throw new core.ArgumentError("Invalid boolean: $n"); | 846 throw new core.ArgumentError("Invalid boolean: $n"); |
| (...skipping 22 matching lines...) Expand all Loading... |
| 900 | 869 |
| 901 unittest.test("method--patch", () { | 870 unittest.test("method--patch", () { |
| 902 | 871 |
| 903 var mock = new common_test.HttpServerMock(); | 872 var mock = new common_test.HttpServerMock(); |
| 904 api.JobsResourceApi res = new api.CoordinateApi(mock).jobs; | 873 api.JobsResourceApi res = new api.CoordinateApi(mock).jobs; |
| 905 var arg_request = buildJob(); | 874 var arg_request = buildJob(); |
| 906 var arg_teamId = "foo"; | 875 var arg_teamId = "foo"; |
| 907 var arg_jobId = "foo"; | 876 var arg_jobId = "foo"; |
| 908 var arg_address = "foo"; | 877 var arg_address = "foo"; |
| 909 var arg_assignee = "foo"; | 878 var arg_assignee = "foo"; |
| 910 var arg_customField = buildUnnamed454(); | 879 var arg_customField = buildUnnamed479(); |
| 911 var arg_customerName = "foo"; | 880 var arg_customerName = "foo"; |
| 912 var arg_customerPhoneNumber = "foo"; | 881 var arg_customerPhoneNumber = "foo"; |
| 913 var arg_lat = 42.0; | 882 var arg_lat = 42.0; |
| 914 var arg_lng = 42.0; | 883 var arg_lng = 42.0; |
| 915 var arg_note = "foo"; | 884 var arg_note = "foo"; |
| 916 var arg_progress = "foo"; | 885 var arg_progress = "foo"; |
| 917 var arg_title = "foo"; | 886 var arg_title = "foo"; |
| 918 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 887 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 919 var obj = new api.Job.fromJson(json); | 888 var obj = new api.Job.fromJson(json); |
| 920 checkJob(obj); | 889 checkJob(obj); |
| 921 | 890 |
| 922 var path = (req.url).path; | 891 var path = (req.url).path; |
| 923 var pathOffset = 0; | 892 var pathOffset = 0; |
| 924 var index; | 893 var index; |
| 925 var subPart; | 894 var subPart; |
| 926 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq
uals("/coordinate/v1/teams/")); | 895 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 927 pathOffset += 21; | 896 pathOffset += 1; |
| 928 index = path.indexOf("/jobs/", pathOffset); | |
| 929 unittest.expect(index >= 0, unittest.isTrue); | |
| 930 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 931 pathOffset = index; | |
| 932 unittest.expect(subPart, unittest.equals("$arg_teamId")); | |
| 933 unittest.expect(path.substring(pathOffset, pathOffset + 6), unittest.equ
als("/jobs/")); | |
| 934 pathOffset += 6; | |
| 935 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 936 pathOffset = path.length; | |
| 937 unittest.expect(subPart, unittest.equals("$arg_jobId")); | |
| 938 | 897 |
| 939 var query = (req.url).query; | 898 var query = (req.url).query; |
| 940 var queryOffset = 0; | 899 var queryOffset = 0; |
| 941 var queryMap = {}; | 900 var queryMap = {}; |
| 942 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 901 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 943 parseBool(n) { | 902 parseBool(n) { |
| 944 if (n == "true") return true; | 903 if (n == "true") return true; |
| 945 if (n == "false") return false; | 904 if (n == "false") return false; |
| 946 if (n == null) return null; | 905 if (n == null) return null; |
| 947 throw new core.ArgumentError("Invalid boolean: $n"); | 906 throw new core.ArgumentError("Invalid boolean: $n"); |
| (...skipping 29 matching lines...) Expand all Loading... |
| 977 | 936 |
| 978 unittest.test("method--update", () { | 937 unittest.test("method--update", () { |
| 979 | 938 |
| 980 var mock = new common_test.HttpServerMock(); | 939 var mock = new common_test.HttpServerMock(); |
| 981 api.JobsResourceApi res = new api.CoordinateApi(mock).jobs; | 940 api.JobsResourceApi res = new api.CoordinateApi(mock).jobs; |
| 982 var arg_request = buildJob(); | 941 var arg_request = buildJob(); |
| 983 var arg_teamId = "foo"; | 942 var arg_teamId = "foo"; |
| 984 var arg_jobId = "foo"; | 943 var arg_jobId = "foo"; |
| 985 var arg_address = "foo"; | 944 var arg_address = "foo"; |
| 986 var arg_assignee = "foo"; | 945 var arg_assignee = "foo"; |
| 987 var arg_customField = buildUnnamed455(); | 946 var arg_customField = buildUnnamed480(); |
| 988 var arg_customerName = "foo"; | 947 var arg_customerName = "foo"; |
| 989 var arg_customerPhoneNumber = "foo"; | 948 var arg_customerPhoneNumber = "foo"; |
| 990 var arg_lat = 42.0; | 949 var arg_lat = 42.0; |
| 991 var arg_lng = 42.0; | 950 var arg_lng = 42.0; |
| 992 var arg_note = "foo"; | 951 var arg_note = "foo"; |
| 993 var arg_progress = "foo"; | 952 var arg_progress = "foo"; |
| 994 var arg_title = "foo"; | 953 var arg_title = "foo"; |
| 995 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 954 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 996 var obj = new api.Job.fromJson(json); | 955 var obj = new api.Job.fromJson(json); |
| 997 checkJob(obj); | 956 checkJob(obj); |
| 998 | 957 |
| 999 var path = (req.url).path; | 958 var path = (req.url).path; |
| 1000 var pathOffset = 0; | 959 var pathOffset = 0; |
| 1001 var index; | 960 var index; |
| 1002 var subPart; | 961 var subPart; |
| 1003 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq
uals("/coordinate/v1/teams/")); | 962 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 1004 pathOffset += 21; | 963 pathOffset += 1; |
| 1005 index = path.indexOf("/jobs/", pathOffset); | |
| 1006 unittest.expect(index >= 0, unittest.isTrue); | |
| 1007 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 1008 pathOffset = index; | |
| 1009 unittest.expect(subPart, unittest.equals("$arg_teamId")); | |
| 1010 unittest.expect(path.substring(pathOffset, pathOffset + 6), unittest.equ
als("/jobs/")); | |
| 1011 pathOffset += 6; | |
| 1012 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 1013 pathOffset = path.length; | |
| 1014 unittest.expect(subPart, unittest.equals("$arg_jobId")); | |
| 1015 | 964 |
| 1016 var query = (req.url).query; | 965 var query = (req.url).query; |
| 1017 var queryOffset = 0; | 966 var queryOffset = 0; |
| 1018 var queryMap = {}; | 967 var queryMap = {}; |
| 1019 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 968 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 1020 parseBool(n) { | 969 parseBool(n) { |
| 1021 if (n == "true") return true; | 970 if (n == "true") return true; |
| 1022 if (n == "false") return false; | 971 if (n == "false") return false; |
| 1023 if (n == null) return null; | 972 if (n == null) return null; |
| 1024 throw new core.ArgumentError("Invalid boolean: $n"); | 973 throw new core.ArgumentError("Invalid boolean: $n"); |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1063 var arg_teamId = "foo"; | 1012 var arg_teamId = "foo"; |
| 1064 var arg_workerEmail = "foo"; | 1013 var arg_workerEmail = "foo"; |
| 1065 var arg_startTimestampMs = "foo"; | 1014 var arg_startTimestampMs = "foo"; |
| 1066 var arg_maxResults = 42; | 1015 var arg_maxResults = 42; |
| 1067 var arg_pageToken = "foo"; | 1016 var arg_pageToken = "foo"; |
| 1068 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1017 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 1069 var path = (req.url).path; | 1018 var path = (req.url).path; |
| 1070 var pathOffset = 0; | 1019 var pathOffset = 0; |
| 1071 var index; | 1020 var index; |
| 1072 var subPart; | 1021 var subPart; |
| 1073 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq
uals("/coordinate/v1/teams/")); | 1022 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 1074 pathOffset += 21; | 1023 pathOffset += 1; |
| 1075 index = path.indexOf("/workers/", pathOffset); | |
| 1076 unittest.expect(index >= 0, unittest.isTrue); | |
| 1077 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 1078 pathOffset = index; | |
| 1079 unittest.expect(subPart, unittest.equals("$arg_teamId")); | |
| 1080 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("/workers/")); | |
| 1081 pathOffset += 9; | |
| 1082 index = path.indexOf("/locations", pathOffset); | |
| 1083 unittest.expect(index >= 0, unittest.isTrue); | |
| 1084 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 1085 pathOffset = index; | |
| 1086 unittest.expect(subPart, unittest.equals("$arg_workerEmail")); | |
| 1087 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("/locations")); | |
| 1088 pathOffset += 10; | |
| 1089 | 1024 |
| 1090 var query = (req.url).query; | 1025 var query = (req.url).query; |
| 1091 var queryOffset = 0; | 1026 var queryOffset = 0; |
| 1092 var queryMap = {}; | 1027 var queryMap = {}; |
| 1093 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 1028 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 1094 parseBool(n) { | 1029 parseBool(n) { |
| 1095 if (n == "true") return true; | 1030 if (n == "true") return true; |
| 1096 if (n == "false") return false; | 1031 if (n == "false") return false; |
| 1097 if (n == null) return null; | 1032 if (n == null) return null; |
| 1098 throw new core.ArgumentError("Invalid boolean: $n"); | 1033 throw new core.ArgumentError("Invalid boolean: $n"); |
| (...skipping 28 matching lines...) Expand all Loading... |
| 1127 | 1062 |
| 1128 var mock = new common_test.HttpServerMock(); | 1063 var mock = new common_test.HttpServerMock(); |
| 1129 api.ScheduleResourceApi res = new api.CoordinateApi(mock).schedule; | 1064 api.ScheduleResourceApi res = new api.CoordinateApi(mock).schedule; |
| 1130 var arg_teamId = "foo"; | 1065 var arg_teamId = "foo"; |
| 1131 var arg_jobId = "foo"; | 1066 var arg_jobId = "foo"; |
| 1132 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1067 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 1133 var path = (req.url).path; | 1068 var path = (req.url).path; |
| 1134 var pathOffset = 0; | 1069 var pathOffset = 0; |
| 1135 var index; | 1070 var index; |
| 1136 var subPart; | 1071 var subPart; |
| 1137 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq
uals("/coordinate/v1/teams/")); | 1072 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 1138 pathOffset += 21; | 1073 pathOffset += 1; |
| 1139 index = path.indexOf("/jobs/", pathOffset); | |
| 1140 unittest.expect(index >= 0, unittest.isTrue); | |
| 1141 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 1142 pathOffset = index; | |
| 1143 unittest.expect(subPart, unittest.equals("$arg_teamId")); | |
| 1144 unittest.expect(path.substring(pathOffset, pathOffset + 6), unittest.equ
als("/jobs/")); | |
| 1145 pathOffset += 6; | |
| 1146 index = path.indexOf("/schedule", pathOffset); | |
| 1147 unittest.expect(index >= 0, unittest.isTrue); | |
| 1148 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 1149 pathOffset = index; | |
| 1150 unittest.expect(subPart, unittest.equals("$arg_jobId")); | |
| 1151 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("/schedule")); | |
| 1152 pathOffset += 9; | |
| 1153 | 1074 |
| 1154 var query = (req.url).query; | 1075 var query = (req.url).query; |
| 1155 var queryOffset = 0; | 1076 var queryOffset = 0; |
| 1156 var queryMap = {}; | 1077 var queryMap = {}; |
| 1157 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 1078 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 1158 parseBool(n) { | 1079 parseBool(n) { |
| 1159 if (n == "true") return true; | 1080 if (n == "true") return true; |
| 1160 if (n == "false") return false; | 1081 if (n == "false") return false; |
| 1161 if (n == null) return null; | 1082 if (n == null) return null; |
| 1162 throw new core.ArgumentError("Invalid boolean: $n"); | 1083 throw new core.ArgumentError("Invalid boolean: $n"); |
| (...skipping 29 matching lines...) Expand all Loading... |
| 1192 var arg_endTime = "foo"; | 1113 var arg_endTime = "foo"; |
| 1193 var arg_startTime = "foo"; | 1114 var arg_startTime = "foo"; |
| 1194 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1115 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 1195 var obj = new api.Schedule.fromJson(json); | 1116 var obj = new api.Schedule.fromJson(json); |
| 1196 checkSchedule(obj); | 1117 checkSchedule(obj); |
| 1197 | 1118 |
| 1198 var path = (req.url).path; | 1119 var path = (req.url).path; |
| 1199 var pathOffset = 0; | 1120 var pathOffset = 0; |
| 1200 var index; | 1121 var index; |
| 1201 var subPart; | 1122 var subPart; |
| 1202 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq
uals("/coordinate/v1/teams/")); | 1123 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 1203 pathOffset += 21; | 1124 pathOffset += 1; |
| 1204 index = path.indexOf("/jobs/", pathOffset); | |
| 1205 unittest.expect(index >= 0, unittest.isTrue); | |
| 1206 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 1207 pathOffset = index; | |
| 1208 unittest.expect(subPart, unittest.equals("$arg_teamId")); | |
| 1209 unittest.expect(path.substring(pathOffset, pathOffset + 6), unittest.equ
als("/jobs/")); | |
| 1210 pathOffset += 6; | |
| 1211 index = path.indexOf("/schedule", pathOffset); | |
| 1212 unittest.expect(index >= 0, unittest.isTrue); | |
| 1213 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 1214 pathOffset = index; | |
| 1215 unittest.expect(subPart, unittest.equals("$arg_jobId")); | |
| 1216 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("/schedule")); | |
| 1217 pathOffset += 9; | |
| 1218 | 1125 |
| 1219 var query = (req.url).query; | 1126 var query = (req.url).query; |
| 1220 var queryOffset = 0; | 1127 var queryOffset = 0; |
| 1221 var queryMap = {}; | 1128 var queryMap = {}; |
| 1222 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 1129 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 1223 parseBool(n) { | 1130 parseBool(n) { |
| 1224 if (n == "true") return true; | 1131 if (n == "true") return true; |
| 1225 if (n == "false") return false; | 1132 if (n == "false") return false; |
| 1226 if (n == null) return null; | 1133 if (n == null) return null; |
| 1227 throw new core.ArgumentError("Invalid boolean: $n"); | 1134 throw new core.ArgumentError("Invalid boolean: $n"); |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1261 var arg_endTime = "foo"; | 1168 var arg_endTime = "foo"; |
| 1262 var arg_startTime = "foo"; | 1169 var arg_startTime = "foo"; |
| 1263 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1170 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 1264 var obj = new api.Schedule.fromJson(json); | 1171 var obj = new api.Schedule.fromJson(json); |
| 1265 checkSchedule(obj); | 1172 checkSchedule(obj); |
| 1266 | 1173 |
| 1267 var path = (req.url).path; | 1174 var path = (req.url).path; |
| 1268 var pathOffset = 0; | 1175 var pathOffset = 0; |
| 1269 var index; | 1176 var index; |
| 1270 var subPart; | 1177 var subPart; |
| 1271 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq
uals("/coordinate/v1/teams/")); | 1178 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 1272 pathOffset += 21; | 1179 pathOffset += 1; |
| 1273 index = path.indexOf("/jobs/", pathOffset); | |
| 1274 unittest.expect(index >= 0, unittest.isTrue); | |
| 1275 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 1276 pathOffset = index; | |
| 1277 unittest.expect(subPart, unittest.equals("$arg_teamId")); | |
| 1278 unittest.expect(path.substring(pathOffset, pathOffset + 6), unittest.equ
als("/jobs/")); | |
| 1279 pathOffset += 6; | |
| 1280 index = path.indexOf("/schedule", pathOffset); | |
| 1281 unittest.expect(index >= 0, unittest.isTrue); | |
| 1282 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 1283 pathOffset = index; | |
| 1284 unittest.expect(subPart, unittest.equals("$arg_jobId")); | |
| 1285 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("/schedule")); | |
| 1286 pathOffset += 9; | |
| 1287 | 1180 |
| 1288 var query = (req.url).query; | 1181 var query = (req.url).query; |
| 1289 var queryOffset = 0; | 1182 var queryOffset = 0; |
| 1290 var queryMap = {}; | 1183 var queryMap = {}; |
| 1291 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 1184 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 1292 parseBool(n) { | 1185 parseBool(n) { |
| 1293 if (n == "true") return true; | 1186 if (n == "true") return true; |
| 1294 if (n == "false") return false; | 1187 if (n == "false") return false; |
| 1295 if (n == null) return null; | 1188 if (n == null) return null; |
| 1296 throw new core.ArgumentError("Invalid boolean: $n"); | 1189 throw new core.ArgumentError("Invalid boolean: $n"); |
| (...skipping 28 matching lines...) Expand all Loading... |
| 1325 unittest.test("method--list", () { | 1218 unittest.test("method--list", () { |
| 1326 | 1219 |
| 1327 var mock = new common_test.HttpServerMock(); | 1220 var mock = new common_test.HttpServerMock(); |
| 1328 api.WorkerResourceApi res = new api.CoordinateApi(mock).worker; | 1221 api.WorkerResourceApi res = new api.CoordinateApi(mock).worker; |
| 1329 var arg_teamId = "foo"; | 1222 var arg_teamId = "foo"; |
| 1330 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1223 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 1331 var path = (req.url).path; | 1224 var path = (req.url).path; |
| 1332 var pathOffset = 0; | 1225 var pathOffset = 0; |
| 1333 var index; | 1226 var index; |
| 1334 var subPart; | 1227 var subPart; |
| 1335 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq
uals("/coordinate/v1/teams/")); | 1228 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 1336 pathOffset += 21; | 1229 pathOffset += 1; |
| 1337 index = path.indexOf("/workers", pathOffset); | |
| 1338 unittest.expect(index >= 0, unittest.isTrue); | |
| 1339 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 1340 pathOffset = index; | |
| 1341 unittest.expect(subPart, unittest.equals("$arg_teamId")); | |
| 1342 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("/workers")); | |
| 1343 pathOffset += 8; | |
| 1344 | 1230 |
| 1345 var query = (req.url).query; | 1231 var query = (req.url).query; |
| 1346 var queryOffset = 0; | 1232 var queryOffset = 0; |
| 1347 var queryMap = {}; | 1233 var queryMap = {}; |
| 1348 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 1234 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 1349 parseBool(n) { | 1235 parseBool(n) { |
| 1350 if (n == "true") return true; | 1236 if (n == "true") return true; |
| 1351 if (n == "false") return false; | 1237 if (n == "false") return false; |
| 1352 if (n == null) return null; | 1238 if (n == null) return null; |
| 1353 throw new core.ArgumentError("Invalid boolean: $n"); | 1239 throw new core.ArgumentError("Invalid boolean: $n"); |
| (...skipping 15 matching lines...) Expand all Loading... |
| 1369 res.list(arg_teamId).then(unittest.expectAsync(((api.WorkerListResponse re
sponse) { | 1255 res.list(arg_teamId).then(unittest.expectAsync(((api.WorkerListResponse re
sponse) { |
| 1370 checkWorkerListResponse(response); | 1256 checkWorkerListResponse(response); |
| 1371 }))); | 1257 }))); |
| 1372 }); | 1258 }); |
| 1373 | 1259 |
| 1374 }); | 1260 }); |
| 1375 | 1261 |
| 1376 | 1262 |
| 1377 } | 1263 } |
| 1378 | 1264 |
| OLD | NEW |