| OLD | NEW |
| 1 library googleapis.spanner.v1.test; | 1 library googleapis.spanner.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/spanner/v1.dart' as api; | 12 import 'package:googleapis/spanner/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 buildUnnamed1957() { | 54 buildUnnamed1967() { |
| 55 var o = new core.List<api.AuditLogConfig>(); | 55 var o = new core.List<api.AuditLogConfig>(); |
| 56 o.add(buildAuditLogConfig()); | 56 o.add(buildAuditLogConfig()); |
| 57 o.add(buildAuditLogConfig()); | 57 o.add(buildAuditLogConfig()); |
| 58 return o; | 58 return o; |
| 59 } | 59 } |
| 60 | 60 |
| 61 checkUnnamed1957(core.List<api.AuditLogConfig> o) { | 61 checkUnnamed1967(core.List<api.AuditLogConfig> o) { |
| 62 unittest.expect(o, unittest.hasLength(2)); | 62 unittest.expect(o, unittest.hasLength(2)); |
| 63 checkAuditLogConfig(o[0]); | 63 checkAuditLogConfig(o[0]); |
| 64 checkAuditLogConfig(o[1]); | 64 checkAuditLogConfig(o[1]); |
| 65 } | 65 } |
| 66 | 66 |
| 67 buildUnnamed1958() { | 67 buildUnnamed1968() { |
| 68 var o = new core.List<core.String>(); | 68 var o = new core.List<core.String>(); |
| 69 o.add("foo"); | 69 o.add("foo"); |
| 70 o.add("foo"); | 70 o.add("foo"); |
| 71 return o; | 71 return o; |
| 72 } | 72 } |
| 73 | 73 |
| 74 checkUnnamed1958(core.List<core.String> o) { | 74 checkUnnamed1968(core.List<core.String> o) { |
| 75 unittest.expect(o, unittest.hasLength(2)); | 75 unittest.expect(o, unittest.hasLength(2)); |
| 76 unittest.expect(o[0], unittest.equals('foo')); | 76 unittest.expect(o[0], unittest.equals('foo')); |
| 77 unittest.expect(o[1], unittest.equals('foo')); | 77 unittest.expect(o[1], unittest.equals('foo')); |
| 78 } | 78 } |
| 79 | 79 |
| 80 core.int buildCounterAuditConfig = 0; | 80 core.int buildCounterAuditConfig = 0; |
| 81 buildAuditConfig() { | 81 buildAuditConfig() { |
| 82 var o = new api.AuditConfig(); | 82 var o = new api.AuditConfig(); |
| 83 buildCounterAuditConfig++; | 83 buildCounterAuditConfig++; |
| 84 if (buildCounterAuditConfig < 3) { | 84 if (buildCounterAuditConfig < 3) { |
| 85 o.auditLogConfigs = buildUnnamed1957(); | 85 o.auditLogConfigs = buildUnnamed1967(); |
| 86 o.exemptedMembers = buildUnnamed1958(); | 86 o.exemptedMembers = buildUnnamed1968(); |
| 87 o.service = "foo"; | 87 o.service = "foo"; |
| 88 } | 88 } |
| 89 buildCounterAuditConfig--; | 89 buildCounterAuditConfig--; |
| 90 return o; | 90 return o; |
| 91 } | 91 } |
| 92 | 92 |
| 93 checkAuditConfig(api.AuditConfig o) { | 93 checkAuditConfig(api.AuditConfig o) { |
| 94 buildCounterAuditConfig++; | 94 buildCounterAuditConfig++; |
| 95 if (buildCounterAuditConfig < 3) { | 95 if (buildCounterAuditConfig < 3) { |
| 96 checkUnnamed1957(o.auditLogConfigs); | 96 checkUnnamed1967(o.auditLogConfigs); |
| 97 checkUnnamed1958(o.exemptedMembers); | 97 checkUnnamed1968(o.exemptedMembers); |
| 98 unittest.expect(o.service, unittest.equals('foo')); | 98 unittest.expect(o.service, unittest.equals('foo')); |
| 99 } | 99 } |
| 100 buildCounterAuditConfig--; | 100 buildCounterAuditConfig--; |
| 101 } | 101 } |
| 102 | 102 |
| 103 buildUnnamed1959() { | 103 buildUnnamed1969() { |
| 104 var o = new core.List<core.String>(); | 104 var o = new core.List<core.String>(); |
| 105 o.add("foo"); | 105 o.add("foo"); |
| 106 o.add("foo"); | 106 o.add("foo"); |
| 107 return o; | 107 return o; |
| 108 } | 108 } |
| 109 | 109 |
| 110 checkUnnamed1959(core.List<core.String> o) { | 110 checkUnnamed1969(core.List<core.String> o) { |
| 111 unittest.expect(o, unittest.hasLength(2)); | 111 unittest.expect(o, unittest.hasLength(2)); |
| 112 unittest.expect(o[0], unittest.equals('foo')); | 112 unittest.expect(o[0], unittest.equals('foo')); |
| 113 unittest.expect(o[1], unittest.equals('foo')); | 113 unittest.expect(o[1], unittest.equals('foo')); |
| 114 } | 114 } |
| 115 | 115 |
| 116 core.int buildCounterAuditLogConfig = 0; | 116 core.int buildCounterAuditLogConfig = 0; |
| 117 buildAuditLogConfig() { | 117 buildAuditLogConfig() { |
| 118 var o = new api.AuditLogConfig(); | 118 var o = new api.AuditLogConfig(); |
| 119 buildCounterAuditLogConfig++; | 119 buildCounterAuditLogConfig++; |
| 120 if (buildCounterAuditLogConfig < 3) { | 120 if (buildCounterAuditLogConfig < 3) { |
| 121 o.exemptedMembers = buildUnnamed1959(); | 121 o.exemptedMembers = buildUnnamed1969(); |
| 122 o.logType = "foo"; | 122 o.logType = "foo"; |
| 123 } | 123 } |
| 124 buildCounterAuditLogConfig--; | 124 buildCounterAuditLogConfig--; |
| 125 return o; | 125 return o; |
| 126 } | 126 } |
| 127 | 127 |
| 128 checkAuditLogConfig(api.AuditLogConfig o) { | 128 checkAuditLogConfig(api.AuditLogConfig o) { |
| 129 buildCounterAuditLogConfig++; | 129 buildCounterAuditLogConfig++; |
| 130 if (buildCounterAuditLogConfig < 3) { | 130 if (buildCounterAuditLogConfig < 3) { |
| 131 checkUnnamed1959(o.exemptedMembers); | 131 checkUnnamed1969(o.exemptedMembers); |
| 132 unittest.expect(o.logType, unittest.equals('foo')); | 132 unittest.expect(o.logType, unittest.equals('foo')); |
| 133 } | 133 } |
| 134 buildCounterAuditLogConfig--; | 134 buildCounterAuditLogConfig--; |
| 135 } | 135 } |
| 136 | 136 |
| 137 core.int buildCounterBeginTransactionRequest = 0; | 137 core.int buildCounterBeginTransactionRequest = 0; |
| 138 buildBeginTransactionRequest() { | 138 buildBeginTransactionRequest() { |
| 139 var o = new api.BeginTransactionRequest(); | 139 var o = new api.BeginTransactionRequest(); |
| 140 buildCounterBeginTransactionRequest++; | 140 buildCounterBeginTransactionRequest++; |
| 141 if (buildCounterBeginTransactionRequest < 3) { | 141 if (buildCounterBeginTransactionRequest < 3) { |
| 142 o.options = buildTransactionOptions(); | 142 o.options = buildTransactionOptions(); |
| 143 } | 143 } |
| 144 buildCounterBeginTransactionRequest--; | 144 buildCounterBeginTransactionRequest--; |
| 145 return o; | 145 return o; |
| 146 } | 146 } |
| 147 | 147 |
| 148 checkBeginTransactionRequest(api.BeginTransactionRequest o) { | 148 checkBeginTransactionRequest(api.BeginTransactionRequest o) { |
| 149 buildCounterBeginTransactionRequest++; | 149 buildCounterBeginTransactionRequest++; |
| 150 if (buildCounterBeginTransactionRequest < 3) { | 150 if (buildCounterBeginTransactionRequest < 3) { |
| 151 checkTransactionOptions(o.options); | 151 checkTransactionOptions(o.options); |
| 152 } | 152 } |
| 153 buildCounterBeginTransactionRequest--; | 153 buildCounterBeginTransactionRequest--; |
| 154 } | 154 } |
| 155 | 155 |
| 156 buildUnnamed1960() { | 156 buildUnnamed1970() { |
| 157 var o = new core.List<core.String>(); | 157 var o = new core.List<core.String>(); |
| 158 o.add("foo"); | 158 o.add("foo"); |
| 159 o.add("foo"); | 159 o.add("foo"); |
| 160 return o; | 160 return o; |
| 161 } | 161 } |
| 162 | 162 |
| 163 checkUnnamed1960(core.List<core.String> o) { | 163 checkUnnamed1970(core.List<core.String> o) { |
| 164 unittest.expect(o, unittest.hasLength(2)); | 164 unittest.expect(o, unittest.hasLength(2)); |
| 165 unittest.expect(o[0], unittest.equals('foo')); | 165 unittest.expect(o[0], unittest.equals('foo')); |
| 166 unittest.expect(o[1], unittest.equals('foo')); | 166 unittest.expect(o[1], unittest.equals('foo')); |
| 167 } | 167 } |
| 168 | 168 |
| 169 core.int buildCounterBinding = 0; | 169 core.int buildCounterBinding = 0; |
| 170 buildBinding() { | 170 buildBinding() { |
| 171 var o = new api.Binding(); | 171 var o = new api.Binding(); |
| 172 buildCounterBinding++; | 172 buildCounterBinding++; |
| 173 if (buildCounterBinding < 3) { | 173 if (buildCounterBinding < 3) { |
| 174 o.members = buildUnnamed1960(); | 174 o.members = buildUnnamed1970(); |
| 175 o.role = "foo"; | 175 o.role = "foo"; |
| 176 } | 176 } |
| 177 buildCounterBinding--; | 177 buildCounterBinding--; |
| 178 return o; | 178 return o; |
| 179 } | 179 } |
| 180 | 180 |
| 181 checkBinding(api.Binding o) { | 181 checkBinding(api.Binding o) { |
| 182 buildCounterBinding++; | 182 buildCounterBinding++; |
| 183 if (buildCounterBinding < 3) { | 183 if (buildCounterBinding < 3) { |
| 184 checkUnnamed1960(o.members); | 184 checkUnnamed1970(o.members); |
| 185 unittest.expect(o.role, unittest.equals('foo')); | 185 unittest.expect(o.role, unittest.equals('foo')); |
| 186 } | 186 } |
| 187 buildCounterBinding--; | 187 buildCounterBinding--; |
| 188 } | 188 } |
| 189 | 189 |
| 190 core.int buildCounterChildLink = 0; | 190 core.int buildCounterChildLink = 0; |
| 191 buildChildLink() { | 191 buildChildLink() { |
| 192 var o = new api.ChildLink(); | 192 var o = new api.ChildLink(); |
| 193 buildCounterChildLink++; | 193 buildCounterChildLink++; |
| 194 if (buildCounterChildLink < 3) { | 194 if (buildCounterChildLink < 3) { |
| (...skipping 25 matching lines...) Expand all Loading... |
| 220 return o; | 220 return o; |
| 221 } | 221 } |
| 222 | 222 |
| 223 checkCloudAuditOptions(api.CloudAuditOptions o) { | 223 checkCloudAuditOptions(api.CloudAuditOptions o) { |
| 224 buildCounterCloudAuditOptions++; | 224 buildCounterCloudAuditOptions++; |
| 225 if (buildCounterCloudAuditOptions < 3) { | 225 if (buildCounterCloudAuditOptions < 3) { |
| 226 } | 226 } |
| 227 buildCounterCloudAuditOptions--; | 227 buildCounterCloudAuditOptions--; |
| 228 } | 228 } |
| 229 | 229 |
| 230 buildUnnamed1961() { | 230 buildUnnamed1971() { |
| 231 var o = new core.List<api.Mutation>(); | 231 var o = new core.List<api.Mutation>(); |
| 232 o.add(buildMutation()); | 232 o.add(buildMutation()); |
| 233 o.add(buildMutation()); | 233 o.add(buildMutation()); |
| 234 return o; | 234 return o; |
| 235 } | 235 } |
| 236 | 236 |
| 237 checkUnnamed1961(core.List<api.Mutation> o) { | 237 checkUnnamed1971(core.List<api.Mutation> o) { |
| 238 unittest.expect(o, unittest.hasLength(2)); | 238 unittest.expect(o, unittest.hasLength(2)); |
| 239 checkMutation(o[0]); | 239 checkMutation(o[0]); |
| 240 checkMutation(o[1]); | 240 checkMutation(o[1]); |
| 241 } | 241 } |
| 242 | 242 |
| 243 core.int buildCounterCommitRequest = 0; | 243 core.int buildCounterCommitRequest = 0; |
| 244 buildCommitRequest() { | 244 buildCommitRequest() { |
| 245 var o = new api.CommitRequest(); | 245 var o = new api.CommitRequest(); |
| 246 buildCounterCommitRequest++; | 246 buildCounterCommitRequest++; |
| 247 if (buildCounterCommitRequest < 3) { | 247 if (buildCounterCommitRequest < 3) { |
| 248 o.mutations = buildUnnamed1961(); | 248 o.mutations = buildUnnamed1971(); |
| 249 o.singleUseTransaction = buildTransactionOptions(); | 249 o.singleUseTransaction = buildTransactionOptions(); |
| 250 o.transactionId = "foo"; | 250 o.transactionId = "foo"; |
| 251 } | 251 } |
| 252 buildCounterCommitRequest--; | 252 buildCounterCommitRequest--; |
| 253 return o; | 253 return o; |
| 254 } | 254 } |
| 255 | 255 |
| 256 checkCommitRequest(api.CommitRequest o) { | 256 checkCommitRequest(api.CommitRequest o) { |
| 257 buildCounterCommitRequest++; | 257 buildCounterCommitRequest++; |
| 258 if (buildCounterCommitRequest < 3) { | 258 if (buildCounterCommitRequest < 3) { |
| 259 checkUnnamed1961(o.mutations); | 259 checkUnnamed1971(o.mutations); |
| 260 checkTransactionOptions(o.singleUseTransaction); | 260 checkTransactionOptions(o.singleUseTransaction); |
| 261 unittest.expect(o.transactionId, unittest.equals('foo')); | 261 unittest.expect(o.transactionId, unittest.equals('foo')); |
| 262 } | 262 } |
| 263 buildCounterCommitRequest--; | 263 buildCounterCommitRequest--; |
| 264 } | 264 } |
| 265 | 265 |
| 266 core.int buildCounterCommitResponse = 0; | 266 core.int buildCounterCommitResponse = 0; |
| 267 buildCommitResponse() { | 267 buildCommitResponse() { |
| 268 var o = new api.CommitResponse(); | 268 var o = new api.CommitResponse(); |
| 269 buildCounterCommitResponse++; | 269 buildCounterCommitResponse++; |
| 270 if (buildCounterCommitResponse < 3) { | 270 if (buildCounterCommitResponse < 3) { |
| 271 o.commitTimestamp = "foo"; | 271 o.commitTimestamp = "foo"; |
| 272 } | 272 } |
| 273 buildCounterCommitResponse--; | 273 buildCounterCommitResponse--; |
| 274 return o; | 274 return o; |
| 275 } | 275 } |
| 276 | 276 |
| 277 checkCommitResponse(api.CommitResponse o) { | 277 checkCommitResponse(api.CommitResponse o) { |
| 278 buildCounterCommitResponse++; | 278 buildCounterCommitResponse++; |
| 279 if (buildCounterCommitResponse < 3) { | 279 if (buildCounterCommitResponse < 3) { |
| 280 unittest.expect(o.commitTimestamp, unittest.equals('foo')); | 280 unittest.expect(o.commitTimestamp, unittest.equals('foo')); |
| 281 } | 281 } |
| 282 buildCounterCommitResponse--; | 282 buildCounterCommitResponse--; |
| 283 } | 283 } |
| 284 | 284 |
| 285 buildUnnamed1962() { | 285 buildUnnamed1972() { |
| 286 var o = new core.List<core.String>(); | 286 var o = new core.List<core.String>(); |
| 287 o.add("foo"); | 287 o.add("foo"); |
| 288 o.add("foo"); | 288 o.add("foo"); |
| 289 return o; | 289 return o; |
| 290 } | 290 } |
| 291 | 291 |
| 292 checkUnnamed1962(core.List<core.String> o) { | 292 checkUnnamed1972(core.List<core.String> o) { |
| 293 unittest.expect(o, unittest.hasLength(2)); | 293 unittest.expect(o, unittest.hasLength(2)); |
| 294 unittest.expect(o[0], unittest.equals('foo')); | 294 unittest.expect(o[0], unittest.equals('foo')); |
| 295 unittest.expect(o[1], unittest.equals('foo')); | 295 unittest.expect(o[1], unittest.equals('foo')); |
| 296 } | 296 } |
| 297 | 297 |
| 298 core.int buildCounterCondition = 0; | 298 core.int buildCounterCondition = 0; |
| 299 buildCondition() { | 299 buildCondition() { |
| 300 var o = new api.Condition(); | 300 var o = new api.Condition(); |
| 301 buildCounterCondition++; | 301 buildCounterCondition++; |
| 302 if (buildCounterCondition < 3) { | 302 if (buildCounterCondition < 3) { |
| 303 o.iam = "foo"; | 303 o.iam = "foo"; |
| 304 o.op = "foo"; | 304 o.op = "foo"; |
| 305 o.svc = "foo"; | 305 o.svc = "foo"; |
| 306 o.sys = "foo"; | 306 o.sys = "foo"; |
| 307 o.value = "foo"; | 307 o.value = "foo"; |
| 308 o.values = buildUnnamed1962(); | 308 o.values = buildUnnamed1972(); |
| 309 } | 309 } |
| 310 buildCounterCondition--; | 310 buildCounterCondition--; |
| 311 return o; | 311 return o; |
| 312 } | 312 } |
| 313 | 313 |
| 314 checkCondition(api.Condition o) { | 314 checkCondition(api.Condition o) { |
| 315 buildCounterCondition++; | 315 buildCounterCondition++; |
| 316 if (buildCounterCondition < 3) { | 316 if (buildCounterCondition < 3) { |
| 317 unittest.expect(o.iam, unittest.equals('foo')); | 317 unittest.expect(o.iam, unittest.equals('foo')); |
| 318 unittest.expect(o.op, unittest.equals('foo')); | 318 unittest.expect(o.op, unittest.equals('foo')); |
| 319 unittest.expect(o.svc, unittest.equals('foo')); | 319 unittest.expect(o.svc, unittest.equals('foo')); |
| 320 unittest.expect(o.sys, unittest.equals('foo')); | 320 unittest.expect(o.sys, unittest.equals('foo')); |
| 321 unittest.expect(o.value, unittest.equals('foo')); | 321 unittest.expect(o.value, unittest.equals('foo')); |
| 322 checkUnnamed1962(o.values); | 322 checkUnnamed1972(o.values); |
| 323 } | 323 } |
| 324 buildCounterCondition--; | 324 buildCounterCondition--; |
| 325 } | 325 } |
| 326 | 326 |
| 327 core.int buildCounterCounterOptions = 0; | 327 core.int buildCounterCounterOptions = 0; |
| 328 buildCounterOptions() { | 328 buildCounterOptions() { |
| 329 var o = new api.CounterOptions(); | 329 var o = new api.CounterOptions(); |
| 330 buildCounterCounterOptions++; | 330 buildCounterCounterOptions++; |
| 331 if (buildCounterCounterOptions < 3) { | 331 if (buildCounterCounterOptions < 3) { |
| 332 o.field = "foo"; | 332 o.field = "foo"; |
| (...skipping 24 matching lines...) Expand all Loading... |
| 357 } | 357 } |
| 358 | 358 |
| 359 checkCreateDatabaseMetadata(api.CreateDatabaseMetadata o) { | 359 checkCreateDatabaseMetadata(api.CreateDatabaseMetadata o) { |
| 360 buildCounterCreateDatabaseMetadata++; | 360 buildCounterCreateDatabaseMetadata++; |
| 361 if (buildCounterCreateDatabaseMetadata < 3) { | 361 if (buildCounterCreateDatabaseMetadata < 3) { |
| 362 unittest.expect(o.database, unittest.equals('foo')); | 362 unittest.expect(o.database, unittest.equals('foo')); |
| 363 } | 363 } |
| 364 buildCounterCreateDatabaseMetadata--; | 364 buildCounterCreateDatabaseMetadata--; |
| 365 } | 365 } |
| 366 | 366 |
| 367 buildUnnamed1963() { | 367 buildUnnamed1973() { |
| 368 var o = new core.List<core.String>(); | 368 var o = new core.List<core.String>(); |
| 369 o.add("foo"); | 369 o.add("foo"); |
| 370 o.add("foo"); | 370 o.add("foo"); |
| 371 return o; | 371 return o; |
| 372 } | 372 } |
| 373 | 373 |
| 374 checkUnnamed1963(core.List<core.String> o) { | 374 checkUnnamed1973(core.List<core.String> o) { |
| 375 unittest.expect(o, unittest.hasLength(2)); | 375 unittest.expect(o, unittest.hasLength(2)); |
| 376 unittest.expect(o[0], unittest.equals('foo')); | 376 unittest.expect(o[0], unittest.equals('foo')); |
| 377 unittest.expect(o[1], unittest.equals('foo')); | 377 unittest.expect(o[1], unittest.equals('foo')); |
| 378 } | 378 } |
| 379 | 379 |
| 380 core.int buildCounterCreateDatabaseRequest = 0; | 380 core.int buildCounterCreateDatabaseRequest = 0; |
| 381 buildCreateDatabaseRequest() { | 381 buildCreateDatabaseRequest() { |
| 382 var o = new api.CreateDatabaseRequest(); | 382 var o = new api.CreateDatabaseRequest(); |
| 383 buildCounterCreateDatabaseRequest++; | 383 buildCounterCreateDatabaseRequest++; |
| 384 if (buildCounterCreateDatabaseRequest < 3) { | 384 if (buildCounterCreateDatabaseRequest < 3) { |
| 385 o.createStatement = "foo"; | 385 o.createStatement = "foo"; |
| 386 o.extraStatements = buildUnnamed1963(); | 386 o.extraStatements = buildUnnamed1973(); |
| 387 } | 387 } |
| 388 buildCounterCreateDatabaseRequest--; | 388 buildCounterCreateDatabaseRequest--; |
| 389 return o; | 389 return o; |
| 390 } | 390 } |
| 391 | 391 |
| 392 checkCreateDatabaseRequest(api.CreateDatabaseRequest o) { | 392 checkCreateDatabaseRequest(api.CreateDatabaseRequest o) { |
| 393 buildCounterCreateDatabaseRequest++; | 393 buildCounterCreateDatabaseRequest++; |
| 394 if (buildCounterCreateDatabaseRequest < 3) { | 394 if (buildCounterCreateDatabaseRequest < 3) { |
| 395 unittest.expect(o.createStatement, unittest.equals('foo')); | 395 unittest.expect(o.createStatement, unittest.equals('foo')); |
| 396 checkUnnamed1963(o.extraStatements); | 396 checkUnnamed1973(o.extraStatements); |
| 397 } | 397 } |
| 398 buildCounterCreateDatabaseRequest--; | 398 buildCounterCreateDatabaseRequest--; |
| 399 } | 399 } |
| 400 | 400 |
| 401 core.int buildCounterCreateInstanceMetadata = 0; | 401 core.int buildCounterCreateInstanceMetadata = 0; |
| 402 buildCreateInstanceMetadata() { | 402 buildCreateInstanceMetadata() { |
| 403 var o = new api.CreateInstanceMetadata(); | 403 var o = new api.CreateInstanceMetadata(); |
| 404 buildCounterCreateInstanceMetadata++; | 404 buildCounterCreateInstanceMetadata++; |
| 405 if (buildCounterCreateInstanceMetadata < 3) { | 405 if (buildCounterCreateInstanceMetadata < 3) { |
| 406 o.cancelTime = "foo"; | 406 o.cancelTime = "foo"; |
| (...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 513 return o; | 513 return o; |
| 514 } | 514 } |
| 515 | 515 |
| 516 checkEmpty(api.Empty o) { | 516 checkEmpty(api.Empty o) { |
| 517 buildCounterEmpty++; | 517 buildCounterEmpty++; |
| 518 if (buildCounterEmpty < 3) { | 518 if (buildCounterEmpty < 3) { |
| 519 } | 519 } |
| 520 buildCounterEmpty--; | 520 buildCounterEmpty--; |
| 521 } | 521 } |
| 522 | 522 |
| 523 buildUnnamed1964() { | 523 buildUnnamed1974() { |
| 524 var o = new core.Map<core.String, api.Type>(); | 524 var o = new core.Map<core.String, api.Type>(); |
| 525 o["x"] = buildType(); | 525 o["x"] = buildType(); |
| 526 o["y"] = buildType(); | 526 o["y"] = buildType(); |
| 527 return o; | 527 return o; |
| 528 } | 528 } |
| 529 | 529 |
| 530 checkUnnamed1964(core.Map<core.String, api.Type> o) { | 530 checkUnnamed1974(core.Map<core.String, api.Type> o) { |
| 531 unittest.expect(o, unittest.hasLength(2)); | 531 unittest.expect(o, unittest.hasLength(2)); |
| 532 checkType(o["x"]); | 532 checkType(o["x"]); |
| 533 checkType(o["y"]); | 533 checkType(o["y"]); |
| 534 } | 534 } |
| 535 | 535 |
| 536 buildUnnamed1965() { | 536 buildUnnamed1975() { |
| 537 var o = new core.Map<core.String, core.Object>(); | 537 var o = new core.Map<core.String, core.Object>(); |
| 538 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 538 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; |
| 539 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 539 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; |
| 540 return o; | 540 return o; |
| 541 } | 541 } |
| 542 | 542 |
| 543 checkUnnamed1965(core.Map<core.String, core.Object> o) { | 543 checkUnnamed1975(core.Map<core.String, core.Object> o) { |
| 544 unittest.expect(o, unittest.hasLength(2)); | 544 unittest.expect(o, unittest.hasLength(2)); |
| 545 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')); | 545 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')); |
| 546 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')); | 546 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')); |
| 547 } | 547 } |
| 548 | 548 |
| 549 core.int buildCounterExecuteSqlRequest = 0; | 549 core.int buildCounterExecuteSqlRequest = 0; |
| 550 buildExecuteSqlRequest() { | 550 buildExecuteSqlRequest() { |
| 551 var o = new api.ExecuteSqlRequest(); | 551 var o = new api.ExecuteSqlRequest(); |
| 552 buildCounterExecuteSqlRequest++; | 552 buildCounterExecuteSqlRequest++; |
| 553 if (buildCounterExecuteSqlRequest < 3) { | 553 if (buildCounterExecuteSqlRequest < 3) { |
| 554 o.paramTypes = buildUnnamed1964(); | 554 o.paramTypes = buildUnnamed1974(); |
| 555 o.params = buildUnnamed1965(); | 555 o.params = buildUnnamed1975(); |
| 556 o.queryMode = "foo"; | 556 o.queryMode = "foo"; |
| 557 o.resumeToken = "foo"; | 557 o.resumeToken = "foo"; |
| 558 o.sql = "foo"; | 558 o.sql = "foo"; |
| 559 o.transaction = buildTransactionSelector(); | 559 o.transaction = buildTransactionSelector(); |
| 560 } | 560 } |
| 561 buildCounterExecuteSqlRequest--; | 561 buildCounterExecuteSqlRequest--; |
| 562 return o; | 562 return o; |
| 563 } | 563 } |
| 564 | 564 |
| 565 checkExecuteSqlRequest(api.ExecuteSqlRequest o) { | 565 checkExecuteSqlRequest(api.ExecuteSqlRequest o) { |
| 566 buildCounterExecuteSqlRequest++; | 566 buildCounterExecuteSqlRequest++; |
| 567 if (buildCounterExecuteSqlRequest < 3) { | 567 if (buildCounterExecuteSqlRequest < 3) { |
| 568 checkUnnamed1964(o.paramTypes); | 568 checkUnnamed1974(o.paramTypes); |
| 569 checkUnnamed1965(o.params); | 569 checkUnnamed1975(o.params); |
| 570 unittest.expect(o.queryMode, unittest.equals('foo')); | 570 unittest.expect(o.queryMode, unittest.equals('foo')); |
| 571 unittest.expect(o.resumeToken, unittest.equals('foo')); | 571 unittest.expect(o.resumeToken, unittest.equals('foo')); |
| 572 unittest.expect(o.sql, unittest.equals('foo')); | 572 unittest.expect(o.sql, unittest.equals('foo')); |
| 573 checkTransactionSelector(o.transaction); | 573 checkTransactionSelector(o.transaction); |
| 574 } | 574 } |
| 575 buildCounterExecuteSqlRequest--; | 575 buildCounterExecuteSqlRequest--; |
| 576 } | 576 } |
| 577 | 577 |
| 578 core.int buildCounterField = 0; | 578 core.int buildCounterField = 0; |
| 579 buildField() { | 579 buildField() { |
| 580 var o = new api.Field(); | 580 var o = new api.Field(); |
| 581 buildCounterField++; | 581 buildCounterField++; |
| 582 if (buildCounterField < 3) { | 582 if (buildCounterField < 3) { |
| 583 o.name = "foo"; | 583 o.name = "foo"; |
| 584 o.type = buildType(); | 584 o.type = buildType(); |
| 585 } | 585 } |
| 586 buildCounterField--; | 586 buildCounterField--; |
| 587 return o; | 587 return o; |
| 588 } | 588 } |
| 589 | 589 |
| 590 checkField(api.Field o) { | 590 checkField(api.Field o) { |
| 591 buildCounterField++; | 591 buildCounterField++; |
| 592 if (buildCounterField < 3) { | 592 if (buildCounterField < 3) { |
| 593 unittest.expect(o.name, unittest.equals('foo')); | 593 unittest.expect(o.name, unittest.equals('foo')); |
| 594 checkType(o.type); | 594 checkType(o.type); |
| 595 } | 595 } |
| 596 buildCounterField--; | 596 buildCounterField--; |
| 597 } | 597 } |
| 598 | 598 |
| 599 buildUnnamed1966() { | 599 buildUnnamed1976() { |
| 600 var o = new core.List<core.String>(); | 600 var o = new core.List<core.String>(); |
| 601 o.add("foo"); | 601 o.add("foo"); |
| 602 o.add("foo"); | 602 o.add("foo"); |
| 603 return o; | 603 return o; |
| 604 } | 604 } |
| 605 | 605 |
| 606 checkUnnamed1966(core.List<core.String> o) { | 606 checkUnnamed1976(core.List<core.String> o) { |
| 607 unittest.expect(o, unittest.hasLength(2)); | 607 unittest.expect(o, unittest.hasLength(2)); |
| 608 unittest.expect(o[0], unittest.equals('foo')); | 608 unittest.expect(o[0], unittest.equals('foo')); |
| 609 unittest.expect(o[1], unittest.equals('foo')); | 609 unittest.expect(o[1], unittest.equals('foo')); |
| 610 } | 610 } |
| 611 | 611 |
| 612 core.int buildCounterGetDatabaseDdlResponse = 0; | 612 core.int buildCounterGetDatabaseDdlResponse = 0; |
| 613 buildGetDatabaseDdlResponse() { | 613 buildGetDatabaseDdlResponse() { |
| 614 var o = new api.GetDatabaseDdlResponse(); | 614 var o = new api.GetDatabaseDdlResponse(); |
| 615 buildCounterGetDatabaseDdlResponse++; | 615 buildCounterGetDatabaseDdlResponse++; |
| 616 if (buildCounterGetDatabaseDdlResponse < 3) { | 616 if (buildCounterGetDatabaseDdlResponse < 3) { |
| 617 o.statements = buildUnnamed1966(); | 617 o.statements = buildUnnamed1976(); |
| 618 } | 618 } |
| 619 buildCounterGetDatabaseDdlResponse--; | 619 buildCounterGetDatabaseDdlResponse--; |
| 620 return o; | 620 return o; |
| 621 } | 621 } |
| 622 | 622 |
| 623 checkGetDatabaseDdlResponse(api.GetDatabaseDdlResponse o) { | 623 checkGetDatabaseDdlResponse(api.GetDatabaseDdlResponse o) { |
| 624 buildCounterGetDatabaseDdlResponse++; | 624 buildCounterGetDatabaseDdlResponse++; |
| 625 if (buildCounterGetDatabaseDdlResponse < 3) { | 625 if (buildCounterGetDatabaseDdlResponse < 3) { |
| 626 checkUnnamed1966(o.statements); | 626 checkUnnamed1976(o.statements); |
| 627 } | 627 } |
| 628 buildCounterGetDatabaseDdlResponse--; | 628 buildCounterGetDatabaseDdlResponse--; |
| 629 } | 629 } |
| 630 | 630 |
| 631 core.int buildCounterGetIamPolicyRequest = 0; | 631 core.int buildCounterGetIamPolicyRequest = 0; |
| 632 buildGetIamPolicyRequest() { | 632 buildGetIamPolicyRequest() { |
| 633 var o = new api.GetIamPolicyRequest(); | 633 var o = new api.GetIamPolicyRequest(); |
| 634 buildCounterGetIamPolicyRequest++; | 634 buildCounterGetIamPolicyRequest++; |
| 635 if (buildCounterGetIamPolicyRequest < 3) { | 635 if (buildCounterGetIamPolicyRequest < 3) { |
| 636 } | 636 } |
| 637 buildCounterGetIamPolicyRequest--; | 637 buildCounterGetIamPolicyRequest--; |
| 638 return o; | 638 return o; |
| 639 } | 639 } |
| 640 | 640 |
| 641 checkGetIamPolicyRequest(api.GetIamPolicyRequest o) { | 641 checkGetIamPolicyRequest(api.GetIamPolicyRequest o) { |
| 642 buildCounterGetIamPolicyRequest++; | 642 buildCounterGetIamPolicyRequest++; |
| 643 if (buildCounterGetIamPolicyRequest < 3) { | 643 if (buildCounterGetIamPolicyRequest < 3) { |
| 644 } | 644 } |
| 645 buildCounterGetIamPolicyRequest--; | 645 buildCounterGetIamPolicyRequest--; |
| 646 } | 646 } |
| 647 | 647 |
| 648 buildUnnamed1967() { | 648 buildUnnamed1977() { |
| 649 var o = new core.Map<core.String, core.String>(); | 649 var o = new core.Map<core.String, core.String>(); |
| 650 o["x"] = "foo"; | 650 o["x"] = "foo"; |
| 651 o["y"] = "foo"; | 651 o["y"] = "foo"; |
| 652 return o; | 652 return o; |
| 653 } | 653 } |
| 654 | 654 |
| 655 checkUnnamed1967(core.Map<core.String, core.String> o) { | 655 checkUnnamed1977(core.Map<core.String, core.String> o) { |
| 656 unittest.expect(o, unittest.hasLength(2)); | 656 unittest.expect(o, unittest.hasLength(2)); |
| 657 unittest.expect(o["x"], unittest.equals('foo')); | 657 unittest.expect(o["x"], unittest.equals('foo')); |
| 658 unittest.expect(o["y"], unittest.equals('foo')); | 658 unittest.expect(o["y"], unittest.equals('foo')); |
| 659 } | 659 } |
| 660 | 660 |
| 661 core.int buildCounterInstance = 0; | 661 core.int buildCounterInstance = 0; |
| 662 buildInstance() { | 662 buildInstance() { |
| 663 var o = new api.Instance(); | 663 var o = new api.Instance(); |
| 664 buildCounterInstance++; | 664 buildCounterInstance++; |
| 665 if (buildCounterInstance < 3) { | 665 if (buildCounterInstance < 3) { |
| 666 o.config = "foo"; | 666 o.config = "foo"; |
| 667 o.displayName = "foo"; | 667 o.displayName = "foo"; |
| 668 o.labels = buildUnnamed1967(); | 668 o.labels = buildUnnamed1977(); |
| 669 o.name = "foo"; | 669 o.name = "foo"; |
| 670 o.nodeCount = 42; | 670 o.nodeCount = 42; |
| 671 o.state = "foo"; | 671 o.state = "foo"; |
| 672 } | 672 } |
| 673 buildCounterInstance--; | 673 buildCounterInstance--; |
| 674 return o; | 674 return o; |
| 675 } | 675 } |
| 676 | 676 |
| 677 checkInstance(api.Instance o) { | 677 checkInstance(api.Instance o) { |
| 678 buildCounterInstance++; | 678 buildCounterInstance++; |
| 679 if (buildCounterInstance < 3) { | 679 if (buildCounterInstance < 3) { |
| 680 unittest.expect(o.config, unittest.equals('foo')); | 680 unittest.expect(o.config, unittest.equals('foo')); |
| 681 unittest.expect(o.displayName, unittest.equals('foo')); | 681 unittest.expect(o.displayName, unittest.equals('foo')); |
| 682 checkUnnamed1967(o.labels); | 682 checkUnnamed1977(o.labels); |
| 683 unittest.expect(o.name, unittest.equals('foo')); | 683 unittest.expect(o.name, unittest.equals('foo')); |
| 684 unittest.expect(o.nodeCount, unittest.equals(42)); | 684 unittest.expect(o.nodeCount, unittest.equals(42)); |
| 685 unittest.expect(o.state, unittest.equals('foo')); | 685 unittest.expect(o.state, unittest.equals('foo')); |
| 686 } | 686 } |
| 687 buildCounterInstance--; | 687 buildCounterInstance--; |
| 688 } | 688 } |
| 689 | 689 |
| 690 core.int buildCounterInstanceConfig = 0; | 690 core.int buildCounterInstanceConfig = 0; |
| 691 buildInstanceConfig() { | 691 buildInstanceConfig() { |
| 692 var o = new api.InstanceConfig(); | 692 var o = new api.InstanceConfig(); |
| 693 buildCounterInstanceConfig++; | 693 buildCounterInstanceConfig++; |
| 694 if (buildCounterInstanceConfig < 3) { | 694 if (buildCounterInstanceConfig < 3) { |
| 695 o.displayName = "foo"; | 695 o.displayName = "foo"; |
| 696 o.name = "foo"; | 696 o.name = "foo"; |
| 697 } | 697 } |
| 698 buildCounterInstanceConfig--; | 698 buildCounterInstanceConfig--; |
| 699 return o; | 699 return o; |
| 700 } | 700 } |
| 701 | 701 |
| 702 checkInstanceConfig(api.InstanceConfig o) { | 702 checkInstanceConfig(api.InstanceConfig o) { |
| 703 buildCounterInstanceConfig++; | 703 buildCounterInstanceConfig++; |
| 704 if (buildCounterInstanceConfig < 3) { | 704 if (buildCounterInstanceConfig < 3) { |
| 705 unittest.expect(o.displayName, unittest.equals('foo')); | 705 unittest.expect(o.displayName, unittest.equals('foo')); |
| 706 unittest.expect(o.name, unittest.equals('foo')); | 706 unittest.expect(o.name, unittest.equals('foo')); |
| 707 } | 707 } |
| 708 buildCounterInstanceConfig--; | 708 buildCounterInstanceConfig--; |
| 709 } | 709 } |
| 710 | 710 |
| 711 buildUnnamed1968() { | 711 buildUnnamed1978() { |
| 712 var o = new core.List<core.Object>(); | 712 var o = new core.List<core.Object>(); |
| 713 o.add({'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}); | 713 o.add({'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}); |
| 714 o.add({'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}); | 714 o.add({'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}); |
| 715 return o; | 715 return o; |
| 716 } | 716 } |
| 717 | 717 |
| 718 checkUnnamed1968(core.List<core.Object> o) { | 718 checkUnnamed1978(core.List<core.Object> o) { |
| 719 unittest.expect(o, unittest.hasLength(2)); | 719 unittest.expect(o, unittest.hasLength(2)); |
| 720 var casted3 = (o[0]) as core.Map; unittest.expect(casted3, unittest.hasLength(
3)); unittest.expect(casted3["list"], unittest.equals([1, 2, 3])); unittest.expe
ct(casted3["bool"], unittest.equals(true)); unittest.expect(casted3["string"], u
nittest.equals('foo')); | 720 var casted3 = (o[0]) as core.Map; unittest.expect(casted3, unittest.hasLength(
3)); unittest.expect(casted3["list"], unittest.equals([1, 2, 3])); unittest.expe
ct(casted3["bool"], unittest.equals(true)); unittest.expect(casted3["string"], u
nittest.equals('foo')); |
| 721 var casted4 = (o[1]) as core.Map; unittest.expect(casted4, unittest.hasLength(
3)); unittest.expect(casted4["list"], unittest.equals([1, 2, 3])); unittest.expe
ct(casted4["bool"], unittest.equals(true)); unittest.expect(casted4["string"], u
nittest.equals('foo')); | 721 var casted4 = (o[1]) as core.Map; unittest.expect(casted4, unittest.hasLength(
3)); unittest.expect(casted4["list"], unittest.equals([1, 2, 3])); unittest.expe
ct(casted4["bool"], unittest.equals(true)); unittest.expect(casted4["string"], u
nittest.equals('foo')); |
| 722 } | 722 } |
| 723 | 723 |
| 724 buildUnnamed1969() { | 724 buildUnnamed1979() { |
| 725 var o = new core.List<core.Object>(); | 725 var o = new core.List<core.Object>(); |
| 726 o.add({'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}); | 726 o.add({'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}); |
| 727 o.add({'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}); | 727 o.add({'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}); |
| 728 return o; | 728 return o; |
| 729 } | 729 } |
| 730 | 730 |
| 731 checkUnnamed1969(core.List<core.Object> o) { | 731 checkUnnamed1979(core.List<core.Object> o) { |
| 732 unittest.expect(o, unittest.hasLength(2)); | 732 unittest.expect(o, unittest.hasLength(2)); |
| 733 var casted5 = (o[0]) as core.Map; unittest.expect(casted5, unittest.hasLength(
3)); unittest.expect(casted5["list"], unittest.equals([1, 2, 3])); unittest.expe
ct(casted5["bool"], unittest.equals(true)); unittest.expect(casted5["string"], u
nittest.equals('foo')); | 733 var casted5 = (o[0]) as core.Map; unittest.expect(casted5, unittest.hasLength(
3)); unittest.expect(casted5["list"], unittest.equals([1, 2, 3])); unittest.expe
ct(casted5["bool"], unittest.equals(true)); unittest.expect(casted5["string"], u
nittest.equals('foo')); |
| 734 var casted6 = (o[1]) as core.Map; unittest.expect(casted6, unittest.hasLength(
3)); unittest.expect(casted6["list"], unittest.equals([1, 2, 3])); unittest.expe
ct(casted6["bool"], unittest.equals(true)); unittest.expect(casted6["string"], u
nittest.equals('foo')); | 734 var casted6 = (o[1]) as core.Map; unittest.expect(casted6, unittest.hasLength(
3)); unittest.expect(casted6["list"], unittest.equals([1, 2, 3])); unittest.expe
ct(casted6["bool"], unittest.equals(true)); unittest.expect(casted6["string"], u
nittest.equals('foo')); |
| 735 } | 735 } |
| 736 | 736 |
| 737 buildUnnamed1970() { | 737 buildUnnamed1980() { |
| 738 var o = new core.List<core.Object>(); | 738 var o = new core.List<core.Object>(); |
| 739 o.add({'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}); | 739 o.add({'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}); |
| 740 o.add({'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}); | 740 o.add({'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}); |
| 741 return o; | 741 return o; |
| 742 } | 742 } |
| 743 | 743 |
| 744 checkUnnamed1970(core.List<core.Object> o) { | 744 checkUnnamed1980(core.List<core.Object> o) { |
| 745 unittest.expect(o, unittest.hasLength(2)); | 745 unittest.expect(o, unittest.hasLength(2)); |
| 746 var casted7 = (o[0]) as core.Map; unittest.expect(casted7, unittest.hasLength(
3)); unittest.expect(casted7["list"], unittest.equals([1, 2, 3])); unittest.expe
ct(casted7["bool"], unittest.equals(true)); unittest.expect(casted7["string"], u
nittest.equals('foo')); | 746 var casted7 = (o[0]) as core.Map; unittest.expect(casted7, unittest.hasLength(
3)); unittest.expect(casted7["list"], unittest.equals([1, 2, 3])); unittest.expe
ct(casted7["bool"], unittest.equals(true)); unittest.expect(casted7["string"], u
nittest.equals('foo')); |
| 747 var casted8 = (o[1]) as core.Map; unittest.expect(casted8, unittest.hasLength(
3)); unittest.expect(casted8["list"], unittest.equals([1, 2, 3])); unittest.expe
ct(casted8["bool"], unittest.equals(true)); unittest.expect(casted8["string"], u
nittest.equals('foo')); | 747 var casted8 = (o[1]) as core.Map; unittest.expect(casted8, unittest.hasLength(
3)); unittest.expect(casted8["list"], unittest.equals([1, 2, 3])); unittest.expe
ct(casted8["bool"], unittest.equals(true)); unittest.expect(casted8["string"], u
nittest.equals('foo')); |
| 748 } | 748 } |
| 749 | 749 |
| 750 buildUnnamed1971() { | 750 buildUnnamed1981() { |
| 751 var o = new core.List<core.Object>(); | 751 var o = new core.List<core.Object>(); |
| 752 o.add({'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}); | 752 o.add({'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}); |
| 753 o.add({'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}); | 753 o.add({'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}); |
| 754 return o; | 754 return o; |
| 755 } | 755 } |
| 756 | 756 |
| 757 checkUnnamed1971(core.List<core.Object> o) { | 757 checkUnnamed1981(core.List<core.Object> o) { |
| 758 unittest.expect(o, unittest.hasLength(2)); | 758 unittest.expect(o, unittest.hasLength(2)); |
| 759 var casted9 = (o[0]) as core.Map; unittest.expect(casted9, unittest.hasLength(
3)); unittest.expect(casted9["list"], unittest.equals([1, 2, 3])); unittest.expe
ct(casted9["bool"], unittest.equals(true)); unittest.expect(casted9["string"], u
nittest.equals('foo')); | 759 var casted9 = (o[0]) as core.Map; unittest.expect(casted9, unittest.hasLength(
3)); unittest.expect(casted9["list"], unittest.equals([1, 2, 3])); unittest.expe
ct(casted9["bool"], unittest.equals(true)); unittest.expect(casted9["string"], u
nittest.equals('foo')); |
| 760 var casted10 = (o[1]) as core.Map; unittest.expect(casted10, unittest.hasLengt
h(3)); unittest.expect(casted10["list"], unittest.equals([1, 2, 3])); unittest.e
xpect(casted10["bool"], unittest.equals(true)); unittest.expect(casted10["string
"], unittest.equals('foo')); | 760 var casted10 = (o[1]) as core.Map; unittest.expect(casted10, unittest.hasLengt
h(3)); unittest.expect(casted10["list"], unittest.equals([1, 2, 3])); unittest.e
xpect(casted10["bool"], unittest.equals(true)); unittest.expect(casted10["string
"], unittest.equals('foo')); |
| 761 } | 761 } |
| 762 | 762 |
| 763 core.int buildCounterKeyRange = 0; | 763 core.int buildCounterKeyRange = 0; |
| 764 buildKeyRange() { | 764 buildKeyRange() { |
| 765 var o = new api.KeyRange(); | 765 var o = new api.KeyRange(); |
| 766 buildCounterKeyRange++; | 766 buildCounterKeyRange++; |
| 767 if (buildCounterKeyRange < 3) { | 767 if (buildCounterKeyRange < 3) { |
| 768 o.endClosed = buildUnnamed1968(); | 768 o.endClosed = buildUnnamed1978(); |
| 769 o.endOpen = buildUnnamed1969(); | 769 o.endOpen = buildUnnamed1979(); |
| 770 o.startClosed = buildUnnamed1970(); | 770 o.startClosed = buildUnnamed1980(); |
| 771 o.startOpen = buildUnnamed1971(); | 771 o.startOpen = buildUnnamed1981(); |
| 772 } | 772 } |
| 773 buildCounterKeyRange--; | 773 buildCounterKeyRange--; |
| 774 return o; | 774 return o; |
| 775 } | 775 } |
| 776 | 776 |
| 777 checkKeyRange(api.KeyRange o) { | 777 checkKeyRange(api.KeyRange o) { |
| 778 buildCounterKeyRange++; | 778 buildCounterKeyRange++; |
| 779 if (buildCounterKeyRange < 3) { | 779 if (buildCounterKeyRange < 3) { |
| 780 checkUnnamed1968(o.endClosed); | 780 checkUnnamed1978(o.endClosed); |
| 781 checkUnnamed1969(o.endOpen); | 781 checkUnnamed1979(o.endOpen); |
| 782 checkUnnamed1970(o.startClosed); | 782 checkUnnamed1980(o.startClosed); |
| 783 checkUnnamed1971(o.startOpen); | 783 checkUnnamed1981(o.startOpen); |
| 784 } | 784 } |
| 785 buildCounterKeyRange--; | 785 buildCounterKeyRange--; |
| 786 } | 786 } |
| 787 | 787 |
| 788 buildUnnamed1972() { | 788 buildUnnamed1982() { |
| 789 var o = new core.List<core.Object>(); | 789 var o = new core.List<core.Object>(); |
| 790 o.add({'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}); | 790 o.add({'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}); |
| 791 o.add({'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}); | 791 o.add({'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}); |
| 792 return o; | 792 return o; |
| 793 } | 793 } |
| 794 | 794 |
| 795 checkUnnamed1972(core.List<core.Object> o) { | 795 checkUnnamed1982(core.List<core.Object> o) { |
| 796 unittest.expect(o, unittest.hasLength(2)); | 796 unittest.expect(o, unittest.hasLength(2)); |
| 797 var casted11 = (o[0]) as core.Map; unittest.expect(casted11, unittest.hasLengt
h(3)); unittest.expect(casted11["list"], unittest.equals([1, 2, 3])); unittest.e
xpect(casted11["bool"], unittest.equals(true)); unittest.expect(casted11["string
"], unittest.equals('foo')); | 797 var casted11 = (o[0]) as core.Map; unittest.expect(casted11, unittest.hasLengt
h(3)); unittest.expect(casted11["list"], unittest.equals([1, 2, 3])); unittest.e
xpect(casted11["bool"], unittest.equals(true)); unittest.expect(casted11["string
"], unittest.equals('foo')); |
| 798 var casted12 = (o[1]) as core.Map; unittest.expect(casted12, unittest.hasLengt
h(3)); unittest.expect(casted12["list"], unittest.equals([1, 2, 3])); unittest.e
xpect(casted12["bool"], unittest.equals(true)); unittest.expect(casted12["string
"], unittest.equals('foo')); | 798 var casted12 = (o[1]) as core.Map; unittest.expect(casted12, unittest.hasLengt
h(3)); unittest.expect(casted12["list"], unittest.equals([1, 2, 3])); unittest.e
xpect(casted12["bool"], unittest.equals(true)); unittest.expect(casted12["string
"], unittest.equals('foo')); |
| 799 } | 799 } |
| 800 | 800 |
| 801 buildUnnamed1973() { | 801 buildUnnamed1983() { |
| 802 var o = new core.List<core.List<core.Object>>(); | 802 var o = new core.List<core.List<core.Object>>(); |
| 803 o.add(buildUnnamed1972()); | 803 o.add(buildUnnamed1982()); |
| 804 o.add(buildUnnamed1972()); | 804 o.add(buildUnnamed1982()); |
| 805 return o; | 805 return o; |
| 806 } | 806 } |
| 807 | 807 |
| 808 checkUnnamed1973(core.List<core.List<core.Object>> o) { | 808 checkUnnamed1983(core.List<core.List<core.Object>> o) { |
| 809 unittest.expect(o, unittest.hasLength(2)); | 809 unittest.expect(o, unittest.hasLength(2)); |
| 810 checkUnnamed1972(o[0]); | 810 checkUnnamed1982(o[0]); |
| 811 checkUnnamed1972(o[1]); | 811 checkUnnamed1982(o[1]); |
| 812 } | 812 } |
| 813 | 813 |
| 814 buildUnnamed1974() { | 814 buildUnnamed1984() { |
| 815 var o = new core.List<api.KeyRange>(); | 815 var o = new core.List<api.KeyRange>(); |
| 816 o.add(buildKeyRange()); | 816 o.add(buildKeyRange()); |
| 817 o.add(buildKeyRange()); | 817 o.add(buildKeyRange()); |
| 818 return o; | 818 return o; |
| 819 } | 819 } |
| 820 | 820 |
| 821 checkUnnamed1974(core.List<api.KeyRange> o) { | 821 checkUnnamed1984(core.List<api.KeyRange> o) { |
| 822 unittest.expect(o, unittest.hasLength(2)); | 822 unittest.expect(o, unittest.hasLength(2)); |
| 823 checkKeyRange(o[0]); | 823 checkKeyRange(o[0]); |
| 824 checkKeyRange(o[1]); | 824 checkKeyRange(o[1]); |
| 825 } | 825 } |
| 826 | 826 |
| 827 core.int buildCounterKeySet = 0; | 827 core.int buildCounterKeySet = 0; |
| 828 buildKeySet() { | 828 buildKeySet() { |
| 829 var o = new api.KeySet(); | 829 var o = new api.KeySet(); |
| 830 buildCounterKeySet++; | 830 buildCounterKeySet++; |
| 831 if (buildCounterKeySet < 3) { | 831 if (buildCounterKeySet < 3) { |
| 832 o.all = true; | 832 o.all = true; |
| 833 o.keys = buildUnnamed1973(); | 833 o.keys = buildUnnamed1983(); |
| 834 o.ranges = buildUnnamed1974(); | 834 o.ranges = buildUnnamed1984(); |
| 835 } | 835 } |
| 836 buildCounterKeySet--; | 836 buildCounterKeySet--; |
| 837 return o; | 837 return o; |
| 838 } | 838 } |
| 839 | 839 |
| 840 checkKeySet(api.KeySet o) { | 840 checkKeySet(api.KeySet o) { |
| 841 buildCounterKeySet++; | 841 buildCounterKeySet++; |
| 842 if (buildCounterKeySet < 3) { | 842 if (buildCounterKeySet < 3) { |
| 843 unittest.expect(o.all, unittest.isTrue); | 843 unittest.expect(o.all, unittest.isTrue); |
| 844 checkUnnamed1973(o.keys); | 844 checkUnnamed1983(o.keys); |
| 845 checkUnnamed1974(o.ranges); | 845 checkUnnamed1984(o.ranges); |
| 846 } | 846 } |
| 847 buildCounterKeySet--; | 847 buildCounterKeySet--; |
| 848 } | 848 } |
| 849 | 849 |
| 850 buildUnnamed1975() { | 850 buildUnnamed1985() { |
| 851 var o = new core.List<api.Database>(); | 851 var o = new core.List<api.Database>(); |
| 852 o.add(buildDatabase()); | 852 o.add(buildDatabase()); |
| 853 o.add(buildDatabase()); | 853 o.add(buildDatabase()); |
| 854 return o; | 854 return o; |
| 855 } | 855 } |
| 856 | 856 |
| 857 checkUnnamed1975(core.List<api.Database> o) { | 857 checkUnnamed1985(core.List<api.Database> o) { |
| 858 unittest.expect(o, unittest.hasLength(2)); | 858 unittest.expect(o, unittest.hasLength(2)); |
| 859 checkDatabase(o[0]); | 859 checkDatabase(o[0]); |
| 860 checkDatabase(o[1]); | 860 checkDatabase(o[1]); |
| 861 } | 861 } |
| 862 | 862 |
| 863 core.int buildCounterListDatabasesResponse = 0; | 863 core.int buildCounterListDatabasesResponse = 0; |
| 864 buildListDatabasesResponse() { | 864 buildListDatabasesResponse() { |
| 865 var o = new api.ListDatabasesResponse(); | 865 var o = new api.ListDatabasesResponse(); |
| 866 buildCounterListDatabasesResponse++; | 866 buildCounterListDatabasesResponse++; |
| 867 if (buildCounterListDatabasesResponse < 3) { | 867 if (buildCounterListDatabasesResponse < 3) { |
| 868 o.databases = buildUnnamed1975(); | 868 o.databases = buildUnnamed1985(); |
| 869 o.nextPageToken = "foo"; | 869 o.nextPageToken = "foo"; |
| 870 } | 870 } |
| 871 buildCounterListDatabasesResponse--; | 871 buildCounterListDatabasesResponse--; |
| 872 return o; | 872 return o; |
| 873 } | 873 } |
| 874 | 874 |
| 875 checkListDatabasesResponse(api.ListDatabasesResponse o) { | 875 checkListDatabasesResponse(api.ListDatabasesResponse o) { |
| 876 buildCounterListDatabasesResponse++; | 876 buildCounterListDatabasesResponse++; |
| 877 if (buildCounterListDatabasesResponse < 3) { | 877 if (buildCounterListDatabasesResponse < 3) { |
| 878 checkUnnamed1975(o.databases); | 878 checkUnnamed1985(o.databases); |
| 879 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 879 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
| 880 } | 880 } |
| 881 buildCounterListDatabasesResponse--; | 881 buildCounterListDatabasesResponse--; |
| 882 } | 882 } |
| 883 | 883 |
| 884 buildUnnamed1976() { | 884 buildUnnamed1986() { |
| 885 var o = new core.List<api.InstanceConfig>(); | 885 var o = new core.List<api.InstanceConfig>(); |
| 886 o.add(buildInstanceConfig()); | 886 o.add(buildInstanceConfig()); |
| 887 o.add(buildInstanceConfig()); | 887 o.add(buildInstanceConfig()); |
| 888 return o; | 888 return o; |
| 889 } | 889 } |
| 890 | 890 |
| 891 checkUnnamed1976(core.List<api.InstanceConfig> o) { | 891 checkUnnamed1986(core.List<api.InstanceConfig> o) { |
| 892 unittest.expect(o, unittest.hasLength(2)); | 892 unittest.expect(o, unittest.hasLength(2)); |
| 893 checkInstanceConfig(o[0]); | 893 checkInstanceConfig(o[0]); |
| 894 checkInstanceConfig(o[1]); | 894 checkInstanceConfig(o[1]); |
| 895 } | 895 } |
| 896 | 896 |
| 897 core.int buildCounterListInstanceConfigsResponse = 0; | 897 core.int buildCounterListInstanceConfigsResponse = 0; |
| 898 buildListInstanceConfigsResponse() { | 898 buildListInstanceConfigsResponse() { |
| 899 var o = new api.ListInstanceConfigsResponse(); | 899 var o = new api.ListInstanceConfigsResponse(); |
| 900 buildCounterListInstanceConfigsResponse++; | 900 buildCounterListInstanceConfigsResponse++; |
| 901 if (buildCounterListInstanceConfigsResponse < 3) { | 901 if (buildCounterListInstanceConfigsResponse < 3) { |
| 902 o.instanceConfigs = buildUnnamed1976(); | 902 o.instanceConfigs = buildUnnamed1986(); |
| 903 o.nextPageToken = "foo"; | 903 o.nextPageToken = "foo"; |
| 904 } | 904 } |
| 905 buildCounterListInstanceConfigsResponse--; | 905 buildCounterListInstanceConfigsResponse--; |
| 906 return o; | 906 return o; |
| 907 } | 907 } |
| 908 | 908 |
| 909 checkListInstanceConfigsResponse(api.ListInstanceConfigsResponse o) { | 909 checkListInstanceConfigsResponse(api.ListInstanceConfigsResponse o) { |
| 910 buildCounterListInstanceConfigsResponse++; | 910 buildCounterListInstanceConfigsResponse++; |
| 911 if (buildCounterListInstanceConfigsResponse < 3) { | 911 if (buildCounterListInstanceConfigsResponse < 3) { |
| 912 checkUnnamed1976(o.instanceConfigs); | 912 checkUnnamed1986(o.instanceConfigs); |
| 913 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 913 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
| 914 } | 914 } |
| 915 buildCounterListInstanceConfigsResponse--; | 915 buildCounterListInstanceConfigsResponse--; |
| 916 } | 916 } |
| 917 | 917 |
| 918 buildUnnamed1977() { | 918 buildUnnamed1987() { |
| 919 var o = new core.List<api.Instance>(); | 919 var o = new core.List<api.Instance>(); |
| 920 o.add(buildInstance()); | 920 o.add(buildInstance()); |
| 921 o.add(buildInstance()); | 921 o.add(buildInstance()); |
| 922 return o; | 922 return o; |
| 923 } | 923 } |
| 924 | 924 |
| 925 checkUnnamed1977(core.List<api.Instance> o) { | 925 checkUnnamed1987(core.List<api.Instance> o) { |
| 926 unittest.expect(o, unittest.hasLength(2)); | 926 unittest.expect(o, unittest.hasLength(2)); |
| 927 checkInstance(o[0]); | 927 checkInstance(o[0]); |
| 928 checkInstance(o[1]); | 928 checkInstance(o[1]); |
| 929 } | 929 } |
| 930 | 930 |
| 931 core.int buildCounterListInstancesResponse = 0; | 931 core.int buildCounterListInstancesResponse = 0; |
| 932 buildListInstancesResponse() { | 932 buildListInstancesResponse() { |
| 933 var o = new api.ListInstancesResponse(); | 933 var o = new api.ListInstancesResponse(); |
| 934 buildCounterListInstancesResponse++; | 934 buildCounterListInstancesResponse++; |
| 935 if (buildCounterListInstancesResponse < 3) { | 935 if (buildCounterListInstancesResponse < 3) { |
| 936 o.instances = buildUnnamed1977(); | 936 o.instances = buildUnnamed1987(); |
| 937 o.nextPageToken = "foo"; | 937 o.nextPageToken = "foo"; |
| 938 } | 938 } |
| 939 buildCounterListInstancesResponse--; | 939 buildCounterListInstancesResponse--; |
| 940 return o; | 940 return o; |
| 941 } | 941 } |
| 942 | 942 |
| 943 checkListInstancesResponse(api.ListInstancesResponse o) { | 943 checkListInstancesResponse(api.ListInstancesResponse o) { |
| 944 buildCounterListInstancesResponse++; | 944 buildCounterListInstancesResponse++; |
| 945 if (buildCounterListInstancesResponse < 3) { | 945 if (buildCounterListInstancesResponse < 3) { |
| 946 checkUnnamed1977(o.instances); | 946 checkUnnamed1987(o.instances); |
| 947 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 947 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
| 948 } | 948 } |
| 949 buildCounterListInstancesResponse--; | 949 buildCounterListInstancesResponse--; |
| 950 } | 950 } |
| 951 | 951 |
| 952 buildUnnamed1978() { | 952 buildUnnamed1988() { |
| 953 var o = new core.List<api.Operation>(); | 953 var o = new core.List<api.Operation>(); |
| 954 o.add(buildOperation()); | 954 o.add(buildOperation()); |
| 955 o.add(buildOperation()); | 955 o.add(buildOperation()); |
| 956 return o; | 956 return o; |
| 957 } | 957 } |
| 958 | 958 |
| 959 checkUnnamed1978(core.List<api.Operation> o) { | 959 checkUnnamed1988(core.List<api.Operation> o) { |
| 960 unittest.expect(o, unittest.hasLength(2)); | 960 unittest.expect(o, unittest.hasLength(2)); |
| 961 checkOperation(o[0]); | 961 checkOperation(o[0]); |
| 962 checkOperation(o[1]); | 962 checkOperation(o[1]); |
| 963 } | 963 } |
| 964 | 964 |
| 965 core.int buildCounterListOperationsResponse = 0; | 965 core.int buildCounterListOperationsResponse = 0; |
| 966 buildListOperationsResponse() { | 966 buildListOperationsResponse() { |
| 967 var o = new api.ListOperationsResponse(); | 967 var o = new api.ListOperationsResponse(); |
| 968 buildCounterListOperationsResponse++; | 968 buildCounterListOperationsResponse++; |
| 969 if (buildCounterListOperationsResponse < 3) { | 969 if (buildCounterListOperationsResponse < 3) { |
| 970 o.nextPageToken = "foo"; | 970 o.nextPageToken = "foo"; |
| 971 o.operations = buildUnnamed1978(); | 971 o.operations = buildUnnamed1988(); |
| 972 } | 972 } |
| 973 buildCounterListOperationsResponse--; | 973 buildCounterListOperationsResponse--; |
| 974 return o; | 974 return o; |
| 975 } | 975 } |
| 976 | 976 |
| 977 checkListOperationsResponse(api.ListOperationsResponse o) { | 977 checkListOperationsResponse(api.ListOperationsResponse o) { |
| 978 buildCounterListOperationsResponse++; | 978 buildCounterListOperationsResponse++; |
| 979 if (buildCounterListOperationsResponse < 3) { | 979 if (buildCounterListOperationsResponse < 3) { |
| 980 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 980 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
| 981 checkUnnamed1978(o.operations); | 981 checkUnnamed1988(o.operations); |
| 982 } | 982 } |
| 983 buildCounterListOperationsResponse--; | 983 buildCounterListOperationsResponse--; |
| 984 } | 984 } |
| 985 | 985 |
| 986 core.int buildCounterLogConfig = 0; | 986 core.int buildCounterLogConfig = 0; |
| 987 buildLogConfig() { | 987 buildLogConfig() { |
| 988 var o = new api.LogConfig(); | 988 var o = new api.LogConfig(); |
| 989 buildCounterLogConfig++; | 989 buildCounterLogConfig++; |
| 990 if (buildCounterLogConfig < 3) { | 990 if (buildCounterLogConfig < 3) { |
| 991 o.cloudAudit = buildCloudAuditOptions(); | 991 o.cloudAudit = buildCloudAuditOptions(); |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1026 if (buildCounterMutation < 3) { | 1026 if (buildCounterMutation < 3) { |
| 1027 checkDelete(o.delete); | 1027 checkDelete(o.delete); |
| 1028 checkWrite(o.insert); | 1028 checkWrite(o.insert); |
| 1029 checkWrite(o.insertOrUpdate); | 1029 checkWrite(o.insertOrUpdate); |
| 1030 checkWrite(o.replace); | 1030 checkWrite(o.replace); |
| 1031 checkWrite(o.update); | 1031 checkWrite(o.update); |
| 1032 } | 1032 } |
| 1033 buildCounterMutation--; | 1033 buildCounterMutation--; |
| 1034 } | 1034 } |
| 1035 | 1035 |
| 1036 buildUnnamed1979() { | 1036 buildUnnamed1989() { |
| 1037 var o = new core.Map<core.String, core.Object>(); | 1037 var o = new core.Map<core.String, core.Object>(); |
| 1038 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 1038 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; |
| 1039 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 1039 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; |
| 1040 return o; | 1040 return o; |
| 1041 } | 1041 } |
| 1042 | 1042 |
| 1043 checkUnnamed1979(core.Map<core.String, core.Object> o) { | 1043 checkUnnamed1989(core.Map<core.String, core.Object> o) { |
| 1044 unittest.expect(o, unittest.hasLength(2)); | 1044 unittest.expect(o, unittest.hasLength(2)); |
| 1045 var casted13 = (o["x"]) as core.Map; unittest.expect(casted13, unittest.hasLen
gth(3)); unittest.expect(casted13["list"], unittest.equals([1, 2, 3])); unittest
.expect(casted13["bool"], unittest.equals(true)); unittest.expect(casted13["stri
ng"], unittest.equals('foo')); | 1045 var casted13 = (o["x"]) as core.Map; unittest.expect(casted13, unittest.hasLen
gth(3)); unittest.expect(casted13["list"], unittest.equals([1, 2, 3])); unittest
.expect(casted13["bool"], unittest.equals(true)); unittest.expect(casted13["stri
ng"], unittest.equals('foo')); |
| 1046 var casted14 = (o["y"]) as core.Map; unittest.expect(casted14, unittest.hasLen
gth(3)); unittest.expect(casted14["list"], unittest.equals([1, 2, 3])); unittest
.expect(casted14["bool"], unittest.equals(true)); unittest.expect(casted14["stri
ng"], unittest.equals('foo')); | 1046 var casted14 = (o["y"]) as core.Map; unittest.expect(casted14, unittest.hasLen
gth(3)); unittest.expect(casted14["list"], unittest.equals([1, 2, 3])); unittest
.expect(casted14["bool"], unittest.equals(true)); unittest.expect(casted14["stri
ng"], unittest.equals('foo')); |
| 1047 } | 1047 } |
| 1048 | 1048 |
| 1049 buildUnnamed1980() { | 1049 buildUnnamed1990() { |
| 1050 var o = new core.Map<core.String, core.Object>(); | 1050 var o = new core.Map<core.String, core.Object>(); |
| 1051 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 1051 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; |
| 1052 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 1052 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; |
| 1053 return o; | 1053 return o; |
| 1054 } | 1054 } |
| 1055 | 1055 |
| 1056 checkUnnamed1980(core.Map<core.String, core.Object> o) { | 1056 checkUnnamed1990(core.Map<core.String, core.Object> o) { |
| 1057 unittest.expect(o, unittest.hasLength(2)); | 1057 unittest.expect(o, unittest.hasLength(2)); |
| 1058 var casted15 = (o["x"]) as core.Map; unittest.expect(casted15, unittest.hasLen
gth(3)); unittest.expect(casted15["list"], unittest.equals([1, 2, 3])); unittest
.expect(casted15["bool"], unittest.equals(true)); unittest.expect(casted15["stri
ng"], unittest.equals('foo')); | 1058 var casted15 = (o["x"]) as core.Map; unittest.expect(casted15, unittest.hasLen
gth(3)); unittest.expect(casted15["list"], unittest.equals([1, 2, 3])); unittest
.expect(casted15["bool"], unittest.equals(true)); unittest.expect(casted15["stri
ng"], unittest.equals('foo')); |
| 1059 var casted16 = (o["y"]) as core.Map; unittest.expect(casted16, unittest.hasLen
gth(3)); unittest.expect(casted16["list"], unittest.equals([1, 2, 3])); unittest
.expect(casted16["bool"], unittest.equals(true)); unittest.expect(casted16["stri
ng"], unittest.equals('foo')); | 1059 var casted16 = (o["y"]) as core.Map; unittest.expect(casted16, unittest.hasLen
gth(3)); unittest.expect(casted16["list"], unittest.equals([1, 2, 3])); unittest
.expect(casted16["bool"], unittest.equals(true)); unittest.expect(casted16["stri
ng"], unittest.equals('foo')); |
| 1060 } | 1060 } |
| 1061 | 1061 |
| 1062 core.int buildCounterOperation = 0; | 1062 core.int buildCounterOperation = 0; |
| 1063 buildOperation() { | 1063 buildOperation() { |
| 1064 var o = new api.Operation(); | 1064 var o = new api.Operation(); |
| 1065 buildCounterOperation++; | 1065 buildCounterOperation++; |
| 1066 if (buildCounterOperation < 3) { | 1066 if (buildCounterOperation < 3) { |
| 1067 o.done = true; | 1067 o.done = true; |
| 1068 o.error = buildStatus(); | 1068 o.error = buildStatus(); |
| 1069 o.metadata = buildUnnamed1979(); | 1069 o.metadata = buildUnnamed1989(); |
| 1070 o.name = "foo"; | 1070 o.name = "foo"; |
| 1071 o.response = buildUnnamed1980(); | 1071 o.response = buildUnnamed1990(); |
| 1072 } | 1072 } |
| 1073 buildCounterOperation--; | 1073 buildCounterOperation--; |
| 1074 return o; | 1074 return o; |
| 1075 } | 1075 } |
| 1076 | 1076 |
| 1077 checkOperation(api.Operation o) { | 1077 checkOperation(api.Operation o) { |
| 1078 buildCounterOperation++; | 1078 buildCounterOperation++; |
| 1079 if (buildCounterOperation < 3) { | 1079 if (buildCounterOperation < 3) { |
| 1080 unittest.expect(o.done, unittest.isTrue); | 1080 unittest.expect(o.done, unittest.isTrue); |
| 1081 checkStatus(o.error); | 1081 checkStatus(o.error); |
| 1082 checkUnnamed1979(o.metadata); | 1082 checkUnnamed1989(o.metadata); |
| 1083 unittest.expect(o.name, unittest.equals('foo')); | 1083 unittest.expect(o.name, unittest.equals('foo')); |
| 1084 checkUnnamed1980(o.response); | 1084 checkUnnamed1990(o.response); |
| 1085 } | 1085 } |
| 1086 buildCounterOperation--; | 1086 buildCounterOperation--; |
| 1087 } | 1087 } |
| 1088 | 1088 |
| 1089 buildUnnamed1981() { | 1089 buildUnnamed1991() { |
| 1090 var o = new core.List<core.Object>(); | 1090 var o = new core.List<core.Object>(); |
| 1091 o.add({'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}); | 1091 o.add({'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}); |
| 1092 o.add({'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}); | 1092 o.add({'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}); |
| 1093 return o; | 1093 return o; |
| 1094 } | 1094 } |
| 1095 | 1095 |
| 1096 checkUnnamed1981(core.List<core.Object> o) { | 1096 checkUnnamed1991(core.List<core.Object> o) { |
| 1097 unittest.expect(o, unittest.hasLength(2)); | 1097 unittest.expect(o, unittest.hasLength(2)); |
| 1098 var casted17 = (o[0]) as core.Map; unittest.expect(casted17, unittest.hasLengt
h(3)); unittest.expect(casted17["list"], unittest.equals([1, 2, 3])); unittest.e
xpect(casted17["bool"], unittest.equals(true)); unittest.expect(casted17["string
"], unittest.equals('foo')); | 1098 var casted17 = (o[0]) as core.Map; unittest.expect(casted17, unittest.hasLengt
h(3)); unittest.expect(casted17["list"], unittest.equals([1, 2, 3])); unittest.e
xpect(casted17["bool"], unittest.equals(true)); unittest.expect(casted17["string
"], unittest.equals('foo')); |
| 1099 var casted18 = (o[1]) as core.Map; unittest.expect(casted18, unittest.hasLengt
h(3)); unittest.expect(casted18["list"], unittest.equals([1, 2, 3])); unittest.e
xpect(casted18["bool"], unittest.equals(true)); unittest.expect(casted18["string
"], unittest.equals('foo')); | 1099 var casted18 = (o[1]) as core.Map; unittest.expect(casted18, unittest.hasLengt
h(3)); unittest.expect(casted18["list"], unittest.equals([1, 2, 3])); unittest.e
xpect(casted18["bool"], unittest.equals(true)); unittest.expect(casted18["string
"], unittest.equals('foo')); |
| 1100 } | 1100 } |
| 1101 | 1101 |
| 1102 core.int buildCounterPartialResultSet = 0; | 1102 core.int buildCounterPartialResultSet = 0; |
| 1103 buildPartialResultSet() { | 1103 buildPartialResultSet() { |
| 1104 var o = new api.PartialResultSet(); | 1104 var o = new api.PartialResultSet(); |
| 1105 buildCounterPartialResultSet++; | 1105 buildCounterPartialResultSet++; |
| 1106 if (buildCounterPartialResultSet < 3) { | 1106 if (buildCounterPartialResultSet < 3) { |
| 1107 o.chunkedValue = true; | 1107 o.chunkedValue = true; |
| 1108 o.metadata = buildResultSetMetadata(); | 1108 o.metadata = buildResultSetMetadata(); |
| 1109 o.resumeToken = "foo"; | 1109 o.resumeToken = "foo"; |
| 1110 o.stats = buildResultSetStats(); | 1110 o.stats = buildResultSetStats(); |
| 1111 o.values = buildUnnamed1981(); | 1111 o.values = buildUnnamed1991(); |
| 1112 } | 1112 } |
| 1113 buildCounterPartialResultSet--; | 1113 buildCounterPartialResultSet--; |
| 1114 return o; | 1114 return o; |
| 1115 } | 1115 } |
| 1116 | 1116 |
| 1117 checkPartialResultSet(api.PartialResultSet o) { | 1117 checkPartialResultSet(api.PartialResultSet o) { |
| 1118 buildCounterPartialResultSet++; | 1118 buildCounterPartialResultSet++; |
| 1119 if (buildCounterPartialResultSet < 3) { | 1119 if (buildCounterPartialResultSet < 3) { |
| 1120 unittest.expect(o.chunkedValue, unittest.isTrue); | 1120 unittest.expect(o.chunkedValue, unittest.isTrue); |
| 1121 checkResultSetMetadata(o.metadata); | 1121 checkResultSetMetadata(o.metadata); |
| 1122 unittest.expect(o.resumeToken, unittest.equals('foo')); | 1122 unittest.expect(o.resumeToken, unittest.equals('foo')); |
| 1123 checkResultSetStats(o.stats); | 1123 checkResultSetStats(o.stats); |
| 1124 checkUnnamed1981(o.values); | 1124 checkUnnamed1991(o.values); |
| 1125 } | 1125 } |
| 1126 buildCounterPartialResultSet--; | 1126 buildCounterPartialResultSet--; |
| 1127 } | 1127 } |
| 1128 | 1128 |
| 1129 buildUnnamed1982() { | 1129 buildUnnamed1992() { |
| 1130 var o = new core.List<api.ChildLink>(); | 1130 var o = new core.List<api.ChildLink>(); |
| 1131 o.add(buildChildLink()); | 1131 o.add(buildChildLink()); |
| 1132 o.add(buildChildLink()); | 1132 o.add(buildChildLink()); |
| 1133 return o; | 1133 return o; |
| 1134 } | 1134 } |
| 1135 | 1135 |
| 1136 checkUnnamed1982(core.List<api.ChildLink> o) { | 1136 checkUnnamed1992(core.List<api.ChildLink> o) { |
| 1137 unittest.expect(o, unittest.hasLength(2)); | 1137 unittest.expect(o, unittest.hasLength(2)); |
| 1138 checkChildLink(o[0]); | 1138 checkChildLink(o[0]); |
| 1139 checkChildLink(o[1]); | 1139 checkChildLink(o[1]); |
| 1140 } | 1140 } |
| 1141 | 1141 |
| 1142 buildUnnamed1983() { | 1142 buildUnnamed1993() { |
| 1143 var o = new core.Map<core.String, core.Object>(); | 1143 var o = new core.Map<core.String, core.Object>(); |
| 1144 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 1144 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; |
| 1145 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 1145 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; |
| 1146 return o; | 1146 return o; |
| 1147 } | 1147 } |
| 1148 | 1148 |
| 1149 checkUnnamed1983(core.Map<core.String, core.Object> o) { | 1149 checkUnnamed1993(core.Map<core.String, core.Object> o) { |
| 1150 unittest.expect(o, unittest.hasLength(2)); | 1150 unittest.expect(o, unittest.hasLength(2)); |
| 1151 var casted19 = (o["x"]) as core.Map; unittest.expect(casted19, unittest.hasLen
gth(3)); unittest.expect(casted19["list"], unittest.equals([1, 2, 3])); unittest
.expect(casted19["bool"], unittest.equals(true)); unittest.expect(casted19["stri
ng"], unittest.equals('foo')); | 1151 var casted19 = (o["x"]) as core.Map; unittest.expect(casted19, unittest.hasLen
gth(3)); unittest.expect(casted19["list"], unittest.equals([1, 2, 3])); unittest
.expect(casted19["bool"], unittest.equals(true)); unittest.expect(casted19["stri
ng"], unittest.equals('foo')); |
| 1152 var casted20 = (o["y"]) as core.Map; unittest.expect(casted20, unittest.hasLen
gth(3)); unittest.expect(casted20["list"], unittest.equals([1, 2, 3])); unittest
.expect(casted20["bool"], unittest.equals(true)); unittest.expect(casted20["stri
ng"], unittest.equals('foo')); | 1152 var casted20 = (o["y"]) as core.Map; unittest.expect(casted20, unittest.hasLen
gth(3)); unittest.expect(casted20["list"], unittest.equals([1, 2, 3])); unittest
.expect(casted20["bool"], unittest.equals(true)); unittest.expect(casted20["stri
ng"], unittest.equals('foo')); |
| 1153 } | 1153 } |
| 1154 | 1154 |
| 1155 buildUnnamed1984() { | 1155 buildUnnamed1994() { |
| 1156 var o = new core.Map<core.String, core.Object>(); | 1156 var o = new core.Map<core.String, core.Object>(); |
| 1157 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 1157 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; |
| 1158 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 1158 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; |
| 1159 return o; | 1159 return o; |
| 1160 } | 1160 } |
| 1161 | 1161 |
| 1162 checkUnnamed1984(core.Map<core.String, core.Object> o) { | 1162 checkUnnamed1994(core.Map<core.String, core.Object> o) { |
| 1163 unittest.expect(o, unittest.hasLength(2)); | 1163 unittest.expect(o, unittest.hasLength(2)); |
| 1164 var casted21 = (o["x"]) as core.Map; unittest.expect(casted21, unittest.hasLen
gth(3)); unittest.expect(casted21["list"], unittest.equals([1, 2, 3])); unittest
.expect(casted21["bool"], unittest.equals(true)); unittest.expect(casted21["stri
ng"], unittest.equals('foo')); | 1164 var casted21 = (o["x"]) as core.Map; unittest.expect(casted21, unittest.hasLen
gth(3)); unittest.expect(casted21["list"], unittest.equals([1, 2, 3])); unittest
.expect(casted21["bool"], unittest.equals(true)); unittest.expect(casted21["stri
ng"], unittest.equals('foo')); |
| 1165 var casted22 = (o["y"]) as core.Map; unittest.expect(casted22, unittest.hasLen
gth(3)); unittest.expect(casted22["list"], unittest.equals([1, 2, 3])); unittest
.expect(casted22["bool"], unittest.equals(true)); unittest.expect(casted22["stri
ng"], unittest.equals('foo')); | 1165 var casted22 = (o["y"]) as core.Map; unittest.expect(casted22, unittest.hasLen
gth(3)); unittest.expect(casted22["list"], unittest.equals([1, 2, 3])); unittest
.expect(casted22["bool"], unittest.equals(true)); unittest.expect(casted22["stri
ng"], unittest.equals('foo')); |
| 1166 } | 1166 } |
| 1167 | 1167 |
| 1168 core.int buildCounterPlanNode = 0; | 1168 core.int buildCounterPlanNode = 0; |
| 1169 buildPlanNode() { | 1169 buildPlanNode() { |
| 1170 var o = new api.PlanNode(); | 1170 var o = new api.PlanNode(); |
| 1171 buildCounterPlanNode++; | 1171 buildCounterPlanNode++; |
| 1172 if (buildCounterPlanNode < 3) { | 1172 if (buildCounterPlanNode < 3) { |
| 1173 o.childLinks = buildUnnamed1982(); | 1173 o.childLinks = buildUnnamed1992(); |
| 1174 o.displayName = "foo"; | 1174 o.displayName = "foo"; |
| 1175 o.executionStats = buildUnnamed1983(); | 1175 o.executionStats = buildUnnamed1993(); |
| 1176 o.index = 42; | 1176 o.index = 42; |
| 1177 o.kind = "foo"; | 1177 o.kind = "foo"; |
| 1178 o.metadata = buildUnnamed1984(); | 1178 o.metadata = buildUnnamed1994(); |
| 1179 o.shortRepresentation = buildShortRepresentation(); | 1179 o.shortRepresentation = buildShortRepresentation(); |
| 1180 } | 1180 } |
| 1181 buildCounterPlanNode--; | 1181 buildCounterPlanNode--; |
| 1182 return o; | 1182 return o; |
| 1183 } | 1183 } |
| 1184 | 1184 |
| 1185 checkPlanNode(api.PlanNode o) { | 1185 checkPlanNode(api.PlanNode o) { |
| 1186 buildCounterPlanNode++; | 1186 buildCounterPlanNode++; |
| 1187 if (buildCounterPlanNode < 3) { | 1187 if (buildCounterPlanNode < 3) { |
| 1188 checkUnnamed1982(o.childLinks); | 1188 checkUnnamed1992(o.childLinks); |
| 1189 unittest.expect(o.displayName, unittest.equals('foo')); | 1189 unittest.expect(o.displayName, unittest.equals('foo')); |
| 1190 checkUnnamed1983(o.executionStats); | 1190 checkUnnamed1993(o.executionStats); |
| 1191 unittest.expect(o.index, unittest.equals(42)); | 1191 unittest.expect(o.index, unittest.equals(42)); |
| 1192 unittest.expect(o.kind, unittest.equals('foo')); | 1192 unittest.expect(o.kind, unittest.equals('foo')); |
| 1193 checkUnnamed1984(o.metadata); | 1193 checkUnnamed1994(o.metadata); |
| 1194 checkShortRepresentation(o.shortRepresentation); | 1194 checkShortRepresentation(o.shortRepresentation); |
| 1195 } | 1195 } |
| 1196 buildCounterPlanNode--; | 1196 buildCounterPlanNode--; |
| 1197 } | 1197 } |
| 1198 | 1198 |
| 1199 buildUnnamed1985() { | 1199 buildUnnamed1995() { |
| 1200 var o = new core.List<api.AuditConfig>(); | 1200 var o = new core.List<api.AuditConfig>(); |
| 1201 o.add(buildAuditConfig()); | 1201 o.add(buildAuditConfig()); |
| 1202 o.add(buildAuditConfig()); | 1202 o.add(buildAuditConfig()); |
| 1203 return o; | 1203 return o; |
| 1204 } | 1204 } |
| 1205 | 1205 |
| 1206 checkUnnamed1985(core.List<api.AuditConfig> o) { | 1206 checkUnnamed1995(core.List<api.AuditConfig> o) { |
| 1207 unittest.expect(o, unittest.hasLength(2)); | 1207 unittest.expect(o, unittest.hasLength(2)); |
| 1208 checkAuditConfig(o[0]); | 1208 checkAuditConfig(o[0]); |
| 1209 checkAuditConfig(o[1]); | 1209 checkAuditConfig(o[1]); |
| 1210 } | 1210 } |
| 1211 | 1211 |
| 1212 buildUnnamed1986() { | 1212 buildUnnamed1996() { |
| 1213 var o = new core.List<api.Binding>(); | 1213 var o = new core.List<api.Binding>(); |
| 1214 o.add(buildBinding()); | 1214 o.add(buildBinding()); |
| 1215 o.add(buildBinding()); | 1215 o.add(buildBinding()); |
| 1216 return o; | 1216 return o; |
| 1217 } | 1217 } |
| 1218 | 1218 |
| 1219 checkUnnamed1986(core.List<api.Binding> o) { | 1219 checkUnnamed1996(core.List<api.Binding> o) { |
| 1220 unittest.expect(o, unittest.hasLength(2)); | 1220 unittest.expect(o, unittest.hasLength(2)); |
| 1221 checkBinding(o[0]); | 1221 checkBinding(o[0]); |
| 1222 checkBinding(o[1]); | 1222 checkBinding(o[1]); |
| 1223 } | 1223 } |
| 1224 | 1224 |
| 1225 buildUnnamed1987() { | 1225 buildUnnamed1997() { |
| 1226 var o = new core.List<api.Rule>(); | 1226 var o = new core.List<api.Rule>(); |
| 1227 o.add(buildRule()); | 1227 o.add(buildRule()); |
| 1228 o.add(buildRule()); | 1228 o.add(buildRule()); |
| 1229 return o; | 1229 return o; |
| 1230 } | 1230 } |
| 1231 | 1231 |
| 1232 checkUnnamed1987(core.List<api.Rule> o) { | 1232 checkUnnamed1997(core.List<api.Rule> o) { |
| 1233 unittest.expect(o, unittest.hasLength(2)); | 1233 unittest.expect(o, unittest.hasLength(2)); |
| 1234 checkRule(o[0]); | 1234 checkRule(o[0]); |
| 1235 checkRule(o[1]); | 1235 checkRule(o[1]); |
| 1236 } | 1236 } |
| 1237 | 1237 |
| 1238 core.int buildCounterPolicy = 0; | 1238 core.int buildCounterPolicy = 0; |
| 1239 buildPolicy() { | 1239 buildPolicy() { |
| 1240 var o = new api.Policy(); | 1240 var o = new api.Policy(); |
| 1241 buildCounterPolicy++; | 1241 buildCounterPolicy++; |
| 1242 if (buildCounterPolicy < 3) { | 1242 if (buildCounterPolicy < 3) { |
| 1243 o.auditConfigs = buildUnnamed1985(); | 1243 o.auditConfigs = buildUnnamed1995(); |
| 1244 o.bindings = buildUnnamed1986(); | 1244 o.bindings = buildUnnamed1996(); |
| 1245 o.etag = "foo"; | 1245 o.etag = "foo"; |
| 1246 o.iamOwned = true; | 1246 o.iamOwned = true; |
| 1247 o.rules = buildUnnamed1987(); | 1247 o.rules = buildUnnamed1997(); |
| 1248 o.version = 42; | 1248 o.version = 42; |
| 1249 } | 1249 } |
| 1250 buildCounterPolicy--; | 1250 buildCounterPolicy--; |
| 1251 return o; | 1251 return o; |
| 1252 } | 1252 } |
| 1253 | 1253 |
| 1254 checkPolicy(api.Policy o) { | 1254 checkPolicy(api.Policy o) { |
| 1255 buildCounterPolicy++; | 1255 buildCounterPolicy++; |
| 1256 if (buildCounterPolicy < 3) { | 1256 if (buildCounterPolicy < 3) { |
| 1257 checkUnnamed1985(o.auditConfigs); | 1257 checkUnnamed1995(o.auditConfigs); |
| 1258 checkUnnamed1986(o.bindings); | 1258 checkUnnamed1996(o.bindings); |
| 1259 unittest.expect(o.etag, unittest.equals('foo')); | 1259 unittest.expect(o.etag, unittest.equals('foo')); |
| 1260 unittest.expect(o.iamOwned, unittest.isTrue); | 1260 unittest.expect(o.iamOwned, unittest.isTrue); |
| 1261 checkUnnamed1987(o.rules); | 1261 checkUnnamed1997(o.rules); |
| 1262 unittest.expect(o.version, unittest.equals(42)); | 1262 unittest.expect(o.version, unittest.equals(42)); |
| 1263 } | 1263 } |
| 1264 buildCounterPolicy--; | 1264 buildCounterPolicy--; |
| 1265 } | 1265 } |
| 1266 | 1266 |
| 1267 buildUnnamed1988() { | 1267 buildUnnamed1998() { |
| 1268 var o = new core.List<api.PlanNode>(); | 1268 var o = new core.List<api.PlanNode>(); |
| 1269 o.add(buildPlanNode()); | 1269 o.add(buildPlanNode()); |
| 1270 o.add(buildPlanNode()); | 1270 o.add(buildPlanNode()); |
| 1271 return o; | 1271 return o; |
| 1272 } | 1272 } |
| 1273 | 1273 |
| 1274 checkUnnamed1988(core.List<api.PlanNode> o) { | 1274 checkUnnamed1998(core.List<api.PlanNode> o) { |
| 1275 unittest.expect(o, unittest.hasLength(2)); | 1275 unittest.expect(o, unittest.hasLength(2)); |
| 1276 checkPlanNode(o[0]); | 1276 checkPlanNode(o[0]); |
| 1277 checkPlanNode(o[1]); | 1277 checkPlanNode(o[1]); |
| 1278 } | 1278 } |
| 1279 | 1279 |
| 1280 core.int buildCounterQueryPlan = 0; | 1280 core.int buildCounterQueryPlan = 0; |
| 1281 buildQueryPlan() { | 1281 buildQueryPlan() { |
| 1282 var o = new api.QueryPlan(); | 1282 var o = new api.QueryPlan(); |
| 1283 buildCounterQueryPlan++; | 1283 buildCounterQueryPlan++; |
| 1284 if (buildCounterQueryPlan < 3) { | 1284 if (buildCounterQueryPlan < 3) { |
| 1285 o.planNodes = buildUnnamed1988(); | 1285 o.planNodes = buildUnnamed1998(); |
| 1286 } | 1286 } |
| 1287 buildCounterQueryPlan--; | 1287 buildCounterQueryPlan--; |
| 1288 return o; | 1288 return o; |
| 1289 } | 1289 } |
| 1290 | 1290 |
| 1291 checkQueryPlan(api.QueryPlan o) { | 1291 checkQueryPlan(api.QueryPlan o) { |
| 1292 buildCounterQueryPlan++; | 1292 buildCounterQueryPlan++; |
| 1293 if (buildCounterQueryPlan < 3) { | 1293 if (buildCounterQueryPlan < 3) { |
| 1294 checkUnnamed1988(o.planNodes); | 1294 checkUnnamed1998(o.planNodes); |
| 1295 } | 1295 } |
| 1296 buildCounterQueryPlan--; | 1296 buildCounterQueryPlan--; |
| 1297 } | 1297 } |
| 1298 | 1298 |
| 1299 core.int buildCounterReadOnly = 0; | 1299 core.int buildCounterReadOnly = 0; |
| 1300 buildReadOnly() { | 1300 buildReadOnly() { |
| 1301 var o = new api.ReadOnly(); | 1301 var o = new api.ReadOnly(); |
| 1302 buildCounterReadOnly++; | 1302 buildCounterReadOnly++; |
| 1303 if (buildCounterReadOnly < 3) { | 1303 if (buildCounterReadOnly < 3) { |
| 1304 o.exactStaleness = "foo"; | 1304 o.exactStaleness = "foo"; |
| (...skipping 13 matching lines...) Expand all Loading... |
| 1318 unittest.expect(o.exactStaleness, unittest.equals('foo')); | 1318 unittest.expect(o.exactStaleness, unittest.equals('foo')); |
| 1319 unittest.expect(o.maxStaleness, unittest.equals('foo')); | 1319 unittest.expect(o.maxStaleness, unittest.equals('foo')); |
| 1320 unittest.expect(o.minReadTimestamp, unittest.equals('foo')); | 1320 unittest.expect(o.minReadTimestamp, unittest.equals('foo')); |
| 1321 unittest.expect(o.readTimestamp, unittest.equals('foo')); | 1321 unittest.expect(o.readTimestamp, unittest.equals('foo')); |
| 1322 unittest.expect(o.returnReadTimestamp, unittest.isTrue); | 1322 unittest.expect(o.returnReadTimestamp, unittest.isTrue); |
| 1323 unittest.expect(o.strong, unittest.isTrue); | 1323 unittest.expect(o.strong, unittest.isTrue); |
| 1324 } | 1324 } |
| 1325 buildCounterReadOnly--; | 1325 buildCounterReadOnly--; |
| 1326 } | 1326 } |
| 1327 | 1327 |
| 1328 buildUnnamed1989() { | 1328 buildUnnamed1999() { |
| 1329 var o = new core.List<core.String>(); | 1329 var o = new core.List<core.String>(); |
| 1330 o.add("foo"); | 1330 o.add("foo"); |
| 1331 o.add("foo"); | 1331 o.add("foo"); |
| 1332 return o; | 1332 return o; |
| 1333 } | 1333 } |
| 1334 | 1334 |
| 1335 checkUnnamed1989(core.List<core.String> o) { | 1335 checkUnnamed1999(core.List<core.String> o) { |
| 1336 unittest.expect(o, unittest.hasLength(2)); | 1336 unittest.expect(o, unittest.hasLength(2)); |
| 1337 unittest.expect(o[0], unittest.equals('foo')); | 1337 unittest.expect(o[0], unittest.equals('foo')); |
| 1338 unittest.expect(o[1], unittest.equals('foo')); | 1338 unittest.expect(o[1], unittest.equals('foo')); |
| 1339 } | 1339 } |
| 1340 | 1340 |
| 1341 core.int buildCounterReadRequest = 0; | 1341 core.int buildCounterReadRequest = 0; |
| 1342 buildReadRequest() { | 1342 buildReadRequest() { |
| 1343 var o = new api.ReadRequest(); | 1343 var o = new api.ReadRequest(); |
| 1344 buildCounterReadRequest++; | 1344 buildCounterReadRequest++; |
| 1345 if (buildCounterReadRequest < 3) { | 1345 if (buildCounterReadRequest < 3) { |
| 1346 o.columns = buildUnnamed1989(); | 1346 o.columns = buildUnnamed1999(); |
| 1347 o.index = "foo"; | 1347 o.index = "foo"; |
| 1348 o.keySet = buildKeySet(); | 1348 o.keySet = buildKeySet(); |
| 1349 o.limit = "foo"; | 1349 o.limit = "foo"; |
| 1350 o.resumeToken = "foo"; | 1350 o.resumeToken = "foo"; |
| 1351 o.table = "foo"; | 1351 o.table = "foo"; |
| 1352 o.transaction = buildTransactionSelector(); | 1352 o.transaction = buildTransactionSelector(); |
| 1353 } | 1353 } |
| 1354 buildCounterReadRequest--; | 1354 buildCounterReadRequest--; |
| 1355 return o; | 1355 return o; |
| 1356 } | 1356 } |
| 1357 | 1357 |
| 1358 checkReadRequest(api.ReadRequest o) { | 1358 checkReadRequest(api.ReadRequest o) { |
| 1359 buildCounterReadRequest++; | 1359 buildCounterReadRequest++; |
| 1360 if (buildCounterReadRequest < 3) { | 1360 if (buildCounterReadRequest < 3) { |
| 1361 checkUnnamed1989(o.columns); | 1361 checkUnnamed1999(o.columns); |
| 1362 unittest.expect(o.index, unittest.equals('foo')); | 1362 unittest.expect(o.index, unittest.equals('foo')); |
| 1363 checkKeySet(o.keySet); | 1363 checkKeySet(o.keySet); |
| 1364 unittest.expect(o.limit, unittest.equals('foo')); | 1364 unittest.expect(o.limit, unittest.equals('foo')); |
| 1365 unittest.expect(o.resumeToken, unittest.equals('foo')); | 1365 unittest.expect(o.resumeToken, unittest.equals('foo')); |
| 1366 unittest.expect(o.table, unittest.equals('foo')); | 1366 unittest.expect(o.table, unittest.equals('foo')); |
| 1367 checkTransactionSelector(o.transaction); | 1367 checkTransactionSelector(o.transaction); |
| 1368 } | 1368 } |
| 1369 buildCounterReadRequest--; | 1369 buildCounterReadRequest--; |
| 1370 } | 1370 } |
| 1371 | 1371 |
| 1372 core.int buildCounterReadWrite = 0; | 1372 core.int buildCounterReadWrite = 0; |
| 1373 buildReadWrite() { | 1373 buildReadWrite() { |
| 1374 var o = new api.ReadWrite(); | 1374 var o = new api.ReadWrite(); |
| 1375 buildCounterReadWrite++; | 1375 buildCounterReadWrite++; |
| 1376 if (buildCounterReadWrite < 3) { | 1376 if (buildCounterReadWrite < 3) { |
| 1377 } | 1377 } |
| 1378 buildCounterReadWrite--; | 1378 buildCounterReadWrite--; |
| 1379 return o; | 1379 return o; |
| 1380 } | 1380 } |
| 1381 | 1381 |
| 1382 checkReadWrite(api.ReadWrite o) { | 1382 checkReadWrite(api.ReadWrite o) { |
| 1383 buildCounterReadWrite++; | 1383 buildCounterReadWrite++; |
| 1384 if (buildCounterReadWrite < 3) { | 1384 if (buildCounterReadWrite < 3) { |
| 1385 } | 1385 } |
| 1386 buildCounterReadWrite--; | 1386 buildCounterReadWrite--; |
| 1387 } | 1387 } |
| 1388 | 1388 |
| 1389 buildUnnamed1990() { | 1389 buildUnnamed2000() { |
| 1390 var o = new core.List<core.Object>(); | 1390 var o = new core.List<core.Object>(); |
| 1391 o.add({'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}); | 1391 o.add({'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}); |
| 1392 o.add({'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}); | 1392 o.add({'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}); |
| 1393 return o; | 1393 return o; |
| 1394 } | 1394 } |
| 1395 | 1395 |
| 1396 checkUnnamed1990(core.List<core.Object> o) { | 1396 checkUnnamed2000(core.List<core.Object> o) { |
| 1397 unittest.expect(o, unittest.hasLength(2)); | 1397 unittest.expect(o, unittest.hasLength(2)); |
| 1398 var casted23 = (o[0]) as core.Map; unittest.expect(casted23, unittest.hasLengt
h(3)); unittest.expect(casted23["list"], unittest.equals([1, 2, 3])); unittest.e
xpect(casted23["bool"], unittest.equals(true)); unittest.expect(casted23["string
"], unittest.equals('foo')); | 1398 var casted23 = (o[0]) as core.Map; unittest.expect(casted23, unittest.hasLengt
h(3)); unittest.expect(casted23["list"], unittest.equals([1, 2, 3])); unittest.e
xpect(casted23["bool"], unittest.equals(true)); unittest.expect(casted23["string
"], unittest.equals('foo')); |
| 1399 var casted24 = (o[1]) as core.Map; unittest.expect(casted24, unittest.hasLengt
h(3)); unittest.expect(casted24["list"], unittest.equals([1, 2, 3])); unittest.e
xpect(casted24["bool"], unittest.equals(true)); unittest.expect(casted24["string
"], unittest.equals('foo')); | 1399 var casted24 = (o[1]) as core.Map; unittest.expect(casted24, unittest.hasLengt
h(3)); unittest.expect(casted24["list"], unittest.equals([1, 2, 3])); unittest.e
xpect(casted24["bool"], unittest.equals(true)); unittest.expect(casted24["string
"], unittest.equals('foo')); |
| 1400 } | 1400 } |
| 1401 | 1401 |
| 1402 buildUnnamed1991() { | 1402 buildUnnamed2001() { |
| 1403 var o = new core.List<core.List<core.Object>>(); | 1403 var o = new core.List<core.List<core.Object>>(); |
| 1404 o.add(buildUnnamed1990()); | 1404 o.add(buildUnnamed2000()); |
| 1405 o.add(buildUnnamed1990()); | 1405 o.add(buildUnnamed2000()); |
| 1406 return o; | 1406 return o; |
| 1407 } | 1407 } |
| 1408 | 1408 |
| 1409 checkUnnamed1991(core.List<core.List<core.Object>> o) { | 1409 checkUnnamed2001(core.List<core.List<core.Object>> o) { |
| 1410 unittest.expect(o, unittest.hasLength(2)); | 1410 unittest.expect(o, unittest.hasLength(2)); |
| 1411 checkUnnamed1990(o[0]); | 1411 checkUnnamed2000(o[0]); |
| 1412 checkUnnamed1990(o[1]); | 1412 checkUnnamed2000(o[1]); |
| 1413 } | 1413 } |
| 1414 | 1414 |
| 1415 core.int buildCounterResultSet = 0; | 1415 core.int buildCounterResultSet = 0; |
| 1416 buildResultSet() { | 1416 buildResultSet() { |
| 1417 var o = new api.ResultSet(); | 1417 var o = new api.ResultSet(); |
| 1418 buildCounterResultSet++; | 1418 buildCounterResultSet++; |
| 1419 if (buildCounterResultSet < 3) { | 1419 if (buildCounterResultSet < 3) { |
| 1420 o.metadata = buildResultSetMetadata(); | 1420 o.metadata = buildResultSetMetadata(); |
| 1421 o.rows = buildUnnamed1991(); | 1421 o.rows = buildUnnamed2001(); |
| 1422 o.stats = buildResultSetStats(); | 1422 o.stats = buildResultSetStats(); |
| 1423 } | 1423 } |
| 1424 buildCounterResultSet--; | 1424 buildCounterResultSet--; |
| 1425 return o; | 1425 return o; |
| 1426 } | 1426 } |
| 1427 | 1427 |
| 1428 checkResultSet(api.ResultSet o) { | 1428 checkResultSet(api.ResultSet o) { |
| 1429 buildCounterResultSet++; | 1429 buildCounterResultSet++; |
| 1430 if (buildCounterResultSet < 3) { | 1430 if (buildCounterResultSet < 3) { |
| 1431 checkResultSetMetadata(o.metadata); | 1431 checkResultSetMetadata(o.metadata); |
| 1432 checkUnnamed1991(o.rows); | 1432 checkUnnamed2001(o.rows); |
| 1433 checkResultSetStats(o.stats); | 1433 checkResultSetStats(o.stats); |
| 1434 } | 1434 } |
| 1435 buildCounterResultSet--; | 1435 buildCounterResultSet--; |
| 1436 } | 1436 } |
| 1437 | 1437 |
| 1438 core.int buildCounterResultSetMetadata = 0; | 1438 core.int buildCounterResultSetMetadata = 0; |
| 1439 buildResultSetMetadata() { | 1439 buildResultSetMetadata() { |
| 1440 var o = new api.ResultSetMetadata(); | 1440 var o = new api.ResultSetMetadata(); |
| 1441 buildCounterResultSetMetadata++; | 1441 buildCounterResultSetMetadata++; |
| 1442 if (buildCounterResultSetMetadata < 3) { | 1442 if (buildCounterResultSetMetadata < 3) { |
| 1443 o.rowType = buildStructType(); | 1443 o.rowType = buildStructType(); |
| 1444 o.transaction = buildTransaction(); | 1444 o.transaction = buildTransaction(); |
| 1445 } | 1445 } |
| 1446 buildCounterResultSetMetadata--; | 1446 buildCounterResultSetMetadata--; |
| 1447 return o; | 1447 return o; |
| 1448 } | 1448 } |
| 1449 | 1449 |
| 1450 checkResultSetMetadata(api.ResultSetMetadata o) { | 1450 checkResultSetMetadata(api.ResultSetMetadata o) { |
| 1451 buildCounterResultSetMetadata++; | 1451 buildCounterResultSetMetadata++; |
| 1452 if (buildCounterResultSetMetadata < 3) { | 1452 if (buildCounterResultSetMetadata < 3) { |
| 1453 checkStructType(o.rowType); | 1453 checkStructType(o.rowType); |
| 1454 checkTransaction(o.transaction); | 1454 checkTransaction(o.transaction); |
| 1455 } | 1455 } |
| 1456 buildCounterResultSetMetadata--; | 1456 buildCounterResultSetMetadata--; |
| 1457 } | 1457 } |
| 1458 | 1458 |
| 1459 buildUnnamed1992() { | 1459 buildUnnamed2002() { |
| 1460 var o = new core.Map<core.String, core.Object>(); | 1460 var o = new core.Map<core.String, core.Object>(); |
| 1461 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 1461 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; |
| 1462 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 1462 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; |
| 1463 return o; | 1463 return o; |
| 1464 } | 1464 } |
| 1465 | 1465 |
| 1466 checkUnnamed1992(core.Map<core.String, core.Object> o) { | 1466 checkUnnamed2002(core.Map<core.String, core.Object> o) { |
| 1467 unittest.expect(o, unittest.hasLength(2)); | 1467 unittest.expect(o, unittest.hasLength(2)); |
| 1468 var casted25 = (o["x"]) as core.Map; unittest.expect(casted25, unittest.hasLen
gth(3)); unittest.expect(casted25["list"], unittest.equals([1, 2, 3])); unittest
.expect(casted25["bool"], unittest.equals(true)); unittest.expect(casted25["stri
ng"], unittest.equals('foo')); | 1468 var casted25 = (o["x"]) as core.Map; unittest.expect(casted25, unittest.hasLen
gth(3)); unittest.expect(casted25["list"], unittest.equals([1, 2, 3])); unittest
.expect(casted25["bool"], unittest.equals(true)); unittest.expect(casted25["stri
ng"], unittest.equals('foo')); |
| 1469 var casted26 = (o["y"]) as core.Map; unittest.expect(casted26, unittest.hasLen
gth(3)); unittest.expect(casted26["list"], unittest.equals([1, 2, 3])); unittest
.expect(casted26["bool"], unittest.equals(true)); unittest.expect(casted26["stri
ng"], unittest.equals('foo')); | 1469 var casted26 = (o["y"]) as core.Map; unittest.expect(casted26, unittest.hasLen
gth(3)); unittest.expect(casted26["list"], unittest.equals([1, 2, 3])); unittest
.expect(casted26["bool"], unittest.equals(true)); unittest.expect(casted26["stri
ng"], unittest.equals('foo')); |
| 1470 } | 1470 } |
| 1471 | 1471 |
| 1472 core.int buildCounterResultSetStats = 0; | 1472 core.int buildCounterResultSetStats = 0; |
| 1473 buildResultSetStats() { | 1473 buildResultSetStats() { |
| 1474 var o = new api.ResultSetStats(); | 1474 var o = new api.ResultSetStats(); |
| 1475 buildCounterResultSetStats++; | 1475 buildCounterResultSetStats++; |
| 1476 if (buildCounterResultSetStats < 3) { | 1476 if (buildCounterResultSetStats < 3) { |
| 1477 o.queryPlan = buildQueryPlan(); | 1477 o.queryPlan = buildQueryPlan(); |
| 1478 o.queryStats = buildUnnamed1992(); | 1478 o.queryStats = buildUnnamed2002(); |
| 1479 } | 1479 } |
| 1480 buildCounterResultSetStats--; | 1480 buildCounterResultSetStats--; |
| 1481 return o; | 1481 return o; |
| 1482 } | 1482 } |
| 1483 | 1483 |
| 1484 checkResultSetStats(api.ResultSetStats o) { | 1484 checkResultSetStats(api.ResultSetStats o) { |
| 1485 buildCounterResultSetStats++; | 1485 buildCounterResultSetStats++; |
| 1486 if (buildCounterResultSetStats < 3) { | 1486 if (buildCounterResultSetStats < 3) { |
| 1487 checkQueryPlan(o.queryPlan); | 1487 checkQueryPlan(o.queryPlan); |
| 1488 checkUnnamed1992(o.queryStats); | 1488 checkUnnamed2002(o.queryStats); |
| 1489 } | 1489 } |
| 1490 buildCounterResultSetStats--; | 1490 buildCounterResultSetStats--; |
| 1491 } | 1491 } |
| 1492 | 1492 |
| 1493 core.int buildCounterRollbackRequest = 0; | 1493 core.int buildCounterRollbackRequest = 0; |
| 1494 buildRollbackRequest() { | 1494 buildRollbackRequest() { |
| 1495 var o = new api.RollbackRequest(); | 1495 var o = new api.RollbackRequest(); |
| 1496 buildCounterRollbackRequest++; | 1496 buildCounterRollbackRequest++; |
| 1497 if (buildCounterRollbackRequest < 3) { | 1497 if (buildCounterRollbackRequest < 3) { |
| 1498 o.transactionId = "foo"; | 1498 o.transactionId = "foo"; |
| 1499 } | 1499 } |
| 1500 buildCounterRollbackRequest--; | 1500 buildCounterRollbackRequest--; |
| 1501 return o; | 1501 return o; |
| 1502 } | 1502 } |
| 1503 | 1503 |
| 1504 checkRollbackRequest(api.RollbackRequest o) { | 1504 checkRollbackRequest(api.RollbackRequest o) { |
| 1505 buildCounterRollbackRequest++; | 1505 buildCounterRollbackRequest++; |
| 1506 if (buildCounterRollbackRequest < 3) { | 1506 if (buildCounterRollbackRequest < 3) { |
| 1507 unittest.expect(o.transactionId, unittest.equals('foo')); | 1507 unittest.expect(o.transactionId, unittest.equals('foo')); |
| 1508 } | 1508 } |
| 1509 buildCounterRollbackRequest--; | 1509 buildCounterRollbackRequest--; |
| 1510 } | 1510 } |
| 1511 | 1511 |
| 1512 buildUnnamed1993() { | 1512 buildUnnamed2003() { |
| 1513 var o = new core.List<api.Condition>(); | 1513 var o = new core.List<api.Condition>(); |
| 1514 o.add(buildCondition()); | 1514 o.add(buildCondition()); |
| 1515 o.add(buildCondition()); | 1515 o.add(buildCondition()); |
| 1516 return o; | 1516 return o; |
| 1517 } | 1517 } |
| 1518 | 1518 |
| 1519 checkUnnamed1993(core.List<api.Condition> o) { | 1519 checkUnnamed2003(core.List<api.Condition> o) { |
| 1520 unittest.expect(o, unittest.hasLength(2)); | 1520 unittest.expect(o, unittest.hasLength(2)); |
| 1521 checkCondition(o[0]); | 1521 checkCondition(o[0]); |
| 1522 checkCondition(o[1]); | 1522 checkCondition(o[1]); |
| 1523 } | 1523 } |
| 1524 | 1524 |
| 1525 buildUnnamed1994() { | 1525 buildUnnamed2004() { |
| 1526 var o = new core.List<core.String>(); | 1526 var o = new core.List<core.String>(); |
| 1527 o.add("foo"); | 1527 o.add("foo"); |
| 1528 o.add("foo"); | 1528 o.add("foo"); |
| 1529 return o; | 1529 return o; |
| 1530 } | 1530 } |
| 1531 | 1531 |
| 1532 checkUnnamed1994(core.List<core.String> o) { | 1532 checkUnnamed2004(core.List<core.String> o) { |
| 1533 unittest.expect(o, unittest.hasLength(2)); | 1533 unittest.expect(o, unittest.hasLength(2)); |
| 1534 unittest.expect(o[0], unittest.equals('foo')); | 1534 unittest.expect(o[0], unittest.equals('foo')); |
| 1535 unittest.expect(o[1], unittest.equals('foo')); | 1535 unittest.expect(o[1], unittest.equals('foo')); |
| 1536 } | 1536 } |
| 1537 | 1537 |
| 1538 buildUnnamed1995() { | 1538 buildUnnamed2005() { |
| 1539 var o = new core.List<api.LogConfig>(); | 1539 var o = new core.List<api.LogConfig>(); |
| 1540 o.add(buildLogConfig()); | 1540 o.add(buildLogConfig()); |
| 1541 o.add(buildLogConfig()); | 1541 o.add(buildLogConfig()); |
| 1542 return o; | 1542 return o; |
| 1543 } | 1543 } |
| 1544 | 1544 |
| 1545 checkUnnamed1995(core.List<api.LogConfig> o) { | 1545 checkUnnamed2005(core.List<api.LogConfig> o) { |
| 1546 unittest.expect(o, unittest.hasLength(2)); | 1546 unittest.expect(o, unittest.hasLength(2)); |
| 1547 checkLogConfig(o[0]); | 1547 checkLogConfig(o[0]); |
| 1548 checkLogConfig(o[1]); | 1548 checkLogConfig(o[1]); |
| 1549 } | 1549 } |
| 1550 | 1550 |
| 1551 buildUnnamed1996() { | 1551 buildUnnamed2006() { |
| 1552 var o = new core.List<core.String>(); | 1552 var o = new core.List<core.String>(); |
| 1553 o.add("foo"); | 1553 o.add("foo"); |
| 1554 o.add("foo"); | 1554 o.add("foo"); |
| 1555 return o; | 1555 return o; |
| 1556 } | 1556 } |
| 1557 | 1557 |
| 1558 checkUnnamed1996(core.List<core.String> o) { | 1558 checkUnnamed2006(core.List<core.String> o) { |
| 1559 unittest.expect(o, unittest.hasLength(2)); | 1559 unittest.expect(o, unittest.hasLength(2)); |
| 1560 unittest.expect(o[0], unittest.equals('foo')); | 1560 unittest.expect(o[0], unittest.equals('foo')); |
| 1561 unittest.expect(o[1], unittest.equals('foo')); | 1561 unittest.expect(o[1], unittest.equals('foo')); |
| 1562 } | 1562 } |
| 1563 | 1563 |
| 1564 buildUnnamed1997() { | 1564 buildUnnamed2007() { |
| 1565 var o = new core.List<core.String>(); | 1565 var o = new core.List<core.String>(); |
| 1566 o.add("foo"); | 1566 o.add("foo"); |
| 1567 o.add("foo"); | 1567 o.add("foo"); |
| 1568 return o; | 1568 return o; |
| 1569 } | 1569 } |
| 1570 | 1570 |
| 1571 checkUnnamed1997(core.List<core.String> o) { | 1571 checkUnnamed2007(core.List<core.String> o) { |
| 1572 unittest.expect(o, unittest.hasLength(2)); | 1572 unittest.expect(o, unittest.hasLength(2)); |
| 1573 unittest.expect(o[0], unittest.equals('foo')); | 1573 unittest.expect(o[0], unittest.equals('foo')); |
| 1574 unittest.expect(o[1], unittest.equals('foo')); | 1574 unittest.expect(o[1], unittest.equals('foo')); |
| 1575 } | 1575 } |
| 1576 | 1576 |
| 1577 core.int buildCounterRule = 0; | 1577 core.int buildCounterRule = 0; |
| 1578 buildRule() { | 1578 buildRule() { |
| 1579 var o = new api.Rule(); | 1579 var o = new api.Rule(); |
| 1580 buildCounterRule++; | 1580 buildCounterRule++; |
| 1581 if (buildCounterRule < 3) { | 1581 if (buildCounterRule < 3) { |
| 1582 o.action = "foo"; | 1582 o.action = "foo"; |
| 1583 o.conditions = buildUnnamed1993(); | 1583 o.conditions = buildUnnamed2003(); |
| 1584 o.description = "foo"; | 1584 o.description = "foo"; |
| 1585 o.in_ = buildUnnamed1994(); | 1585 o.in_ = buildUnnamed2004(); |
| 1586 o.logConfig = buildUnnamed1995(); | 1586 o.logConfig = buildUnnamed2005(); |
| 1587 o.notIn = buildUnnamed1996(); | 1587 o.notIn = buildUnnamed2006(); |
| 1588 o.permissions = buildUnnamed1997(); | 1588 o.permissions = buildUnnamed2007(); |
| 1589 } | 1589 } |
| 1590 buildCounterRule--; | 1590 buildCounterRule--; |
| 1591 return o; | 1591 return o; |
| 1592 } | 1592 } |
| 1593 | 1593 |
| 1594 checkRule(api.Rule o) { | 1594 checkRule(api.Rule o) { |
| 1595 buildCounterRule++; | 1595 buildCounterRule++; |
| 1596 if (buildCounterRule < 3) { | 1596 if (buildCounterRule < 3) { |
| 1597 unittest.expect(o.action, unittest.equals('foo')); | 1597 unittest.expect(o.action, unittest.equals('foo')); |
| 1598 checkUnnamed1993(o.conditions); | 1598 checkUnnamed2003(o.conditions); |
| 1599 unittest.expect(o.description, unittest.equals('foo')); | 1599 unittest.expect(o.description, unittest.equals('foo')); |
| 1600 checkUnnamed1994(o.in_); | 1600 checkUnnamed2004(o.in_); |
| 1601 checkUnnamed1995(o.logConfig); | 1601 checkUnnamed2005(o.logConfig); |
| 1602 checkUnnamed1996(o.notIn); | 1602 checkUnnamed2006(o.notIn); |
| 1603 checkUnnamed1997(o.permissions); | 1603 checkUnnamed2007(o.permissions); |
| 1604 } | 1604 } |
| 1605 buildCounterRule--; | 1605 buildCounterRule--; |
| 1606 } | 1606 } |
| 1607 | 1607 |
| 1608 core.int buildCounterSession = 0; | 1608 core.int buildCounterSession = 0; |
| 1609 buildSession() { | 1609 buildSession() { |
| 1610 var o = new api.Session(); | 1610 var o = new api.Session(); |
| 1611 buildCounterSession++; | 1611 buildCounterSession++; |
| 1612 if (buildCounterSession < 3) { | 1612 if (buildCounterSession < 3) { |
| 1613 o.name = "foo"; | 1613 o.name = "foo"; |
| (...skipping 24 matching lines...) Expand all Loading... |
| 1638 | 1638 |
| 1639 checkSetIamPolicyRequest(api.SetIamPolicyRequest o) { | 1639 checkSetIamPolicyRequest(api.SetIamPolicyRequest o) { |
| 1640 buildCounterSetIamPolicyRequest++; | 1640 buildCounterSetIamPolicyRequest++; |
| 1641 if (buildCounterSetIamPolicyRequest < 3) { | 1641 if (buildCounterSetIamPolicyRequest < 3) { |
| 1642 checkPolicy(o.policy); | 1642 checkPolicy(o.policy); |
| 1643 unittest.expect(o.updateMask, unittest.equals('foo')); | 1643 unittest.expect(o.updateMask, unittest.equals('foo')); |
| 1644 } | 1644 } |
| 1645 buildCounterSetIamPolicyRequest--; | 1645 buildCounterSetIamPolicyRequest--; |
| 1646 } | 1646 } |
| 1647 | 1647 |
| 1648 buildUnnamed1998() { | 1648 buildUnnamed2008() { |
| 1649 var o = new core.Map<core.String, core.int>(); | 1649 var o = new core.Map<core.String, core.int>(); |
| 1650 o["x"] = 42; | 1650 o["x"] = 42; |
| 1651 o["y"] = 42; | 1651 o["y"] = 42; |
| 1652 return o; | 1652 return o; |
| 1653 } | 1653 } |
| 1654 | 1654 |
| 1655 checkUnnamed1998(core.Map<core.String, core.int> o) { | 1655 checkUnnamed2008(core.Map<core.String, core.int> o) { |
| 1656 unittest.expect(o, unittest.hasLength(2)); | 1656 unittest.expect(o, unittest.hasLength(2)); |
| 1657 unittest.expect(o["x"], unittest.equals(42)); | 1657 unittest.expect(o["x"], unittest.equals(42)); |
| 1658 unittest.expect(o["y"], unittest.equals(42)); | 1658 unittest.expect(o["y"], unittest.equals(42)); |
| 1659 } | 1659 } |
| 1660 | 1660 |
| 1661 core.int buildCounterShortRepresentation = 0; | 1661 core.int buildCounterShortRepresentation = 0; |
| 1662 buildShortRepresentation() { | 1662 buildShortRepresentation() { |
| 1663 var o = new api.ShortRepresentation(); | 1663 var o = new api.ShortRepresentation(); |
| 1664 buildCounterShortRepresentation++; | 1664 buildCounterShortRepresentation++; |
| 1665 if (buildCounterShortRepresentation < 3) { | 1665 if (buildCounterShortRepresentation < 3) { |
| 1666 o.description = "foo"; | 1666 o.description = "foo"; |
| 1667 o.subqueries = buildUnnamed1998(); | 1667 o.subqueries = buildUnnamed2008(); |
| 1668 } | 1668 } |
| 1669 buildCounterShortRepresentation--; | 1669 buildCounterShortRepresentation--; |
| 1670 return o; | 1670 return o; |
| 1671 } | 1671 } |
| 1672 | 1672 |
| 1673 checkShortRepresentation(api.ShortRepresentation o) { | 1673 checkShortRepresentation(api.ShortRepresentation o) { |
| 1674 buildCounterShortRepresentation++; | 1674 buildCounterShortRepresentation++; |
| 1675 if (buildCounterShortRepresentation < 3) { | 1675 if (buildCounterShortRepresentation < 3) { |
| 1676 unittest.expect(o.description, unittest.equals('foo')); | 1676 unittest.expect(o.description, unittest.equals('foo')); |
| 1677 checkUnnamed1998(o.subqueries); | 1677 checkUnnamed2008(o.subqueries); |
| 1678 } | 1678 } |
| 1679 buildCounterShortRepresentation--; | 1679 buildCounterShortRepresentation--; |
| 1680 } | 1680 } |
| 1681 | 1681 |
| 1682 buildUnnamed1999() { | 1682 buildUnnamed2009() { |
| 1683 var o = new core.Map<core.String, core.Object>(); | 1683 var o = new core.Map<core.String, core.Object>(); |
| 1684 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 1684 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; |
| 1685 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 1685 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; |
| 1686 return o; | 1686 return o; |
| 1687 } | 1687 } |
| 1688 | 1688 |
| 1689 checkUnnamed1999(core.Map<core.String, core.Object> o) { | 1689 checkUnnamed2009(core.Map<core.String, core.Object> o) { |
| 1690 unittest.expect(o, unittest.hasLength(2)); | 1690 unittest.expect(o, unittest.hasLength(2)); |
| 1691 var casted27 = (o["x"]) as core.Map; unittest.expect(casted27, unittest.hasLen
gth(3)); unittest.expect(casted27["list"], unittest.equals([1, 2, 3])); unittest
.expect(casted27["bool"], unittest.equals(true)); unittest.expect(casted27["stri
ng"], unittest.equals('foo')); | 1691 var casted27 = (o["x"]) as core.Map; unittest.expect(casted27, unittest.hasLen
gth(3)); unittest.expect(casted27["list"], unittest.equals([1, 2, 3])); unittest
.expect(casted27["bool"], unittest.equals(true)); unittest.expect(casted27["stri
ng"], unittest.equals('foo')); |
| 1692 var casted28 = (o["y"]) as core.Map; unittest.expect(casted28, unittest.hasLen
gth(3)); unittest.expect(casted28["list"], unittest.equals([1, 2, 3])); unittest
.expect(casted28["bool"], unittest.equals(true)); unittest.expect(casted28["stri
ng"], unittest.equals('foo')); | 1692 var casted28 = (o["y"]) as core.Map; unittest.expect(casted28, unittest.hasLen
gth(3)); unittest.expect(casted28["list"], unittest.equals([1, 2, 3])); unittest
.expect(casted28["bool"], unittest.equals(true)); unittest.expect(casted28["stri
ng"], unittest.equals('foo')); |
| 1693 } | 1693 } |
| 1694 | 1694 |
| 1695 buildUnnamed2000() { | 1695 buildUnnamed2010() { |
| 1696 var o = new core.List<core.Map<core.String, core.Object>>(); | 1696 var o = new core.List<core.Map<core.String, core.Object>>(); |
| 1697 o.add(buildUnnamed1999()); | 1697 o.add(buildUnnamed2009()); |
| 1698 o.add(buildUnnamed1999()); | 1698 o.add(buildUnnamed2009()); |
| 1699 return o; | 1699 return o; |
| 1700 } | 1700 } |
| 1701 | 1701 |
| 1702 checkUnnamed2000(core.List<core.Map<core.String, core.Object>> o) { | 1702 checkUnnamed2010(core.List<core.Map<core.String, core.Object>> o) { |
| 1703 unittest.expect(o, unittest.hasLength(2)); | 1703 unittest.expect(o, unittest.hasLength(2)); |
| 1704 checkUnnamed1999(o[0]); | 1704 checkUnnamed2009(o[0]); |
| 1705 checkUnnamed1999(o[1]); | 1705 checkUnnamed2009(o[1]); |
| 1706 } | 1706 } |
| 1707 | 1707 |
| 1708 core.int buildCounterStatus = 0; | 1708 core.int buildCounterStatus = 0; |
| 1709 buildStatus() { | 1709 buildStatus() { |
| 1710 var o = new api.Status(); | 1710 var o = new api.Status(); |
| 1711 buildCounterStatus++; | 1711 buildCounterStatus++; |
| 1712 if (buildCounterStatus < 3) { | 1712 if (buildCounterStatus < 3) { |
| 1713 o.code = 42; | 1713 o.code = 42; |
| 1714 o.details = buildUnnamed2000(); | 1714 o.details = buildUnnamed2010(); |
| 1715 o.message = "foo"; | 1715 o.message = "foo"; |
| 1716 } | 1716 } |
| 1717 buildCounterStatus--; | 1717 buildCounterStatus--; |
| 1718 return o; | 1718 return o; |
| 1719 } | 1719 } |
| 1720 | 1720 |
| 1721 checkStatus(api.Status o) { | 1721 checkStatus(api.Status o) { |
| 1722 buildCounterStatus++; | 1722 buildCounterStatus++; |
| 1723 if (buildCounterStatus < 3) { | 1723 if (buildCounterStatus < 3) { |
| 1724 unittest.expect(o.code, unittest.equals(42)); | 1724 unittest.expect(o.code, unittest.equals(42)); |
| 1725 checkUnnamed2000(o.details); | 1725 checkUnnamed2010(o.details); |
| 1726 unittest.expect(o.message, unittest.equals('foo')); | 1726 unittest.expect(o.message, unittest.equals('foo')); |
| 1727 } | 1727 } |
| 1728 buildCounterStatus--; | 1728 buildCounterStatus--; |
| 1729 } | 1729 } |
| 1730 | 1730 |
| 1731 buildUnnamed2001() { | 1731 buildUnnamed2011() { |
| 1732 var o = new core.List<api.Field>(); | 1732 var o = new core.List<api.Field>(); |
| 1733 o.add(buildField()); | 1733 o.add(buildField()); |
| 1734 o.add(buildField()); | 1734 o.add(buildField()); |
| 1735 return o; | 1735 return o; |
| 1736 } | 1736 } |
| 1737 | 1737 |
| 1738 checkUnnamed2001(core.List<api.Field> o) { | 1738 checkUnnamed2011(core.List<api.Field> o) { |
| 1739 unittest.expect(o, unittest.hasLength(2)); | 1739 unittest.expect(o, unittest.hasLength(2)); |
| 1740 checkField(o[0]); | 1740 checkField(o[0]); |
| 1741 checkField(o[1]); | 1741 checkField(o[1]); |
| 1742 } | 1742 } |
| 1743 | 1743 |
| 1744 core.int buildCounterStructType = 0; | 1744 core.int buildCounterStructType = 0; |
| 1745 buildStructType() { | 1745 buildStructType() { |
| 1746 var o = new api.StructType(); | 1746 var o = new api.StructType(); |
| 1747 buildCounterStructType++; | 1747 buildCounterStructType++; |
| 1748 if (buildCounterStructType < 3) { | 1748 if (buildCounterStructType < 3) { |
| 1749 o.fields = buildUnnamed2001(); | 1749 o.fields = buildUnnamed2011(); |
| 1750 } | 1750 } |
| 1751 buildCounterStructType--; | 1751 buildCounterStructType--; |
| 1752 return o; | 1752 return o; |
| 1753 } | 1753 } |
| 1754 | 1754 |
| 1755 checkStructType(api.StructType o) { | 1755 checkStructType(api.StructType o) { |
| 1756 buildCounterStructType++; | 1756 buildCounterStructType++; |
| 1757 if (buildCounterStructType < 3) { | 1757 if (buildCounterStructType < 3) { |
| 1758 checkUnnamed2001(o.fields); | 1758 checkUnnamed2011(o.fields); |
| 1759 } | 1759 } |
| 1760 buildCounterStructType--; | 1760 buildCounterStructType--; |
| 1761 } | 1761 } |
| 1762 | 1762 |
| 1763 buildUnnamed2002() { | 1763 buildUnnamed2012() { |
| 1764 var o = new core.List<core.String>(); | 1764 var o = new core.List<core.String>(); |
| 1765 o.add("foo"); | 1765 o.add("foo"); |
| 1766 o.add("foo"); | 1766 o.add("foo"); |
| 1767 return o; | 1767 return o; |
| 1768 } | 1768 } |
| 1769 | 1769 |
| 1770 checkUnnamed2002(core.List<core.String> o) { | 1770 checkUnnamed2012(core.List<core.String> o) { |
| 1771 unittest.expect(o, unittest.hasLength(2)); | 1771 unittest.expect(o, unittest.hasLength(2)); |
| 1772 unittest.expect(o[0], unittest.equals('foo')); | 1772 unittest.expect(o[0], unittest.equals('foo')); |
| 1773 unittest.expect(o[1], unittest.equals('foo')); | 1773 unittest.expect(o[1], unittest.equals('foo')); |
| 1774 } | 1774 } |
| 1775 | 1775 |
| 1776 core.int buildCounterTestIamPermissionsRequest = 0; | 1776 core.int buildCounterTestIamPermissionsRequest = 0; |
| 1777 buildTestIamPermissionsRequest() { | 1777 buildTestIamPermissionsRequest() { |
| 1778 var o = new api.TestIamPermissionsRequest(); | 1778 var o = new api.TestIamPermissionsRequest(); |
| 1779 buildCounterTestIamPermissionsRequest++; | 1779 buildCounterTestIamPermissionsRequest++; |
| 1780 if (buildCounterTestIamPermissionsRequest < 3) { | 1780 if (buildCounterTestIamPermissionsRequest < 3) { |
| 1781 o.permissions = buildUnnamed2002(); | 1781 o.permissions = buildUnnamed2012(); |
| 1782 } | 1782 } |
| 1783 buildCounterTestIamPermissionsRequest--; | 1783 buildCounterTestIamPermissionsRequest--; |
| 1784 return o; | 1784 return o; |
| 1785 } | 1785 } |
| 1786 | 1786 |
| 1787 checkTestIamPermissionsRequest(api.TestIamPermissionsRequest o) { | 1787 checkTestIamPermissionsRequest(api.TestIamPermissionsRequest o) { |
| 1788 buildCounterTestIamPermissionsRequest++; | 1788 buildCounterTestIamPermissionsRequest++; |
| 1789 if (buildCounterTestIamPermissionsRequest < 3) { | 1789 if (buildCounterTestIamPermissionsRequest < 3) { |
| 1790 checkUnnamed2002(o.permissions); | 1790 checkUnnamed2012(o.permissions); |
| 1791 } | 1791 } |
| 1792 buildCounterTestIamPermissionsRequest--; | 1792 buildCounterTestIamPermissionsRequest--; |
| 1793 } | 1793 } |
| 1794 | 1794 |
| 1795 buildUnnamed2003() { | 1795 buildUnnamed2013() { |
| 1796 var o = new core.List<core.String>(); | 1796 var o = new core.List<core.String>(); |
| 1797 o.add("foo"); | 1797 o.add("foo"); |
| 1798 o.add("foo"); | 1798 o.add("foo"); |
| 1799 return o; | 1799 return o; |
| 1800 } | 1800 } |
| 1801 | 1801 |
| 1802 checkUnnamed2003(core.List<core.String> o) { | 1802 checkUnnamed2013(core.List<core.String> o) { |
| 1803 unittest.expect(o, unittest.hasLength(2)); | 1803 unittest.expect(o, unittest.hasLength(2)); |
| 1804 unittest.expect(o[0], unittest.equals('foo')); | 1804 unittest.expect(o[0], unittest.equals('foo')); |
| 1805 unittest.expect(o[1], unittest.equals('foo')); | 1805 unittest.expect(o[1], unittest.equals('foo')); |
| 1806 } | 1806 } |
| 1807 | 1807 |
| 1808 core.int buildCounterTestIamPermissionsResponse = 0; | 1808 core.int buildCounterTestIamPermissionsResponse = 0; |
| 1809 buildTestIamPermissionsResponse() { | 1809 buildTestIamPermissionsResponse() { |
| 1810 var o = new api.TestIamPermissionsResponse(); | 1810 var o = new api.TestIamPermissionsResponse(); |
| 1811 buildCounterTestIamPermissionsResponse++; | 1811 buildCounterTestIamPermissionsResponse++; |
| 1812 if (buildCounterTestIamPermissionsResponse < 3) { | 1812 if (buildCounterTestIamPermissionsResponse < 3) { |
| 1813 o.permissions = buildUnnamed2003(); | 1813 o.permissions = buildUnnamed2013(); |
| 1814 } | 1814 } |
| 1815 buildCounterTestIamPermissionsResponse--; | 1815 buildCounterTestIamPermissionsResponse--; |
| 1816 return o; | 1816 return o; |
| 1817 } | 1817 } |
| 1818 | 1818 |
| 1819 checkTestIamPermissionsResponse(api.TestIamPermissionsResponse o) { | 1819 checkTestIamPermissionsResponse(api.TestIamPermissionsResponse o) { |
| 1820 buildCounterTestIamPermissionsResponse++; | 1820 buildCounterTestIamPermissionsResponse++; |
| 1821 if (buildCounterTestIamPermissionsResponse < 3) { | 1821 if (buildCounterTestIamPermissionsResponse < 3) { |
| 1822 checkUnnamed2003(o.permissions); | 1822 checkUnnamed2013(o.permissions); |
| 1823 } | 1823 } |
| 1824 buildCounterTestIamPermissionsResponse--; | 1824 buildCounterTestIamPermissionsResponse--; |
| 1825 } | 1825 } |
| 1826 | 1826 |
| 1827 core.int buildCounterTransaction = 0; | 1827 core.int buildCounterTransaction = 0; |
| 1828 buildTransaction() { | 1828 buildTransaction() { |
| 1829 var o = new api.Transaction(); | 1829 var o = new api.Transaction(); |
| 1830 buildCounterTransaction++; | 1830 buildCounterTransaction++; |
| 1831 if (buildCounterTransaction < 3) { | 1831 if (buildCounterTransaction < 3) { |
| 1832 o.id = "foo"; | 1832 o.id = "foo"; |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1905 checkType(api.Type o) { | 1905 checkType(api.Type o) { |
| 1906 buildCounterType++; | 1906 buildCounterType++; |
| 1907 if (buildCounterType < 3) { | 1907 if (buildCounterType < 3) { |
| 1908 checkType(o.arrayElementType); | 1908 checkType(o.arrayElementType); |
| 1909 unittest.expect(o.code, unittest.equals('foo')); | 1909 unittest.expect(o.code, unittest.equals('foo')); |
| 1910 checkStructType(o.structType); | 1910 checkStructType(o.structType); |
| 1911 } | 1911 } |
| 1912 buildCounterType--; | 1912 buildCounterType--; |
| 1913 } | 1913 } |
| 1914 | 1914 |
| 1915 buildUnnamed2004() { | 1915 buildUnnamed2014() { |
| 1916 var o = new core.List<core.String>(); | 1916 var o = new core.List<core.String>(); |
| 1917 o.add("foo"); | 1917 o.add("foo"); |
| 1918 o.add("foo"); | 1918 o.add("foo"); |
| 1919 return o; | 1919 return o; |
| 1920 } | 1920 } |
| 1921 | 1921 |
| 1922 checkUnnamed2004(core.List<core.String> o) { | 1922 checkUnnamed2014(core.List<core.String> o) { |
| 1923 unittest.expect(o, unittest.hasLength(2)); | 1923 unittest.expect(o, unittest.hasLength(2)); |
| 1924 unittest.expect(o[0], unittest.equals('foo')); | 1924 unittest.expect(o[0], unittest.equals('foo')); |
| 1925 unittest.expect(o[1], unittest.equals('foo')); | 1925 unittest.expect(o[1], unittest.equals('foo')); |
| 1926 } | 1926 } |
| 1927 | 1927 |
| 1928 buildUnnamed2005() { | 1928 buildUnnamed2015() { |
| 1929 var o = new core.List<core.String>(); | 1929 var o = new core.List<core.String>(); |
| 1930 o.add("foo"); | 1930 o.add("foo"); |
| 1931 o.add("foo"); | 1931 o.add("foo"); |
| 1932 return o; | 1932 return o; |
| 1933 } | 1933 } |
| 1934 | 1934 |
| 1935 checkUnnamed2005(core.List<core.String> o) { | 1935 checkUnnamed2015(core.List<core.String> o) { |
| 1936 unittest.expect(o, unittest.hasLength(2)); | 1936 unittest.expect(o, unittest.hasLength(2)); |
| 1937 unittest.expect(o[0], unittest.equals('foo')); | 1937 unittest.expect(o[0], unittest.equals('foo')); |
| 1938 unittest.expect(o[1], unittest.equals('foo')); | 1938 unittest.expect(o[1], unittest.equals('foo')); |
| 1939 } | 1939 } |
| 1940 | 1940 |
| 1941 core.int buildCounterUpdateDatabaseDdlMetadata = 0; | 1941 core.int buildCounterUpdateDatabaseDdlMetadata = 0; |
| 1942 buildUpdateDatabaseDdlMetadata() { | 1942 buildUpdateDatabaseDdlMetadata() { |
| 1943 var o = new api.UpdateDatabaseDdlMetadata(); | 1943 var o = new api.UpdateDatabaseDdlMetadata(); |
| 1944 buildCounterUpdateDatabaseDdlMetadata++; | 1944 buildCounterUpdateDatabaseDdlMetadata++; |
| 1945 if (buildCounterUpdateDatabaseDdlMetadata < 3) { | 1945 if (buildCounterUpdateDatabaseDdlMetadata < 3) { |
| 1946 o.commitTimestamps = buildUnnamed2004(); | 1946 o.commitTimestamps = buildUnnamed2014(); |
| 1947 o.database = "foo"; | 1947 o.database = "foo"; |
| 1948 o.statements = buildUnnamed2005(); | 1948 o.statements = buildUnnamed2015(); |
| 1949 } | 1949 } |
| 1950 buildCounterUpdateDatabaseDdlMetadata--; | 1950 buildCounterUpdateDatabaseDdlMetadata--; |
| 1951 return o; | 1951 return o; |
| 1952 } | 1952 } |
| 1953 | 1953 |
| 1954 checkUpdateDatabaseDdlMetadata(api.UpdateDatabaseDdlMetadata o) { | 1954 checkUpdateDatabaseDdlMetadata(api.UpdateDatabaseDdlMetadata o) { |
| 1955 buildCounterUpdateDatabaseDdlMetadata++; | 1955 buildCounterUpdateDatabaseDdlMetadata++; |
| 1956 if (buildCounterUpdateDatabaseDdlMetadata < 3) { | 1956 if (buildCounterUpdateDatabaseDdlMetadata < 3) { |
| 1957 checkUnnamed2004(o.commitTimestamps); | 1957 checkUnnamed2014(o.commitTimestamps); |
| 1958 unittest.expect(o.database, unittest.equals('foo')); | 1958 unittest.expect(o.database, unittest.equals('foo')); |
| 1959 checkUnnamed2005(o.statements); | 1959 checkUnnamed2015(o.statements); |
| 1960 } | 1960 } |
| 1961 buildCounterUpdateDatabaseDdlMetadata--; | 1961 buildCounterUpdateDatabaseDdlMetadata--; |
| 1962 } | 1962 } |
| 1963 | 1963 |
| 1964 buildUnnamed2006() { | 1964 buildUnnamed2016() { |
| 1965 var o = new core.List<core.String>(); | 1965 var o = new core.List<core.String>(); |
| 1966 o.add("foo"); | 1966 o.add("foo"); |
| 1967 o.add("foo"); | 1967 o.add("foo"); |
| 1968 return o; | 1968 return o; |
| 1969 } | 1969 } |
| 1970 | 1970 |
| 1971 checkUnnamed2006(core.List<core.String> o) { | 1971 checkUnnamed2016(core.List<core.String> o) { |
| 1972 unittest.expect(o, unittest.hasLength(2)); | 1972 unittest.expect(o, unittest.hasLength(2)); |
| 1973 unittest.expect(o[0], unittest.equals('foo')); | 1973 unittest.expect(o[0], unittest.equals('foo')); |
| 1974 unittest.expect(o[1], unittest.equals('foo')); | 1974 unittest.expect(o[1], unittest.equals('foo')); |
| 1975 } | 1975 } |
| 1976 | 1976 |
| 1977 core.int buildCounterUpdateDatabaseDdlRequest = 0; | 1977 core.int buildCounterUpdateDatabaseDdlRequest = 0; |
| 1978 buildUpdateDatabaseDdlRequest() { | 1978 buildUpdateDatabaseDdlRequest() { |
| 1979 var o = new api.UpdateDatabaseDdlRequest(); | 1979 var o = new api.UpdateDatabaseDdlRequest(); |
| 1980 buildCounterUpdateDatabaseDdlRequest++; | 1980 buildCounterUpdateDatabaseDdlRequest++; |
| 1981 if (buildCounterUpdateDatabaseDdlRequest < 3) { | 1981 if (buildCounterUpdateDatabaseDdlRequest < 3) { |
| 1982 o.operationId = "foo"; | 1982 o.operationId = "foo"; |
| 1983 o.statements = buildUnnamed2006(); | 1983 o.statements = buildUnnamed2016(); |
| 1984 } | 1984 } |
| 1985 buildCounterUpdateDatabaseDdlRequest--; | 1985 buildCounterUpdateDatabaseDdlRequest--; |
| 1986 return o; | 1986 return o; |
| 1987 } | 1987 } |
| 1988 | 1988 |
| 1989 checkUpdateDatabaseDdlRequest(api.UpdateDatabaseDdlRequest o) { | 1989 checkUpdateDatabaseDdlRequest(api.UpdateDatabaseDdlRequest o) { |
| 1990 buildCounterUpdateDatabaseDdlRequest++; | 1990 buildCounterUpdateDatabaseDdlRequest++; |
| 1991 if (buildCounterUpdateDatabaseDdlRequest < 3) { | 1991 if (buildCounterUpdateDatabaseDdlRequest < 3) { |
| 1992 unittest.expect(o.operationId, unittest.equals('foo')); | 1992 unittest.expect(o.operationId, unittest.equals('foo')); |
| 1993 checkUnnamed2006(o.statements); | 1993 checkUnnamed2016(o.statements); |
| 1994 } | 1994 } |
| 1995 buildCounterUpdateDatabaseDdlRequest--; | 1995 buildCounterUpdateDatabaseDdlRequest--; |
| 1996 } | 1996 } |
| 1997 | 1997 |
| 1998 core.int buildCounterUpdateInstanceMetadata = 0; | 1998 core.int buildCounterUpdateInstanceMetadata = 0; |
| 1999 buildUpdateInstanceMetadata() { | 1999 buildUpdateInstanceMetadata() { |
| 2000 var o = new api.UpdateInstanceMetadata(); | 2000 var o = new api.UpdateInstanceMetadata(); |
| 2001 buildCounterUpdateInstanceMetadata++; | 2001 buildCounterUpdateInstanceMetadata++; |
| 2002 if (buildCounterUpdateInstanceMetadata < 3) { | 2002 if (buildCounterUpdateInstanceMetadata < 3) { |
| 2003 o.cancelTime = "foo"; | 2003 o.cancelTime = "foo"; |
| (...skipping 30 matching lines...) Expand all Loading... |
| 2034 | 2034 |
| 2035 checkUpdateInstanceRequest(api.UpdateInstanceRequest o) { | 2035 checkUpdateInstanceRequest(api.UpdateInstanceRequest o) { |
| 2036 buildCounterUpdateInstanceRequest++; | 2036 buildCounterUpdateInstanceRequest++; |
| 2037 if (buildCounterUpdateInstanceRequest < 3) { | 2037 if (buildCounterUpdateInstanceRequest < 3) { |
| 2038 unittest.expect(o.fieldMask, unittest.equals('foo')); | 2038 unittest.expect(o.fieldMask, unittest.equals('foo')); |
| 2039 checkInstance(o.instance); | 2039 checkInstance(o.instance); |
| 2040 } | 2040 } |
| 2041 buildCounterUpdateInstanceRequest--; | 2041 buildCounterUpdateInstanceRequest--; |
| 2042 } | 2042 } |
| 2043 | 2043 |
| 2044 buildUnnamed2007() { | 2044 buildUnnamed2017() { |
| 2045 var o = new core.List<core.String>(); | 2045 var o = new core.List<core.String>(); |
| 2046 o.add("foo"); | 2046 o.add("foo"); |
| 2047 o.add("foo"); | 2047 o.add("foo"); |
| 2048 return o; | 2048 return o; |
| 2049 } | 2049 } |
| 2050 | 2050 |
| 2051 checkUnnamed2007(core.List<core.String> o) { | 2051 checkUnnamed2017(core.List<core.String> o) { |
| 2052 unittest.expect(o, unittest.hasLength(2)); | 2052 unittest.expect(o, unittest.hasLength(2)); |
| 2053 unittest.expect(o[0], unittest.equals('foo')); | 2053 unittest.expect(o[0], unittest.equals('foo')); |
| 2054 unittest.expect(o[1], unittest.equals('foo')); | 2054 unittest.expect(o[1], unittest.equals('foo')); |
| 2055 } | 2055 } |
| 2056 | 2056 |
| 2057 buildUnnamed2008() { | 2057 buildUnnamed2018() { |
| 2058 var o = new core.List<core.Object>(); | 2058 var o = new core.List<core.Object>(); |
| 2059 o.add({'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}); | 2059 o.add({'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}); |
| 2060 o.add({'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}); | 2060 o.add({'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}); |
| 2061 return o; | 2061 return o; |
| 2062 } | 2062 } |
| 2063 | 2063 |
| 2064 checkUnnamed2008(core.List<core.Object> o) { | 2064 checkUnnamed2018(core.List<core.Object> o) { |
| 2065 unittest.expect(o, unittest.hasLength(2)); | 2065 unittest.expect(o, unittest.hasLength(2)); |
| 2066 var casted29 = (o[0]) as core.Map; unittest.expect(casted29, unittest.hasLengt
h(3)); unittest.expect(casted29["list"], unittest.equals([1, 2, 3])); unittest.e
xpect(casted29["bool"], unittest.equals(true)); unittest.expect(casted29["string
"], unittest.equals('foo')); | 2066 var casted29 = (o[0]) as core.Map; unittest.expect(casted29, unittest.hasLengt
h(3)); unittest.expect(casted29["list"], unittest.equals([1, 2, 3])); unittest.e
xpect(casted29["bool"], unittest.equals(true)); unittest.expect(casted29["string
"], unittest.equals('foo')); |
| 2067 var casted30 = (o[1]) as core.Map; unittest.expect(casted30, unittest.hasLengt
h(3)); unittest.expect(casted30["list"], unittest.equals([1, 2, 3])); unittest.e
xpect(casted30["bool"], unittest.equals(true)); unittest.expect(casted30["string
"], unittest.equals('foo')); | 2067 var casted30 = (o[1]) as core.Map; unittest.expect(casted30, unittest.hasLengt
h(3)); unittest.expect(casted30["list"], unittest.equals([1, 2, 3])); unittest.e
xpect(casted30["bool"], unittest.equals(true)); unittest.expect(casted30["string
"], unittest.equals('foo')); |
| 2068 } | 2068 } |
| 2069 | 2069 |
| 2070 buildUnnamed2009() { | 2070 buildUnnamed2019() { |
| 2071 var o = new core.List<core.List<core.Object>>(); | 2071 var o = new core.List<core.List<core.Object>>(); |
| 2072 o.add(buildUnnamed2008()); | 2072 o.add(buildUnnamed2018()); |
| 2073 o.add(buildUnnamed2008()); | 2073 o.add(buildUnnamed2018()); |
| 2074 return o; | 2074 return o; |
| 2075 } | 2075 } |
| 2076 | 2076 |
| 2077 checkUnnamed2009(core.List<core.List<core.Object>> o) { | 2077 checkUnnamed2019(core.List<core.List<core.Object>> o) { |
| 2078 unittest.expect(o, unittest.hasLength(2)); | 2078 unittest.expect(o, unittest.hasLength(2)); |
| 2079 checkUnnamed2008(o[0]); | 2079 checkUnnamed2018(o[0]); |
| 2080 checkUnnamed2008(o[1]); | 2080 checkUnnamed2018(o[1]); |
| 2081 } | 2081 } |
| 2082 | 2082 |
| 2083 core.int buildCounterWrite = 0; | 2083 core.int buildCounterWrite = 0; |
| 2084 buildWrite() { | 2084 buildWrite() { |
| 2085 var o = new api.Write(); | 2085 var o = new api.Write(); |
| 2086 buildCounterWrite++; | 2086 buildCounterWrite++; |
| 2087 if (buildCounterWrite < 3) { | 2087 if (buildCounterWrite < 3) { |
| 2088 o.columns = buildUnnamed2007(); | 2088 o.columns = buildUnnamed2017(); |
| 2089 o.table = "foo"; | 2089 o.table = "foo"; |
| 2090 o.values = buildUnnamed2009(); | 2090 o.values = buildUnnamed2019(); |
| 2091 } | 2091 } |
| 2092 buildCounterWrite--; | 2092 buildCounterWrite--; |
| 2093 return o; | 2093 return o; |
| 2094 } | 2094 } |
| 2095 | 2095 |
| 2096 checkWrite(api.Write o) { | 2096 checkWrite(api.Write o) { |
| 2097 buildCounterWrite++; | 2097 buildCounterWrite++; |
| 2098 if (buildCounterWrite < 3) { | 2098 if (buildCounterWrite < 3) { |
| 2099 checkUnnamed2007(o.columns); | 2099 checkUnnamed2017(o.columns); |
| 2100 unittest.expect(o.table, unittest.equals('foo')); | 2100 unittest.expect(o.table, unittest.equals('foo')); |
| 2101 checkUnnamed2009(o.values); | 2101 checkUnnamed2019(o.values); |
| 2102 } | 2102 } |
| 2103 buildCounterWrite--; | 2103 buildCounterWrite--; |
| 2104 } | 2104 } |
| 2105 | 2105 |
| 2106 | 2106 |
| 2107 main() { | 2107 main() { |
| 2108 unittest.group("obj-schema-AuditConfig", () { | 2108 unittest.group("obj-schema-AuditConfig", () { |
| 2109 unittest.test("to-json--from-json", () { | 2109 unittest.test("to-json--from-json", () { |
| 2110 var o = buildAuditConfig(); | 2110 var o = buildAuditConfig(); |
| 2111 var od = new api.AuditConfig.fromJson(o.toJson()); | 2111 var od = new api.AuditConfig.fromJson(o.toJson()); |
| (...skipping 541 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2653 }); | 2653 }); |
| 2654 }); | 2654 }); |
| 2655 | 2655 |
| 2656 | 2656 |
| 2657 unittest.group("resource-ProjectsInstanceConfigsResourceApi", () { | 2657 unittest.group("resource-ProjectsInstanceConfigsResourceApi", () { |
| 2658 unittest.test("method--get", () { | 2658 unittest.test("method--get", () { |
| 2659 | 2659 |
| 2660 var mock = new HttpServerMock(); | 2660 var mock = new HttpServerMock(); |
| 2661 api.ProjectsInstanceConfigsResourceApi res = new api.SpannerApi(mock).proj
ects.instanceConfigs; | 2661 api.ProjectsInstanceConfigsResourceApi res = new api.SpannerApi(mock).proj
ects.instanceConfigs; |
| 2662 var arg_name = "foo"; | 2662 var arg_name = "foo"; |
| 2663 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2663 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 2664 var path = (req.url).path; | 2664 var path = (req.url).path; |
| 2665 var pathOffset = 0; | 2665 var pathOffset = 0; |
| 2666 var index; | 2666 var index; |
| 2667 var subPart; | 2667 var subPart; |
| 2668 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2668 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 2669 pathOffset += 1; | 2669 pathOffset += 1; |
| 2670 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); | 2670 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); |
| 2671 pathOffset += 3; | 2671 pathOffset += 3; |
| 2672 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; | 2672 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; |
| 2673 | 2673 |
| (...skipping 14 matching lines...) Expand all Loading... |
| 2688 } | 2688 } |
| 2689 } | 2689 } |
| 2690 | 2690 |
| 2691 | 2691 |
| 2692 var h = { | 2692 var h = { |
| 2693 "content-type" : "application/json; charset=utf-8", | 2693 "content-type" : "application/json; charset=utf-8", |
| 2694 }; | 2694 }; |
| 2695 var resp = convert.JSON.encode(buildInstanceConfig()); | 2695 var resp = convert.JSON.encode(buildInstanceConfig()); |
| 2696 return new async.Future.value(stringResponse(200, h, resp)); | 2696 return new async.Future.value(stringResponse(200, h, resp)); |
| 2697 }), true); | 2697 }), true); |
| 2698 res.get(arg_name).then(unittest.expectAsync(((api.InstanceConfig response)
{ | 2698 res.get(arg_name).then(unittest.expectAsync1(((api.InstanceConfig response
) { |
| 2699 checkInstanceConfig(response); | 2699 checkInstanceConfig(response); |
| 2700 }))); | 2700 }))); |
| 2701 }); | 2701 }); |
| 2702 | 2702 |
| 2703 unittest.test("method--list", () { | 2703 unittest.test("method--list", () { |
| 2704 | 2704 |
| 2705 var mock = new HttpServerMock(); | 2705 var mock = new HttpServerMock(); |
| 2706 api.ProjectsInstanceConfigsResourceApi res = new api.SpannerApi(mock).proj
ects.instanceConfigs; | 2706 api.ProjectsInstanceConfigsResourceApi res = new api.SpannerApi(mock).proj
ects.instanceConfigs; |
| 2707 var arg_parent = "foo"; | 2707 var arg_parent = "foo"; |
| 2708 var arg_pageToken = "foo"; | 2708 var arg_pageToken = "foo"; |
| 2709 var arg_pageSize = 42; | 2709 var arg_pageSize = 42; |
| 2710 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2710 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 2711 var path = (req.url).path; | 2711 var path = (req.url).path; |
| 2712 var pathOffset = 0; | 2712 var pathOffset = 0; |
| 2713 var index; | 2713 var index; |
| 2714 var subPart; | 2714 var subPart; |
| 2715 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2715 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 2716 pathOffset += 1; | 2716 pathOffset += 1; |
| 2717 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); | 2717 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); |
| 2718 pathOffset += 3; | 2718 pathOffset += 3; |
| 2719 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; | 2719 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; |
| 2720 | 2720 |
| (...skipping 16 matching lines...) Expand all Loading... |
| 2737 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | 2737 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); |
| 2738 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ
als(arg_pageSize)); | 2738 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ
als(arg_pageSize)); |
| 2739 | 2739 |
| 2740 | 2740 |
| 2741 var h = { | 2741 var h = { |
| 2742 "content-type" : "application/json; charset=utf-8", | 2742 "content-type" : "application/json; charset=utf-8", |
| 2743 }; | 2743 }; |
| 2744 var resp = convert.JSON.encode(buildListInstanceConfigsResponse()); | 2744 var resp = convert.JSON.encode(buildListInstanceConfigsResponse()); |
| 2745 return new async.Future.value(stringResponse(200, h, resp)); | 2745 return new async.Future.value(stringResponse(200, h, resp)); |
| 2746 }), true); | 2746 }), true); |
| 2747 res.list(arg_parent, pageToken: arg_pageToken, pageSize: arg_pageSize).the
n(unittest.expectAsync(((api.ListInstanceConfigsResponse response) { | 2747 res.list(arg_parent, pageToken: arg_pageToken, pageSize: arg_pageSize).the
n(unittest.expectAsync1(((api.ListInstanceConfigsResponse response) { |
| 2748 checkListInstanceConfigsResponse(response); | 2748 checkListInstanceConfigsResponse(response); |
| 2749 }))); | 2749 }))); |
| 2750 }); | 2750 }); |
| 2751 | 2751 |
| 2752 }); | 2752 }); |
| 2753 | 2753 |
| 2754 | 2754 |
| 2755 unittest.group("resource-ProjectsInstancesResourceApi", () { | 2755 unittest.group("resource-ProjectsInstancesResourceApi", () { |
| 2756 unittest.test("method--create", () { | 2756 unittest.test("method--create", () { |
| 2757 | 2757 |
| 2758 var mock = new HttpServerMock(); | 2758 var mock = new HttpServerMock(); |
| 2759 api.ProjectsInstancesResourceApi res = new api.SpannerApi(mock).projects.i
nstances; | 2759 api.ProjectsInstancesResourceApi res = new api.SpannerApi(mock).projects.i
nstances; |
| 2760 var arg_request = buildCreateInstanceRequest(); | 2760 var arg_request = buildCreateInstanceRequest(); |
| 2761 var arg_parent = "foo"; | 2761 var arg_parent = "foo"; |
| 2762 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2762 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 2763 var obj = new api.CreateInstanceRequest.fromJson(json); | 2763 var obj = new api.CreateInstanceRequest.fromJson(json); |
| 2764 checkCreateInstanceRequest(obj); | 2764 checkCreateInstanceRequest(obj); |
| 2765 | 2765 |
| 2766 var path = (req.url).path; | 2766 var path = (req.url).path; |
| 2767 var pathOffset = 0; | 2767 var pathOffset = 0; |
| 2768 var index; | 2768 var index; |
| 2769 var subPart; | 2769 var subPart; |
| 2770 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2770 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 2771 pathOffset += 1; | 2771 pathOffset += 1; |
| 2772 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); | 2772 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); |
| (...skipping 17 matching lines...) Expand all Loading... |
| 2790 } | 2790 } |
| 2791 } | 2791 } |
| 2792 | 2792 |
| 2793 | 2793 |
| 2794 var h = { | 2794 var h = { |
| 2795 "content-type" : "application/json; charset=utf-8", | 2795 "content-type" : "application/json; charset=utf-8", |
| 2796 }; | 2796 }; |
| 2797 var resp = convert.JSON.encode(buildOperation()); | 2797 var resp = convert.JSON.encode(buildOperation()); |
| 2798 return new async.Future.value(stringResponse(200, h, resp)); | 2798 return new async.Future.value(stringResponse(200, h, resp)); |
| 2799 }), true); | 2799 }), true); |
| 2800 res.create(arg_request, arg_parent).then(unittest.expectAsync(((api.Operat
ion response) { | 2800 res.create(arg_request, arg_parent).then(unittest.expectAsync1(((api.Opera
tion response) { |
| 2801 checkOperation(response); | 2801 checkOperation(response); |
| 2802 }))); | 2802 }))); |
| 2803 }); | 2803 }); |
| 2804 | 2804 |
| 2805 unittest.test("method--delete", () { | 2805 unittest.test("method--delete", () { |
| 2806 | 2806 |
| 2807 var mock = new HttpServerMock(); | 2807 var mock = new HttpServerMock(); |
| 2808 api.ProjectsInstancesResourceApi res = new api.SpannerApi(mock).projects.i
nstances; | 2808 api.ProjectsInstancesResourceApi res = new api.SpannerApi(mock).projects.i
nstances; |
| 2809 var arg_name = "foo"; | 2809 var arg_name = "foo"; |
| 2810 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2810 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 2811 var path = (req.url).path; | 2811 var path = (req.url).path; |
| 2812 var pathOffset = 0; | 2812 var pathOffset = 0; |
| 2813 var index; | 2813 var index; |
| 2814 var subPart; | 2814 var subPart; |
| 2815 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2815 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 2816 pathOffset += 1; | 2816 pathOffset += 1; |
| 2817 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); | 2817 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); |
| 2818 pathOffset += 3; | 2818 pathOffset += 3; |
| 2819 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; | 2819 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; |
| 2820 | 2820 |
| (...skipping 14 matching lines...) Expand all Loading... |
| 2835 } | 2835 } |
| 2836 } | 2836 } |
| 2837 | 2837 |
| 2838 | 2838 |
| 2839 var h = { | 2839 var h = { |
| 2840 "content-type" : "application/json; charset=utf-8", | 2840 "content-type" : "application/json; charset=utf-8", |
| 2841 }; | 2841 }; |
| 2842 var resp = convert.JSON.encode(buildEmpty()); | 2842 var resp = convert.JSON.encode(buildEmpty()); |
| 2843 return new async.Future.value(stringResponse(200, h, resp)); | 2843 return new async.Future.value(stringResponse(200, h, resp)); |
| 2844 }), true); | 2844 }), true); |
| 2845 res.delete(arg_name).then(unittest.expectAsync(((api.Empty response) { | 2845 res.delete(arg_name).then(unittest.expectAsync1(((api.Empty response) { |
| 2846 checkEmpty(response); | 2846 checkEmpty(response); |
| 2847 }))); | 2847 }))); |
| 2848 }); | 2848 }); |
| 2849 | 2849 |
| 2850 unittest.test("method--get", () { | 2850 unittest.test("method--get", () { |
| 2851 | 2851 |
| 2852 var mock = new HttpServerMock(); | 2852 var mock = new HttpServerMock(); |
| 2853 api.ProjectsInstancesResourceApi res = new api.SpannerApi(mock).projects.i
nstances; | 2853 api.ProjectsInstancesResourceApi res = new api.SpannerApi(mock).projects.i
nstances; |
| 2854 var arg_name = "foo"; | 2854 var arg_name = "foo"; |
| 2855 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2855 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 2856 var path = (req.url).path; | 2856 var path = (req.url).path; |
| 2857 var pathOffset = 0; | 2857 var pathOffset = 0; |
| 2858 var index; | 2858 var index; |
| 2859 var subPart; | 2859 var subPart; |
| 2860 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2860 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 2861 pathOffset += 1; | 2861 pathOffset += 1; |
| 2862 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); | 2862 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); |
| 2863 pathOffset += 3; | 2863 pathOffset += 3; |
| 2864 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; | 2864 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; |
| 2865 | 2865 |
| (...skipping 14 matching lines...) Expand all Loading... |
| 2880 } | 2880 } |
| 2881 } | 2881 } |
| 2882 | 2882 |
| 2883 | 2883 |
| 2884 var h = { | 2884 var h = { |
| 2885 "content-type" : "application/json; charset=utf-8", | 2885 "content-type" : "application/json; charset=utf-8", |
| 2886 }; | 2886 }; |
| 2887 var resp = convert.JSON.encode(buildInstance()); | 2887 var resp = convert.JSON.encode(buildInstance()); |
| 2888 return new async.Future.value(stringResponse(200, h, resp)); | 2888 return new async.Future.value(stringResponse(200, h, resp)); |
| 2889 }), true); | 2889 }), true); |
| 2890 res.get(arg_name).then(unittest.expectAsync(((api.Instance response) { | 2890 res.get(arg_name).then(unittest.expectAsync1(((api.Instance response) { |
| 2891 checkInstance(response); | 2891 checkInstance(response); |
| 2892 }))); | 2892 }))); |
| 2893 }); | 2893 }); |
| 2894 | 2894 |
| 2895 unittest.test("method--getIamPolicy", () { | 2895 unittest.test("method--getIamPolicy", () { |
| 2896 | 2896 |
| 2897 var mock = new HttpServerMock(); | 2897 var mock = new HttpServerMock(); |
| 2898 api.ProjectsInstancesResourceApi res = new api.SpannerApi(mock).projects.i
nstances; | 2898 api.ProjectsInstancesResourceApi res = new api.SpannerApi(mock).projects.i
nstances; |
| 2899 var arg_request = buildGetIamPolicyRequest(); | 2899 var arg_request = buildGetIamPolicyRequest(); |
| 2900 var arg_resource = "foo"; | 2900 var arg_resource = "foo"; |
| 2901 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2901 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 2902 var obj = new api.GetIamPolicyRequest.fromJson(json); | 2902 var obj = new api.GetIamPolicyRequest.fromJson(json); |
| 2903 checkGetIamPolicyRequest(obj); | 2903 checkGetIamPolicyRequest(obj); |
| 2904 | 2904 |
| 2905 var path = (req.url).path; | 2905 var path = (req.url).path; |
| 2906 var pathOffset = 0; | 2906 var pathOffset = 0; |
| 2907 var index; | 2907 var index; |
| 2908 var subPart; | 2908 var subPart; |
| 2909 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2909 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 2910 pathOffset += 1; | 2910 pathOffset += 1; |
| 2911 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); | 2911 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); |
| (...skipping 17 matching lines...) Expand all Loading... |
| 2929 } | 2929 } |
| 2930 } | 2930 } |
| 2931 | 2931 |
| 2932 | 2932 |
| 2933 var h = { | 2933 var h = { |
| 2934 "content-type" : "application/json; charset=utf-8", | 2934 "content-type" : "application/json; charset=utf-8", |
| 2935 }; | 2935 }; |
| 2936 var resp = convert.JSON.encode(buildPolicy()); | 2936 var resp = convert.JSON.encode(buildPolicy()); |
| 2937 return new async.Future.value(stringResponse(200, h, resp)); | 2937 return new async.Future.value(stringResponse(200, h, resp)); |
| 2938 }), true); | 2938 }), true); |
| 2939 res.getIamPolicy(arg_request, arg_resource).then(unittest.expectAsync(((ap
i.Policy response) { | 2939 res.getIamPolicy(arg_request, arg_resource).then(unittest.expectAsync1(((a
pi.Policy response) { |
| 2940 checkPolicy(response); | 2940 checkPolicy(response); |
| 2941 }))); | 2941 }))); |
| 2942 }); | 2942 }); |
| 2943 | 2943 |
| 2944 unittest.test("method--list", () { | 2944 unittest.test("method--list", () { |
| 2945 | 2945 |
| 2946 var mock = new HttpServerMock(); | 2946 var mock = new HttpServerMock(); |
| 2947 api.ProjectsInstancesResourceApi res = new api.SpannerApi(mock).projects.i
nstances; | 2947 api.ProjectsInstancesResourceApi res = new api.SpannerApi(mock).projects.i
nstances; |
| 2948 var arg_parent = "foo"; | 2948 var arg_parent = "foo"; |
| 2949 var arg_filter = "foo"; |
| 2949 var arg_pageToken = "foo"; | 2950 var arg_pageToken = "foo"; |
| 2950 var arg_pageSize = 42; | 2951 var arg_pageSize = 42; |
| 2951 var arg_filter = "foo"; | 2952 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 2952 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 2953 var path = (req.url).path; | 2953 var path = (req.url).path; |
| 2954 var pathOffset = 0; | 2954 var pathOffset = 0; |
| 2955 var index; | 2955 var index; |
| 2956 var subPart; | 2956 var subPart; |
| 2957 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2957 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 2958 pathOffset += 1; | 2958 pathOffset += 1; |
| 2959 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); | 2959 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); |
| 2960 pathOffset += 3; | 2960 pathOffset += 3; |
| 2961 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; | 2961 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; |
| 2962 | 2962 |
| 2963 var query = (req.url).query; | 2963 var query = (req.url).query; |
| 2964 var queryOffset = 0; | 2964 var queryOffset = 0; |
| 2965 var queryMap = {}; | 2965 var queryMap = {}; |
| 2966 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 2966 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 2967 parseBool(n) { | 2967 parseBool(n) { |
| 2968 if (n == "true") return true; | 2968 if (n == "true") return true; |
| 2969 if (n == "false") return false; | 2969 if (n == "false") return false; |
| 2970 if (n == null) return null; | 2970 if (n == null) return null; |
| 2971 throw new core.ArgumentError("Invalid boolean: $n"); | 2971 throw new core.ArgumentError("Invalid boolean: $n"); |
| 2972 } | 2972 } |
| 2973 if (query.length > 0) { | 2973 if (query.length > 0) { |
| 2974 for (var part in query.split("&")) { | 2974 for (var part in query.split("&")) { |
| 2975 var keyvalue = part.split("="); | 2975 var keyvalue = part.split("="); |
| 2976 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 2976 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 2977 } | 2977 } |
| 2978 } | 2978 } |
| 2979 unittest.expect(queryMap["filter"].first, unittest.equals(arg_filter)); |
| 2979 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | 2980 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); |
| 2980 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ
als(arg_pageSize)); | 2981 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ
als(arg_pageSize)); |
| 2981 unittest.expect(queryMap["filter"].first, unittest.equals(arg_filter)); | |
| 2982 | 2982 |
| 2983 | 2983 |
| 2984 var h = { | 2984 var h = { |
| 2985 "content-type" : "application/json; charset=utf-8", | 2985 "content-type" : "application/json; charset=utf-8", |
| 2986 }; | 2986 }; |
| 2987 var resp = convert.JSON.encode(buildListInstancesResponse()); | 2987 var resp = convert.JSON.encode(buildListInstancesResponse()); |
| 2988 return new async.Future.value(stringResponse(200, h, resp)); | 2988 return new async.Future.value(stringResponse(200, h, resp)); |
| 2989 }), true); | 2989 }), true); |
| 2990 res.list(arg_parent, pageToken: arg_pageToken, pageSize: arg_pageSize, fil
ter: arg_filter).then(unittest.expectAsync(((api.ListInstancesResponse response)
{ | 2990 res.list(arg_parent, filter: arg_filter, pageToken: arg_pageToken, pageSiz
e: arg_pageSize).then(unittest.expectAsync1(((api.ListInstancesResponse response
) { |
| 2991 checkListInstancesResponse(response); | 2991 checkListInstancesResponse(response); |
| 2992 }))); | 2992 }))); |
| 2993 }); | 2993 }); |
| 2994 | 2994 |
| 2995 unittest.test("method--patch", () { | 2995 unittest.test("method--patch", () { |
| 2996 | 2996 |
| 2997 var mock = new HttpServerMock(); | 2997 var mock = new HttpServerMock(); |
| 2998 api.ProjectsInstancesResourceApi res = new api.SpannerApi(mock).projects.i
nstances; | 2998 api.ProjectsInstancesResourceApi res = new api.SpannerApi(mock).projects.i
nstances; |
| 2999 var arg_request = buildUpdateInstanceRequest(); | 2999 var arg_request = buildUpdateInstanceRequest(); |
| 3000 var arg_name = "foo"; | 3000 var arg_name = "foo"; |
| 3001 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 3001 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 3002 var obj = new api.UpdateInstanceRequest.fromJson(json); | 3002 var obj = new api.UpdateInstanceRequest.fromJson(json); |
| 3003 checkUpdateInstanceRequest(obj); | 3003 checkUpdateInstanceRequest(obj); |
| 3004 | 3004 |
| 3005 var path = (req.url).path; | 3005 var path = (req.url).path; |
| 3006 var pathOffset = 0; | 3006 var pathOffset = 0; |
| 3007 var index; | 3007 var index; |
| 3008 var subPart; | 3008 var subPart; |
| 3009 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 3009 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 3010 pathOffset += 1; | 3010 pathOffset += 1; |
| 3011 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); | 3011 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); |
| (...skipping 17 matching lines...) Expand all Loading... |
| 3029 } | 3029 } |
| 3030 } | 3030 } |
| 3031 | 3031 |
| 3032 | 3032 |
| 3033 var h = { | 3033 var h = { |
| 3034 "content-type" : "application/json; charset=utf-8", | 3034 "content-type" : "application/json; charset=utf-8", |
| 3035 }; | 3035 }; |
| 3036 var resp = convert.JSON.encode(buildOperation()); | 3036 var resp = convert.JSON.encode(buildOperation()); |
| 3037 return new async.Future.value(stringResponse(200, h, resp)); | 3037 return new async.Future.value(stringResponse(200, h, resp)); |
| 3038 }), true); | 3038 }), true); |
| 3039 res.patch(arg_request, arg_name).then(unittest.expectAsync(((api.Operation
response) { | 3039 res.patch(arg_request, arg_name).then(unittest.expectAsync1(((api.Operatio
n response) { |
| 3040 checkOperation(response); | 3040 checkOperation(response); |
| 3041 }))); | 3041 }))); |
| 3042 }); | 3042 }); |
| 3043 | 3043 |
| 3044 unittest.test("method--setIamPolicy", () { | 3044 unittest.test("method--setIamPolicy", () { |
| 3045 | 3045 |
| 3046 var mock = new HttpServerMock(); | 3046 var mock = new HttpServerMock(); |
| 3047 api.ProjectsInstancesResourceApi res = new api.SpannerApi(mock).projects.i
nstances; | 3047 api.ProjectsInstancesResourceApi res = new api.SpannerApi(mock).projects.i
nstances; |
| 3048 var arg_request = buildSetIamPolicyRequest(); | 3048 var arg_request = buildSetIamPolicyRequest(); |
| 3049 var arg_resource = "foo"; | 3049 var arg_resource = "foo"; |
| 3050 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 3050 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 3051 var obj = new api.SetIamPolicyRequest.fromJson(json); | 3051 var obj = new api.SetIamPolicyRequest.fromJson(json); |
| 3052 checkSetIamPolicyRequest(obj); | 3052 checkSetIamPolicyRequest(obj); |
| 3053 | 3053 |
| 3054 var path = (req.url).path; | 3054 var path = (req.url).path; |
| 3055 var pathOffset = 0; | 3055 var pathOffset = 0; |
| 3056 var index; | 3056 var index; |
| 3057 var subPart; | 3057 var subPart; |
| 3058 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 3058 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 3059 pathOffset += 1; | 3059 pathOffset += 1; |
| 3060 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); | 3060 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); |
| (...skipping 17 matching lines...) Expand all Loading... |
| 3078 } | 3078 } |
| 3079 } | 3079 } |
| 3080 | 3080 |
| 3081 | 3081 |
| 3082 var h = { | 3082 var h = { |
| 3083 "content-type" : "application/json; charset=utf-8", | 3083 "content-type" : "application/json; charset=utf-8", |
| 3084 }; | 3084 }; |
| 3085 var resp = convert.JSON.encode(buildPolicy()); | 3085 var resp = convert.JSON.encode(buildPolicy()); |
| 3086 return new async.Future.value(stringResponse(200, h, resp)); | 3086 return new async.Future.value(stringResponse(200, h, resp)); |
| 3087 }), true); | 3087 }), true); |
| 3088 res.setIamPolicy(arg_request, arg_resource).then(unittest.expectAsync(((ap
i.Policy response) { | 3088 res.setIamPolicy(arg_request, arg_resource).then(unittest.expectAsync1(((a
pi.Policy response) { |
| 3089 checkPolicy(response); | 3089 checkPolicy(response); |
| 3090 }))); | 3090 }))); |
| 3091 }); | 3091 }); |
| 3092 | 3092 |
| 3093 unittest.test("method--testIamPermissions", () { | 3093 unittest.test("method--testIamPermissions", () { |
| 3094 | 3094 |
| 3095 var mock = new HttpServerMock(); | 3095 var mock = new HttpServerMock(); |
| 3096 api.ProjectsInstancesResourceApi res = new api.SpannerApi(mock).projects.i
nstances; | 3096 api.ProjectsInstancesResourceApi res = new api.SpannerApi(mock).projects.i
nstances; |
| 3097 var arg_request = buildTestIamPermissionsRequest(); | 3097 var arg_request = buildTestIamPermissionsRequest(); |
| 3098 var arg_resource = "foo"; | 3098 var arg_resource = "foo"; |
| 3099 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 3099 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 3100 var obj = new api.TestIamPermissionsRequest.fromJson(json); | 3100 var obj = new api.TestIamPermissionsRequest.fromJson(json); |
| 3101 checkTestIamPermissionsRequest(obj); | 3101 checkTestIamPermissionsRequest(obj); |
| 3102 | 3102 |
| 3103 var path = (req.url).path; | 3103 var path = (req.url).path; |
| 3104 var pathOffset = 0; | 3104 var pathOffset = 0; |
| 3105 var index; | 3105 var index; |
| 3106 var subPart; | 3106 var subPart; |
| 3107 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 3107 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 3108 pathOffset += 1; | 3108 pathOffset += 1; |
| 3109 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); | 3109 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); |
| (...skipping 17 matching lines...) Expand all Loading... |
| 3127 } | 3127 } |
| 3128 } | 3128 } |
| 3129 | 3129 |
| 3130 | 3130 |
| 3131 var h = { | 3131 var h = { |
| 3132 "content-type" : "application/json; charset=utf-8", | 3132 "content-type" : "application/json; charset=utf-8", |
| 3133 }; | 3133 }; |
| 3134 var resp = convert.JSON.encode(buildTestIamPermissionsResponse()); | 3134 var resp = convert.JSON.encode(buildTestIamPermissionsResponse()); |
| 3135 return new async.Future.value(stringResponse(200, h, resp)); | 3135 return new async.Future.value(stringResponse(200, h, resp)); |
| 3136 }), true); | 3136 }), true); |
| 3137 res.testIamPermissions(arg_request, arg_resource).then(unittest.expectAsyn
c(((api.TestIamPermissionsResponse response) { | 3137 res.testIamPermissions(arg_request, arg_resource).then(unittest.expectAsyn
c1(((api.TestIamPermissionsResponse response) { |
| 3138 checkTestIamPermissionsResponse(response); | 3138 checkTestIamPermissionsResponse(response); |
| 3139 }))); | 3139 }))); |
| 3140 }); | 3140 }); |
| 3141 | 3141 |
| 3142 }); | 3142 }); |
| 3143 | 3143 |
| 3144 | 3144 |
| 3145 unittest.group("resource-ProjectsInstancesDatabasesResourceApi", () { | 3145 unittest.group("resource-ProjectsInstancesDatabasesResourceApi", () { |
| 3146 unittest.test("method--create", () { | 3146 unittest.test("method--create", () { |
| 3147 | 3147 |
| 3148 var mock = new HttpServerMock(); | 3148 var mock = new HttpServerMock(); |
| 3149 api.ProjectsInstancesDatabasesResourceApi res = new api.SpannerApi(mock).p
rojects.instances.databases; | 3149 api.ProjectsInstancesDatabasesResourceApi res = new api.SpannerApi(mock).p
rojects.instances.databases; |
| 3150 var arg_request = buildCreateDatabaseRequest(); | 3150 var arg_request = buildCreateDatabaseRequest(); |
| 3151 var arg_parent = "foo"; | 3151 var arg_parent = "foo"; |
| 3152 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 3152 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 3153 var obj = new api.CreateDatabaseRequest.fromJson(json); | 3153 var obj = new api.CreateDatabaseRequest.fromJson(json); |
| 3154 checkCreateDatabaseRequest(obj); | 3154 checkCreateDatabaseRequest(obj); |
| 3155 | 3155 |
| 3156 var path = (req.url).path; | 3156 var path = (req.url).path; |
| 3157 var pathOffset = 0; | 3157 var pathOffset = 0; |
| 3158 var index; | 3158 var index; |
| 3159 var subPart; | 3159 var subPart; |
| 3160 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 3160 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 3161 pathOffset += 1; | 3161 pathOffset += 1; |
| 3162 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); | 3162 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); |
| (...skipping 17 matching lines...) Expand all Loading... |
| 3180 } | 3180 } |
| 3181 } | 3181 } |
| 3182 | 3182 |
| 3183 | 3183 |
| 3184 var h = { | 3184 var h = { |
| 3185 "content-type" : "application/json; charset=utf-8", | 3185 "content-type" : "application/json; charset=utf-8", |
| 3186 }; | 3186 }; |
| 3187 var resp = convert.JSON.encode(buildOperation()); | 3187 var resp = convert.JSON.encode(buildOperation()); |
| 3188 return new async.Future.value(stringResponse(200, h, resp)); | 3188 return new async.Future.value(stringResponse(200, h, resp)); |
| 3189 }), true); | 3189 }), true); |
| 3190 res.create(arg_request, arg_parent).then(unittest.expectAsync(((api.Operat
ion response) { | 3190 res.create(arg_request, arg_parent).then(unittest.expectAsync1(((api.Opera
tion response) { |
| 3191 checkOperation(response); | 3191 checkOperation(response); |
| 3192 }))); | 3192 }))); |
| 3193 }); | 3193 }); |
| 3194 | 3194 |
| 3195 unittest.test("method--dropDatabase", () { | 3195 unittest.test("method--dropDatabase", () { |
| 3196 | 3196 |
| 3197 var mock = new HttpServerMock(); | 3197 var mock = new HttpServerMock(); |
| 3198 api.ProjectsInstancesDatabasesResourceApi res = new api.SpannerApi(mock).p
rojects.instances.databases; | 3198 api.ProjectsInstancesDatabasesResourceApi res = new api.SpannerApi(mock).p
rojects.instances.databases; |
| 3199 var arg_database = "foo"; | 3199 var arg_database = "foo"; |
| 3200 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 3200 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 3201 var path = (req.url).path; | 3201 var path = (req.url).path; |
| 3202 var pathOffset = 0; | 3202 var pathOffset = 0; |
| 3203 var index; | 3203 var index; |
| 3204 var subPart; | 3204 var subPart; |
| 3205 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 3205 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 3206 pathOffset += 1; | 3206 pathOffset += 1; |
| 3207 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); | 3207 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); |
| 3208 pathOffset += 3; | 3208 pathOffset += 3; |
| 3209 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; | 3209 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; |
| 3210 | 3210 |
| (...skipping 14 matching lines...) Expand all Loading... |
| 3225 } | 3225 } |
| 3226 } | 3226 } |
| 3227 | 3227 |
| 3228 | 3228 |
| 3229 var h = { | 3229 var h = { |
| 3230 "content-type" : "application/json; charset=utf-8", | 3230 "content-type" : "application/json; charset=utf-8", |
| 3231 }; | 3231 }; |
| 3232 var resp = convert.JSON.encode(buildEmpty()); | 3232 var resp = convert.JSON.encode(buildEmpty()); |
| 3233 return new async.Future.value(stringResponse(200, h, resp)); | 3233 return new async.Future.value(stringResponse(200, h, resp)); |
| 3234 }), true); | 3234 }), true); |
| 3235 res.dropDatabase(arg_database).then(unittest.expectAsync(((api.Empty respo
nse) { | 3235 res.dropDatabase(arg_database).then(unittest.expectAsync1(((api.Empty resp
onse) { |
| 3236 checkEmpty(response); | 3236 checkEmpty(response); |
| 3237 }))); | 3237 }))); |
| 3238 }); | 3238 }); |
| 3239 | 3239 |
| 3240 unittest.test("method--get", () { | 3240 unittest.test("method--get", () { |
| 3241 | 3241 |
| 3242 var mock = new HttpServerMock(); | 3242 var mock = new HttpServerMock(); |
| 3243 api.ProjectsInstancesDatabasesResourceApi res = new api.SpannerApi(mock).p
rojects.instances.databases; | 3243 api.ProjectsInstancesDatabasesResourceApi res = new api.SpannerApi(mock).p
rojects.instances.databases; |
| 3244 var arg_name = "foo"; | 3244 var arg_name = "foo"; |
| 3245 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 3245 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 3246 var path = (req.url).path; | 3246 var path = (req.url).path; |
| 3247 var pathOffset = 0; | 3247 var pathOffset = 0; |
| 3248 var index; | 3248 var index; |
| 3249 var subPart; | 3249 var subPart; |
| 3250 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 3250 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 3251 pathOffset += 1; | 3251 pathOffset += 1; |
| 3252 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); | 3252 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); |
| 3253 pathOffset += 3; | 3253 pathOffset += 3; |
| 3254 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; | 3254 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; |
| 3255 | 3255 |
| (...skipping 14 matching lines...) Expand all Loading... |
| 3270 } | 3270 } |
| 3271 } | 3271 } |
| 3272 | 3272 |
| 3273 | 3273 |
| 3274 var h = { | 3274 var h = { |
| 3275 "content-type" : "application/json; charset=utf-8", | 3275 "content-type" : "application/json; charset=utf-8", |
| 3276 }; | 3276 }; |
| 3277 var resp = convert.JSON.encode(buildDatabase()); | 3277 var resp = convert.JSON.encode(buildDatabase()); |
| 3278 return new async.Future.value(stringResponse(200, h, resp)); | 3278 return new async.Future.value(stringResponse(200, h, resp)); |
| 3279 }), true); | 3279 }), true); |
| 3280 res.get(arg_name).then(unittest.expectAsync(((api.Database response) { | 3280 res.get(arg_name).then(unittest.expectAsync1(((api.Database response) { |
| 3281 checkDatabase(response); | 3281 checkDatabase(response); |
| 3282 }))); | 3282 }))); |
| 3283 }); | 3283 }); |
| 3284 | 3284 |
| 3285 unittest.test("method--getDdl", () { | 3285 unittest.test("method--getDdl", () { |
| 3286 | 3286 |
| 3287 var mock = new HttpServerMock(); | 3287 var mock = new HttpServerMock(); |
| 3288 api.ProjectsInstancesDatabasesResourceApi res = new api.SpannerApi(mock).p
rojects.instances.databases; | 3288 api.ProjectsInstancesDatabasesResourceApi res = new api.SpannerApi(mock).p
rojects.instances.databases; |
| 3289 var arg_database = "foo"; | 3289 var arg_database = "foo"; |
| 3290 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 3290 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 3291 var path = (req.url).path; | 3291 var path = (req.url).path; |
| 3292 var pathOffset = 0; | 3292 var pathOffset = 0; |
| 3293 var index; | 3293 var index; |
| 3294 var subPart; | 3294 var subPart; |
| 3295 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 3295 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 3296 pathOffset += 1; | 3296 pathOffset += 1; |
| 3297 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); | 3297 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); |
| 3298 pathOffset += 3; | 3298 pathOffset += 3; |
| 3299 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; | 3299 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; |
| 3300 | 3300 |
| (...skipping 14 matching lines...) Expand all Loading... |
| 3315 } | 3315 } |
| 3316 } | 3316 } |
| 3317 | 3317 |
| 3318 | 3318 |
| 3319 var h = { | 3319 var h = { |
| 3320 "content-type" : "application/json; charset=utf-8", | 3320 "content-type" : "application/json; charset=utf-8", |
| 3321 }; | 3321 }; |
| 3322 var resp = convert.JSON.encode(buildGetDatabaseDdlResponse()); | 3322 var resp = convert.JSON.encode(buildGetDatabaseDdlResponse()); |
| 3323 return new async.Future.value(stringResponse(200, h, resp)); | 3323 return new async.Future.value(stringResponse(200, h, resp)); |
| 3324 }), true); | 3324 }), true); |
| 3325 res.getDdl(arg_database).then(unittest.expectAsync(((api.GetDatabaseDdlRes
ponse response) { | 3325 res.getDdl(arg_database).then(unittest.expectAsync1(((api.GetDatabaseDdlRe
sponse response) { |
| 3326 checkGetDatabaseDdlResponse(response); | 3326 checkGetDatabaseDdlResponse(response); |
| 3327 }))); | 3327 }))); |
| 3328 }); | 3328 }); |
| 3329 | 3329 |
| 3330 unittest.test("method--getIamPolicy", () { | 3330 unittest.test("method--getIamPolicy", () { |
| 3331 | 3331 |
| 3332 var mock = new HttpServerMock(); | 3332 var mock = new HttpServerMock(); |
| 3333 api.ProjectsInstancesDatabasesResourceApi res = new api.SpannerApi(mock).p
rojects.instances.databases; | 3333 api.ProjectsInstancesDatabasesResourceApi res = new api.SpannerApi(mock).p
rojects.instances.databases; |
| 3334 var arg_request = buildGetIamPolicyRequest(); | 3334 var arg_request = buildGetIamPolicyRequest(); |
| 3335 var arg_resource = "foo"; | 3335 var arg_resource = "foo"; |
| 3336 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 3336 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 3337 var obj = new api.GetIamPolicyRequest.fromJson(json); | 3337 var obj = new api.GetIamPolicyRequest.fromJson(json); |
| 3338 checkGetIamPolicyRequest(obj); | 3338 checkGetIamPolicyRequest(obj); |
| 3339 | 3339 |
| 3340 var path = (req.url).path; | 3340 var path = (req.url).path; |
| 3341 var pathOffset = 0; | 3341 var pathOffset = 0; |
| 3342 var index; | 3342 var index; |
| 3343 var subPart; | 3343 var subPart; |
| 3344 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 3344 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 3345 pathOffset += 1; | 3345 pathOffset += 1; |
| 3346 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); | 3346 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); |
| (...skipping 17 matching lines...) Expand all Loading... |
| 3364 } | 3364 } |
| 3365 } | 3365 } |
| 3366 | 3366 |
| 3367 | 3367 |
| 3368 var h = { | 3368 var h = { |
| 3369 "content-type" : "application/json; charset=utf-8", | 3369 "content-type" : "application/json; charset=utf-8", |
| 3370 }; | 3370 }; |
| 3371 var resp = convert.JSON.encode(buildPolicy()); | 3371 var resp = convert.JSON.encode(buildPolicy()); |
| 3372 return new async.Future.value(stringResponse(200, h, resp)); | 3372 return new async.Future.value(stringResponse(200, h, resp)); |
| 3373 }), true); | 3373 }), true); |
| 3374 res.getIamPolicy(arg_request, arg_resource).then(unittest.expectAsync(((ap
i.Policy response) { | 3374 res.getIamPolicy(arg_request, arg_resource).then(unittest.expectAsync1(((a
pi.Policy response) { |
| 3375 checkPolicy(response); | 3375 checkPolicy(response); |
| 3376 }))); | 3376 }))); |
| 3377 }); | 3377 }); |
| 3378 | 3378 |
| 3379 unittest.test("method--list", () { | 3379 unittest.test("method--list", () { |
| 3380 | 3380 |
| 3381 var mock = new HttpServerMock(); | 3381 var mock = new HttpServerMock(); |
| 3382 api.ProjectsInstancesDatabasesResourceApi res = new api.SpannerApi(mock).p
rojects.instances.databases; | 3382 api.ProjectsInstancesDatabasesResourceApi res = new api.SpannerApi(mock).p
rojects.instances.databases; |
| 3383 var arg_parent = "foo"; | 3383 var arg_parent = "foo"; |
| 3384 var arg_pageToken = "foo"; | 3384 var arg_pageToken = "foo"; |
| 3385 var arg_pageSize = 42; | 3385 var arg_pageSize = 42; |
| 3386 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 3386 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 3387 var path = (req.url).path; | 3387 var path = (req.url).path; |
| 3388 var pathOffset = 0; | 3388 var pathOffset = 0; |
| 3389 var index; | 3389 var index; |
| 3390 var subPart; | 3390 var subPart; |
| 3391 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 3391 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 3392 pathOffset += 1; | 3392 pathOffset += 1; |
| 3393 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); | 3393 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); |
| 3394 pathOffset += 3; | 3394 pathOffset += 3; |
| 3395 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; | 3395 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; |
| 3396 | 3396 |
| (...skipping 16 matching lines...) Expand all Loading... |
| 3413 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | 3413 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); |
| 3414 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ
als(arg_pageSize)); | 3414 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ
als(arg_pageSize)); |
| 3415 | 3415 |
| 3416 | 3416 |
| 3417 var h = { | 3417 var h = { |
| 3418 "content-type" : "application/json; charset=utf-8", | 3418 "content-type" : "application/json; charset=utf-8", |
| 3419 }; | 3419 }; |
| 3420 var resp = convert.JSON.encode(buildListDatabasesResponse()); | 3420 var resp = convert.JSON.encode(buildListDatabasesResponse()); |
| 3421 return new async.Future.value(stringResponse(200, h, resp)); | 3421 return new async.Future.value(stringResponse(200, h, resp)); |
| 3422 }), true); | 3422 }), true); |
| 3423 res.list(arg_parent, pageToken: arg_pageToken, pageSize: arg_pageSize).the
n(unittest.expectAsync(((api.ListDatabasesResponse response) { | 3423 res.list(arg_parent, pageToken: arg_pageToken, pageSize: arg_pageSize).the
n(unittest.expectAsync1(((api.ListDatabasesResponse response) { |
| 3424 checkListDatabasesResponse(response); | 3424 checkListDatabasesResponse(response); |
| 3425 }))); | 3425 }))); |
| 3426 }); | 3426 }); |
| 3427 | 3427 |
| 3428 unittest.test("method--setIamPolicy", () { | 3428 unittest.test("method--setIamPolicy", () { |
| 3429 | 3429 |
| 3430 var mock = new HttpServerMock(); | 3430 var mock = new HttpServerMock(); |
| 3431 api.ProjectsInstancesDatabasesResourceApi res = new api.SpannerApi(mock).p
rojects.instances.databases; | 3431 api.ProjectsInstancesDatabasesResourceApi res = new api.SpannerApi(mock).p
rojects.instances.databases; |
| 3432 var arg_request = buildSetIamPolicyRequest(); | 3432 var arg_request = buildSetIamPolicyRequest(); |
| 3433 var arg_resource = "foo"; | 3433 var arg_resource = "foo"; |
| 3434 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 3434 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 3435 var obj = new api.SetIamPolicyRequest.fromJson(json); | 3435 var obj = new api.SetIamPolicyRequest.fromJson(json); |
| 3436 checkSetIamPolicyRequest(obj); | 3436 checkSetIamPolicyRequest(obj); |
| 3437 | 3437 |
| 3438 var path = (req.url).path; | 3438 var path = (req.url).path; |
| 3439 var pathOffset = 0; | 3439 var pathOffset = 0; |
| 3440 var index; | 3440 var index; |
| 3441 var subPart; | 3441 var subPart; |
| 3442 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 3442 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 3443 pathOffset += 1; | 3443 pathOffset += 1; |
| 3444 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); | 3444 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); |
| (...skipping 17 matching lines...) Expand all Loading... |
| 3462 } | 3462 } |
| 3463 } | 3463 } |
| 3464 | 3464 |
| 3465 | 3465 |
| 3466 var h = { | 3466 var h = { |
| 3467 "content-type" : "application/json; charset=utf-8", | 3467 "content-type" : "application/json; charset=utf-8", |
| 3468 }; | 3468 }; |
| 3469 var resp = convert.JSON.encode(buildPolicy()); | 3469 var resp = convert.JSON.encode(buildPolicy()); |
| 3470 return new async.Future.value(stringResponse(200, h, resp)); | 3470 return new async.Future.value(stringResponse(200, h, resp)); |
| 3471 }), true); | 3471 }), true); |
| 3472 res.setIamPolicy(arg_request, arg_resource).then(unittest.expectAsync(((ap
i.Policy response) { | 3472 res.setIamPolicy(arg_request, arg_resource).then(unittest.expectAsync1(((a
pi.Policy response) { |
| 3473 checkPolicy(response); | 3473 checkPolicy(response); |
| 3474 }))); | 3474 }))); |
| 3475 }); | 3475 }); |
| 3476 | 3476 |
| 3477 unittest.test("method--testIamPermissions", () { | 3477 unittest.test("method--testIamPermissions", () { |
| 3478 | 3478 |
| 3479 var mock = new HttpServerMock(); | 3479 var mock = new HttpServerMock(); |
| 3480 api.ProjectsInstancesDatabasesResourceApi res = new api.SpannerApi(mock).p
rojects.instances.databases; | 3480 api.ProjectsInstancesDatabasesResourceApi res = new api.SpannerApi(mock).p
rojects.instances.databases; |
| 3481 var arg_request = buildTestIamPermissionsRequest(); | 3481 var arg_request = buildTestIamPermissionsRequest(); |
| 3482 var arg_resource = "foo"; | 3482 var arg_resource = "foo"; |
| 3483 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 3483 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 3484 var obj = new api.TestIamPermissionsRequest.fromJson(json); | 3484 var obj = new api.TestIamPermissionsRequest.fromJson(json); |
| 3485 checkTestIamPermissionsRequest(obj); | 3485 checkTestIamPermissionsRequest(obj); |
| 3486 | 3486 |
| 3487 var path = (req.url).path; | 3487 var path = (req.url).path; |
| 3488 var pathOffset = 0; | 3488 var pathOffset = 0; |
| 3489 var index; | 3489 var index; |
| 3490 var subPart; | 3490 var subPart; |
| 3491 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 3491 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 3492 pathOffset += 1; | 3492 pathOffset += 1; |
| 3493 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); | 3493 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); |
| (...skipping 17 matching lines...) Expand all Loading... |
| 3511 } | 3511 } |
| 3512 } | 3512 } |
| 3513 | 3513 |
| 3514 | 3514 |
| 3515 var h = { | 3515 var h = { |
| 3516 "content-type" : "application/json; charset=utf-8", | 3516 "content-type" : "application/json; charset=utf-8", |
| 3517 }; | 3517 }; |
| 3518 var resp = convert.JSON.encode(buildTestIamPermissionsResponse()); | 3518 var resp = convert.JSON.encode(buildTestIamPermissionsResponse()); |
| 3519 return new async.Future.value(stringResponse(200, h, resp)); | 3519 return new async.Future.value(stringResponse(200, h, resp)); |
| 3520 }), true); | 3520 }), true); |
| 3521 res.testIamPermissions(arg_request, arg_resource).then(unittest.expectAsyn
c(((api.TestIamPermissionsResponse response) { | 3521 res.testIamPermissions(arg_request, arg_resource).then(unittest.expectAsyn
c1(((api.TestIamPermissionsResponse response) { |
| 3522 checkTestIamPermissionsResponse(response); | 3522 checkTestIamPermissionsResponse(response); |
| 3523 }))); | 3523 }))); |
| 3524 }); | 3524 }); |
| 3525 | 3525 |
| 3526 unittest.test("method--updateDdl", () { | 3526 unittest.test("method--updateDdl", () { |
| 3527 | 3527 |
| 3528 var mock = new HttpServerMock(); | 3528 var mock = new HttpServerMock(); |
| 3529 api.ProjectsInstancesDatabasesResourceApi res = new api.SpannerApi(mock).p
rojects.instances.databases; | 3529 api.ProjectsInstancesDatabasesResourceApi res = new api.SpannerApi(mock).p
rojects.instances.databases; |
| 3530 var arg_request = buildUpdateDatabaseDdlRequest(); | 3530 var arg_request = buildUpdateDatabaseDdlRequest(); |
| 3531 var arg_database = "foo"; | 3531 var arg_database = "foo"; |
| 3532 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 3532 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 3533 var obj = new api.UpdateDatabaseDdlRequest.fromJson(json); | 3533 var obj = new api.UpdateDatabaseDdlRequest.fromJson(json); |
| 3534 checkUpdateDatabaseDdlRequest(obj); | 3534 checkUpdateDatabaseDdlRequest(obj); |
| 3535 | 3535 |
| 3536 var path = (req.url).path; | 3536 var path = (req.url).path; |
| 3537 var pathOffset = 0; | 3537 var pathOffset = 0; |
| 3538 var index; | 3538 var index; |
| 3539 var subPart; | 3539 var subPart; |
| 3540 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 3540 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 3541 pathOffset += 1; | 3541 pathOffset += 1; |
| 3542 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); | 3542 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); |
| (...skipping 17 matching lines...) Expand all Loading... |
| 3560 } | 3560 } |
| 3561 } | 3561 } |
| 3562 | 3562 |
| 3563 | 3563 |
| 3564 var h = { | 3564 var h = { |
| 3565 "content-type" : "application/json; charset=utf-8", | 3565 "content-type" : "application/json; charset=utf-8", |
| 3566 }; | 3566 }; |
| 3567 var resp = convert.JSON.encode(buildOperation()); | 3567 var resp = convert.JSON.encode(buildOperation()); |
| 3568 return new async.Future.value(stringResponse(200, h, resp)); | 3568 return new async.Future.value(stringResponse(200, h, resp)); |
| 3569 }), true); | 3569 }), true); |
| 3570 res.updateDdl(arg_request, arg_database).then(unittest.expectAsync(((api.O
peration response) { | 3570 res.updateDdl(arg_request, arg_database).then(unittest.expectAsync1(((api.
Operation response) { |
| 3571 checkOperation(response); | 3571 checkOperation(response); |
| 3572 }))); | 3572 }))); |
| 3573 }); | 3573 }); |
| 3574 | 3574 |
| 3575 }); | 3575 }); |
| 3576 | 3576 |
| 3577 | 3577 |
| 3578 unittest.group("resource-ProjectsInstancesDatabasesOperationsResourceApi", ()
{ | 3578 unittest.group("resource-ProjectsInstancesDatabasesOperationsResourceApi", ()
{ |
| 3579 unittest.test("method--cancel", () { | 3579 unittest.test("method--cancel", () { |
| 3580 | 3580 |
| 3581 var mock = new HttpServerMock(); | 3581 var mock = new HttpServerMock(); |
| 3582 api.ProjectsInstancesDatabasesOperationsResourceApi res = new api.SpannerA
pi(mock).projects.instances.databases.operations; | 3582 api.ProjectsInstancesDatabasesOperationsResourceApi res = new api.SpannerA
pi(mock).projects.instances.databases.operations; |
| 3583 var arg_name = "foo"; | 3583 var arg_name = "foo"; |
| 3584 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 3584 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 3585 var path = (req.url).path; | 3585 var path = (req.url).path; |
| 3586 var pathOffset = 0; | 3586 var pathOffset = 0; |
| 3587 var index; | 3587 var index; |
| 3588 var subPart; | 3588 var subPart; |
| 3589 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 3589 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 3590 pathOffset += 1; | 3590 pathOffset += 1; |
| 3591 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); | 3591 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); |
| 3592 pathOffset += 3; | 3592 pathOffset += 3; |
| 3593 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; | 3593 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; |
| 3594 | 3594 |
| (...skipping 14 matching lines...) Expand all Loading... |
| 3609 } | 3609 } |
| 3610 } | 3610 } |
| 3611 | 3611 |
| 3612 | 3612 |
| 3613 var h = { | 3613 var h = { |
| 3614 "content-type" : "application/json; charset=utf-8", | 3614 "content-type" : "application/json; charset=utf-8", |
| 3615 }; | 3615 }; |
| 3616 var resp = convert.JSON.encode(buildEmpty()); | 3616 var resp = convert.JSON.encode(buildEmpty()); |
| 3617 return new async.Future.value(stringResponse(200, h, resp)); | 3617 return new async.Future.value(stringResponse(200, h, resp)); |
| 3618 }), true); | 3618 }), true); |
| 3619 res.cancel(arg_name).then(unittest.expectAsync(((api.Empty response) { | 3619 res.cancel(arg_name).then(unittest.expectAsync1(((api.Empty response) { |
| 3620 checkEmpty(response); | 3620 checkEmpty(response); |
| 3621 }))); | 3621 }))); |
| 3622 }); | 3622 }); |
| 3623 | 3623 |
| 3624 unittest.test("method--delete", () { | 3624 unittest.test("method--delete", () { |
| 3625 | 3625 |
| 3626 var mock = new HttpServerMock(); | 3626 var mock = new HttpServerMock(); |
| 3627 api.ProjectsInstancesDatabasesOperationsResourceApi res = new api.SpannerA
pi(mock).projects.instances.databases.operations; | 3627 api.ProjectsInstancesDatabasesOperationsResourceApi res = new api.SpannerA
pi(mock).projects.instances.databases.operations; |
| 3628 var arg_name = "foo"; | 3628 var arg_name = "foo"; |
| 3629 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 3629 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 3630 var path = (req.url).path; | 3630 var path = (req.url).path; |
| 3631 var pathOffset = 0; | 3631 var pathOffset = 0; |
| 3632 var index; | 3632 var index; |
| 3633 var subPart; | 3633 var subPart; |
| 3634 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 3634 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 3635 pathOffset += 1; | 3635 pathOffset += 1; |
| 3636 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); | 3636 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); |
| 3637 pathOffset += 3; | 3637 pathOffset += 3; |
| 3638 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; | 3638 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; |
| 3639 | 3639 |
| (...skipping 14 matching lines...) Expand all Loading... |
| 3654 } | 3654 } |
| 3655 } | 3655 } |
| 3656 | 3656 |
| 3657 | 3657 |
| 3658 var h = { | 3658 var h = { |
| 3659 "content-type" : "application/json; charset=utf-8", | 3659 "content-type" : "application/json; charset=utf-8", |
| 3660 }; | 3660 }; |
| 3661 var resp = convert.JSON.encode(buildEmpty()); | 3661 var resp = convert.JSON.encode(buildEmpty()); |
| 3662 return new async.Future.value(stringResponse(200, h, resp)); | 3662 return new async.Future.value(stringResponse(200, h, resp)); |
| 3663 }), true); | 3663 }), true); |
| 3664 res.delete(arg_name).then(unittest.expectAsync(((api.Empty response) { | 3664 res.delete(arg_name).then(unittest.expectAsync1(((api.Empty response) { |
| 3665 checkEmpty(response); | 3665 checkEmpty(response); |
| 3666 }))); | 3666 }))); |
| 3667 }); | 3667 }); |
| 3668 | 3668 |
| 3669 unittest.test("method--get", () { | 3669 unittest.test("method--get", () { |
| 3670 | 3670 |
| 3671 var mock = new HttpServerMock(); | 3671 var mock = new HttpServerMock(); |
| 3672 api.ProjectsInstancesDatabasesOperationsResourceApi res = new api.SpannerA
pi(mock).projects.instances.databases.operations; | 3672 api.ProjectsInstancesDatabasesOperationsResourceApi res = new api.SpannerA
pi(mock).projects.instances.databases.operations; |
| 3673 var arg_name = "foo"; | 3673 var arg_name = "foo"; |
| 3674 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 3674 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 3675 var path = (req.url).path; | 3675 var path = (req.url).path; |
| 3676 var pathOffset = 0; | 3676 var pathOffset = 0; |
| 3677 var index; | 3677 var index; |
| 3678 var subPart; | 3678 var subPart; |
| 3679 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 3679 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 3680 pathOffset += 1; | 3680 pathOffset += 1; |
| 3681 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); | 3681 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); |
| 3682 pathOffset += 3; | 3682 pathOffset += 3; |
| 3683 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; | 3683 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; |
| 3684 | 3684 |
| (...skipping 14 matching lines...) Expand all Loading... |
| 3699 } | 3699 } |
| 3700 } | 3700 } |
| 3701 | 3701 |
| 3702 | 3702 |
| 3703 var h = { | 3703 var h = { |
| 3704 "content-type" : "application/json; charset=utf-8", | 3704 "content-type" : "application/json; charset=utf-8", |
| 3705 }; | 3705 }; |
| 3706 var resp = convert.JSON.encode(buildOperation()); | 3706 var resp = convert.JSON.encode(buildOperation()); |
| 3707 return new async.Future.value(stringResponse(200, h, resp)); | 3707 return new async.Future.value(stringResponse(200, h, resp)); |
| 3708 }), true); | 3708 }), true); |
| 3709 res.get(arg_name).then(unittest.expectAsync(((api.Operation response) { | 3709 res.get(arg_name).then(unittest.expectAsync1(((api.Operation response) { |
| 3710 checkOperation(response); | 3710 checkOperation(response); |
| 3711 }))); | 3711 }))); |
| 3712 }); | 3712 }); |
| 3713 | 3713 |
| 3714 unittest.test("method--list", () { | 3714 unittest.test("method--list", () { |
| 3715 | 3715 |
| 3716 var mock = new HttpServerMock(); | 3716 var mock = new HttpServerMock(); |
| 3717 api.ProjectsInstancesDatabasesOperationsResourceApi res = new api.SpannerA
pi(mock).projects.instances.databases.operations; | 3717 api.ProjectsInstancesDatabasesOperationsResourceApi res = new api.SpannerA
pi(mock).projects.instances.databases.operations; |
| 3718 var arg_name = "foo"; | 3718 var arg_name = "foo"; |
| 3719 var arg_filter = "foo"; |
| 3719 var arg_pageToken = "foo"; | 3720 var arg_pageToken = "foo"; |
| 3720 var arg_pageSize = 42; | 3721 var arg_pageSize = 42; |
| 3721 var arg_filter = "foo"; | 3722 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 3722 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 3723 var path = (req.url).path; | 3723 var path = (req.url).path; |
| 3724 var pathOffset = 0; | 3724 var pathOffset = 0; |
| 3725 var index; | 3725 var index; |
| 3726 var subPart; | 3726 var subPart; |
| 3727 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 3727 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 3728 pathOffset += 1; | 3728 pathOffset += 1; |
| 3729 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); | 3729 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); |
| 3730 pathOffset += 3; | 3730 pathOffset += 3; |
| 3731 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; | 3731 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; |
| 3732 | 3732 |
| 3733 var query = (req.url).query; | 3733 var query = (req.url).query; |
| 3734 var queryOffset = 0; | 3734 var queryOffset = 0; |
| 3735 var queryMap = {}; | 3735 var queryMap = {}; |
| 3736 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 3736 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 3737 parseBool(n) { | 3737 parseBool(n) { |
| 3738 if (n == "true") return true; | 3738 if (n == "true") return true; |
| 3739 if (n == "false") return false; | 3739 if (n == "false") return false; |
| 3740 if (n == null) return null; | 3740 if (n == null) return null; |
| 3741 throw new core.ArgumentError("Invalid boolean: $n"); | 3741 throw new core.ArgumentError("Invalid boolean: $n"); |
| 3742 } | 3742 } |
| 3743 if (query.length > 0) { | 3743 if (query.length > 0) { |
| 3744 for (var part in query.split("&")) { | 3744 for (var part in query.split("&")) { |
| 3745 var keyvalue = part.split("="); | 3745 var keyvalue = part.split("="); |
| 3746 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 3746 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 3747 } | 3747 } |
| 3748 } | 3748 } |
| 3749 unittest.expect(queryMap["filter"].first, unittest.equals(arg_filter)); |
| 3749 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | 3750 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); |
| 3750 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ
als(arg_pageSize)); | 3751 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ
als(arg_pageSize)); |
| 3751 unittest.expect(queryMap["filter"].first, unittest.equals(arg_filter)); | |
| 3752 | 3752 |
| 3753 | 3753 |
| 3754 var h = { | 3754 var h = { |
| 3755 "content-type" : "application/json; charset=utf-8", | 3755 "content-type" : "application/json; charset=utf-8", |
| 3756 }; | 3756 }; |
| 3757 var resp = convert.JSON.encode(buildListOperationsResponse()); | 3757 var resp = convert.JSON.encode(buildListOperationsResponse()); |
| 3758 return new async.Future.value(stringResponse(200, h, resp)); | 3758 return new async.Future.value(stringResponse(200, h, resp)); |
| 3759 }), true); | 3759 }), true); |
| 3760 res.list(arg_name, pageToken: arg_pageToken, pageSize: arg_pageSize, filte
r: arg_filter).then(unittest.expectAsync(((api.ListOperationsResponse response)
{ | 3760 res.list(arg_name, filter: arg_filter, pageToken: arg_pageToken, pageSize:
arg_pageSize).then(unittest.expectAsync1(((api.ListOperationsResponse response)
{ |
| 3761 checkListOperationsResponse(response); | 3761 checkListOperationsResponse(response); |
| 3762 }))); | 3762 }))); |
| 3763 }); | 3763 }); |
| 3764 | 3764 |
| 3765 }); | 3765 }); |
| 3766 | 3766 |
| 3767 | 3767 |
| 3768 unittest.group("resource-ProjectsInstancesDatabasesSessionsResourceApi", () { | 3768 unittest.group("resource-ProjectsInstancesDatabasesSessionsResourceApi", () { |
| 3769 unittest.test("method--beginTransaction", () { | 3769 unittest.test("method--beginTransaction", () { |
| 3770 | 3770 |
| 3771 var mock = new HttpServerMock(); | 3771 var mock = new HttpServerMock(); |
| 3772 api.ProjectsInstancesDatabasesSessionsResourceApi res = new api.SpannerApi
(mock).projects.instances.databases.sessions; | 3772 api.ProjectsInstancesDatabasesSessionsResourceApi res = new api.SpannerApi
(mock).projects.instances.databases.sessions; |
| 3773 var arg_request = buildBeginTransactionRequest(); | 3773 var arg_request = buildBeginTransactionRequest(); |
| 3774 var arg_session = "foo"; | 3774 var arg_session = "foo"; |
| 3775 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 3775 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 3776 var obj = new api.BeginTransactionRequest.fromJson(json); | 3776 var obj = new api.BeginTransactionRequest.fromJson(json); |
| 3777 checkBeginTransactionRequest(obj); | 3777 checkBeginTransactionRequest(obj); |
| 3778 | 3778 |
| 3779 var path = (req.url).path; | 3779 var path = (req.url).path; |
| 3780 var pathOffset = 0; | 3780 var pathOffset = 0; |
| 3781 var index; | 3781 var index; |
| 3782 var subPart; | 3782 var subPart; |
| 3783 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 3783 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 3784 pathOffset += 1; | 3784 pathOffset += 1; |
| 3785 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); | 3785 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); |
| (...skipping 17 matching lines...) Expand all Loading... |
| 3803 } | 3803 } |
| 3804 } | 3804 } |
| 3805 | 3805 |
| 3806 | 3806 |
| 3807 var h = { | 3807 var h = { |
| 3808 "content-type" : "application/json; charset=utf-8", | 3808 "content-type" : "application/json; charset=utf-8", |
| 3809 }; | 3809 }; |
| 3810 var resp = convert.JSON.encode(buildTransaction()); | 3810 var resp = convert.JSON.encode(buildTransaction()); |
| 3811 return new async.Future.value(stringResponse(200, h, resp)); | 3811 return new async.Future.value(stringResponse(200, h, resp)); |
| 3812 }), true); | 3812 }), true); |
| 3813 res.beginTransaction(arg_request, arg_session).then(unittest.expectAsync((
(api.Transaction response) { | 3813 res.beginTransaction(arg_request, arg_session).then(unittest.expectAsync1(
((api.Transaction response) { |
| 3814 checkTransaction(response); | 3814 checkTransaction(response); |
| 3815 }))); | 3815 }))); |
| 3816 }); | 3816 }); |
| 3817 | 3817 |
| 3818 unittest.test("method--commit", () { | 3818 unittest.test("method--commit", () { |
| 3819 | 3819 |
| 3820 var mock = new HttpServerMock(); | 3820 var mock = new HttpServerMock(); |
| 3821 api.ProjectsInstancesDatabasesSessionsResourceApi res = new api.SpannerApi
(mock).projects.instances.databases.sessions; | 3821 api.ProjectsInstancesDatabasesSessionsResourceApi res = new api.SpannerApi
(mock).projects.instances.databases.sessions; |
| 3822 var arg_request = buildCommitRequest(); | 3822 var arg_request = buildCommitRequest(); |
| 3823 var arg_session = "foo"; | 3823 var arg_session = "foo"; |
| 3824 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 3824 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 3825 var obj = new api.CommitRequest.fromJson(json); | 3825 var obj = new api.CommitRequest.fromJson(json); |
| 3826 checkCommitRequest(obj); | 3826 checkCommitRequest(obj); |
| 3827 | 3827 |
| 3828 var path = (req.url).path; | 3828 var path = (req.url).path; |
| 3829 var pathOffset = 0; | 3829 var pathOffset = 0; |
| 3830 var index; | 3830 var index; |
| 3831 var subPart; | 3831 var subPart; |
| 3832 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 3832 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 3833 pathOffset += 1; | 3833 pathOffset += 1; |
| 3834 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); | 3834 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); |
| (...skipping 17 matching lines...) Expand all Loading... |
| 3852 } | 3852 } |
| 3853 } | 3853 } |
| 3854 | 3854 |
| 3855 | 3855 |
| 3856 var h = { | 3856 var h = { |
| 3857 "content-type" : "application/json; charset=utf-8", | 3857 "content-type" : "application/json; charset=utf-8", |
| 3858 }; | 3858 }; |
| 3859 var resp = convert.JSON.encode(buildCommitResponse()); | 3859 var resp = convert.JSON.encode(buildCommitResponse()); |
| 3860 return new async.Future.value(stringResponse(200, h, resp)); | 3860 return new async.Future.value(stringResponse(200, h, resp)); |
| 3861 }), true); | 3861 }), true); |
| 3862 res.commit(arg_request, arg_session).then(unittest.expectAsync(((api.Commi
tResponse response) { | 3862 res.commit(arg_request, arg_session).then(unittest.expectAsync1(((api.Comm
itResponse response) { |
| 3863 checkCommitResponse(response); | 3863 checkCommitResponse(response); |
| 3864 }))); | 3864 }))); |
| 3865 }); | 3865 }); |
| 3866 | 3866 |
| 3867 unittest.test("method--create", () { | 3867 unittest.test("method--create", () { |
| 3868 | 3868 |
| 3869 var mock = new HttpServerMock(); | 3869 var mock = new HttpServerMock(); |
| 3870 api.ProjectsInstancesDatabasesSessionsResourceApi res = new api.SpannerApi
(mock).projects.instances.databases.sessions; | 3870 api.ProjectsInstancesDatabasesSessionsResourceApi res = new api.SpannerApi
(mock).projects.instances.databases.sessions; |
| 3871 var arg_database = "foo"; | 3871 var arg_database = "foo"; |
| 3872 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 3872 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 3873 var path = (req.url).path; | 3873 var path = (req.url).path; |
| 3874 var pathOffset = 0; | 3874 var pathOffset = 0; |
| 3875 var index; | 3875 var index; |
| 3876 var subPart; | 3876 var subPart; |
| 3877 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 3877 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 3878 pathOffset += 1; | 3878 pathOffset += 1; |
| 3879 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); | 3879 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); |
| 3880 pathOffset += 3; | 3880 pathOffset += 3; |
| 3881 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; | 3881 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; |
| 3882 | 3882 |
| (...skipping 14 matching lines...) Expand all Loading... |
| 3897 } | 3897 } |
| 3898 } | 3898 } |
| 3899 | 3899 |
| 3900 | 3900 |
| 3901 var h = { | 3901 var h = { |
| 3902 "content-type" : "application/json; charset=utf-8", | 3902 "content-type" : "application/json; charset=utf-8", |
| 3903 }; | 3903 }; |
| 3904 var resp = convert.JSON.encode(buildSession()); | 3904 var resp = convert.JSON.encode(buildSession()); |
| 3905 return new async.Future.value(stringResponse(200, h, resp)); | 3905 return new async.Future.value(stringResponse(200, h, resp)); |
| 3906 }), true); | 3906 }), true); |
| 3907 res.create(arg_database).then(unittest.expectAsync(((api.Session response)
{ | 3907 res.create(arg_database).then(unittest.expectAsync1(((api.Session response
) { |
| 3908 checkSession(response); | 3908 checkSession(response); |
| 3909 }))); | 3909 }))); |
| 3910 }); | 3910 }); |
| 3911 | 3911 |
| 3912 unittest.test("method--delete", () { | 3912 unittest.test("method--delete", () { |
| 3913 | 3913 |
| 3914 var mock = new HttpServerMock(); | 3914 var mock = new HttpServerMock(); |
| 3915 api.ProjectsInstancesDatabasesSessionsResourceApi res = new api.SpannerApi
(mock).projects.instances.databases.sessions; | 3915 api.ProjectsInstancesDatabasesSessionsResourceApi res = new api.SpannerApi
(mock).projects.instances.databases.sessions; |
| 3916 var arg_name = "foo"; | 3916 var arg_name = "foo"; |
| 3917 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 3917 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 3918 var path = (req.url).path; | 3918 var path = (req.url).path; |
| 3919 var pathOffset = 0; | 3919 var pathOffset = 0; |
| 3920 var index; | 3920 var index; |
| 3921 var subPart; | 3921 var subPart; |
| 3922 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 3922 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 3923 pathOffset += 1; | 3923 pathOffset += 1; |
| 3924 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); | 3924 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); |
| 3925 pathOffset += 3; | 3925 pathOffset += 3; |
| 3926 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; | 3926 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; |
| 3927 | 3927 |
| (...skipping 14 matching lines...) Expand all Loading... |
| 3942 } | 3942 } |
| 3943 } | 3943 } |
| 3944 | 3944 |
| 3945 | 3945 |
| 3946 var h = { | 3946 var h = { |
| 3947 "content-type" : "application/json; charset=utf-8", | 3947 "content-type" : "application/json; charset=utf-8", |
| 3948 }; | 3948 }; |
| 3949 var resp = convert.JSON.encode(buildEmpty()); | 3949 var resp = convert.JSON.encode(buildEmpty()); |
| 3950 return new async.Future.value(stringResponse(200, h, resp)); | 3950 return new async.Future.value(stringResponse(200, h, resp)); |
| 3951 }), true); | 3951 }), true); |
| 3952 res.delete(arg_name).then(unittest.expectAsync(((api.Empty response) { | 3952 res.delete(arg_name).then(unittest.expectAsync1(((api.Empty response) { |
| 3953 checkEmpty(response); | 3953 checkEmpty(response); |
| 3954 }))); | 3954 }))); |
| 3955 }); | 3955 }); |
| 3956 | 3956 |
| 3957 unittest.test("method--executeSql", () { | 3957 unittest.test("method--executeSql", () { |
| 3958 | 3958 |
| 3959 var mock = new HttpServerMock(); | 3959 var mock = new HttpServerMock(); |
| 3960 api.ProjectsInstancesDatabasesSessionsResourceApi res = new api.SpannerApi
(mock).projects.instances.databases.sessions; | 3960 api.ProjectsInstancesDatabasesSessionsResourceApi res = new api.SpannerApi
(mock).projects.instances.databases.sessions; |
| 3961 var arg_request = buildExecuteSqlRequest(); | 3961 var arg_request = buildExecuteSqlRequest(); |
| 3962 var arg_session = "foo"; | 3962 var arg_session = "foo"; |
| 3963 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 3963 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 3964 var obj = new api.ExecuteSqlRequest.fromJson(json); | 3964 var obj = new api.ExecuteSqlRequest.fromJson(json); |
| 3965 checkExecuteSqlRequest(obj); | 3965 checkExecuteSqlRequest(obj); |
| 3966 | 3966 |
| 3967 var path = (req.url).path; | 3967 var path = (req.url).path; |
| 3968 var pathOffset = 0; | 3968 var pathOffset = 0; |
| 3969 var index; | 3969 var index; |
| 3970 var subPart; | 3970 var subPart; |
| 3971 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 3971 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 3972 pathOffset += 1; | 3972 pathOffset += 1; |
| 3973 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); | 3973 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); |
| (...skipping 17 matching lines...) Expand all Loading... |
| 3991 } | 3991 } |
| 3992 } | 3992 } |
| 3993 | 3993 |
| 3994 | 3994 |
| 3995 var h = { | 3995 var h = { |
| 3996 "content-type" : "application/json; charset=utf-8", | 3996 "content-type" : "application/json; charset=utf-8", |
| 3997 }; | 3997 }; |
| 3998 var resp = convert.JSON.encode(buildResultSet()); | 3998 var resp = convert.JSON.encode(buildResultSet()); |
| 3999 return new async.Future.value(stringResponse(200, h, resp)); | 3999 return new async.Future.value(stringResponse(200, h, resp)); |
| 4000 }), true); | 4000 }), true); |
| 4001 res.executeSql(arg_request, arg_session).then(unittest.expectAsync(((api.R
esultSet response) { | 4001 res.executeSql(arg_request, arg_session).then(unittest.expectAsync1(((api.
ResultSet response) { |
| 4002 checkResultSet(response); | 4002 checkResultSet(response); |
| 4003 }))); | 4003 }))); |
| 4004 }); | 4004 }); |
| 4005 | 4005 |
| 4006 unittest.test("method--executeStreamingSql", () { | 4006 unittest.test("method--executeStreamingSql", () { |
| 4007 | 4007 |
| 4008 var mock = new HttpServerMock(); | 4008 var mock = new HttpServerMock(); |
| 4009 api.ProjectsInstancesDatabasesSessionsResourceApi res = new api.SpannerApi
(mock).projects.instances.databases.sessions; | 4009 api.ProjectsInstancesDatabasesSessionsResourceApi res = new api.SpannerApi
(mock).projects.instances.databases.sessions; |
| 4010 var arg_request = buildExecuteSqlRequest(); | 4010 var arg_request = buildExecuteSqlRequest(); |
| 4011 var arg_session = "foo"; | 4011 var arg_session = "foo"; |
| 4012 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 4012 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 4013 var obj = new api.ExecuteSqlRequest.fromJson(json); | 4013 var obj = new api.ExecuteSqlRequest.fromJson(json); |
| 4014 checkExecuteSqlRequest(obj); | 4014 checkExecuteSqlRequest(obj); |
| 4015 | 4015 |
| 4016 var path = (req.url).path; | 4016 var path = (req.url).path; |
| 4017 var pathOffset = 0; | 4017 var pathOffset = 0; |
| 4018 var index; | 4018 var index; |
| 4019 var subPart; | 4019 var subPart; |
| 4020 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 4020 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 4021 pathOffset += 1; | 4021 pathOffset += 1; |
| 4022 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); | 4022 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); |
| (...skipping 17 matching lines...) Expand all Loading... |
| 4040 } | 4040 } |
| 4041 } | 4041 } |
| 4042 | 4042 |
| 4043 | 4043 |
| 4044 var h = { | 4044 var h = { |
| 4045 "content-type" : "application/json; charset=utf-8", | 4045 "content-type" : "application/json; charset=utf-8", |
| 4046 }; | 4046 }; |
| 4047 var resp = convert.JSON.encode(buildPartialResultSet()); | 4047 var resp = convert.JSON.encode(buildPartialResultSet()); |
| 4048 return new async.Future.value(stringResponse(200, h, resp)); | 4048 return new async.Future.value(stringResponse(200, h, resp)); |
| 4049 }), true); | 4049 }), true); |
| 4050 res.executeStreamingSql(arg_request, arg_session).then(unittest.expectAsyn
c(((api.PartialResultSet response) { | 4050 res.executeStreamingSql(arg_request, arg_session).then(unittest.expectAsyn
c1(((api.PartialResultSet response) { |
| 4051 checkPartialResultSet(response); | 4051 checkPartialResultSet(response); |
| 4052 }))); | 4052 }))); |
| 4053 }); | 4053 }); |
| 4054 | 4054 |
| 4055 unittest.test("method--get", () { | 4055 unittest.test("method--get", () { |
| 4056 | 4056 |
| 4057 var mock = new HttpServerMock(); | 4057 var mock = new HttpServerMock(); |
| 4058 api.ProjectsInstancesDatabasesSessionsResourceApi res = new api.SpannerApi
(mock).projects.instances.databases.sessions; | 4058 api.ProjectsInstancesDatabasesSessionsResourceApi res = new api.SpannerApi
(mock).projects.instances.databases.sessions; |
| 4059 var arg_name = "foo"; | 4059 var arg_name = "foo"; |
| 4060 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 4060 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 4061 var path = (req.url).path; | 4061 var path = (req.url).path; |
| 4062 var pathOffset = 0; | 4062 var pathOffset = 0; |
| 4063 var index; | 4063 var index; |
| 4064 var subPart; | 4064 var subPart; |
| 4065 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 4065 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 4066 pathOffset += 1; | 4066 pathOffset += 1; |
| 4067 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); | 4067 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); |
| 4068 pathOffset += 3; | 4068 pathOffset += 3; |
| 4069 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; | 4069 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; |
| 4070 | 4070 |
| (...skipping 14 matching lines...) Expand all Loading... |
| 4085 } | 4085 } |
| 4086 } | 4086 } |
| 4087 | 4087 |
| 4088 | 4088 |
| 4089 var h = { | 4089 var h = { |
| 4090 "content-type" : "application/json; charset=utf-8", | 4090 "content-type" : "application/json; charset=utf-8", |
| 4091 }; | 4091 }; |
| 4092 var resp = convert.JSON.encode(buildSession()); | 4092 var resp = convert.JSON.encode(buildSession()); |
| 4093 return new async.Future.value(stringResponse(200, h, resp)); | 4093 return new async.Future.value(stringResponse(200, h, resp)); |
| 4094 }), true); | 4094 }), true); |
| 4095 res.get(arg_name).then(unittest.expectAsync(((api.Session response) { | 4095 res.get(arg_name).then(unittest.expectAsync1(((api.Session response) { |
| 4096 checkSession(response); | 4096 checkSession(response); |
| 4097 }))); | 4097 }))); |
| 4098 }); | 4098 }); |
| 4099 | 4099 |
| 4100 unittest.test("method--read", () { | 4100 unittest.test("method--read", () { |
| 4101 | 4101 |
| 4102 var mock = new HttpServerMock(); | 4102 var mock = new HttpServerMock(); |
| 4103 api.ProjectsInstancesDatabasesSessionsResourceApi res = new api.SpannerApi
(mock).projects.instances.databases.sessions; | 4103 api.ProjectsInstancesDatabasesSessionsResourceApi res = new api.SpannerApi
(mock).projects.instances.databases.sessions; |
| 4104 var arg_request = buildReadRequest(); | 4104 var arg_request = buildReadRequest(); |
| 4105 var arg_session = "foo"; | 4105 var arg_session = "foo"; |
| 4106 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 4106 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 4107 var obj = new api.ReadRequest.fromJson(json); | 4107 var obj = new api.ReadRequest.fromJson(json); |
| 4108 checkReadRequest(obj); | 4108 checkReadRequest(obj); |
| 4109 | 4109 |
| 4110 var path = (req.url).path; | 4110 var path = (req.url).path; |
| 4111 var pathOffset = 0; | 4111 var pathOffset = 0; |
| 4112 var index; | 4112 var index; |
| 4113 var subPart; | 4113 var subPart; |
| 4114 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 4114 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 4115 pathOffset += 1; | 4115 pathOffset += 1; |
| 4116 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); | 4116 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); |
| (...skipping 17 matching lines...) Expand all Loading... |
| 4134 } | 4134 } |
| 4135 } | 4135 } |
| 4136 | 4136 |
| 4137 | 4137 |
| 4138 var h = { | 4138 var h = { |
| 4139 "content-type" : "application/json; charset=utf-8", | 4139 "content-type" : "application/json; charset=utf-8", |
| 4140 }; | 4140 }; |
| 4141 var resp = convert.JSON.encode(buildResultSet()); | 4141 var resp = convert.JSON.encode(buildResultSet()); |
| 4142 return new async.Future.value(stringResponse(200, h, resp)); | 4142 return new async.Future.value(stringResponse(200, h, resp)); |
| 4143 }), true); | 4143 }), true); |
| 4144 res.read(arg_request, arg_session).then(unittest.expectAsync(((api.ResultS
et response) { | 4144 res.read(arg_request, arg_session).then(unittest.expectAsync1(((api.Result
Set response) { |
| 4145 checkResultSet(response); | 4145 checkResultSet(response); |
| 4146 }))); | 4146 }))); |
| 4147 }); | 4147 }); |
| 4148 | 4148 |
| 4149 unittest.test("method--rollback", () { | 4149 unittest.test("method--rollback", () { |
| 4150 | 4150 |
| 4151 var mock = new HttpServerMock(); | 4151 var mock = new HttpServerMock(); |
| 4152 api.ProjectsInstancesDatabasesSessionsResourceApi res = new api.SpannerApi
(mock).projects.instances.databases.sessions; | 4152 api.ProjectsInstancesDatabasesSessionsResourceApi res = new api.SpannerApi
(mock).projects.instances.databases.sessions; |
| 4153 var arg_request = buildRollbackRequest(); | 4153 var arg_request = buildRollbackRequest(); |
| 4154 var arg_session = "foo"; | 4154 var arg_session = "foo"; |
| 4155 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 4155 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 4156 var obj = new api.RollbackRequest.fromJson(json); | 4156 var obj = new api.RollbackRequest.fromJson(json); |
| 4157 checkRollbackRequest(obj); | 4157 checkRollbackRequest(obj); |
| 4158 | 4158 |
| 4159 var path = (req.url).path; | 4159 var path = (req.url).path; |
| 4160 var pathOffset = 0; | 4160 var pathOffset = 0; |
| 4161 var index; | 4161 var index; |
| 4162 var subPart; | 4162 var subPart; |
| 4163 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 4163 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 4164 pathOffset += 1; | 4164 pathOffset += 1; |
| 4165 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); | 4165 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); |
| (...skipping 17 matching lines...) Expand all Loading... |
| 4183 } | 4183 } |
| 4184 } | 4184 } |
| 4185 | 4185 |
| 4186 | 4186 |
| 4187 var h = { | 4187 var h = { |
| 4188 "content-type" : "application/json; charset=utf-8", | 4188 "content-type" : "application/json; charset=utf-8", |
| 4189 }; | 4189 }; |
| 4190 var resp = convert.JSON.encode(buildEmpty()); | 4190 var resp = convert.JSON.encode(buildEmpty()); |
| 4191 return new async.Future.value(stringResponse(200, h, resp)); | 4191 return new async.Future.value(stringResponse(200, h, resp)); |
| 4192 }), true); | 4192 }), true); |
| 4193 res.rollback(arg_request, arg_session).then(unittest.expectAsync(((api.Emp
ty response) { | 4193 res.rollback(arg_request, arg_session).then(unittest.expectAsync1(((api.Em
pty response) { |
| 4194 checkEmpty(response); | 4194 checkEmpty(response); |
| 4195 }))); | 4195 }))); |
| 4196 }); | 4196 }); |
| 4197 | 4197 |
| 4198 unittest.test("method--streamingRead", () { | 4198 unittest.test("method--streamingRead", () { |
| 4199 | 4199 |
| 4200 var mock = new HttpServerMock(); | 4200 var mock = new HttpServerMock(); |
| 4201 api.ProjectsInstancesDatabasesSessionsResourceApi res = new api.SpannerApi
(mock).projects.instances.databases.sessions; | 4201 api.ProjectsInstancesDatabasesSessionsResourceApi res = new api.SpannerApi
(mock).projects.instances.databases.sessions; |
| 4202 var arg_request = buildReadRequest(); | 4202 var arg_request = buildReadRequest(); |
| 4203 var arg_session = "foo"; | 4203 var arg_session = "foo"; |
| 4204 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 4204 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 4205 var obj = new api.ReadRequest.fromJson(json); | 4205 var obj = new api.ReadRequest.fromJson(json); |
| 4206 checkReadRequest(obj); | 4206 checkReadRequest(obj); |
| 4207 | 4207 |
| 4208 var path = (req.url).path; | 4208 var path = (req.url).path; |
| 4209 var pathOffset = 0; | 4209 var pathOffset = 0; |
| 4210 var index; | 4210 var index; |
| 4211 var subPart; | 4211 var subPart; |
| 4212 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 4212 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 4213 pathOffset += 1; | 4213 pathOffset += 1; |
| 4214 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); | 4214 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); |
| (...skipping 17 matching lines...) Expand all Loading... |
| 4232 } | 4232 } |
| 4233 } | 4233 } |
| 4234 | 4234 |
| 4235 | 4235 |
| 4236 var h = { | 4236 var h = { |
| 4237 "content-type" : "application/json; charset=utf-8", | 4237 "content-type" : "application/json; charset=utf-8", |
| 4238 }; | 4238 }; |
| 4239 var resp = convert.JSON.encode(buildPartialResultSet()); | 4239 var resp = convert.JSON.encode(buildPartialResultSet()); |
| 4240 return new async.Future.value(stringResponse(200, h, resp)); | 4240 return new async.Future.value(stringResponse(200, h, resp)); |
| 4241 }), true); | 4241 }), true); |
| 4242 res.streamingRead(arg_request, arg_session).then(unittest.expectAsync(((ap
i.PartialResultSet response) { | 4242 res.streamingRead(arg_request, arg_session).then(unittest.expectAsync1(((a
pi.PartialResultSet response) { |
| 4243 checkPartialResultSet(response); | 4243 checkPartialResultSet(response); |
| 4244 }))); | 4244 }))); |
| 4245 }); | 4245 }); |
| 4246 | 4246 |
| 4247 }); | 4247 }); |
| 4248 | 4248 |
| 4249 | 4249 |
| 4250 unittest.group("resource-ProjectsInstancesOperationsResourceApi", () { | 4250 unittest.group("resource-ProjectsInstancesOperationsResourceApi", () { |
| 4251 unittest.test("method--cancel", () { | 4251 unittest.test("method--cancel", () { |
| 4252 | 4252 |
| 4253 var mock = new HttpServerMock(); | 4253 var mock = new HttpServerMock(); |
| 4254 api.ProjectsInstancesOperationsResourceApi res = new api.SpannerApi(mock).
projects.instances.operations; | 4254 api.ProjectsInstancesOperationsResourceApi res = new api.SpannerApi(mock).
projects.instances.operations; |
| 4255 var arg_name = "foo"; | 4255 var arg_name = "foo"; |
| 4256 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 4256 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 4257 var path = (req.url).path; | 4257 var path = (req.url).path; |
| 4258 var pathOffset = 0; | 4258 var pathOffset = 0; |
| 4259 var index; | 4259 var index; |
| 4260 var subPart; | 4260 var subPart; |
| 4261 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 4261 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 4262 pathOffset += 1; | 4262 pathOffset += 1; |
| 4263 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); | 4263 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); |
| 4264 pathOffset += 3; | 4264 pathOffset += 3; |
| 4265 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; | 4265 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; |
| 4266 | 4266 |
| (...skipping 14 matching lines...) Expand all Loading... |
| 4281 } | 4281 } |
| 4282 } | 4282 } |
| 4283 | 4283 |
| 4284 | 4284 |
| 4285 var h = { | 4285 var h = { |
| 4286 "content-type" : "application/json; charset=utf-8", | 4286 "content-type" : "application/json; charset=utf-8", |
| 4287 }; | 4287 }; |
| 4288 var resp = convert.JSON.encode(buildEmpty()); | 4288 var resp = convert.JSON.encode(buildEmpty()); |
| 4289 return new async.Future.value(stringResponse(200, h, resp)); | 4289 return new async.Future.value(stringResponse(200, h, resp)); |
| 4290 }), true); | 4290 }), true); |
| 4291 res.cancel(arg_name).then(unittest.expectAsync(((api.Empty response) { | 4291 res.cancel(arg_name).then(unittest.expectAsync1(((api.Empty response) { |
| 4292 checkEmpty(response); | 4292 checkEmpty(response); |
| 4293 }))); | 4293 }))); |
| 4294 }); | 4294 }); |
| 4295 | 4295 |
| 4296 unittest.test("method--delete", () { | 4296 unittest.test("method--delete", () { |
| 4297 | 4297 |
| 4298 var mock = new HttpServerMock(); | 4298 var mock = new HttpServerMock(); |
| 4299 api.ProjectsInstancesOperationsResourceApi res = new api.SpannerApi(mock).
projects.instances.operations; | 4299 api.ProjectsInstancesOperationsResourceApi res = new api.SpannerApi(mock).
projects.instances.operations; |
| 4300 var arg_name = "foo"; | 4300 var arg_name = "foo"; |
| 4301 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 4301 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 4302 var path = (req.url).path; | 4302 var path = (req.url).path; |
| 4303 var pathOffset = 0; | 4303 var pathOffset = 0; |
| 4304 var index; | 4304 var index; |
| 4305 var subPart; | 4305 var subPart; |
| 4306 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 4306 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 4307 pathOffset += 1; | 4307 pathOffset += 1; |
| 4308 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); | 4308 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); |
| 4309 pathOffset += 3; | 4309 pathOffset += 3; |
| 4310 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; | 4310 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; |
| 4311 | 4311 |
| (...skipping 14 matching lines...) Expand all Loading... |
| 4326 } | 4326 } |
| 4327 } | 4327 } |
| 4328 | 4328 |
| 4329 | 4329 |
| 4330 var h = { | 4330 var h = { |
| 4331 "content-type" : "application/json; charset=utf-8", | 4331 "content-type" : "application/json; charset=utf-8", |
| 4332 }; | 4332 }; |
| 4333 var resp = convert.JSON.encode(buildEmpty()); | 4333 var resp = convert.JSON.encode(buildEmpty()); |
| 4334 return new async.Future.value(stringResponse(200, h, resp)); | 4334 return new async.Future.value(stringResponse(200, h, resp)); |
| 4335 }), true); | 4335 }), true); |
| 4336 res.delete(arg_name).then(unittest.expectAsync(((api.Empty response) { | 4336 res.delete(arg_name).then(unittest.expectAsync1(((api.Empty response) { |
| 4337 checkEmpty(response); | 4337 checkEmpty(response); |
| 4338 }))); | 4338 }))); |
| 4339 }); | 4339 }); |
| 4340 | 4340 |
| 4341 unittest.test("method--get", () { | 4341 unittest.test("method--get", () { |
| 4342 | 4342 |
| 4343 var mock = new HttpServerMock(); | 4343 var mock = new HttpServerMock(); |
| 4344 api.ProjectsInstancesOperationsResourceApi res = new api.SpannerApi(mock).
projects.instances.operations; | 4344 api.ProjectsInstancesOperationsResourceApi res = new api.SpannerApi(mock).
projects.instances.operations; |
| 4345 var arg_name = "foo"; | 4345 var arg_name = "foo"; |
| 4346 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 4346 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 4347 var path = (req.url).path; | 4347 var path = (req.url).path; |
| 4348 var pathOffset = 0; | 4348 var pathOffset = 0; |
| 4349 var index; | 4349 var index; |
| 4350 var subPart; | 4350 var subPart; |
| 4351 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 4351 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 4352 pathOffset += 1; | 4352 pathOffset += 1; |
| 4353 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); | 4353 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); |
| 4354 pathOffset += 3; | 4354 pathOffset += 3; |
| 4355 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; | 4355 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; |
| 4356 | 4356 |
| (...skipping 14 matching lines...) Expand all Loading... |
| 4371 } | 4371 } |
| 4372 } | 4372 } |
| 4373 | 4373 |
| 4374 | 4374 |
| 4375 var h = { | 4375 var h = { |
| 4376 "content-type" : "application/json; charset=utf-8", | 4376 "content-type" : "application/json; charset=utf-8", |
| 4377 }; | 4377 }; |
| 4378 var resp = convert.JSON.encode(buildOperation()); | 4378 var resp = convert.JSON.encode(buildOperation()); |
| 4379 return new async.Future.value(stringResponse(200, h, resp)); | 4379 return new async.Future.value(stringResponse(200, h, resp)); |
| 4380 }), true); | 4380 }), true); |
| 4381 res.get(arg_name).then(unittest.expectAsync(((api.Operation response) { | 4381 res.get(arg_name).then(unittest.expectAsync1(((api.Operation response) { |
| 4382 checkOperation(response); | 4382 checkOperation(response); |
| 4383 }))); | 4383 }))); |
| 4384 }); | 4384 }); |
| 4385 | 4385 |
| 4386 unittest.test("method--list", () { | 4386 unittest.test("method--list", () { |
| 4387 | 4387 |
| 4388 var mock = new HttpServerMock(); | 4388 var mock = new HttpServerMock(); |
| 4389 api.ProjectsInstancesOperationsResourceApi res = new api.SpannerApi(mock).
projects.instances.operations; | 4389 api.ProjectsInstancesOperationsResourceApi res = new api.SpannerApi(mock).
projects.instances.operations; |
| 4390 var arg_name = "foo"; | 4390 var arg_name = "foo"; |
| 4391 var arg_pageSize = 42; |
| 4391 var arg_filter = "foo"; | 4392 var arg_filter = "foo"; |
| 4392 var arg_pageToken = "foo"; | 4393 var arg_pageToken = "foo"; |
| 4393 var arg_pageSize = 42; | 4394 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 4394 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 4395 var path = (req.url).path; | 4395 var path = (req.url).path; |
| 4396 var pathOffset = 0; | 4396 var pathOffset = 0; |
| 4397 var index; | 4397 var index; |
| 4398 var subPart; | 4398 var subPart; |
| 4399 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 4399 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 4400 pathOffset += 1; | 4400 pathOffset += 1; |
| 4401 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); | 4401 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); |
| 4402 pathOffset += 3; | 4402 pathOffset += 3; |
| 4403 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; | 4403 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; |
| 4404 | 4404 |
| 4405 var query = (req.url).query; | 4405 var query = (req.url).query; |
| 4406 var queryOffset = 0; | 4406 var queryOffset = 0; |
| 4407 var queryMap = {}; | 4407 var queryMap = {}; |
| 4408 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 4408 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 4409 parseBool(n) { | 4409 parseBool(n) { |
| 4410 if (n == "true") return true; | 4410 if (n == "true") return true; |
| 4411 if (n == "false") return false; | 4411 if (n == "false") return false; |
| 4412 if (n == null) return null; | 4412 if (n == null) return null; |
| 4413 throw new core.ArgumentError("Invalid boolean: $n"); | 4413 throw new core.ArgumentError("Invalid boolean: $n"); |
| 4414 } | 4414 } |
| 4415 if (query.length > 0) { | 4415 if (query.length > 0) { |
| 4416 for (var part in query.split("&")) { | 4416 for (var part in query.split("&")) { |
| 4417 var keyvalue = part.split("="); | 4417 var keyvalue = part.split("="); |
| 4418 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 4418 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 4419 } | 4419 } |
| 4420 } | 4420 } |
| 4421 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ
als(arg_pageSize)); |
| 4421 unittest.expect(queryMap["filter"].first, unittest.equals(arg_filter)); | 4422 unittest.expect(queryMap["filter"].first, unittest.equals(arg_filter)); |
| 4422 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | 4423 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); |
| 4423 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ
als(arg_pageSize)); | |
| 4424 | 4424 |
| 4425 | 4425 |
| 4426 var h = { | 4426 var h = { |
| 4427 "content-type" : "application/json; charset=utf-8", | 4427 "content-type" : "application/json; charset=utf-8", |
| 4428 }; | 4428 }; |
| 4429 var resp = convert.JSON.encode(buildListOperationsResponse()); | 4429 var resp = convert.JSON.encode(buildListOperationsResponse()); |
| 4430 return new async.Future.value(stringResponse(200, h, resp)); | 4430 return new async.Future.value(stringResponse(200, h, resp)); |
| 4431 }), true); | 4431 }), true); |
| 4432 res.list(arg_name, filter: arg_filter, pageToken: arg_pageToken, pageSize:
arg_pageSize).then(unittest.expectAsync(((api.ListOperationsResponse response)
{ | 4432 res.list(arg_name, pageSize: arg_pageSize, filter: arg_filter, pageToken:
arg_pageToken).then(unittest.expectAsync1(((api.ListOperationsResponse response)
{ |
| 4433 checkListOperationsResponse(response); | 4433 checkListOperationsResponse(response); |
| 4434 }))); | 4434 }))); |
| 4435 }); | 4435 }); |
| 4436 | 4436 |
| 4437 }); | 4437 }); |
| 4438 | 4438 |
| 4439 | 4439 |
| 4440 } | 4440 } |
| 4441 | 4441 |
| OLD | NEW |