OLD | NEW |
1 library googleapis.storage.v1.test; | 1 library googleapis.storage.v1.test; |
2 | 2 |
3 import "dart:core" as core; | 3 import "dart:core" as core; |
4 import "dart:collection" as collection; | 4 import "dart:collection" as collection; |
5 import "dart:async" as async; | 5 import "dart:async" as async; |
6 import "dart:convert" as convert; | 6 import "dart:convert" as convert; |
7 | 7 |
8 import 'package:http/http.dart' as http; | 8 import 'package:http/http.dart' as http; |
9 import 'package:http/testing.dart' as http_testing; | 9 import 'package:http/testing.dart' as http_testing; |
10 import 'package:unittest/unittest.dart' as unittest; | 10 import 'package:unittest/unittest.dart' as unittest; |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 headers, core.String body) { |
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 buildUnnamed748() { | 54 buildUnnamed769() { |
55 var o = new core.List<api.BucketAccessControl>(); | 55 var o = new core.List<api.BucketAccessControl>(); |
56 o.add(buildBucketAccessControl()); | 56 o.add(buildBucketAccessControl()); |
57 o.add(buildBucketAccessControl()); | 57 o.add(buildBucketAccessControl()); |
58 return o; | 58 return o; |
59 } | 59 } |
60 | 60 |
61 checkUnnamed748(core.List<api.BucketAccessControl> o) { | 61 checkUnnamed769(core.List<api.BucketAccessControl> o) { |
62 unittest.expect(o, unittest.hasLength(2)); | 62 unittest.expect(o, unittest.hasLength(2)); |
63 checkBucketAccessControl(o[0]); | 63 checkBucketAccessControl(o[0]); |
64 checkBucketAccessControl(o[1]); | 64 checkBucketAccessControl(o[1]); |
65 } | 65 } |
66 | 66 |
67 buildUnnamed749() { | 67 buildUnnamed770() { |
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 checkUnnamed749(core.List<core.String> o) { | 74 checkUnnamed770(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 buildUnnamed750() { | 80 buildUnnamed771() { |
81 var o = new core.List<core.String>(); | 81 var o = new core.List<core.String>(); |
82 o.add("foo"); | 82 o.add("foo"); |
83 o.add("foo"); | 83 o.add("foo"); |
84 return o; | 84 return o; |
85 } | 85 } |
86 | 86 |
87 checkUnnamed750(core.List<core.String> o) { | 87 checkUnnamed771(core.List<core.String> o) { |
88 unittest.expect(o, unittest.hasLength(2)); | 88 unittest.expect(o, unittest.hasLength(2)); |
89 unittest.expect(o[0], unittest.equals('foo')); | 89 unittest.expect(o[0], unittest.equals('foo')); |
90 unittest.expect(o[1], unittest.equals('foo')); | 90 unittest.expect(o[1], unittest.equals('foo')); |
91 } | 91 } |
92 | 92 |
93 buildUnnamed751() { | 93 buildUnnamed772() { |
94 var o = new core.List<core.String>(); | 94 var o = new core.List<core.String>(); |
95 o.add("foo"); | 95 o.add("foo"); |
96 o.add("foo"); | 96 o.add("foo"); |
97 return o; | 97 return o; |
98 } | 98 } |
99 | 99 |
100 checkUnnamed751(core.List<core.String> o) { | 100 checkUnnamed772(core.List<core.String> o) { |
101 unittest.expect(o, unittest.hasLength(2)); | 101 unittest.expect(o, unittest.hasLength(2)); |
102 unittest.expect(o[0], unittest.equals('foo')); | 102 unittest.expect(o[0], unittest.equals('foo')); |
103 unittest.expect(o[1], unittest.equals('foo')); | 103 unittest.expect(o[1], unittest.equals('foo')); |
104 } | 104 } |
105 | 105 |
106 core.int buildCounterBucketCors = 0; | 106 core.int buildCounterBucketCors = 0; |
107 buildBucketCors() { | 107 buildBucketCors() { |
108 var o = new api.BucketCors(); | 108 var o = new api.BucketCors(); |
109 buildCounterBucketCors++; | 109 buildCounterBucketCors++; |
110 if (buildCounterBucketCors < 3) { | 110 if (buildCounterBucketCors < 3) { |
111 o.maxAgeSeconds = 42; | 111 o.maxAgeSeconds = 42; |
112 o.method = buildUnnamed749(); | 112 o.method = buildUnnamed770(); |
113 o.origin = buildUnnamed750(); | 113 o.origin = buildUnnamed771(); |
114 o.responseHeader = buildUnnamed751(); | 114 o.responseHeader = buildUnnamed772(); |
115 } | 115 } |
116 buildCounterBucketCors--; | 116 buildCounterBucketCors--; |
117 return o; | 117 return o; |
118 } | 118 } |
119 | 119 |
120 checkBucketCors(api.BucketCors o) { | 120 checkBucketCors(api.BucketCors o) { |
121 buildCounterBucketCors++; | 121 buildCounterBucketCors++; |
122 if (buildCounterBucketCors < 3) { | 122 if (buildCounterBucketCors < 3) { |
123 unittest.expect(o.maxAgeSeconds, unittest.equals(42)); | 123 unittest.expect(o.maxAgeSeconds, unittest.equals(42)); |
124 checkUnnamed749(o.method); | 124 checkUnnamed770(o.method); |
125 checkUnnamed750(o.origin); | 125 checkUnnamed771(o.origin); |
126 checkUnnamed751(o.responseHeader); | 126 checkUnnamed772(o.responseHeader); |
127 } | 127 } |
128 buildCounterBucketCors--; | 128 buildCounterBucketCors--; |
129 } | 129 } |
130 | 130 |
131 buildUnnamed752() { | 131 buildUnnamed773() { |
132 var o = new core.List<api.BucketCors>(); | 132 var o = new core.List<api.BucketCors>(); |
133 o.add(buildBucketCors()); | 133 o.add(buildBucketCors()); |
134 o.add(buildBucketCors()); | 134 o.add(buildBucketCors()); |
135 return o; | 135 return o; |
136 } | 136 } |
137 | 137 |
138 checkUnnamed752(core.List<api.BucketCors> o) { | 138 checkUnnamed773(core.List<api.BucketCors> o) { |
139 unittest.expect(o, unittest.hasLength(2)); | 139 unittest.expect(o, unittest.hasLength(2)); |
140 checkBucketCors(o[0]); | 140 checkBucketCors(o[0]); |
141 checkBucketCors(o[1]); | 141 checkBucketCors(o[1]); |
142 } | 142 } |
143 | 143 |
144 buildUnnamed753() { | 144 buildUnnamed774() { |
145 var o = new core.List<api.ObjectAccessControl>(); | 145 var o = new core.List<api.ObjectAccessControl>(); |
146 o.add(buildObjectAccessControl()); | 146 o.add(buildObjectAccessControl()); |
147 o.add(buildObjectAccessControl()); | 147 o.add(buildObjectAccessControl()); |
148 return o; | 148 return o; |
149 } | 149 } |
150 | 150 |
151 checkUnnamed753(core.List<api.ObjectAccessControl> o) { | 151 checkUnnamed774(core.List<api.ObjectAccessControl> o) { |
152 unittest.expect(o, unittest.hasLength(2)); | 152 unittest.expect(o, unittest.hasLength(2)); |
153 checkObjectAccessControl(o[0]); | 153 checkObjectAccessControl(o[0]); |
154 checkObjectAccessControl(o[1]); | 154 checkObjectAccessControl(o[1]); |
155 } | 155 } |
156 | 156 |
157 core.int buildCounterBucketLifecycleRuleAction = 0; | 157 core.int buildCounterBucketLifecycleRuleAction = 0; |
158 buildBucketLifecycleRuleAction() { | 158 buildBucketLifecycleRuleAction() { |
159 var o = new api.BucketLifecycleRuleAction(); | 159 var o = new api.BucketLifecycleRuleAction(); |
160 buildCounterBucketLifecycleRuleAction++; | 160 buildCounterBucketLifecycleRuleAction++; |
161 if (buildCounterBucketLifecycleRuleAction < 3) { | 161 if (buildCounterBucketLifecycleRuleAction < 3) { |
162 o.storageClass = "foo"; | 162 o.storageClass = "foo"; |
163 o.type = "foo"; | 163 o.type = "foo"; |
164 } | 164 } |
165 buildCounterBucketLifecycleRuleAction--; | 165 buildCounterBucketLifecycleRuleAction--; |
166 return o; | 166 return o; |
167 } | 167 } |
168 | 168 |
169 checkBucketLifecycleRuleAction(api.BucketLifecycleRuleAction o) { | 169 checkBucketLifecycleRuleAction(api.BucketLifecycleRuleAction o) { |
170 buildCounterBucketLifecycleRuleAction++; | 170 buildCounterBucketLifecycleRuleAction++; |
171 if (buildCounterBucketLifecycleRuleAction < 3) { | 171 if (buildCounterBucketLifecycleRuleAction < 3) { |
172 unittest.expect(o.storageClass, unittest.equals('foo')); | 172 unittest.expect(o.storageClass, unittest.equals('foo')); |
173 unittest.expect(o.type, unittest.equals('foo')); | 173 unittest.expect(o.type, unittest.equals('foo')); |
174 } | 174 } |
175 buildCounterBucketLifecycleRuleAction--; | 175 buildCounterBucketLifecycleRuleAction--; |
176 } | 176 } |
177 | 177 |
178 buildUnnamed754() { | 178 buildUnnamed775() { |
179 var o = new core.List<core.String>(); | 179 var o = new core.List<core.String>(); |
180 o.add("foo"); | 180 o.add("foo"); |
181 o.add("foo"); | 181 o.add("foo"); |
182 return o; | 182 return o; |
183 } | 183 } |
184 | 184 |
185 checkUnnamed754(core.List<core.String> o) { | 185 checkUnnamed775(core.List<core.String> o) { |
186 unittest.expect(o, unittest.hasLength(2)); | 186 unittest.expect(o, unittest.hasLength(2)); |
187 unittest.expect(o[0], unittest.equals('foo')); | 187 unittest.expect(o[0], unittest.equals('foo')); |
188 unittest.expect(o[1], unittest.equals('foo')); | 188 unittest.expect(o[1], unittest.equals('foo')); |
189 } | 189 } |
190 | 190 |
191 core.int buildCounterBucketLifecycleRuleCondition = 0; | 191 core.int buildCounterBucketLifecycleRuleCondition = 0; |
192 buildBucketLifecycleRuleCondition() { | 192 buildBucketLifecycleRuleCondition() { |
193 var o = new api.BucketLifecycleRuleCondition(); | 193 var o = new api.BucketLifecycleRuleCondition(); |
194 buildCounterBucketLifecycleRuleCondition++; | 194 buildCounterBucketLifecycleRuleCondition++; |
195 if (buildCounterBucketLifecycleRuleCondition < 3) { | 195 if (buildCounterBucketLifecycleRuleCondition < 3) { |
196 o.age = 42; | 196 o.age = 42; |
197 o.createdBefore = core.DateTime.parse("2002-02-27T14:01:02Z"); | 197 o.createdBefore = core.DateTime.parse("2002-02-27T14:01:02Z"); |
198 o.isLive = true; | 198 o.isLive = true; |
199 o.matchesStorageClass = buildUnnamed754(); | 199 o.matchesStorageClass = buildUnnamed775(); |
200 o.numNewerVersions = 42; | 200 o.numNewerVersions = 42; |
201 } | 201 } |
202 buildCounterBucketLifecycleRuleCondition--; | 202 buildCounterBucketLifecycleRuleCondition--; |
203 return o; | 203 return o; |
204 } | 204 } |
205 | 205 |
206 checkBucketLifecycleRuleCondition(api.BucketLifecycleRuleCondition o) { | 206 checkBucketLifecycleRuleCondition(api.BucketLifecycleRuleCondition o) { |
207 buildCounterBucketLifecycleRuleCondition++; | 207 buildCounterBucketLifecycleRuleCondition++; |
208 if (buildCounterBucketLifecycleRuleCondition < 3) { | 208 if (buildCounterBucketLifecycleRuleCondition < 3) { |
209 unittest.expect(o.age, unittest.equals(42)); | 209 unittest.expect(o.age, unittest.equals(42)); |
210 unittest.expect(o.createdBefore, unittest.equals(core.DateTime.parse("2002-0
2-27T00:00:00"))); | 210 unittest.expect(o.createdBefore, unittest.equals(core.DateTime.parse("2002-0
2-27T00:00:00"))); |
211 unittest.expect(o.isLive, unittest.isTrue); | 211 unittest.expect(o.isLive, unittest.isTrue); |
212 checkUnnamed754(o.matchesStorageClass); | 212 checkUnnamed775(o.matchesStorageClass); |
213 unittest.expect(o.numNewerVersions, unittest.equals(42)); | 213 unittest.expect(o.numNewerVersions, unittest.equals(42)); |
214 } | 214 } |
215 buildCounterBucketLifecycleRuleCondition--; | 215 buildCounterBucketLifecycleRuleCondition--; |
216 } | 216 } |
217 | 217 |
218 core.int buildCounterBucketLifecycleRule = 0; | 218 core.int buildCounterBucketLifecycleRule = 0; |
219 buildBucketLifecycleRule() { | 219 buildBucketLifecycleRule() { |
220 var o = new api.BucketLifecycleRule(); | 220 var o = new api.BucketLifecycleRule(); |
221 buildCounterBucketLifecycleRule++; | 221 buildCounterBucketLifecycleRule++; |
222 if (buildCounterBucketLifecycleRule < 3) { | 222 if (buildCounterBucketLifecycleRule < 3) { |
223 o.action = buildBucketLifecycleRuleAction(); | 223 o.action = buildBucketLifecycleRuleAction(); |
224 o.condition = buildBucketLifecycleRuleCondition(); | 224 o.condition = buildBucketLifecycleRuleCondition(); |
225 } | 225 } |
226 buildCounterBucketLifecycleRule--; | 226 buildCounterBucketLifecycleRule--; |
227 return o; | 227 return o; |
228 } | 228 } |
229 | 229 |
230 checkBucketLifecycleRule(api.BucketLifecycleRule o) { | 230 checkBucketLifecycleRule(api.BucketLifecycleRule o) { |
231 buildCounterBucketLifecycleRule++; | 231 buildCounterBucketLifecycleRule++; |
232 if (buildCounterBucketLifecycleRule < 3) { | 232 if (buildCounterBucketLifecycleRule < 3) { |
233 checkBucketLifecycleRuleAction(o.action); | 233 checkBucketLifecycleRuleAction(o.action); |
234 checkBucketLifecycleRuleCondition(o.condition); | 234 checkBucketLifecycleRuleCondition(o.condition); |
235 } | 235 } |
236 buildCounterBucketLifecycleRule--; | 236 buildCounterBucketLifecycleRule--; |
237 } | 237 } |
238 | 238 |
239 buildUnnamed755() { | 239 buildUnnamed776() { |
240 var o = new core.List<api.BucketLifecycleRule>(); | 240 var o = new core.List<api.BucketLifecycleRule>(); |
241 o.add(buildBucketLifecycleRule()); | 241 o.add(buildBucketLifecycleRule()); |
242 o.add(buildBucketLifecycleRule()); | 242 o.add(buildBucketLifecycleRule()); |
243 return o; | 243 return o; |
244 } | 244 } |
245 | 245 |
246 checkUnnamed755(core.List<api.BucketLifecycleRule> o) { | 246 checkUnnamed776(core.List<api.BucketLifecycleRule> o) { |
247 unittest.expect(o, unittest.hasLength(2)); | 247 unittest.expect(o, unittest.hasLength(2)); |
248 checkBucketLifecycleRule(o[0]); | 248 checkBucketLifecycleRule(o[0]); |
249 checkBucketLifecycleRule(o[1]); | 249 checkBucketLifecycleRule(o[1]); |
250 } | 250 } |
251 | 251 |
252 core.int buildCounterBucketLifecycle = 0; | 252 core.int buildCounterBucketLifecycle = 0; |
253 buildBucketLifecycle() { | 253 buildBucketLifecycle() { |
254 var o = new api.BucketLifecycle(); | 254 var o = new api.BucketLifecycle(); |
255 buildCounterBucketLifecycle++; | 255 buildCounterBucketLifecycle++; |
256 if (buildCounterBucketLifecycle < 3) { | 256 if (buildCounterBucketLifecycle < 3) { |
257 o.rule = buildUnnamed755(); | 257 o.rule = buildUnnamed776(); |
258 } | 258 } |
259 buildCounterBucketLifecycle--; | 259 buildCounterBucketLifecycle--; |
260 return o; | 260 return o; |
261 } | 261 } |
262 | 262 |
263 checkBucketLifecycle(api.BucketLifecycle o) { | 263 checkBucketLifecycle(api.BucketLifecycle o) { |
264 buildCounterBucketLifecycle++; | 264 buildCounterBucketLifecycle++; |
265 if (buildCounterBucketLifecycle < 3) { | 265 if (buildCounterBucketLifecycle < 3) { |
266 checkUnnamed755(o.rule); | 266 checkUnnamed776(o.rule); |
267 } | 267 } |
268 buildCounterBucketLifecycle--; | 268 buildCounterBucketLifecycle--; |
269 } | 269 } |
270 | 270 |
271 core.int buildCounterBucketLogging = 0; | 271 core.int buildCounterBucketLogging = 0; |
272 buildBucketLogging() { | 272 buildBucketLogging() { |
273 var o = new api.BucketLogging(); | 273 var o = new api.BucketLogging(); |
274 buildCounterBucketLogging++; | 274 buildCounterBucketLogging++; |
275 if (buildCounterBucketLogging < 3) { | 275 if (buildCounterBucketLogging < 3) { |
276 o.logBucket = "foo"; | 276 o.logBucket = "foo"; |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
348 unittest.expect(o.notFoundPage, unittest.equals('foo')); | 348 unittest.expect(o.notFoundPage, unittest.equals('foo')); |
349 } | 349 } |
350 buildCounterBucketWebsite--; | 350 buildCounterBucketWebsite--; |
351 } | 351 } |
352 | 352 |
353 core.int buildCounterBucket = 0; | 353 core.int buildCounterBucket = 0; |
354 buildBucket() { | 354 buildBucket() { |
355 var o = new api.Bucket(); | 355 var o = new api.Bucket(); |
356 buildCounterBucket++; | 356 buildCounterBucket++; |
357 if (buildCounterBucket < 3) { | 357 if (buildCounterBucket < 3) { |
358 o.acl = buildUnnamed748(); | 358 o.acl = buildUnnamed769(); |
359 o.cors = buildUnnamed752(); | 359 o.cors = buildUnnamed773(); |
360 o.defaultObjectAcl = buildUnnamed753(); | 360 o.defaultObjectAcl = buildUnnamed774(); |
361 o.etag = "foo"; | 361 o.etag = "foo"; |
362 o.id = "foo"; | 362 o.id = "foo"; |
363 o.kind = "foo"; | 363 o.kind = "foo"; |
364 o.lifecycle = buildBucketLifecycle(); | 364 o.lifecycle = buildBucketLifecycle(); |
365 o.location = "foo"; | 365 o.location = "foo"; |
366 o.logging = buildBucketLogging(); | 366 o.logging = buildBucketLogging(); |
367 o.metageneration = "foo"; | 367 o.metageneration = "foo"; |
368 o.name = "foo"; | 368 o.name = "foo"; |
369 o.owner = buildBucketOwner(); | 369 o.owner = buildBucketOwner(); |
370 o.projectNumber = "foo"; | 370 o.projectNumber = "foo"; |
371 o.selfLink = "foo"; | 371 o.selfLink = "foo"; |
372 o.storageClass = "foo"; | 372 o.storageClass = "foo"; |
373 o.timeCreated = core.DateTime.parse("2002-02-27T14:01:02"); | 373 o.timeCreated = core.DateTime.parse("2002-02-27T14:01:02"); |
374 o.updated = core.DateTime.parse("2002-02-27T14:01:02"); | 374 o.updated = core.DateTime.parse("2002-02-27T14:01:02"); |
375 o.versioning = buildBucketVersioning(); | 375 o.versioning = buildBucketVersioning(); |
376 o.website = buildBucketWebsite(); | 376 o.website = buildBucketWebsite(); |
377 } | 377 } |
378 buildCounterBucket--; | 378 buildCounterBucket--; |
379 return o; | 379 return o; |
380 } | 380 } |
381 | 381 |
382 checkBucket(api.Bucket o) { | 382 checkBucket(api.Bucket o) { |
383 buildCounterBucket++; | 383 buildCounterBucket++; |
384 if (buildCounterBucket < 3) { | 384 if (buildCounterBucket < 3) { |
385 checkUnnamed748(o.acl); | 385 checkUnnamed769(o.acl); |
386 checkUnnamed752(o.cors); | 386 checkUnnamed773(o.cors); |
387 checkUnnamed753(o.defaultObjectAcl); | 387 checkUnnamed774(o.defaultObjectAcl); |
388 unittest.expect(o.etag, unittest.equals('foo')); | 388 unittest.expect(o.etag, unittest.equals('foo')); |
389 unittest.expect(o.id, unittest.equals('foo')); | 389 unittest.expect(o.id, unittest.equals('foo')); |
390 unittest.expect(o.kind, unittest.equals('foo')); | 390 unittest.expect(o.kind, unittest.equals('foo')); |
391 checkBucketLifecycle(o.lifecycle); | 391 checkBucketLifecycle(o.lifecycle); |
392 unittest.expect(o.location, unittest.equals('foo')); | 392 unittest.expect(o.location, unittest.equals('foo')); |
393 checkBucketLogging(o.logging); | 393 checkBucketLogging(o.logging); |
394 unittest.expect(o.metageneration, unittest.equals('foo')); | 394 unittest.expect(o.metageneration, unittest.equals('foo')); |
395 unittest.expect(o.name, unittest.equals('foo')); | 395 unittest.expect(o.name, unittest.equals('foo')); |
396 checkBucketOwner(o.owner); | 396 checkBucketOwner(o.owner); |
397 unittest.expect(o.projectNumber, unittest.equals('foo')); | 397 unittest.expect(o.projectNumber, unittest.equals('foo')); |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
458 unittest.expect(o.etag, unittest.equals('foo')); | 458 unittest.expect(o.etag, unittest.equals('foo')); |
459 unittest.expect(o.id, unittest.equals('foo')); | 459 unittest.expect(o.id, unittest.equals('foo')); |
460 unittest.expect(o.kind, unittest.equals('foo')); | 460 unittest.expect(o.kind, unittest.equals('foo')); |
461 checkBucketAccessControlProjectTeam(o.projectTeam); | 461 checkBucketAccessControlProjectTeam(o.projectTeam); |
462 unittest.expect(o.role, unittest.equals('foo')); | 462 unittest.expect(o.role, unittest.equals('foo')); |
463 unittest.expect(o.selfLink, unittest.equals('foo')); | 463 unittest.expect(o.selfLink, unittest.equals('foo')); |
464 } | 464 } |
465 buildCounterBucketAccessControl--; | 465 buildCounterBucketAccessControl--; |
466 } | 466 } |
467 | 467 |
468 buildUnnamed756() { | 468 buildUnnamed777() { |
469 var o = new core.List<api.BucketAccessControl>(); | 469 var o = new core.List<api.BucketAccessControl>(); |
470 o.add(buildBucketAccessControl()); | 470 o.add(buildBucketAccessControl()); |
471 o.add(buildBucketAccessControl()); | 471 o.add(buildBucketAccessControl()); |
472 return o; | 472 return o; |
473 } | 473 } |
474 | 474 |
475 checkUnnamed756(core.List<api.BucketAccessControl> o) { | 475 checkUnnamed777(core.List<api.BucketAccessControl> o) { |
476 unittest.expect(o, unittest.hasLength(2)); | 476 unittest.expect(o, unittest.hasLength(2)); |
477 checkBucketAccessControl(o[0]); | 477 checkBucketAccessControl(o[0]); |
478 checkBucketAccessControl(o[1]); | 478 checkBucketAccessControl(o[1]); |
479 } | 479 } |
480 | 480 |
481 core.int buildCounterBucketAccessControls = 0; | 481 core.int buildCounterBucketAccessControls = 0; |
482 buildBucketAccessControls() { | 482 buildBucketAccessControls() { |
483 var o = new api.BucketAccessControls(); | 483 var o = new api.BucketAccessControls(); |
484 buildCounterBucketAccessControls++; | 484 buildCounterBucketAccessControls++; |
485 if (buildCounterBucketAccessControls < 3) { | 485 if (buildCounterBucketAccessControls < 3) { |
486 o.items = buildUnnamed756(); | 486 o.items = buildUnnamed777(); |
487 o.kind = "foo"; | 487 o.kind = "foo"; |
488 } | 488 } |
489 buildCounterBucketAccessControls--; | 489 buildCounterBucketAccessControls--; |
490 return o; | 490 return o; |
491 } | 491 } |
492 | 492 |
493 checkBucketAccessControls(api.BucketAccessControls o) { | 493 checkBucketAccessControls(api.BucketAccessControls o) { |
494 buildCounterBucketAccessControls++; | 494 buildCounterBucketAccessControls++; |
495 if (buildCounterBucketAccessControls < 3) { | 495 if (buildCounterBucketAccessControls < 3) { |
496 checkUnnamed756(o.items); | 496 checkUnnamed777(o.items); |
497 unittest.expect(o.kind, unittest.equals('foo')); | 497 unittest.expect(o.kind, unittest.equals('foo')); |
498 } | 498 } |
499 buildCounterBucketAccessControls--; | 499 buildCounterBucketAccessControls--; |
500 } | 500 } |
501 | 501 |
502 buildUnnamed757() { | 502 buildUnnamed778() { |
503 var o = new core.List<api.Bucket>(); | 503 var o = new core.List<api.Bucket>(); |
504 o.add(buildBucket()); | 504 o.add(buildBucket()); |
505 o.add(buildBucket()); | 505 o.add(buildBucket()); |
506 return o; | 506 return o; |
507 } | 507 } |
508 | 508 |
509 checkUnnamed757(core.List<api.Bucket> o) { | 509 checkUnnamed778(core.List<api.Bucket> o) { |
510 unittest.expect(o, unittest.hasLength(2)); | 510 unittest.expect(o, unittest.hasLength(2)); |
511 checkBucket(o[0]); | 511 checkBucket(o[0]); |
512 checkBucket(o[1]); | 512 checkBucket(o[1]); |
513 } | 513 } |
514 | 514 |
515 core.int buildCounterBuckets = 0; | 515 core.int buildCounterBuckets = 0; |
516 buildBuckets() { | 516 buildBuckets() { |
517 var o = new api.Buckets(); | 517 var o = new api.Buckets(); |
518 buildCounterBuckets++; | 518 buildCounterBuckets++; |
519 if (buildCounterBuckets < 3) { | 519 if (buildCounterBuckets < 3) { |
520 o.items = buildUnnamed757(); | 520 o.items = buildUnnamed778(); |
521 o.kind = "foo"; | 521 o.kind = "foo"; |
522 o.nextPageToken = "foo"; | 522 o.nextPageToken = "foo"; |
523 } | 523 } |
524 buildCounterBuckets--; | 524 buildCounterBuckets--; |
525 return o; | 525 return o; |
526 } | 526 } |
527 | 527 |
528 checkBuckets(api.Buckets o) { | 528 checkBuckets(api.Buckets o) { |
529 buildCounterBuckets++; | 529 buildCounterBuckets++; |
530 if (buildCounterBuckets < 3) { | 530 if (buildCounterBuckets < 3) { |
531 checkUnnamed757(o.items); | 531 checkUnnamed778(o.items); |
532 unittest.expect(o.kind, unittest.equals('foo')); | 532 unittest.expect(o.kind, unittest.equals('foo')); |
533 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 533 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
534 } | 534 } |
535 buildCounterBuckets--; | 535 buildCounterBuckets--; |
536 } | 536 } |
537 | 537 |
538 buildUnnamed758() { | 538 buildUnnamed779() { |
539 var o = new core.Map<core.String, core.String>(); | 539 var o = new core.Map<core.String, core.String>(); |
540 o["x"] = "foo"; | 540 o["x"] = "foo"; |
541 o["y"] = "foo"; | 541 o["y"] = "foo"; |
542 return o; | 542 return o; |
543 } | 543 } |
544 | 544 |
545 checkUnnamed758(core.Map<core.String, core.String> o) { | 545 checkUnnamed779(core.Map<core.String, core.String> o) { |
546 unittest.expect(o, unittest.hasLength(2)); | 546 unittest.expect(o, unittest.hasLength(2)); |
547 unittest.expect(o["x"], unittest.equals('foo')); | 547 unittest.expect(o["x"], unittest.equals('foo')); |
548 unittest.expect(o["y"], unittest.equals('foo')); | 548 unittest.expect(o["y"], unittest.equals('foo')); |
549 } | 549 } |
550 | 550 |
551 core.int buildCounterChannel = 0; | 551 core.int buildCounterChannel = 0; |
552 buildChannel() { | 552 buildChannel() { |
553 var o = new api.Channel(); | 553 var o = new api.Channel(); |
554 buildCounterChannel++; | 554 buildCounterChannel++; |
555 if (buildCounterChannel < 3) { | 555 if (buildCounterChannel < 3) { |
556 o.address = "foo"; | 556 o.address = "foo"; |
557 o.expiration = "foo"; | 557 o.expiration = "foo"; |
558 o.id = "foo"; | 558 o.id = "foo"; |
559 o.kind = "foo"; | 559 o.kind = "foo"; |
560 o.params = buildUnnamed758(); | 560 o.params = buildUnnamed779(); |
561 o.payload = true; | 561 o.payload = true; |
562 o.resourceId = "foo"; | 562 o.resourceId = "foo"; |
563 o.resourceUri = "foo"; | 563 o.resourceUri = "foo"; |
564 o.token = "foo"; | 564 o.token = "foo"; |
565 o.type = "foo"; | 565 o.type = "foo"; |
566 } | 566 } |
567 buildCounterChannel--; | 567 buildCounterChannel--; |
568 return o; | 568 return o; |
569 } | 569 } |
570 | 570 |
571 checkChannel(api.Channel o) { | 571 checkChannel(api.Channel o) { |
572 buildCounterChannel++; | 572 buildCounterChannel++; |
573 if (buildCounterChannel < 3) { | 573 if (buildCounterChannel < 3) { |
574 unittest.expect(o.address, unittest.equals('foo')); | 574 unittest.expect(o.address, unittest.equals('foo')); |
575 unittest.expect(o.expiration, unittest.equals('foo')); | 575 unittest.expect(o.expiration, unittest.equals('foo')); |
576 unittest.expect(o.id, unittest.equals('foo')); | 576 unittest.expect(o.id, unittest.equals('foo')); |
577 unittest.expect(o.kind, unittest.equals('foo')); | 577 unittest.expect(o.kind, unittest.equals('foo')); |
578 checkUnnamed758(o.params); | 578 checkUnnamed779(o.params); |
579 unittest.expect(o.payload, unittest.isTrue); | 579 unittest.expect(o.payload, unittest.isTrue); |
580 unittest.expect(o.resourceId, unittest.equals('foo')); | 580 unittest.expect(o.resourceId, unittest.equals('foo')); |
581 unittest.expect(o.resourceUri, unittest.equals('foo')); | 581 unittest.expect(o.resourceUri, unittest.equals('foo')); |
582 unittest.expect(o.token, unittest.equals('foo')); | 582 unittest.expect(o.token, unittest.equals('foo')); |
583 unittest.expect(o.type, unittest.equals('foo')); | 583 unittest.expect(o.type, unittest.equals('foo')); |
584 } | 584 } |
585 buildCounterChannel--; | 585 buildCounterChannel--; |
586 } | 586 } |
587 | 587 |
588 core.int buildCounterComposeRequestSourceObjectsObjectPreconditions = 0; | 588 core.int buildCounterComposeRequestSourceObjectsObjectPreconditions = 0; |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
620 checkComposeRequestSourceObjects(api.ComposeRequestSourceObjects o) { | 620 checkComposeRequestSourceObjects(api.ComposeRequestSourceObjects o) { |
621 buildCounterComposeRequestSourceObjects++; | 621 buildCounterComposeRequestSourceObjects++; |
622 if (buildCounterComposeRequestSourceObjects < 3) { | 622 if (buildCounterComposeRequestSourceObjects < 3) { |
623 unittest.expect(o.generation, unittest.equals('foo')); | 623 unittest.expect(o.generation, unittest.equals('foo')); |
624 unittest.expect(o.name, unittest.equals('foo')); | 624 unittest.expect(o.name, unittest.equals('foo')); |
625 checkComposeRequestSourceObjectsObjectPreconditions(o.objectPreconditions); | 625 checkComposeRequestSourceObjectsObjectPreconditions(o.objectPreconditions); |
626 } | 626 } |
627 buildCounterComposeRequestSourceObjects--; | 627 buildCounterComposeRequestSourceObjects--; |
628 } | 628 } |
629 | 629 |
630 buildUnnamed759() { | 630 buildUnnamed780() { |
631 var o = new core.List<api.ComposeRequestSourceObjects>(); | 631 var o = new core.List<api.ComposeRequestSourceObjects>(); |
632 o.add(buildComposeRequestSourceObjects()); | 632 o.add(buildComposeRequestSourceObjects()); |
633 o.add(buildComposeRequestSourceObjects()); | 633 o.add(buildComposeRequestSourceObjects()); |
634 return o; | 634 return o; |
635 } | 635 } |
636 | 636 |
637 checkUnnamed759(core.List<api.ComposeRequestSourceObjects> o) { | 637 checkUnnamed780(core.List<api.ComposeRequestSourceObjects> o) { |
638 unittest.expect(o, unittest.hasLength(2)); | 638 unittest.expect(o, unittest.hasLength(2)); |
639 checkComposeRequestSourceObjects(o[0]); | 639 checkComposeRequestSourceObjects(o[0]); |
640 checkComposeRequestSourceObjects(o[1]); | 640 checkComposeRequestSourceObjects(o[1]); |
641 } | 641 } |
642 | 642 |
643 core.int buildCounterComposeRequest = 0; | 643 core.int buildCounterComposeRequest = 0; |
644 buildComposeRequest() { | 644 buildComposeRequest() { |
645 var o = new api.ComposeRequest(); | 645 var o = new api.ComposeRequest(); |
646 buildCounterComposeRequest++; | 646 buildCounterComposeRequest++; |
647 if (buildCounterComposeRequest < 3) { | 647 if (buildCounterComposeRequest < 3) { |
648 o.destination = buildObject(); | 648 o.destination = buildObject(); |
649 o.kind = "foo"; | 649 o.kind = "foo"; |
650 o.sourceObjects = buildUnnamed759(); | 650 o.sourceObjects = buildUnnamed780(); |
651 } | 651 } |
652 buildCounterComposeRequest--; | 652 buildCounterComposeRequest--; |
653 return o; | 653 return o; |
654 } | 654 } |
655 | 655 |
656 checkComposeRequest(api.ComposeRequest o) { | 656 checkComposeRequest(api.ComposeRequest o) { |
657 buildCounterComposeRequest++; | 657 buildCounterComposeRequest++; |
658 if (buildCounterComposeRequest < 3) { | 658 if (buildCounterComposeRequest < 3) { |
659 checkObject(o.destination); | 659 checkObject(o.destination); |
660 unittest.expect(o.kind, unittest.equals('foo')); | 660 unittest.expect(o.kind, unittest.equals('foo')); |
661 checkUnnamed759(o.sourceObjects); | 661 checkUnnamed780(o.sourceObjects); |
662 } | 662 } |
663 buildCounterComposeRequest--; | 663 buildCounterComposeRequest--; |
664 } | 664 } |
665 | 665 |
666 buildUnnamed760() { | 666 buildUnnamed781() { |
667 var o = new core.List<api.ObjectAccessControl>(); | 667 var o = new core.List<api.ObjectAccessControl>(); |
668 o.add(buildObjectAccessControl()); | 668 o.add(buildObjectAccessControl()); |
669 o.add(buildObjectAccessControl()); | 669 o.add(buildObjectAccessControl()); |
670 return o; | 670 return o; |
671 } | 671 } |
672 | 672 |
673 checkUnnamed760(core.List<api.ObjectAccessControl> o) { | 673 checkUnnamed781(core.List<api.ObjectAccessControl> o) { |
674 unittest.expect(o, unittest.hasLength(2)); | 674 unittest.expect(o, unittest.hasLength(2)); |
675 checkObjectAccessControl(o[0]); | 675 checkObjectAccessControl(o[0]); |
676 checkObjectAccessControl(o[1]); | 676 checkObjectAccessControl(o[1]); |
677 } | 677 } |
678 | 678 |
679 core.int buildCounterObjectCustomerEncryption = 0; | 679 core.int buildCounterObjectCustomerEncryption = 0; |
680 buildObjectCustomerEncryption() { | 680 buildObjectCustomerEncryption() { |
681 var o = new api.ObjectCustomerEncryption(); | 681 var o = new api.ObjectCustomerEncryption(); |
682 buildCounterObjectCustomerEncryption++; | 682 buildCounterObjectCustomerEncryption++; |
683 if (buildCounterObjectCustomerEncryption < 3) { | 683 if (buildCounterObjectCustomerEncryption < 3) { |
684 o.encryptionAlgorithm = "foo"; | 684 o.encryptionAlgorithm = "foo"; |
685 o.keySha256 = "foo"; | 685 o.keySha256 = "foo"; |
686 } | 686 } |
687 buildCounterObjectCustomerEncryption--; | 687 buildCounterObjectCustomerEncryption--; |
688 return o; | 688 return o; |
689 } | 689 } |
690 | 690 |
691 checkObjectCustomerEncryption(api.ObjectCustomerEncryption o) { | 691 checkObjectCustomerEncryption(api.ObjectCustomerEncryption o) { |
692 buildCounterObjectCustomerEncryption++; | 692 buildCounterObjectCustomerEncryption++; |
693 if (buildCounterObjectCustomerEncryption < 3) { | 693 if (buildCounterObjectCustomerEncryption < 3) { |
694 unittest.expect(o.encryptionAlgorithm, unittest.equals('foo')); | 694 unittest.expect(o.encryptionAlgorithm, unittest.equals('foo')); |
695 unittest.expect(o.keySha256, unittest.equals('foo')); | 695 unittest.expect(o.keySha256, unittest.equals('foo')); |
696 } | 696 } |
697 buildCounterObjectCustomerEncryption--; | 697 buildCounterObjectCustomerEncryption--; |
698 } | 698 } |
699 | 699 |
700 buildUnnamed761() { | 700 buildUnnamed782() { |
701 var o = new core.Map<core.String, core.String>(); | 701 var o = new core.Map<core.String, core.String>(); |
702 o["x"] = "foo"; | 702 o["x"] = "foo"; |
703 o["y"] = "foo"; | 703 o["y"] = "foo"; |
704 return o; | 704 return o; |
705 } | 705 } |
706 | 706 |
707 checkUnnamed761(core.Map<core.String, core.String> o) { | 707 checkUnnamed782(core.Map<core.String, core.String> o) { |
708 unittest.expect(o, unittest.hasLength(2)); | 708 unittest.expect(o, unittest.hasLength(2)); |
709 unittest.expect(o["x"], unittest.equals('foo')); | 709 unittest.expect(o["x"], unittest.equals('foo')); |
710 unittest.expect(o["y"], unittest.equals('foo')); | 710 unittest.expect(o["y"], unittest.equals('foo')); |
711 } | 711 } |
712 | 712 |
713 core.int buildCounterObjectOwner = 0; | 713 core.int buildCounterObjectOwner = 0; |
714 buildObjectOwner() { | 714 buildObjectOwner() { |
715 var o = new api.ObjectOwner(); | 715 var o = new api.ObjectOwner(); |
716 buildCounterObjectOwner++; | 716 buildCounterObjectOwner++; |
717 if (buildCounterObjectOwner < 3) { | 717 if (buildCounterObjectOwner < 3) { |
(...skipping 11 matching lines...) Expand all Loading... |
729 unittest.expect(o.entityId, unittest.equals('foo')); | 729 unittest.expect(o.entityId, unittest.equals('foo')); |
730 } | 730 } |
731 buildCounterObjectOwner--; | 731 buildCounterObjectOwner--; |
732 } | 732 } |
733 | 733 |
734 core.int buildCounterObject = 0; | 734 core.int buildCounterObject = 0; |
735 buildObject() { | 735 buildObject() { |
736 var o = new api.Object(); | 736 var o = new api.Object(); |
737 buildCounterObject++; | 737 buildCounterObject++; |
738 if (buildCounterObject < 3) { | 738 if (buildCounterObject < 3) { |
739 o.acl = buildUnnamed760(); | 739 o.acl = buildUnnamed781(); |
740 o.bucket = "foo"; | 740 o.bucket = "foo"; |
741 o.cacheControl = "foo"; | 741 o.cacheControl = "foo"; |
742 o.componentCount = 42; | 742 o.componentCount = 42; |
743 o.contentDisposition = "foo"; | 743 o.contentDisposition = "foo"; |
744 o.contentEncoding = "foo"; | 744 o.contentEncoding = "foo"; |
745 o.contentLanguage = "foo"; | 745 o.contentLanguage = "foo"; |
746 o.contentType = "foo"; | 746 o.contentType = "foo"; |
747 o.crc32c = "foo"; | 747 o.crc32c = "foo"; |
748 o.customerEncryption = buildObjectCustomerEncryption(); | 748 o.customerEncryption = buildObjectCustomerEncryption(); |
749 o.etag = "foo"; | 749 o.etag = "foo"; |
750 o.generation = "foo"; | 750 o.generation = "foo"; |
751 o.id = "foo"; | 751 o.id = "foo"; |
752 o.kind = "foo"; | 752 o.kind = "foo"; |
753 o.md5Hash = "foo"; | 753 o.md5Hash = "foo"; |
754 o.mediaLink = "foo"; | 754 o.mediaLink = "foo"; |
755 o.metadata = buildUnnamed761(); | 755 o.metadata = buildUnnamed782(); |
756 o.metageneration = "foo"; | 756 o.metageneration = "foo"; |
757 o.name = "foo"; | 757 o.name = "foo"; |
758 o.owner = buildObjectOwner(); | 758 o.owner = buildObjectOwner(); |
759 o.selfLink = "foo"; | 759 o.selfLink = "foo"; |
760 o.size = "foo"; | 760 o.size = "foo"; |
761 o.storageClass = "foo"; | 761 o.storageClass = "foo"; |
762 o.timeCreated = core.DateTime.parse("2002-02-27T14:01:02"); | 762 o.timeCreated = core.DateTime.parse("2002-02-27T14:01:02"); |
763 o.timeDeleted = core.DateTime.parse("2002-02-27T14:01:02"); | 763 o.timeDeleted = core.DateTime.parse("2002-02-27T14:01:02"); |
764 o.timeStorageClassUpdated = core.DateTime.parse("2002-02-27T14:01:02"); | 764 o.timeStorageClassUpdated = core.DateTime.parse("2002-02-27T14:01:02"); |
765 o.updated = core.DateTime.parse("2002-02-27T14:01:02"); | 765 o.updated = core.DateTime.parse("2002-02-27T14:01:02"); |
766 } | 766 } |
767 buildCounterObject--; | 767 buildCounterObject--; |
768 return o; | 768 return o; |
769 } | 769 } |
770 | 770 |
771 checkObject(api.Object o) { | 771 checkObject(api.Object o) { |
772 buildCounterObject++; | 772 buildCounterObject++; |
773 if (buildCounterObject < 3) { | 773 if (buildCounterObject < 3) { |
774 checkUnnamed760(o.acl); | 774 checkUnnamed781(o.acl); |
775 unittest.expect(o.bucket, unittest.equals('foo')); | 775 unittest.expect(o.bucket, unittest.equals('foo')); |
776 unittest.expect(o.cacheControl, unittest.equals('foo')); | 776 unittest.expect(o.cacheControl, unittest.equals('foo')); |
777 unittest.expect(o.componentCount, unittest.equals(42)); | 777 unittest.expect(o.componentCount, unittest.equals(42)); |
778 unittest.expect(o.contentDisposition, unittest.equals('foo')); | 778 unittest.expect(o.contentDisposition, unittest.equals('foo')); |
779 unittest.expect(o.contentEncoding, unittest.equals('foo')); | 779 unittest.expect(o.contentEncoding, unittest.equals('foo')); |
780 unittest.expect(o.contentLanguage, unittest.equals('foo')); | 780 unittest.expect(o.contentLanguage, unittest.equals('foo')); |
781 unittest.expect(o.contentType, unittest.equals('foo')); | 781 unittest.expect(o.contentType, unittest.equals('foo')); |
782 unittest.expect(o.crc32c, unittest.equals('foo')); | 782 unittest.expect(o.crc32c, unittest.equals('foo')); |
783 checkObjectCustomerEncryption(o.customerEncryption); | 783 checkObjectCustomerEncryption(o.customerEncryption); |
784 unittest.expect(o.etag, unittest.equals('foo')); | 784 unittest.expect(o.etag, unittest.equals('foo')); |
785 unittest.expect(o.generation, unittest.equals('foo')); | 785 unittest.expect(o.generation, unittest.equals('foo')); |
786 unittest.expect(o.id, unittest.equals('foo')); | 786 unittest.expect(o.id, unittest.equals('foo')); |
787 unittest.expect(o.kind, unittest.equals('foo')); | 787 unittest.expect(o.kind, unittest.equals('foo')); |
788 unittest.expect(o.md5Hash, unittest.equals('foo')); | 788 unittest.expect(o.md5Hash, unittest.equals('foo')); |
789 unittest.expect(o.mediaLink, unittest.equals('foo')); | 789 unittest.expect(o.mediaLink, unittest.equals('foo')); |
790 checkUnnamed761(o.metadata); | 790 checkUnnamed782(o.metadata); |
791 unittest.expect(o.metageneration, unittest.equals('foo')); | 791 unittest.expect(o.metageneration, unittest.equals('foo')); |
792 unittest.expect(o.name, unittest.equals('foo')); | 792 unittest.expect(o.name, unittest.equals('foo')); |
793 checkObjectOwner(o.owner); | 793 checkObjectOwner(o.owner); |
794 unittest.expect(o.selfLink, unittest.equals('foo')); | 794 unittest.expect(o.selfLink, unittest.equals('foo')); |
795 unittest.expect(o.size, unittest.equals('foo')); | 795 unittest.expect(o.size, unittest.equals('foo')); |
796 unittest.expect(o.storageClass, unittest.equals('foo')); | 796 unittest.expect(o.storageClass, unittest.equals('foo')); |
797 unittest.expect(o.timeCreated, unittest.equals(core.DateTime.parse("2002-02-
27T14:01:02"))); | 797 unittest.expect(o.timeCreated, unittest.equals(core.DateTime.parse("2002-02-
27T14:01:02"))); |
798 unittest.expect(o.timeDeleted, unittest.equals(core.DateTime.parse("2002-02-
27T14:01:02"))); | 798 unittest.expect(o.timeDeleted, unittest.equals(core.DateTime.parse("2002-02-
27T14:01:02"))); |
799 unittest.expect(o.timeStorageClassUpdated, unittest.equals(core.DateTime.par
se("2002-02-27T14:01:02"))); | 799 unittest.expect(o.timeStorageClassUpdated, unittest.equals(core.DateTime.par
se("2002-02-27T14:01:02"))); |
800 unittest.expect(o.updated, unittest.equals(core.DateTime.parse("2002-02-27T1
4:01:02"))); | 800 unittest.expect(o.updated, unittest.equals(core.DateTime.parse("2002-02-27T1
4:01:02"))); |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
859 unittest.expect(o.id, unittest.equals('foo')); | 859 unittest.expect(o.id, unittest.equals('foo')); |
860 unittest.expect(o.kind, unittest.equals('foo')); | 860 unittest.expect(o.kind, unittest.equals('foo')); |
861 unittest.expect(o.object, unittest.equals('foo')); | 861 unittest.expect(o.object, unittest.equals('foo')); |
862 checkObjectAccessControlProjectTeam(o.projectTeam); | 862 checkObjectAccessControlProjectTeam(o.projectTeam); |
863 unittest.expect(o.role, unittest.equals('foo')); | 863 unittest.expect(o.role, unittest.equals('foo')); |
864 unittest.expect(o.selfLink, unittest.equals('foo')); | 864 unittest.expect(o.selfLink, unittest.equals('foo')); |
865 } | 865 } |
866 buildCounterObjectAccessControl--; | 866 buildCounterObjectAccessControl--; |
867 } | 867 } |
868 | 868 |
869 buildUnnamed762() { | 869 buildUnnamed783() { |
870 var o = new core.List<api.ObjectAccessControl>(); | 870 var o = new core.List<api.ObjectAccessControl>(); |
871 o.add(buildObjectAccessControl()); | 871 o.add(buildObjectAccessControl()); |
872 o.add(buildObjectAccessControl()); | 872 o.add(buildObjectAccessControl()); |
873 return o; | 873 return o; |
874 } | 874 } |
875 | 875 |
876 checkUnnamed762(core.List<api.ObjectAccessControl> o) { | 876 checkUnnamed783(core.List<api.ObjectAccessControl> o) { |
877 unittest.expect(o, unittest.hasLength(2)); | 877 unittest.expect(o, unittest.hasLength(2)); |
878 checkObjectAccessControl(o[0]); | 878 checkObjectAccessControl(o[0]); |
879 checkObjectAccessControl(o[1]); | 879 checkObjectAccessControl(o[1]); |
880 } | 880 } |
881 | 881 |
882 core.int buildCounterObjectAccessControls = 0; | 882 core.int buildCounterObjectAccessControls = 0; |
883 buildObjectAccessControls() { | 883 buildObjectAccessControls() { |
884 var o = new api.ObjectAccessControls(); | 884 var o = new api.ObjectAccessControls(); |
885 buildCounterObjectAccessControls++; | 885 buildCounterObjectAccessControls++; |
886 if (buildCounterObjectAccessControls < 3) { | 886 if (buildCounterObjectAccessControls < 3) { |
887 o.items = buildUnnamed762(); | 887 o.items = buildUnnamed783(); |
888 o.kind = "foo"; | 888 o.kind = "foo"; |
889 } | 889 } |
890 buildCounterObjectAccessControls--; | 890 buildCounterObjectAccessControls--; |
891 return o; | 891 return o; |
892 } | 892 } |
893 | 893 |
894 checkObjectAccessControls(api.ObjectAccessControls o) { | 894 checkObjectAccessControls(api.ObjectAccessControls o) { |
895 buildCounterObjectAccessControls++; | 895 buildCounterObjectAccessControls++; |
896 if (buildCounterObjectAccessControls < 3) { | 896 if (buildCounterObjectAccessControls < 3) { |
897 checkUnnamed762(o.items); | 897 checkUnnamed783(o.items); |
898 unittest.expect(o.kind, unittest.equals('foo')); | 898 unittest.expect(o.kind, unittest.equals('foo')); |
899 } | 899 } |
900 buildCounterObjectAccessControls--; | 900 buildCounterObjectAccessControls--; |
901 } | 901 } |
902 | 902 |
903 buildUnnamed763() { | 903 buildUnnamed784() { |
904 var o = new core.List<api.Object>(); | 904 var o = new core.List<api.Object>(); |
905 o.add(buildObject()); | 905 o.add(buildObject()); |
906 o.add(buildObject()); | 906 o.add(buildObject()); |
907 return o; | 907 return o; |
908 } | 908 } |
909 | 909 |
910 checkUnnamed763(core.List<api.Object> o) { | 910 checkUnnamed784(core.List<api.Object> o) { |
911 unittest.expect(o, unittest.hasLength(2)); | 911 unittest.expect(o, unittest.hasLength(2)); |
912 checkObject(o[0]); | 912 checkObject(o[0]); |
913 checkObject(o[1]); | 913 checkObject(o[1]); |
914 } | 914 } |
915 | 915 |
916 buildUnnamed764() { | 916 buildUnnamed785() { |
917 var o = new core.List<core.String>(); | 917 var o = new core.List<core.String>(); |
918 o.add("foo"); | 918 o.add("foo"); |
919 o.add("foo"); | 919 o.add("foo"); |
920 return o; | 920 return o; |
921 } | 921 } |
922 | 922 |
923 checkUnnamed764(core.List<core.String> o) { | 923 checkUnnamed785(core.List<core.String> o) { |
924 unittest.expect(o, unittest.hasLength(2)); | 924 unittest.expect(o, unittest.hasLength(2)); |
925 unittest.expect(o[0], unittest.equals('foo')); | 925 unittest.expect(o[0], unittest.equals('foo')); |
926 unittest.expect(o[1], unittest.equals('foo')); | 926 unittest.expect(o[1], unittest.equals('foo')); |
927 } | 927 } |
928 | 928 |
929 core.int buildCounterObjects = 0; | 929 core.int buildCounterObjects = 0; |
930 buildObjects() { | 930 buildObjects() { |
931 var o = new api.Objects(); | 931 var o = new api.Objects(); |
932 buildCounterObjects++; | 932 buildCounterObjects++; |
933 if (buildCounterObjects < 3) { | 933 if (buildCounterObjects < 3) { |
934 o.items = buildUnnamed763(); | 934 o.items = buildUnnamed784(); |
935 o.kind = "foo"; | 935 o.kind = "foo"; |
936 o.nextPageToken = "foo"; | 936 o.nextPageToken = "foo"; |
937 o.prefixes = buildUnnamed764(); | 937 o.prefixes = buildUnnamed785(); |
938 } | 938 } |
939 buildCounterObjects--; | 939 buildCounterObjects--; |
940 return o; | 940 return o; |
941 } | 941 } |
942 | 942 |
943 checkObjects(api.Objects o) { | 943 checkObjects(api.Objects o) { |
944 buildCounterObjects++; | 944 buildCounterObjects++; |
945 if (buildCounterObjects < 3) { | 945 if (buildCounterObjects < 3) { |
946 checkUnnamed763(o.items); | 946 checkUnnamed784(o.items); |
947 unittest.expect(o.kind, unittest.equals('foo')); | 947 unittest.expect(o.kind, unittest.equals('foo')); |
948 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 948 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
949 checkUnnamed764(o.prefixes); | 949 checkUnnamed785(o.prefixes); |
950 } | 950 } |
951 buildCounterObjects--; | 951 buildCounterObjects--; |
952 } | 952 } |
953 | 953 |
| 954 buildUnnamed786() { |
| 955 var o = new core.List<core.String>(); |
| 956 o.add("foo"); |
| 957 o.add("foo"); |
| 958 return o; |
| 959 } |
| 960 |
| 961 checkUnnamed786(core.List<core.String> o) { |
| 962 unittest.expect(o, unittest.hasLength(2)); |
| 963 unittest.expect(o[0], unittest.equals('foo')); |
| 964 unittest.expect(o[1], unittest.equals('foo')); |
| 965 } |
| 966 |
| 967 core.int buildCounterPolicyBindings = 0; |
| 968 buildPolicyBindings() { |
| 969 var o = new api.PolicyBindings(); |
| 970 buildCounterPolicyBindings++; |
| 971 if (buildCounterPolicyBindings < 3) { |
| 972 o.members = buildUnnamed786(); |
| 973 o.role = "foo"; |
| 974 } |
| 975 buildCounterPolicyBindings--; |
| 976 return o; |
| 977 } |
| 978 |
| 979 checkPolicyBindings(api.PolicyBindings o) { |
| 980 buildCounterPolicyBindings++; |
| 981 if (buildCounterPolicyBindings < 3) { |
| 982 checkUnnamed786(o.members); |
| 983 unittest.expect(o.role, unittest.equals('foo')); |
| 984 } |
| 985 buildCounterPolicyBindings--; |
| 986 } |
| 987 |
| 988 buildUnnamed787() { |
| 989 var o = new core.List<api.PolicyBindings>(); |
| 990 o.add(buildPolicyBindings()); |
| 991 o.add(buildPolicyBindings()); |
| 992 return o; |
| 993 } |
| 994 |
| 995 checkUnnamed787(core.List<api.PolicyBindings> o) { |
| 996 unittest.expect(o, unittest.hasLength(2)); |
| 997 checkPolicyBindings(o[0]); |
| 998 checkPolicyBindings(o[1]); |
| 999 } |
| 1000 |
| 1001 core.int buildCounterPolicy = 0; |
| 1002 buildPolicy() { |
| 1003 var o = new api.Policy(); |
| 1004 buildCounterPolicy++; |
| 1005 if (buildCounterPolicy < 3) { |
| 1006 o.bindings = buildUnnamed787(); |
| 1007 o.etag = "foo"; |
| 1008 o.kind = "foo"; |
| 1009 o.resourceId = "foo"; |
| 1010 } |
| 1011 buildCounterPolicy--; |
| 1012 return o; |
| 1013 } |
| 1014 |
| 1015 checkPolicy(api.Policy o) { |
| 1016 buildCounterPolicy++; |
| 1017 if (buildCounterPolicy < 3) { |
| 1018 checkUnnamed787(o.bindings); |
| 1019 unittest.expect(o.etag, unittest.equals('foo')); |
| 1020 unittest.expect(o.kind, unittest.equals('foo')); |
| 1021 unittest.expect(o.resourceId, unittest.equals('foo')); |
| 1022 } |
| 1023 buildCounterPolicy--; |
| 1024 } |
| 1025 |
954 core.int buildCounterRewriteResponse = 0; | 1026 core.int buildCounterRewriteResponse = 0; |
955 buildRewriteResponse() { | 1027 buildRewriteResponse() { |
956 var o = new api.RewriteResponse(); | 1028 var o = new api.RewriteResponse(); |
957 buildCounterRewriteResponse++; | 1029 buildCounterRewriteResponse++; |
958 if (buildCounterRewriteResponse < 3) { | 1030 if (buildCounterRewriteResponse < 3) { |
959 o.done = true; | 1031 o.done = true; |
960 o.kind = "foo"; | 1032 o.kind = "foo"; |
961 o.objectSize = "foo"; | 1033 o.objectSize = "foo"; |
962 o.resource = buildObject(); | 1034 o.resource = buildObject(); |
963 o.rewriteToken = "foo"; | 1035 o.rewriteToken = "foo"; |
964 o.totalBytesRewritten = "foo"; | 1036 o.totalBytesRewritten = "foo"; |
965 } | 1037 } |
966 buildCounterRewriteResponse--; | 1038 buildCounterRewriteResponse--; |
967 return o; | 1039 return o; |
968 } | 1040 } |
969 | 1041 |
970 checkRewriteResponse(api.RewriteResponse o) { | 1042 checkRewriteResponse(api.RewriteResponse o) { |
971 buildCounterRewriteResponse++; | 1043 buildCounterRewriteResponse++; |
972 if (buildCounterRewriteResponse < 3) { | 1044 if (buildCounterRewriteResponse < 3) { |
973 unittest.expect(o.done, unittest.isTrue); | 1045 unittest.expect(o.done, unittest.isTrue); |
974 unittest.expect(o.kind, unittest.equals('foo')); | 1046 unittest.expect(o.kind, unittest.equals('foo')); |
975 unittest.expect(o.objectSize, unittest.equals('foo')); | 1047 unittest.expect(o.objectSize, unittest.equals('foo')); |
976 checkObject(o.resource); | 1048 checkObject(o.resource); |
977 unittest.expect(o.rewriteToken, unittest.equals('foo')); | 1049 unittest.expect(o.rewriteToken, unittest.equals('foo')); |
978 unittest.expect(o.totalBytesRewritten, unittest.equals('foo')); | 1050 unittest.expect(o.totalBytesRewritten, unittest.equals('foo')); |
979 } | 1051 } |
980 buildCounterRewriteResponse--; | 1052 buildCounterRewriteResponse--; |
981 } | 1053 } |
982 | 1054 |
| 1055 buildUnnamed788() { |
| 1056 var o = new core.List<core.String>(); |
| 1057 o.add("foo"); |
| 1058 o.add("foo"); |
| 1059 return o; |
| 1060 } |
| 1061 |
| 1062 checkUnnamed788(core.List<core.String> o) { |
| 1063 unittest.expect(o, unittest.hasLength(2)); |
| 1064 unittest.expect(o[0], unittest.equals('foo')); |
| 1065 unittest.expect(o[1], unittest.equals('foo')); |
| 1066 } |
| 1067 |
| 1068 core.int buildCounterTestIamPermissionsResponse = 0; |
| 1069 buildTestIamPermissionsResponse() { |
| 1070 var o = new api.TestIamPermissionsResponse(); |
| 1071 buildCounterTestIamPermissionsResponse++; |
| 1072 if (buildCounterTestIamPermissionsResponse < 3) { |
| 1073 o.kind = "foo"; |
| 1074 o.permissions = buildUnnamed788(); |
| 1075 } |
| 1076 buildCounterTestIamPermissionsResponse--; |
| 1077 return o; |
| 1078 } |
| 1079 |
| 1080 checkTestIamPermissionsResponse(api.TestIamPermissionsResponse o) { |
| 1081 buildCounterTestIamPermissionsResponse++; |
| 1082 if (buildCounterTestIamPermissionsResponse < 3) { |
| 1083 unittest.expect(o.kind, unittest.equals('foo')); |
| 1084 checkUnnamed788(o.permissions); |
| 1085 } |
| 1086 buildCounterTestIamPermissionsResponse--; |
| 1087 } |
| 1088 |
| 1089 buildUnnamed789() { |
| 1090 var o = new core.List<core.String>(); |
| 1091 o.add("foo"); |
| 1092 o.add("foo"); |
| 1093 return o; |
| 1094 } |
| 1095 |
| 1096 checkUnnamed789(core.List<core.String> o) { |
| 1097 unittest.expect(o, unittest.hasLength(2)); |
| 1098 unittest.expect(o[0], unittest.equals('foo')); |
| 1099 unittest.expect(o[1], unittest.equals('foo')); |
| 1100 } |
| 1101 |
| 1102 buildUnnamed790() { |
| 1103 var o = new core.List<core.String>(); |
| 1104 o.add("foo"); |
| 1105 o.add("foo"); |
| 1106 return o; |
| 1107 } |
| 1108 |
| 1109 checkUnnamed790(core.List<core.String> o) { |
| 1110 unittest.expect(o, unittest.hasLength(2)); |
| 1111 unittest.expect(o[0], unittest.equals('foo')); |
| 1112 unittest.expect(o[1], unittest.equals('foo')); |
| 1113 } |
| 1114 |
983 | 1115 |
984 main() { | 1116 main() { |
985 unittest.group("obj-schema-BucketCors", () { | 1117 unittest.group("obj-schema-BucketCors", () { |
986 unittest.test("to-json--from-json", () { | 1118 unittest.test("to-json--from-json", () { |
987 var o = buildBucketCors(); | 1119 var o = buildBucketCors(); |
988 var od = new api.BucketCors.fromJson(o.toJson()); | 1120 var od = new api.BucketCors.fromJson(o.toJson()); |
989 checkBucketCors(od); | 1121 checkBucketCors(od); |
990 }); | 1122 }); |
991 }); | 1123 }); |
992 | 1124 |
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1200 | 1332 |
1201 unittest.group("obj-schema-Objects", () { | 1333 unittest.group("obj-schema-Objects", () { |
1202 unittest.test("to-json--from-json", () { | 1334 unittest.test("to-json--from-json", () { |
1203 var o = buildObjects(); | 1335 var o = buildObjects(); |
1204 var od = new api.Objects.fromJson(o.toJson()); | 1336 var od = new api.Objects.fromJson(o.toJson()); |
1205 checkObjects(od); | 1337 checkObjects(od); |
1206 }); | 1338 }); |
1207 }); | 1339 }); |
1208 | 1340 |
1209 | 1341 |
| 1342 unittest.group("obj-schema-PolicyBindings", () { |
| 1343 unittest.test("to-json--from-json", () { |
| 1344 var o = buildPolicyBindings(); |
| 1345 var od = new api.PolicyBindings.fromJson(o.toJson()); |
| 1346 checkPolicyBindings(od); |
| 1347 }); |
| 1348 }); |
| 1349 |
| 1350 |
| 1351 unittest.group("obj-schema-Policy", () { |
| 1352 unittest.test("to-json--from-json", () { |
| 1353 var o = buildPolicy(); |
| 1354 var od = new api.Policy.fromJson(o.toJson()); |
| 1355 checkPolicy(od); |
| 1356 }); |
| 1357 }); |
| 1358 |
| 1359 |
1210 unittest.group("obj-schema-RewriteResponse", () { | 1360 unittest.group("obj-schema-RewriteResponse", () { |
1211 unittest.test("to-json--from-json", () { | 1361 unittest.test("to-json--from-json", () { |
1212 var o = buildRewriteResponse(); | 1362 var o = buildRewriteResponse(); |
1213 var od = new api.RewriteResponse.fromJson(o.toJson()); | 1363 var od = new api.RewriteResponse.fromJson(o.toJson()); |
1214 checkRewriteResponse(od); | 1364 checkRewriteResponse(od); |
1215 }); | 1365 }); |
1216 }); | 1366 }); |
1217 | 1367 |
1218 | 1368 |
| 1369 unittest.group("obj-schema-TestIamPermissionsResponse", () { |
| 1370 unittest.test("to-json--from-json", () { |
| 1371 var o = buildTestIamPermissionsResponse(); |
| 1372 var od = new api.TestIamPermissionsResponse.fromJson(o.toJson()); |
| 1373 checkTestIamPermissionsResponse(od); |
| 1374 }); |
| 1375 }); |
| 1376 |
| 1377 |
1219 unittest.group("resource-BucketAccessControlsResourceApi", () { | 1378 unittest.group("resource-BucketAccessControlsResourceApi", () { |
1220 unittest.test("method--delete", () { | 1379 unittest.test("method--delete", () { |
1221 | 1380 |
1222 var mock = new HttpServerMock(); | 1381 var mock = new HttpServerMock(); |
1223 api.BucketAccessControlsResourceApi res = new api.StorageApi(mock).bucketA
ccessControls; | 1382 api.BucketAccessControlsResourceApi res = new api.StorageApi(mock).bucketA
ccessControls; |
1224 var arg_bucket = "foo"; | 1383 var arg_bucket = "foo"; |
1225 var arg_entity = "foo"; | 1384 var arg_entity = "foo"; |
1226 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1385 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
1227 var path = (req.url).path; | 1386 var path = (req.url).path; |
1228 var pathOffset = 0; | 1387 var pathOffset = 0; |
(...skipping 435 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1664 "content-type" : "application/json; charset=utf-8", | 1823 "content-type" : "application/json; charset=utf-8", |
1665 }; | 1824 }; |
1666 var resp = convert.JSON.encode(buildBucket()); | 1825 var resp = convert.JSON.encode(buildBucket()); |
1667 return new async.Future.value(stringResponse(200, h, resp)); | 1826 return new async.Future.value(stringResponse(200, h, resp)); |
1668 }), true); | 1827 }), true); |
1669 res.get(arg_bucket, ifMetagenerationMatch: arg_ifMetagenerationMatch, ifMe
tagenerationNotMatch: arg_ifMetagenerationNotMatch, projection: arg_projection).
then(unittest.expectAsync(((api.Bucket response) { | 1828 res.get(arg_bucket, ifMetagenerationMatch: arg_ifMetagenerationMatch, ifMe
tagenerationNotMatch: arg_ifMetagenerationNotMatch, projection: arg_projection).
then(unittest.expectAsync(((api.Bucket response) { |
1670 checkBucket(response); | 1829 checkBucket(response); |
1671 }))); | 1830 }))); |
1672 }); | 1831 }); |
1673 | 1832 |
| 1833 unittest.test("method--getIamPolicy", () { |
| 1834 |
| 1835 var mock = new HttpServerMock(); |
| 1836 api.BucketsResourceApi res = new api.StorageApi(mock).buckets; |
| 1837 var arg_bucket = "foo"; |
| 1838 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 1839 var path = (req.url).path; |
| 1840 var pathOffset = 0; |
| 1841 var index; |
| 1842 var subPart; |
| 1843 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 1844 pathOffset += 1; |
| 1845 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("storage/v1/")); |
| 1846 pathOffset += 11; |
| 1847 unittest.expect(path.substring(pathOffset, pathOffset + 2), unittest.equ
als("b/")); |
| 1848 pathOffset += 2; |
| 1849 index = path.indexOf("/iam", pathOffset); |
| 1850 unittest.expect(index >= 0, unittest.isTrue); |
| 1851 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); |
| 1852 pathOffset = index; |
| 1853 unittest.expect(subPart, unittest.equals("$arg_bucket")); |
| 1854 unittest.expect(path.substring(pathOffset, pathOffset + 4), unittest.equ
als("/iam")); |
| 1855 pathOffset += 4; |
| 1856 |
| 1857 var query = (req.url).query; |
| 1858 var queryOffset = 0; |
| 1859 var queryMap = {}; |
| 1860 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 1861 parseBool(n) { |
| 1862 if (n == "true") return true; |
| 1863 if (n == "false") return false; |
| 1864 if (n == null) return null; |
| 1865 throw new core.ArgumentError("Invalid boolean: $n"); |
| 1866 } |
| 1867 if (query.length > 0) { |
| 1868 for (var part in query.split("&")) { |
| 1869 var keyvalue = part.split("="); |
| 1870 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 1871 } |
| 1872 } |
| 1873 |
| 1874 |
| 1875 var h = { |
| 1876 "content-type" : "application/json; charset=utf-8", |
| 1877 }; |
| 1878 var resp = convert.JSON.encode(buildPolicy()); |
| 1879 return new async.Future.value(stringResponse(200, h, resp)); |
| 1880 }), true); |
| 1881 res.getIamPolicy(arg_bucket).then(unittest.expectAsync(((api.Policy respon
se) { |
| 1882 checkPolicy(response); |
| 1883 }))); |
| 1884 }); |
| 1885 |
1674 unittest.test("method--insert", () { | 1886 unittest.test("method--insert", () { |
1675 | 1887 |
1676 var mock = new HttpServerMock(); | 1888 var mock = new HttpServerMock(); |
1677 api.BucketsResourceApi res = new api.StorageApi(mock).buckets; | 1889 api.BucketsResourceApi res = new api.StorageApi(mock).buckets; |
1678 var arg_request = buildBucket(); | 1890 var arg_request = buildBucket(); |
1679 var arg_project = "foo"; | 1891 var arg_project = "foo"; |
1680 var arg_predefinedAcl = "foo"; | 1892 var arg_predefinedAcl = "foo"; |
1681 var arg_predefinedDefaultObjectAcl = "foo"; | 1893 var arg_predefinedDefaultObjectAcl = "foo"; |
1682 var arg_projection = "foo"; | 1894 var arg_projection = "foo"; |
1683 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1895 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1839 "content-type" : "application/json; charset=utf-8", | 2051 "content-type" : "application/json; charset=utf-8", |
1840 }; | 2052 }; |
1841 var resp = convert.JSON.encode(buildBucket()); | 2053 var resp = convert.JSON.encode(buildBucket()); |
1842 return new async.Future.value(stringResponse(200, h, resp)); | 2054 return new async.Future.value(stringResponse(200, h, resp)); |
1843 }), true); | 2055 }), true); |
1844 res.patch(arg_request, arg_bucket, ifMetagenerationMatch: arg_ifMetagenera
tionMatch, ifMetagenerationNotMatch: arg_ifMetagenerationNotMatch, predefinedAcl
: arg_predefinedAcl, predefinedDefaultObjectAcl: arg_predefinedDefaultObjectAcl,
projection: arg_projection).then(unittest.expectAsync(((api.Bucket response) { | 2056 res.patch(arg_request, arg_bucket, ifMetagenerationMatch: arg_ifMetagenera
tionMatch, ifMetagenerationNotMatch: arg_ifMetagenerationNotMatch, predefinedAcl
: arg_predefinedAcl, predefinedDefaultObjectAcl: arg_predefinedDefaultObjectAcl,
projection: arg_projection).then(unittest.expectAsync(((api.Bucket response) { |
1845 checkBucket(response); | 2057 checkBucket(response); |
1846 }))); | 2058 }))); |
1847 }); | 2059 }); |
1848 | 2060 |
| 2061 unittest.test("method--setIamPolicy", () { |
| 2062 |
| 2063 var mock = new HttpServerMock(); |
| 2064 api.BucketsResourceApi res = new api.StorageApi(mock).buckets; |
| 2065 var arg_request = buildPolicy(); |
| 2066 var arg_bucket = "foo"; |
| 2067 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 2068 var obj = new api.Policy.fromJson(json); |
| 2069 checkPolicy(obj); |
| 2070 |
| 2071 var path = (req.url).path; |
| 2072 var pathOffset = 0; |
| 2073 var index; |
| 2074 var subPart; |
| 2075 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 2076 pathOffset += 1; |
| 2077 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("storage/v1/")); |
| 2078 pathOffset += 11; |
| 2079 unittest.expect(path.substring(pathOffset, pathOffset + 2), unittest.equ
als("b/")); |
| 2080 pathOffset += 2; |
| 2081 index = path.indexOf("/iam", pathOffset); |
| 2082 unittest.expect(index >= 0, unittest.isTrue); |
| 2083 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); |
| 2084 pathOffset = index; |
| 2085 unittest.expect(subPart, unittest.equals("$arg_bucket")); |
| 2086 unittest.expect(path.substring(pathOffset, pathOffset + 4), unittest.equ
als("/iam")); |
| 2087 pathOffset += 4; |
| 2088 |
| 2089 var query = (req.url).query; |
| 2090 var queryOffset = 0; |
| 2091 var queryMap = {}; |
| 2092 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 2093 parseBool(n) { |
| 2094 if (n == "true") return true; |
| 2095 if (n == "false") return false; |
| 2096 if (n == null) return null; |
| 2097 throw new core.ArgumentError("Invalid boolean: $n"); |
| 2098 } |
| 2099 if (query.length > 0) { |
| 2100 for (var part in query.split("&")) { |
| 2101 var keyvalue = part.split("="); |
| 2102 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 2103 } |
| 2104 } |
| 2105 |
| 2106 |
| 2107 var h = { |
| 2108 "content-type" : "application/json; charset=utf-8", |
| 2109 }; |
| 2110 var resp = convert.JSON.encode(buildPolicy()); |
| 2111 return new async.Future.value(stringResponse(200, h, resp)); |
| 2112 }), true); |
| 2113 res.setIamPolicy(arg_request, arg_bucket).then(unittest.expectAsync(((api.
Policy response) { |
| 2114 checkPolicy(response); |
| 2115 }))); |
| 2116 }); |
| 2117 |
| 2118 unittest.test("method--testIamPermissions", () { |
| 2119 |
| 2120 var mock = new HttpServerMock(); |
| 2121 api.BucketsResourceApi res = new api.StorageApi(mock).buckets; |
| 2122 var arg_bucket = "foo"; |
| 2123 var arg_permissions = buildUnnamed789(); |
| 2124 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 2125 var path = (req.url).path; |
| 2126 var pathOffset = 0; |
| 2127 var index; |
| 2128 var subPart; |
| 2129 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 2130 pathOffset += 1; |
| 2131 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("storage/v1/")); |
| 2132 pathOffset += 11; |
| 2133 unittest.expect(path.substring(pathOffset, pathOffset + 2), unittest.equ
als("b/")); |
| 2134 pathOffset += 2; |
| 2135 index = path.indexOf("/iam/testPermissions", pathOffset); |
| 2136 unittest.expect(index >= 0, unittest.isTrue); |
| 2137 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); |
| 2138 pathOffset = index; |
| 2139 unittest.expect(subPart, unittest.equals("$arg_bucket")); |
| 2140 unittest.expect(path.substring(pathOffset, pathOffset + 20), unittest.eq
uals("/iam/testPermissions")); |
| 2141 pathOffset += 20; |
| 2142 |
| 2143 var query = (req.url).query; |
| 2144 var queryOffset = 0; |
| 2145 var queryMap = {}; |
| 2146 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 2147 parseBool(n) { |
| 2148 if (n == "true") return true; |
| 2149 if (n == "false") return false; |
| 2150 if (n == null) return null; |
| 2151 throw new core.ArgumentError("Invalid boolean: $n"); |
| 2152 } |
| 2153 if (query.length > 0) { |
| 2154 for (var part in query.split("&")) { |
| 2155 var keyvalue = part.split("="); |
| 2156 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 2157 } |
| 2158 } |
| 2159 unittest.expect(queryMap["permissions"], unittest.equals(arg_permissions
)); |
| 2160 |
| 2161 |
| 2162 var h = { |
| 2163 "content-type" : "application/json; charset=utf-8", |
| 2164 }; |
| 2165 var resp = convert.JSON.encode(buildTestIamPermissionsResponse()); |
| 2166 return new async.Future.value(stringResponse(200, h, resp)); |
| 2167 }), true); |
| 2168 res.testIamPermissions(arg_bucket, arg_permissions).then(unittest.expectAs
ync(((api.TestIamPermissionsResponse response) { |
| 2169 checkTestIamPermissionsResponse(response); |
| 2170 }))); |
| 2171 }); |
| 2172 |
1849 unittest.test("method--update", () { | 2173 unittest.test("method--update", () { |
1850 | 2174 |
1851 var mock = new HttpServerMock(); | 2175 var mock = new HttpServerMock(); |
1852 api.BucketsResourceApi res = new api.StorageApi(mock).buckets; | 2176 api.BucketsResourceApi res = new api.StorageApi(mock).buckets; |
1853 var arg_request = buildBucket(); | 2177 var arg_request = buildBucket(); |
1854 var arg_bucket = "foo"; | 2178 var arg_bucket = "foo"; |
1855 var arg_ifMetagenerationMatch = "foo"; | 2179 var arg_ifMetagenerationMatch = "foo"; |
1856 var arg_ifMetagenerationNotMatch = "foo"; | 2180 var arg_ifMetagenerationNotMatch = "foo"; |
1857 var arg_predefinedAcl = "foo"; | 2181 var arg_predefinedAcl = "foo"; |
1858 var arg_predefinedDefaultObjectAcl = "foo"; | 2182 var arg_predefinedDefaultObjectAcl = "foo"; |
(...skipping 1168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3027 "content-type" : "application/json; charset=utf-8", | 3351 "content-type" : "application/json; charset=utf-8", |
3028 }; | 3352 }; |
3029 var resp = convert.JSON.encode(buildObject()); | 3353 var resp = convert.JSON.encode(buildObject()); |
3030 return new async.Future.value(stringResponse(200, h, resp)); | 3354 return new async.Future.value(stringResponse(200, h, resp)); |
3031 }), true); | 3355 }), true); |
3032 res.get(arg_bucket, arg_object, generation: arg_generation, ifGenerationMa
tch: arg_ifGenerationMatch, ifGenerationNotMatch: arg_ifGenerationNotMatch, ifMe
tagenerationMatch: arg_ifMetagenerationMatch, ifMetagenerationNotMatch: arg_ifMe
tagenerationNotMatch, projection: arg_projection).then(unittest.expectAsync(((ap
i.Object response) { | 3356 res.get(arg_bucket, arg_object, generation: arg_generation, ifGenerationMa
tch: arg_ifGenerationMatch, ifGenerationNotMatch: arg_ifGenerationNotMatch, ifMe
tagenerationMatch: arg_ifMetagenerationMatch, ifMetagenerationNotMatch: arg_ifMe
tagenerationNotMatch, projection: arg_projection).then(unittest.expectAsync(((ap
i.Object response) { |
3033 checkObject(response); | 3357 checkObject(response); |
3034 }))); | 3358 }))); |
3035 }); | 3359 }); |
3036 | 3360 |
| 3361 unittest.test("method--getIamPolicy", () { |
| 3362 |
| 3363 var mock = new HttpServerMock(); |
| 3364 api.ObjectsResourceApi res = new api.StorageApi(mock).objects; |
| 3365 var arg_bucket = "foo"; |
| 3366 var arg_object = "foo"; |
| 3367 var arg_generation = "foo"; |
| 3368 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 3369 var path = (req.url).path; |
| 3370 var pathOffset = 0; |
| 3371 var index; |
| 3372 var subPart; |
| 3373 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 3374 pathOffset += 1; |
| 3375 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("storage/v1/")); |
| 3376 pathOffset += 11; |
| 3377 unittest.expect(path.substring(pathOffset, pathOffset + 2), unittest.equ
als("b/")); |
| 3378 pathOffset += 2; |
| 3379 index = path.indexOf("/o/", pathOffset); |
| 3380 unittest.expect(index >= 0, unittest.isTrue); |
| 3381 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); |
| 3382 pathOffset = index; |
| 3383 unittest.expect(subPart, unittest.equals("$arg_bucket")); |
| 3384 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("/o/")); |
| 3385 pathOffset += 3; |
| 3386 index = path.indexOf("/iam", pathOffset); |
| 3387 unittest.expect(index >= 0, unittest.isTrue); |
| 3388 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); |
| 3389 pathOffset = index; |
| 3390 unittest.expect(subPart, unittest.equals("$arg_object")); |
| 3391 unittest.expect(path.substring(pathOffset, pathOffset + 4), unittest.equ
als("/iam")); |
| 3392 pathOffset += 4; |
| 3393 |
| 3394 var query = (req.url).query; |
| 3395 var queryOffset = 0; |
| 3396 var queryMap = {}; |
| 3397 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 3398 parseBool(n) { |
| 3399 if (n == "true") return true; |
| 3400 if (n == "false") return false; |
| 3401 if (n == null) return null; |
| 3402 throw new core.ArgumentError("Invalid boolean: $n"); |
| 3403 } |
| 3404 if (query.length > 0) { |
| 3405 for (var part in query.split("&")) { |
| 3406 var keyvalue = part.split("="); |
| 3407 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 3408 } |
| 3409 } |
| 3410 unittest.expect(queryMap["generation"].first, unittest.equals(arg_genera
tion)); |
| 3411 |
| 3412 |
| 3413 var h = { |
| 3414 "content-type" : "application/json; charset=utf-8", |
| 3415 }; |
| 3416 var resp = convert.JSON.encode(buildPolicy()); |
| 3417 return new async.Future.value(stringResponse(200, h, resp)); |
| 3418 }), true); |
| 3419 res.getIamPolicy(arg_bucket, arg_object, generation: arg_generation).then(
unittest.expectAsync(((api.Policy response) { |
| 3420 checkPolicy(response); |
| 3421 }))); |
| 3422 }); |
| 3423 |
3037 unittest.test("method--insert", () { | 3424 unittest.test("method--insert", () { |
3038 // TODO: Implement tests for media upload; | 3425 // TODO: Implement tests for media upload; |
3039 // TODO: Implement tests for media download; | 3426 // TODO: Implement tests for media download; |
3040 | 3427 |
3041 var mock = new HttpServerMock(); | 3428 var mock = new HttpServerMock(); |
3042 api.ObjectsResourceApi res = new api.StorageApi(mock).objects; | 3429 api.ObjectsResourceApi res = new api.StorageApi(mock).objects; |
3043 var arg_request = buildObject(); | 3430 var arg_request = buildObject(); |
3044 var arg_bucket = "foo"; | 3431 var arg_bucket = "foo"; |
3045 var arg_contentEncoding = "foo"; | 3432 var arg_contentEncoding = "foo"; |
3046 var arg_ifGenerationMatch = "foo"; | 3433 var arg_ifGenerationMatch = "foo"; |
(...skipping 298 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3345 "content-type" : "application/json; charset=utf-8", | 3732 "content-type" : "application/json; charset=utf-8", |
3346 }; | 3733 }; |
3347 var resp = convert.JSON.encode(buildRewriteResponse()); | 3734 var resp = convert.JSON.encode(buildRewriteResponse()); |
3348 return new async.Future.value(stringResponse(200, h, resp)); | 3735 return new async.Future.value(stringResponse(200, h, resp)); |
3349 }), true); | 3736 }), true); |
3350 res.rewrite(arg_request, arg_sourceBucket, arg_sourceObject, arg_destinati
onBucket, arg_destinationObject, destinationPredefinedAcl: arg_destinationPredef
inedAcl, ifGenerationMatch: arg_ifGenerationMatch, ifGenerationNotMatch: arg_ifG
enerationNotMatch, ifMetagenerationMatch: arg_ifMetagenerationMatch, ifMetagener
ationNotMatch: arg_ifMetagenerationNotMatch, ifSourceGenerationMatch: arg_ifSour
ceGenerationMatch, ifSourceGenerationNotMatch: arg_ifSourceGenerationNotMatch, i
fSourceMetagenerationMatch: arg_ifSourceMetagenerationMatch, ifSourceMetagenerat
ionNotMatch: arg_ifSourceMetagenerationNotMatch, maxBytesRewrittenPerCall: arg_m
axBytesRewrittenPerCall, projection: arg_projection, rewriteToken: arg_rewriteTo
ken, sourceGeneration: arg_sourceGeneration).then(unittest.expectAsync(((api.Rew
riteResponse response) { | 3737 res.rewrite(arg_request, arg_sourceBucket, arg_sourceObject, arg_destinati
onBucket, arg_destinationObject, destinationPredefinedAcl: arg_destinationPredef
inedAcl, ifGenerationMatch: arg_ifGenerationMatch, ifGenerationNotMatch: arg_ifG
enerationNotMatch, ifMetagenerationMatch: arg_ifMetagenerationMatch, ifMetagener
ationNotMatch: arg_ifMetagenerationNotMatch, ifSourceGenerationMatch: arg_ifSour
ceGenerationMatch, ifSourceGenerationNotMatch: arg_ifSourceGenerationNotMatch, i
fSourceMetagenerationMatch: arg_ifSourceMetagenerationMatch, ifSourceMetagenerat
ionNotMatch: arg_ifSourceMetagenerationNotMatch, maxBytesRewrittenPerCall: arg_m
axBytesRewrittenPerCall, projection: arg_projection, rewriteToken: arg_rewriteTo
ken, sourceGeneration: arg_sourceGeneration).then(unittest.expectAsync(((api.Rew
riteResponse response) { |
3351 checkRewriteResponse(response); | 3738 checkRewriteResponse(response); |
3352 }))); | 3739 }))); |
3353 }); | 3740 }); |
3354 | 3741 |
| 3742 unittest.test("method--setIamPolicy", () { |
| 3743 |
| 3744 var mock = new HttpServerMock(); |
| 3745 api.ObjectsResourceApi res = new api.StorageApi(mock).objects; |
| 3746 var arg_request = buildPolicy(); |
| 3747 var arg_bucket = "foo"; |
| 3748 var arg_object = "foo"; |
| 3749 var arg_generation = "foo"; |
| 3750 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 3751 var obj = new api.Policy.fromJson(json); |
| 3752 checkPolicy(obj); |
| 3753 |
| 3754 var path = (req.url).path; |
| 3755 var pathOffset = 0; |
| 3756 var index; |
| 3757 var subPart; |
| 3758 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 3759 pathOffset += 1; |
| 3760 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("storage/v1/")); |
| 3761 pathOffset += 11; |
| 3762 unittest.expect(path.substring(pathOffset, pathOffset + 2), unittest.equ
als("b/")); |
| 3763 pathOffset += 2; |
| 3764 index = path.indexOf("/o/", pathOffset); |
| 3765 unittest.expect(index >= 0, unittest.isTrue); |
| 3766 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); |
| 3767 pathOffset = index; |
| 3768 unittest.expect(subPart, unittest.equals("$arg_bucket")); |
| 3769 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("/o/")); |
| 3770 pathOffset += 3; |
| 3771 index = path.indexOf("/iam", pathOffset); |
| 3772 unittest.expect(index >= 0, unittest.isTrue); |
| 3773 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); |
| 3774 pathOffset = index; |
| 3775 unittest.expect(subPart, unittest.equals("$arg_object")); |
| 3776 unittest.expect(path.substring(pathOffset, pathOffset + 4), unittest.equ
als("/iam")); |
| 3777 pathOffset += 4; |
| 3778 |
| 3779 var query = (req.url).query; |
| 3780 var queryOffset = 0; |
| 3781 var queryMap = {}; |
| 3782 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 3783 parseBool(n) { |
| 3784 if (n == "true") return true; |
| 3785 if (n == "false") return false; |
| 3786 if (n == null) return null; |
| 3787 throw new core.ArgumentError("Invalid boolean: $n"); |
| 3788 } |
| 3789 if (query.length > 0) { |
| 3790 for (var part in query.split("&")) { |
| 3791 var keyvalue = part.split("="); |
| 3792 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 3793 } |
| 3794 } |
| 3795 unittest.expect(queryMap["generation"].first, unittest.equals(arg_genera
tion)); |
| 3796 |
| 3797 |
| 3798 var h = { |
| 3799 "content-type" : "application/json; charset=utf-8", |
| 3800 }; |
| 3801 var resp = convert.JSON.encode(buildPolicy()); |
| 3802 return new async.Future.value(stringResponse(200, h, resp)); |
| 3803 }), true); |
| 3804 res.setIamPolicy(arg_request, arg_bucket, arg_object, generation: arg_gene
ration).then(unittest.expectAsync(((api.Policy response) { |
| 3805 checkPolicy(response); |
| 3806 }))); |
| 3807 }); |
| 3808 |
| 3809 unittest.test("method--testIamPermissions", () { |
| 3810 |
| 3811 var mock = new HttpServerMock(); |
| 3812 api.ObjectsResourceApi res = new api.StorageApi(mock).objects; |
| 3813 var arg_bucket = "foo"; |
| 3814 var arg_object = "foo"; |
| 3815 var arg_permissions = buildUnnamed790(); |
| 3816 var arg_generation = "foo"; |
| 3817 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 3818 var path = (req.url).path; |
| 3819 var pathOffset = 0; |
| 3820 var index; |
| 3821 var subPart; |
| 3822 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 3823 pathOffset += 1; |
| 3824 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("storage/v1/")); |
| 3825 pathOffset += 11; |
| 3826 unittest.expect(path.substring(pathOffset, pathOffset + 2), unittest.equ
als("b/")); |
| 3827 pathOffset += 2; |
| 3828 index = path.indexOf("/o/", pathOffset); |
| 3829 unittest.expect(index >= 0, unittest.isTrue); |
| 3830 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); |
| 3831 pathOffset = index; |
| 3832 unittest.expect(subPart, unittest.equals("$arg_bucket")); |
| 3833 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("/o/")); |
| 3834 pathOffset += 3; |
| 3835 index = path.indexOf("/iam/testPermissions", pathOffset); |
| 3836 unittest.expect(index >= 0, unittest.isTrue); |
| 3837 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); |
| 3838 pathOffset = index; |
| 3839 unittest.expect(subPart, unittest.equals("$arg_object")); |
| 3840 unittest.expect(path.substring(pathOffset, pathOffset + 20), unittest.eq
uals("/iam/testPermissions")); |
| 3841 pathOffset += 20; |
| 3842 |
| 3843 var query = (req.url).query; |
| 3844 var queryOffset = 0; |
| 3845 var queryMap = {}; |
| 3846 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 3847 parseBool(n) { |
| 3848 if (n == "true") return true; |
| 3849 if (n == "false") return false; |
| 3850 if (n == null) return null; |
| 3851 throw new core.ArgumentError("Invalid boolean: $n"); |
| 3852 } |
| 3853 if (query.length > 0) { |
| 3854 for (var part in query.split("&")) { |
| 3855 var keyvalue = part.split("="); |
| 3856 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 3857 } |
| 3858 } |
| 3859 unittest.expect(queryMap["permissions"], unittest.equals(arg_permissions
)); |
| 3860 unittest.expect(queryMap["generation"].first, unittest.equals(arg_genera
tion)); |
| 3861 |
| 3862 |
| 3863 var h = { |
| 3864 "content-type" : "application/json; charset=utf-8", |
| 3865 }; |
| 3866 var resp = convert.JSON.encode(buildTestIamPermissionsResponse()); |
| 3867 return new async.Future.value(stringResponse(200, h, resp)); |
| 3868 }), true); |
| 3869 res.testIamPermissions(arg_bucket, arg_object, arg_permissions, generation
: arg_generation).then(unittest.expectAsync(((api.TestIamPermissionsResponse res
ponse) { |
| 3870 checkTestIamPermissionsResponse(response); |
| 3871 }))); |
| 3872 }); |
| 3873 |
3355 unittest.test("method--update", () { | 3874 unittest.test("method--update", () { |
3356 // TODO: Implement tests for media upload; | 3875 // TODO: Implement tests for media upload; |
3357 // TODO: Implement tests for media download; | 3876 // TODO: Implement tests for media download; |
3358 | 3877 |
3359 var mock = new HttpServerMock(); | 3878 var mock = new HttpServerMock(); |
3360 api.ObjectsResourceApi res = new api.StorageApi(mock).objects; | 3879 api.ObjectsResourceApi res = new api.StorageApi(mock).objects; |
3361 var arg_request = buildObject(); | 3880 var arg_request = buildObject(); |
3362 var arg_bucket = "foo"; | 3881 var arg_bucket = "foo"; |
3363 var arg_object = "foo"; | 3882 var arg_object = "foo"; |
3364 var arg_generation = "foo"; | 3883 var arg_generation = "foo"; |
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3496 res.watchAll(arg_request, arg_bucket, delimiter: arg_delimiter, maxResults
: arg_maxResults, pageToken: arg_pageToken, prefix: arg_prefix, projection: arg_
projection, versions: arg_versions).then(unittest.expectAsync(((api.Channel resp
onse) { | 4015 res.watchAll(arg_request, arg_bucket, delimiter: arg_delimiter, maxResults
: arg_maxResults, pageToken: arg_pageToken, prefix: arg_prefix, projection: arg_
projection, versions: arg_versions).then(unittest.expectAsync(((api.Channel resp
onse) { |
3497 checkChannel(response); | 4016 checkChannel(response); |
3498 }))); | 4017 }))); |
3499 }); | 4018 }); |
3500 | 4019 |
3501 }); | 4020 }); |
3502 | 4021 |
3503 | 4022 |
3504 } | 4023 } |
3505 | 4024 |
OLD | NEW |