OLD | NEW |
(Empty) | |
| 1 library googleapis.identitytoolkit.v3.test; |
| 2 |
| 3 import "dart:core" as core; |
| 4 import "dart:collection" as collection; |
| 5 import "dart:async" as async; |
| 6 import "dart:convert" as convert; |
| 7 |
| 8 import 'package:http/http.dart' as http; |
| 9 import 'package:http/testing.dart' as http_testing; |
| 10 import 'package:unittest/unittest.dart' as unittest; |
| 11 import 'package:googleapis/common/common.dart' as common; |
| 12 import 'package:googleapis/src/common_internal.dart' as common_internal; |
| 13 import '../common/common_internal_test.dart' as common_test; |
| 14 |
| 15 import 'package:googleapis/identitytoolkit/v3.dart' as api; |
| 16 |
| 17 |
| 18 |
| 19 core.int buildCounterCreateAuthUriResponse = 0; |
| 20 buildCreateAuthUriResponse() { |
| 21 var o = new api.CreateAuthUriResponse(); |
| 22 buildCounterCreateAuthUriResponse++; |
| 23 if (buildCounterCreateAuthUriResponse < 3) { |
| 24 o.authUri = "foo"; |
| 25 o.forExistingProvider = true; |
| 26 o.kind = "foo"; |
| 27 o.providerId = "foo"; |
| 28 o.registered = true; |
| 29 } |
| 30 buildCounterCreateAuthUriResponse--; |
| 31 return o; |
| 32 } |
| 33 |
| 34 checkCreateAuthUriResponse(api.CreateAuthUriResponse o) { |
| 35 buildCounterCreateAuthUriResponse++; |
| 36 if (buildCounterCreateAuthUriResponse < 3) { |
| 37 unittest.expect(o.authUri, unittest.equals('foo')); |
| 38 unittest.expect(o.forExistingProvider, unittest.isTrue); |
| 39 unittest.expect(o.kind, unittest.equals('foo')); |
| 40 unittest.expect(o.providerId, unittest.equals('foo')); |
| 41 unittest.expect(o.registered, unittest.isTrue); |
| 42 } |
| 43 buildCounterCreateAuthUriResponse--; |
| 44 } |
| 45 |
| 46 core.int buildCounterDeleteAccountResponse = 0; |
| 47 buildDeleteAccountResponse() { |
| 48 var o = new api.DeleteAccountResponse(); |
| 49 buildCounterDeleteAccountResponse++; |
| 50 if (buildCounterDeleteAccountResponse < 3) { |
| 51 o.kind = "foo"; |
| 52 } |
| 53 buildCounterDeleteAccountResponse--; |
| 54 return o; |
| 55 } |
| 56 |
| 57 checkDeleteAccountResponse(api.DeleteAccountResponse o) { |
| 58 buildCounterDeleteAccountResponse++; |
| 59 if (buildCounterDeleteAccountResponse < 3) { |
| 60 unittest.expect(o.kind, unittest.equals('foo')); |
| 61 } |
| 62 buildCounterDeleteAccountResponse--; |
| 63 } |
| 64 |
| 65 buildUnnamed933() { |
| 66 var o = new core.List<api.UserInfo>(); |
| 67 o.add(buildUserInfo()); |
| 68 o.add(buildUserInfo()); |
| 69 return o; |
| 70 } |
| 71 |
| 72 checkUnnamed933(core.List<api.UserInfo> o) { |
| 73 unittest.expect(o, unittest.hasLength(2)); |
| 74 checkUserInfo(o[0]); |
| 75 checkUserInfo(o[1]); |
| 76 } |
| 77 |
| 78 core.int buildCounterDownloadAccountResponse = 0; |
| 79 buildDownloadAccountResponse() { |
| 80 var o = new api.DownloadAccountResponse(); |
| 81 buildCounterDownloadAccountResponse++; |
| 82 if (buildCounterDownloadAccountResponse < 3) { |
| 83 o.kind = "foo"; |
| 84 o.nextPageToken = "foo"; |
| 85 o.users = buildUnnamed933(); |
| 86 } |
| 87 buildCounterDownloadAccountResponse--; |
| 88 return o; |
| 89 } |
| 90 |
| 91 checkDownloadAccountResponse(api.DownloadAccountResponse o) { |
| 92 buildCounterDownloadAccountResponse++; |
| 93 if (buildCounterDownloadAccountResponse < 3) { |
| 94 unittest.expect(o.kind, unittest.equals('foo')); |
| 95 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
| 96 checkUnnamed933(o.users); |
| 97 } |
| 98 buildCounterDownloadAccountResponse--; |
| 99 } |
| 100 |
| 101 buildUnnamed934() { |
| 102 var o = new core.List<api.UserInfo>(); |
| 103 o.add(buildUserInfo()); |
| 104 o.add(buildUserInfo()); |
| 105 return o; |
| 106 } |
| 107 |
| 108 checkUnnamed934(core.List<api.UserInfo> o) { |
| 109 unittest.expect(o, unittest.hasLength(2)); |
| 110 checkUserInfo(o[0]); |
| 111 checkUserInfo(o[1]); |
| 112 } |
| 113 |
| 114 core.int buildCounterGetAccountInfoResponse = 0; |
| 115 buildGetAccountInfoResponse() { |
| 116 var o = new api.GetAccountInfoResponse(); |
| 117 buildCounterGetAccountInfoResponse++; |
| 118 if (buildCounterGetAccountInfoResponse < 3) { |
| 119 o.kind = "foo"; |
| 120 o.users = buildUnnamed934(); |
| 121 } |
| 122 buildCounterGetAccountInfoResponse--; |
| 123 return o; |
| 124 } |
| 125 |
| 126 checkGetAccountInfoResponse(api.GetAccountInfoResponse o) { |
| 127 buildCounterGetAccountInfoResponse++; |
| 128 if (buildCounterGetAccountInfoResponse < 3) { |
| 129 unittest.expect(o.kind, unittest.equals('foo')); |
| 130 checkUnnamed934(o.users); |
| 131 } |
| 132 buildCounterGetAccountInfoResponse--; |
| 133 } |
| 134 |
| 135 core.int buildCounterGetOobConfirmationCodeResponse = 0; |
| 136 buildGetOobConfirmationCodeResponse() { |
| 137 var o = new api.GetOobConfirmationCodeResponse(); |
| 138 buildCounterGetOobConfirmationCodeResponse++; |
| 139 if (buildCounterGetOobConfirmationCodeResponse < 3) { |
| 140 o.kind = "foo"; |
| 141 o.oobCode = "foo"; |
| 142 } |
| 143 buildCounterGetOobConfirmationCodeResponse--; |
| 144 return o; |
| 145 } |
| 146 |
| 147 checkGetOobConfirmationCodeResponse(api.GetOobConfirmationCodeResponse o) { |
| 148 buildCounterGetOobConfirmationCodeResponse++; |
| 149 if (buildCounterGetOobConfirmationCodeResponse < 3) { |
| 150 unittest.expect(o.kind, unittest.equals('foo')); |
| 151 unittest.expect(o.oobCode, unittest.equals('foo')); |
| 152 } |
| 153 buildCounterGetOobConfirmationCodeResponse--; |
| 154 } |
| 155 |
| 156 core.int buildCounterIdentitytoolkitRelyingpartyCreateAuthUriRequest = 0; |
| 157 buildIdentitytoolkitRelyingpartyCreateAuthUriRequest() { |
| 158 var o = new api.IdentitytoolkitRelyingpartyCreateAuthUriRequest(); |
| 159 buildCounterIdentitytoolkitRelyingpartyCreateAuthUriRequest++; |
| 160 if (buildCounterIdentitytoolkitRelyingpartyCreateAuthUriRequest < 3) { |
| 161 o.appId = "foo"; |
| 162 o.clientId = "foo"; |
| 163 o.context = "foo"; |
| 164 o.continueUri = "foo"; |
| 165 o.identifier = "foo"; |
| 166 o.openidRealm = "foo"; |
| 167 o.otaApp = "foo"; |
| 168 o.providerId = "foo"; |
| 169 } |
| 170 buildCounterIdentitytoolkitRelyingpartyCreateAuthUriRequest--; |
| 171 return o; |
| 172 } |
| 173 |
| 174 checkIdentitytoolkitRelyingpartyCreateAuthUriRequest(api.IdentitytoolkitRelyingp
artyCreateAuthUriRequest o) { |
| 175 buildCounterIdentitytoolkitRelyingpartyCreateAuthUriRequest++; |
| 176 if (buildCounterIdentitytoolkitRelyingpartyCreateAuthUriRequest < 3) { |
| 177 unittest.expect(o.appId, unittest.equals('foo')); |
| 178 unittest.expect(o.clientId, unittest.equals('foo')); |
| 179 unittest.expect(o.context, unittest.equals('foo')); |
| 180 unittest.expect(o.continueUri, unittest.equals('foo')); |
| 181 unittest.expect(o.identifier, unittest.equals('foo')); |
| 182 unittest.expect(o.openidRealm, unittest.equals('foo')); |
| 183 unittest.expect(o.otaApp, unittest.equals('foo')); |
| 184 unittest.expect(o.providerId, unittest.equals('foo')); |
| 185 } |
| 186 buildCounterIdentitytoolkitRelyingpartyCreateAuthUriRequest--; |
| 187 } |
| 188 |
| 189 core.int buildCounterIdentitytoolkitRelyingpartyDeleteAccountRequest = 0; |
| 190 buildIdentitytoolkitRelyingpartyDeleteAccountRequest() { |
| 191 var o = new api.IdentitytoolkitRelyingpartyDeleteAccountRequest(); |
| 192 buildCounterIdentitytoolkitRelyingpartyDeleteAccountRequest++; |
| 193 if (buildCounterIdentitytoolkitRelyingpartyDeleteAccountRequest < 3) { |
| 194 o.localId = "foo"; |
| 195 } |
| 196 buildCounterIdentitytoolkitRelyingpartyDeleteAccountRequest--; |
| 197 return o; |
| 198 } |
| 199 |
| 200 checkIdentitytoolkitRelyingpartyDeleteAccountRequest(api.IdentitytoolkitRelyingp
artyDeleteAccountRequest o) { |
| 201 buildCounterIdentitytoolkitRelyingpartyDeleteAccountRequest++; |
| 202 if (buildCounterIdentitytoolkitRelyingpartyDeleteAccountRequest < 3) { |
| 203 unittest.expect(o.localId, unittest.equals('foo')); |
| 204 } |
| 205 buildCounterIdentitytoolkitRelyingpartyDeleteAccountRequest--; |
| 206 } |
| 207 |
| 208 core.int buildCounterIdentitytoolkitRelyingpartyDownloadAccountRequest = 0; |
| 209 buildIdentitytoolkitRelyingpartyDownloadAccountRequest() { |
| 210 var o = new api.IdentitytoolkitRelyingpartyDownloadAccountRequest(); |
| 211 buildCounterIdentitytoolkitRelyingpartyDownloadAccountRequest++; |
| 212 if (buildCounterIdentitytoolkitRelyingpartyDownloadAccountRequest < 3) { |
| 213 o.maxResults = 42; |
| 214 o.nextPageToken = "foo"; |
| 215 } |
| 216 buildCounterIdentitytoolkitRelyingpartyDownloadAccountRequest--; |
| 217 return o; |
| 218 } |
| 219 |
| 220 checkIdentitytoolkitRelyingpartyDownloadAccountRequest(api.IdentitytoolkitRelyin
gpartyDownloadAccountRequest o) { |
| 221 buildCounterIdentitytoolkitRelyingpartyDownloadAccountRequest++; |
| 222 if (buildCounterIdentitytoolkitRelyingpartyDownloadAccountRequest < 3) { |
| 223 unittest.expect(o.maxResults, unittest.equals(42)); |
| 224 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
| 225 } |
| 226 buildCounterIdentitytoolkitRelyingpartyDownloadAccountRequest--; |
| 227 } |
| 228 |
| 229 buildUnnamed935() { |
| 230 var o = new core.List<core.String>(); |
| 231 o.add("foo"); |
| 232 o.add("foo"); |
| 233 return o; |
| 234 } |
| 235 |
| 236 checkUnnamed935(core.List<core.String> o) { |
| 237 unittest.expect(o, unittest.hasLength(2)); |
| 238 unittest.expect(o[0], unittest.equals('foo')); |
| 239 unittest.expect(o[1], unittest.equals('foo')); |
| 240 } |
| 241 |
| 242 buildUnnamed936() { |
| 243 var o = new core.List<core.String>(); |
| 244 o.add("foo"); |
| 245 o.add("foo"); |
| 246 return o; |
| 247 } |
| 248 |
| 249 checkUnnamed936(core.List<core.String> o) { |
| 250 unittest.expect(o, unittest.hasLength(2)); |
| 251 unittest.expect(o[0], unittest.equals('foo')); |
| 252 unittest.expect(o[1], unittest.equals('foo')); |
| 253 } |
| 254 |
| 255 core.int buildCounterIdentitytoolkitRelyingpartyGetAccountInfoRequest = 0; |
| 256 buildIdentitytoolkitRelyingpartyGetAccountInfoRequest() { |
| 257 var o = new api.IdentitytoolkitRelyingpartyGetAccountInfoRequest(); |
| 258 buildCounterIdentitytoolkitRelyingpartyGetAccountInfoRequest++; |
| 259 if (buildCounterIdentitytoolkitRelyingpartyGetAccountInfoRequest < 3) { |
| 260 o.email = buildUnnamed935(); |
| 261 o.idToken = "foo"; |
| 262 o.localId = buildUnnamed936(); |
| 263 } |
| 264 buildCounterIdentitytoolkitRelyingpartyGetAccountInfoRequest--; |
| 265 return o; |
| 266 } |
| 267 |
| 268 checkIdentitytoolkitRelyingpartyGetAccountInfoRequest(api.IdentitytoolkitRelying
partyGetAccountInfoRequest o) { |
| 269 buildCounterIdentitytoolkitRelyingpartyGetAccountInfoRequest++; |
| 270 if (buildCounterIdentitytoolkitRelyingpartyGetAccountInfoRequest < 3) { |
| 271 checkUnnamed935(o.email); |
| 272 unittest.expect(o.idToken, unittest.equals('foo')); |
| 273 checkUnnamed936(o.localId); |
| 274 } |
| 275 buildCounterIdentitytoolkitRelyingpartyGetAccountInfoRequest--; |
| 276 } |
| 277 |
| 278 buildIdentitytoolkitRelyingpartyGetPublicKeysResponse() { |
| 279 var o = new api.IdentitytoolkitRelyingpartyGetPublicKeysResponse(); |
| 280 o["a"] = "foo"; |
| 281 o["b"] = "foo"; |
| 282 return o; |
| 283 } |
| 284 |
| 285 checkIdentitytoolkitRelyingpartyGetPublicKeysResponse(api.IdentitytoolkitRelying
partyGetPublicKeysResponse o) { |
| 286 unittest.expect(o, unittest.hasLength(2)); |
| 287 unittest.expect(o["a"], unittest.equals('foo')); |
| 288 unittest.expect(o["b"], unittest.equals('foo')); |
| 289 } |
| 290 |
| 291 core.int buildCounterIdentitytoolkitRelyingpartyResetPasswordRequest = 0; |
| 292 buildIdentitytoolkitRelyingpartyResetPasswordRequest() { |
| 293 var o = new api.IdentitytoolkitRelyingpartyResetPasswordRequest(); |
| 294 buildCounterIdentitytoolkitRelyingpartyResetPasswordRequest++; |
| 295 if (buildCounterIdentitytoolkitRelyingpartyResetPasswordRequest < 3) { |
| 296 o.email = "foo"; |
| 297 o.newPassword = "foo"; |
| 298 o.oldPassword = "foo"; |
| 299 o.oobCode = "foo"; |
| 300 } |
| 301 buildCounterIdentitytoolkitRelyingpartyResetPasswordRequest--; |
| 302 return o; |
| 303 } |
| 304 |
| 305 checkIdentitytoolkitRelyingpartyResetPasswordRequest(api.IdentitytoolkitRelyingp
artyResetPasswordRequest o) { |
| 306 buildCounterIdentitytoolkitRelyingpartyResetPasswordRequest++; |
| 307 if (buildCounterIdentitytoolkitRelyingpartyResetPasswordRequest < 3) { |
| 308 unittest.expect(o.email, unittest.equals('foo')); |
| 309 unittest.expect(o.newPassword, unittest.equals('foo')); |
| 310 unittest.expect(o.oldPassword, unittest.equals('foo')); |
| 311 unittest.expect(o.oobCode, unittest.equals('foo')); |
| 312 } |
| 313 buildCounterIdentitytoolkitRelyingpartyResetPasswordRequest--; |
| 314 } |
| 315 |
| 316 buildUnnamed937() { |
| 317 var o = new core.List<core.String>(); |
| 318 o.add("foo"); |
| 319 o.add("foo"); |
| 320 return o; |
| 321 } |
| 322 |
| 323 checkUnnamed937(core.List<core.String> o) { |
| 324 unittest.expect(o, unittest.hasLength(2)); |
| 325 unittest.expect(o[0], unittest.equals('foo')); |
| 326 unittest.expect(o[1], unittest.equals('foo')); |
| 327 } |
| 328 |
| 329 core.int buildCounterIdentitytoolkitRelyingpartySetAccountInfoRequest = 0; |
| 330 buildIdentitytoolkitRelyingpartySetAccountInfoRequest() { |
| 331 var o = new api.IdentitytoolkitRelyingpartySetAccountInfoRequest(); |
| 332 buildCounterIdentitytoolkitRelyingpartySetAccountInfoRequest++; |
| 333 if (buildCounterIdentitytoolkitRelyingpartySetAccountInfoRequest < 3) { |
| 334 o.captchaChallenge = "foo"; |
| 335 o.captchaResponse = "foo"; |
| 336 o.displayName = "foo"; |
| 337 o.email = "foo"; |
| 338 o.emailVerified = true; |
| 339 o.idToken = "foo"; |
| 340 o.localId = "foo"; |
| 341 o.oobCode = "foo"; |
| 342 o.password = "foo"; |
| 343 o.provider = buildUnnamed937(); |
| 344 o.upgradeToFederatedLogin = true; |
| 345 } |
| 346 buildCounterIdentitytoolkitRelyingpartySetAccountInfoRequest--; |
| 347 return o; |
| 348 } |
| 349 |
| 350 checkIdentitytoolkitRelyingpartySetAccountInfoRequest(api.IdentitytoolkitRelying
partySetAccountInfoRequest o) { |
| 351 buildCounterIdentitytoolkitRelyingpartySetAccountInfoRequest++; |
| 352 if (buildCounterIdentitytoolkitRelyingpartySetAccountInfoRequest < 3) { |
| 353 unittest.expect(o.captchaChallenge, unittest.equals('foo')); |
| 354 unittest.expect(o.captchaResponse, unittest.equals('foo')); |
| 355 unittest.expect(o.displayName, unittest.equals('foo')); |
| 356 unittest.expect(o.email, unittest.equals('foo')); |
| 357 unittest.expect(o.emailVerified, unittest.isTrue); |
| 358 unittest.expect(o.idToken, unittest.equals('foo')); |
| 359 unittest.expect(o.localId, unittest.equals('foo')); |
| 360 unittest.expect(o.oobCode, unittest.equals('foo')); |
| 361 unittest.expect(o.password, unittest.equals('foo')); |
| 362 checkUnnamed937(o.provider); |
| 363 unittest.expect(o.upgradeToFederatedLogin, unittest.isTrue); |
| 364 } |
| 365 buildCounterIdentitytoolkitRelyingpartySetAccountInfoRequest--; |
| 366 } |
| 367 |
| 368 buildUnnamed938() { |
| 369 var o = new core.List<api.UserInfo>(); |
| 370 o.add(buildUserInfo()); |
| 371 o.add(buildUserInfo()); |
| 372 return o; |
| 373 } |
| 374 |
| 375 checkUnnamed938(core.List<api.UserInfo> o) { |
| 376 unittest.expect(o, unittest.hasLength(2)); |
| 377 checkUserInfo(o[0]); |
| 378 checkUserInfo(o[1]); |
| 379 } |
| 380 |
| 381 core.int buildCounterIdentitytoolkitRelyingpartyUploadAccountRequest = 0; |
| 382 buildIdentitytoolkitRelyingpartyUploadAccountRequest() { |
| 383 var o = new api.IdentitytoolkitRelyingpartyUploadAccountRequest(); |
| 384 buildCounterIdentitytoolkitRelyingpartyUploadAccountRequest++; |
| 385 if (buildCounterIdentitytoolkitRelyingpartyUploadAccountRequest < 3) { |
| 386 o.hashAlgorithm = "foo"; |
| 387 o.memoryCost = 42; |
| 388 o.rounds = 42; |
| 389 o.saltSeparator = "foo"; |
| 390 o.signerKey = "foo"; |
| 391 o.users = buildUnnamed938(); |
| 392 } |
| 393 buildCounterIdentitytoolkitRelyingpartyUploadAccountRequest--; |
| 394 return o; |
| 395 } |
| 396 |
| 397 checkIdentitytoolkitRelyingpartyUploadAccountRequest(api.IdentitytoolkitRelyingp
artyUploadAccountRequest o) { |
| 398 buildCounterIdentitytoolkitRelyingpartyUploadAccountRequest++; |
| 399 if (buildCounterIdentitytoolkitRelyingpartyUploadAccountRequest < 3) { |
| 400 unittest.expect(o.hashAlgorithm, unittest.equals('foo')); |
| 401 unittest.expect(o.memoryCost, unittest.equals(42)); |
| 402 unittest.expect(o.rounds, unittest.equals(42)); |
| 403 unittest.expect(o.saltSeparator, unittest.equals('foo')); |
| 404 unittest.expect(o.signerKey, unittest.equals('foo')); |
| 405 checkUnnamed938(o.users); |
| 406 } |
| 407 buildCounterIdentitytoolkitRelyingpartyUploadAccountRequest--; |
| 408 } |
| 409 |
| 410 core.int buildCounterIdentitytoolkitRelyingpartyVerifyAssertionRequest = 0; |
| 411 buildIdentitytoolkitRelyingpartyVerifyAssertionRequest() { |
| 412 var o = new api.IdentitytoolkitRelyingpartyVerifyAssertionRequest(); |
| 413 buildCounterIdentitytoolkitRelyingpartyVerifyAssertionRequest++; |
| 414 if (buildCounterIdentitytoolkitRelyingpartyVerifyAssertionRequest < 3) { |
| 415 o.pendingIdToken = "foo"; |
| 416 o.postBody = "foo"; |
| 417 o.requestUri = "foo"; |
| 418 } |
| 419 buildCounterIdentitytoolkitRelyingpartyVerifyAssertionRequest--; |
| 420 return o; |
| 421 } |
| 422 |
| 423 checkIdentitytoolkitRelyingpartyVerifyAssertionRequest(api.IdentitytoolkitRelyin
gpartyVerifyAssertionRequest o) { |
| 424 buildCounterIdentitytoolkitRelyingpartyVerifyAssertionRequest++; |
| 425 if (buildCounterIdentitytoolkitRelyingpartyVerifyAssertionRequest < 3) { |
| 426 unittest.expect(o.pendingIdToken, unittest.equals('foo')); |
| 427 unittest.expect(o.postBody, unittest.equals('foo')); |
| 428 unittest.expect(o.requestUri, unittest.equals('foo')); |
| 429 } |
| 430 buildCounterIdentitytoolkitRelyingpartyVerifyAssertionRequest--; |
| 431 } |
| 432 |
| 433 core.int buildCounterIdentitytoolkitRelyingpartyVerifyPasswordRequest = 0; |
| 434 buildIdentitytoolkitRelyingpartyVerifyPasswordRequest() { |
| 435 var o = new api.IdentitytoolkitRelyingpartyVerifyPasswordRequest(); |
| 436 buildCounterIdentitytoolkitRelyingpartyVerifyPasswordRequest++; |
| 437 if (buildCounterIdentitytoolkitRelyingpartyVerifyPasswordRequest < 3) { |
| 438 o.captchaChallenge = "foo"; |
| 439 o.captchaResponse = "foo"; |
| 440 o.email = "foo"; |
| 441 o.password = "foo"; |
| 442 o.pendingIdToken = "foo"; |
| 443 } |
| 444 buildCounterIdentitytoolkitRelyingpartyVerifyPasswordRequest--; |
| 445 return o; |
| 446 } |
| 447 |
| 448 checkIdentitytoolkitRelyingpartyVerifyPasswordRequest(api.IdentitytoolkitRelying
partyVerifyPasswordRequest o) { |
| 449 buildCounterIdentitytoolkitRelyingpartyVerifyPasswordRequest++; |
| 450 if (buildCounterIdentitytoolkitRelyingpartyVerifyPasswordRequest < 3) { |
| 451 unittest.expect(o.captchaChallenge, unittest.equals('foo')); |
| 452 unittest.expect(o.captchaResponse, unittest.equals('foo')); |
| 453 unittest.expect(o.email, unittest.equals('foo')); |
| 454 unittest.expect(o.password, unittest.equals('foo')); |
| 455 unittest.expect(o.pendingIdToken, unittest.equals('foo')); |
| 456 } |
| 457 buildCounterIdentitytoolkitRelyingpartyVerifyPasswordRequest--; |
| 458 } |
| 459 |
| 460 core.int buildCounterRelyingparty = 0; |
| 461 buildRelyingparty() { |
| 462 var o = new api.Relyingparty(); |
| 463 buildCounterRelyingparty++; |
| 464 if (buildCounterRelyingparty < 3) { |
| 465 o.captchaResp = "foo"; |
| 466 o.challenge = "foo"; |
| 467 o.email = "foo"; |
| 468 o.idToken = "foo"; |
| 469 o.kind = "foo"; |
| 470 o.newEmail = "foo"; |
| 471 o.requestType = "foo"; |
| 472 o.userIp = "foo"; |
| 473 } |
| 474 buildCounterRelyingparty--; |
| 475 return o; |
| 476 } |
| 477 |
| 478 checkRelyingparty(api.Relyingparty o) { |
| 479 buildCounterRelyingparty++; |
| 480 if (buildCounterRelyingparty < 3) { |
| 481 unittest.expect(o.captchaResp, unittest.equals('foo')); |
| 482 unittest.expect(o.challenge, unittest.equals('foo')); |
| 483 unittest.expect(o.email, unittest.equals('foo')); |
| 484 unittest.expect(o.idToken, unittest.equals('foo')); |
| 485 unittest.expect(o.kind, unittest.equals('foo')); |
| 486 unittest.expect(o.newEmail, unittest.equals('foo')); |
| 487 unittest.expect(o.requestType, unittest.equals('foo')); |
| 488 unittest.expect(o.userIp, unittest.equals('foo')); |
| 489 } |
| 490 buildCounterRelyingparty--; |
| 491 } |
| 492 |
| 493 core.int buildCounterResetPasswordResponse = 0; |
| 494 buildResetPasswordResponse() { |
| 495 var o = new api.ResetPasswordResponse(); |
| 496 buildCounterResetPasswordResponse++; |
| 497 if (buildCounterResetPasswordResponse < 3) { |
| 498 o.email = "foo"; |
| 499 o.kind = "foo"; |
| 500 } |
| 501 buildCounterResetPasswordResponse--; |
| 502 return o; |
| 503 } |
| 504 |
| 505 checkResetPasswordResponse(api.ResetPasswordResponse o) { |
| 506 buildCounterResetPasswordResponse++; |
| 507 if (buildCounterResetPasswordResponse < 3) { |
| 508 unittest.expect(o.email, unittest.equals('foo')); |
| 509 unittest.expect(o.kind, unittest.equals('foo')); |
| 510 } |
| 511 buildCounterResetPasswordResponse--; |
| 512 } |
| 513 |
| 514 core.int buildCounterSetAccountInfoResponseProviderUserInfo = 0; |
| 515 buildSetAccountInfoResponseProviderUserInfo() { |
| 516 var o = new api.SetAccountInfoResponseProviderUserInfo(); |
| 517 buildCounterSetAccountInfoResponseProviderUserInfo++; |
| 518 if (buildCounterSetAccountInfoResponseProviderUserInfo < 3) { |
| 519 o.displayName = "foo"; |
| 520 o.photoUrl = "foo"; |
| 521 o.providerId = "foo"; |
| 522 } |
| 523 buildCounterSetAccountInfoResponseProviderUserInfo--; |
| 524 return o; |
| 525 } |
| 526 |
| 527 checkSetAccountInfoResponseProviderUserInfo(api.SetAccountInfoResponseProviderUs
erInfo o) { |
| 528 buildCounterSetAccountInfoResponseProviderUserInfo++; |
| 529 if (buildCounterSetAccountInfoResponseProviderUserInfo < 3) { |
| 530 unittest.expect(o.displayName, unittest.equals('foo')); |
| 531 unittest.expect(o.photoUrl, unittest.equals('foo')); |
| 532 unittest.expect(o.providerId, unittest.equals('foo')); |
| 533 } |
| 534 buildCounterSetAccountInfoResponseProviderUserInfo--; |
| 535 } |
| 536 |
| 537 buildUnnamed939() { |
| 538 var o = new core.List<api.SetAccountInfoResponseProviderUserInfo>(); |
| 539 o.add(buildSetAccountInfoResponseProviderUserInfo()); |
| 540 o.add(buildSetAccountInfoResponseProviderUserInfo()); |
| 541 return o; |
| 542 } |
| 543 |
| 544 checkUnnamed939(core.List<api.SetAccountInfoResponseProviderUserInfo> o) { |
| 545 unittest.expect(o, unittest.hasLength(2)); |
| 546 checkSetAccountInfoResponseProviderUserInfo(o[0]); |
| 547 checkSetAccountInfoResponseProviderUserInfo(o[1]); |
| 548 } |
| 549 |
| 550 core.int buildCounterSetAccountInfoResponse = 0; |
| 551 buildSetAccountInfoResponse() { |
| 552 var o = new api.SetAccountInfoResponse(); |
| 553 buildCounterSetAccountInfoResponse++; |
| 554 if (buildCounterSetAccountInfoResponse < 3) { |
| 555 o.displayName = "foo"; |
| 556 o.email = "foo"; |
| 557 o.idToken = "foo"; |
| 558 o.kind = "foo"; |
| 559 o.providerUserInfo = buildUnnamed939(); |
| 560 } |
| 561 buildCounterSetAccountInfoResponse--; |
| 562 return o; |
| 563 } |
| 564 |
| 565 checkSetAccountInfoResponse(api.SetAccountInfoResponse o) { |
| 566 buildCounterSetAccountInfoResponse++; |
| 567 if (buildCounterSetAccountInfoResponse < 3) { |
| 568 unittest.expect(o.displayName, unittest.equals('foo')); |
| 569 unittest.expect(o.email, unittest.equals('foo')); |
| 570 unittest.expect(o.idToken, unittest.equals('foo')); |
| 571 unittest.expect(o.kind, unittest.equals('foo')); |
| 572 checkUnnamed939(o.providerUserInfo); |
| 573 } |
| 574 buildCounterSetAccountInfoResponse--; |
| 575 } |
| 576 |
| 577 core.int buildCounterUploadAccountResponseError = 0; |
| 578 buildUploadAccountResponseError() { |
| 579 var o = new api.UploadAccountResponseError(); |
| 580 buildCounterUploadAccountResponseError++; |
| 581 if (buildCounterUploadAccountResponseError < 3) { |
| 582 o.index = 42; |
| 583 o.message = "foo"; |
| 584 } |
| 585 buildCounterUploadAccountResponseError--; |
| 586 return o; |
| 587 } |
| 588 |
| 589 checkUploadAccountResponseError(api.UploadAccountResponseError o) { |
| 590 buildCounterUploadAccountResponseError++; |
| 591 if (buildCounterUploadAccountResponseError < 3) { |
| 592 unittest.expect(o.index, unittest.equals(42)); |
| 593 unittest.expect(o.message, unittest.equals('foo')); |
| 594 } |
| 595 buildCounterUploadAccountResponseError--; |
| 596 } |
| 597 |
| 598 buildUnnamed940() { |
| 599 var o = new core.List<api.UploadAccountResponseError>(); |
| 600 o.add(buildUploadAccountResponseError()); |
| 601 o.add(buildUploadAccountResponseError()); |
| 602 return o; |
| 603 } |
| 604 |
| 605 checkUnnamed940(core.List<api.UploadAccountResponseError> o) { |
| 606 unittest.expect(o, unittest.hasLength(2)); |
| 607 checkUploadAccountResponseError(o[0]); |
| 608 checkUploadAccountResponseError(o[1]); |
| 609 } |
| 610 |
| 611 core.int buildCounterUploadAccountResponse = 0; |
| 612 buildUploadAccountResponse() { |
| 613 var o = new api.UploadAccountResponse(); |
| 614 buildCounterUploadAccountResponse++; |
| 615 if (buildCounterUploadAccountResponse < 3) { |
| 616 o.error = buildUnnamed940(); |
| 617 o.kind = "foo"; |
| 618 } |
| 619 buildCounterUploadAccountResponse--; |
| 620 return o; |
| 621 } |
| 622 |
| 623 checkUploadAccountResponse(api.UploadAccountResponse o) { |
| 624 buildCounterUploadAccountResponse++; |
| 625 if (buildCounterUploadAccountResponse < 3) { |
| 626 checkUnnamed940(o.error); |
| 627 unittest.expect(o.kind, unittest.equals('foo')); |
| 628 } |
| 629 buildCounterUploadAccountResponse--; |
| 630 } |
| 631 |
| 632 core.int buildCounterUserInfoProviderUserInfo = 0; |
| 633 buildUserInfoProviderUserInfo() { |
| 634 var o = new api.UserInfoProviderUserInfo(); |
| 635 buildCounterUserInfoProviderUserInfo++; |
| 636 if (buildCounterUserInfoProviderUserInfo < 3) { |
| 637 o.displayName = "foo"; |
| 638 o.federatedId = "foo"; |
| 639 o.photoUrl = "foo"; |
| 640 o.providerId = "foo"; |
| 641 } |
| 642 buildCounterUserInfoProviderUserInfo--; |
| 643 return o; |
| 644 } |
| 645 |
| 646 checkUserInfoProviderUserInfo(api.UserInfoProviderUserInfo o) { |
| 647 buildCounterUserInfoProviderUserInfo++; |
| 648 if (buildCounterUserInfoProviderUserInfo < 3) { |
| 649 unittest.expect(o.displayName, unittest.equals('foo')); |
| 650 unittest.expect(o.federatedId, unittest.equals('foo')); |
| 651 unittest.expect(o.photoUrl, unittest.equals('foo')); |
| 652 unittest.expect(o.providerId, unittest.equals('foo')); |
| 653 } |
| 654 buildCounterUserInfoProviderUserInfo--; |
| 655 } |
| 656 |
| 657 buildUnnamed941() { |
| 658 var o = new core.List<api.UserInfoProviderUserInfo>(); |
| 659 o.add(buildUserInfoProviderUserInfo()); |
| 660 o.add(buildUserInfoProviderUserInfo()); |
| 661 return o; |
| 662 } |
| 663 |
| 664 checkUnnamed941(core.List<api.UserInfoProviderUserInfo> o) { |
| 665 unittest.expect(o, unittest.hasLength(2)); |
| 666 checkUserInfoProviderUserInfo(o[0]); |
| 667 checkUserInfoProviderUserInfo(o[1]); |
| 668 } |
| 669 |
| 670 core.int buildCounterUserInfo = 0; |
| 671 buildUserInfo() { |
| 672 var o = new api.UserInfo(); |
| 673 buildCounterUserInfo++; |
| 674 if (buildCounterUserInfo < 3) { |
| 675 o.displayName = "foo"; |
| 676 o.email = "foo"; |
| 677 o.emailVerified = true; |
| 678 o.localId = "foo"; |
| 679 o.passwordHash = "foo"; |
| 680 o.passwordUpdatedAt = 42.0; |
| 681 o.photoUrl = "foo"; |
| 682 o.providerUserInfo = buildUnnamed941(); |
| 683 o.salt = "foo"; |
| 684 o.version = 42; |
| 685 } |
| 686 buildCounterUserInfo--; |
| 687 return o; |
| 688 } |
| 689 |
| 690 checkUserInfo(api.UserInfo o) { |
| 691 buildCounterUserInfo++; |
| 692 if (buildCounterUserInfo < 3) { |
| 693 unittest.expect(o.displayName, unittest.equals('foo')); |
| 694 unittest.expect(o.email, unittest.equals('foo')); |
| 695 unittest.expect(o.emailVerified, unittest.isTrue); |
| 696 unittest.expect(o.localId, unittest.equals('foo')); |
| 697 unittest.expect(o.passwordHash, unittest.equals('foo')); |
| 698 unittest.expect(o.passwordUpdatedAt, unittest.equals(42.0)); |
| 699 unittest.expect(o.photoUrl, unittest.equals('foo')); |
| 700 checkUnnamed941(o.providerUserInfo); |
| 701 unittest.expect(o.salt, unittest.equals('foo')); |
| 702 unittest.expect(o.version, unittest.equals(42)); |
| 703 } |
| 704 buildCounterUserInfo--; |
| 705 } |
| 706 |
| 707 buildUnnamed942() { |
| 708 var o = new core.List<core.String>(); |
| 709 o.add("foo"); |
| 710 o.add("foo"); |
| 711 return o; |
| 712 } |
| 713 |
| 714 checkUnnamed942(core.List<core.String> o) { |
| 715 unittest.expect(o, unittest.hasLength(2)); |
| 716 unittest.expect(o[0], unittest.equals('foo')); |
| 717 unittest.expect(o[1], unittest.equals('foo')); |
| 718 } |
| 719 |
| 720 core.int buildCounterVerifyAssertionResponse = 0; |
| 721 buildVerifyAssertionResponse() { |
| 722 var o = new api.VerifyAssertionResponse(); |
| 723 buildCounterVerifyAssertionResponse++; |
| 724 if (buildCounterVerifyAssertionResponse < 3) { |
| 725 o.action = "foo"; |
| 726 o.appInstallationUrl = "foo"; |
| 727 o.appScheme = "foo"; |
| 728 o.context = "foo"; |
| 729 o.dateOfBirth = "foo"; |
| 730 o.displayName = "foo"; |
| 731 o.email = "foo"; |
| 732 o.emailRecycled = true; |
| 733 o.emailVerified = true; |
| 734 o.federatedId = "foo"; |
| 735 o.firstName = "foo"; |
| 736 o.fullName = "foo"; |
| 737 o.idToken = "foo"; |
| 738 o.inputEmail = "foo"; |
| 739 o.kind = "foo"; |
| 740 o.language = "foo"; |
| 741 o.lastName = "foo"; |
| 742 o.localId = "foo"; |
| 743 o.needConfirmation = true; |
| 744 o.nickName = "foo"; |
| 745 o.oauthRequestToken = "foo"; |
| 746 o.oauthScope = "foo"; |
| 747 o.originalEmail = "foo"; |
| 748 o.photoUrl = "foo"; |
| 749 o.providerId = "foo"; |
| 750 o.timeZone = "foo"; |
| 751 o.verifiedProvider = buildUnnamed942(); |
| 752 } |
| 753 buildCounterVerifyAssertionResponse--; |
| 754 return o; |
| 755 } |
| 756 |
| 757 checkVerifyAssertionResponse(api.VerifyAssertionResponse o) { |
| 758 buildCounterVerifyAssertionResponse++; |
| 759 if (buildCounterVerifyAssertionResponse < 3) { |
| 760 unittest.expect(o.action, unittest.equals('foo')); |
| 761 unittest.expect(o.appInstallationUrl, unittest.equals('foo')); |
| 762 unittest.expect(o.appScheme, unittest.equals('foo')); |
| 763 unittest.expect(o.context, unittest.equals('foo')); |
| 764 unittest.expect(o.dateOfBirth, unittest.equals('foo')); |
| 765 unittest.expect(o.displayName, unittest.equals('foo')); |
| 766 unittest.expect(o.email, unittest.equals('foo')); |
| 767 unittest.expect(o.emailRecycled, unittest.isTrue); |
| 768 unittest.expect(o.emailVerified, unittest.isTrue); |
| 769 unittest.expect(o.federatedId, unittest.equals('foo')); |
| 770 unittest.expect(o.firstName, unittest.equals('foo')); |
| 771 unittest.expect(o.fullName, unittest.equals('foo')); |
| 772 unittest.expect(o.idToken, unittest.equals('foo')); |
| 773 unittest.expect(o.inputEmail, unittest.equals('foo')); |
| 774 unittest.expect(o.kind, unittest.equals('foo')); |
| 775 unittest.expect(o.language, unittest.equals('foo')); |
| 776 unittest.expect(o.lastName, unittest.equals('foo')); |
| 777 unittest.expect(o.localId, unittest.equals('foo')); |
| 778 unittest.expect(o.needConfirmation, unittest.isTrue); |
| 779 unittest.expect(o.nickName, unittest.equals('foo')); |
| 780 unittest.expect(o.oauthRequestToken, unittest.equals('foo')); |
| 781 unittest.expect(o.oauthScope, unittest.equals('foo')); |
| 782 unittest.expect(o.originalEmail, unittest.equals('foo')); |
| 783 unittest.expect(o.photoUrl, unittest.equals('foo')); |
| 784 unittest.expect(o.providerId, unittest.equals('foo')); |
| 785 unittest.expect(o.timeZone, unittest.equals('foo')); |
| 786 checkUnnamed942(o.verifiedProvider); |
| 787 } |
| 788 buildCounterVerifyAssertionResponse--; |
| 789 } |
| 790 |
| 791 core.int buildCounterVerifyPasswordResponse = 0; |
| 792 buildVerifyPasswordResponse() { |
| 793 var o = new api.VerifyPasswordResponse(); |
| 794 buildCounterVerifyPasswordResponse++; |
| 795 if (buildCounterVerifyPasswordResponse < 3) { |
| 796 o.displayName = "foo"; |
| 797 o.email = "foo"; |
| 798 o.idToken = "foo"; |
| 799 o.kind = "foo"; |
| 800 o.localId = "foo"; |
| 801 o.photoUrl = "foo"; |
| 802 o.registered = true; |
| 803 } |
| 804 buildCounterVerifyPasswordResponse--; |
| 805 return o; |
| 806 } |
| 807 |
| 808 checkVerifyPasswordResponse(api.VerifyPasswordResponse o) { |
| 809 buildCounterVerifyPasswordResponse++; |
| 810 if (buildCounterVerifyPasswordResponse < 3) { |
| 811 unittest.expect(o.displayName, unittest.equals('foo')); |
| 812 unittest.expect(o.email, unittest.equals('foo')); |
| 813 unittest.expect(o.idToken, unittest.equals('foo')); |
| 814 unittest.expect(o.kind, unittest.equals('foo')); |
| 815 unittest.expect(o.localId, unittest.equals('foo')); |
| 816 unittest.expect(o.photoUrl, unittest.equals('foo')); |
| 817 unittest.expect(o.registered, unittest.isTrue); |
| 818 } |
| 819 buildCounterVerifyPasswordResponse--; |
| 820 } |
| 821 |
| 822 |
| 823 main() { |
| 824 unittest.group("obj-schema-CreateAuthUriResponse", () { |
| 825 unittest.test("to-json--from-json", () { |
| 826 var o = buildCreateAuthUriResponse(); |
| 827 var od = new api.CreateAuthUriResponse.fromJson(o.toJson()); |
| 828 checkCreateAuthUriResponse(od); |
| 829 }); |
| 830 }); |
| 831 |
| 832 |
| 833 unittest.group("obj-schema-DeleteAccountResponse", () { |
| 834 unittest.test("to-json--from-json", () { |
| 835 var o = buildDeleteAccountResponse(); |
| 836 var od = new api.DeleteAccountResponse.fromJson(o.toJson()); |
| 837 checkDeleteAccountResponse(od); |
| 838 }); |
| 839 }); |
| 840 |
| 841 |
| 842 unittest.group("obj-schema-DownloadAccountResponse", () { |
| 843 unittest.test("to-json--from-json", () { |
| 844 var o = buildDownloadAccountResponse(); |
| 845 var od = new api.DownloadAccountResponse.fromJson(o.toJson()); |
| 846 checkDownloadAccountResponse(od); |
| 847 }); |
| 848 }); |
| 849 |
| 850 |
| 851 unittest.group("obj-schema-GetAccountInfoResponse", () { |
| 852 unittest.test("to-json--from-json", () { |
| 853 var o = buildGetAccountInfoResponse(); |
| 854 var od = new api.GetAccountInfoResponse.fromJson(o.toJson()); |
| 855 checkGetAccountInfoResponse(od); |
| 856 }); |
| 857 }); |
| 858 |
| 859 |
| 860 unittest.group("obj-schema-GetOobConfirmationCodeResponse", () { |
| 861 unittest.test("to-json--from-json", () { |
| 862 var o = buildGetOobConfirmationCodeResponse(); |
| 863 var od = new api.GetOobConfirmationCodeResponse.fromJson(o.toJson()); |
| 864 checkGetOobConfirmationCodeResponse(od); |
| 865 }); |
| 866 }); |
| 867 |
| 868 |
| 869 unittest.group("obj-schema-IdentitytoolkitRelyingpartyCreateAuthUriRequest", (
) { |
| 870 unittest.test("to-json--from-json", () { |
| 871 var o = buildIdentitytoolkitRelyingpartyCreateAuthUriRequest(); |
| 872 var od = new api.IdentitytoolkitRelyingpartyCreateAuthUriRequest.fromJson(
o.toJson()); |
| 873 checkIdentitytoolkitRelyingpartyCreateAuthUriRequest(od); |
| 874 }); |
| 875 }); |
| 876 |
| 877 |
| 878 unittest.group("obj-schema-IdentitytoolkitRelyingpartyDeleteAccountRequest", (
) { |
| 879 unittest.test("to-json--from-json", () { |
| 880 var o = buildIdentitytoolkitRelyingpartyDeleteAccountRequest(); |
| 881 var od = new api.IdentitytoolkitRelyingpartyDeleteAccountRequest.fromJson(
o.toJson()); |
| 882 checkIdentitytoolkitRelyingpartyDeleteAccountRequest(od); |
| 883 }); |
| 884 }); |
| 885 |
| 886 |
| 887 unittest.group("obj-schema-IdentitytoolkitRelyingpartyDownloadAccountRequest",
() { |
| 888 unittest.test("to-json--from-json", () { |
| 889 var o = buildIdentitytoolkitRelyingpartyDownloadAccountRequest(); |
| 890 var od = new api.IdentitytoolkitRelyingpartyDownloadAccountRequest.fromJso
n(o.toJson()); |
| 891 checkIdentitytoolkitRelyingpartyDownloadAccountRequest(od); |
| 892 }); |
| 893 }); |
| 894 |
| 895 |
| 896 unittest.group("obj-schema-IdentitytoolkitRelyingpartyGetAccountInfoRequest",
() { |
| 897 unittest.test("to-json--from-json", () { |
| 898 var o = buildIdentitytoolkitRelyingpartyGetAccountInfoRequest(); |
| 899 var od = new api.IdentitytoolkitRelyingpartyGetAccountInfoRequest.fromJson
(o.toJson()); |
| 900 checkIdentitytoolkitRelyingpartyGetAccountInfoRequest(od); |
| 901 }); |
| 902 }); |
| 903 |
| 904 |
| 905 unittest.group("obj-schema-IdentitytoolkitRelyingpartyGetPublicKeysResponse",
() { |
| 906 unittest.test("to-json--from-json", () { |
| 907 var o = buildIdentitytoolkitRelyingpartyGetPublicKeysResponse(); |
| 908 var od = new api.IdentitytoolkitRelyingpartyGetPublicKeysResponse.fromJson
(o.toJson()); |
| 909 checkIdentitytoolkitRelyingpartyGetPublicKeysResponse(od); |
| 910 }); |
| 911 }); |
| 912 |
| 913 |
| 914 unittest.group("obj-schema-IdentitytoolkitRelyingpartyResetPasswordRequest", (
) { |
| 915 unittest.test("to-json--from-json", () { |
| 916 var o = buildIdentitytoolkitRelyingpartyResetPasswordRequest(); |
| 917 var od = new api.IdentitytoolkitRelyingpartyResetPasswordRequest.fromJson(
o.toJson()); |
| 918 checkIdentitytoolkitRelyingpartyResetPasswordRequest(od); |
| 919 }); |
| 920 }); |
| 921 |
| 922 |
| 923 unittest.group("obj-schema-IdentitytoolkitRelyingpartySetAccountInfoRequest",
() { |
| 924 unittest.test("to-json--from-json", () { |
| 925 var o = buildIdentitytoolkitRelyingpartySetAccountInfoRequest(); |
| 926 var od = new api.IdentitytoolkitRelyingpartySetAccountInfoRequest.fromJson
(o.toJson()); |
| 927 checkIdentitytoolkitRelyingpartySetAccountInfoRequest(od); |
| 928 }); |
| 929 }); |
| 930 |
| 931 |
| 932 unittest.group("obj-schema-IdentitytoolkitRelyingpartyUploadAccountRequest", (
) { |
| 933 unittest.test("to-json--from-json", () { |
| 934 var o = buildIdentitytoolkitRelyingpartyUploadAccountRequest(); |
| 935 var od = new api.IdentitytoolkitRelyingpartyUploadAccountRequest.fromJson(
o.toJson()); |
| 936 checkIdentitytoolkitRelyingpartyUploadAccountRequest(od); |
| 937 }); |
| 938 }); |
| 939 |
| 940 |
| 941 unittest.group("obj-schema-IdentitytoolkitRelyingpartyVerifyAssertionRequest",
() { |
| 942 unittest.test("to-json--from-json", () { |
| 943 var o = buildIdentitytoolkitRelyingpartyVerifyAssertionRequest(); |
| 944 var od = new api.IdentitytoolkitRelyingpartyVerifyAssertionRequest.fromJso
n(o.toJson()); |
| 945 checkIdentitytoolkitRelyingpartyVerifyAssertionRequest(od); |
| 946 }); |
| 947 }); |
| 948 |
| 949 |
| 950 unittest.group("obj-schema-IdentitytoolkitRelyingpartyVerifyPasswordRequest",
() { |
| 951 unittest.test("to-json--from-json", () { |
| 952 var o = buildIdentitytoolkitRelyingpartyVerifyPasswordRequest(); |
| 953 var od = new api.IdentitytoolkitRelyingpartyVerifyPasswordRequest.fromJson
(o.toJson()); |
| 954 checkIdentitytoolkitRelyingpartyVerifyPasswordRequest(od); |
| 955 }); |
| 956 }); |
| 957 |
| 958 |
| 959 unittest.group("obj-schema-Relyingparty", () { |
| 960 unittest.test("to-json--from-json", () { |
| 961 var o = buildRelyingparty(); |
| 962 var od = new api.Relyingparty.fromJson(o.toJson()); |
| 963 checkRelyingparty(od); |
| 964 }); |
| 965 }); |
| 966 |
| 967 |
| 968 unittest.group("obj-schema-ResetPasswordResponse", () { |
| 969 unittest.test("to-json--from-json", () { |
| 970 var o = buildResetPasswordResponse(); |
| 971 var od = new api.ResetPasswordResponse.fromJson(o.toJson()); |
| 972 checkResetPasswordResponse(od); |
| 973 }); |
| 974 }); |
| 975 |
| 976 |
| 977 unittest.group("obj-schema-SetAccountInfoResponseProviderUserInfo", () { |
| 978 unittest.test("to-json--from-json", () { |
| 979 var o = buildSetAccountInfoResponseProviderUserInfo(); |
| 980 var od = new api.SetAccountInfoResponseProviderUserInfo.fromJson(o.toJson(
)); |
| 981 checkSetAccountInfoResponseProviderUserInfo(od); |
| 982 }); |
| 983 }); |
| 984 |
| 985 |
| 986 unittest.group("obj-schema-SetAccountInfoResponse", () { |
| 987 unittest.test("to-json--from-json", () { |
| 988 var o = buildSetAccountInfoResponse(); |
| 989 var od = new api.SetAccountInfoResponse.fromJson(o.toJson()); |
| 990 checkSetAccountInfoResponse(od); |
| 991 }); |
| 992 }); |
| 993 |
| 994 |
| 995 unittest.group("obj-schema-UploadAccountResponseError", () { |
| 996 unittest.test("to-json--from-json", () { |
| 997 var o = buildUploadAccountResponseError(); |
| 998 var od = new api.UploadAccountResponseError.fromJson(o.toJson()); |
| 999 checkUploadAccountResponseError(od); |
| 1000 }); |
| 1001 }); |
| 1002 |
| 1003 |
| 1004 unittest.group("obj-schema-UploadAccountResponse", () { |
| 1005 unittest.test("to-json--from-json", () { |
| 1006 var o = buildUploadAccountResponse(); |
| 1007 var od = new api.UploadAccountResponse.fromJson(o.toJson()); |
| 1008 checkUploadAccountResponse(od); |
| 1009 }); |
| 1010 }); |
| 1011 |
| 1012 |
| 1013 unittest.group("obj-schema-UserInfoProviderUserInfo", () { |
| 1014 unittest.test("to-json--from-json", () { |
| 1015 var o = buildUserInfoProviderUserInfo(); |
| 1016 var od = new api.UserInfoProviderUserInfo.fromJson(o.toJson()); |
| 1017 checkUserInfoProviderUserInfo(od); |
| 1018 }); |
| 1019 }); |
| 1020 |
| 1021 |
| 1022 unittest.group("obj-schema-UserInfo", () { |
| 1023 unittest.test("to-json--from-json", () { |
| 1024 var o = buildUserInfo(); |
| 1025 var od = new api.UserInfo.fromJson(o.toJson()); |
| 1026 checkUserInfo(od); |
| 1027 }); |
| 1028 }); |
| 1029 |
| 1030 |
| 1031 unittest.group("obj-schema-VerifyAssertionResponse", () { |
| 1032 unittest.test("to-json--from-json", () { |
| 1033 var o = buildVerifyAssertionResponse(); |
| 1034 var od = new api.VerifyAssertionResponse.fromJson(o.toJson()); |
| 1035 checkVerifyAssertionResponse(od); |
| 1036 }); |
| 1037 }); |
| 1038 |
| 1039 |
| 1040 unittest.group("obj-schema-VerifyPasswordResponse", () { |
| 1041 unittest.test("to-json--from-json", () { |
| 1042 var o = buildVerifyPasswordResponse(); |
| 1043 var od = new api.VerifyPasswordResponse.fromJson(o.toJson()); |
| 1044 checkVerifyPasswordResponse(od); |
| 1045 }); |
| 1046 }); |
| 1047 |
| 1048 |
| 1049 unittest.group("resource-RelyingpartyResourceApi", () { |
| 1050 unittest.test("method--createAuthUri", () { |
| 1051 |
| 1052 var mock = new common_test.HttpServerMock(); |
| 1053 api.RelyingpartyResourceApi res = new api.IdentitytoolkitApi(mock).relying
party; |
| 1054 var arg_request = buildIdentitytoolkitRelyingpartyCreateAuthUriRequest(); |
| 1055 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 1056 var obj = new api.IdentitytoolkitRelyingpartyCreateAuthUriRequest.fromJs
on(json); |
| 1057 checkIdentitytoolkitRelyingpartyCreateAuthUriRequest(obj); |
| 1058 |
| 1059 var path = (req.url).path; |
| 1060 var pathOffset = 0; |
| 1061 var index; |
| 1062 var subPart; |
| 1063 unittest.expect(path.substring(pathOffset, pathOffset + 33), unittest.eq
uals("/identitytoolkit/v3/relyingparty/")); |
| 1064 pathOffset += 33; |
| 1065 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("createAuthUri")); |
| 1066 pathOffset += 13; |
| 1067 |
| 1068 var query = (req.url).query; |
| 1069 var queryOffset = 0; |
| 1070 var queryMap = {}; |
| 1071 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 1072 parseBool(n) { |
| 1073 if (n == "true") return true; |
| 1074 if (n == "false") return false; |
| 1075 if (n == null) return null; |
| 1076 throw new core.ArgumentError("Invalid boolean: $n"); |
| 1077 } |
| 1078 if (query.length > 0) { |
| 1079 for (var part in query.split("&")) { |
| 1080 var keyvalue = part.split("="); |
| 1081 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 1082 } |
| 1083 } |
| 1084 |
| 1085 |
| 1086 var h = { |
| 1087 "content-type" : "application/json; charset=utf-8", |
| 1088 }; |
| 1089 var resp = convert.JSON.encode(buildCreateAuthUriResponse()); |
| 1090 return new async.Future.value(common_test.stringResponse(200, h, resp)); |
| 1091 }), true); |
| 1092 res.createAuthUri(arg_request).then(unittest.expectAsync(((api.CreateAuthU
riResponse response) { |
| 1093 checkCreateAuthUriResponse(response); |
| 1094 }))); |
| 1095 }); |
| 1096 |
| 1097 unittest.test("method--deleteAccount", () { |
| 1098 |
| 1099 var mock = new common_test.HttpServerMock(); |
| 1100 api.RelyingpartyResourceApi res = new api.IdentitytoolkitApi(mock).relying
party; |
| 1101 var arg_request = buildIdentitytoolkitRelyingpartyDeleteAccountRequest(); |
| 1102 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 1103 var obj = new api.IdentitytoolkitRelyingpartyDeleteAccountRequest.fromJs
on(json); |
| 1104 checkIdentitytoolkitRelyingpartyDeleteAccountRequest(obj); |
| 1105 |
| 1106 var path = (req.url).path; |
| 1107 var pathOffset = 0; |
| 1108 var index; |
| 1109 var subPart; |
| 1110 unittest.expect(path.substring(pathOffset, pathOffset + 33), unittest.eq
uals("/identitytoolkit/v3/relyingparty/")); |
| 1111 pathOffset += 33; |
| 1112 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("deleteAccount")); |
| 1113 pathOffset += 13; |
| 1114 |
| 1115 var query = (req.url).query; |
| 1116 var queryOffset = 0; |
| 1117 var queryMap = {}; |
| 1118 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 1119 parseBool(n) { |
| 1120 if (n == "true") return true; |
| 1121 if (n == "false") return false; |
| 1122 if (n == null) return null; |
| 1123 throw new core.ArgumentError("Invalid boolean: $n"); |
| 1124 } |
| 1125 if (query.length > 0) { |
| 1126 for (var part in query.split("&")) { |
| 1127 var keyvalue = part.split("="); |
| 1128 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 1129 } |
| 1130 } |
| 1131 |
| 1132 |
| 1133 var h = { |
| 1134 "content-type" : "application/json; charset=utf-8", |
| 1135 }; |
| 1136 var resp = convert.JSON.encode(buildDeleteAccountResponse()); |
| 1137 return new async.Future.value(common_test.stringResponse(200, h, resp)); |
| 1138 }), true); |
| 1139 res.deleteAccount(arg_request).then(unittest.expectAsync(((api.DeleteAccou
ntResponse response) { |
| 1140 checkDeleteAccountResponse(response); |
| 1141 }))); |
| 1142 }); |
| 1143 |
| 1144 unittest.test("method--downloadAccount", () { |
| 1145 |
| 1146 var mock = new common_test.HttpServerMock(); |
| 1147 api.RelyingpartyResourceApi res = new api.IdentitytoolkitApi(mock).relying
party; |
| 1148 var arg_request = buildIdentitytoolkitRelyingpartyDownloadAccountRequest()
; |
| 1149 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 1150 var obj = new api.IdentitytoolkitRelyingpartyDownloadAccountRequest.from
Json(json); |
| 1151 checkIdentitytoolkitRelyingpartyDownloadAccountRequest(obj); |
| 1152 |
| 1153 var path = (req.url).path; |
| 1154 var pathOffset = 0; |
| 1155 var index; |
| 1156 var subPart; |
| 1157 unittest.expect(path.substring(pathOffset, pathOffset + 33), unittest.eq
uals("/identitytoolkit/v3/relyingparty/")); |
| 1158 pathOffset += 33; |
| 1159 unittest.expect(path.substring(pathOffset, pathOffset + 15), unittest.eq
uals("downloadAccount")); |
| 1160 pathOffset += 15; |
| 1161 |
| 1162 var query = (req.url).query; |
| 1163 var queryOffset = 0; |
| 1164 var queryMap = {}; |
| 1165 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 1166 parseBool(n) { |
| 1167 if (n == "true") return true; |
| 1168 if (n == "false") return false; |
| 1169 if (n == null) return null; |
| 1170 throw new core.ArgumentError("Invalid boolean: $n"); |
| 1171 } |
| 1172 if (query.length > 0) { |
| 1173 for (var part in query.split("&")) { |
| 1174 var keyvalue = part.split("="); |
| 1175 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 1176 } |
| 1177 } |
| 1178 |
| 1179 |
| 1180 var h = { |
| 1181 "content-type" : "application/json; charset=utf-8", |
| 1182 }; |
| 1183 var resp = convert.JSON.encode(buildDownloadAccountResponse()); |
| 1184 return new async.Future.value(common_test.stringResponse(200, h, resp)); |
| 1185 }), true); |
| 1186 res.downloadAccount(arg_request).then(unittest.expectAsync(((api.DownloadA
ccountResponse response) { |
| 1187 checkDownloadAccountResponse(response); |
| 1188 }))); |
| 1189 }); |
| 1190 |
| 1191 unittest.test("method--getAccountInfo", () { |
| 1192 |
| 1193 var mock = new common_test.HttpServerMock(); |
| 1194 api.RelyingpartyResourceApi res = new api.IdentitytoolkitApi(mock).relying
party; |
| 1195 var arg_request = buildIdentitytoolkitRelyingpartyGetAccountInfoRequest(); |
| 1196 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 1197 var obj = new api.IdentitytoolkitRelyingpartyGetAccountInfoRequest.fromJ
son(json); |
| 1198 checkIdentitytoolkitRelyingpartyGetAccountInfoRequest(obj); |
| 1199 |
| 1200 var path = (req.url).path; |
| 1201 var pathOffset = 0; |
| 1202 var index; |
| 1203 var subPart; |
| 1204 unittest.expect(path.substring(pathOffset, pathOffset + 33), unittest.eq
uals("/identitytoolkit/v3/relyingparty/")); |
| 1205 pathOffset += 33; |
| 1206 unittest.expect(path.substring(pathOffset, pathOffset + 14), unittest.eq
uals("getAccountInfo")); |
| 1207 pathOffset += 14; |
| 1208 |
| 1209 var query = (req.url).query; |
| 1210 var queryOffset = 0; |
| 1211 var queryMap = {}; |
| 1212 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 1213 parseBool(n) { |
| 1214 if (n == "true") return true; |
| 1215 if (n == "false") return false; |
| 1216 if (n == null) return null; |
| 1217 throw new core.ArgumentError("Invalid boolean: $n"); |
| 1218 } |
| 1219 if (query.length > 0) { |
| 1220 for (var part in query.split("&")) { |
| 1221 var keyvalue = part.split("="); |
| 1222 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 1223 } |
| 1224 } |
| 1225 |
| 1226 |
| 1227 var h = { |
| 1228 "content-type" : "application/json; charset=utf-8", |
| 1229 }; |
| 1230 var resp = convert.JSON.encode(buildGetAccountInfoResponse()); |
| 1231 return new async.Future.value(common_test.stringResponse(200, h, resp)); |
| 1232 }), true); |
| 1233 res.getAccountInfo(arg_request).then(unittest.expectAsync(((api.GetAccount
InfoResponse response) { |
| 1234 checkGetAccountInfoResponse(response); |
| 1235 }))); |
| 1236 }); |
| 1237 |
| 1238 unittest.test("method--getOobConfirmationCode", () { |
| 1239 |
| 1240 var mock = new common_test.HttpServerMock(); |
| 1241 api.RelyingpartyResourceApi res = new api.IdentitytoolkitApi(mock).relying
party; |
| 1242 var arg_request = buildRelyingparty(); |
| 1243 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 1244 var obj = new api.Relyingparty.fromJson(json); |
| 1245 checkRelyingparty(obj); |
| 1246 |
| 1247 var path = (req.url).path; |
| 1248 var pathOffset = 0; |
| 1249 var index; |
| 1250 var subPart; |
| 1251 unittest.expect(path.substring(pathOffset, pathOffset + 33), unittest.eq
uals("/identitytoolkit/v3/relyingparty/")); |
| 1252 pathOffset += 33; |
| 1253 unittest.expect(path.substring(pathOffset, pathOffset + 22), unittest.eq
uals("getOobConfirmationCode")); |
| 1254 pathOffset += 22; |
| 1255 |
| 1256 var query = (req.url).query; |
| 1257 var queryOffset = 0; |
| 1258 var queryMap = {}; |
| 1259 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 1260 parseBool(n) { |
| 1261 if (n == "true") return true; |
| 1262 if (n == "false") return false; |
| 1263 if (n == null) return null; |
| 1264 throw new core.ArgumentError("Invalid boolean: $n"); |
| 1265 } |
| 1266 if (query.length > 0) { |
| 1267 for (var part in query.split("&")) { |
| 1268 var keyvalue = part.split("="); |
| 1269 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 1270 } |
| 1271 } |
| 1272 |
| 1273 |
| 1274 var h = { |
| 1275 "content-type" : "application/json; charset=utf-8", |
| 1276 }; |
| 1277 var resp = convert.JSON.encode(buildGetOobConfirmationCodeResponse()); |
| 1278 return new async.Future.value(common_test.stringResponse(200, h, resp)); |
| 1279 }), true); |
| 1280 res.getOobConfirmationCode(arg_request).then(unittest.expectAsync(((api.Ge
tOobConfirmationCodeResponse response) { |
| 1281 checkGetOobConfirmationCodeResponse(response); |
| 1282 }))); |
| 1283 }); |
| 1284 |
| 1285 unittest.test("method--getPublicKeys", () { |
| 1286 |
| 1287 var mock = new common_test.HttpServerMock(); |
| 1288 api.RelyingpartyResourceApi res = new api.IdentitytoolkitApi(mock).relying
party; |
| 1289 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 1290 var path = (req.url).path; |
| 1291 var pathOffset = 0; |
| 1292 var index; |
| 1293 var subPart; |
| 1294 unittest.expect(path.substring(pathOffset, pathOffset + 33), unittest.eq
uals("/identitytoolkit/v3/relyingparty/")); |
| 1295 pathOffset += 33; |
| 1296 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("publicKeys")); |
| 1297 pathOffset += 10; |
| 1298 |
| 1299 var query = (req.url).query; |
| 1300 var queryOffset = 0; |
| 1301 var queryMap = {}; |
| 1302 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 1303 parseBool(n) { |
| 1304 if (n == "true") return true; |
| 1305 if (n == "false") return false; |
| 1306 if (n == null) return null; |
| 1307 throw new core.ArgumentError("Invalid boolean: $n"); |
| 1308 } |
| 1309 if (query.length > 0) { |
| 1310 for (var part in query.split("&")) { |
| 1311 var keyvalue = part.split("="); |
| 1312 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 1313 } |
| 1314 } |
| 1315 |
| 1316 |
| 1317 var h = { |
| 1318 "content-type" : "application/json; charset=utf-8", |
| 1319 }; |
| 1320 var resp = convert.JSON.encode(buildIdentitytoolkitRelyingpartyGetPublic
KeysResponse()); |
| 1321 return new async.Future.value(common_test.stringResponse(200, h, resp)); |
| 1322 }), true); |
| 1323 res.getPublicKeys().then(unittest.expectAsync(((api.IdentitytoolkitRelying
partyGetPublicKeysResponse response) { |
| 1324 checkIdentitytoolkitRelyingpartyGetPublicKeysResponse(response); |
| 1325 }))); |
| 1326 }); |
| 1327 |
| 1328 unittest.test("method--resetPassword", () { |
| 1329 |
| 1330 var mock = new common_test.HttpServerMock(); |
| 1331 api.RelyingpartyResourceApi res = new api.IdentitytoolkitApi(mock).relying
party; |
| 1332 var arg_request = buildIdentitytoolkitRelyingpartyResetPasswordRequest(); |
| 1333 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 1334 var obj = new api.IdentitytoolkitRelyingpartyResetPasswordRequest.fromJs
on(json); |
| 1335 checkIdentitytoolkitRelyingpartyResetPasswordRequest(obj); |
| 1336 |
| 1337 var path = (req.url).path; |
| 1338 var pathOffset = 0; |
| 1339 var index; |
| 1340 var subPart; |
| 1341 unittest.expect(path.substring(pathOffset, pathOffset + 33), unittest.eq
uals("/identitytoolkit/v3/relyingparty/")); |
| 1342 pathOffset += 33; |
| 1343 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("resetPassword")); |
| 1344 pathOffset += 13; |
| 1345 |
| 1346 var query = (req.url).query; |
| 1347 var queryOffset = 0; |
| 1348 var queryMap = {}; |
| 1349 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 1350 parseBool(n) { |
| 1351 if (n == "true") return true; |
| 1352 if (n == "false") return false; |
| 1353 if (n == null) return null; |
| 1354 throw new core.ArgumentError("Invalid boolean: $n"); |
| 1355 } |
| 1356 if (query.length > 0) { |
| 1357 for (var part in query.split("&")) { |
| 1358 var keyvalue = part.split("="); |
| 1359 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 1360 } |
| 1361 } |
| 1362 |
| 1363 |
| 1364 var h = { |
| 1365 "content-type" : "application/json; charset=utf-8", |
| 1366 }; |
| 1367 var resp = convert.JSON.encode(buildResetPasswordResponse()); |
| 1368 return new async.Future.value(common_test.stringResponse(200, h, resp)); |
| 1369 }), true); |
| 1370 res.resetPassword(arg_request).then(unittest.expectAsync(((api.ResetPasswo
rdResponse response) { |
| 1371 checkResetPasswordResponse(response); |
| 1372 }))); |
| 1373 }); |
| 1374 |
| 1375 unittest.test("method--setAccountInfo", () { |
| 1376 |
| 1377 var mock = new common_test.HttpServerMock(); |
| 1378 api.RelyingpartyResourceApi res = new api.IdentitytoolkitApi(mock).relying
party; |
| 1379 var arg_request = buildIdentitytoolkitRelyingpartySetAccountInfoRequest(); |
| 1380 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 1381 var obj = new api.IdentitytoolkitRelyingpartySetAccountInfoRequest.fromJ
son(json); |
| 1382 checkIdentitytoolkitRelyingpartySetAccountInfoRequest(obj); |
| 1383 |
| 1384 var path = (req.url).path; |
| 1385 var pathOffset = 0; |
| 1386 var index; |
| 1387 var subPart; |
| 1388 unittest.expect(path.substring(pathOffset, pathOffset + 33), unittest.eq
uals("/identitytoolkit/v3/relyingparty/")); |
| 1389 pathOffset += 33; |
| 1390 unittest.expect(path.substring(pathOffset, pathOffset + 14), unittest.eq
uals("setAccountInfo")); |
| 1391 pathOffset += 14; |
| 1392 |
| 1393 var query = (req.url).query; |
| 1394 var queryOffset = 0; |
| 1395 var queryMap = {}; |
| 1396 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 1397 parseBool(n) { |
| 1398 if (n == "true") return true; |
| 1399 if (n == "false") return false; |
| 1400 if (n == null) return null; |
| 1401 throw new core.ArgumentError("Invalid boolean: $n"); |
| 1402 } |
| 1403 if (query.length > 0) { |
| 1404 for (var part in query.split("&")) { |
| 1405 var keyvalue = part.split("="); |
| 1406 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 1407 } |
| 1408 } |
| 1409 |
| 1410 |
| 1411 var h = { |
| 1412 "content-type" : "application/json; charset=utf-8", |
| 1413 }; |
| 1414 var resp = convert.JSON.encode(buildSetAccountInfoResponse()); |
| 1415 return new async.Future.value(common_test.stringResponse(200, h, resp)); |
| 1416 }), true); |
| 1417 res.setAccountInfo(arg_request).then(unittest.expectAsync(((api.SetAccount
InfoResponse response) { |
| 1418 checkSetAccountInfoResponse(response); |
| 1419 }))); |
| 1420 }); |
| 1421 |
| 1422 unittest.test("method--uploadAccount", () { |
| 1423 |
| 1424 var mock = new common_test.HttpServerMock(); |
| 1425 api.RelyingpartyResourceApi res = new api.IdentitytoolkitApi(mock).relying
party; |
| 1426 var arg_request = buildIdentitytoolkitRelyingpartyUploadAccountRequest(); |
| 1427 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 1428 var obj = new api.IdentitytoolkitRelyingpartyUploadAccountRequest.fromJs
on(json); |
| 1429 checkIdentitytoolkitRelyingpartyUploadAccountRequest(obj); |
| 1430 |
| 1431 var path = (req.url).path; |
| 1432 var pathOffset = 0; |
| 1433 var index; |
| 1434 var subPart; |
| 1435 unittest.expect(path.substring(pathOffset, pathOffset + 33), unittest.eq
uals("/identitytoolkit/v3/relyingparty/")); |
| 1436 pathOffset += 33; |
| 1437 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("uploadAccount")); |
| 1438 pathOffset += 13; |
| 1439 |
| 1440 var query = (req.url).query; |
| 1441 var queryOffset = 0; |
| 1442 var queryMap = {}; |
| 1443 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 1444 parseBool(n) { |
| 1445 if (n == "true") return true; |
| 1446 if (n == "false") return false; |
| 1447 if (n == null) return null; |
| 1448 throw new core.ArgumentError("Invalid boolean: $n"); |
| 1449 } |
| 1450 if (query.length > 0) { |
| 1451 for (var part in query.split("&")) { |
| 1452 var keyvalue = part.split("="); |
| 1453 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 1454 } |
| 1455 } |
| 1456 |
| 1457 |
| 1458 var h = { |
| 1459 "content-type" : "application/json; charset=utf-8", |
| 1460 }; |
| 1461 var resp = convert.JSON.encode(buildUploadAccountResponse()); |
| 1462 return new async.Future.value(common_test.stringResponse(200, h, resp)); |
| 1463 }), true); |
| 1464 res.uploadAccount(arg_request).then(unittest.expectAsync(((api.UploadAccou
ntResponse response) { |
| 1465 checkUploadAccountResponse(response); |
| 1466 }))); |
| 1467 }); |
| 1468 |
| 1469 unittest.test("method--verifyAssertion", () { |
| 1470 |
| 1471 var mock = new common_test.HttpServerMock(); |
| 1472 api.RelyingpartyResourceApi res = new api.IdentitytoolkitApi(mock).relying
party; |
| 1473 var arg_request = buildIdentitytoolkitRelyingpartyVerifyAssertionRequest()
; |
| 1474 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 1475 var obj = new api.IdentitytoolkitRelyingpartyVerifyAssertionRequest.from
Json(json); |
| 1476 checkIdentitytoolkitRelyingpartyVerifyAssertionRequest(obj); |
| 1477 |
| 1478 var path = (req.url).path; |
| 1479 var pathOffset = 0; |
| 1480 var index; |
| 1481 var subPart; |
| 1482 unittest.expect(path.substring(pathOffset, pathOffset + 33), unittest.eq
uals("/identitytoolkit/v3/relyingparty/")); |
| 1483 pathOffset += 33; |
| 1484 unittest.expect(path.substring(pathOffset, pathOffset + 15), unittest.eq
uals("verifyAssertion")); |
| 1485 pathOffset += 15; |
| 1486 |
| 1487 var query = (req.url).query; |
| 1488 var queryOffset = 0; |
| 1489 var queryMap = {}; |
| 1490 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 1491 parseBool(n) { |
| 1492 if (n == "true") return true; |
| 1493 if (n == "false") return false; |
| 1494 if (n == null) return null; |
| 1495 throw new core.ArgumentError("Invalid boolean: $n"); |
| 1496 } |
| 1497 if (query.length > 0) { |
| 1498 for (var part in query.split("&")) { |
| 1499 var keyvalue = part.split("="); |
| 1500 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 1501 } |
| 1502 } |
| 1503 |
| 1504 |
| 1505 var h = { |
| 1506 "content-type" : "application/json; charset=utf-8", |
| 1507 }; |
| 1508 var resp = convert.JSON.encode(buildVerifyAssertionResponse()); |
| 1509 return new async.Future.value(common_test.stringResponse(200, h, resp)); |
| 1510 }), true); |
| 1511 res.verifyAssertion(arg_request).then(unittest.expectAsync(((api.VerifyAss
ertionResponse response) { |
| 1512 checkVerifyAssertionResponse(response); |
| 1513 }))); |
| 1514 }); |
| 1515 |
| 1516 unittest.test("method--verifyPassword", () { |
| 1517 |
| 1518 var mock = new common_test.HttpServerMock(); |
| 1519 api.RelyingpartyResourceApi res = new api.IdentitytoolkitApi(mock).relying
party; |
| 1520 var arg_request = buildIdentitytoolkitRelyingpartyVerifyPasswordRequest(); |
| 1521 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 1522 var obj = new api.IdentitytoolkitRelyingpartyVerifyPasswordRequest.fromJ
son(json); |
| 1523 checkIdentitytoolkitRelyingpartyVerifyPasswordRequest(obj); |
| 1524 |
| 1525 var path = (req.url).path; |
| 1526 var pathOffset = 0; |
| 1527 var index; |
| 1528 var subPart; |
| 1529 unittest.expect(path.substring(pathOffset, pathOffset + 33), unittest.eq
uals("/identitytoolkit/v3/relyingparty/")); |
| 1530 pathOffset += 33; |
| 1531 unittest.expect(path.substring(pathOffset, pathOffset + 14), unittest.eq
uals("verifyPassword")); |
| 1532 pathOffset += 14; |
| 1533 |
| 1534 var query = (req.url).query; |
| 1535 var queryOffset = 0; |
| 1536 var queryMap = {}; |
| 1537 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 1538 parseBool(n) { |
| 1539 if (n == "true") return true; |
| 1540 if (n == "false") return false; |
| 1541 if (n == null) return null; |
| 1542 throw new core.ArgumentError("Invalid boolean: $n"); |
| 1543 } |
| 1544 if (query.length > 0) { |
| 1545 for (var part in query.split("&")) { |
| 1546 var keyvalue = part.split("="); |
| 1547 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 1548 } |
| 1549 } |
| 1550 |
| 1551 |
| 1552 var h = { |
| 1553 "content-type" : "application/json; charset=utf-8", |
| 1554 }; |
| 1555 var resp = convert.JSON.encode(buildVerifyPasswordResponse()); |
| 1556 return new async.Future.value(common_test.stringResponse(200, h, resp)); |
| 1557 }), true); |
| 1558 res.verifyPassword(arg_request).then(unittest.expectAsync(((api.VerifyPass
wordResponse response) { |
| 1559 checkVerifyPasswordResponse(response); |
| 1560 }))); |
| 1561 }); |
| 1562 |
| 1563 }); |
| 1564 |
| 1565 |
| 1566 } |
| 1567 |
OLD | NEW |