| OLD | NEW |
| 1 library googleapis_beta.proximitybeacon.v1beta1.test; | 1 library googleapis_beta.proximitybeacon.v1beta1.test; |
| 2 | 2 |
| 3 import "dart:core" as core; | 3 import "dart:core" as core; |
| 4 import "dart:collection" as collection; | 4 import "dart:collection" as collection; |
| 5 import "dart:async" as async; | 5 import "dart:async" as async; |
| 6 import "dart:convert" as convert; | 6 import "dart:convert" as convert; |
| 7 | 7 |
| 8 import 'package:http/http.dart' as http; | 8 import 'package:http/http.dart' as http; |
| 9 import 'package:http/testing.dart' as http_testing; | 9 import 'package:http/testing.dart' as http_testing; |
| 10 import 'package:unittest/unittest.dart' as unittest; | 10 import 'package:test/test.dart' as unittest; |
| 11 | 11 |
| 12 import 'package:googleapis_beta/proximitybeacon/v1beta1.dart' as api; | 12 import 'package:googleapis_beta/proximitybeacon/v1beta1.dart' as api; |
| 13 | 13 |
| 14 class HttpServerMock extends http.BaseClient { | 14 class HttpServerMock extends http.BaseClient { |
| 15 core.Function _callback; | 15 core.Function _callback; |
| 16 core.bool _expectJson; | 16 core.bool _expectJson; |
| 17 | 17 |
| 18 void register(core.Function callback, core.bool expectJson) { | 18 void register(core.Function callback, core.bool expectJson) { |
| 19 _callback = callback; | 19 _callback = callback; |
| 20 _expectJson = expectJson; | 20 _expectJson = expectJson; |
| (...skipping 18 matching lines...) Expand all Loading... |
| 39 } else { | 39 } else { |
| 40 return stream.toBytes().then((data) { | 40 return stream.toBytes().then((data) { |
| 41 return _callback(request, data); | 41 return _callback(request, data); |
| 42 }); | 42 }); |
| 43 } | 43 } |
| 44 } | 44 } |
| 45 } | 45 } |
| 46 } | 46 } |
| 47 | 47 |
| 48 http.StreamedResponse stringResponse( | 48 http.StreamedResponse stringResponse( |
| 49 core.int status, core.Map headers, core.String body) { | 49 core.int status, core.Map<core.String, core.String> headers, core.String bod
y) { |
| 50 var stream = new async.Stream.fromIterable([convert.UTF8.encode(body)]); | 50 var stream = new async.Stream.fromIterable([convert.UTF8.encode(body)]); |
| 51 return new http.StreamedResponse(stream, status, headers: headers); | 51 return new http.StreamedResponse(stream, status, headers: headers); |
| 52 } | 52 } |
| 53 | 53 |
| 54 core.int buildCounterAdvertisedId = 0; | 54 core.int buildCounterAdvertisedId = 0; |
| 55 buildAdvertisedId() { | 55 buildAdvertisedId() { |
| 56 var o = new api.AdvertisedId(); | 56 var o = new api.AdvertisedId(); |
| 57 buildCounterAdvertisedId++; | 57 buildCounterAdvertisedId++; |
| 58 if (buildCounterAdvertisedId < 3) { | 58 if (buildCounterAdvertisedId < 3) { |
| 59 o.id = "foo"; | 59 o.id = "foo"; |
| (...skipping 26 matching lines...) Expand all Loading... |
| 86 | 86 |
| 87 checkAttachmentInfo(api.AttachmentInfo o) { | 87 checkAttachmentInfo(api.AttachmentInfo o) { |
| 88 buildCounterAttachmentInfo++; | 88 buildCounterAttachmentInfo++; |
| 89 if (buildCounterAttachmentInfo < 3) { | 89 if (buildCounterAttachmentInfo < 3) { |
| 90 unittest.expect(o.data, unittest.equals('foo')); | 90 unittest.expect(o.data, unittest.equals('foo')); |
| 91 unittest.expect(o.namespacedType, unittest.equals('foo')); | 91 unittest.expect(o.namespacedType, unittest.equals('foo')); |
| 92 } | 92 } |
| 93 buildCounterAttachmentInfo--; | 93 buildCounterAttachmentInfo--; |
| 94 } | 94 } |
| 95 | 95 |
| 96 buildUnnamed3828() { | 96 buildUnnamed3302() { |
| 97 var o = new core.Map<core.String, core.String>(); | 97 var o = new core.Map<core.String, core.String>(); |
| 98 o["x"] = "foo"; | 98 o["x"] = "foo"; |
| 99 o["y"] = "foo"; | 99 o["y"] = "foo"; |
| 100 return o; | 100 return o; |
| 101 } | 101 } |
| 102 | 102 |
| 103 checkUnnamed3828(core.Map<core.String, core.String> o) { | 103 checkUnnamed3302(core.Map<core.String, core.String> o) { |
| 104 unittest.expect(o, unittest.hasLength(2)); | 104 unittest.expect(o, unittest.hasLength(2)); |
| 105 unittest.expect(o["x"], unittest.equals('foo')); | 105 unittest.expect(o["x"], unittest.equals('foo')); |
| 106 unittest.expect(o["y"], unittest.equals('foo')); | 106 unittest.expect(o["y"], unittest.equals('foo')); |
| 107 } | 107 } |
| 108 | 108 |
| 109 core.int buildCounterBeacon = 0; | 109 core.int buildCounterBeacon = 0; |
| 110 buildBeacon() { | 110 buildBeacon() { |
| 111 var o = new api.Beacon(); | 111 var o = new api.Beacon(); |
| 112 buildCounterBeacon++; | 112 buildCounterBeacon++; |
| 113 if (buildCounterBeacon < 3) { | 113 if (buildCounterBeacon < 3) { |
| 114 o.advertisedId = buildAdvertisedId(); | 114 o.advertisedId = buildAdvertisedId(); |
| 115 o.beaconName = "foo"; | 115 o.beaconName = "foo"; |
| 116 o.description = "foo"; | 116 o.description = "foo"; |
| 117 o.ephemeralIdRegistration = buildEphemeralIdRegistration(); | 117 o.ephemeralIdRegistration = buildEphemeralIdRegistration(); |
| 118 o.expectedStability = "foo"; | 118 o.expectedStability = "foo"; |
| 119 o.indoorLevel = buildIndoorLevel(); | 119 o.indoorLevel = buildIndoorLevel(); |
| 120 o.latLng = buildLatLng(); | 120 o.latLng = buildLatLng(); |
| 121 o.placeId = "foo"; | 121 o.placeId = "foo"; |
| 122 o.properties = buildUnnamed3828(); | 122 o.properties = buildUnnamed3302(); |
| 123 o.provisioningKey = "foo"; | 123 o.provisioningKey = "foo"; |
| 124 o.status = "foo"; | 124 o.status = "foo"; |
| 125 } | 125 } |
| 126 buildCounterBeacon--; | 126 buildCounterBeacon--; |
| 127 return o; | 127 return o; |
| 128 } | 128 } |
| 129 | 129 |
| 130 checkBeacon(api.Beacon o) { | 130 checkBeacon(api.Beacon o) { |
| 131 buildCounterBeacon++; | 131 buildCounterBeacon++; |
| 132 if (buildCounterBeacon < 3) { | 132 if (buildCounterBeacon < 3) { |
| 133 checkAdvertisedId(o.advertisedId); | 133 checkAdvertisedId(o.advertisedId); |
| 134 unittest.expect(o.beaconName, unittest.equals('foo')); | 134 unittest.expect(o.beaconName, unittest.equals('foo')); |
| 135 unittest.expect(o.description, unittest.equals('foo')); | 135 unittest.expect(o.description, unittest.equals('foo')); |
| 136 checkEphemeralIdRegistration(o.ephemeralIdRegistration); | 136 checkEphemeralIdRegistration(o.ephemeralIdRegistration); |
| 137 unittest.expect(o.expectedStability, unittest.equals('foo')); | 137 unittest.expect(o.expectedStability, unittest.equals('foo')); |
| 138 checkIndoorLevel(o.indoorLevel); | 138 checkIndoorLevel(o.indoorLevel); |
| 139 checkLatLng(o.latLng); | 139 checkLatLng(o.latLng); |
| 140 unittest.expect(o.placeId, unittest.equals('foo')); | 140 unittest.expect(o.placeId, unittest.equals('foo')); |
| 141 checkUnnamed3828(o.properties); | 141 checkUnnamed3302(o.properties); |
| 142 unittest.expect(o.provisioningKey, unittest.equals('foo')); | 142 unittest.expect(o.provisioningKey, unittest.equals('foo')); |
| 143 unittest.expect(o.status, unittest.equals('foo')); | 143 unittest.expect(o.status, unittest.equals('foo')); |
| 144 } | 144 } |
| 145 buildCounterBeacon--; | 145 buildCounterBeacon--; |
| 146 } | 146 } |
| 147 | 147 |
| 148 core.int buildCounterBeaconAttachment = 0; | 148 core.int buildCounterBeaconAttachment = 0; |
| 149 buildBeaconAttachment() { | 149 buildBeaconAttachment() { |
| 150 var o = new api.BeaconAttachment(); | 150 var o = new api.BeaconAttachment(); |
| 151 buildCounterBeaconAttachment++; | 151 buildCounterBeaconAttachment++; |
| (...skipping 11 matching lines...) Expand all Loading... |
| 163 buildCounterBeaconAttachment++; | 163 buildCounterBeaconAttachment++; |
| 164 if (buildCounterBeaconAttachment < 3) { | 164 if (buildCounterBeaconAttachment < 3) { |
| 165 unittest.expect(o.attachmentName, unittest.equals('foo')); | 165 unittest.expect(o.attachmentName, unittest.equals('foo')); |
| 166 unittest.expect(o.creationTimeMs, unittest.equals('foo')); | 166 unittest.expect(o.creationTimeMs, unittest.equals('foo')); |
| 167 unittest.expect(o.data, unittest.equals('foo')); | 167 unittest.expect(o.data, unittest.equals('foo')); |
| 168 unittest.expect(o.namespacedType, unittest.equals('foo')); | 168 unittest.expect(o.namespacedType, unittest.equals('foo')); |
| 169 } | 169 } |
| 170 buildCounterBeaconAttachment--; | 170 buildCounterBeaconAttachment--; |
| 171 } | 171 } |
| 172 | 172 |
| 173 buildUnnamed3829() { | 173 buildUnnamed3303() { |
| 174 var o = new core.List<api.AttachmentInfo>(); | 174 var o = new core.List<api.AttachmentInfo>(); |
| 175 o.add(buildAttachmentInfo()); | 175 o.add(buildAttachmentInfo()); |
| 176 o.add(buildAttachmentInfo()); | 176 o.add(buildAttachmentInfo()); |
| 177 return o; | 177 return o; |
| 178 } | 178 } |
| 179 | 179 |
| 180 checkUnnamed3829(core.List<api.AttachmentInfo> o) { | 180 checkUnnamed3303(core.List<api.AttachmentInfo> o) { |
| 181 unittest.expect(o, unittest.hasLength(2)); | 181 unittest.expect(o, unittest.hasLength(2)); |
| 182 checkAttachmentInfo(o[0]); | 182 checkAttachmentInfo(o[0]); |
| 183 checkAttachmentInfo(o[1]); | 183 checkAttachmentInfo(o[1]); |
| 184 } | 184 } |
| 185 | 185 |
| 186 core.int buildCounterBeaconInfo = 0; | 186 core.int buildCounterBeaconInfo = 0; |
| 187 buildBeaconInfo() { | 187 buildBeaconInfo() { |
| 188 var o = new api.BeaconInfo(); | 188 var o = new api.BeaconInfo(); |
| 189 buildCounterBeaconInfo++; | 189 buildCounterBeaconInfo++; |
| 190 if (buildCounterBeaconInfo < 3) { | 190 if (buildCounterBeaconInfo < 3) { |
| 191 o.advertisedId = buildAdvertisedId(); | 191 o.advertisedId = buildAdvertisedId(); |
| 192 o.attachments = buildUnnamed3829(); | 192 o.attachments = buildUnnamed3303(); |
| 193 o.beaconName = "foo"; | 193 o.beaconName = "foo"; |
| 194 } | 194 } |
| 195 buildCounterBeaconInfo--; | 195 buildCounterBeaconInfo--; |
| 196 return o; | 196 return o; |
| 197 } | 197 } |
| 198 | 198 |
| 199 checkBeaconInfo(api.BeaconInfo o) { | 199 checkBeaconInfo(api.BeaconInfo o) { |
| 200 buildCounterBeaconInfo++; | 200 buildCounterBeaconInfo++; |
| 201 if (buildCounterBeaconInfo < 3) { | 201 if (buildCounterBeaconInfo < 3) { |
| 202 checkAdvertisedId(o.advertisedId); | 202 checkAdvertisedId(o.advertisedId); |
| 203 checkUnnamed3829(o.attachments); | 203 checkUnnamed3303(o.attachments); |
| 204 unittest.expect(o.beaconName, unittest.equals('foo')); | 204 unittest.expect(o.beaconName, unittest.equals('foo')); |
| 205 } | 205 } |
| 206 buildCounterBeaconInfo--; | 206 buildCounterBeaconInfo--; |
| 207 } | 207 } |
| 208 | 208 |
| 209 core.int buildCounterDate = 0; | 209 core.int buildCounterDate = 0; |
| 210 buildDate() { | 210 buildDate() { |
| 211 var o = new api.Date(); | 211 var o = new api.Date(); |
| 212 buildCounterDate++; | 212 buildCounterDate++; |
| 213 if (buildCounterDate < 3) { | 213 if (buildCounterDate < 3) { |
| (...skipping 27 matching lines...) Expand all Loading... |
| 241 } | 241 } |
| 242 | 242 |
| 243 checkDeleteAttachmentsResponse(api.DeleteAttachmentsResponse o) { | 243 checkDeleteAttachmentsResponse(api.DeleteAttachmentsResponse o) { |
| 244 buildCounterDeleteAttachmentsResponse++; | 244 buildCounterDeleteAttachmentsResponse++; |
| 245 if (buildCounterDeleteAttachmentsResponse < 3) { | 245 if (buildCounterDeleteAttachmentsResponse < 3) { |
| 246 unittest.expect(o.numDeleted, unittest.equals(42)); | 246 unittest.expect(o.numDeleted, unittest.equals(42)); |
| 247 } | 247 } |
| 248 buildCounterDeleteAttachmentsResponse--; | 248 buildCounterDeleteAttachmentsResponse--; |
| 249 } | 249 } |
| 250 | 250 |
| 251 buildUnnamed3830() { | 251 buildUnnamed3304() { |
| 252 var o = new core.List<core.String>(); | 252 var o = new core.List<core.String>(); |
| 253 o.add("foo"); | 253 o.add("foo"); |
| 254 o.add("foo"); | 254 o.add("foo"); |
| 255 return o; | 255 return o; |
| 256 } | 256 } |
| 257 | 257 |
| 258 checkUnnamed3830(core.List<core.String> o) { | 258 checkUnnamed3304(core.List<core.String> o) { |
| 259 unittest.expect(o, unittest.hasLength(2)); | 259 unittest.expect(o, unittest.hasLength(2)); |
| 260 unittest.expect(o[0], unittest.equals('foo')); | 260 unittest.expect(o[0], unittest.equals('foo')); |
| 261 unittest.expect(o[1], unittest.equals('foo')); | 261 unittest.expect(o[1], unittest.equals('foo')); |
| 262 } | 262 } |
| 263 | 263 |
| 264 core.int buildCounterDiagnostics = 0; | 264 core.int buildCounterDiagnostics = 0; |
| 265 buildDiagnostics() { | 265 buildDiagnostics() { |
| 266 var o = new api.Diagnostics(); | 266 var o = new api.Diagnostics(); |
| 267 buildCounterDiagnostics++; | 267 buildCounterDiagnostics++; |
| 268 if (buildCounterDiagnostics < 3) { | 268 if (buildCounterDiagnostics < 3) { |
| 269 o.alerts = buildUnnamed3830(); | 269 o.alerts = buildUnnamed3304(); |
| 270 o.beaconName = "foo"; | 270 o.beaconName = "foo"; |
| 271 o.estimatedLowBatteryDate = buildDate(); | 271 o.estimatedLowBatteryDate = buildDate(); |
| 272 } | 272 } |
| 273 buildCounterDiagnostics--; | 273 buildCounterDiagnostics--; |
| 274 return o; | 274 return o; |
| 275 } | 275 } |
| 276 | 276 |
| 277 checkDiagnostics(api.Diagnostics o) { | 277 checkDiagnostics(api.Diagnostics o) { |
| 278 buildCounterDiagnostics++; | 278 buildCounterDiagnostics++; |
| 279 if (buildCounterDiagnostics < 3) { | 279 if (buildCounterDiagnostics < 3) { |
| 280 checkUnnamed3830(o.alerts); | 280 checkUnnamed3304(o.alerts); |
| 281 unittest.expect(o.beaconName, unittest.equals('foo')); | 281 unittest.expect(o.beaconName, unittest.equals('foo')); |
| 282 checkDate(o.estimatedLowBatteryDate); | 282 checkDate(o.estimatedLowBatteryDate); |
| 283 } | 283 } |
| 284 buildCounterDiagnostics--; | 284 buildCounterDiagnostics--; |
| 285 } | 285 } |
| 286 | 286 |
| 287 core.int buildCounterEmpty = 0; | 287 core.int buildCounterEmpty = 0; |
| 288 buildEmpty() { | 288 buildEmpty() { |
| 289 var o = new api.Empty(); | 289 var o = new api.Empty(); |
| 290 buildCounterEmpty++; | 290 buildCounterEmpty++; |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 346 checkEphemeralIdRegistrationParams(api.EphemeralIdRegistrationParams o) { | 346 checkEphemeralIdRegistrationParams(api.EphemeralIdRegistrationParams o) { |
| 347 buildCounterEphemeralIdRegistrationParams++; | 347 buildCounterEphemeralIdRegistrationParams++; |
| 348 if (buildCounterEphemeralIdRegistrationParams < 3) { | 348 if (buildCounterEphemeralIdRegistrationParams < 3) { |
| 349 unittest.expect(o.maxRotationPeriodExponent, unittest.equals(42)); | 349 unittest.expect(o.maxRotationPeriodExponent, unittest.equals(42)); |
| 350 unittest.expect(o.minRotationPeriodExponent, unittest.equals(42)); | 350 unittest.expect(o.minRotationPeriodExponent, unittest.equals(42)); |
| 351 unittest.expect(o.serviceEcdhPublicKey, unittest.equals('foo')); | 351 unittest.expect(o.serviceEcdhPublicKey, unittest.equals('foo')); |
| 352 } | 352 } |
| 353 buildCounterEphemeralIdRegistrationParams--; | 353 buildCounterEphemeralIdRegistrationParams--; |
| 354 } | 354 } |
| 355 | 355 |
| 356 buildUnnamed3831() { | 356 buildUnnamed3305() { |
| 357 var o = new core.List<core.String>(); | 357 var o = new core.List<core.String>(); |
| 358 o.add("foo"); | 358 o.add("foo"); |
| 359 o.add("foo"); | 359 o.add("foo"); |
| 360 return o; | 360 return o; |
| 361 } | 361 } |
| 362 | 362 |
| 363 checkUnnamed3831(core.List<core.String> o) { | 363 checkUnnamed3305(core.List<core.String> o) { |
| 364 unittest.expect(o, unittest.hasLength(2)); | 364 unittest.expect(o, unittest.hasLength(2)); |
| 365 unittest.expect(o[0], unittest.equals('foo')); | 365 unittest.expect(o[0], unittest.equals('foo')); |
| 366 unittest.expect(o[1], unittest.equals('foo')); | 366 unittest.expect(o[1], unittest.equals('foo')); |
| 367 } | 367 } |
| 368 | 368 |
| 369 buildUnnamed3832() { | 369 buildUnnamed3306() { |
| 370 var o = new core.List<api.Observation>(); | 370 var o = new core.List<api.Observation>(); |
| 371 o.add(buildObservation()); | 371 o.add(buildObservation()); |
| 372 o.add(buildObservation()); | 372 o.add(buildObservation()); |
| 373 return o; | 373 return o; |
| 374 } | 374 } |
| 375 | 375 |
| 376 checkUnnamed3832(core.List<api.Observation> o) { | 376 checkUnnamed3306(core.List<api.Observation> o) { |
| 377 unittest.expect(o, unittest.hasLength(2)); | 377 unittest.expect(o, unittest.hasLength(2)); |
| 378 checkObservation(o[0]); | 378 checkObservation(o[0]); |
| 379 checkObservation(o[1]); | 379 checkObservation(o[1]); |
| 380 } | 380 } |
| 381 | 381 |
| 382 core.int buildCounterGetInfoForObservedBeaconsRequest = 0; | 382 core.int buildCounterGetInfoForObservedBeaconsRequest = 0; |
| 383 buildGetInfoForObservedBeaconsRequest() { | 383 buildGetInfoForObservedBeaconsRequest() { |
| 384 var o = new api.GetInfoForObservedBeaconsRequest(); | 384 var o = new api.GetInfoForObservedBeaconsRequest(); |
| 385 buildCounterGetInfoForObservedBeaconsRequest++; | 385 buildCounterGetInfoForObservedBeaconsRequest++; |
| 386 if (buildCounterGetInfoForObservedBeaconsRequest < 3) { | 386 if (buildCounterGetInfoForObservedBeaconsRequest < 3) { |
| 387 o.namespacedTypes = buildUnnamed3831(); | 387 o.namespacedTypes = buildUnnamed3305(); |
| 388 o.observations = buildUnnamed3832(); | 388 o.observations = buildUnnamed3306(); |
| 389 } | 389 } |
| 390 buildCounterGetInfoForObservedBeaconsRequest--; | 390 buildCounterGetInfoForObservedBeaconsRequest--; |
| 391 return o; | 391 return o; |
| 392 } | 392 } |
| 393 | 393 |
| 394 checkGetInfoForObservedBeaconsRequest(api.GetInfoForObservedBeaconsRequest o) { | 394 checkGetInfoForObservedBeaconsRequest(api.GetInfoForObservedBeaconsRequest o) { |
| 395 buildCounterGetInfoForObservedBeaconsRequest++; | 395 buildCounterGetInfoForObservedBeaconsRequest++; |
| 396 if (buildCounterGetInfoForObservedBeaconsRequest < 3) { | 396 if (buildCounterGetInfoForObservedBeaconsRequest < 3) { |
| 397 checkUnnamed3831(o.namespacedTypes); | 397 checkUnnamed3305(o.namespacedTypes); |
| 398 checkUnnamed3832(o.observations); | 398 checkUnnamed3306(o.observations); |
| 399 } | 399 } |
| 400 buildCounterGetInfoForObservedBeaconsRequest--; | 400 buildCounterGetInfoForObservedBeaconsRequest--; |
| 401 } | 401 } |
| 402 | 402 |
| 403 buildUnnamed3833() { | 403 buildUnnamed3307() { |
| 404 var o = new core.List<api.BeaconInfo>(); | 404 var o = new core.List<api.BeaconInfo>(); |
| 405 o.add(buildBeaconInfo()); | 405 o.add(buildBeaconInfo()); |
| 406 o.add(buildBeaconInfo()); | 406 o.add(buildBeaconInfo()); |
| 407 return o; | 407 return o; |
| 408 } | 408 } |
| 409 | 409 |
| 410 checkUnnamed3833(core.List<api.BeaconInfo> o) { | 410 checkUnnamed3307(core.List<api.BeaconInfo> o) { |
| 411 unittest.expect(o, unittest.hasLength(2)); | 411 unittest.expect(o, unittest.hasLength(2)); |
| 412 checkBeaconInfo(o[0]); | 412 checkBeaconInfo(o[0]); |
| 413 checkBeaconInfo(o[1]); | 413 checkBeaconInfo(o[1]); |
| 414 } | 414 } |
| 415 | 415 |
| 416 core.int buildCounterGetInfoForObservedBeaconsResponse = 0; | 416 core.int buildCounterGetInfoForObservedBeaconsResponse = 0; |
| 417 buildGetInfoForObservedBeaconsResponse() { | 417 buildGetInfoForObservedBeaconsResponse() { |
| 418 var o = new api.GetInfoForObservedBeaconsResponse(); | 418 var o = new api.GetInfoForObservedBeaconsResponse(); |
| 419 buildCounterGetInfoForObservedBeaconsResponse++; | 419 buildCounterGetInfoForObservedBeaconsResponse++; |
| 420 if (buildCounterGetInfoForObservedBeaconsResponse < 3) { | 420 if (buildCounterGetInfoForObservedBeaconsResponse < 3) { |
| 421 o.beacons = buildUnnamed3833(); | 421 o.beacons = buildUnnamed3307(); |
| 422 } | 422 } |
| 423 buildCounterGetInfoForObservedBeaconsResponse--; | 423 buildCounterGetInfoForObservedBeaconsResponse--; |
| 424 return o; | 424 return o; |
| 425 } | 425 } |
| 426 | 426 |
| 427 checkGetInfoForObservedBeaconsResponse(api.GetInfoForObservedBeaconsResponse o)
{ | 427 checkGetInfoForObservedBeaconsResponse(api.GetInfoForObservedBeaconsResponse o)
{ |
| 428 buildCounterGetInfoForObservedBeaconsResponse++; | 428 buildCounterGetInfoForObservedBeaconsResponse++; |
| 429 if (buildCounterGetInfoForObservedBeaconsResponse < 3) { | 429 if (buildCounterGetInfoForObservedBeaconsResponse < 3) { |
| 430 checkUnnamed3833(o.beacons); | 430 checkUnnamed3307(o.beacons); |
| 431 } | 431 } |
| 432 buildCounterGetInfoForObservedBeaconsResponse--; | 432 buildCounterGetInfoForObservedBeaconsResponse--; |
| 433 } | 433 } |
| 434 | 434 |
| 435 core.int buildCounterIndoorLevel = 0; | 435 core.int buildCounterIndoorLevel = 0; |
| 436 buildIndoorLevel() { | 436 buildIndoorLevel() { |
| 437 var o = new api.IndoorLevel(); | 437 var o = new api.IndoorLevel(); |
| 438 buildCounterIndoorLevel++; | 438 buildCounterIndoorLevel++; |
| 439 if (buildCounterIndoorLevel < 3) { | 439 if (buildCounterIndoorLevel < 3) { |
| 440 o.name = "foo"; | 440 o.name = "foo"; |
| (...skipping 24 matching lines...) Expand all Loading... |
| 465 | 465 |
| 466 checkLatLng(api.LatLng o) { | 466 checkLatLng(api.LatLng o) { |
| 467 buildCounterLatLng++; | 467 buildCounterLatLng++; |
| 468 if (buildCounterLatLng < 3) { | 468 if (buildCounterLatLng < 3) { |
| 469 unittest.expect(o.latitude, unittest.equals(42.0)); | 469 unittest.expect(o.latitude, unittest.equals(42.0)); |
| 470 unittest.expect(o.longitude, unittest.equals(42.0)); | 470 unittest.expect(o.longitude, unittest.equals(42.0)); |
| 471 } | 471 } |
| 472 buildCounterLatLng--; | 472 buildCounterLatLng--; |
| 473 } | 473 } |
| 474 | 474 |
| 475 buildUnnamed3834() { | 475 buildUnnamed3308() { |
| 476 var o = new core.List<api.BeaconAttachment>(); | 476 var o = new core.List<api.BeaconAttachment>(); |
| 477 o.add(buildBeaconAttachment()); | 477 o.add(buildBeaconAttachment()); |
| 478 o.add(buildBeaconAttachment()); | 478 o.add(buildBeaconAttachment()); |
| 479 return o; | 479 return o; |
| 480 } | 480 } |
| 481 | 481 |
| 482 checkUnnamed3834(core.List<api.BeaconAttachment> o) { | 482 checkUnnamed3308(core.List<api.BeaconAttachment> o) { |
| 483 unittest.expect(o, unittest.hasLength(2)); | 483 unittest.expect(o, unittest.hasLength(2)); |
| 484 checkBeaconAttachment(o[0]); | 484 checkBeaconAttachment(o[0]); |
| 485 checkBeaconAttachment(o[1]); | 485 checkBeaconAttachment(o[1]); |
| 486 } | 486 } |
| 487 | 487 |
| 488 core.int buildCounterListBeaconAttachmentsResponse = 0; | 488 core.int buildCounterListBeaconAttachmentsResponse = 0; |
| 489 buildListBeaconAttachmentsResponse() { | 489 buildListBeaconAttachmentsResponse() { |
| 490 var o = new api.ListBeaconAttachmentsResponse(); | 490 var o = new api.ListBeaconAttachmentsResponse(); |
| 491 buildCounterListBeaconAttachmentsResponse++; | 491 buildCounterListBeaconAttachmentsResponse++; |
| 492 if (buildCounterListBeaconAttachmentsResponse < 3) { | 492 if (buildCounterListBeaconAttachmentsResponse < 3) { |
| 493 o.attachments = buildUnnamed3834(); | 493 o.attachments = buildUnnamed3308(); |
| 494 } | 494 } |
| 495 buildCounterListBeaconAttachmentsResponse--; | 495 buildCounterListBeaconAttachmentsResponse--; |
| 496 return o; | 496 return o; |
| 497 } | 497 } |
| 498 | 498 |
| 499 checkListBeaconAttachmentsResponse(api.ListBeaconAttachmentsResponse o) { | 499 checkListBeaconAttachmentsResponse(api.ListBeaconAttachmentsResponse o) { |
| 500 buildCounterListBeaconAttachmentsResponse++; | 500 buildCounterListBeaconAttachmentsResponse++; |
| 501 if (buildCounterListBeaconAttachmentsResponse < 3) { | 501 if (buildCounterListBeaconAttachmentsResponse < 3) { |
| 502 checkUnnamed3834(o.attachments); | 502 checkUnnamed3308(o.attachments); |
| 503 } | 503 } |
| 504 buildCounterListBeaconAttachmentsResponse--; | 504 buildCounterListBeaconAttachmentsResponse--; |
| 505 } | 505 } |
| 506 | 506 |
| 507 buildUnnamed3835() { | 507 buildUnnamed3309() { |
| 508 var o = new core.List<api.Beacon>(); | 508 var o = new core.List<api.Beacon>(); |
| 509 o.add(buildBeacon()); | 509 o.add(buildBeacon()); |
| 510 o.add(buildBeacon()); | 510 o.add(buildBeacon()); |
| 511 return o; | 511 return o; |
| 512 } | 512 } |
| 513 | 513 |
| 514 checkUnnamed3835(core.List<api.Beacon> o) { | 514 checkUnnamed3309(core.List<api.Beacon> o) { |
| 515 unittest.expect(o, unittest.hasLength(2)); | 515 unittest.expect(o, unittest.hasLength(2)); |
| 516 checkBeacon(o[0]); | 516 checkBeacon(o[0]); |
| 517 checkBeacon(o[1]); | 517 checkBeacon(o[1]); |
| 518 } | 518 } |
| 519 | 519 |
| 520 core.int buildCounterListBeaconsResponse = 0; | 520 core.int buildCounterListBeaconsResponse = 0; |
| 521 buildListBeaconsResponse() { | 521 buildListBeaconsResponse() { |
| 522 var o = new api.ListBeaconsResponse(); | 522 var o = new api.ListBeaconsResponse(); |
| 523 buildCounterListBeaconsResponse++; | 523 buildCounterListBeaconsResponse++; |
| 524 if (buildCounterListBeaconsResponse < 3) { | 524 if (buildCounterListBeaconsResponse < 3) { |
| 525 o.beacons = buildUnnamed3835(); | 525 o.beacons = buildUnnamed3309(); |
| 526 o.nextPageToken = "foo"; | 526 o.nextPageToken = "foo"; |
| 527 o.totalCount = "foo"; | 527 o.totalCount = "foo"; |
| 528 } | 528 } |
| 529 buildCounterListBeaconsResponse--; | 529 buildCounterListBeaconsResponse--; |
| 530 return o; | 530 return o; |
| 531 } | 531 } |
| 532 | 532 |
| 533 checkListBeaconsResponse(api.ListBeaconsResponse o) { | 533 checkListBeaconsResponse(api.ListBeaconsResponse o) { |
| 534 buildCounterListBeaconsResponse++; | 534 buildCounterListBeaconsResponse++; |
| 535 if (buildCounterListBeaconsResponse < 3) { | 535 if (buildCounterListBeaconsResponse < 3) { |
| 536 checkUnnamed3835(o.beacons); | 536 checkUnnamed3309(o.beacons); |
| 537 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 537 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
| 538 unittest.expect(o.totalCount, unittest.equals('foo')); | 538 unittest.expect(o.totalCount, unittest.equals('foo')); |
| 539 } | 539 } |
| 540 buildCounterListBeaconsResponse--; | 540 buildCounterListBeaconsResponse--; |
| 541 } | 541 } |
| 542 | 542 |
| 543 buildUnnamed3836() { | 543 buildUnnamed3310() { |
| 544 var o = new core.List<api.Diagnostics>(); | 544 var o = new core.List<api.Diagnostics>(); |
| 545 o.add(buildDiagnostics()); | 545 o.add(buildDiagnostics()); |
| 546 o.add(buildDiagnostics()); | 546 o.add(buildDiagnostics()); |
| 547 return o; | 547 return o; |
| 548 } | 548 } |
| 549 | 549 |
| 550 checkUnnamed3836(core.List<api.Diagnostics> o) { | 550 checkUnnamed3310(core.List<api.Diagnostics> o) { |
| 551 unittest.expect(o, unittest.hasLength(2)); | 551 unittest.expect(o, unittest.hasLength(2)); |
| 552 checkDiagnostics(o[0]); | 552 checkDiagnostics(o[0]); |
| 553 checkDiagnostics(o[1]); | 553 checkDiagnostics(o[1]); |
| 554 } | 554 } |
| 555 | 555 |
| 556 core.int buildCounterListDiagnosticsResponse = 0; | 556 core.int buildCounterListDiagnosticsResponse = 0; |
| 557 buildListDiagnosticsResponse() { | 557 buildListDiagnosticsResponse() { |
| 558 var o = new api.ListDiagnosticsResponse(); | 558 var o = new api.ListDiagnosticsResponse(); |
| 559 buildCounterListDiagnosticsResponse++; | 559 buildCounterListDiagnosticsResponse++; |
| 560 if (buildCounterListDiagnosticsResponse < 3) { | 560 if (buildCounterListDiagnosticsResponse < 3) { |
| 561 o.diagnostics = buildUnnamed3836(); | 561 o.diagnostics = buildUnnamed3310(); |
| 562 o.nextPageToken = "foo"; | 562 o.nextPageToken = "foo"; |
| 563 } | 563 } |
| 564 buildCounterListDiagnosticsResponse--; | 564 buildCounterListDiagnosticsResponse--; |
| 565 return o; | 565 return o; |
| 566 } | 566 } |
| 567 | 567 |
| 568 checkListDiagnosticsResponse(api.ListDiagnosticsResponse o) { | 568 checkListDiagnosticsResponse(api.ListDiagnosticsResponse o) { |
| 569 buildCounterListDiagnosticsResponse++; | 569 buildCounterListDiagnosticsResponse++; |
| 570 if (buildCounterListDiagnosticsResponse < 3) { | 570 if (buildCounterListDiagnosticsResponse < 3) { |
| 571 checkUnnamed3836(o.diagnostics); | 571 checkUnnamed3310(o.diagnostics); |
| 572 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 572 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
| 573 } | 573 } |
| 574 buildCounterListDiagnosticsResponse--; | 574 buildCounterListDiagnosticsResponse--; |
| 575 } | 575 } |
| 576 | 576 |
| 577 buildUnnamed3837() { | 577 buildUnnamed3311() { |
| 578 var o = new core.List<api.Namespace>(); | 578 var o = new core.List<api.Namespace>(); |
| 579 o.add(buildNamespace()); | 579 o.add(buildNamespace()); |
| 580 o.add(buildNamespace()); | 580 o.add(buildNamespace()); |
| 581 return o; | 581 return o; |
| 582 } | 582 } |
| 583 | 583 |
| 584 checkUnnamed3837(core.List<api.Namespace> o) { | 584 checkUnnamed3311(core.List<api.Namespace> o) { |
| 585 unittest.expect(o, unittest.hasLength(2)); | 585 unittest.expect(o, unittest.hasLength(2)); |
| 586 checkNamespace(o[0]); | 586 checkNamespace(o[0]); |
| 587 checkNamespace(o[1]); | 587 checkNamespace(o[1]); |
| 588 } | 588 } |
| 589 | 589 |
| 590 core.int buildCounterListNamespacesResponse = 0; | 590 core.int buildCounterListNamespacesResponse = 0; |
| 591 buildListNamespacesResponse() { | 591 buildListNamespacesResponse() { |
| 592 var o = new api.ListNamespacesResponse(); | 592 var o = new api.ListNamespacesResponse(); |
| 593 buildCounterListNamespacesResponse++; | 593 buildCounterListNamespacesResponse++; |
| 594 if (buildCounterListNamespacesResponse < 3) { | 594 if (buildCounterListNamespacesResponse < 3) { |
| 595 o.namespaces = buildUnnamed3837(); | 595 o.namespaces = buildUnnamed3311(); |
| 596 } | 596 } |
| 597 buildCounterListNamespacesResponse--; | 597 buildCounterListNamespacesResponse--; |
| 598 return o; | 598 return o; |
| 599 } | 599 } |
| 600 | 600 |
| 601 checkListNamespacesResponse(api.ListNamespacesResponse o) { | 601 checkListNamespacesResponse(api.ListNamespacesResponse o) { |
| 602 buildCounterListNamespacesResponse++; | 602 buildCounterListNamespacesResponse++; |
| 603 if (buildCounterListNamespacesResponse < 3) { | 603 if (buildCounterListNamespacesResponse < 3) { |
| 604 checkUnnamed3837(o.namespaces); | 604 checkUnnamed3311(o.namespaces); |
| 605 } | 605 } |
| 606 buildCounterListNamespacesResponse--; | 606 buildCounterListNamespacesResponse--; |
| 607 } | 607 } |
| 608 | 608 |
| 609 core.int buildCounterNamespace = 0; | 609 core.int buildCounterNamespace = 0; |
| 610 buildNamespace() { | 610 buildNamespace() { |
| 611 var o = new api.Namespace(); | 611 var o = new api.Namespace(); |
| 612 buildCounterNamespace++; | 612 buildCounterNamespace++; |
| 613 if (buildCounterNamespace < 3) { | 613 if (buildCounterNamespace < 3) { |
| 614 o.namespaceName = "foo"; | 614 o.namespaceName = "foo"; |
| (...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 840 }); | 840 }); |
| 841 }); | 841 }); |
| 842 | 842 |
| 843 | 843 |
| 844 unittest.group("resource-BeaconinfoResourceApi", () { | 844 unittest.group("resource-BeaconinfoResourceApi", () { |
| 845 unittest.test("method--getforobserved", () { | 845 unittest.test("method--getforobserved", () { |
| 846 | 846 |
| 847 var mock = new HttpServerMock(); | 847 var mock = new HttpServerMock(); |
| 848 api.BeaconinfoResourceApi res = new api.ProximitybeaconApi(mock).beaconinf
o; | 848 api.BeaconinfoResourceApi res = new api.ProximitybeaconApi(mock).beaconinf
o; |
| 849 var arg_request = buildGetInfoForObservedBeaconsRequest(); | 849 var arg_request = buildGetInfoForObservedBeaconsRequest(); |
| 850 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 850 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 851 var obj = new api.GetInfoForObservedBeaconsRequest.fromJson(json); | 851 var obj = new api.GetInfoForObservedBeaconsRequest.fromJson(json); |
| 852 checkGetInfoForObservedBeaconsRequest(obj); | 852 checkGetInfoForObservedBeaconsRequest(obj); |
| 853 | 853 |
| 854 var path = (req.url).path; | 854 var path = (req.url).path; |
| 855 var pathOffset = 0; | 855 var pathOffset = 0; |
| 856 var index; | 856 var index; |
| 857 var subPart; | 857 var subPart; |
| 858 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 858 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 859 pathOffset += 1; | 859 pathOffset += 1; |
| 860 unittest.expect(path.substring(pathOffset, pathOffset + 33), unittest.eq
uals("v1beta1/beaconinfo:getforobserved")); | 860 unittest.expect(path.substring(pathOffset, pathOffset + 33), unittest.eq
uals("v1beta1/beaconinfo:getforobserved")); |
| (...skipping 16 matching lines...) Expand all Loading... |
| 877 } | 877 } |
| 878 } | 878 } |
| 879 | 879 |
| 880 | 880 |
| 881 var h = { | 881 var h = { |
| 882 "content-type" : "application/json; charset=utf-8", | 882 "content-type" : "application/json; charset=utf-8", |
| 883 }; | 883 }; |
| 884 var resp = convert.JSON.encode(buildGetInfoForObservedBeaconsResponse())
; | 884 var resp = convert.JSON.encode(buildGetInfoForObservedBeaconsResponse())
; |
| 885 return new async.Future.value(stringResponse(200, h, resp)); | 885 return new async.Future.value(stringResponse(200, h, resp)); |
| 886 }), true); | 886 }), true); |
| 887 res.getforobserved(arg_request).then(unittest.expectAsync(((api.GetInfoFor
ObservedBeaconsResponse response) { | 887 res.getforobserved(arg_request).then(unittest.expectAsync1(((api.GetInfoFo
rObservedBeaconsResponse response) { |
| 888 checkGetInfoForObservedBeaconsResponse(response); | 888 checkGetInfoForObservedBeaconsResponse(response); |
| 889 }))); | 889 }))); |
| 890 }); | 890 }); |
| 891 | 891 |
| 892 }); | 892 }); |
| 893 | 893 |
| 894 | 894 |
| 895 unittest.group("resource-BeaconsResourceApi", () { | 895 unittest.group("resource-BeaconsResourceApi", () { |
| 896 unittest.test("method--activate", () { | 896 unittest.test("method--activate", () { |
| 897 | 897 |
| 898 var mock = new HttpServerMock(); | 898 var mock = new HttpServerMock(); |
| 899 api.BeaconsResourceApi res = new api.ProximitybeaconApi(mock).beacons; | 899 api.BeaconsResourceApi res = new api.ProximitybeaconApi(mock).beacons; |
| 900 var arg_beaconName = "foo"; | 900 var arg_beaconName = "foo"; |
| 901 var arg_projectId = "foo"; | 901 var arg_projectId = "foo"; |
| 902 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 902 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 903 var path = (req.url).path; | 903 var path = (req.url).path; |
| 904 var pathOffset = 0; | 904 var pathOffset = 0; |
| 905 var index; | 905 var index; |
| 906 var subPart; | 906 var subPart; |
| 907 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 907 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 908 pathOffset += 1; | 908 pathOffset += 1; |
| 909 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("v1beta1/")); | 909 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("v1beta1/")); |
| 910 pathOffset += 8; | 910 pathOffset += 8; |
| 911 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; | 911 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; |
| 912 | 912 |
| (...skipping 15 matching lines...) Expand all Loading... |
| 928 } | 928 } |
| 929 unittest.expect(queryMap["projectId"].first, unittest.equals(arg_project
Id)); | 929 unittest.expect(queryMap["projectId"].first, unittest.equals(arg_project
Id)); |
| 930 | 930 |
| 931 | 931 |
| 932 var h = { | 932 var h = { |
| 933 "content-type" : "application/json; charset=utf-8", | 933 "content-type" : "application/json; charset=utf-8", |
| 934 }; | 934 }; |
| 935 var resp = convert.JSON.encode(buildEmpty()); | 935 var resp = convert.JSON.encode(buildEmpty()); |
| 936 return new async.Future.value(stringResponse(200, h, resp)); | 936 return new async.Future.value(stringResponse(200, h, resp)); |
| 937 }), true); | 937 }), true); |
| 938 res.activate(arg_beaconName, projectId: arg_projectId).then(unittest.expec
tAsync(((api.Empty response) { | 938 res.activate(arg_beaconName, projectId: arg_projectId).then(unittest.expec
tAsync1(((api.Empty response) { |
| 939 checkEmpty(response); | 939 checkEmpty(response); |
| 940 }))); | 940 }))); |
| 941 }); | 941 }); |
| 942 | 942 |
| 943 unittest.test("method--deactivate", () { | 943 unittest.test("method--deactivate", () { |
| 944 | 944 |
| 945 var mock = new HttpServerMock(); | 945 var mock = new HttpServerMock(); |
| 946 api.BeaconsResourceApi res = new api.ProximitybeaconApi(mock).beacons; | 946 api.BeaconsResourceApi res = new api.ProximitybeaconApi(mock).beacons; |
| 947 var arg_beaconName = "foo"; | 947 var arg_beaconName = "foo"; |
| 948 var arg_projectId = "foo"; | 948 var arg_projectId = "foo"; |
| 949 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 949 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 950 var path = (req.url).path; | 950 var path = (req.url).path; |
| 951 var pathOffset = 0; | 951 var pathOffset = 0; |
| 952 var index; | 952 var index; |
| 953 var subPart; | 953 var subPart; |
| 954 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 954 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 955 pathOffset += 1; | 955 pathOffset += 1; |
| 956 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("v1beta1/")); | 956 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("v1beta1/")); |
| 957 pathOffset += 8; | 957 pathOffset += 8; |
| 958 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; | 958 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; |
| 959 | 959 |
| (...skipping 15 matching lines...) Expand all Loading... |
| 975 } | 975 } |
| 976 unittest.expect(queryMap["projectId"].first, unittest.equals(arg_project
Id)); | 976 unittest.expect(queryMap["projectId"].first, unittest.equals(arg_project
Id)); |
| 977 | 977 |
| 978 | 978 |
| 979 var h = { | 979 var h = { |
| 980 "content-type" : "application/json; charset=utf-8", | 980 "content-type" : "application/json; charset=utf-8", |
| 981 }; | 981 }; |
| 982 var resp = convert.JSON.encode(buildEmpty()); | 982 var resp = convert.JSON.encode(buildEmpty()); |
| 983 return new async.Future.value(stringResponse(200, h, resp)); | 983 return new async.Future.value(stringResponse(200, h, resp)); |
| 984 }), true); | 984 }), true); |
| 985 res.deactivate(arg_beaconName, projectId: arg_projectId).then(unittest.exp
ectAsync(((api.Empty response) { | 985 res.deactivate(arg_beaconName, projectId: arg_projectId).then(unittest.exp
ectAsync1(((api.Empty response) { |
| 986 checkEmpty(response); | 986 checkEmpty(response); |
| 987 }))); | 987 }))); |
| 988 }); | 988 }); |
| 989 | 989 |
| 990 unittest.test("method--decommission", () { | 990 unittest.test("method--decommission", () { |
| 991 | 991 |
| 992 var mock = new HttpServerMock(); | 992 var mock = new HttpServerMock(); |
| 993 api.BeaconsResourceApi res = new api.ProximitybeaconApi(mock).beacons; | 993 api.BeaconsResourceApi res = new api.ProximitybeaconApi(mock).beacons; |
| 994 var arg_beaconName = "foo"; | 994 var arg_beaconName = "foo"; |
| 995 var arg_projectId = "foo"; | 995 var arg_projectId = "foo"; |
| 996 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 996 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 997 var path = (req.url).path; | 997 var path = (req.url).path; |
| 998 var pathOffset = 0; | 998 var pathOffset = 0; |
| 999 var index; | 999 var index; |
| 1000 var subPart; | 1000 var subPart; |
| 1001 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1001 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 1002 pathOffset += 1; | 1002 pathOffset += 1; |
| 1003 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("v1beta1/")); | 1003 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("v1beta1/")); |
| 1004 pathOffset += 8; | 1004 pathOffset += 8; |
| 1005 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; | 1005 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; |
| 1006 | 1006 |
| (...skipping 15 matching lines...) Expand all Loading... |
| 1022 } | 1022 } |
| 1023 unittest.expect(queryMap["projectId"].first, unittest.equals(arg_project
Id)); | 1023 unittest.expect(queryMap["projectId"].first, unittest.equals(arg_project
Id)); |
| 1024 | 1024 |
| 1025 | 1025 |
| 1026 var h = { | 1026 var h = { |
| 1027 "content-type" : "application/json; charset=utf-8", | 1027 "content-type" : "application/json; charset=utf-8", |
| 1028 }; | 1028 }; |
| 1029 var resp = convert.JSON.encode(buildEmpty()); | 1029 var resp = convert.JSON.encode(buildEmpty()); |
| 1030 return new async.Future.value(stringResponse(200, h, resp)); | 1030 return new async.Future.value(stringResponse(200, h, resp)); |
| 1031 }), true); | 1031 }), true); |
| 1032 res.decommission(arg_beaconName, projectId: arg_projectId).then(unittest.e
xpectAsync(((api.Empty response) { | 1032 res.decommission(arg_beaconName, projectId: arg_projectId).then(unittest.e
xpectAsync1(((api.Empty response) { |
| 1033 checkEmpty(response); | 1033 checkEmpty(response); |
| 1034 }))); | 1034 }))); |
| 1035 }); | 1035 }); |
| 1036 | 1036 |
| 1037 unittest.test("method--delete", () { | 1037 unittest.test("method--delete", () { |
| 1038 | 1038 |
| 1039 var mock = new HttpServerMock(); | 1039 var mock = new HttpServerMock(); |
| 1040 api.BeaconsResourceApi res = new api.ProximitybeaconApi(mock).beacons; | 1040 api.BeaconsResourceApi res = new api.ProximitybeaconApi(mock).beacons; |
| 1041 var arg_beaconName = "foo"; | 1041 var arg_beaconName = "foo"; |
| 1042 var arg_projectId = "foo"; | 1042 var arg_projectId = "foo"; |
| 1043 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1043 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 1044 var path = (req.url).path; | 1044 var path = (req.url).path; |
| 1045 var pathOffset = 0; | 1045 var pathOffset = 0; |
| 1046 var index; | 1046 var index; |
| 1047 var subPart; | 1047 var subPart; |
| 1048 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1048 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 1049 pathOffset += 1; | 1049 pathOffset += 1; |
| 1050 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("v1beta1/")); | 1050 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("v1beta1/")); |
| 1051 pathOffset += 8; | 1051 pathOffset += 8; |
| 1052 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; | 1052 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; |
| 1053 | 1053 |
| (...skipping 15 matching lines...) Expand all Loading... |
| 1069 } | 1069 } |
| 1070 unittest.expect(queryMap["projectId"].first, unittest.equals(arg_project
Id)); | 1070 unittest.expect(queryMap["projectId"].first, unittest.equals(arg_project
Id)); |
| 1071 | 1071 |
| 1072 | 1072 |
| 1073 var h = { | 1073 var h = { |
| 1074 "content-type" : "application/json; charset=utf-8", | 1074 "content-type" : "application/json; charset=utf-8", |
| 1075 }; | 1075 }; |
| 1076 var resp = convert.JSON.encode(buildEmpty()); | 1076 var resp = convert.JSON.encode(buildEmpty()); |
| 1077 return new async.Future.value(stringResponse(200, h, resp)); | 1077 return new async.Future.value(stringResponse(200, h, resp)); |
| 1078 }), true); | 1078 }), true); |
| 1079 res.delete(arg_beaconName, projectId: arg_projectId).then(unittest.expectA
sync(((api.Empty response) { | 1079 res.delete(arg_beaconName, projectId: arg_projectId).then(unittest.expectA
sync1(((api.Empty response) { |
| 1080 checkEmpty(response); | 1080 checkEmpty(response); |
| 1081 }))); | 1081 }))); |
| 1082 }); | 1082 }); |
| 1083 | 1083 |
| 1084 unittest.test("method--get", () { | 1084 unittest.test("method--get", () { |
| 1085 | 1085 |
| 1086 var mock = new HttpServerMock(); | 1086 var mock = new HttpServerMock(); |
| 1087 api.BeaconsResourceApi res = new api.ProximitybeaconApi(mock).beacons; | 1087 api.BeaconsResourceApi res = new api.ProximitybeaconApi(mock).beacons; |
| 1088 var arg_beaconName = "foo"; | 1088 var arg_beaconName = "foo"; |
| 1089 var arg_projectId = "foo"; | 1089 var arg_projectId = "foo"; |
| 1090 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1090 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 1091 var path = (req.url).path; | 1091 var path = (req.url).path; |
| 1092 var pathOffset = 0; | 1092 var pathOffset = 0; |
| 1093 var index; | 1093 var index; |
| 1094 var subPart; | 1094 var subPart; |
| 1095 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1095 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 1096 pathOffset += 1; | 1096 pathOffset += 1; |
| 1097 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("v1beta1/")); | 1097 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("v1beta1/")); |
| 1098 pathOffset += 8; | 1098 pathOffset += 8; |
| 1099 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; | 1099 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; |
| 1100 | 1100 |
| (...skipping 15 matching lines...) Expand all Loading... |
| 1116 } | 1116 } |
| 1117 unittest.expect(queryMap["projectId"].first, unittest.equals(arg_project
Id)); | 1117 unittest.expect(queryMap["projectId"].first, unittest.equals(arg_project
Id)); |
| 1118 | 1118 |
| 1119 | 1119 |
| 1120 var h = { | 1120 var h = { |
| 1121 "content-type" : "application/json; charset=utf-8", | 1121 "content-type" : "application/json; charset=utf-8", |
| 1122 }; | 1122 }; |
| 1123 var resp = convert.JSON.encode(buildBeacon()); | 1123 var resp = convert.JSON.encode(buildBeacon()); |
| 1124 return new async.Future.value(stringResponse(200, h, resp)); | 1124 return new async.Future.value(stringResponse(200, h, resp)); |
| 1125 }), true); | 1125 }), true); |
| 1126 res.get(arg_beaconName, projectId: arg_projectId).then(unittest.expectAsyn
c(((api.Beacon response) { | 1126 res.get(arg_beaconName, projectId: arg_projectId).then(unittest.expectAsyn
c1(((api.Beacon response) { |
| 1127 checkBeacon(response); | 1127 checkBeacon(response); |
| 1128 }))); | 1128 }))); |
| 1129 }); | 1129 }); |
| 1130 | 1130 |
| 1131 unittest.test("method--list", () { | 1131 unittest.test("method--list", () { |
| 1132 | 1132 |
| 1133 var mock = new HttpServerMock(); | 1133 var mock = new HttpServerMock(); |
| 1134 api.BeaconsResourceApi res = new api.ProximitybeaconApi(mock).beacons; | 1134 api.BeaconsResourceApi res = new api.ProximitybeaconApi(mock).beacons; |
| 1135 var arg_pageToken = "foo"; | 1135 var arg_pageToken = "foo"; |
| 1136 var arg_q = "foo"; | 1136 var arg_q = "foo"; |
| 1137 var arg_pageSize = 42; | 1137 var arg_pageSize = 42; |
| 1138 var arg_projectId = "foo"; | 1138 var arg_projectId = "foo"; |
| 1139 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1139 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 1140 var path = (req.url).path; | 1140 var path = (req.url).path; |
| 1141 var pathOffset = 0; | 1141 var pathOffset = 0; |
| 1142 var index; | 1142 var index; |
| 1143 var subPart; | 1143 var subPart; |
| 1144 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1144 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 1145 pathOffset += 1; | 1145 pathOffset += 1; |
| 1146 unittest.expect(path.substring(pathOffset, pathOffset + 15), unittest.eq
uals("v1beta1/beacons")); | 1146 unittest.expect(path.substring(pathOffset, pathOffset + 15), unittest.eq
uals("v1beta1/beacons")); |
| 1147 pathOffset += 15; | 1147 pathOffset += 15; |
| 1148 | 1148 |
| 1149 var query = (req.url).query; | 1149 var query = (req.url).query; |
| (...skipping 17 matching lines...) Expand all Loading... |
| 1167 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ
als(arg_pageSize)); | 1167 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ
als(arg_pageSize)); |
| 1168 unittest.expect(queryMap["projectId"].first, unittest.equals(arg_project
Id)); | 1168 unittest.expect(queryMap["projectId"].first, unittest.equals(arg_project
Id)); |
| 1169 | 1169 |
| 1170 | 1170 |
| 1171 var h = { | 1171 var h = { |
| 1172 "content-type" : "application/json; charset=utf-8", | 1172 "content-type" : "application/json; charset=utf-8", |
| 1173 }; | 1173 }; |
| 1174 var resp = convert.JSON.encode(buildListBeaconsResponse()); | 1174 var resp = convert.JSON.encode(buildListBeaconsResponse()); |
| 1175 return new async.Future.value(stringResponse(200, h, resp)); | 1175 return new async.Future.value(stringResponse(200, h, resp)); |
| 1176 }), true); | 1176 }), true); |
| 1177 res.list(pageToken: arg_pageToken, q: arg_q, pageSize: arg_pageSize, proje
ctId: arg_projectId).then(unittest.expectAsync(((api.ListBeaconsResponse respons
e) { | 1177 res.list(pageToken: arg_pageToken, q: arg_q, pageSize: arg_pageSize, proje
ctId: arg_projectId).then(unittest.expectAsync1(((api.ListBeaconsResponse respon
se) { |
| 1178 checkListBeaconsResponse(response); | 1178 checkListBeaconsResponse(response); |
| 1179 }))); | 1179 }))); |
| 1180 }); | 1180 }); |
| 1181 | 1181 |
| 1182 unittest.test("method--register", () { | 1182 unittest.test("method--register", () { |
| 1183 | 1183 |
| 1184 var mock = new HttpServerMock(); | 1184 var mock = new HttpServerMock(); |
| 1185 api.BeaconsResourceApi res = new api.ProximitybeaconApi(mock).beacons; | 1185 api.BeaconsResourceApi res = new api.ProximitybeaconApi(mock).beacons; |
| 1186 var arg_request = buildBeacon(); | 1186 var arg_request = buildBeacon(); |
| 1187 var arg_projectId = "foo"; | 1187 var arg_projectId = "foo"; |
| 1188 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1188 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 1189 var obj = new api.Beacon.fromJson(json); | 1189 var obj = new api.Beacon.fromJson(json); |
| 1190 checkBeacon(obj); | 1190 checkBeacon(obj); |
| 1191 | 1191 |
| 1192 var path = (req.url).path; | 1192 var path = (req.url).path; |
| 1193 var pathOffset = 0; | 1193 var pathOffset = 0; |
| 1194 var index; | 1194 var index; |
| 1195 var subPart; | 1195 var subPart; |
| 1196 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1196 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 1197 pathOffset += 1; | 1197 pathOffset += 1; |
| 1198 unittest.expect(path.substring(pathOffset, pathOffset + 24), unittest.eq
uals("v1beta1/beacons:register")); | 1198 unittest.expect(path.substring(pathOffset, pathOffset + 24), unittest.eq
uals("v1beta1/beacons:register")); |
| (...skipping 17 matching lines...) Expand all Loading... |
| 1216 } | 1216 } |
| 1217 unittest.expect(queryMap["projectId"].first, unittest.equals(arg_project
Id)); | 1217 unittest.expect(queryMap["projectId"].first, unittest.equals(arg_project
Id)); |
| 1218 | 1218 |
| 1219 | 1219 |
| 1220 var h = { | 1220 var h = { |
| 1221 "content-type" : "application/json; charset=utf-8", | 1221 "content-type" : "application/json; charset=utf-8", |
| 1222 }; | 1222 }; |
| 1223 var resp = convert.JSON.encode(buildBeacon()); | 1223 var resp = convert.JSON.encode(buildBeacon()); |
| 1224 return new async.Future.value(stringResponse(200, h, resp)); | 1224 return new async.Future.value(stringResponse(200, h, resp)); |
| 1225 }), true); | 1225 }), true); |
| 1226 res.register(arg_request, projectId: arg_projectId).then(unittest.expectAs
ync(((api.Beacon response) { | 1226 res.register(arg_request, projectId: arg_projectId).then(unittest.expectAs
ync1(((api.Beacon response) { |
| 1227 checkBeacon(response); | 1227 checkBeacon(response); |
| 1228 }))); | 1228 }))); |
| 1229 }); | 1229 }); |
| 1230 | 1230 |
| 1231 unittest.test("method--update", () { | 1231 unittest.test("method--update", () { |
| 1232 | 1232 |
| 1233 var mock = new HttpServerMock(); | 1233 var mock = new HttpServerMock(); |
| 1234 api.BeaconsResourceApi res = new api.ProximitybeaconApi(mock).beacons; | 1234 api.BeaconsResourceApi res = new api.ProximitybeaconApi(mock).beacons; |
| 1235 var arg_request = buildBeacon(); | 1235 var arg_request = buildBeacon(); |
| 1236 var arg_beaconName = "foo"; | 1236 var arg_beaconName = "foo"; |
| 1237 var arg_projectId = "foo"; | 1237 var arg_projectId = "foo"; |
| 1238 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1238 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 1239 var obj = new api.Beacon.fromJson(json); | 1239 var obj = new api.Beacon.fromJson(json); |
| 1240 checkBeacon(obj); | 1240 checkBeacon(obj); |
| 1241 | 1241 |
| 1242 var path = (req.url).path; | 1242 var path = (req.url).path; |
| 1243 var pathOffset = 0; | 1243 var pathOffset = 0; |
| 1244 var index; | 1244 var index; |
| 1245 var subPart; | 1245 var subPart; |
| 1246 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1246 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 1247 pathOffset += 1; | 1247 pathOffset += 1; |
| 1248 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("v1beta1/")); | 1248 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("v1beta1/")); |
| (...skipping 18 matching lines...) Expand all Loading... |
| 1267 } | 1267 } |
| 1268 unittest.expect(queryMap["projectId"].first, unittest.equals(arg_project
Id)); | 1268 unittest.expect(queryMap["projectId"].first, unittest.equals(arg_project
Id)); |
| 1269 | 1269 |
| 1270 | 1270 |
| 1271 var h = { | 1271 var h = { |
| 1272 "content-type" : "application/json; charset=utf-8", | 1272 "content-type" : "application/json; charset=utf-8", |
| 1273 }; | 1273 }; |
| 1274 var resp = convert.JSON.encode(buildBeacon()); | 1274 var resp = convert.JSON.encode(buildBeacon()); |
| 1275 return new async.Future.value(stringResponse(200, h, resp)); | 1275 return new async.Future.value(stringResponse(200, h, resp)); |
| 1276 }), true); | 1276 }), true); |
| 1277 res.update(arg_request, arg_beaconName, projectId: arg_projectId).then(uni
ttest.expectAsync(((api.Beacon response) { | 1277 res.update(arg_request, arg_beaconName, projectId: arg_projectId).then(uni
ttest.expectAsync1(((api.Beacon response) { |
| 1278 checkBeacon(response); | 1278 checkBeacon(response); |
| 1279 }))); | 1279 }))); |
| 1280 }); | 1280 }); |
| 1281 | 1281 |
| 1282 }); | 1282 }); |
| 1283 | 1283 |
| 1284 | 1284 |
| 1285 unittest.group("resource-BeaconsAttachmentsResourceApi", () { | 1285 unittest.group("resource-BeaconsAttachmentsResourceApi", () { |
| 1286 unittest.test("method--batchDelete", () { | 1286 unittest.test("method--batchDelete", () { |
| 1287 | 1287 |
| 1288 var mock = new HttpServerMock(); | 1288 var mock = new HttpServerMock(); |
| 1289 api.BeaconsAttachmentsResourceApi res = new api.ProximitybeaconApi(mock).b
eacons.attachments; | 1289 api.BeaconsAttachmentsResourceApi res = new api.ProximitybeaconApi(mock).b
eacons.attachments; |
| 1290 var arg_beaconName = "foo"; | 1290 var arg_beaconName = "foo"; |
| 1291 var arg_namespacedType = "foo"; | 1291 var arg_namespacedType = "foo"; |
| 1292 var arg_projectId = "foo"; | 1292 var arg_projectId = "foo"; |
| 1293 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1293 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 1294 var path = (req.url).path; | 1294 var path = (req.url).path; |
| 1295 var pathOffset = 0; | 1295 var pathOffset = 0; |
| 1296 var index; | 1296 var index; |
| 1297 var subPart; | 1297 var subPart; |
| 1298 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1298 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 1299 pathOffset += 1; | 1299 pathOffset += 1; |
| 1300 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("v1beta1/")); | 1300 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("v1beta1/")); |
| 1301 pathOffset += 8; | 1301 pathOffset += 8; |
| 1302 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; | 1302 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; |
| 1303 | 1303 |
| (...skipping 16 matching lines...) Expand all Loading... |
| 1320 unittest.expect(queryMap["namespacedType"].first, unittest.equals(arg_na
mespacedType)); | 1320 unittest.expect(queryMap["namespacedType"].first, unittest.equals(arg_na
mespacedType)); |
| 1321 unittest.expect(queryMap["projectId"].first, unittest.equals(arg_project
Id)); | 1321 unittest.expect(queryMap["projectId"].first, unittest.equals(arg_project
Id)); |
| 1322 | 1322 |
| 1323 | 1323 |
| 1324 var h = { | 1324 var h = { |
| 1325 "content-type" : "application/json; charset=utf-8", | 1325 "content-type" : "application/json; charset=utf-8", |
| 1326 }; | 1326 }; |
| 1327 var resp = convert.JSON.encode(buildDeleteAttachmentsResponse()); | 1327 var resp = convert.JSON.encode(buildDeleteAttachmentsResponse()); |
| 1328 return new async.Future.value(stringResponse(200, h, resp)); | 1328 return new async.Future.value(stringResponse(200, h, resp)); |
| 1329 }), true); | 1329 }), true); |
| 1330 res.batchDelete(arg_beaconName, namespacedType: arg_namespacedType, projec
tId: arg_projectId).then(unittest.expectAsync(((api.DeleteAttachmentsResponse re
sponse) { | 1330 res.batchDelete(arg_beaconName, namespacedType: arg_namespacedType, projec
tId: arg_projectId).then(unittest.expectAsync1(((api.DeleteAttachmentsResponse r
esponse) { |
| 1331 checkDeleteAttachmentsResponse(response); | 1331 checkDeleteAttachmentsResponse(response); |
| 1332 }))); | 1332 }))); |
| 1333 }); | 1333 }); |
| 1334 | 1334 |
| 1335 unittest.test("method--create", () { | 1335 unittest.test("method--create", () { |
| 1336 | 1336 |
| 1337 var mock = new HttpServerMock(); | 1337 var mock = new HttpServerMock(); |
| 1338 api.BeaconsAttachmentsResourceApi res = new api.ProximitybeaconApi(mock).b
eacons.attachments; | 1338 api.BeaconsAttachmentsResourceApi res = new api.ProximitybeaconApi(mock).b
eacons.attachments; |
| 1339 var arg_request = buildBeaconAttachment(); | 1339 var arg_request = buildBeaconAttachment(); |
| 1340 var arg_beaconName = "foo"; | 1340 var arg_beaconName = "foo"; |
| 1341 var arg_projectId = "foo"; | 1341 var arg_projectId = "foo"; |
| 1342 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1342 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 1343 var obj = new api.BeaconAttachment.fromJson(json); | 1343 var obj = new api.BeaconAttachment.fromJson(json); |
| 1344 checkBeaconAttachment(obj); | 1344 checkBeaconAttachment(obj); |
| 1345 | 1345 |
| 1346 var path = (req.url).path; | 1346 var path = (req.url).path; |
| 1347 var pathOffset = 0; | 1347 var pathOffset = 0; |
| 1348 var index; | 1348 var index; |
| 1349 var subPart; | 1349 var subPart; |
| 1350 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1350 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 1351 pathOffset += 1; | 1351 pathOffset += 1; |
| 1352 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("v1beta1/")); | 1352 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("v1beta1/")); |
| (...skipping 18 matching lines...) Expand all Loading... |
| 1371 } | 1371 } |
| 1372 unittest.expect(queryMap["projectId"].first, unittest.equals(arg_project
Id)); | 1372 unittest.expect(queryMap["projectId"].first, unittest.equals(arg_project
Id)); |
| 1373 | 1373 |
| 1374 | 1374 |
| 1375 var h = { | 1375 var h = { |
| 1376 "content-type" : "application/json; charset=utf-8", | 1376 "content-type" : "application/json; charset=utf-8", |
| 1377 }; | 1377 }; |
| 1378 var resp = convert.JSON.encode(buildBeaconAttachment()); | 1378 var resp = convert.JSON.encode(buildBeaconAttachment()); |
| 1379 return new async.Future.value(stringResponse(200, h, resp)); | 1379 return new async.Future.value(stringResponse(200, h, resp)); |
| 1380 }), true); | 1380 }), true); |
| 1381 res.create(arg_request, arg_beaconName, projectId: arg_projectId).then(uni
ttest.expectAsync(((api.BeaconAttachment response) { | 1381 res.create(arg_request, arg_beaconName, projectId: arg_projectId).then(uni
ttest.expectAsync1(((api.BeaconAttachment response) { |
| 1382 checkBeaconAttachment(response); | 1382 checkBeaconAttachment(response); |
| 1383 }))); | 1383 }))); |
| 1384 }); | 1384 }); |
| 1385 | 1385 |
| 1386 unittest.test("method--delete", () { | 1386 unittest.test("method--delete", () { |
| 1387 | 1387 |
| 1388 var mock = new HttpServerMock(); | 1388 var mock = new HttpServerMock(); |
| 1389 api.BeaconsAttachmentsResourceApi res = new api.ProximitybeaconApi(mock).b
eacons.attachments; | 1389 api.BeaconsAttachmentsResourceApi res = new api.ProximitybeaconApi(mock).b
eacons.attachments; |
| 1390 var arg_attachmentName = "foo"; | 1390 var arg_attachmentName = "foo"; |
| 1391 var arg_projectId = "foo"; | 1391 var arg_projectId = "foo"; |
| 1392 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1392 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 1393 var path = (req.url).path; | 1393 var path = (req.url).path; |
| 1394 var pathOffset = 0; | 1394 var pathOffset = 0; |
| 1395 var index; | 1395 var index; |
| 1396 var subPart; | 1396 var subPart; |
| 1397 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1397 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 1398 pathOffset += 1; | 1398 pathOffset += 1; |
| 1399 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("v1beta1/")); | 1399 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("v1beta1/")); |
| 1400 pathOffset += 8; | 1400 pathOffset += 8; |
| 1401 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; | 1401 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; |
| 1402 | 1402 |
| (...skipping 15 matching lines...) Expand all Loading... |
| 1418 } | 1418 } |
| 1419 unittest.expect(queryMap["projectId"].first, unittest.equals(arg_project
Id)); | 1419 unittest.expect(queryMap["projectId"].first, unittest.equals(arg_project
Id)); |
| 1420 | 1420 |
| 1421 | 1421 |
| 1422 var h = { | 1422 var h = { |
| 1423 "content-type" : "application/json; charset=utf-8", | 1423 "content-type" : "application/json; charset=utf-8", |
| 1424 }; | 1424 }; |
| 1425 var resp = convert.JSON.encode(buildEmpty()); | 1425 var resp = convert.JSON.encode(buildEmpty()); |
| 1426 return new async.Future.value(stringResponse(200, h, resp)); | 1426 return new async.Future.value(stringResponse(200, h, resp)); |
| 1427 }), true); | 1427 }), true); |
| 1428 res.delete(arg_attachmentName, projectId: arg_projectId).then(unittest.exp
ectAsync(((api.Empty response) { | 1428 res.delete(arg_attachmentName, projectId: arg_projectId).then(unittest.exp
ectAsync1(((api.Empty response) { |
| 1429 checkEmpty(response); | 1429 checkEmpty(response); |
| 1430 }))); | 1430 }))); |
| 1431 }); | 1431 }); |
| 1432 | 1432 |
| 1433 unittest.test("method--list", () { | 1433 unittest.test("method--list", () { |
| 1434 | 1434 |
| 1435 var mock = new HttpServerMock(); | 1435 var mock = new HttpServerMock(); |
| 1436 api.BeaconsAttachmentsResourceApi res = new api.ProximitybeaconApi(mock).b
eacons.attachments; | 1436 api.BeaconsAttachmentsResourceApi res = new api.ProximitybeaconApi(mock).b
eacons.attachments; |
| 1437 var arg_beaconName = "foo"; | 1437 var arg_beaconName = "foo"; |
| 1438 var arg_projectId = "foo"; |
| 1438 var arg_namespacedType = "foo"; | 1439 var arg_namespacedType = "foo"; |
| 1439 var arg_projectId = "foo"; | 1440 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 1440 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 1441 var path = (req.url).path; | 1441 var path = (req.url).path; |
| 1442 var pathOffset = 0; | 1442 var pathOffset = 0; |
| 1443 var index; | 1443 var index; |
| 1444 var subPart; | 1444 var subPart; |
| 1445 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1445 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 1446 pathOffset += 1; | 1446 pathOffset += 1; |
| 1447 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("v1beta1/")); | 1447 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("v1beta1/")); |
| 1448 pathOffset += 8; | 1448 pathOffset += 8; |
| 1449 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; | 1449 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; |
| 1450 | 1450 |
| 1451 var query = (req.url).query; | 1451 var query = (req.url).query; |
| 1452 var queryOffset = 0; | 1452 var queryOffset = 0; |
| 1453 var queryMap = {}; | 1453 var queryMap = {}; |
| 1454 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 1454 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 1455 parseBool(n) { | 1455 parseBool(n) { |
| 1456 if (n == "true") return true; | 1456 if (n == "true") return true; |
| 1457 if (n == "false") return false; | 1457 if (n == "false") return false; |
| 1458 if (n == null) return null; | 1458 if (n == null) return null; |
| 1459 throw new core.ArgumentError("Invalid boolean: $n"); | 1459 throw new core.ArgumentError("Invalid boolean: $n"); |
| 1460 } | 1460 } |
| 1461 if (query.length > 0) { | 1461 if (query.length > 0) { |
| 1462 for (var part in query.split("&")) { | 1462 for (var part in query.split("&")) { |
| 1463 var keyvalue = part.split("="); | 1463 var keyvalue = part.split("="); |
| 1464 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 1464 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 1465 } | 1465 } |
| 1466 } | 1466 } |
| 1467 unittest.expect(queryMap["projectId"].first, unittest.equals(arg_project
Id)); |
| 1467 unittest.expect(queryMap["namespacedType"].first, unittest.equals(arg_na
mespacedType)); | 1468 unittest.expect(queryMap["namespacedType"].first, unittest.equals(arg_na
mespacedType)); |
| 1468 unittest.expect(queryMap["projectId"].first, unittest.equals(arg_project
Id)); | |
| 1469 | 1469 |
| 1470 | 1470 |
| 1471 var h = { | 1471 var h = { |
| 1472 "content-type" : "application/json; charset=utf-8", | 1472 "content-type" : "application/json; charset=utf-8", |
| 1473 }; | 1473 }; |
| 1474 var resp = convert.JSON.encode(buildListBeaconAttachmentsResponse()); | 1474 var resp = convert.JSON.encode(buildListBeaconAttachmentsResponse()); |
| 1475 return new async.Future.value(stringResponse(200, h, resp)); | 1475 return new async.Future.value(stringResponse(200, h, resp)); |
| 1476 }), true); | 1476 }), true); |
| 1477 res.list(arg_beaconName, namespacedType: arg_namespacedType, projectId: ar
g_projectId).then(unittest.expectAsync(((api.ListBeaconAttachmentsResponse respo
nse) { | 1477 res.list(arg_beaconName, projectId: arg_projectId, namespacedType: arg_nam
espacedType).then(unittest.expectAsync1(((api.ListBeaconAttachmentsResponse resp
onse) { |
| 1478 checkListBeaconAttachmentsResponse(response); | 1478 checkListBeaconAttachmentsResponse(response); |
| 1479 }))); | 1479 }))); |
| 1480 }); | 1480 }); |
| 1481 | 1481 |
| 1482 }); | 1482 }); |
| 1483 | 1483 |
| 1484 | 1484 |
| 1485 unittest.group("resource-BeaconsDiagnosticsResourceApi", () { | 1485 unittest.group("resource-BeaconsDiagnosticsResourceApi", () { |
| 1486 unittest.test("method--list", () { | 1486 unittest.test("method--list", () { |
| 1487 | 1487 |
| 1488 var mock = new HttpServerMock(); | 1488 var mock = new HttpServerMock(); |
| 1489 api.BeaconsDiagnosticsResourceApi res = new api.ProximitybeaconApi(mock).b
eacons.diagnostics; | 1489 api.BeaconsDiagnosticsResourceApi res = new api.ProximitybeaconApi(mock).b
eacons.diagnostics; |
| 1490 var arg_beaconName = "foo"; | 1490 var arg_beaconName = "foo"; |
| 1491 var arg_pageToken = "foo"; |
| 1491 var arg_pageSize = 42; | 1492 var arg_pageSize = 42; |
| 1492 var arg_alertFilter = "foo"; | 1493 var arg_alertFilter = "foo"; |
| 1493 var arg_projectId = "foo"; | 1494 var arg_projectId = "foo"; |
| 1494 var arg_pageToken = "foo"; | 1495 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 1495 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 1496 var path = (req.url).path; | 1496 var path = (req.url).path; |
| 1497 var pathOffset = 0; | 1497 var pathOffset = 0; |
| 1498 var index; | 1498 var index; |
| 1499 var subPart; | 1499 var subPart; |
| 1500 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1500 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 1501 pathOffset += 1; | 1501 pathOffset += 1; |
| 1502 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("v1beta1/")); | 1502 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("v1beta1/")); |
| 1503 pathOffset += 8; | 1503 pathOffset += 8; |
| 1504 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; | 1504 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; |
| 1505 | 1505 |
| 1506 var query = (req.url).query; | 1506 var query = (req.url).query; |
| 1507 var queryOffset = 0; | 1507 var queryOffset = 0; |
| 1508 var queryMap = {}; | 1508 var queryMap = {}; |
| 1509 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 1509 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 1510 parseBool(n) { | 1510 parseBool(n) { |
| 1511 if (n == "true") return true; | 1511 if (n == "true") return true; |
| 1512 if (n == "false") return false; | 1512 if (n == "false") return false; |
| 1513 if (n == null) return null; | 1513 if (n == null) return null; |
| 1514 throw new core.ArgumentError("Invalid boolean: $n"); | 1514 throw new core.ArgumentError("Invalid boolean: $n"); |
| 1515 } | 1515 } |
| 1516 if (query.length > 0) { | 1516 if (query.length > 0) { |
| 1517 for (var part in query.split("&")) { | 1517 for (var part in query.split("&")) { |
| 1518 var keyvalue = part.split("="); | 1518 var keyvalue = part.split("="); |
| 1519 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 1519 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 1520 } | 1520 } |
| 1521 } | 1521 } |
| 1522 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); |
| 1522 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ
als(arg_pageSize)); | 1523 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ
als(arg_pageSize)); |
| 1523 unittest.expect(queryMap["alertFilter"].first, unittest.equals(arg_alert
Filter)); | 1524 unittest.expect(queryMap["alertFilter"].first, unittest.equals(arg_alert
Filter)); |
| 1524 unittest.expect(queryMap["projectId"].first, unittest.equals(arg_project
Id)); | 1525 unittest.expect(queryMap["projectId"].first, unittest.equals(arg_project
Id)); |
| 1525 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | |
| 1526 | 1526 |
| 1527 | 1527 |
| 1528 var h = { | 1528 var h = { |
| 1529 "content-type" : "application/json; charset=utf-8", | 1529 "content-type" : "application/json; charset=utf-8", |
| 1530 }; | 1530 }; |
| 1531 var resp = convert.JSON.encode(buildListDiagnosticsResponse()); | 1531 var resp = convert.JSON.encode(buildListDiagnosticsResponse()); |
| 1532 return new async.Future.value(stringResponse(200, h, resp)); | 1532 return new async.Future.value(stringResponse(200, h, resp)); |
| 1533 }), true); | 1533 }), true); |
| 1534 res.list(arg_beaconName, pageSize: arg_pageSize, alertFilter: arg_alertFil
ter, projectId: arg_projectId, pageToken: arg_pageToken).then(unittest.expectAsy
nc(((api.ListDiagnosticsResponse response) { | 1534 res.list(arg_beaconName, pageToken: arg_pageToken, pageSize: arg_pageSize,
alertFilter: arg_alertFilter, projectId: arg_projectId).then(unittest.expectAsy
nc1(((api.ListDiagnosticsResponse response) { |
| 1535 checkListDiagnosticsResponse(response); | 1535 checkListDiagnosticsResponse(response); |
| 1536 }))); | 1536 }))); |
| 1537 }); | 1537 }); |
| 1538 | 1538 |
| 1539 }); | 1539 }); |
| 1540 | 1540 |
| 1541 | 1541 |
| 1542 unittest.group("resource-NamespacesResourceApi", () { | 1542 unittest.group("resource-NamespacesResourceApi", () { |
| 1543 unittest.test("method--list", () { | 1543 unittest.test("method--list", () { |
| 1544 | 1544 |
| 1545 var mock = new HttpServerMock(); | 1545 var mock = new HttpServerMock(); |
| 1546 api.NamespacesResourceApi res = new api.ProximitybeaconApi(mock).namespace
s; | 1546 api.NamespacesResourceApi res = new api.ProximitybeaconApi(mock).namespace
s; |
| 1547 var arg_projectId = "foo"; | 1547 var arg_projectId = "foo"; |
| 1548 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1548 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 1549 var path = (req.url).path; | 1549 var path = (req.url).path; |
| 1550 var pathOffset = 0; | 1550 var pathOffset = 0; |
| 1551 var index; | 1551 var index; |
| 1552 var subPart; | 1552 var subPart; |
| 1553 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1553 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 1554 pathOffset += 1; | 1554 pathOffset += 1; |
| 1555 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("v1beta1/namespaces")); | 1555 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("v1beta1/namespaces")); |
| 1556 pathOffset += 18; | 1556 pathOffset += 18; |
| 1557 | 1557 |
| 1558 var query = (req.url).query; | 1558 var query = (req.url).query; |
| (...skipping 14 matching lines...) Expand all Loading... |
| 1573 } | 1573 } |
| 1574 unittest.expect(queryMap["projectId"].first, unittest.equals(arg_project
Id)); | 1574 unittest.expect(queryMap["projectId"].first, unittest.equals(arg_project
Id)); |
| 1575 | 1575 |
| 1576 | 1576 |
| 1577 var h = { | 1577 var h = { |
| 1578 "content-type" : "application/json; charset=utf-8", | 1578 "content-type" : "application/json; charset=utf-8", |
| 1579 }; | 1579 }; |
| 1580 var resp = convert.JSON.encode(buildListNamespacesResponse()); | 1580 var resp = convert.JSON.encode(buildListNamespacesResponse()); |
| 1581 return new async.Future.value(stringResponse(200, h, resp)); | 1581 return new async.Future.value(stringResponse(200, h, resp)); |
| 1582 }), true); | 1582 }), true); |
| 1583 res.list(projectId: arg_projectId).then(unittest.expectAsync(((api.ListNam
espacesResponse response) { | 1583 res.list(projectId: arg_projectId).then(unittest.expectAsync1(((api.ListNa
mespacesResponse response) { |
| 1584 checkListNamespacesResponse(response); | 1584 checkListNamespacesResponse(response); |
| 1585 }))); | 1585 }))); |
| 1586 }); | 1586 }); |
| 1587 | 1587 |
| 1588 unittest.test("method--update", () { | 1588 unittest.test("method--update", () { |
| 1589 | 1589 |
| 1590 var mock = new HttpServerMock(); | 1590 var mock = new HttpServerMock(); |
| 1591 api.NamespacesResourceApi res = new api.ProximitybeaconApi(mock).namespace
s; | 1591 api.NamespacesResourceApi res = new api.ProximitybeaconApi(mock).namespace
s; |
| 1592 var arg_request = buildNamespace(); | 1592 var arg_request = buildNamespace(); |
| 1593 var arg_namespaceName = "foo"; | 1593 var arg_namespaceName = "foo"; |
| 1594 var arg_projectId = "foo"; | 1594 var arg_projectId = "foo"; |
| 1595 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1595 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 1596 var obj = new api.Namespace.fromJson(json); | 1596 var obj = new api.Namespace.fromJson(json); |
| 1597 checkNamespace(obj); | 1597 checkNamespace(obj); |
| 1598 | 1598 |
| 1599 var path = (req.url).path; | 1599 var path = (req.url).path; |
| 1600 var pathOffset = 0; | 1600 var pathOffset = 0; |
| 1601 var index; | 1601 var index; |
| 1602 var subPart; | 1602 var subPart; |
| 1603 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1603 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 1604 pathOffset += 1; | 1604 pathOffset += 1; |
| 1605 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("v1beta1/")); | 1605 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("v1beta1/")); |
| (...skipping 18 matching lines...) Expand all Loading... |
| 1624 } | 1624 } |
| 1625 unittest.expect(queryMap["projectId"].first, unittest.equals(arg_project
Id)); | 1625 unittest.expect(queryMap["projectId"].first, unittest.equals(arg_project
Id)); |
| 1626 | 1626 |
| 1627 | 1627 |
| 1628 var h = { | 1628 var h = { |
| 1629 "content-type" : "application/json; charset=utf-8", | 1629 "content-type" : "application/json; charset=utf-8", |
| 1630 }; | 1630 }; |
| 1631 var resp = convert.JSON.encode(buildNamespace()); | 1631 var resp = convert.JSON.encode(buildNamespace()); |
| 1632 return new async.Future.value(stringResponse(200, h, resp)); | 1632 return new async.Future.value(stringResponse(200, h, resp)); |
| 1633 }), true); | 1633 }), true); |
| 1634 res.update(arg_request, arg_namespaceName, projectId: arg_projectId).then(
unittest.expectAsync(((api.Namespace response) { | 1634 res.update(arg_request, arg_namespaceName, projectId: arg_projectId).then(
unittest.expectAsync1(((api.Namespace response) { |
| 1635 checkNamespace(response); | 1635 checkNamespace(response); |
| 1636 }))); | 1636 }))); |
| 1637 }); | 1637 }); |
| 1638 | 1638 |
| 1639 }); | 1639 }); |
| 1640 | 1640 |
| 1641 | 1641 |
| 1642 unittest.group("resource-V1beta1ResourceApi", () { | 1642 unittest.group("resource-V1beta1ResourceApi", () { |
| 1643 unittest.test("method--getEidparams", () { | 1643 unittest.test("method--getEidparams", () { |
| 1644 | 1644 |
| 1645 var mock = new HttpServerMock(); | 1645 var mock = new HttpServerMock(); |
| 1646 api.V1beta1ResourceApi res = new api.ProximitybeaconApi(mock).v1beta1; | 1646 api.V1beta1ResourceApi res = new api.ProximitybeaconApi(mock).v1beta1; |
| 1647 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1647 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 1648 var path = (req.url).path; | 1648 var path = (req.url).path; |
| 1649 var pathOffset = 0; | 1649 var pathOffset = 0; |
| 1650 var index; | 1650 var index; |
| 1651 var subPart; | 1651 var subPart; |
| 1652 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1652 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 1653 pathOffset += 1; | 1653 pathOffset += 1; |
| 1654 unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.eq
uals("v1beta1/eidparams")); | 1654 unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.eq
uals("v1beta1/eidparams")); |
| 1655 pathOffset += 17; | 1655 pathOffset += 17; |
| 1656 | 1656 |
| 1657 var query = (req.url).query; | 1657 var query = (req.url).query; |
| (...skipping 13 matching lines...) Expand all Loading... |
| 1671 } | 1671 } |
| 1672 } | 1672 } |
| 1673 | 1673 |
| 1674 | 1674 |
| 1675 var h = { | 1675 var h = { |
| 1676 "content-type" : "application/json; charset=utf-8", | 1676 "content-type" : "application/json; charset=utf-8", |
| 1677 }; | 1677 }; |
| 1678 var resp = convert.JSON.encode(buildEphemeralIdRegistrationParams()); | 1678 var resp = convert.JSON.encode(buildEphemeralIdRegistrationParams()); |
| 1679 return new async.Future.value(stringResponse(200, h, resp)); | 1679 return new async.Future.value(stringResponse(200, h, resp)); |
| 1680 }), true); | 1680 }), true); |
| 1681 res.getEidparams().then(unittest.expectAsync(((api.EphemeralIdRegistration
Params response) { | 1681 res.getEidparams().then(unittest.expectAsync1(((api.EphemeralIdRegistratio
nParams response) { |
| 1682 checkEphemeralIdRegistrationParams(response); | 1682 checkEphemeralIdRegistrationParams(response); |
| 1683 }))); | 1683 }))); |
| 1684 }); | 1684 }); |
| 1685 | 1685 |
| 1686 }); | 1686 }); |
| 1687 | 1687 |
| 1688 | 1688 |
| 1689 } | 1689 } |
| 1690 | 1690 |
| OLD | NEW |