| OLD | NEW |
| 1 library googleapis.cloudresourcemanager.v1.test; | 1 library googleapis.cloudresourcemanager.v1.test; |
| 2 | 2 |
| 3 import "dart:core" as core; | 3 import "dart:core" as core; |
| 4 import "dart:collection" as collection; | 4 import "dart:collection" as collection; |
| 5 import "dart:async" as async; | 5 import "dart:async" as async; |
| 6 import "dart:convert" as convert; | 6 import "dart:convert" as convert; |
| 7 | 7 |
| 8 import 'package:http/http.dart' as http; | 8 import 'package:http/http.dart' as http; |
| 9 import 'package:http/testing.dart' as http_testing; | 9 import 'package:http/testing.dart' as http_testing; |
| 10 import 'package:unittest/unittest.dart' as unittest; | 10 import 'package:test/test.dart' as unittest; |
| 11 | 11 |
| 12 import 'package:googleapis/cloudresourcemanager/v1.dart' as api; | 12 import 'package:googleapis/cloudresourcemanager/v1.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 buildCounterAncestor = 0; | 54 core.int buildCounterAncestor = 0; |
| 55 buildAncestor() { | 55 buildAncestor() { |
| 56 var o = new api.Ancestor(); | 56 var o = new api.Ancestor(); |
| 57 buildCounterAncestor++; | 57 buildCounterAncestor++; |
| 58 if (buildCounterAncestor < 3) { | 58 if (buildCounterAncestor < 3) { |
| 59 o.resourceId = buildResourceId(); | 59 o.resourceId = buildResourceId(); |
| 60 } | 60 } |
| 61 buildCounterAncestor--; | 61 buildCounterAncestor--; |
| 62 return o; | 62 return o; |
| 63 } | 63 } |
| 64 | 64 |
| 65 checkAncestor(api.Ancestor o) { | 65 checkAncestor(api.Ancestor o) { |
| 66 buildCounterAncestor++; | 66 buildCounterAncestor++; |
| 67 if (buildCounterAncestor < 3) { | 67 if (buildCounterAncestor < 3) { |
| 68 checkResourceId(o.resourceId); | 68 checkResourceId(o.resourceId); |
| 69 } | 69 } |
| 70 buildCounterAncestor--; | 70 buildCounterAncestor--; |
| 71 } | 71 } |
| 72 | 72 |
| 73 buildUnnamed1689() { | 73 buildUnnamed1699() { |
| 74 var o = new core.List<api.AuditLogConfig>(); | 74 var o = new core.List<api.AuditLogConfig>(); |
| 75 o.add(buildAuditLogConfig()); | 75 o.add(buildAuditLogConfig()); |
| 76 o.add(buildAuditLogConfig()); | 76 o.add(buildAuditLogConfig()); |
| 77 return o; | 77 return o; |
| 78 } | 78 } |
| 79 | 79 |
| 80 checkUnnamed1689(core.List<api.AuditLogConfig> o) { | 80 checkUnnamed1699(core.List<api.AuditLogConfig> o) { |
| 81 unittest.expect(o, unittest.hasLength(2)); | 81 unittest.expect(o, unittest.hasLength(2)); |
| 82 checkAuditLogConfig(o[0]); | 82 checkAuditLogConfig(o[0]); |
| 83 checkAuditLogConfig(o[1]); | 83 checkAuditLogConfig(o[1]); |
| 84 } | 84 } |
| 85 | 85 |
| 86 core.int buildCounterAuditConfig = 0; | 86 core.int buildCounterAuditConfig = 0; |
| 87 buildAuditConfig() { | 87 buildAuditConfig() { |
| 88 var o = new api.AuditConfig(); | 88 var o = new api.AuditConfig(); |
| 89 buildCounterAuditConfig++; | 89 buildCounterAuditConfig++; |
| 90 if (buildCounterAuditConfig < 3) { | 90 if (buildCounterAuditConfig < 3) { |
| 91 o.auditLogConfigs = buildUnnamed1689(); | 91 o.auditLogConfigs = buildUnnamed1699(); |
| 92 o.service = "foo"; | 92 o.service = "foo"; |
| 93 } | 93 } |
| 94 buildCounterAuditConfig--; | 94 buildCounterAuditConfig--; |
| 95 return o; | 95 return o; |
| 96 } | 96 } |
| 97 | 97 |
| 98 checkAuditConfig(api.AuditConfig o) { | 98 checkAuditConfig(api.AuditConfig o) { |
| 99 buildCounterAuditConfig++; | 99 buildCounterAuditConfig++; |
| 100 if (buildCounterAuditConfig < 3) { | 100 if (buildCounterAuditConfig < 3) { |
| 101 checkUnnamed1689(o.auditLogConfigs); | 101 checkUnnamed1699(o.auditLogConfigs); |
| 102 unittest.expect(o.service, unittest.equals('foo')); | 102 unittest.expect(o.service, unittest.equals('foo')); |
| 103 } | 103 } |
| 104 buildCounterAuditConfig--; | 104 buildCounterAuditConfig--; |
| 105 } | 105 } |
| 106 | 106 |
| 107 buildUnnamed1690() { | 107 buildUnnamed1700() { |
| 108 var o = new core.List<core.String>(); | 108 var o = new core.List<core.String>(); |
| 109 o.add("foo"); | 109 o.add("foo"); |
| 110 o.add("foo"); | 110 o.add("foo"); |
| 111 return o; | 111 return o; |
| 112 } | 112 } |
| 113 | 113 |
| 114 checkUnnamed1690(core.List<core.String> o) { | 114 checkUnnamed1700(core.List<core.String> o) { |
| 115 unittest.expect(o, unittest.hasLength(2)); | 115 unittest.expect(o, unittest.hasLength(2)); |
| 116 unittest.expect(o[0], unittest.equals('foo')); | 116 unittest.expect(o[0], unittest.equals('foo')); |
| 117 unittest.expect(o[1], unittest.equals('foo')); | 117 unittest.expect(o[1], unittest.equals('foo')); |
| 118 } | 118 } |
| 119 | 119 |
| 120 core.int buildCounterAuditLogConfig = 0; | 120 core.int buildCounterAuditLogConfig = 0; |
| 121 buildAuditLogConfig() { | 121 buildAuditLogConfig() { |
| 122 var o = new api.AuditLogConfig(); | 122 var o = new api.AuditLogConfig(); |
| 123 buildCounterAuditLogConfig++; | 123 buildCounterAuditLogConfig++; |
| 124 if (buildCounterAuditLogConfig < 3) { | 124 if (buildCounterAuditLogConfig < 3) { |
| 125 o.exemptedMembers = buildUnnamed1690(); | 125 o.exemptedMembers = buildUnnamed1700(); |
| 126 o.logType = "foo"; | 126 o.logType = "foo"; |
| 127 } | 127 } |
| 128 buildCounterAuditLogConfig--; | 128 buildCounterAuditLogConfig--; |
| 129 return o; | 129 return o; |
| 130 } | 130 } |
| 131 | 131 |
| 132 checkAuditLogConfig(api.AuditLogConfig o) { | 132 checkAuditLogConfig(api.AuditLogConfig o) { |
| 133 buildCounterAuditLogConfig++; | 133 buildCounterAuditLogConfig++; |
| 134 if (buildCounterAuditLogConfig < 3) { | 134 if (buildCounterAuditLogConfig < 3) { |
| 135 checkUnnamed1690(o.exemptedMembers); | 135 checkUnnamed1700(o.exemptedMembers); |
| 136 unittest.expect(o.logType, unittest.equals('foo')); | 136 unittest.expect(o.logType, unittest.equals('foo')); |
| 137 } | 137 } |
| 138 buildCounterAuditLogConfig--; | 138 buildCounterAuditLogConfig--; |
| 139 } | 139 } |
| 140 | 140 |
| 141 buildUnnamed1691() { | 141 buildUnnamed1701() { |
| 142 var o = new core.List<core.String>(); | 142 var o = new core.List<core.String>(); |
| 143 o.add("foo"); | 143 o.add("foo"); |
| 144 o.add("foo"); | 144 o.add("foo"); |
| 145 return o; | 145 return o; |
| 146 } | 146 } |
| 147 | 147 |
| 148 checkUnnamed1691(core.List<core.String> o) { | 148 checkUnnamed1701(core.List<core.String> o) { |
| 149 unittest.expect(o, unittest.hasLength(2)); | 149 unittest.expect(o, unittest.hasLength(2)); |
| 150 unittest.expect(o[0], unittest.equals('foo')); | 150 unittest.expect(o[0], unittest.equals('foo')); |
| 151 unittest.expect(o[1], unittest.equals('foo')); | 151 unittest.expect(o[1], unittest.equals('foo')); |
| 152 } | 152 } |
| 153 | 153 |
| 154 core.int buildCounterBinding = 0; | 154 core.int buildCounterBinding = 0; |
| 155 buildBinding() { | 155 buildBinding() { |
| 156 var o = new api.Binding(); | 156 var o = new api.Binding(); |
| 157 buildCounterBinding++; | 157 buildCounterBinding++; |
| 158 if (buildCounterBinding < 3) { | 158 if (buildCounterBinding < 3) { |
| 159 o.members = buildUnnamed1691(); | 159 o.members = buildUnnamed1701(); |
| 160 o.role = "foo"; | 160 o.role = "foo"; |
| 161 } | 161 } |
| 162 buildCounterBinding--; | 162 buildCounterBinding--; |
| 163 return o; | 163 return o; |
| 164 } | 164 } |
| 165 | 165 |
| 166 checkBinding(api.Binding o) { | 166 checkBinding(api.Binding o) { |
| 167 buildCounterBinding++; | 167 buildCounterBinding++; |
| 168 if (buildCounterBinding < 3) { | 168 if (buildCounterBinding < 3) { |
| 169 checkUnnamed1691(o.members); | 169 checkUnnamed1701(o.members); |
| 170 unittest.expect(o.role, unittest.equals('foo')); | 170 unittest.expect(o.role, unittest.equals('foo')); |
| 171 } | 171 } |
| 172 buildCounterBinding--; | 172 buildCounterBinding--; |
| 173 } | 173 } |
| 174 | 174 |
| 175 core.int buildCounterBooleanConstraint = 0; | 175 core.int buildCounterBooleanConstraint = 0; |
| 176 buildBooleanConstraint() { | 176 buildBooleanConstraint() { |
| 177 var o = new api.BooleanConstraint(); | 177 var o = new api.BooleanConstraint(); |
| 178 buildCounterBooleanConstraint++; | 178 buildCounterBooleanConstraint++; |
| 179 if (buildCounterBooleanConstraint < 3) { | 179 if (buildCounterBooleanConstraint < 3) { |
| (...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 331 return o; | 331 return o; |
| 332 } | 332 } |
| 333 | 333 |
| 334 checkGetAncestryRequest(api.GetAncestryRequest o) { | 334 checkGetAncestryRequest(api.GetAncestryRequest o) { |
| 335 buildCounterGetAncestryRequest++; | 335 buildCounterGetAncestryRequest++; |
| 336 if (buildCounterGetAncestryRequest < 3) { | 336 if (buildCounterGetAncestryRequest < 3) { |
| 337 } | 337 } |
| 338 buildCounterGetAncestryRequest--; | 338 buildCounterGetAncestryRequest--; |
| 339 } | 339 } |
| 340 | 340 |
| 341 buildUnnamed1692() { | 341 buildUnnamed1702() { |
| 342 var o = new core.List<api.Ancestor>(); | 342 var o = new core.List<api.Ancestor>(); |
| 343 o.add(buildAncestor()); | 343 o.add(buildAncestor()); |
| 344 o.add(buildAncestor()); | 344 o.add(buildAncestor()); |
| 345 return o; | 345 return o; |
| 346 } | 346 } |
| 347 | 347 |
| 348 checkUnnamed1692(core.List<api.Ancestor> o) { | 348 checkUnnamed1702(core.List<api.Ancestor> o) { |
| 349 unittest.expect(o, unittest.hasLength(2)); | 349 unittest.expect(o, unittest.hasLength(2)); |
| 350 checkAncestor(o[0]); | 350 checkAncestor(o[0]); |
| 351 checkAncestor(o[1]); | 351 checkAncestor(o[1]); |
| 352 } | 352 } |
| 353 | 353 |
| 354 core.int buildCounterGetAncestryResponse = 0; | 354 core.int buildCounterGetAncestryResponse = 0; |
| 355 buildGetAncestryResponse() { | 355 buildGetAncestryResponse() { |
| 356 var o = new api.GetAncestryResponse(); | 356 var o = new api.GetAncestryResponse(); |
| 357 buildCounterGetAncestryResponse++; | 357 buildCounterGetAncestryResponse++; |
| 358 if (buildCounterGetAncestryResponse < 3) { | 358 if (buildCounterGetAncestryResponse < 3) { |
| 359 o.ancestor = buildUnnamed1692(); | 359 o.ancestor = buildUnnamed1702(); |
| 360 } | 360 } |
| 361 buildCounterGetAncestryResponse--; | 361 buildCounterGetAncestryResponse--; |
| 362 return o; | 362 return o; |
| 363 } | 363 } |
| 364 | 364 |
| 365 checkGetAncestryResponse(api.GetAncestryResponse o) { | 365 checkGetAncestryResponse(api.GetAncestryResponse o) { |
| 366 buildCounterGetAncestryResponse++; | 366 buildCounterGetAncestryResponse++; |
| 367 if (buildCounterGetAncestryResponse < 3) { | 367 if (buildCounterGetAncestryResponse < 3) { |
| 368 checkUnnamed1692(o.ancestor); | 368 checkUnnamed1702(o.ancestor); |
| 369 } | 369 } |
| 370 buildCounterGetAncestryResponse--; | 370 buildCounterGetAncestryResponse--; |
| 371 } | 371 } |
| 372 | 372 |
| 373 core.int buildCounterGetEffectiveOrgPolicyRequest = 0; | 373 core.int buildCounterGetEffectiveOrgPolicyRequest = 0; |
| 374 buildGetEffectiveOrgPolicyRequest() { | 374 buildGetEffectiveOrgPolicyRequest() { |
| 375 var o = new api.GetEffectiveOrgPolicyRequest(); | 375 var o = new api.GetEffectiveOrgPolicyRequest(); |
| 376 buildCounterGetEffectiveOrgPolicyRequest++; | 376 buildCounterGetEffectiveOrgPolicyRequest++; |
| 377 if (buildCounterGetEffectiveOrgPolicyRequest < 3) { | 377 if (buildCounterGetEffectiveOrgPolicyRequest < 3) { |
| 378 o.constraint = "foo"; | 378 o.constraint = "foo"; |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 418 } | 418 } |
| 419 | 419 |
| 420 checkGetOrgPolicyRequest(api.GetOrgPolicyRequest o) { | 420 checkGetOrgPolicyRequest(api.GetOrgPolicyRequest o) { |
| 421 buildCounterGetOrgPolicyRequest++; | 421 buildCounterGetOrgPolicyRequest++; |
| 422 if (buildCounterGetOrgPolicyRequest < 3) { | 422 if (buildCounterGetOrgPolicyRequest < 3) { |
| 423 unittest.expect(o.constraint, unittest.equals('foo')); | 423 unittest.expect(o.constraint, unittest.equals('foo')); |
| 424 } | 424 } |
| 425 buildCounterGetOrgPolicyRequest--; | 425 buildCounterGetOrgPolicyRequest--; |
| 426 } | 426 } |
| 427 | 427 |
| 428 buildUnnamed1693() { | 428 buildUnnamed1703() { |
| 429 var o = new core.List<core.String>(); | 429 var o = new core.List<core.String>(); |
| 430 o.add("foo"); | 430 o.add("foo"); |
| 431 o.add("foo"); | 431 o.add("foo"); |
| 432 return o; | 432 return o; |
| 433 } | 433 } |
| 434 | 434 |
| 435 checkUnnamed1693(core.List<core.String> o) { | 435 checkUnnamed1703(core.List<core.String> o) { |
| 436 unittest.expect(o, unittest.hasLength(2)); | 436 unittest.expect(o, unittest.hasLength(2)); |
| 437 unittest.expect(o[0], unittest.equals('foo')); | 437 unittest.expect(o[0], unittest.equals('foo')); |
| 438 unittest.expect(o[1], unittest.equals('foo')); | 438 unittest.expect(o[1], unittest.equals('foo')); |
| 439 } | 439 } |
| 440 | 440 |
| 441 core.int buildCounterLien = 0; | 441 core.int buildCounterLien = 0; |
| 442 buildLien() { | 442 buildLien() { |
| 443 var o = new api.Lien(); | 443 var o = new api.Lien(); |
| 444 buildCounterLien++; | 444 buildCounterLien++; |
| 445 if (buildCounterLien < 3) { | 445 if (buildCounterLien < 3) { |
| 446 o.createTime = "foo"; | 446 o.createTime = "foo"; |
| 447 o.name = "foo"; | 447 o.name = "foo"; |
| 448 o.origin = "foo"; | 448 o.origin = "foo"; |
| 449 o.parent = "foo"; | 449 o.parent = "foo"; |
| 450 o.reason = "foo"; | 450 o.reason = "foo"; |
| 451 o.restrictions = buildUnnamed1693(); | 451 o.restrictions = buildUnnamed1703(); |
| 452 } | 452 } |
| 453 buildCounterLien--; | 453 buildCounterLien--; |
| 454 return o; | 454 return o; |
| 455 } | 455 } |
| 456 | 456 |
| 457 checkLien(api.Lien o) { | 457 checkLien(api.Lien o) { |
| 458 buildCounterLien++; | 458 buildCounterLien++; |
| 459 if (buildCounterLien < 3) { | 459 if (buildCounterLien < 3) { |
| 460 unittest.expect(o.createTime, unittest.equals('foo')); | 460 unittest.expect(o.createTime, unittest.equals('foo')); |
| 461 unittest.expect(o.name, unittest.equals('foo')); | 461 unittest.expect(o.name, unittest.equals('foo')); |
| 462 unittest.expect(o.origin, unittest.equals('foo')); | 462 unittest.expect(o.origin, unittest.equals('foo')); |
| 463 unittest.expect(o.parent, unittest.equals('foo')); | 463 unittest.expect(o.parent, unittest.equals('foo')); |
| 464 unittest.expect(o.reason, unittest.equals('foo')); | 464 unittest.expect(o.reason, unittest.equals('foo')); |
| 465 checkUnnamed1693(o.restrictions); | 465 checkUnnamed1703(o.restrictions); |
| 466 } | 466 } |
| 467 buildCounterLien--; | 467 buildCounterLien--; |
| 468 } | 468 } |
| 469 | 469 |
| 470 core.int buildCounterListAvailableOrgPolicyConstraintsRequest = 0; | 470 core.int buildCounterListAvailableOrgPolicyConstraintsRequest = 0; |
| 471 buildListAvailableOrgPolicyConstraintsRequest() { | 471 buildListAvailableOrgPolicyConstraintsRequest() { |
| 472 var o = new api.ListAvailableOrgPolicyConstraintsRequest(); | 472 var o = new api.ListAvailableOrgPolicyConstraintsRequest(); |
| 473 buildCounterListAvailableOrgPolicyConstraintsRequest++; | 473 buildCounterListAvailableOrgPolicyConstraintsRequest++; |
| 474 if (buildCounterListAvailableOrgPolicyConstraintsRequest < 3) { | 474 if (buildCounterListAvailableOrgPolicyConstraintsRequest < 3) { |
| 475 o.pageSize = 42; | 475 o.pageSize = 42; |
| 476 o.pageToken = "foo"; | 476 o.pageToken = "foo"; |
| 477 } | 477 } |
| 478 buildCounterListAvailableOrgPolicyConstraintsRequest--; | 478 buildCounterListAvailableOrgPolicyConstraintsRequest--; |
| 479 return o; | 479 return o; |
| 480 } | 480 } |
| 481 | 481 |
| 482 checkListAvailableOrgPolicyConstraintsRequest(api.ListAvailableOrgPolicyConstrai
ntsRequest o) { | 482 checkListAvailableOrgPolicyConstraintsRequest(api.ListAvailableOrgPolicyConstrai
ntsRequest o) { |
| 483 buildCounterListAvailableOrgPolicyConstraintsRequest++; | 483 buildCounterListAvailableOrgPolicyConstraintsRequest++; |
| 484 if (buildCounterListAvailableOrgPolicyConstraintsRequest < 3) { | 484 if (buildCounterListAvailableOrgPolicyConstraintsRequest < 3) { |
| 485 unittest.expect(o.pageSize, unittest.equals(42)); | 485 unittest.expect(o.pageSize, unittest.equals(42)); |
| 486 unittest.expect(o.pageToken, unittest.equals('foo')); | 486 unittest.expect(o.pageToken, unittest.equals('foo')); |
| 487 } | 487 } |
| 488 buildCounterListAvailableOrgPolicyConstraintsRequest--; | 488 buildCounterListAvailableOrgPolicyConstraintsRequest--; |
| 489 } | 489 } |
| 490 | 490 |
| 491 buildUnnamed1694() { | 491 buildUnnamed1704() { |
| 492 var o = new core.List<api.Constraint>(); | 492 var o = new core.List<api.Constraint>(); |
| 493 o.add(buildConstraint()); | 493 o.add(buildConstraint()); |
| 494 o.add(buildConstraint()); | 494 o.add(buildConstraint()); |
| 495 return o; | 495 return o; |
| 496 } | 496 } |
| 497 | 497 |
| 498 checkUnnamed1694(core.List<api.Constraint> o) { | 498 checkUnnamed1704(core.List<api.Constraint> o) { |
| 499 unittest.expect(o, unittest.hasLength(2)); | 499 unittest.expect(o, unittest.hasLength(2)); |
| 500 checkConstraint(o[0]); | 500 checkConstraint(o[0]); |
| 501 checkConstraint(o[1]); | 501 checkConstraint(o[1]); |
| 502 } | 502 } |
| 503 | 503 |
| 504 core.int buildCounterListAvailableOrgPolicyConstraintsResponse = 0; | 504 core.int buildCounterListAvailableOrgPolicyConstraintsResponse = 0; |
| 505 buildListAvailableOrgPolicyConstraintsResponse() { | 505 buildListAvailableOrgPolicyConstraintsResponse() { |
| 506 var o = new api.ListAvailableOrgPolicyConstraintsResponse(); | 506 var o = new api.ListAvailableOrgPolicyConstraintsResponse(); |
| 507 buildCounterListAvailableOrgPolicyConstraintsResponse++; | 507 buildCounterListAvailableOrgPolicyConstraintsResponse++; |
| 508 if (buildCounterListAvailableOrgPolicyConstraintsResponse < 3) { | 508 if (buildCounterListAvailableOrgPolicyConstraintsResponse < 3) { |
| 509 o.constraints = buildUnnamed1694(); | 509 o.constraints = buildUnnamed1704(); |
| 510 o.nextPageToken = "foo"; | 510 o.nextPageToken = "foo"; |
| 511 } | 511 } |
| 512 buildCounterListAvailableOrgPolicyConstraintsResponse--; | 512 buildCounterListAvailableOrgPolicyConstraintsResponse--; |
| 513 return o; | 513 return o; |
| 514 } | 514 } |
| 515 | 515 |
| 516 checkListAvailableOrgPolicyConstraintsResponse(api.ListAvailableOrgPolicyConstra
intsResponse o) { | 516 checkListAvailableOrgPolicyConstraintsResponse(api.ListAvailableOrgPolicyConstra
intsResponse o) { |
| 517 buildCounterListAvailableOrgPolicyConstraintsResponse++; | 517 buildCounterListAvailableOrgPolicyConstraintsResponse++; |
| 518 if (buildCounterListAvailableOrgPolicyConstraintsResponse < 3) { | 518 if (buildCounterListAvailableOrgPolicyConstraintsResponse < 3) { |
| 519 checkUnnamed1694(o.constraints); | 519 checkUnnamed1704(o.constraints); |
| 520 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 520 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
| 521 } | 521 } |
| 522 buildCounterListAvailableOrgPolicyConstraintsResponse--; | 522 buildCounterListAvailableOrgPolicyConstraintsResponse--; |
| 523 } | 523 } |
| 524 | 524 |
| 525 core.int buildCounterListConstraint = 0; | 525 core.int buildCounterListConstraint = 0; |
| 526 buildListConstraint() { | 526 buildListConstraint() { |
| 527 var o = new api.ListConstraint(); | 527 var o = new api.ListConstraint(); |
| 528 buildCounterListConstraint++; | 528 buildCounterListConstraint++; |
| 529 if (buildCounterListConstraint < 3) { | 529 if (buildCounterListConstraint < 3) { |
| 530 o.suggestedValue = "foo"; | 530 o.suggestedValue = "foo"; |
| 531 } | 531 } |
| 532 buildCounterListConstraint--; | 532 buildCounterListConstraint--; |
| 533 return o; | 533 return o; |
| 534 } | 534 } |
| 535 | 535 |
| 536 checkListConstraint(api.ListConstraint o) { | 536 checkListConstraint(api.ListConstraint o) { |
| 537 buildCounterListConstraint++; | 537 buildCounterListConstraint++; |
| 538 if (buildCounterListConstraint < 3) { | 538 if (buildCounterListConstraint < 3) { |
| 539 unittest.expect(o.suggestedValue, unittest.equals('foo')); | 539 unittest.expect(o.suggestedValue, unittest.equals('foo')); |
| 540 } | 540 } |
| 541 buildCounterListConstraint--; | 541 buildCounterListConstraint--; |
| 542 } | 542 } |
| 543 | 543 |
| 544 buildUnnamed1695() { | 544 buildUnnamed1705() { |
| 545 var o = new core.List<api.Lien>(); | 545 var o = new core.List<api.Lien>(); |
| 546 o.add(buildLien()); | 546 o.add(buildLien()); |
| 547 o.add(buildLien()); | 547 o.add(buildLien()); |
| 548 return o; | 548 return o; |
| 549 } | 549 } |
| 550 | 550 |
| 551 checkUnnamed1695(core.List<api.Lien> o) { | 551 checkUnnamed1705(core.List<api.Lien> o) { |
| 552 unittest.expect(o, unittest.hasLength(2)); | 552 unittest.expect(o, unittest.hasLength(2)); |
| 553 checkLien(o[0]); | 553 checkLien(o[0]); |
| 554 checkLien(o[1]); | 554 checkLien(o[1]); |
| 555 } | 555 } |
| 556 | 556 |
| 557 core.int buildCounterListLiensResponse = 0; | 557 core.int buildCounterListLiensResponse = 0; |
| 558 buildListLiensResponse() { | 558 buildListLiensResponse() { |
| 559 var o = new api.ListLiensResponse(); | 559 var o = new api.ListLiensResponse(); |
| 560 buildCounterListLiensResponse++; | 560 buildCounterListLiensResponse++; |
| 561 if (buildCounterListLiensResponse < 3) { | 561 if (buildCounterListLiensResponse < 3) { |
| 562 o.liens = buildUnnamed1695(); | 562 o.liens = buildUnnamed1705(); |
| 563 o.nextPageToken = "foo"; | 563 o.nextPageToken = "foo"; |
| 564 } | 564 } |
| 565 buildCounterListLiensResponse--; | 565 buildCounterListLiensResponse--; |
| 566 return o; | 566 return o; |
| 567 } | 567 } |
| 568 | 568 |
| 569 checkListLiensResponse(api.ListLiensResponse o) { | 569 checkListLiensResponse(api.ListLiensResponse o) { |
| 570 buildCounterListLiensResponse++; | 570 buildCounterListLiensResponse++; |
| 571 if (buildCounterListLiensResponse < 3) { | 571 if (buildCounterListLiensResponse < 3) { |
| 572 checkUnnamed1695(o.liens); | 572 checkUnnamed1705(o.liens); |
| 573 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 573 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
| 574 } | 574 } |
| 575 buildCounterListLiensResponse--; | 575 buildCounterListLiensResponse--; |
| 576 } | 576 } |
| 577 | 577 |
| 578 core.int buildCounterListOrgPoliciesRequest = 0; | 578 core.int buildCounterListOrgPoliciesRequest = 0; |
| 579 buildListOrgPoliciesRequest() { | 579 buildListOrgPoliciesRequest() { |
| 580 var o = new api.ListOrgPoliciesRequest(); | 580 var o = new api.ListOrgPoliciesRequest(); |
| 581 buildCounterListOrgPoliciesRequest++; | 581 buildCounterListOrgPoliciesRequest++; |
| 582 if (buildCounterListOrgPoliciesRequest < 3) { | 582 if (buildCounterListOrgPoliciesRequest < 3) { |
| 583 o.pageSize = 42; | 583 o.pageSize = 42; |
| 584 o.pageToken = "foo"; | 584 o.pageToken = "foo"; |
| 585 } | 585 } |
| 586 buildCounterListOrgPoliciesRequest--; | 586 buildCounterListOrgPoliciesRequest--; |
| 587 return o; | 587 return o; |
| 588 } | 588 } |
| 589 | 589 |
| 590 checkListOrgPoliciesRequest(api.ListOrgPoliciesRequest o) { | 590 checkListOrgPoliciesRequest(api.ListOrgPoliciesRequest o) { |
| 591 buildCounterListOrgPoliciesRequest++; | 591 buildCounterListOrgPoliciesRequest++; |
| 592 if (buildCounterListOrgPoliciesRequest < 3) { | 592 if (buildCounterListOrgPoliciesRequest < 3) { |
| 593 unittest.expect(o.pageSize, unittest.equals(42)); | 593 unittest.expect(o.pageSize, unittest.equals(42)); |
| 594 unittest.expect(o.pageToken, unittest.equals('foo')); | 594 unittest.expect(o.pageToken, unittest.equals('foo')); |
| 595 } | 595 } |
| 596 buildCounterListOrgPoliciesRequest--; | 596 buildCounterListOrgPoliciesRequest--; |
| 597 } | 597 } |
| 598 | 598 |
| 599 buildUnnamed1696() { | 599 buildUnnamed1706() { |
| 600 var o = new core.List<api.OrgPolicy>(); | 600 var o = new core.List<api.OrgPolicy>(); |
| 601 o.add(buildOrgPolicy()); | 601 o.add(buildOrgPolicy()); |
| 602 o.add(buildOrgPolicy()); | 602 o.add(buildOrgPolicy()); |
| 603 return o; | 603 return o; |
| 604 } | 604 } |
| 605 | 605 |
| 606 checkUnnamed1696(core.List<api.OrgPolicy> o) { | 606 checkUnnamed1706(core.List<api.OrgPolicy> o) { |
| 607 unittest.expect(o, unittest.hasLength(2)); | 607 unittest.expect(o, unittest.hasLength(2)); |
| 608 checkOrgPolicy(o[0]); | 608 checkOrgPolicy(o[0]); |
| 609 checkOrgPolicy(o[1]); | 609 checkOrgPolicy(o[1]); |
| 610 } | 610 } |
| 611 | 611 |
| 612 core.int buildCounterListOrgPoliciesResponse = 0; | 612 core.int buildCounterListOrgPoliciesResponse = 0; |
| 613 buildListOrgPoliciesResponse() { | 613 buildListOrgPoliciesResponse() { |
| 614 var o = new api.ListOrgPoliciesResponse(); | 614 var o = new api.ListOrgPoliciesResponse(); |
| 615 buildCounterListOrgPoliciesResponse++; | 615 buildCounterListOrgPoliciesResponse++; |
| 616 if (buildCounterListOrgPoliciesResponse < 3) { | 616 if (buildCounterListOrgPoliciesResponse < 3) { |
| 617 o.nextPageToken = "foo"; | 617 o.nextPageToken = "foo"; |
| 618 o.policies = buildUnnamed1696(); | 618 o.policies = buildUnnamed1706(); |
| 619 } | 619 } |
| 620 buildCounterListOrgPoliciesResponse--; | 620 buildCounterListOrgPoliciesResponse--; |
| 621 return o; | 621 return o; |
| 622 } | 622 } |
| 623 | 623 |
| 624 checkListOrgPoliciesResponse(api.ListOrgPoliciesResponse o) { | 624 checkListOrgPoliciesResponse(api.ListOrgPoliciesResponse o) { |
| 625 buildCounterListOrgPoliciesResponse++; | 625 buildCounterListOrgPoliciesResponse++; |
| 626 if (buildCounterListOrgPoliciesResponse < 3) { | 626 if (buildCounterListOrgPoliciesResponse < 3) { |
| 627 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 627 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
| 628 checkUnnamed1696(o.policies); | 628 checkUnnamed1706(o.policies); |
| 629 } | 629 } |
| 630 buildCounterListOrgPoliciesResponse--; | 630 buildCounterListOrgPoliciesResponse--; |
| 631 } | 631 } |
| 632 | 632 |
| 633 buildUnnamed1697() { | 633 buildUnnamed1707() { |
| 634 var o = new core.List<core.String>(); | 634 var o = new core.List<core.String>(); |
| 635 o.add("foo"); | 635 o.add("foo"); |
| 636 o.add("foo"); | 636 o.add("foo"); |
| 637 return o; | 637 return o; |
| 638 } | 638 } |
| 639 | 639 |
| 640 checkUnnamed1697(core.List<core.String> o) { | 640 checkUnnamed1707(core.List<core.String> o) { |
| 641 unittest.expect(o, unittest.hasLength(2)); | 641 unittest.expect(o, unittest.hasLength(2)); |
| 642 unittest.expect(o[0], unittest.equals('foo')); | 642 unittest.expect(o[0], unittest.equals('foo')); |
| 643 unittest.expect(o[1], unittest.equals('foo')); | 643 unittest.expect(o[1], unittest.equals('foo')); |
| 644 } | 644 } |
| 645 | 645 |
| 646 buildUnnamed1698() { | 646 buildUnnamed1708() { |
| 647 var o = new core.List<core.String>(); | 647 var o = new core.List<core.String>(); |
| 648 o.add("foo"); | 648 o.add("foo"); |
| 649 o.add("foo"); | 649 o.add("foo"); |
| 650 return o; | 650 return o; |
| 651 } | 651 } |
| 652 | 652 |
| 653 checkUnnamed1698(core.List<core.String> o) { | 653 checkUnnamed1708(core.List<core.String> o) { |
| 654 unittest.expect(o, unittest.hasLength(2)); | 654 unittest.expect(o, unittest.hasLength(2)); |
| 655 unittest.expect(o[0], unittest.equals('foo')); | 655 unittest.expect(o[0], unittest.equals('foo')); |
| 656 unittest.expect(o[1], unittest.equals('foo')); | 656 unittest.expect(o[1], unittest.equals('foo')); |
| 657 } | 657 } |
| 658 | 658 |
| 659 core.int buildCounterListPolicy = 0; | 659 core.int buildCounterListPolicy = 0; |
| 660 buildListPolicy() { | 660 buildListPolicy() { |
| 661 var o = new api.ListPolicy(); | 661 var o = new api.ListPolicy(); |
| 662 buildCounterListPolicy++; | 662 buildCounterListPolicy++; |
| 663 if (buildCounterListPolicy < 3) { | 663 if (buildCounterListPolicy < 3) { |
| 664 o.allValues = "foo"; | 664 o.allValues = "foo"; |
| 665 o.allowedValues = buildUnnamed1697(); | 665 o.allowedValues = buildUnnamed1707(); |
| 666 o.deniedValues = buildUnnamed1698(); | 666 o.deniedValues = buildUnnamed1708(); |
| 667 o.inheritFromParent = true; | 667 o.inheritFromParent = true; |
| 668 o.suggestedValue = "foo"; | 668 o.suggestedValue = "foo"; |
| 669 } | 669 } |
| 670 buildCounterListPolicy--; | 670 buildCounterListPolicy--; |
| 671 return o; | 671 return o; |
| 672 } | 672 } |
| 673 | 673 |
| 674 checkListPolicy(api.ListPolicy o) { | 674 checkListPolicy(api.ListPolicy o) { |
| 675 buildCounterListPolicy++; | 675 buildCounterListPolicy++; |
| 676 if (buildCounterListPolicy < 3) { | 676 if (buildCounterListPolicy < 3) { |
| 677 unittest.expect(o.allValues, unittest.equals('foo')); | 677 unittest.expect(o.allValues, unittest.equals('foo')); |
| 678 checkUnnamed1697(o.allowedValues); | 678 checkUnnamed1707(o.allowedValues); |
| 679 checkUnnamed1698(o.deniedValues); | 679 checkUnnamed1708(o.deniedValues); |
| 680 unittest.expect(o.inheritFromParent, unittest.isTrue); | 680 unittest.expect(o.inheritFromParent, unittest.isTrue); |
| 681 unittest.expect(o.suggestedValue, unittest.equals('foo')); | 681 unittest.expect(o.suggestedValue, unittest.equals('foo')); |
| 682 } | 682 } |
| 683 buildCounterListPolicy--; | 683 buildCounterListPolicy--; |
| 684 } | 684 } |
| 685 | 685 |
| 686 buildUnnamed1699() { | 686 buildUnnamed1709() { |
| 687 var o = new core.List<api.Project>(); | 687 var o = new core.List<api.Project>(); |
| 688 o.add(buildProject()); | 688 o.add(buildProject()); |
| 689 o.add(buildProject()); | 689 o.add(buildProject()); |
| 690 return o; | 690 return o; |
| 691 } | 691 } |
| 692 | 692 |
| 693 checkUnnamed1699(core.List<api.Project> o) { | 693 checkUnnamed1709(core.List<api.Project> o) { |
| 694 unittest.expect(o, unittest.hasLength(2)); | 694 unittest.expect(o, unittest.hasLength(2)); |
| 695 checkProject(o[0]); | 695 checkProject(o[0]); |
| 696 checkProject(o[1]); | 696 checkProject(o[1]); |
| 697 } | 697 } |
| 698 | 698 |
| 699 core.int buildCounterListProjectsResponse = 0; | 699 core.int buildCounterListProjectsResponse = 0; |
| 700 buildListProjectsResponse() { | 700 buildListProjectsResponse() { |
| 701 var o = new api.ListProjectsResponse(); | 701 var o = new api.ListProjectsResponse(); |
| 702 buildCounterListProjectsResponse++; | 702 buildCounterListProjectsResponse++; |
| 703 if (buildCounterListProjectsResponse < 3) { | 703 if (buildCounterListProjectsResponse < 3) { |
| 704 o.nextPageToken = "foo"; | 704 o.nextPageToken = "foo"; |
| 705 o.projects = buildUnnamed1699(); | 705 o.projects = buildUnnamed1709(); |
| 706 } | 706 } |
| 707 buildCounterListProjectsResponse--; | 707 buildCounterListProjectsResponse--; |
| 708 return o; | 708 return o; |
| 709 } | 709 } |
| 710 | 710 |
| 711 checkListProjectsResponse(api.ListProjectsResponse o) { | 711 checkListProjectsResponse(api.ListProjectsResponse o) { |
| 712 buildCounterListProjectsResponse++; | 712 buildCounterListProjectsResponse++; |
| 713 if (buildCounterListProjectsResponse < 3) { | 713 if (buildCounterListProjectsResponse < 3) { |
| 714 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 714 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
| 715 checkUnnamed1699(o.projects); | 715 checkUnnamed1709(o.projects); |
| 716 } | 716 } |
| 717 buildCounterListProjectsResponse--; | 717 buildCounterListProjectsResponse--; |
| 718 } | 718 } |
| 719 | 719 |
| 720 buildUnnamed1700() { | 720 buildUnnamed1710() { |
| 721 var o = new core.Map<core.String, core.Object>(); | 721 var o = new core.Map<core.String, core.Object>(); |
| 722 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 722 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; |
| 723 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 723 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; |
| 724 return o; | 724 return o; |
| 725 } | 725 } |
| 726 | 726 |
| 727 checkUnnamed1700(core.Map<core.String, core.Object> o) { | 727 checkUnnamed1710(core.Map<core.String, core.Object> o) { |
| 728 unittest.expect(o, unittest.hasLength(2)); | 728 unittest.expect(o, unittest.hasLength(2)); |
| 729 var casted1 = (o["x"]) as core.Map; unittest.expect(casted1, unittest.hasLengt
h(3)); unittest.expect(casted1["list"], unittest.equals([1, 2, 3])); unittest.ex
pect(casted1["bool"], unittest.equals(true)); unittest.expect(casted1["string"],
unittest.equals('foo')); | 729 var casted1 = (o["x"]) as core.Map; unittest.expect(casted1, unittest.hasLengt
h(3)); unittest.expect(casted1["list"], unittest.equals([1, 2, 3])); unittest.ex
pect(casted1["bool"], unittest.equals(true)); unittest.expect(casted1["string"],
unittest.equals('foo')); |
| 730 var casted2 = (o["y"]) as core.Map; unittest.expect(casted2, unittest.hasLengt
h(3)); unittest.expect(casted2["list"], unittest.equals([1, 2, 3])); unittest.ex
pect(casted2["bool"], unittest.equals(true)); unittest.expect(casted2["string"],
unittest.equals('foo')); | 730 var casted2 = (o["y"]) as core.Map; unittest.expect(casted2, unittest.hasLengt
h(3)); unittest.expect(casted2["list"], unittest.equals([1, 2, 3])); unittest.ex
pect(casted2["bool"], unittest.equals(true)); unittest.expect(casted2["string"],
unittest.equals('foo')); |
| 731 } | 731 } |
| 732 | 732 |
| 733 buildUnnamed1701() { | 733 buildUnnamed1711() { |
| 734 var o = new core.Map<core.String, core.Object>(); | 734 var o = new core.Map<core.String, core.Object>(); |
| 735 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 735 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; |
| 736 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 736 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; |
| 737 return o; | 737 return o; |
| 738 } | 738 } |
| 739 | 739 |
| 740 checkUnnamed1701(core.Map<core.String, core.Object> o) { | 740 checkUnnamed1711(core.Map<core.String, core.Object> o) { |
| 741 unittest.expect(o, unittest.hasLength(2)); | 741 unittest.expect(o, unittest.hasLength(2)); |
| 742 var casted3 = (o["x"]) as core.Map; unittest.expect(casted3, unittest.hasLengt
h(3)); unittest.expect(casted3["list"], unittest.equals([1, 2, 3])); unittest.ex
pect(casted3["bool"], unittest.equals(true)); unittest.expect(casted3["string"],
unittest.equals('foo')); | 742 var casted3 = (o["x"]) as core.Map; unittest.expect(casted3, unittest.hasLengt
h(3)); unittest.expect(casted3["list"], unittest.equals([1, 2, 3])); unittest.ex
pect(casted3["bool"], unittest.equals(true)); unittest.expect(casted3["string"],
unittest.equals('foo')); |
| 743 var casted4 = (o["y"]) as core.Map; unittest.expect(casted4, unittest.hasLengt
h(3)); unittest.expect(casted4["list"], unittest.equals([1, 2, 3])); unittest.ex
pect(casted4["bool"], unittest.equals(true)); unittest.expect(casted4["string"],
unittest.equals('foo')); | 743 var casted4 = (o["y"]) as core.Map; unittest.expect(casted4, unittest.hasLengt
h(3)); unittest.expect(casted4["list"], unittest.equals([1, 2, 3])); unittest.ex
pect(casted4["bool"], unittest.equals(true)); unittest.expect(casted4["string"],
unittest.equals('foo')); |
| 744 } | 744 } |
| 745 | 745 |
| 746 core.int buildCounterOperation = 0; | 746 core.int buildCounterOperation = 0; |
| 747 buildOperation() { | 747 buildOperation() { |
| 748 var o = new api.Operation(); | 748 var o = new api.Operation(); |
| 749 buildCounterOperation++; | 749 buildCounterOperation++; |
| 750 if (buildCounterOperation < 3) { | 750 if (buildCounterOperation < 3) { |
| 751 o.done = true; | 751 o.done = true; |
| 752 o.error = buildStatus(); | 752 o.error = buildStatus(); |
| 753 o.metadata = buildUnnamed1700(); | 753 o.metadata = buildUnnamed1710(); |
| 754 o.name = "foo"; | 754 o.name = "foo"; |
| 755 o.response = buildUnnamed1701(); | 755 o.response = buildUnnamed1711(); |
| 756 } | 756 } |
| 757 buildCounterOperation--; | 757 buildCounterOperation--; |
| 758 return o; | 758 return o; |
| 759 } | 759 } |
| 760 | 760 |
| 761 checkOperation(api.Operation o) { | 761 checkOperation(api.Operation o) { |
| 762 buildCounterOperation++; | 762 buildCounterOperation++; |
| 763 if (buildCounterOperation < 3) { | 763 if (buildCounterOperation < 3) { |
| 764 unittest.expect(o.done, unittest.isTrue); | 764 unittest.expect(o.done, unittest.isTrue); |
| 765 checkStatus(o.error); | 765 checkStatus(o.error); |
| 766 checkUnnamed1700(o.metadata); | 766 checkUnnamed1710(o.metadata); |
| 767 unittest.expect(o.name, unittest.equals('foo')); | 767 unittest.expect(o.name, unittest.equals('foo')); |
| 768 checkUnnamed1701(o.response); | 768 checkUnnamed1711(o.response); |
| 769 } | 769 } |
| 770 buildCounterOperation--; | 770 buildCounterOperation--; |
| 771 } | 771 } |
| 772 | 772 |
| 773 core.int buildCounterOrgPolicy = 0; | 773 core.int buildCounterOrgPolicy = 0; |
| 774 buildOrgPolicy() { | 774 buildOrgPolicy() { |
| 775 var o = new api.OrgPolicy(); | 775 var o = new api.OrgPolicy(); |
| 776 buildCounterOrgPolicy++; | 776 buildCounterOrgPolicy++; |
| 777 if (buildCounterOrgPolicy < 3) { | 777 if (buildCounterOrgPolicy < 3) { |
| 778 o.booleanPolicy = buildBooleanPolicy(); | 778 o.booleanPolicy = buildBooleanPolicy(); |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 840 } | 840 } |
| 841 | 841 |
| 842 checkOrganizationOwner(api.OrganizationOwner o) { | 842 checkOrganizationOwner(api.OrganizationOwner o) { |
| 843 buildCounterOrganizationOwner++; | 843 buildCounterOrganizationOwner++; |
| 844 if (buildCounterOrganizationOwner < 3) { | 844 if (buildCounterOrganizationOwner < 3) { |
| 845 unittest.expect(o.directoryCustomerId, unittest.equals('foo')); | 845 unittest.expect(o.directoryCustomerId, unittest.equals('foo')); |
| 846 } | 846 } |
| 847 buildCounterOrganizationOwner--; | 847 buildCounterOrganizationOwner--; |
| 848 } | 848 } |
| 849 | 849 |
| 850 buildUnnamed1702() { | 850 buildUnnamed1712() { |
| 851 var o = new core.List<api.AuditConfig>(); | 851 var o = new core.List<api.AuditConfig>(); |
| 852 o.add(buildAuditConfig()); | 852 o.add(buildAuditConfig()); |
| 853 o.add(buildAuditConfig()); | 853 o.add(buildAuditConfig()); |
| 854 return o; | 854 return o; |
| 855 } | 855 } |
| 856 | 856 |
| 857 checkUnnamed1702(core.List<api.AuditConfig> o) { | 857 checkUnnamed1712(core.List<api.AuditConfig> o) { |
| 858 unittest.expect(o, unittest.hasLength(2)); | 858 unittest.expect(o, unittest.hasLength(2)); |
| 859 checkAuditConfig(o[0]); | 859 checkAuditConfig(o[0]); |
| 860 checkAuditConfig(o[1]); | 860 checkAuditConfig(o[1]); |
| 861 } | 861 } |
| 862 | 862 |
| 863 buildUnnamed1703() { | 863 buildUnnamed1713() { |
| 864 var o = new core.List<api.Binding>(); | 864 var o = new core.List<api.Binding>(); |
| 865 o.add(buildBinding()); | 865 o.add(buildBinding()); |
| 866 o.add(buildBinding()); | 866 o.add(buildBinding()); |
| 867 return o; | 867 return o; |
| 868 } | 868 } |
| 869 | 869 |
| 870 checkUnnamed1703(core.List<api.Binding> o) { | 870 checkUnnamed1713(core.List<api.Binding> o) { |
| 871 unittest.expect(o, unittest.hasLength(2)); | 871 unittest.expect(o, unittest.hasLength(2)); |
| 872 checkBinding(o[0]); | 872 checkBinding(o[0]); |
| 873 checkBinding(o[1]); | 873 checkBinding(o[1]); |
| 874 } | 874 } |
| 875 | 875 |
| 876 core.int buildCounterPolicy = 0; | 876 core.int buildCounterPolicy = 0; |
| 877 buildPolicy() { | 877 buildPolicy() { |
| 878 var o = new api.Policy(); | 878 var o = new api.Policy(); |
| 879 buildCounterPolicy++; | 879 buildCounterPolicy++; |
| 880 if (buildCounterPolicy < 3) { | 880 if (buildCounterPolicy < 3) { |
| 881 o.auditConfigs = buildUnnamed1702(); | 881 o.auditConfigs = buildUnnamed1712(); |
| 882 o.bindings = buildUnnamed1703(); | 882 o.bindings = buildUnnamed1713(); |
| 883 o.etag = "foo"; | 883 o.etag = "foo"; |
| 884 o.version = 42; | 884 o.version = 42; |
| 885 } | 885 } |
| 886 buildCounterPolicy--; | 886 buildCounterPolicy--; |
| 887 return o; | 887 return o; |
| 888 } | 888 } |
| 889 | 889 |
| 890 checkPolicy(api.Policy o) { | 890 checkPolicy(api.Policy o) { |
| 891 buildCounterPolicy++; | 891 buildCounterPolicy++; |
| 892 if (buildCounterPolicy < 3) { | 892 if (buildCounterPolicy < 3) { |
| 893 checkUnnamed1702(o.auditConfigs); | 893 checkUnnamed1712(o.auditConfigs); |
| 894 checkUnnamed1703(o.bindings); | 894 checkUnnamed1713(o.bindings); |
| 895 unittest.expect(o.etag, unittest.equals('foo')); | 895 unittest.expect(o.etag, unittest.equals('foo')); |
| 896 unittest.expect(o.version, unittest.equals(42)); | 896 unittest.expect(o.version, unittest.equals(42)); |
| 897 } | 897 } |
| 898 buildCounterPolicy--; | 898 buildCounterPolicy--; |
| 899 } | 899 } |
| 900 | 900 |
| 901 buildUnnamed1704() { | 901 buildUnnamed1714() { |
| 902 var o = new core.Map<core.String, core.String>(); | 902 var o = new core.Map<core.String, core.String>(); |
| 903 o["x"] = "foo"; | 903 o["x"] = "foo"; |
| 904 o["y"] = "foo"; | 904 o["y"] = "foo"; |
| 905 return o; | 905 return o; |
| 906 } | 906 } |
| 907 | 907 |
| 908 checkUnnamed1704(core.Map<core.String, core.String> o) { | 908 checkUnnamed1714(core.Map<core.String, core.String> o) { |
| 909 unittest.expect(o, unittest.hasLength(2)); | 909 unittest.expect(o, unittest.hasLength(2)); |
| 910 unittest.expect(o["x"], unittest.equals('foo')); | 910 unittest.expect(o["x"], unittest.equals('foo')); |
| 911 unittest.expect(o["y"], unittest.equals('foo')); | 911 unittest.expect(o["y"], unittest.equals('foo')); |
| 912 } | 912 } |
| 913 | 913 |
| 914 core.int buildCounterProject = 0; | 914 core.int buildCounterProject = 0; |
| 915 buildProject() { | 915 buildProject() { |
| 916 var o = new api.Project(); | 916 var o = new api.Project(); |
| 917 buildCounterProject++; | 917 buildCounterProject++; |
| 918 if (buildCounterProject < 3) { | 918 if (buildCounterProject < 3) { |
| 919 o.createTime = "foo"; | 919 o.createTime = "foo"; |
| 920 o.labels = buildUnnamed1704(); | 920 o.labels = buildUnnamed1714(); |
| 921 o.lifecycleState = "foo"; | 921 o.lifecycleState = "foo"; |
| 922 o.name = "foo"; | 922 o.name = "foo"; |
| 923 o.parent = buildResourceId(); | 923 o.parent = buildResourceId(); |
| 924 o.projectId = "foo"; | 924 o.projectId = "foo"; |
| 925 o.projectNumber = "foo"; | 925 o.projectNumber = "foo"; |
| 926 } | 926 } |
| 927 buildCounterProject--; | 927 buildCounterProject--; |
| 928 return o; | 928 return o; |
| 929 } | 929 } |
| 930 | 930 |
| 931 checkProject(api.Project o) { | 931 checkProject(api.Project o) { |
| 932 buildCounterProject++; | 932 buildCounterProject++; |
| 933 if (buildCounterProject < 3) { | 933 if (buildCounterProject < 3) { |
| 934 unittest.expect(o.createTime, unittest.equals('foo')); | 934 unittest.expect(o.createTime, unittest.equals('foo')); |
| 935 checkUnnamed1704(o.labels); | 935 checkUnnamed1714(o.labels); |
| 936 unittest.expect(o.lifecycleState, unittest.equals('foo')); | 936 unittest.expect(o.lifecycleState, unittest.equals('foo')); |
| 937 unittest.expect(o.name, unittest.equals('foo')); | 937 unittest.expect(o.name, unittest.equals('foo')); |
| 938 checkResourceId(o.parent); | 938 checkResourceId(o.parent); |
| 939 unittest.expect(o.projectId, unittest.equals('foo')); | 939 unittest.expect(o.projectId, unittest.equals('foo')); |
| 940 unittest.expect(o.projectNumber, unittest.equals('foo')); | 940 unittest.expect(o.projectNumber, unittest.equals('foo')); |
| 941 } | 941 } |
| 942 buildCounterProject--; | 942 buildCounterProject--; |
| 943 } | 943 } |
| 944 | 944 |
| 945 core.int buildCounterProjectCreationStatus = 0; | 945 core.int buildCounterProjectCreationStatus = 0; |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1019 checkSearchOrganizationsRequest(api.SearchOrganizationsRequest o) { | 1019 checkSearchOrganizationsRequest(api.SearchOrganizationsRequest o) { |
| 1020 buildCounterSearchOrganizationsRequest++; | 1020 buildCounterSearchOrganizationsRequest++; |
| 1021 if (buildCounterSearchOrganizationsRequest < 3) { | 1021 if (buildCounterSearchOrganizationsRequest < 3) { |
| 1022 unittest.expect(o.filter, unittest.equals('foo')); | 1022 unittest.expect(o.filter, unittest.equals('foo')); |
| 1023 unittest.expect(o.pageSize, unittest.equals(42)); | 1023 unittest.expect(o.pageSize, unittest.equals(42)); |
| 1024 unittest.expect(o.pageToken, unittest.equals('foo')); | 1024 unittest.expect(o.pageToken, unittest.equals('foo')); |
| 1025 } | 1025 } |
| 1026 buildCounterSearchOrganizationsRequest--; | 1026 buildCounterSearchOrganizationsRequest--; |
| 1027 } | 1027 } |
| 1028 | 1028 |
| 1029 buildUnnamed1705() { | 1029 buildUnnamed1715() { |
| 1030 var o = new core.List<api.Organization>(); | 1030 var o = new core.List<api.Organization>(); |
| 1031 o.add(buildOrganization()); | 1031 o.add(buildOrganization()); |
| 1032 o.add(buildOrganization()); | 1032 o.add(buildOrganization()); |
| 1033 return o; | 1033 return o; |
| 1034 } | 1034 } |
| 1035 | 1035 |
| 1036 checkUnnamed1705(core.List<api.Organization> o) { | 1036 checkUnnamed1715(core.List<api.Organization> o) { |
| 1037 unittest.expect(o, unittest.hasLength(2)); | 1037 unittest.expect(o, unittest.hasLength(2)); |
| 1038 checkOrganization(o[0]); | 1038 checkOrganization(o[0]); |
| 1039 checkOrganization(o[1]); | 1039 checkOrganization(o[1]); |
| 1040 } | 1040 } |
| 1041 | 1041 |
| 1042 core.int buildCounterSearchOrganizationsResponse = 0; | 1042 core.int buildCounterSearchOrganizationsResponse = 0; |
| 1043 buildSearchOrganizationsResponse() { | 1043 buildSearchOrganizationsResponse() { |
| 1044 var o = new api.SearchOrganizationsResponse(); | 1044 var o = new api.SearchOrganizationsResponse(); |
| 1045 buildCounterSearchOrganizationsResponse++; | 1045 buildCounterSearchOrganizationsResponse++; |
| 1046 if (buildCounterSearchOrganizationsResponse < 3) { | 1046 if (buildCounterSearchOrganizationsResponse < 3) { |
| 1047 o.nextPageToken = "foo"; | 1047 o.nextPageToken = "foo"; |
| 1048 o.organizations = buildUnnamed1705(); | 1048 o.organizations = buildUnnamed1715(); |
| 1049 } | 1049 } |
| 1050 buildCounterSearchOrganizationsResponse--; | 1050 buildCounterSearchOrganizationsResponse--; |
| 1051 return o; | 1051 return o; |
| 1052 } | 1052 } |
| 1053 | 1053 |
| 1054 checkSearchOrganizationsResponse(api.SearchOrganizationsResponse o) { | 1054 checkSearchOrganizationsResponse(api.SearchOrganizationsResponse o) { |
| 1055 buildCounterSearchOrganizationsResponse++; | 1055 buildCounterSearchOrganizationsResponse++; |
| 1056 if (buildCounterSearchOrganizationsResponse < 3) { | 1056 if (buildCounterSearchOrganizationsResponse < 3) { |
| 1057 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 1057 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
| 1058 checkUnnamed1705(o.organizations); | 1058 checkUnnamed1715(o.organizations); |
| 1059 } | 1059 } |
| 1060 buildCounterSearchOrganizationsResponse--; | 1060 buildCounterSearchOrganizationsResponse--; |
| 1061 } | 1061 } |
| 1062 | 1062 |
| 1063 core.int buildCounterSetIamPolicyRequest = 0; | 1063 core.int buildCounterSetIamPolicyRequest = 0; |
| 1064 buildSetIamPolicyRequest() { | 1064 buildSetIamPolicyRequest() { |
| 1065 var o = new api.SetIamPolicyRequest(); | 1065 var o = new api.SetIamPolicyRequest(); |
| 1066 buildCounterSetIamPolicyRequest++; | 1066 buildCounterSetIamPolicyRequest++; |
| 1067 if (buildCounterSetIamPolicyRequest < 3) { | 1067 if (buildCounterSetIamPolicyRequest < 3) { |
| 1068 o.policy = buildPolicy(); | 1068 o.policy = buildPolicy(); |
| (...skipping 24 matching lines...) Expand all Loading... |
| 1093 } | 1093 } |
| 1094 | 1094 |
| 1095 checkSetOrgPolicyRequest(api.SetOrgPolicyRequest o) { | 1095 checkSetOrgPolicyRequest(api.SetOrgPolicyRequest o) { |
| 1096 buildCounterSetOrgPolicyRequest++; | 1096 buildCounterSetOrgPolicyRequest++; |
| 1097 if (buildCounterSetOrgPolicyRequest < 3) { | 1097 if (buildCounterSetOrgPolicyRequest < 3) { |
| 1098 checkOrgPolicy(o.policy); | 1098 checkOrgPolicy(o.policy); |
| 1099 } | 1099 } |
| 1100 buildCounterSetOrgPolicyRequest--; | 1100 buildCounterSetOrgPolicyRequest--; |
| 1101 } | 1101 } |
| 1102 | 1102 |
| 1103 buildUnnamed1706() { | 1103 buildUnnamed1716() { |
| 1104 var o = new core.Map<core.String, core.Object>(); | 1104 var o = new core.Map<core.String, core.Object>(); |
| 1105 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 1105 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; |
| 1106 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 1106 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; |
| 1107 return o; | 1107 return o; |
| 1108 } | 1108 } |
| 1109 | 1109 |
| 1110 checkUnnamed1706(core.Map<core.String, core.Object> o) { | 1110 checkUnnamed1716(core.Map<core.String, core.Object> o) { |
| 1111 unittest.expect(o, unittest.hasLength(2)); | 1111 unittest.expect(o, unittest.hasLength(2)); |
| 1112 var casted5 = (o["x"]) as core.Map; unittest.expect(casted5, unittest.hasLengt
h(3)); unittest.expect(casted5["list"], unittest.equals([1, 2, 3])); unittest.ex
pect(casted5["bool"], unittest.equals(true)); unittest.expect(casted5["string"],
unittest.equals('foo')); | 1112 var casted5 = (o["x"]) as core.Map; unittest.expect(casted5, unittest.hasLengt
h(3)); unittest.expect(casted5["list"], unittest.equals([1, 2, 3])); unittest.ex
pect(casted5["bool"], unittest.equals(true)); unittest.expect(casted5["string"],
unittest.equals('foo')); |
| 1113 var casted6 = (o["y"]) as core.Map; unittest.expect(casted6, unittest.hasLengt
h(3)); unittest.expect(casted6["list"], unittest.equals([1, 2, 3])); unittest.ex
pect(casted6["bool"], unittest.equals(true)); unittest.expect(casted6["string"],
unittest.equals('foo')); | 1113 var casted6 = (o["y"]) as core.Map; unittest.expect(casted6, unittest.hasLengt
h(3)); unittest.expect(casted6["list"], unittest.equals([1, 2, 3])); unittest.ex
pect(casted6["bool"], unittest.equals(true)); unittest.expect(casted6["string"],
unittest.equals('foo')); |
| 1114 } | 1114 } |
| 1115 | 1115 |
| 1116 buildUnnamed1707() { | 1116 buildUnnamed1717() { |
| 1117 var o = new core.List<core.Map<core.String, core.Object>>(); | 1117 var o = new core.List<core.Map<core.String, core.Object>>(); |
| 1118 o.add(buildUnnamed1706()); | 1118 o.add(buildUnnamed1716()); |
| 1119 o.add(buildUnnamed1706()); | 1119 o.add(buildUnnamed1716()); |
| 1120 return o; | 1120 return o; |
| 1121 } | 1121 } |
| 1122 | 1122 |
| 1123 checkUnnamed1707(core.List<core.Map<core.String, core.Object>> o) { | 1123 checkUnnamed1717(core.List<core.Map<core.String, core.Object>> o) { |
| 1124 unittest.expect(o, unittest.hasLength(2)); | 1124 unittest.expect(o, unittest.hasLength(2)); |
| 1125 checkUnnamed1706(o[0]); | 1125 checkUnnamed1716(o[0]); |
| 1126 checkUnnamed1706(o[1]); | 1126 checkUnnamed1716(o[1]); |
| 1127 } | 1127 } |
| 1128 | 1128 |
| 1129 core.int buildCounterStatus = 0; | 1129 core.int buildCounterStatus = 0; |
| 1130 buildStatus() { | 1130 buildStatus() { |
| 1131 var o = new api.Status(); | 1131 var o = new api.Status(); |
| 1132 buildCounterStatus++; | 1132 buildCounterStatus++; |
| 1133 if (buildCounterStatus < 3) { | 1133 if (buildCounterStatus < 3) { |
| 1134 o.code = 42; | 1134 o.code = 42; |
| 1135 o.details = buildUnnamed1707(); | 1135 o.details = buildUnnamed1717(); |
| 1136 o.message = "foo"; | 1136 o.message = "foo"; |
| 1137 } | 1137 } |
| 1138 buildCounterStatus--; | 1138 buildCounterStatus--; |
| 1139 return o; | 1139 return o; |
| 1140 } | 1140 } |
| 1141 | 1141 |
| 1142 checkStatus(api.Status o) { | 1142 checkStatus(api.Status o) { |
| 1143 buildCounterStatus++; | 1143 buildCounterStatus++; |
| 1144 if (buildCounterStatus < 3) { | 1144 if (buildCounterStatus < 3) { |
| 1145 unittest.expect(o.code, unittest.equals(42)); | 1145 unittest.expect(o.code, unittest.equals(42)); |
| 1146 checkUnnamed1707(o.details); | 1146 checkUnnamed1717(o.details); |
| 1147 unittest.expect(o.message, unittest.equals('foo')); | 1147 unittest.expect(o.message, unittest.equals('foo')); |
| 1148 } | 1148 } |
| 1149 buildCounterStatus--; | 1149 buildCounterStatus--; |
| 1150 } | 1150 } |
| 1151 | 1151 |
| 1152 buildUnnamed1708() { | 1152 buildUnnamed1718() { |
| 1153 var o = new core.List<core.String>(); | 1153 var o = new core.List<core.String>(); |
| 1154 o.add("foo"); | 1154 o.add("foo"); |
| 1155 o.add("foo"); | 1155 o.add("foo"); |
| 1156 return o; | 1156 return o; |
| 1157 } | 1157 } |
| 1158 | 1158 |
| 1159 checkUnnamed1708(core.List<core.String> o) { | 1159 checkUnnamed1718(core.List<core.String> o) { |
| 1160 unittest.expect(o, unittest.hasLength(2)); | 1160 unittest.expect(o, unittest.hasLength(2)); |
| 1161 unittest.expect(o[0], unittest.equals('foo')); | 1161 unittest.expect(o[0], unittest.equals('foo')); |
| 1162 unittest.expect(o[1], unittest.equals('foo')); | 1162 unittest.expect(o[1], unittest.equals('foo')); |
| 1163 } | 1163 } |
| 1164 | 1164 |
| 1165 core.int buildCounterTestIamPermissionsRequest = 0; | 1165 core.int buildCounterTestIamPermissionsRequest = 0; |
| 1166 buildTestIamPermissionsRequest() { | 1166 buildTestIamPermissionsRequest() { |
| 1167 var o = new api.TestIamPermissionsRequest(); | 1167 var o = new api.TestIamPermissionsRequest(); |
| 1168 buildCounterTestIamPermissionsRequest++; | 1168 buildCounterTestIamPermissionsRequest++; |
| 1169 if (buildCounterTestIamPermissionsRequest < 3) { | 1169 if (buildCounterTestIamPermissionsRequest < 3) { |
| 1170 o.permissions = buildUnnamed1708(); | 1170 o.permissions = buildUnnamed1718(); |
| 1171 } | 1171 } |
| 1172 buildCounterTestIamPermissionsRequest--; | 1172 buildCounterTestIamPermissionsRequest--; |
| 1173 return o; | 1173 return o; |
| 1174 } | 1174 } |
| 1175 | 1175 |
| 1176 checkTestIamPermissionsRequest(api.TestIamPermissionsRequest o) { | 1176 checkTestIamPermissionsRequest(api.TestIamPermissionsRequest o) { |
| 1177 buildCounterTestIamPermissionsRequest++; | 1177 buildCounterTestIamPermissionsRequest++; |
| 1178 if (buildCounterTestIamPermissionsRequest < 3) { | 1178 if (buildCounterTestIamPermissionsRequest < 3) { |
| 1179 checkUnnamed1708(o.permissions); | 1179 checkUnnamed1718(o.permissions); |
| 1180 } | 1180 } |
| 1181 buildCounterTestIamPermissionsRequest--; | 1181 buildCounterTestIamPermissionsRequest--; |
| 1182 } | 1182 } |
| 1183 | 1183 |
| 1184 buildUnnamed1709() { | 1184 buildUnnamed1719() { |
| 1185 var o = new core.List<core.String>(); | 1185 var o = new core.List<core.String>(); |
| 1186 o.add("foo"); | 1186 o.add("foo"); |
| 1187 o.add("foo"); | 1187 o.add("foo"); |
| 1188 return o; | 1188 return o; |
| 1189 } | 1189 } |
| 1190 | 1190 |
| 1191 checkUnnamed1709(core.List<core.String> o) { | 1191 checkUnnamed1719(core.List<core.String> o) { |
| 1192 unittest.expect(o, unittest.hasLength(2)); | 1192 unittest.expect(o, unittest.hasLength(2)); |
| 1193 unittest.expect(o[0], unittest.equals('foo')); | 1193 unittest.expect(o[0], unittest.equals('foo')); |
| 1194 unittest.expect(o[1], unittest.equals('foo')); | 1194 unittest.expect(o[1], unittest.equals('foo')); |
| 1195 } | 1195 } |
| 1196 | 1196 |
| 1197 core.int buildCounterTestIamPermissionsResponse = 0; | 1197 core.int buildCounterTestIamPermissionsResponse = 0; |
| 1198 buildTestIamPermissionsResponse() { | 1198 buildTestIamPermissionsResponse() { |
| 1199 var o = new api.TestIamPermissionsResponse(); | 1199 var o = new api.TestIamPermissionsResponse(); |
| 1200 buildCounterTestIamPermissionsResponse++; | 1200 buildCounterTestIamPermissionsResponse++; |
| 1201 if (buildCounterTestIamPermissionsResponse < 3) { | 1201 if (buildCounterTestIamPermissionsResponse < 3) { |
| 1202 o.permissions = buildUnnamed1709(); | 1202 o.permissions = buildUnnamed1719(); |
| 1203 } | 1203 } |
| 1204 buildCounterTestIamPermissionsResponse--; | 1204 buildCounterTestIamPermissionsResponse--; |
| 1205 return o; | 1205 return o; |
| 1206 } | 1206 } |
| 1207 | 1207 |
| 1208 checkTestIamPermissionsResponse(api.TestIamPermissionsResponse o) { | 1208 checkTestIamPermissionsResponse(api.TestIamPermissionsResponse o) { |
| 1209 buildCounterTestIamPermissionsResponse++; | 1209 buildCounterTestIamPermissionsResponse++; |
| 1210 if (buildCounterTestIamPermissionsResponse < 3) { | 1210 if (buildCounterTestIamPermissionsResponse < 3) { |
| 1211 checkUnnamed1709(o.permissions); | 1211 checkUnnamed1719(o.permissions); |
| 1212 } | 1212 } |
| 1213 buildCounterTestIamPermissionsResponse--; | 1213 buildCounterTestIamPermissionsResponse--; |
| 1214 } | 1214 } |
| 1215 | 1215 |
| 1216 core.int buildCounterUndeleteProjectRequest = 0; | 1216 core.int buildCounterUndeleteProjectRequest = 0; |
| 1217 buildUndeleteProjectRequest() { | 1217 buildUndeleteProjectRequest() { |
| 1218 var o = new api.UndeleteProjectRequest(); | 1218 var o = new api.UndeleteProjectRequest(); |
| 1219 buildCounterUndeleteProjectRequest++; | 1219 buildCounterUndeleteProjectRequest++; |
| 1220 if (buildCounterUndeleteProjectRequest < 3) { | 1220 if (buildCounterUndeleteProjectRequest < 3) { |
| 1221 } | 1221 } |
| (...skipping 388 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1610 }); | 1610 }); |
| 1611 | 1611 |
| 1612 | 1612 |
| 1613 unittest.group("resource-FoldersResourceApi", () { | 1613 unittest.group("resource-FoldersResourceApi", () { |
| 1614 unittest.test("method--clearOrgPolicy", () { | 1614 unittest.test("method--clearOrgPolicy", () { |
| 1615 | 1615 |
| 1616 var mock = new HttpServerMock(); | 1616 var mock = new HttpServerMock(); |
| 1617 api.FoldersResourceApi res = new api.CloudresourcemanagerApi(mock).folders
; | 1617 api.FoldersResourceApi res = new api.CloudresourcemanagerApi(mock).folders
; |
| 1618 var arg_request = buildClearOrgPolicyRequest(); | 1618 var arg_request = buildClearOrgPolicyRequest(); |
| 1619 var arg_resource = "foo"; | 1619 var arg_resource = "foo"; |
| 1620 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1620 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 1621 var obj = new api.ClearOrgPolicyRequest.fromJson(json); | 1621 var obj = new api.ClearOrgPolicyRequest.fromJson(json); |
| 1622 checkClearOrgPolicyRequest(obj); | 1622 checkClearOrgPolicyRequest(obj); |
| 1623 | 1623 |
| 1624 var path = (req.url).path; | 1624 var path = (req.url).path; |
| 1625 var pathOffset = 0; | 1625 var pathOffset = 0; |
| 1626 var index; | 1626 var index; |
| 1627 var subPart; | 1627 var subPart; |
| 1628 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1628 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 1629 pathOffset += 1; | 1629 pathOffset += 1; |
| 1630 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); | 1630 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); |
| (...skipping 17 matching lines...) Expand all Loading... |
| 1648 } | 1648 } |
| 1649 } | 1649 } |
| 1650 | 1650 |
| 1651 | 1651 |
| 1652 var h = { | 1652 var h = { |
| 1653 "content-type" : "application/json; charset=utf-8", | 1653 "content-type" : "application/json; charset=utf-8", |
| 1654 }; | 1654 }; |
| 1655 var resp = convert.JSON.encode(buildEmpty()); | 1655 var resp = convert.JSON.encode(buildEmpty()); |
| 1656 return new async.Future.value(stringResponse(200, h, resp)); | 1656 return new async.Future.value(stringResponse(200, h, resp)); |
| 1657 }), true); | 1657 }), true); |
| 1658 res.clearOrgPolicy(arg_request, arg_resource).then(unittest.expectAsync(((
api.Empty response) { | 1658 res.clearOrgPolicy(arg_request, arg_resource).then(unittest.expectAsync1((
(api.Empty response) { |
| 1659 checkEmpty(response); | 1659 checkEmpty(response); |
| 1660 }))); | 1660 }))); |
| 1661 }); | 1661 }); |
| 1662 | 1662 |
| 1663 unittest.test("method--getEffectiveOrgPolicy", () { | 1663 unittest.test("method--getEffectiveOrgPolicy", () { |
| 1664 | 1664 |
| 1665 var mock = new HttpServerMock(); | 1665 var mock = new HttpServerMock(); |
| 1666 api.FoldersResourceApi res = new api.CloudresourcemanagerApi(mock).folders
; | 1666 api.FoldersResourceApi res = new api.CloudresourcemanagerApi(mock).folders
; |
| 1667 var arg_request = buildGetEffectiveOrgPolicyRequest(); | 1667 var arg_request = buildGetEffectiveOrgPolicyRequest(); |
| 1668 var arg_resource = "foo"; | 1668 var arg_resource = "foo"; |
| 1669 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1669 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 1670 var obj = new api.GetEffectiveOrgPolicyRequest.fromJson(json); | 1670 var obj = new api.GetEffectiveOrgPolicyRequest.fromJson(json); |
| 1671 checkGetEffectiveOrgPolicyRequest(obj); | 1671 checkGetEffectiveOrgPolicyRequest(obj); |
| 1672 | 1672 |
| 1673 var path = (req.url).path; | 1673 var path = (req.url).path; |
| 1674 var pathOffset = 0; | 1674 var pathOffset = 0; |
| 1675 var index; | 1675 var index; |
| 1676 var subPart; | 1676 var subPart; |
| 1677 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1677 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 1678 pathOffset += 1; | 1678 pathOffset += 1; |
| 1679 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); | 1679 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); |
| (...skipping 17 matching lines...) Expand all Loading... |
| 1697 } | 1697 } |
| 1698 } | 1698 } |
| 1699 | 1699 |
| 1700 | 1700 |
| 1701 var h = { | 1701 var h = { |
| 1702 "content-type" : "application/json; charset=utf-8", | 1702 "content-type" : "application/json; charset=utf-8", |
| 1703 }; | 1703 }; |
| 1704 var resp = convert.JSON.encode(buildOrgPolicy()); | 1704 var resp = convert.JSON.encode(buildOrgPolicy()); |
| 1705 return new async.Future.value(stringResponse(200, h, resp)); | 1705 return new async.Future.value(stringResponse(200, h, resp)); |
| 1706 }), true); | 1706 }), true); |
| 1707 res.getEffectiveOrgPolicy(arg_request, arg_resource).then(unittest.expectA
sync(((api.OrgPolicy response) { | 1707 res.getEffectiveOrgPolicy(arg_request, arg_resource).then(unittest.expectA
sync1(((api.OrgPolicy response) { |
| 1708 checkOrgPolicy(response); | 1708 checkOrgPolicy(response); |
| 1709 }))); | 1709 }))); |
| 1710 }); | 1710 }); |
| 1711 | 1711 |
| 1712 unittest.test("method--getOrgPolicy", () { | 1712 unittest.test("method--getOrgPolicy", () { |
| 1713 | 1713 |
| 1714 var mock = new HttpServerMock(); | 1714 var mock = new HttpServerMock(); |
| 1715 api.FoldersResourceApi res = new api.CloudresourcemanagerApi(mock).folders
; | 1715 api.FoldersResourceApi res = new api.CloudresourcemanagerApi(mock).folders
; |
| 1716 var arg_request = buildGetOrgPolicyRequest(); | 1716 var arg_request = buildGetOrgPolicyRequest(); |
| 1717 var arg_resource = "foo"; | 1717 var arg_resource = "foo"; |
| 1718 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1718 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 1719 var obj = new api.GetOrgPolicyRequest.fromJson(json); | 1719 var obj = new api.GetOrgPolicyRequest.fromJson(json); |
| 1720 checkGetOrgPolicyRequest(obj); | 1720 checkGetOrgPolicyRequest(obj); |
| 1721 | 1721 |
| 1722 var path = (req.url).path; | 1722 var path = (req.url).path; |
| 1723 var pathOffset = 0; | 1723 var pathOffset = 0; |
| 1724 var index; | 1724 var index; |
| 1725 var subPart; | 1725 var subPart; |
| 1726 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1726 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 1727 pathOffset += 1; | 1727 pathOffset += 1; |
| 1728 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); | 1728 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); |
| (...skipping 17 matching lines...) Expand all Loading... |
| 1746 } | 1746 } |
| 1747 } | 1747 } |
| 1748 | 1748 |
| 1749 | 1749 |
| 1750 var h = { | 1750 var h = { |
| 1751 "content-type" : "application/json; charset=utf-8", | 1751 "content-type" : "application/json; charset=utf-8", |
| 1752 }; | 1752 }; |
| 1753 var resp = convert.JSON.encode(buildOrgPolicy()); | 1753 var resp = convert.JSON.encode(buildOrgPolicy()); |
| 1754 return new async.Future.value(stringResponse(200, h, resp)); | 1754 return new async.Future.value(stringResponse(200, h, resp)); |
| 1755 }), true); | 1755 }), true); |
| 1756 res.getOrgPolicy(arg_request, arg_resource).then(unittest.expectAsync(((ap
i.OrgPolicy response) { | 1756 res.getOrgPolicy(arg_request, arg_resource).then(unittest.expectAsync1(((a
pi.OrgPolicy response) { |
| 1757 checkOrgPolicy(response); | 1757 checkOrgPolicy(response); |
| 1758 }))); | 1758 }))); |
| 1759 }); | 1759 }); |
| 1760 | 1760 |
| 1761 unittest.test("method--listAvailableOrgPolicyConstraints", () { | 1761 unittest.test("method--listAvailableOrgPolicyConstraints", () { |
| 1762 | 1762 |
| 1763 var mock = new HttpServerMock(); | 1763 var mock = new HttpServerMock(); |
| 1764 api.FoldersResourceApi res = new api.CloudresourcemanagerApi(mock).folders
; | 1764 api.FoldersResourceApi res = new api.CloudresourcemanagerApi(mock).folders
; |
| 1765 var arg_request = buildListAvailableOrgPolicyConstraintsRequest(); | 1765 var arg_request = buildListAvailableOrgPolicyConstraintsRequest(); |
| 1766 var arg_resource = "foo"; | 1766 var arg_resource = "foo"; |
| 1767 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1767 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 1768 var obj = new api.ListAvailableOrgPolicyConstraintsRequest.fromJson(json
); | 1768 var obj = new api.ListAvailableOrgPolicyConstraintsRequest.fromJson(json
); |
| 1769 checkListAvailableOrgPolicyConstraintsRequest(obj); | 1769 checkListAvailableOrgPolicyConstraintsRequest(obj); |
| 1770 | 1770 |
| 1771 var path = (req.url).path; | 1771 var path = (req.url).path; |
| 1772 var pathOffset = 0; | 1772 var pathOffset = 0; |
| 1773 var index; | 1773 var index; |
| 1774 var subPart; | 1774 var subPart; |
| 1775 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1775 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 1776 pathOffset += 1; | 1776 pathOffset += 1; |
| 1777 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); | 1777 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); |
| (...skipping 17 matching lines...) Expand all Loading... |
| 1795 } | 1795 } |
| 1796 } | 1796 } |
| 1797 | 1797 |
| 1798 | 1798 |
| 1799 var h = { | 1799 var h = { |
| 1800 "content-type" : "application/json; charset=utf-8", | 1800 "content-type" : "application/json; charset=utf-8", |
| 1801 }; | 1801 }; |
| 1802 var resp = convert.JSON.encode(buildListAvailableOrgPolicyConstraintsRes
ponse()); | 1802 var resp = convert.JSON.encode(buildListAvailableOrgPolicyConstraintsRes
ponse()); |
| 1803 return new async.Future.value(stringResponse(200, h, resp)); | 1803 return new async.Future.value(stringResponse(200, h, resp)); |
| 1804 }), true); | 1804 }), true); |
| 1805 res.listAvailableOrgPolicyConstraints(arg_request, arg_resource).then(unit
test.expectAsync(((api.ListAvailableOrgPolicyConstraintsResponse response) { | 1805 res.listAvailableOrgPolicyConstraints(arg_request, arg_resource).then(unit
test.expectAsync1(((api.ListAvailableOrgPolicyConstraintsResponse response) { |
| 1806 checkListAvailableOrgPolicyConstraintsResponse(response); | 1806 checkListAvailableOrgPolicyConstraintsResponse(response); |
| 1807 }))); | 1807 }))); |
| 1808 }); | 1808 }); |
| 1809 | 1809 |
| 1810 unittest.test("method--listOrgPolicies", () { | 1810 unittest.test("method--listOrgPolicies", () { |
| 1811 | 1811 |
| 1812 var mock = new HttpServerMock(); | 1812 var mock = new HttpServerMock(); |
| 1813 api.FoldersResourceApi res = new api.CloudresourcemanagerApi(mock).folders
; | 1813 api.FoldersResourceApi res = new api.CloudresourcemanagerApi(mock).folders
; |
| 1814 var arg_request = buildListOrgPoliciesRequest(); | 1814 var arg_request = buildListOrgPoliciesRequest(); |
| 1815 var arg_resource = "foo"; | 1815 var arg_resource = "foo"; |
| 1816 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1816 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 1817 var obj = new api.ListOrgPoliciesRequest.fromJson(json); | 1817 var obj = new api.ListOrgPoliciesRequest.fromJson(json); |
| 1818 checkListOrgPoliciesRequest(obj); | 1818 checkListOrgPoliciesRequest(obj); |
| 1819 | 1819 |
| 1820 var path = (req.url).path; | 1820 var path = (req.url).path; |
| 1821 var pathOffset = 0; | 1821 var pathOffset = 0; |
| 1822 var index; | 1822 var index; |
| 1823 var subPart; | 1823 var subPart; |
| 1824 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1824 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 1825 pathOffset += 1; | 1825 pathOffset += 1; |
| 1826 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); | 1826 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); |
| (...skipping 17 matching lines...) Expand all Loading... |
| 1844 } | 1844 } |
| 1845 } | 1845 } |
| 1846 | 1846 |
| 1847 | 1847 |
| 1848 var h = { | 1848 var h = { |
| 1849 "content-type" : "application/json; charset=utf-8", | 1849 "content-type" : "application/json; charset=utf-8", |
| 1850 }; | 1850 }; |
| 1851 var resp = convert.JSON.encode(buildListOrgPoliciesResponse()); | 1851 var resp = convert.JSON.encode(buildListOrgPoliciesResponse()); |
| 1852 return new async.Future.value(stringResponse(200, h, resp)); | 1852 return new async.Future.value(stringResponse(200, h, resp)); |
| 1853 }), true); | 1853 }), true); |
| 1854 res.listOrgPolicies(arg_request, arg_resource).then(unittest.expectAsync((
(api.ListOrgPoliciesResponse response) { | 1854 res.listOrgPolicies(arg_request, arg_resource).then(unittest.expectAsync1(
((api.ListOrgPoliciesResponse response) { |
| 1855 checkListOrgPoliciesResponse(response); | 1855 checkListOrgPoliciesResponse(response); |
| 1856 }))); | 1856 }))); |
| 1857 }); | 1857 }); |
| 1858 | 1858 |
| 1859 unittest.test("method--setOrgPolicy", () { | 1859 unittest.test("method--setOrgPolicy", () { |
| 1860 | 1860 |
| 1861 var mock = new HttpServerMock(); | 1861 var mock = new HttpServerMock(); |
| 1862 api.FoldersResourceApi res = new api.CloudresourcemanagerApi(mock).folders
; | 1862 api.FoldersResourceApi res = new api.CloudresourcemanagerApi(mock).folders
; |
| 1863 var arg_request = buildSetOrgPolicyRequest(); | 1863 var arg_request = buildSetOrgPolicyRequest(); |
| 1864 var arg_resource = "foo"; | 1864 var arg_resource = "foo"; |
| 1865 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1865 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 1866 var obj = new api.SetOrgPolicyRequest.fromJson(json); | 1866 var obj = new api.SetOrgPolicyRequest.fromJson(json); |
| 1867 checkSetOrgPolicyRequest(obj); | 1867 checkSetOrgPolicyRequest(obj); |
| 1868 | 1868 |
| 1869 var path = (req.url).path; | 1869 var path = (req.url).path; |
| 1870 var pathOffset = 0; | 1870 var pathOffset = 0; |
| 1871 var index; | 1871 var index; |
| 1872 var subPart; | 1872 var subPart; |
| 1873 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1873 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 1874 pathOffset += 1; | 1874 pathOffset += 1; |
| 1875 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); | 1875 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); |
| (...skipping 17 matching lines...) Expand all Loading... |
| 1893 } | 1893 } |
| 1894 } | 1894 } |
| 1895 | 1895 |
| 1896 | 1896 |
| 1897 var h = { | 1897 var h = { |
| 1898 "content-type" : "application/json; charset=utf-8", | 1898 "content-type" : "application/json; charset=utf-8", |
| 1899 }; | 1899 }; |
| 1900 var resp = convert.JSON.encode(buildOrgPolicy()); | 1900 var resp = convert.JSON.encode(buildOrgPolicy()); |
| 1901 return new async.Future.value(stringResponse(200, h, resp)); | 1901 return new async.Future.value(stringResponse(200, h, resp)); |
| 1902 }), true); | 1902 }), true); |
| 1903 res.setOrgPolicy(arg_request, arg_resource).then(unittest.expectAsync(((ap
i.OrgPolicy response) { | 1903 res.setOrgPolicy(arg_request, arg_resource).then(unittest.expectAsync1(((a
pi.OrgPolicy response) { |
| 1904 checkOrgPolicy(response); | 1904 checkOrgPolicy(response); |
| 1905 }))); | 1905 }))); |
| 1906 }); | 1906 }); |
| 1907 | 1907 |
| 1908 }); | 1908 }); |
| 1909 | 1909 |
| 1910 | 1910 |
| 1911 unittest.group("resource-LiensResourceApi", () { | 1911 unittest.group("resource-LiensResourceApi", () { |
| 1912 unittest.test("method--create", () { | 1912 unittest.test("method--create", () { |
| 1913 | 1913 |
| 1914 var mock = new HttpServerMock(); | 1914 var mock = new HttpServerMock(); |
| 1915 api.LiensResourceApi res = new api.CloudresourcemanagerApi(mock).liens; | 1915 api.LiensResourceApi res = new api.CloudresourcemanagerApi(mock).liens; |
| 1916 var arg_request = buildLien(); | 1916 var arg_request = buildLien(); |
| 1917 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1917 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 1918 var obj = new api.Lien.fromJson(json); | 1918 var obj = new api.Lien.fromJson(json); |
| 1919 checkLien(obj); | 1919 checkLien(obj); |
| 1920 | 1920 |
| 1921 var path = (req.url).path; | 1921 var path = (req.url).path; |
| 1922 var pathOffset = 0; | 1922 var pathOffset = 0; |
| 1923 var index; | 1923 var index; |
| 1924 var subPart; | 1924 var subPart; |
| 1925 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1925 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 1926 pathOffset += 1; | 1926 pathOffset += 1; |
| 1927 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("v1/liens")); | 1927 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("v1/liens")); |
| (...skipping 16 matching lines...) Expand all Loading... |
| 1944 } | 1944 } |
| 1945 } | 1945 } |
| 1946 | 1946 |
| 1947 | 1947 |
| 1948 var h = { | 1948 var h = { |
| 1949 "content-type" : "application/json; charset=utf-8", | 1949 "content-type" : "application/json; charset=utf-8", |
| 1950 }; | 1950 }; |
| 1951 var resp = convert.JSON.encode(buildLien()); | 1951 var resp = convert.JSON.encode(buildLien()); |
| 1952 return new async.Future.value(stringResponse(200, h, resp)); | 1952 return new async.Future.value(stringResponse(200, h, resp)); |
| 1953 }), true); | 1953 }), true); |
| 1954 res.create(arg_request).then(unittest.expectAsync(((api.Lien response) { | 1954 res.create(arg_request).then(unittest.expectAsync1(((api.Lien response) { |
| 1955 checkLien(response); | 1955 checkLien(response); |
| 1956 }))); | 1956 }))); |
| 1957 }); | 1957 }); |
| 1958 | 1958 |
| 1959 unittest.test("method--delete", () { | 1959 unittest.test("method--delete", () { |
| 1960 | 1960 |
| 1961 var mock = new HttpServerMock(); | 1961 var mock = new HttpServerMock(); |
| 1962 api.LiensResourceApi res = new api.CloudresourcemanagerApi(mock).liens; | 1962 api.LiensResourceApi res = new api.CloudresourcemanagerApi(mock).liens; |
| 1963 var arg_name = "foo"; | 1963 var arg_name = "foo"; |
| 1964 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1964 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 1965 var path = (req.url).path; | 1965 var path = (req.url).path; |
| 1966 var pathOffset = 0; | 1966 var pathOffset = 0; |
| 1967 var index; | 1967 var index; |
| 1968 var subPart; | 1968 var subPart; |
| 1969 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1969 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 1970 pathOffset += 1; | 1970 pathOffset += 1; |
| 1971 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); | 1971 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); |
| 1972 pathOffset += 3; | 1972 pathOffset += 3; |
| 1973 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; | 1973 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; |
| 1974 | 1974 |
| (...skipping 14 matching lines...) Expand all Loading... |
| 1989 } | 1989 } |
| 1990 } | 1990 } |
| 1991 | 1991 |
| 1992 | 1992 |
| 1993 var h = { | 1993 var h = { |
| 1994 "content-type" : "application/json; charset=utf-8", | 1994 "content-type" : "application/json; charset=utf-8", |
| 1995 }; | 1995 }; |
| 1996 var resp = convert.JSON.encode(buildEmpty()); | 1996 var resp = convert.JSON.encode(buildEmpty()); |
| 1997 return new async.Future.value(stringResponse(200, h, resp)); | 1997 return new async.Future.value(stringResponse(200, h, resp)); |
| 1998 }), true); | 1998 }), true); |
| 1999 res.delete(arg_name).then(unittest.expectAsync(((api.Empty response) { | 1999 res.delete(arg_name).then(unittest.expectAsync1(((api.Empty response) { |
| 2000 checkEmpty(response); | 2000 checkEmpty(response); |
| 2001 }))); | 2001 }))); |
| 2002 }); | 2002 }); |
| 2003 | 2003 |
| 2004 unittest.test("method--list", () { | 2004 unittest.test("method--list", () { |
| 2005 | 2005 |
| 2006 var mock = new HttpServerMock(); | 2006 var mock = new HttpServerMock(); |
| 2007 api.LiensResourceApi res = new api.CloudresourcemanagerApi(mock).liens; | 2007 api.LiensResourceApi res = new api.CloudresourcemanagerApi(mock).liens; |
| 2008 var arg_pageToken = "foo"; | 2008 var arg_pageToken = "foo"; |
| 2009 var arg_pageSize = 42; | 2009 var arg_pageSize = 42; |
| 2010 var arg_parent = "foo"; | 2010 var arg_parent = "foo"; |
| 2011 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2011 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 2012 var path = (req.url).path; | 2012 var path = (req.url).path; |
| 2013 var pathOffset = 0; | 2013 var pathOffset = 0; |
| 2014 var index; | 2014 var index; |
| 2015 var subPart; | 2015 var subPart; |
| 2016 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2016 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 2017 pathOffset += 1; | 2017 pathOffset += 1; |
| 2018 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("v1/liens")); | 2018 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("v1/liens")); |
| 2019 pathOffset += 8; | 2019 pathOffset += 8; |
| 2020 | 2020 |
| 2021 var query = (req.url).query; | 2021 var query = (req.url).query; |
| (...skipping 16 matching lines...) Expand all Loading... |
| 2038 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ
als(arg_pageSize)); | 2038 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ
als(arg_pageSize)); |
| 2039 unittest.expect(queryMap["parent"].first, unittest.equals(arg_parent)); | 2039 unittest.expect(queryMap["parent"].first, unittest.equals(arg_parent)); |
| 2040 | 2040 |
| 2041 | 2041 |
| 2042 var h = { | 2042 var h = { |
| 2043 "content-type" : "application/json; charset=utf-8", | 2043 "content-type" : "application/json; charset=utf-8", |
| 2044 }; | 2044 }; |
| 2045 var resp = convert.JSON.encode(buildListLiensResponse()); | 2045 var resp = convert.JSON.encode(buildListLiensResponse()); |
| 2046 return new async.Future.value(stringResponse(200, h, resp)); | 2046 return new async.Future.value(stringResponse(200, h, resp)); |
| 2047 }), true); | 2047 }), true); |
| 2048 res.list(pageToken: arg_pageToken, pageSize: arg_pageSize, parent: arg_par
ent).then(unittest.expectAsync(((api.ListLiensResponse response) { | 2048 res.list(pageToken: arg_pageToken, pageSize: arg_pageSize, parent: arg_par
ent).then(unittest.expectAsync1(((api.ListLiensResponse response) { |
| 2049 checkListLiensResponse(response); | 2049 checkListLiensResponse(response); |
| 2050 }))); | 2050 }))); |
| 2051 }); | 2051 }); |
| 2052 | 2052 |
| 2053 }); | 2053 }); |
| 2054 | 2054 |
| 2055 | 2055 |
| 2056 unittest.group("resource-OperationsResourceApi", () { | 2056 unittest.group("resource-OperationsResourceApi", () { |
| 2057 unittest.test("method--get", () { | 2057 unittest.test("method--get", () { |
| 2058 | 2058 |
| 2059 var mock = new HttpServerMock(); | 2059 var mock = new HttpServerMock(); |
| 2060 api.OperationsResourceApi res = new api.CloudresourcemanagerApi(mock).oper
ations; | 2060 api.OperationsResourceApi res = new api.CloudresourcemanagerApi(mock).oper
ations; |
| 2061 var arg_name = "foo"; | 2061 var arg_name = "foo"; |
| 2062 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2062 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 2063 var path = (req.url).path; | 2063 var path = (req.url).path; |
| 2064 var pathOffset = 0; | 2064 var pathOffset = 0; |
| 2065 var index; | 2065 var index; |
| 2066 var subPart; | 2066 var subPart; |
| 2067 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2067 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 2068 pathOffset += 1; | 2068 pathOffset += 1; |
| 2069 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); | 2069 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); |
| 2070 pathOffset += 3; | 2070 pathOffset += 3; |
| 2071 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; | 2071 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; |
| 2072 | 2072 |
| (...skipping 14 matching lines...) Expand all Loading... |
| 2087 } | 2087 } |
| 2088 } | 2088 } |
| 2089 | 2089 |
| 2090 | 2090 |
| 2091 var h = { | 2091 var h = { |
| 2092 "content-type" : "application/json; charset=utf-8", | 2092 "content-type" : "application/json; charset=utf-8", |
| 2093 }; | 2093 }; |
| 2094 var resp = convert.JSON.encode(buildOperation()); | 2094 var resp = convert.JSON.encode(buildOperation()); |
| 2095 return new async.Future.value(stringResponse(200, h, resp)); | 2095 return new async.Future.value(stringResponse(200, h, resp)); |
| 2096 }), true); | 2096 }), true); |
| 2097 res.get(arg_name).then(unittest.expectAsync(((api.Operation response) { | 2097 res.get(arg_name).then(unittest.expectAsync1(((api.Operation response) { |
| 2098 checkOperation(response); | 2098 checkOperation(response); |
| 2099 }))); | 2099 }))); |
| 2100 }); | 2100 }); |
| 2101 | 2101 |
| 2102 }); | 2102 }); |
| 2103 | 2103 |
| 2104 | 2104 |
| 2105 unittest.group("resource-OrganizationsResourceApi", () { | 2105 unittest.group("resource-OrganizationsResourceApi", () { |
| 2106 unittest.test("method--clearOrgPolicy", () { | 2106 unittest.test("method--clearOrgPolicy", () { |
| 2107 | 2107 |
| 2108 var mock = new HttpServerMock(); | 2108 var mock = new HttpServerMock(); |
| 2109 api.OrganizationsResourceApi res = new api.CloudresourcemanagerApi(mock).o
rganizations; | 2109 api.OrganizationsResourceApi res = new api.CloudresourcemanagerApi(mock).o
rganizations; |
| 2110 var arg_request = buildClearOrgPolicyRequest(); | 2110 var arg_request = buildClearOrgPolicyRequest(); |
| 2111 var arg_resource = "foo"; | 2111 var arg_resource = "foo"; |
| 2112 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2112 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 2113 var obj = new api.ClearOrgPolicyRequest.fromJson(json); | 2113 var obj = new api.ClearOrgPolicyRequest.fromJson(json); |
| 2114 checkClearOrgPolicyRequest(obj); | 2114 checkClearOrgPolicyRequest(obj); |
| 2115 | 2115 |
| 2116 var path = (req.url).path; | 2116 var path = (req.url).path; |
| 2117 var pathOffset = 0; | 2117 var pathOffset = 0; |
| 2118 var index; | 2118 var index; |
| 2119 var subPart; | 2119 var subPart; |
| 2120 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2120 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 2121 pathOffset += 1; | 2121 pathOffset += 1; |
| 2122 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); | 2122 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); |
| (...skipping 17 matching lines...) Expand all Loading... |
| 2140 } | 2140 } |
| 2141 } | 2141 } |
| 2142 | 2142 |
| 2143 | 2143 |
| 2144 var h = { | 2144 var h = { |
| 2145 "content-type" : "application/json; charset=utf-8", | 2145 "content-type" : "application/json; charset=utf-8", |
| 2146 }; | 2146 }; |
| 2147 var resp = convert.JSON.encode(buildEmpty()); | 2147 var resp = convert.JSON.encode(buildEmpty()); |
| 2148 return new async.Future.value(stringResponse(200, h, resp)); | 2148 return new async.Future.value(stringResponse(200, h, resp)); |
| 2149 }), true); | 2149 }), true); |
| 2150 res.clearOrgPolicy(arg_request, arg_resource).then(unittest.expectAsync(((
api.Empty response) { | 2150 res.clearOrgPolicy(arg_request, arg_resource).then(unittest.expectAsync1((
(api.Empty response) { |
| 2151 checkEmpty(response); | 2151 checkEmpty(response); |
| 2152 }))); | 2152 }))); |
| 2153 }); | 2153 }); |
| 2154 | 2154 |
| 2155 unittest.test("method--get", () { | 2155 unittest.test("method--get", () { |
| 2156 | 2156 |
| 2157 var mock = new HttpServerMock(); | 2157 var mock = new HttpServerMock(); |
| 2158 api.OrganizationsResourceApi res = new api.CloudresourcemanagerApi(mock).o
rganizations; | 2158 api.OrganizationsResourceApi res = new api.CloudresourcemanagerApi(mock).o
rganizations; |
| 2159 var arg_name = "foo"; | 2159 var arg_name = "foo"; |
| 2160 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2160 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 2161 var path = (req.url).path; | 2161 var path = (req.url).path; |
| 2162 var pathOffset = 0; | 2162 var pathOffset = 0; |
| 2163 var index; | 2163 var index; |
| 2164 var subPart; | 2164 var subPart; |
| 2165 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2165 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 2166 pathOffset += 1; | 2166 pathOffset += 1; |
| 2167 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); | 2167 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); |
| 2168 pathOffset += 3; | 2168 pathOffset += 3; |
| 2169 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; | 2169 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; |
| 2170 | 2170 |
| (...skipping 14 matching lines...) Expand all Loading... |
| 2185 } | 2185 } |
| 2186 } | 2186 } |
| 2187 | 2187 |
| 2188 | 2188 |
| 2189 var h = { | 2189 var h = { |
| 2190 "content-type" : "application/json; charset=utf-8", | 2190 "content-type" : "application/json; charset=utf-8", |
| 2191 }; | 2191 }; |
| 2192 var resp = convert.JSON.encode(buildOrganization()); | 2192 var resp = convert.JSON.encode(buildOrganization()); |
| 2193 return new async.Future.value(stringResponse(200, h, resp)); | 2193 return new async.Future.value(stringResponse(200, h, resp)); |
| 2194 }), true); | 2194 }), true); |
| 2195 res.get(arg_name).then(unittest.expectAsync(((api.Organization response) { | 2195 res.get(arg_name).then(unittest.expectAsync1(((api.Organization response)
{ |
| 2196 checkOrganization(response); | 2196 checkOrganization(response); |
| 2197 }))); | 2197 }))); |
| 2198 }); | 2198 }); |
| 2199 | 2199 |
| 2200 unittest.test("method--getEffectiveOrgPolicy", () { | 2200 unittest.test("method--getEffectiveOrgPolicy", () { |
| 2201 | 2201 |
| 2202 var mock = new HttpServerMock(); | 2202 var mock = new HttpServerMock(); |
| 2203 api.OrganizationsResourceApi res = new api.CloudresourcemanagerApi(mock).o
rganizations; | 2203 api.OrganizationsResourceApi res = new api.CloudresourcemanagerApi(mock).o
rganizations; |
| 2204 var arg_request = buildGetEffectiveOrgPolicyRequest(); | 2204 var arg_request = buildGetEffectiveOrgPolicyRequest(); |
| 2205 var arg_resource = "foo"; | 2205 var arg_resource = "foo"; |
| 2206 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2206 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 2207 var obj = new api.GetEffectiveOrgPolicyRequest.fromJson(json); | 2207 var obj = new api.GetEffectiveOrgPolicyRequest.fromJson(json); |
| 2208 checkGetEffectiveOrgPolicyRequest(obj); | 2208 checkGetEffectiveOrgPolicyRequest(obj); |
| 2209 | 2209 |
| 2210 var path = (req.url).path; | 2210 var path = (req.url).path; |
| 2211 var pathOffset = 0; | 2211 var pathOffset = 0; |
| 2212 var index; | 2212 var index; |
| 2213 var subPart; | 2213 var subPart; |
| 2214 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2214 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 2215 pathOffset += 1; | 2215 pathOffset += 1; |
| 2216 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); | 2216 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); |
| (...skipping 17 matching lines...) Expand all Loading... |
| 2234 } | 2234 } |
| 2235 } | 2235 } |
| 2236 | 2236 |
| 2237 | 2237 |
| 2238 var h = { | 2238 var h = { |
| 2239 "content-type" : "application/json; charset=utf-8", | 2239 "content-type" : "application/json; charset=utf-8", |
| 2240 }; | 2240 }; |
| 2241 var resp = convert.JSON.encode(buildOrgPolicy()); | 2241 var resp = convert.JSON.encode(buildOrgPolicy()); |
| 2242 return new async.Future.value(stringResponse(200, h, resp)); | 2242 return new async.Future.value(stringResponse(200, h, resp)); |
| 2243 }), true); | 2243 }), true); |
| 2244 res.getEffectiveOrgPolicy(arg_request, arg_resource).then(unittest.expectA
sync(((api.OrgPolicy response) { | 2244 res.getEffectiveOrgPolicy(arg_request, arg_resource).then(unittest.expectA
sync1(((api.OrgPolicy response) { |
| 2245 checkOrgPolicy(response); | 2245 checkOrgPolicy(response); |
| 2246 }))); | 2246 }))); |
| 2247 }); | 2247 }); |
| 2248 | 2248 |
| 2249 unittest.test("method--getIamPolicy", () { | 2249 unittest.test("method--getIamPolicy", () { |
| 2250 | 2250 |
| 2251 var mock = new HttpServerMock(); | 2251 var mock = new HttpServerMock(); |
| 2252 api.OrganizationsResourceApi res = new api.CloudresourcemanagerApi(mock).o
rganizations; | 2252 api.OrganizationsResourceApi res = new api.CloudresourcemanagerApi(mock).o
rganizations; |
| 2253 var arg_request = buildGetIamPolicyRequest(); | 2253 var arg_request = buildGetIamPolicyRequest(); |
| 2254 var arg_resource = "foo"; | 2254 var arg_resource = "foo"; |
| 2255 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2255 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 2256 var obj = new api.GetIamPolicyRequest.fromJson(json); | 2256 var obj = new api.GetIamPolicyRequest.fromJson(json); |
| 2257 checkGetIamPolicyRequest(obj); | 2257 checkGetIamPolicyRequest(obj); |
| 2258 | 2258 |
| 2259 var path = (req.url).path; | 2259 var path = (req.url).path; |
| 2260 var pathOffset = 0; | 2260 var pathOffset = 0; |
| 2261 var index; | 2261 var index; |
| 2262 var subPart; | 2262 var subPart; |
| 2263 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2263 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 2264 pathOffset += 1; | 2264 pathOffset += 1; |
| 2265 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); | 2265 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); |
| (...skipping 17 matching lines...) Expand all Loading... |
| 2283 } | 2283 } |
| 2284 } | 2284 } |
| 2285 | 2285 |
| 2286 | 2286 |
| 2287 var h = { | 2287 var h = { |
| 2288 "content-type" : "application/json; charset=utf-8", | 2288 "content-type" : "application/json; charset=utf-8", |
| 2289 }; | 2289 }; |
| 2290 var resp = convert.JSON.encode(buildPolicy()); | 2290 var resp = convert.JSON.encode(buildPolicy()); |
| 2291 return new async.Future.value(stringResponse(200, h, resp)); | 2291 return new async.Future.value(stringResponse(200, h, resp)); |
| 2292 }), true); | 2292 }), true); |
| 2293 res.getIamPolicy(arg_request, arg_resource).then(unittest.expectAsync(((ap
i.Policy response) { | 2293 res.getIamPolicy(arg_request, arg_resource).then(unittest.expectAsync1(((a
pi.Policy response) { |
| 2294 checkPolicy(response); | 2294 checkPolicy(response); |
| 2295 }))); | 2295 }))); |
| 2296 }); | 2296 }); |
| 2297 | 2297 |
| 2298 unittest.test("method--getOrgPolicy", () { | 2298 unittest.test("method--getOrgPolicy", () { |
| 2299 | 2299 |
| 2300 var mock = new HttpServerMock(); | 2300 var mock = new HttpServerMock(); |
| 2301 api.OrganizationsResourceApi res = new api.CloudresourcemanagerApi(mock).o
rganizations; | 2301 api.OrganizationsResourceApi res = new api.CloudresourcemanagerApi(mock).o
rganizations; |
| 2302 var arg_request = buildGetOrgPolicyRequest(); | 2302 var arg_request = buildGetOrgPolicyRequest(); |
| 2303 var arg_resource = "foo"; | 2303 var arg_resource = "foo"; |
| 2304 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2304 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 2305 var obj = new api.GetOrgPolicyRequest.fromJson(json); | 2305 var obj = new api.GetOrgPolicyRequest.fromJson(json); |
| 2306 checkGetOrgPolicyRequest(obj); | 2306 checkGetOrgPolicyRequest(obj); |
| 2307 | 2307 |
| 2308 var path = (req.url).path; | 2308 var path = (req.url).path; |
| 2309 var pathOffset = 0; | 2309 var pathOffset = 0; |
| 2310 var index; | 2310 var index; |
| 2311 var subPart; | 2311 var subPart; |
| 2312 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2312 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 2313 pathOffset += 1; | 2313 pathOffset += 1; |
| 2314 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); | 2314 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); |
| (...skipping 17 matching lines...) Expand all Loading... |
| 2332 } | 2332 } |
| 2333 } | 2333 } |
| 2334 | 2334 |
| 2335 | 2335 |
| 2336 var h = { | 2336 var h = { |
| 2337 "content-type" : "application/json; charset=utf-8", | 2337 "content-type" : "application/json; charset=utf-8", |
| 2338 }; | 2338 }; |
| 2339 var resp = convert.JSON.encode(buildOrgPolicy()); | 2339 var resp = convert.JSON.encode(buildOrgPolicy()); |
| 2340 return new async.Future.value(stringResponse(200, h, resp)); | 2340 return new async.Future.value(stringResponse(200, h, resp)); |
| 2341 }), true); | 2341 }), true); |
| 2342 res.getOrgPolicy(arg_request, arg_resource).then(unittest.expectAsync(((ap
i.OrgPolicy response) { | 2342 res.getOrgPolicy(arg_request, arg_resource).then(unittest.expectAsync1(((a
pi.OrgPolicy response) { |
| 2343 checkOrgPolicy(response); | 2343 checkOrgPolicy(response); |
| 2344 }))); | 2344 }))); |
| 2345 }); | 2345 }); |
| 2346 | 2346 |
| 2347 unittest.test("method--listAvailableOrgPolicyConstraints", () { | 2347 unittest.test("method--listAvailableOrgPolicyConstraints", () { |
| 2348 | 2348 |
| 2349 var mock = new HttpServerMock(); | 2349 var mock = new HttpServerMock(); |
| 2350 api.OrganizationsResourceApi res = new api.CloudresourcemanagerApi(mock).o
rganizations; | 2350 api.OrganizationsResourceApi res = new api.CloudresourcemanagerApi(mock).o
rganizations; |
| 2351 var arg_request = buildListAvailableOrgPolicyConstraintsRequest(); | 2351 var arg_request = buildListAvailableOrgPolicyConstraintsRequest(); |
| 2352 var arg_resource = "foo"; | 2352 var arg_resource = "foo"; |
| 2353 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2353 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 2354 var obj = new api.ListAvailableOrgPolicyConstraintsRequest.fromJson(json
); | 2354 var obj = new api.ListAvailableOrgPolicyConstraintsRequest.fromJson(json
); |
| 2355 checkListAvailableOrgPolicyConstraintsRequest(obj); | 2355 checkListAvailableOrgPolicyConstraintsRequest(obj); |
| 2356 | 2356 |
| 2357 var path = (req.url).path; | 2357 var path = (req.url).path; |
| 2358 var pathOffset = 0; | 2358 var pathOffset = 0; |
| 2359 var index; | 2359 var index; |
| 2360 var subPart; | 2360 var subPart; |
| 2361 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2361 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 2362 pathOffset += 1; | 2362 pathOffset += 1; |
| 2363 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); | 2363 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); |
| (...skipping 17 matching lines...) Expand all Loading... |
| 2381 } | 2381 } |
| 2382 } | 2382 } |
| 2383 | 2383 |
| 2384 | 2384 |
| 2385 var h = { | 2385 var h = { |
| 2386 "content-type" : "application/json; charset=utf-8", | 2386 "content-type" : "application/json; charset=utf-8", |
| 2387 }; | 2387 }; |
| 2388 var resp = convert.JSON.encode(buildListAvailableOrgPolicyConstraintsRes
ponse()); | 2388 var resp = convert.JSON.encode(buildListAvailableOrgPolicyConstraintsRes
ponse()); |
| 2389 return new async.Future.value(stringResponse(200, h, resp)); | 2389 return new async.Future.value(stringResponse(200, h, resp)); |
| 2390 }), true); | 2390 }), true); |
| 2391 res.listAvailableOrgPolicyConstraints(arg_request, arg_resource).then(unit
test.expectAsync(((api.ListAvailableOrgPolicyConstraintsResponse response) { | 2391 res.listAvailableOrgPolicyConstraints(arg_request, arg_resource).then(unit
test.expectAsync1(((api.ListAvailableOrgPolicyConstraintsResponse response) { |
| 2392 checkListAvailableOrgPolicyConstraintsResponse(response); | 2392 checkListAvailableOrgPolicyConstraintsResponse(response); |
| 2393 }))); | 2393 }))); |
| 2394 }); | 2394 }); |
| 2395 | 2395 |
| 2396 unittest.test("method--listOrgPolicies", () { | 2396 unittest.test("method--listOrgPolicies", () { |
| 2397 | 2397 |
| 2398 var mock = new HttpServerMock(); | 2398 var mock = new HttpServerMock(); |
| 2399 api.OrganizationsResourceApi res = new api.CloudresourcemanagerApi(mock).o
rganizations; | 2399 api.OrganizationsResourceApi res = new api.CloudresourcemanagerApi(mock).o
rganizations; |
| 2400 var arg_request = buildListOrgPoliciesRequest(); | 2400 var arg_request = buildListOrgPoliciesRequest(); |
| 2401 var arg_resource = "foo"; | 2401 var arg_resource = "foo"; |
| 2402 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2402 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 2403 var obj = new api.ListOrgPoliciesRequest.fromJson(json); | 2403 var obj = new api.ListOrgPoliciesRequest.fromJson(json); |
| 2404 checkListOrgPoliciesRequest(obj); | 2404 checkListOrgPoliciesRequest(obj); |
| 2405 | 2405 |
| 2406 var path = (req.url).path; | 2406 var path = (req.url).path; |
| 2407 var pathOffset = 0; | 2407 var pathOffset = 0; |
| 2408 var index; | 2408 var index; |
| 2409 var subPart; | 2409 var subPart; |
| 2410 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2410 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 2411 pathOffset += 1; | 2411 pathOffset += 1; |
| 2412 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); | 2412 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); |
| (...skipping 17 matching lines...) Expand all Loading... |
| 2430 } | 2430 } |
| 2431 } | 2431 } |
| 2432 | 2432 |
| 2433 | 2433 |
| 2434 var h = { | 2434 var h = { |
| 2435 "content-type" : "application/json; charset=utf-8", | 2435 "content-type" : "application/json; charset=utf-8", |
| 2436 }; | 2436 }; |
| 2437 var resp = convert.JSON.encode(buildListOrgPoliciesResponse()); | 2437 var resp = convert.JSON.encode(buildListOrgPoliciesResponse()); |
| 2438 return new async.Future.value(stringResponse(200, h, resp)); | 2438 return new async.Future.value(stringResponse(200, h, resp)); |
| 2439 }), true); | 2439 }), true); |
| 2440 res.listOrgPolicies(arg_request, arg_resource).then(unittest.expectAsync((
(api.ListOrgPoliciesResponse response) { | 2440 res.listOrgPolicies(arg_request, arg_resource).then(unittest.expectAsync1(
((api.ListOrgPoliciesResponse response) { |
| 2441 checkListOrgPoliciesResponse(response); | 2441 checkListOrgPoliciesResponse(response); |
| 2442 }))); | 2442 }))); |
| 2443 }); | 2443 }); |
| 2444 | 2444 |
| 2445 unittest.test("method--search", () { | 2445 unittest.test("method--search", () { |
| 2446 | 2446 |
| 2447 var mock = new HttpServerMock(); | 2447 var mock = new HttpServerMock(); |
| 2448 api.OrganizationsResourceApi res = new api.CloudresourcemanagerApi(mock).o
rganizations; | 2448 api.OrganizationsResourceApi res = new api.CloudresourcemanagerApi(mock).o
rganizations; |
| 2449 var arg_request = buildSearchOrganizationsRequest(); | 2449 var arg_request = buildSearchOrganizationsRequest(); |
| 2450 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2450 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 2451 var obj = new api.SearchOrganizationsRequest.fromJson(json); | 2451 var obj = new api.SearchOrganizationsRequest.fromJson(json); |
| 2452 checkSearchOrganizationsRequest(obj); | 2452 checkSearchOrganizationsRequest(obj); |
| 2453 | 2453 |
| 2454 var path = (req.url).path; | 2454 var path = (req.url).path; |
| 2455 var pathOffset = 0; | 2455 var pathOffset = 0; |
| 2456 var index; | 2456 var index; |
| 2457 var subPart; | 2457 var subPart; |
| 2458 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2458 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 2459 pathOffset += 1; | 2459 pathOffset += 1; |
| 2460 unittest.expect(path.substring(pathOffset, pathOffset + 23), unittest.eq
uals("v1/organizations:search")); | 2460 unittest.expect(path.substring(pathOffset, pathOffset + 23), unittest.eq
uals("v1/organizations:search")); |
| (...skipping 16 matching lines...) Expand all Loading... |
| 2477 } | 2477 } |
| 2478 } | 2478 } |
| 2479 | 2479 |
| 2480 | 2480 |
| 2481 var h = { | 2481 var h = { |
| 2482 "content-type" : "application/json; charset=utf-8", | 2482 "content-type" : "application/json; charset=utf-8", |
| 2483 }; | 2483 }; |
| 2484 var resp = convert.JSON.encode(buildSearchOrganizationsResponse()); | 2484 var resp = convert.JSON.encode(buildSearchOrganizationsResponse()); |
| 2485 return new async.Future.value(stringResponse(200, h, resp)); | 2485 return new async.Future.value(stringResponse(200, h, resp)); |
| 2486 }), true); | 2486 }), true); |
| 2487 res.search(arg_request).then(unittest.expectAsync(((api.SearchOrganization
sResponse response) { | 2487 res.search(arg_request).then(unittest.expectAsync1(((api.SearchOrganizatio
nsResponse response) { |
| 2488 checkSearchOrganizationsResponse(response); | 2488 checkSearchOrganizationsResponse(response); |
| 2489 }))); | 2489 }))); |
| 2490 }); | 2490 }); |
| 2491 | 2491 |
| 2492 unittest.test("method--setIamPolicy", () { | 2492 unittest.test("method--setIamPolicy", () { |
| 2493 | 2493 |
| 2494 var mock = new HttpServerMock(); | 2494 var mock = new HttpServerMock(); |
| 2495 api.OrganizationsResourceApi res = new api.CloudresourcemanagerApi(mock).o
rganizations; | 2495 api.OrganizationsResourceApi res = new api.CloudresourcemanagerApi(mock).o
rganizations; |
| 2496 var arg_request = buildSetIamPolicyRequest(); | 2496 var arg_request = buildSetIamPolicyRequest(); |
| 2497 var arg_resource = "foo"; | 2497 var arg_resource = "foo"; |
| 2498 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2498 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 2499 var obj = new api.SetIamPolicyRequest.fromJson(json); | 2499 var obj = new api.SetIamPolicyRequest.fromJson(json); |
| 2500 checkSetIamPolicyRequest(obj); | 2500 checkSetIamPolicyRequest(obj); |
| 2501 | 2501 |
| 2502 var path = (req.url).path; | 2502 var path = (req.url).path; |
| 2503 var pathOffset = 0; | 2503 var pathOffset = 0; |
| 2504 var index; | 2504 var index; |
| 2505 var subPart; | 2505 var subPart; |
| 2506 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2506 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 2507 pathOffset += 1; | 2507 pathOffset += 1; |
| 2508 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); | 2508 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); |
| (...skipping 17 matching lines...) Expand all Loading... |
| 2526 } | 2526 } |
| 2527 } | 2527 } |
| 2528 | 2528 |
| 2529 | 2529 |
| 2530 var h = { | 2530 var h = { |
| 2531 "content-type" : "application/json; charset=utf-8", | 2531 "content-type" : "application/json; charset=utf-8", |
| 2532 }; | 2532 }; |
| 2533 var resp = convert.JSON.encode(buildPolicy()); | 2533 var resp = convert.JSON.encode(buildPolicy()); |
| 2534 return new async.Future.value(stringResponse(200, h, resp)); | 2534 return new async.Future.value(stringResponse(200, h, resp)); |
| 2535 }), true); | 2535 }), true); |
| 2536 res.setIamPolicy(arg_request, arg_resource).then(unittest.expectAsync(((ap
i.Policy response) { | 2536 res.setIamPolicy(arg_request, arg_resource).then(unittest.expectAsync1(((a
pi.Policy response) { |
| 2537 checkPolicy(response); | 2537 checkPolicy(response); |
| 2538 }))); | 2538 }))); |
| 2539 }); | 2539 }); |
| 2540 | 2540 |
| 2541 unittest.test("method--setOrgPolicy", () { | 2541 unittest.test("method--setOrgPolicy", () { |
| 2542 | 2542 |
| 2543 var mock = new HttpServerMock(); | 2543 var mock = new HttpServerMock(); |
| 2544 api.OrganizationsResourceApi res = new api.CloudresourcemanagerApi(mock).o
rganizations; | 2544 api.OrganizationsResourceApi res = new api.CloudresourcemanagerApi(mock).o
rganizations; |
| 2545 var arg_request = buildSetOrgPolicyRequest(); | 2545 var arg_request = buildSetOrgPolicyRequest(); |
| 2546 var arg_resource = "foo"; | 2546 var arg_resource = "foo"; |
| 2547 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2547 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 2548 var obj = new api.SetOrgPolicyRequest.fromJson(json); | 2548 var obj = new api.SetOrgPolicyRequest.fromJson(json); |
| 2549 checkSetOrgPolicyRequest(obj); | 2549 checkSetOrgPolicyRequest(obj); |
| 2550 | 2550 |
| 2551 var path = (req.url).path; | 2551 var path = (req.url).path; |
| 2552 var pathOffset = 0; | 2552 var pathOffset = 0; |
| 2553 var index; | 2553 var index; |
| 2554 var subPart; | 2554 var subPart; |
| 2555 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2555 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 2556 pathOffset += 1; | 2556 pathOffset += 1; |
| 2557 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); | 2557 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); |
| (...skipping 17 matching lines...) Expand all Loading... |
| 2575 } | 2575 } |
| 2576 } | 2576 } |
| 2577 | 2577 |
| 2578 | 2578 |
| 2579 var h = { | 2579 var h = { |
| 2580 "content-type" : "application/json; charset=utf-8", | 2580 "content-type" : "application/json; charset=utf-8", |
| 2581 }; | 2581 }; |
| 2582 var resp = convert.JSON.encode(buildOrgPolicy()); | 2582 var resp = convert.JSON.encode(buildOrgPolicy()); |
| 2583 return new async.Future.value(stringResponse(200, h, resp)); | 2583 return new async.Future.value(stringResponse(200, h, resp)); |
| 2584 }), true); | 2584 }), true); |
| 2585 res.setOrgPolicy(arg_request, arg_resource).then(unittest.expectAsync(((ap
i.OrgPolicy response) { | 2585 res.setOrgPolicy(arg_request, arg_resource).then(unittest.expectAsync1(((a
pi.OrgPolicy response) { |
| 2586 checkOrgPolicy(response); | 2586 checkOrgPolicy(response); |
| 2587 }))); | 2587 }))); |
| 2588 }); | 2588 }); |
| 2589 | 2589 |
| 2590 unittest.test("method--testIamPermissions", () { | 2590 unittest.test("method--testIamPermissions", () { |
| 2591 | 2591 |
| 2592 var mock = new HttpServerMock(); | 2592 var mock = new HttpServerMock(); |
| 2593 api.OrganizationsResourceApi res = new api.CloudresourcemanagerApi(mock).o
rganizations; | 2593 api.OrganizationsResourceApi res = new api.CloudresourcemanagerApi(mock).o
rganizations; |
| 2594 var arg_request = buildTestIamPermissionsRequest(); | 2594 var arg_request = buildTestIamPermissionsRequest(); |
| 2595 var arg_resource = "foo"; | 2595 var arg_resource = "foo"; |
| 2596 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2596 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 2597 var obj = new api.TestIamPermissionsRequest.fromJson(json); | 2597 var obj = new api.TestIamPermissionsRequest.fromJson(json); |
| 2598 checkTestIamPermissionsRequest(obj); | 2598 checkTestIamPermissionsRequest(obj); |
| 2599 | 2599 |
| 2600 var path = (req.url).path; | 2600 var path = (req.url).path; |
| 2601 var pathOffset = 0; | 2601 var pathOffset = 0; |
| 2602 var index; | 2602 var index; |
| 2603 var subPart; | 2603 var subPart; |
| 2604 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2604 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 2605 pathOffset += 1; | 2605 pathOffset += 1; |
| 2606 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); | 2606 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); |
| (...skipping 17 matching lines...) Expand all Loading... |
| 2624 } | 2624 } |
| 2625 } | 2625 } |
| 2626 | 2626 |
| 2627 | 2627 |
| 2628 var h = { | 2628 var h = { |
| 2629 "content-type" : "application/json; charset=utf-8", | 2629 "content-type" : "application/json; charset=utf-8", |
| 2630 }; | 2630 }; |
| 2631 var resp = convert.JSON.encode(buildTestIamPermissionsResponse()); | 2631 var resp = convert.JSON.encode(buildTestIamPermissionsResponse()); |
| 2632 return new async.Future.value(stringResponse(200, h, resp)); | 2632 return new async.Future.value(stringResponse(200, h, resp)); |
| 2633 }), true); | 2633 }), true); |
| 2634 res.testIamPermissions(arg_request, arg_resource).then(unittest.expectAsyn
c(((api.TestIamPermissionsResponse response) { | 2634 res.testIamPermissions(arg_request, arg_resource).then(unittest.expectAsyn
c1(((api.TestIamPermissionsResponse response) { |
| 2635 checkTestIamPermissionsResponse(response); | 2635 checkTestIamPermissionsResponse(response); |
| 2636 }))); | 2636 }))); |
| 2637 }); | 2637 }); |
| 2638 | 2638 |
| 2639 }); | 2639 }); |
| 2640 | 2640 |
| 2641 | 2641 |
| 2642 unittest.group("resource-ProjectsResourceApi", () { | 2642 unittest.group("resource-ProjectsResourceApi", () { |
| 2643 unittest.test("method--clearOrgPolicy", () { | 2643 unittest.test("method--clearOrgPolicy", () { |
| 2644 | 2644 |
| 2645 var mock = new HttpServerMock(); | 2645 var mock = new HttpServerMock(); |
| 2646 api.ProjectsResourceApi res = new api.CloudresourcemanagerApi(mock).projec
ts; | 2646 api.ProjectsResourceApi res = new api.CloudresourcemanagerApi(mock).projec
ts; |
| 2647 var arg_request = buildClearOrgPolicyRequest(); | 2647 var arg_request = buildClearOrgPolicyRequest(); |
| 2648 var arg_resource = "foo"; | 2648 var arg_resource = "foo"; |
| 2649 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2649 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 2650 var obj = new api.ClearOrgPolicyRequest.fromJson(json); | 2650 var obj = new api.ClearOrgPolicyRequest.fromJson(json); |
| 2651 checkClearOrgPolicyRequest(obj); | 2651 checkClearOrgPolicyRequest(obj); |
| 2652 | 2652 |
| 2653 var path = (req.url).path; | 2653 var path = (req.url).path; |
| 2654 var pathOffset = 0; | 2654 var pathOffset = 0; |
| 2655 var index; | 2655 var index; |
| 2656 var subPart; | 2656 var subPart; |
| 2657 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2657 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 2658 pathOffset += 1; | 2658 pathOffset += 1; |
| 2659 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); | 2659 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); |
| (...skipping 17 matching lines...) Expand all Loading... |
| 2677 } | 2677 } |
| 2678 } | 2678 } |
| 2679 | 2679 |
| 2680 | 2680 |
| 2681 var h = { | 2681 var h = { |
| 2682 "content-type" : "application/json; charset=utf-8", | 2682 "content-type" : "application/json; charset=utf-8", |
| 2683 }; | 2683 }; |
| 2684 var resp = convert.JSON.encode(buildEmpty()); | 2684 var resp = convert.JSON.encode(buildEmpty()); |
| 2685 return new async.Future.value(stringResponse(200, h, resp)); | 2685 return new async.Future.value(stringResponse(200, h, resp)); |
| 2686 }), true); | 2686 }), true); |
| 2687 res.clearOrgPolicy(arg_request, arg_resource).then(unittest.expectAsync(((
api.Empty response) { | 2687 res.clearOrgPolicy(arg_request, arg_resource).then(unittest.expectAsync1((
(api.Empty response) { |
| 2688 checkEmpty(response); | 2688 checkEmpty(response); |
| 2689 }))); | 2689 }))); |
| 2690 }); | 2690 }); |
| 2691 | 2691 |
| 2692 unittest.test("method--create", () { | 2692 unittest.test("method--create", () { |
| 2693 | 2693 |
| 2694 var mock = new HttpServerMock(); | 2694 var mock = new HttpServerMock(); |
| 2695 api.ProjectsResourceApi res = new api.CloudresourcemanagerApi(mock).projec
ts; | 2695 api.ProjectsResourceApi res = new api.CloudresourcemanagerApi(mock).projec
ts; |
| 2696 var arg_request = buildProject(); | 2696 var arg_request = buildProject(); |
| 2697 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2697 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 2698 var obj = new api.Project.fromJson(json); | 2698 var obj = new api.Project.fromJson(json); |
| 2699 checkProject(obj); | 2699 checkProject(obj); |
| 2700 | 2700 |
| 2701 var path = (req.url).path; | 2701 var path = (req.url).path; |
| 2702 var pathOffset = 0; | 2702 var pathOffset = 0; |
| 2703 var index; | 2703 var index; |
| 2704 var subPart; | 2704 var subPart; |
| 2705 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2705 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 2706 pathOffset += 1; | 2706 pathOffset += 1; |
| 2707 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("v1/projects")); | 2707 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("v1/projects")); |
| (...skipping 16 matching lines...) Expand all Loading... |
| 2724 } | 2724 } |
| 2725 } | 2725 } |
| 2726 | 2726 |
| 2727 | 2727 |
| 2728 var h = { | 2728 var h = { |
| 2729 "content-type" : "application/json; charset=utf-8", | 2729 "content-type" : "application/json; charset=utf-8", |
| 2730 }; | 2730 }; |
| 2731 var resp = convert.JSON.encode(buildOperation()); | 2731 var resp = convert.JSON.encode(buildOperation()); |
| 2732 return new async.Future.value(stringResponse(200, h, resp)); | 2732 return new async.Future.value(stringResponse(200, h, resp)); |
| 2733 }), true); | 2733 }), true); |
| 2734 res.create(arg_request).then(unittest.expectAsync(((api.Operation response
) { | 2734 res.create(arg_request).then(unittest.expectAsync1(((api.Operation respons
e) { |
| 2735 checkOperation(response); | 2735 checkOperation(response); |
| 2736 }))); | 2736 }))); |
| 2737 }); | 2737 }); |
| 2738 | 2738 |
| 2739 unittest.test("method--delete", () { | 2739 unittest.test("method--delete", () { |
| 2740 | 2740 |
| 2741 var mock = new HttpServerMock(); | 2741 var mock = new HttpServerMock(); |
| 2742 api.ProjectsResourceApi res = new api.CloudresourcemanagerApi(mock).projec
ts; | 2742 api.ProjectsResourceApi res = new api.CloudresourcemanagerApi(mock).projec
ts; |
| 2743 var arg_projectId = "foo"; | 2743 var arg_projectId = "foo"; |
| 2744 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2744 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 2745 var path = (req.url).path; | 2745 var path = (req.url).path; |
| 2746 var pathOffset = 0; | 2746 var pathOffset = 0; |
| 2747 var index; | 2747 var index; |
| 2748 var subPart; | 2748 var subPart; |
| 2749 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2749 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 2750 pathOffset += 1; | 2750 pathOffset += 1; |
| 2751 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("v1/projects/")); | 2751 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("v1/projects/")); |
| 2752 pathOffset += 12; | 2752 pathOffset += 12; |
| 2753 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | 2753 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); |
| 2754 pathOffset = path.length; | 2754 pathOffset = path.length; |
| (...skipping 16 matching lines...) Expand all Loading... |
| 2771 } | 2771 } |
| 2772 } | 2772 } |
| 2773 | 2773 |
| 2774 | 2774 |
| 2775 var h = { | 2775 var h = { |
| 2776 "content-type" : "application/json; charset=utf-8", | 2776 "content-type" : "application/json; charset=utf-8", |
| 2777 }; | 2777 }; |
| 2778 var resp = convert.JSON.encode(buildEmpty()); | 2778 var resp = convert.JSON.encode(buildEmpty()); |
| 2779 return new async.Future.value(stringResponse(200, h, resp)); | 2779 return new async.Future.value(stringResponse(200, h, resp)); |
| 2780 }), true); | 2780 }), true); |
| 2781 res.delete(arg_projectId).then(unittest.expectAsync(((api.Empty response)
{ | 2781 res.delete(arg_projectId).then(unittest.expectAsync1(((api.Empty response)
{ |
| 2782 checkEmpty(response); | 2782 checkEmpty(response); |
| 2783 }))); | 2783 }))); |
| 2784 }); | 2784 }); |
| 2785 | 2785 |
| 2786 unittest.test("method--get", () { | 2786 unittest.test("method--get", () { |
| 2787 | 2787 |
| 2788 var mock = new HttpServerMock(); | 2788 var mock = new HttpServerMock(); |
| 2789 api.ProjectsResourceApi res = new api.CloudresourcemanagerApi(mock).projec
ts; | 2789 api.ProjectsResourceApi res = new api.CloudresourcemanagerApi(mock).projec
ts; |
| 2790 var arg_projectId = "foo"; | 2790 var arg_projectId = "foo"; |
| 2791 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2791 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 2792 var path = (req.url).path; | 2792 var path = (req.url).path; |
| 2793 var pathOffset = 0; | 2793 var pathOffset = 0; |
| 2794 var index; | 2794 var index; |
| 2795 var subPart; | 2795 var subPart; |
| 2796 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2796 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 2797 pathOffset += 1; | 2797 pathOffset += 1; |
| 2798 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("v1/projects/")); | 2798 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("v1/projects/")); |
| 2799 pathOffset += 12; | 2799 pathOffset += 12; |
| 2800 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | 2800 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); |
| 2801 pathOffset = path.length; | 2801 pathOffset = path.length; |
| (...skipping 16 matching lines...) Expand all Loading... |
| 2818 } | 2818 } |
| 2819 } | 2819 } |
| 2820 | 2820 |
| 2821 | 2821 |
| 2822 var h = { | 2822 var h = { |
| 2823 "content-type" : "application/json; charset=utf-8", | 2823 "content-type" : "application/json; charset=utf-8", |
| 2824 }; | 2824 }; |
| 2825 var resp = convert.JSON.encode(buildProject()); | 2825 var resp = convert.JSON.encode(buildProject()); |
| 2826 return new async.Future.value(stringResponse(200, h, resp)); | 2826 return new async.Future.value(stringResponse(200, h, resp)); |
| 2827 }), true); | 2827 }), true); |
| 2828 res.get(arg_projectId).then(unittest.expectAsync(((api.Project response) { | 2828 res.get(arg_projectId).then(unittest.expectAsync1(((api.Project response)
{ |
| 2829 checkProject(response); | 2829 checkProject(response); |
| 2830 }))); | 2830 }))); |
| 2831 }); | 2831 }); |
| 2832 | 2832 |
| 2833 unittest.test("method--getAncestry", () { | 2833 unittest.test("method--getAncestry", () { |
| 2834 | 2834 |
| 2835 var mock = new HttpServerMock(); | 2835 var mock = new HttpServerMock(); |
| 2836 api.ProjectsResourceApi res = new api.CloudresourcemanagerApi(mock).projec
ts; | 2836 api.ProjectsResourceApi res = new api.CloudresourcemanagerApi(mock).projec
ts; |
| 2837 var arg_request = buildGetAncestryRequest(); | 2837 var arg_request = buildGetAncestryRequest(); |
| 2838 var arg_projectId = "foo"; | 2838 var arg_projectId = "foo"; |
| 2839 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2839 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 2840 var obj = new api.GetAncestryRequest.fromJson(json); | 2840 var obj = new api.GetAncestryRequest.fromJson(json); |
| 2841 checkGetAncestryRequest(obj); | 2841 checkGetAncestryRequest(obj); |
| 2842 | 2842 |
| 2843 var path = (req.url).path; | 2843 var path = (req.url).path; |
| 2844 var pathOffset = 0; | 2844 var pathOffset = 0; |
| 2845 var index; | 2845 var index; |
| 2846 var subPart; | 2846 var subPart; |
| 2847 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2847 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 2848 pathOffset += 1; | 2848 pathOffset += 1; |
| 2849 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("v1/projects/")); | 2849 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("v1/projects/")); |
| (...skipping 23 matching lines...) Expand all Loading... |
| 2873 } | 2873 } |
| 2874 } | 2874 } |
| 2875 | 2875 |
| 2876 | 2876 |
| 2877 var h = { | 2877 var h = { |
| 2878 "content-type" : "application/json; charset=utf-8", | 2878 "content-type" : "application/json; charset=utf-8", |
| 2879 }; | 2879 }; |
| 2880 var resp = convert.JSON.encode(buildGetAncestryResponse()); | 2880 var resp = convert.JSON.encode(buildGetAncestryResponse()); |
| 2881 return new async.Future.value(stringResponse(200, h, resp)); | 2881 return new async.Future.value(stringResponse(200, h, resp)); |
| 2882 }), true); | 2882 }), true); |
| 2883 res.getAncestry(arg_request, arg_projectId).then(unittest.expectAsync(((ap
i.GetAncestryResponse response) { | 2883 res.getAncestry(arg_request, arg_projectId).then(unittest.expectAsync1(((a
pi.GetAncestryResponse response) { |
| 2884 checkGetAncestryResponse(response); | 2884 checkGetAncestryResponse(response); |
| 2885 }))); | 2885 }))); |
| 2886 }); | 2886 }); |
| 2887 | 2887 |
| 2888 unittest.test("method--getEffectiveOrgPolicy", () { | 2888 unittest.test("method--getEffectiveOrgPolicy", () { |
| 2889 | 2889 |
| 2890 var mock = new HttpServerMock(); | 2890 var mock = new HttpServerMock(); |
| 2891 api.ProjectsResourceApi res = new api.CloudresourcemanagerApi(mock).projec
ts; | 2891 api.ProjectsResourceApi res = new api.CloudresourcemanagerApi(mock).projec
ts; |
| 2892 var arg_request = buildGetEffectiveOrgPolicyRequest(); | 2892 var arg_request = buildGetEffectiveOrgPolicyRequest(); |
| 2893 var arg_resource = "foo"; | 2893 var arg_resource = "foo"; |
| 2894 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2894 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 2895 var obj = new api.GetEffectiveOrgPolicyRequest.fromJson(json); | 2895 var obj = new api.GetEffectiveOrgPolicyRequest.fromJson(json); |
| 2896 checkGetEffectiveOrgPolicyRequest(obj); | 2896 checkGetEffectiveOrgPolicyRequest(obj); |
| 2897 | 2897 |
| 2898 var path = (req.url).path; | 2898 var path = (req.url).path; |
| 2899 var pathOffset = 0; | 2899 var pathOffset = 0; |
| 2900 var index; | 2900 var index; |
| 2901 var subPart; | 2901 var subPart; |
| 2902 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2902 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 2903 pathOffset += 1; | 2903 pathOffset += 1; |
| 2904 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); | 2904 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); |
| (...skipping 17 matching lines...) Expand all Loading... |
| 2922 } | 2922 } |
| 2923 } | 2923 } |
| 2924 | 2924 |
| 2925 | 2925 |
| 2926 var h = { | 2926 var h = { |
| 2927 "content-type" : "application/json; charset=utf-8", | 2927 "content-type" : "application/json; charset=utf-8", |
| 2928 }; | 2928 }; |
| 2929 var resp = convert.JSON.encode(buildOrgPolicy()); | 2929 var resp = convert.JSON.encode(buildOrgPolicy()); |
| 2930 return new async.Future.value(stringResponse(200, h, resp)); | 2930 return new async.Future.value(stringResponse(200, h, resp)); |
| 2931 }), true); | 2931 }), true); |
| 2932 res.getEffectiveOrgPolicy(arg_request, arg_resource).then(unittest.expectA
sync(((api.OrgPolicy response) { | 2932 res.getEffectiveOrgPolicy(arg_request, arg_resource).then(unittest.expectA
sync1(((api.OrgPolicy response) { |
| 2933 checkOrgPolicy(response); | 2933 checkOrgPolicy(response); |
| 2934 }))); | 2934 }))); |
| 2935 }); | 2935 }); |
| 2936 | 2936 |
| 2937 unittest.test("method--getIamPolicy", () { | 2937 unittest.test("method--getIamPolicy", () { |
| 2938 | 2938 |
| 2939 var mock = new HttpServerMock(); | 2939 var mock = new HttpServerMock(); |
| 2940 api.ProjectsResourceApi res = new api.CloudresourcemanagerApi(mock).projec
ts; | 2940 api.ProjectsResourceApi res = new api.CloudresourcemanagerApi(mock).projec
ts; |
| 2941 var arg_request = buildGetIamPolicyRequest(); | 2941 var arg_request = buildGetIamPolicyRequest(); |
| 2942 var arg_resource = "foo"; | 2942 var arg_resource = "foo"; |
| 2943 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2943 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 2944 var obj = new api.GetIamPolicyRequest.fromJson(json); | 2944 var obj = new api.GetIamPolicyRequest.fromJson(json); |
| 2945 checkGetIamPolicyRequest(obj); | 2945 checkGetIamPolicyRequest(obj); |
| 2946 | 2946 |
| 2947 var path = (req.url).path; | 2947 var path = (req.url).path; |
| 2948 var pathOffset = 0; | 2948 var pathOffset = 0; |
| 2949 var index; | 2949 var index; |
| 2950 var subPart; | 2950 var subPart; |
| 2951 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2951 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 2952 pathOffset += 1; | 2952 pathOffset += 1; |
| 2953 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("v1/projects/")); | 2953 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("v1/projects/")); |
| (...skipping 23 matching lines...) Expand all Loading... |
| 2977 } | 2977 } |
| 2978 } | 2978 } |
| 2979 | 2979 |
| 2980 | 2980 |
| 2981 var h = { | 2981 var h = { |
| 2982 "content-type" : "application/json; charset=utf-8", | 2982 "content-type" : "application/json; charset=utf-8", |
| 2983 }; | 2983 }; |
| 2984 var resp = convert.JSON.encode(buildPolicy()); | 2984 var resp = convert.JSON.encode(buildPolicy()); |
| 2985 return new async.Future.value(stringResponse(200, h, resp)); | 2985 return new async.Future.value(stringResponse(200, h, resp)); |
| 2986 }), true); | 2986 }), true); |
| 2987 res.getIamPolicy(arg_request, arg_resource).then(unittest.expectAsync(((ap
i.Policy response) { | 2987 res.getIamPolicy(arg_request, arg_resource).then(unittest.expectAsync1(((a
pi.Policy response) { |
| 2988 checkPolicy(response); | 2988 checkPolicy(response); |
| 2989 }))); | 2989 }))); |
| 2990 }); | 2990 }); |
| 2991 | 2991 |
| 2992 unittest.test("method--getOrgPolicy", () { | 2992 unittest.test("method--getOrgPolicy", () { |
| 2993 | 2993 |
| 2994 var mock = new HttpServerMock(); | 2994 var mock = new HttpServerMock(); |
| 2995 api.ProjectsResourceApi res = new api.CloudresourcemanagerApi(mock).projec
ts; | 2995 api.ProjectsResourceApi res = new api.CloudresourcemanagerApi(mock).projec
ts; |
| 2996 var arg_request = buildGetOrgPolicyRequest(); | 2996 var arg_request = buildGetOrgPolicyRequest(); |
| 2997 var arg_resource = "foo"; | 2997 var arg_resource = "foo"; |
| 2998 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2998 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 2999 var obj = new api.GetOrgPolicyRequest.fromJson(json); | 2999 var obj = new api.GetOrgPolicyRequest.fromJson(json); |
| 3000 checkGetOrgPolicyRequest(obj); | 3000 checkGetOrgPolicyRequest(obj); |
| 3001 | 3001 |
| 3002 var path = (req.url).path; | 3002 var path = (req.url).path; |
| 3003 var pathOffset = 0; | 3003 var pathOffset = 0; |
| 3004 var index; | 3004 var index; |
| 3005 var subPart; | 3005 var subPart; |
| 3006 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 3006 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 3007 pathOffset += 1; | 3007 pathOffset += 1; |
| 3008 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); | 3008 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); |
| (...skipping 17 matching lines...) Expand all Loading... |
| 3026 } | 3026 } |
| 3027 } | 3027 } |
| 3028 | 3028 |
| 3029 | 3029 |
| 3030 var h = { | 3030 var h = { |
| 3031 "content-type" : "application/json; charset=utf-8", | 3031 "content-type" : "application/json; charset=utf-8", |
| 3032 }; | 3032 }; |
| 3033 var resp = convert.JSON.encode(buildOrgPolicy()); | 3033 var resp = convert.JSON.encode(buildOrgPolicy()); |
| 3034 return new async.Future.value(stringResponse(200, h, resp)); | 3034 return new async.Future.value(stringResponse(200, h, resp)); |
| 3035 }), true); | 3035 }), true); |
| 3036 res.getOrgPolicy(arg_request, arg_resource).then(unittest.expectAsync(((ap
i.OrgPolicy response) { | 3036 res.getOrgPolicy(arg_request, arg_resource).then(unittest.expectAsync1(((a
pi.OrgPolicy response) { |
| 3037 checkOrgPolicy(response); | 3037 checkOrgPolicy(response); |
| 3038 }))); | 3038 }))); |
| 3039 }); | 3039 }); |
| 3040 | 3040 |
| 3041 unittest.test("method--list", () { | 3041 unittest.test("method--list", () { |
| 3042 | 3042 |
| 3043 var mock = new HttpServerMock(); | 3043 var mock = new HttpServerMock(); |
| 3044 api.ProjectsResourceApi res = new api.CloudresourcemanagerApi(mock).projec
ts; | 3044 api.ProjectsResourceApi res = new api.CloudresourcemanagerApi(mock).projec
ts; |
| 3045 var arg_pageToken = "foo"; | 3045 var arg_pageToken = "foo"; |
| 3046 var arg_pageSize = 42; | 3046 var arg_pageSize = 42; |
| 3047 var arg_filter = "foo"; | 3047 var arg_filter = "foo"; |
| 3048 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 3048 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 3049 var path = (req.url).path; | 3049 var path = (req.url).path; |
| 3050 var pathOffset = 0; | 3050 var pathOffset = 0; |
| 3051 var index; | 3051 var index; |
| 3052 var subPart; | 3052 var subPart; |
| 3053 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 3053 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 3054 pathOffset += 1; | 3054 pathOffset += 1; |
| 3055 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("v1/projects")); | 3055 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("v1/projects")); |
| 3056 pathOffset += 11; | 3056 pathOffset += 11; |
| 3057 | 3057 |
| 3058 var query = (req.url).query; | 3058 var query = (req.url).query; |
| (...skipping 16 matching lines...) Expand all Loading... |
| 3075 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ
als(arg_pageSize)); | 3075 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ
als(arg_pageSize)); |
| 3076 unittest.expect(queryMap["filter"].first, unittest.equals(arg_filter)); | 3076 unittest.expect(queryMap["filter"].first, unittest.equals(arg_filter)); |
| 3077 | 3077 |
| 3078 | 3078 |
| 3079 var h = { | 3079 var h = { |
| 3080 "content-type" : "application/json; charset=utf-8", | 3080 "content-type" : "application/json; charset=utf-8", |
| 3081 }; | 3081 }; |
| 3082 var resp = convert.JSON.encode(buildListProjectsResponse()); | 3082 var resp = convert.JSON.encode(buildListProjectsResponse()); |
| 3083 return new async.Future.value(stringResponse(200, h, resp)); | 3083 return new async.Future.value(stringResponse(200, h, resp)); |
| 3084 }), true); | 3084 }), true); |
| 3085 res.list(pageToken: arg_pageToken, pageSize: arg_pageSize, filter: arg_fil
ter).then(unittest.expectAsync(((api.ListProjectsResponse response) { | 3085 res.list(pageToken: arg_pageToken, pageSize: arg_pageSize, filter: arg_fil
ter).then(unittest.expectAsync1(((api.ListProjectsResponse response) { |
| 3086 checkListProjectsResponse(response); | 3086 checkListProjectsResponse(response); |
| 3087 }))); | 3087 }))); |
| 3088 }); | 3088 }); |
| 3089 | 3089 |
| 3090 unittest.test("method--listAvailableOrgPolicyConstraints", () { | 3090 unittest.test("method--listAvailableOrgPolicyConstraints", () { |
| 3091 | 3091 |
| 3092 var mock = new HttpServerMock(); | 3092 var mock = new HttpServerMock(); |
| 3093 api.ProjectsResourceApi res = new api.CloudresourcemanagerApi(mock).projec
ts; | 3093 api.ProjectsResourceApi res = new api.CloudresourcemanagerApi(mock).projec
ts; |
| 3094 var arg_request = buildListAvailableOrgPolicyConstraintsRequest(); | 3094 var arg_request = buildListAvailableOrgPolicyConstraintsRequest(); |
| 3095 var arg_resource = "foo"; | 3095 var arg_resource = "foo"; |
| 3096 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 3096 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 3097 var obj = new api.ListAvailableOrgPolicyConstraintsRequest.fromJson(json
); | 3097 var obj = new api.ListAvailableOrgPolicyConstraintsRequest.fromJson(json
); |
| 3098 checkListAvailableOrgPolicyConstraintsRequest(obj); | 3098 checkListAvailableOrgPolicyConstraintsRequest(obj); |
| 3099 | 3099 |
| 3100 var path = (req.url).path; | 3100 var path = (req.url).path; |
| 3101 var pathOffset = 0; | 3101 var pathOffset = 0; |
| 3102 var index; | 3102 var index; |
| 3103 var subPart; | 3103 var subPart; |
| 3104 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 3104 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 3105 pathOffset += 1; | 3105 pathOffset += 1; |
| 3106 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); | 3106 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); |
| (...skipping 17 matching lines...) Expand all Loading... |
| 3124 } | 3124 } |
| 3125 } | 3125 } |
| 3126 | 3126 |
| 3127 | 3127 |
| 3128 var h = { | 3128 var h = { |
| 3129 "content-type" : "application/json; charset=utf-8", | 3129 "content-type" : "application/json; charset=utf-8", |
| 3130 }; | 3130 }; |
| 3131 var resp = convert.JSON.encode(buildListAvailableOrgPolicyConstraintsRes
ponse()); | 3131 var resp = convert.JSON.encode(buildListAvailableOrgPolicyConstraintsRes
ponse()); |
| 3132 return new async.Future.value(stringResponse(200, h, resp)); | 3132 return new async.Future.value(stringResponse(200, h, resp)); |
| 3133 }), true); | 3133 }), true); |
| 3134 res.listAvailableOrgPolicyConstraints(arg_request, arg_resource).then(unit
test.expectAsync(((api.ListAvailableOrgPolicyConstraintsResponse response) { | 3134 res.listAvailableOrgPolicyConstraints(arg_request, arg_resource).then(unit
test.expectAsync1(((api.ListAvailableOrgPolicyConstraintsResponse response) { |
| 3135 checkListAvailableOrgPolicyConstraintsResponse(response); | 3135 checkListAvailableOrgPolicyConstraintsResponse(response); |
| 3136 }))); | 3136 }))); |
| 3137 }); | 3137 }); |
| 3138 | 3138 |
| 3139 unittest.test("method--listOrgPolicies", () { | 3139 unittest.test("method--listOrgPolicies", () { |
| 3140 | 3140 |
| 3141 var mock = new HttpServerMock(); | 3141 var mock = new HttpServerMock(); |
| 3142 api.ProjectsResourceApi res = new api.CloudresourcemanagerApi(mock).projec
ts; | 3142 api.ProjectsResourceApi res = new api.CloudresourcemanagerApi(mock).projec
ts; |
| 3143 var arg_request = buildListOrgPoliciesRequest(); | 3143 var arg_request = buildListOrgPoliciesRequest(); |
| 3144 var arg_resource = "foo"; | 3144 var arg_resource = "foo"; |
| 3145 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 3145 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 3146 var obj = new api.ListOrgPoliciesRequest.fromJson(json); | 3146 var obj = new api.ListOrgPoliciesRequest.fromJson(json); |
| 3147 checkListOrgPoliciesRequest(obj); | 3147 checkListOrgPoliciesRequest(obj); |
| 3148 | 3148 |
| 3149 var path = (req.url).path; | 3149 var path = (req.url).path; |
| 3150 var pathOffset = 0; | 3150 var pathOffset = 0; |
| 3151 var index; | 3151 var index; |
| 3152 var subPart; | 3152 var subPart; |
| 3153 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 3153 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 3154 pathOffset += 1; | 3154 pathOffset += 1; |
| 3155 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); | 3155 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); |
| (...skipping 17 matching lines...) Expand all Loading... |
| 3173 } | 3173 } |
| 3174 } | 3174 } |
| 3175 | 3175 |
| 3176 | 3176 |
| 3177 var h = { | 3177 var h = { |
| 3178 "content-type" : "application/json; charset=utf-8", | 3178 "content-type" : "application/json; charset=utf-8", |
| 3179 }; | 3179 }; |
| 3180 var resp = convert.JSON.encode(buildListOrgPoliciesResponse()); | 3180 var resp = convert.JSON.encode(buildListOrgPoliciesResponse()); |
| 3181 return new async.Future.value(stringResponse(200, h, resp)); | 3181 return new async.Future.value(stringResponse(200, h, resp)); |
| 3182 }), true); | 3182 }), true); |
| 3183 res.listOrgPolicies(arg_request, arg_resource).then(unittest.expectAsync((
(api.ListOrgPoliciesResponse response) { | 3183 res.listOrgPolicies(arg_request, arg_resource).then(unittest.expectAsync1(
((api.ListOrgPoliciesResponse response) { |
| 3184 checkListOrgPoliciesResponse(response); | 3184 checkListOrgPoliciesResponse(response); |
| 3185 }))); | 3185 }))); |
| 3186 }); | 3186 }); |
| 3187 | 3187 |
| 3188 unittest.test("method--setIamPolicy", () { | 3188 unittest.test("method--setIamPolicy", () { |
| 3189 | 3189 |
| 3190 var mock = new HttpServerMock(); | 3190 var mock = new HttpServerMock(); |
| 3191 api.ProjectsResourceApi res = new api.CloudresourcemanagerApi(mock).projec
ts; | 3191 api.ProjectsResourceApi res = new api.CloudresourcemanagerApi(mock).projec
ts; |
| 3192 var arg_request = buildSetIamPolicyRequest(); | 3192 var arg_request = buildSetIamPolicyRequest(); |
| 3193 var arg_resource = "foo"; | 3193 var arg_resource = "foo"; |
| 3194 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 3194 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 3195 var obj = new api.SetIamPolicyRequest.fromJson(json); | 3195 var obj = new api.SetIamPolicyRequest.fromJson(json); |
| 3196 checkSetIamPolicyRequest(obj); | 3196 checkSetIamPolicyRequest(obj); |
| 3197 | 3197 |
| 3198 var path = (req.url).path; | 3198 var path = (req.url).path; |
| 3199 var pathOffset = 0; | 3199 var pathOffset = 0; |
| 3200 var index; | 3200 var index; |
| 3201 var subPart; | 3201 var subPart; |
| 3202 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 3202 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 3203 pathOffset += 1; | 3203 pathOffset += 1; |
| 3204 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("v1/projects/")); | 3204 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("v1/projects/")); |
| (...skipping 23 matching lines...) Expand all Loading... |
| 3228 } | 3228 } |
| 3229 } | 3229 } |
| 3230 | 3230 |
| 3231 | 3231 |
| 3232 var h = { | 3232 var h = { |
| 3233 "content-type" : "application/json; charset=utf-8", | 3233 "content-type" : "application/json; charset=utf-8", |
| 3234 }; | 3234 }; |
| 3235 var resp = convert.JSON.encode(buildPolicy()); | 3235 var resp = convert.JSON.encode(buildPolicy()); |
| 3236 return new async.Future.value(stringResponse(200, h, resp)); | 3236 return new async.Future.value(stringResponse(200, h, resp)); |
| 3237 }), true); | 3237 }), true); |
| 3238 res.setIamPolicy(arg_request, arg_resource).then(unittest.expectAsync(((ap
i.Policy response) { | 3238 res.setIamPolicy(arg_request, arg_resource).then(unittest.expectAsync1(((a
pi.Policy response) { |
| 3239 checkPolicy(response); | 3239 checkPolicy(response); |
| 3240 }))); | 3240 }))); |
| 3241 }); | 3241 }); |
| 3242 | 3242 |
| 3243 unittest.test("method--setOrgPolicy", () { | 3243 unittest.test("method--setOrgPolicy", () { |
| 3244 | 3244 |
| 3245 var mock = new HttpServerMock(); | 3245 var mock = new HttpServerMock(); |
| 3246 api.ProjectsResourceApi res = new api.CloudresourcemanagerApi(mock).projec
ts; | 3246 api.ProjectsResourceApi res = new api.CloudresourcemanagerApi(mock).projec
ts; |
| 3247 var arg_request = buildSetOrgPolicyRequest(); | 3247 var arg_request = buildSetOrgPolicyRequest(); |
| 3248 var arg_resource = "foo"; | 3248 var arg_resource = "foo"; |
| 3249 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 3249 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 3250 var obj = new api.SetOrgPolicyRequest.fromJson(json); | 3250 var obj = new api.SetOrgPolicyRequest.fromJson(json); |
| 3251 checkSetOrgPolicyRequest(obj); | 3251 checkSetOrgPolicyRequest(obj); |
| 3252 | 3252 |
| 3253 var path = (req.url).path; | 3253 var path = (req.url).path; |
| 3254 var pathOffset = 0; | 3254 var pathOffset = 0; |
| 3255 var index; | 3255 var index; |
| 3256 var subPart; | 3256 var subPart; |
| 3257 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 3257 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 3258 pathOffset += 1; | 3258 pathOffset += 1; |
| 3259 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); | 3259 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); |
| (...skipping 17 matching lines...) Expand all Loading... |
| 3277 } | 3277 } |
| 3278 } | 3278 } |
| 3279 | 3279 |
| 3280 | 3280 |
| 3281 var h = { | 3281 var h = { |
| 3282 "content-type" : "application/json; charset=utf-8", | 3282 "content-type" : "application/json; charset=utf-8", |
| 3283 }; | 3283 }; |
| 3284 var resp = convert.JSON.encode(buildOrgPolicy()); | 3284 var resp = convert.JSON.encode(buildOrgPolicy()); |
| 3285 return new async.Future.value(stringResponse(200, h, resp)); | 3285 return new async.Future.value(stringResponse(200, h, resp)); |
| 3286 }), true); | 3286 }), true); |
| 3287 res.setOrgPolicy(arg_request, arg_resource).then(unittest.expectAsync(((ap
i.OrgPolicy response) { | 3287 res.setOrgPolicy(arg_request, arg_resource).then(unittest.expectAsync1(((a
pi.OrgPolicy response) { |
| 3288 checkOrgPolicy(response); | 3288 checkOrgPolicy(response); |
| 3289 }))); | 3289 }))); |
| 3290 }); | 3290 }); |
| 3291 | 3291 |
| 3292 unittest.test("method--testIamPermissions", () { | 3292 unittest.test("method--testIamPermissions", () { |
| 3293 | 3293 |
| 3294 var mock = new HttpServerMock(); | 3294 var mock = new HttpServerMock(); |
| 3295 api.ProjectsResourceApi res = new api.CloudresourcemanagerApi(mock).projec
ts; | 3295 api.ProjectsResourceApi res = new api.CloudresourcemanagerApi(mock).projec
ts; |
| 3296 var arg_request = buildTestIamPermissionsRequest(); | 3296 var arg_request = buildTestIamPermissionsRequest(); |
| 3297 var arg_resource = "foo"; | 3297 var arg_resource = "foo"; |
| 3298 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 3298 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 3299 var obj = new api.TestIamPermissionsRequest.fromJson(json); | 3299 var obj = new api.TestIamPermissionsRequest.fromJson(json); |
| 3300 checkTestIamPermissionsRequest(obj); | 3300 checkTestIamPermissionsRequest(obj); |
| 3301 | 3301 |
| 3302 var path = (req.url).path; | 3302 var path = (req.url).path; |
| 3303 var pathOffset = 0; | 3303 var pathOffset = 0; |
| 3304 var index; | 3304 var index; |
| 3305 var subPart; | 3305 var subPart; |
| 3306 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 3306 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 3307 pathOffset += 1; | 3307 pathOffset += 1; |
| 3308 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("v1/projects/")); | 3308 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("v1/projects/")); |
| (...skipping 23 matching lines...) Expand all Loading... |
| 3332 } | 3332 } |
| 3333 } | 3333 } |
| 3334 | 3334 |
| 3335 | 3335 |
| 3336 var h = { | 3336 var h = { |
| 3337 "content-type" : "application/json; charset=utf-8", | 3337 "content-type" : "application/json; charset=utf-8", |
| 3338 }; | 3338 }; |
| 3339 var resp = convert.JSON.encode(buildTestIamPermissionsResponse()); | 3339 var resp = convert.JSON.encode(buildTestIamPermissionsResponse()); |
| 3340 return new async.Future.value(stringResponse(200, h, resp)); | 3340 return new async.Future.value(stringResponse(200, h, resp)); |
| 3341 }), true); | 3341 }), true); |
| 3342 res.testIamPermissions(arg_request, arg_resource).then(unittest.expectAsyn
c(((api.TestIamPermissionsResponse response) { | 3342 res.testIamPermissions(arg_request, arg_resource).then(unittest.expectAsyn
c1(((api.TestIamPermissionsResponse response) { |
| 3343 checkTestIamPermissionsResponse(response); | 3343 checkTestIamPermissionsResponse(response); |
| 3344 }))); | 3344 }))); |
| 3345 }); | 3345 }); |
| 3346 | 3346 |
| 3347 unittest.test("method--undelete", () { | 3347 unittest.test("method--undelete", () { |
| 3348 | 3348 |
| 3349 var mock = new HttpServerMock(); | 3349 var mock = new HttpServerMock(); |
| 3350 api.ProjectsResourceApi res = new api.CloudresourcemanagerApi(mock).projec
ts; | 3350 api.ProjectsResourceApi res = new api.CloudresourcemanagerApi(mock).projec
ts; |
| 3351 var arg_request = buildUndeleteProjectRequest(); | 3351 var arg_request = buildUndeleteProjectRequest(); |
| 3352 var arg_projectId = "foo"; | 3352 var arg_projectId = "foo"; |
| 3353 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 3353 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 3354 var obj = new api.UndeleteProjectRequest.fromJson(json); | 3354 var obj = new api.UndeleteProjectRequest.fromJson(json); |
| 3355 checkUndeleteProjectRequest(obj); | 3355 checkUndeleteProjectRequest(obj); |
| 3356 | 3356 |
| 3357 var path = (req.url).path; | 3357 var path = (req.url).path; |
| 3358 var pathOffset = 0; | 3358 var pathOffset = 0; |
| 3359 var index; | 3359 var index; |
| 3360 var subPart; | 3360 var subPart; |
| 3361 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 3361 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 3362 pathOffset += 1; | 3362 pathOffset += 1; |
| 3363 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("v1/projects/")); | 3363 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("v1/projects/")); |
| (...skipping 23 matching lines...) Expand all Loading... |
| 3387 } | 3387 } |
| 3388 } | 3388 } |
| 3389 | 3389 |
| 3390 | 3390 |
| 3391 var h = { | 3391 var h = { |
| 3392 "content-type" : "application/json; charset=utf-8", | 3392 "content-type" : "application/json; charset=utf-8", |
| 3393 }; | 3393 }; |
| 3394 var resp = convert.JSON.encode(buildEmpty()); | 3394 var resp = convert.JSON.encode(buildEmpty()); |
| 3395 return new async.Future.value(stringResponse(200, h, resp)); | 3395 return new async.Future.value(stringResponse(200, h, resp)); |
| 3396 }), true); | 3396 }), true); |
| 3397 res.undelete(arg_request, arg_projectId).then(unittest.expectAsync(((api.E
mpty response) { | 3397 res.undelete(arg_request, arg_projectId).then(unittest.expectAsync1(((api.
Empty response) { |
| 3398 checkEmpty(response); | 3398 checkEmpty(response); |
| 3399 }))); | 3399 }))); |
| 3400 }); | 3400 }); |
| 3401 | 3401 |
| 3402 unittest.test("method--update", () { | 3402 unittest.test("method--update", () { |
| 3403 | 3403 |
| 3404 var mock = new HttpServerMock(); | 3404 var mock = new HttpServerMock(); |
| 3405 api.ProjectsResourceApi res = new api.CloudresourcemanagerApi(mock).projec
ts; | 3405 api.ProjectsResourceApi res = new api.CloudresourcemanagerApi(mock).projec
ts; |
| 3406 var arg_request = buildProject(); | 3406 var arg_request = buildProject(); |
| 3407 var arg_projectId = "foo"; | 3407 var arg_projectId = "foo"; |
| 3408 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 3408 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 3409 var obj = new api.Project.fromJson(json); | 3409 var obj = new api.Project.fromJson(json); |
| 3410 checkProject(obj); | 3410 checkProject(obj); |
| 3411 | 3411 |
| 3412 var path = (req.url).path; | 3412 var path = (req.url).path; |
| 3413 var pathOffset = 0; | 3413 var pathOffset = 0; |
| 3414 var index; | 3414 var index; |
| 3415 var subPart; | 3415 var subPart; |
| 3416 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 3416 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 3417 pathOffset += 1; | 3417 pathOffset += 1; |
| 3418 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("v1/projects/")); | 3418 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("v1/projects/")); |
| (...skipping 19 matching lines...) Expand all Loading... |
| 3438 } | 3438 } |
| 3439 } | 3439 } |
| 3440 | 3440 |
| 3441 | 3441 |
| 3442 var h = { | 3442 var h = { |
| 3443 "content-type" : "application/json; charset=utf-8", | 3443 "content-type" : "application/json; charset=utf-8", |
| 3444 }; | 3444 }; |
| 3445 var resp = convert.JSON.encode(buildProject()); | 3445 var resp = convert.JSON.encode(buildProject()); |
| 3446 return new async.Future.value(stringResponse(200, h, resp)); | 3446 return new async.Future.value(stringResponse(200, h, resp)); |
| 3447 }), true); | 3447 }), true); |
| 3448 res.update(arg_request, arg_projectId).then(unittest.expectAsync(((api.Pro
ject response) { | 3448 res.update(arg_request, arg_projectId).then(unittest.expectAsync1(((api.Pr
oject response) { |
| 3449 checkProject(response); | 3449 checkProject(response); |
| 3450 }))); | 3450 }))); |
| 3451 }); | 3451 }); |
| 3452 | 3452 |
| 3453 }); | 3453 }); |
| 3454 | 3454 |
| 3455 | 3455 |
| 3456 } | 3456 } |
| 3457 | 3457 |
| OLD | NEW |