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 buildUnnamed769() { | 54 buildUnnamed756() { |
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 checkUnnamed769(core.List<api.BucketAccessControl> o) { | 61 checkUnnamed756(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 buildUnnamed770() { | 67 buildUnnamed757() { |
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 checkUnnamed770(core.List<core.String> o) { | 74 checkUnnamed757(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 buildUnnamed771() { | 80 buildUnnamed758() { |
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 checkUnnamed771(core.List<core.String> o) { | 87 checkUnnamed758(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 buildUnnamed772() { | 93 buildUnnamed759() { |
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 checkUnnamed772(core.List<core.String> o) { | 100 checkUnnamed759(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 = buildUnnamed770(); | 112 o.method = buildUnnamed757(); |
113 o.origin = buildUnnamed771(); | 113 o.origin = buildUnnamed758(); |
114 o.responseHeader = buildUnnamed772(); | 114 o.responseHeader = buildUnnamed759(); |
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 checkUnnamed770(o.method); | 124 checkUnnamed757(o.method); |
125 checkUnnamed771(o.origin); | 125 checkUnnamed758(o.origin); |
126 checkUnnamed772(o.responseHeader); | 126 checkUnnamed759(o.responseHeader); |
127 } | 127 } |
128 buildCounterBucketCors--; | 128 buildCounterBucketCors--; |
129 } | 129 } |
130 | 130 |
131 buildUnnamed773() { | 131 buildUnnamed760() { |
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 checkUnnamed773(core.List<api.BucketCors> o) { | 138 checkUnnamed760(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 buildUnnamed774() { | 144 buildUnnamed761() { |
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 checkUnnamed774(core.List<api.ObjectAccessControl> o) { | 151 checkUnnamed761(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 buildUnnamed762() { |
| 158 var o = new core.Map<core.String, core.String>(); |
| 159 o["x"] = "foo"; |
| 160 o["y"] = "foo"; |
| 161 return o; |
| 162 } |
| 163 |
| 164 checkUnnamed762(core.Map<core.String, core.String> o) { |
| 165 unittest.expect(o, unittest.hasLength(2)); |
| 166 unittest.expect(o["x"], unittest.equals('foo')); |
| 167 unittest.expect(o["y"], unittest.equals('foo')); |
| 168 } |
| 169 |
157 core.int buildCounterBucketLifecycleRuleAction = 0; | 170 core.int buildCounterBucketLifecycleRuleAction = 0; |
158 buildBucketLifecycleRuleAction() { | 171 buildBucketLifecycleRuleAction() { |
159 var o = new api.BucketLifecycleRuleAction(); | 172 var o = new api.BucketLifecycleRuleAction(); |
160 buildCounterBucketLifecycleRuleAction++; | 173 buildCounterBucketLifecycleRuleAction++; |
161 if (buildCounterBucketLifecycleRuleAction < 3) { | 174 if (buildCounterBucketLifecycleRuleAction < 3) { |
162 o.storageClass = "foo"; | 175 o.storageClass = "foo"; |
163 o.type = "foo"; | 176 o.type = "foo"; |
164 } | 177 } |
165 buildCounterBucketLifecycleRuleAction--; | 178 buildCounterBucketLifecycleRuleAction--; |
166 return o; | 179 return o; |
167 } | 180 } |
168 | 181 |
169 checkBucketLifecycleRuleAction(api.BucketLifecycleRuleAction o) { | 182 checkBucketLifecycleRuleAction(api.BucketLifecycleRuleAction o) { |
170 buildCounterBucketLifecycleRuleAction++; | 183 buildCounterBucketLifecycleRuleAction++; |
171 if (buildCounterBucketLifecycleRuleAction < 3) { | 184 if (buildCounterBucketLifecycleRuleAction < 3) { |
172 unittest.expect(o.storageClass, unittest.equals('foo')); | 185 unittest.expect(o.storageClass, unittest.equals('foo')); |
173 unittest.expect(o.type, unittest.equals('foo')); | 186 unittest.expect(o.type, unittest.equals('foo')); |
174 } | 187 } |
175 buildCounterBucketLifecycleRuleAction--; | 188 buildCounterBucketLifecycleRuleAction--; |
176 } | 189 } |
177 | 190 |
178 buildUnnamed775() { | 191 buildUnnamed763() { |
179 var o = new core.List<core.String>(); | 192 var o = new core.List<core.String>(); |
180 o.add("foo"); | 193 o.add("foo"); |
181 o.add("foo"); | 194 o.add("foo"); |
182 return o; | 195 return o; |
183 } | 196 } |
184 | 197 |
185 checkUnnamed775(core.List<core.String> o) { | 198 checkUnnamed763(core.List<core.String> o) { |
186 unittest.expect(o, unittest.hasLength(2)); | 199 unittest.expect(o, unittest.hasLength(2)); |
187 unittest.expect(o[0], unittest.equals('foo')); | 200 unittest.expect(o[0], unittest.equals('foo')); |
188 unittest.expect(o[1], unittest.equals('foo')); | 201 unittest.expect(o[1], unittest.equals('foo')); |
189 } | 202 } |
190 | 203 |
191 core.int buildCounterBucketLifecycleRuleCondition = 0; | 204 core.int buildCounterBucketLifecycleRuleCondition = 0; |
192 buildBucketLifecycleRuleCondition() { | 205 buildBucketLifecycleRuleCondition() { |
193 var o = new api.BucketLifecycleRuleCondition(); | 206 var o = new api.BucketLifecycleRuleCondition(); |
194 buildCounterBucketLifecycleRuleCondition++; | 207 buildCounterBucketLifecycleRuleCondition++; |
195 if (buildCounterBucketLifecycleRuleCondition < 3) { | 208 if (buildCounterBucketLifecycleRuleCondition < 3) { |
196 o.age = 42; | 209 o.age = 42; |
197 o.createdBefore = core.DateTime.parse("2002-02-27T14:01:02Z"); | 210 o.createdBefore = core.DateTime.parse("2002-02-27T14:01:02Z"); |
198 o.isLive = true; | 211 o.isLive = true; |
199 o.matchesStorageClass = buildUnnamed775(); | 212 o.matchesStorageClass = buildUnnamed763(); |
200 o.numNewerVersions = 42; | 213 o.numNewerVersions = 42; |
201 } | 214 } |
202 buildCounterBucketLifecycleRuleCondition--; | 215 buildCounterBucketLifecycleRuleCondition--; |
203 return o; | 216 return o; |
204 } | 217 } |
205 | 218 |
206 checkBucketLifecycleRuleCondition(api.BucketLifecycleRuleCondition o) { | 219 checkBucketLifecycleRuleCondition(api.BucketLifecycleRuleCondition o) { |
207 buildCounterBucketLifecycleRuleCondition++; | 220 buildCounterBucketLifecycleRuleCondition++; |
208 if (buildCounterBucketLifecycleRuleCondition < 3) { | 221 if (buildCounterBucketLifecycleRuleCondition < 3) { |
209 unittest.expect(o.age, unittest.equals(42)); | 222 unittest.expect(o.age, unittest.equals(42)); |
210 unittest.expect(o.createdBefore, unittest.equals(core.DateTime.parse("2002-0
2-27T00:00:00"))); | 223 unittest.expect(o.createdBefore, unittest.equals(core.DateTime.parse("2002-0
2-27T00:00:00"))); |
211 unittest.expect(o.isLive, unittest.isTrue); | 224 unittest.expect(o.isLive, unittest.isTrue); |
212 checkUnnamed775(o.matchesStorageClass); | 225 checkUnnamed763(o.matchesStorageClass); |
213 unittest.expect(o.numNewerVersions, unittest.equals(42)); | 226 unittest.expect(o.numNewerVersions, unittest.equals(42)); |
214 } | 227 } |
215 buildCounterBucketLifecycleRuleCondition--; | 228 buildCounterBucketLifecycleRuleCondition--; |
216 } | 229 } |
217 | 230 |
218 core.int buildCounterBucketLifecycleRule = 0; | 231 core.int buildCounterBucketLifecycleRule = 0; |
219 buildBucketLifecycleRule() { | 232 buildBucketLifecycleRule() { |
220 var o = new api.BucketLifecycleRule(); | 233 var o = new api.BucketLifecycleRule(); |
221 buildCounterBucketLifecycleRule++; | 234 buildCounterBucketLifecycleRule++; |
222 if (buildCounterBucketLifecycleRule < 3) { | 235 if (buildCounterBucketLifecycleRule < 3) { |
223 o.action = buildBucketLifecycleRuleAction(); | 236 o.action = buildBucketLifecycleRuleAction(); |
224 o.condition = buildBucketLifecycleRuleCondition(); | 237 o.condition = buildBucketLifecycleRuleCondition(); |
225 } | 238 } |
226 buildCounterBucketLifecycleRule--; | 239 buildCounterBucketLifecycleRule--; |
227 return o; | 240 return o; |
228 } | 241 } |
229 | 242 |
230 checkBucketLifecycleRule(api.BucketLifecycleRule o) { | 243 checkBucketLifecycleRule(api.BucketLifecycleRule o) { |
231 buildCounterBucketLifecycleRule++; | 244 buildCounterBucketLifecycleRule++; |
232 if (buildCounterBucketLifecycleRule < 3) { | 245 if (buildCounterBucketLifecycleRule < 3) { |
233 checkBucketLifecycleRuleAction(o.action); | 246 checkBucketLifecycleRuleAction(o.action); |
234 checkBucketLifecycleRuleCondition(o.condition); | 247 checkBucketLifecycleRuleCondition(o.condition); |
235 } | 248 } |
236 buildCounterBucketLifecycleRule--; | 249 buildCounterBucketLifecycleRule--; |
237 } | 250 } |
238 | 251 |
239 buildUnnamed776() { | 252 buildUnnamed764() { |
240 var o = new core.List<api.BucketLifecycleRule>(); | 253 var o = new core.List<api.BucketLifecycleRule>(); |
241 o.add(buildBucketLifecycleRule()); | 254 o.add(buildBucketLifecycleRule()); |
242 o.add(buildBucketLifecycleRule()); | 255 o.add(buildBucketLifecycleRule()); |
243 return o; | 256 return o; |
244 } | 257 } |
245 | 258 |
246 checkUnnamed776(core.List<api.BucketLifecycleRule> o) { | 259 checkUnnamed764(core.List<api.BucketLifecycleRule> o) { |
247 unittest.expect(o, unittest.hasLength(2)); | 260 unittest.expect(o, unittest.hasLength(2)); |
248 checkBucketLifecycleRule(o[0]); | 261 checkBucketLifecycleRule(o[0]); |
249 checkBucketLifecycleRule(o[1]); | 262 checkBucketLifecycleRule(o[1]); |
250 } | 263 } |
251 | 264 |
252 core.int buildCounterBucketLifecycle = 0; | 265 core.int buildCounterBucketLifecycle = 0; |
253 buildBucketLifecycle() { | 266 buildBucketLifecycle() { |
254 var o = new api.BucketLifecycle(); | 267 var o = new api.BucketLifecycle(); |
255 buildCounterBucketLifecycle++; | 268 buildCounterBucketLifecycle++; |
256 if (buildCounterBucketLifecycle < 3) { | 269 if (buildCounterBucketLifecycle < 3) { |
257 o.rule = buildUnnamed776(); | 270 o.rule = buildUnnamed764(); |
258 } | 271 } |
259 buildCounterBucketLifecycle--; | 272 buildCounterBucketLifecycle--; |
260 return o; | 273 return o; |
261 } | 274 } |
262 | 275 |
263 checkBucketLifecycle(api.BucketLifecycle o) { | 276 checkBucketLifecycle(api.BucketLifecycle o) { |
264 buildCounterBucketLifecycle++; | 277 buildCounterBucketLifecycle++; |
265 if (buildCounterBucketLifecycle < 3) { | 278 if (buildCounterBucketLifecycle < 3) { |
266 checkUnnamed776(o.rule); | 279 checkUnnamed764(o.rule); |
267 } | 280 } |
268 buildCounterBucketLifecycle--; | 281 buildCounterBucketLifecycle--; |
269 } | 282 } |
270 | 283 |
271 core.int buildCounterBucketLogging = 0; | 284 core.int buildCounterBucketLogging = 0; |
272 buildBucketLogging() { | 285 buildBucketLogging() { |
273 var o = new api.BucketLogging(); | 286 var o = new api.BucketLogging(); |
274 buildCounterBucketLogging++; | 287 buildCounterBucketLogging++; |
275 if (buildCounterBucketLogging < 3) { | 288 if (buildCounterBucketLogging < 3) { |
276 o.logBucket = "foo"; | 289 o.logBucket = "foo"; |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
348 unittest.expect(o.notFoundPage, unittest.equals('foo')); | 361 unittest.expect(o.notFoundPage, unittest.equals('foo')); |
349 } | 362 } |
350 buildCounterBucketWebsite--; | 363 buildCounterBucketWebsite--; |
351 } | 364 } |
352 | 365 |
353 core.int buildCounterBucket = 0; | 366 core.int buildCounterBucket = 0; |
354 buildBucket() { | 367 buildBucket() { |
355 var o = new api.Bucket(); | 368 var o = new api.Bucket(); |
356 buildCounterBucket++; | 369 buildCounterBucket++; |
357 if (buildCounterBucket < 3) { | 370 if (buildCounterBucket < 3) { |
358 o.acl = buildUnnamed769(); | 371 o.acl = buildUnnamed756(); |
359 o.cors = buildUnnamed773(); | 372 o.cors = buildUnnamed760(); |
360 o.defaultObjectAcl = buildUnnamed774(); | 373 o.defaultObjectAcl = buildUnnamed761(); |
361 o.etag = "foo"; | 374 o.etag = "foo"; |
362 o.id = "foo"; | 375 o.id = "foo"; |
363 o.kind = "foo"; | 376 o.kind = "foo"; |
| 377 o.labels = buildUnnamed762(); |
364 o.lifecycle = buildBucketLifecycle(); | 378 o.lifecycle = buildBucketLifecycle(); |
365 o.location = "foo"; | 379 o.location = "foo"; |
366 o.logging = buildBucketLogging(); | 380 o.logging = buildBucketLogging(); |
367 o.metageneration = "foo"; | 381 o.metageneration = "foo"; |
368 o.name = "foo"; | 382 o.name = "foo"; |
369 o.owner = buildBucketOwner(); | 383 o.owner = buildBucketOwner(); |
370 o.projectNumber = "foo"; | 384 o.projectNumber = "foo"; |
371 o.selfLink = "foo"; | 385 o.selfLink = "foo"; |
372 o.storageClass = "foo"; | 386 o.storageClass = "foo"; |
373 o.timeCreated = core.DateTime.parse("2002-02-27T14:01:02"); | 387 o.timeCreated = core.DateTime.parse("2002-02-27T14:01:02"); |
374 o.updated = core.DateTime.parse("2002-02-27T14:01:02"); | 388 o.updated = core.DateTime.parse("2002-02-27T14:01:02"); |
375 o.versioning = buildBucketVersioning(); | 389 o.versioning = buildBucketVersioning(); |
376 o.website = buildBucketWebsite(); | 390 o.website = buildBucketWebsite(); |
377 } | 391 } |
378 buildCounterBucket--; | 392 buildCounterBucket--; |
379 return o; | 393 return o; |
380 } | 394 } |
381 | 395 |
382 checkBucket(api.Bucket o) { | 396 checkBucket(api.Bucket o) { |
383 buildCounterBucket++; | 397 buildCounterBucket++; |
384 if (buildCounterBucket < 3) { | 398 if (buildCounterBucket < 3) { |
385 checkUnnamed769(o.acl); | 399 checkUnnamed756(o.acl); |
386 checkUnnamed773(o.cors); | 400 checkUnnamed760(o.cors); |
387 checkUnnamed774(o.defaultObjectAcl); | 401 checkUnnamed761(o.defaultObjectAcl); |
388 unittest.expect(o.etag, unittest.equals('foo')); | 402 unittest.expect(o.etag, unittest.equals('foo')); |
389 unittest.expect(o.id, unittest.equals('foo')); | 403 unittest.expect(o.id, unittest.equals('foo')); |
390 unittest.expect(o.kind, unittest.equals('foo')); | 404 unittest.expect(o.kind, unittest.equals('foo')); |
| 405 checkUnnamed762(o.labels); |
391 checkBucketLifecycle(o.lifecycle); | 406 checkBucketLifecycle(o.lifecycle); |
392 unittest.expect(o.location, unittest.equals('foo')); | 407 unittest.expect(o.location, unittest.equals('foo')); |
393 checkBucketLogging(o.logging); | 408 checkBucketLogging(o.logging); |
394 unittest.expect(o.metageneration, unittest.equals('foo')); | 409 unittest.expect(o.metageneration, unittest.equals('foo')); |
395 unittest.expect(o.name, unittest.equals('foo')); | 410 unittest.expect(o.name, unittest.equals('foo')); |
396 checkBucketOwner(o.owner); | 411 checkBucketOwner(o.owner); |
397 unittest.expect(o.projectNumber, unittest.equals('foo')); | 412 unittest.expect(o.projectNumber, unittest.equals('foo')); |
398 unittest.expect(o.selfLink, unittest.equals('foo')); | 413 unittest.expect(o.selfLink, unittest.equals('foo')); |
399 unittest.expect(o.storageClass, unittest.equals('foo')); | 414 unittest.expect(o.storageClass, unittest.equals('foo')); |
400 unittest.expect(o.timeCreated, unittest.equals(core.DateTime.parse("2002-02-
27T14:01:02"))); | 415 unittest.expect(o.timeCreated, unittest.equals(core.DateTime.parse("2002-02-
27T14:01:02"))); |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
458 unittest.expect(o.etag, unittest.equals('foo')); | 473 unittest.expect(o.etag, unittest.equals('foo')); |
459 unittest.expect(o.id, unittest.equals('foo')); | 474 unittest.expect(o.id, unittest.equals('foo')); |
460 unittest.expect(o.kind, unittest.equals('foo')); | 475 unittest.expect(o.kind, unittest.equals('foo')); |
461 checkBucketAccessControlProjectTeam(o.projectTeam); | 476 checkBucketAccessControlProjectTeam(o.projectTeam); |
462 unittest.expect(o.role, unittest.equals('foo')); | 477 unittest.expect(o.role, unittest.equals('foo')); |
463 unittest.expect(o.selfLink, unittest.equals('foo')); | 478 unittest.expect(o.selfLink, unittest.equals('foo')); |
464 } | 479 } |
465 buildCounterBucketAccessControl--; | 480 buildCounterBucketAccessControl--; |
466 } | 481 } |
467 | 482 |
468 buildUnnamed777() { | 483 buildUnnamed765() { |
469 var o = new core.List<api.BucketAccessControl>(); | 484 var o = new core.List<api.BucketAccessControl>(); |
470 o.add(buildBucketAccessControl()); | 485 o.add(buildBucketAccessControl()); |
471 o.add(buildBucketAccessControl()); | 486 o.add(buildBucketAccessControl()); |
472 return o; | 487 return o; |
473 } | 488 } |
474 | 489 |
475 checkUnnamed777(core.List<api.BucketAccessControl> o) { | 490 checkUnnamed765(core.List<api.BucketAccessControl> o) { |
476 unittest.expect(o, unittest.hasLength(2)); | 491 unittest.expect(o, unittest.hasLength(2)); |
477 checkBucketAccessControl(o[0]); | 492 checkBucketAccessControl(o[0]); |
478 checkBucketAccessControl(o[1]); | 493 checkBucketAccessControl(o[1]); |
479 } | 494 } |
480 | 495 |
481 core.int buildCounterBucketAccessControls = 0; | 496 core.int buildCounterBucketAccessControls = 0; |
482 buildBucketAccessControls() { | 497 buildBucketAccessControls() { |
483 var o = new api.BucketAccessControls(); | 498 var o = new api.BucketAccessControls(); |
484 buildCounterBucketAccessControls++; | 499 buildCounterBucketAccessControls++; |
485 if (buildCounterBucketAccessControls < 3) { | 500 if (buildCounterBucketAccessControls < 3) { |
486 o.items = buildUnnamed777(); | 501 o.items = buildUnnamed765(); |
487 o.kind = "foo"; | 502 o.kind = "foo"; |
488 } | 503 } |
489 buildCounterBucketAccessControls--; | 504 buildCounterBucketAccessControls--; |
490 return o; | 505 return o; |
491 } | 506 } |
492 | 507 |
493 checkBucketAccessControls(api.BucketAccessControls o) { | 508 checkBucketAccessControls(api.BucketAccessControls o) { |
494 buildCounterBucketAccessControls++; | 509 buildCounterBucketAccessControls++; |
495 if (buildCounterBucketAccessControls < 3) { | 510 if (buildCounterBucketAccessControls < 3) { |
496 checkUnnamed777(o.items); | 511 checkUnnamed765(o.items); |
497 unittest.expect(o.kind, unittest.equals('foo')); | 512 unittest.expect(o.kind, unittest.equals('foo')); |
498 } | 513 } |
499 buildCounterBucketAccessControls--; | 514 buildCounterBucketAccessControls--; |
500 } | 515 } |
501 | 516 |
502 buildUnnamed778() { | 517 buildUnnamed766() { |
503 var o = new core.List<api.Bucket>(); | 518 var o = new core.List<api.Bucket>(); |
504 o.add(buildBucket()); | 519 o.add(buildBucket()); |
505 o.add(buildBucket()); | 520 o.add(buildBucket()); |
506 return o; | 521 return o; |
507 } | 522 } |
508 | 523 |
509 checkUnnamed778(core.List<api.Bucket> o) { | 524 checkUnnamed766(core.List<api.Bucket> o) { |
510 unittest.expect(o, unittest.hasLength(2)); | 525 unittest.expect(o, unittest.hasLength(2)); |
511 checkBucket(o[0]); | 526 checkBucket(o[0]); |
512 checkBucket(o[1]); | 527 checkBucket(o[1]); |
513 } | 528 } |
514 | 529 |
515 core.int buildCounterBuckets = 0; | 530 core.int buildCounterBuckets = 0; |
516 buildBuckets() { | 531 buildBuckets() { |
517 var o = new api.Buckets(); | 532 var o = new api.Buckets(); |
518 buildCounterBuckets++; | 533 buildCounterBuckets++; |
519 if (buildCounterBuckets < 3) { | 534 if (buildCounterBuckets < 3) { |
520 o.items = buildUnnamed778(); | 535 o.items = buildUnnamed766(); |
521 o.kind = "foo"; | 536 o.kind = "foo"; |
522 o.nextPageToken = "foo"; | 537 o.nextPageToken = "foo"; |
523 } | 538 } |
524 buildCounterBuckets--; | 539 buildCounterBuckets--; |
525 return o; | 540 return o; |
526 } | 541 } |
527 | 542 |
528 checkBuckets(api.Buckets o) { | 543 checkBuckets(api.Buckets o) { |
529 buildCounterBuckets++; | 544 buildCounterBuckets++; |
530 if (buildCounterBuckets < 3) { | 545 if (buildCounterBuckets < 3) { |
531 checkUnnamed778(o.items); | 546 checkUnnamed766(o.items); |
532 unittest.expect(o.kind, unittest.equals('foo')); | 547 unittest.expect(o.kind, unittest.equals('foo')); |
533 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 548 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
534 } | 549 } |
535 buildCounterBuckets--; | 550 buildCounterBuckets--; |
536 } | 551 } |
537 | 552 |
538 buildUnnamed779() { | 553 buildUnnamed767() { |
539 var o = new core.Map<core.String, core.String>(); | 554 var o = new core.Map<core.String, core.String>(); |
540 o["x"] = "foo"; | 555 o["x"] = "foo"; |
541 o["y"] = "foo"; | 556 o["y"] = "foo"; |
542 return o; | 557 return o; |
543 } | 558 } |
544 | 559 |
545 checkUnnamed779(core.Map<core.String, core.String> o) { | 560 checkUnnamed767(core.Map<core.String, core.String> o) { |
546 unittest.expect(o, unittest.hasLength(2)); | 561 unittest.expect(o, unittest.hasLength(2)); |
547 unittest.expect(o["x"], unittest.equals('foo')); | 562 unittest.expect(o["x"], unittest.equals('foo')); |
548 unittest.expect(o["y"], unittest.equals('foo')); | 563 unittest.expect(o["y"], unittest.equals('foo')); |
549 } | 564 } |
550 | 565 |
551 core.int buildCounterChannel = 0; | 566 core.int buildCounterChannel = 0; |
552 buildChannel() { | 567 buildChannel() { |
553 var o = new api.Channel(); | 568 var o = new api.Channel(); |
554 buildCounterChannel++; | 569 buildCounterChannel++; |
555 if (buildCounterChannel < 3) { | 570 if (buildCounterChannel < 3) { |
556 o.address = "foo"; | 571 o.address = "foo"; |
557 o.expiration = "foo"; | 572 o.expiration = "foo"; |
558 o.id = "foo"; | 573 o.id = "foo"; |
559 o.kind = "foo"; | 574 o.kind = "foo"; |
560 o.params = buildUnnamed779(); | 575 o.params = buildUnnamed767(); |
561 o.payload = true; | 576 o.payload = true; |
562 o.resourceId = "foo"; | 577 o.resourceId = "foo"; |
563 o.resourceUri = "foo"; | 578 o.resourceUri = "foo"; |
564 o.token = "foo"; | 579 o.token = "foo"; |
565 o.type = "foo"; | 580 o.type = "foo"; |
566 } | 581 } |
567 buildCounterChannel--; | 582 buildCounterChannel--; |
568 return o; | 583 return o; |
569 } | 584 } |
570 | 585 |
571 checkChannel(api.Channel o) { | 586 checkChannel(api.Channel o) { |
572 buildCounterChannel++; | 587 buildCounterChannel++; |
573 if (buildCounterChannel < 3) { | 588 if (buildCounterChannel < 3) { |
574 unittest.expect(o.address, unittest.equals('foo')); | 589 unittest.expect(o.address, unittest.equals('foo')); |
575 unittest.expect(o.expiration, unittest.equals('foo')); | 590 unittest.expect(o.expiration, unittest.equals('foo')); |
576 unittest.expect(o.id, unittest.equals('foo')); | 591 unittest.expect(o.id, unittest.equals('foo')); |
577 unittest.expect(o.kind, unittest.equals('foo')); | 592 unittest.expect(o.kind, unittest.equals('foo')); |
578 checkUnnamed779(o.params); | 593 checkUnnamed767(o.params); |
579 unittest.expect(o.payload, unittest.isTrue); | 594 unittest.expect(o.payload, unittest.isTrue); |
580 unittest.expect(o.resourceId, unittest.equals('foo')); | 595 unittest.expect(o.resourceId, unittest.equals('foo')); |
581 unittest.expect(o.resourceUri, unittest.equals('foo')); | 596 unittest.expect(o.resourceUri, unittest.equals('foo')); |
582 unittest.expect(o.token, unittest.equals('foo')); | 597 unittest.expect(o.token, unittest.equals('foo')); |
583 unittest.expect(o.type, unittest.equals('foo')); | 598 unittest.expect(o.type, unittest.equals('foo')); |
584 } | 599 } |
585 buildCounterChannel--; | 600 buildCounterChannel--; |
586 } | 601 } |
587 | 602 |
588 core.int buildCounterComposeRequestSourceObjectsObjectPreconditions = 0; | 603 core.int buildCounterComposeRequestSourceObjectsObjectPreconditions = 0; |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
620 checkComposeRequestSourceObjects(api.ComposeRequestSourceObjects o) { | 635 checkComposeRequestSourceObjects(api.ComposeRequestSourceObjects o) { |
621 buildCounterComposeRequestSourceObjects++; | 636 buildCounterComposeRequestSourceObjects++; |
622 if (buildCounterComposeRequestSourceObjects < 3) { | 637 if (buildCounterComposeRequestSourceObjects < 3) { |
623 unittest.expect(o.generation, unittest.equals('foo')); | 638 unittest.expect(o.generation, unittest.equals('foo')); |
624 unittest.expect(o.name, unittest.equals('foo')); | 639 unittest.expect(o.name, unittest.equals('foo')); |
625 checkComposeRequestSourceObjectsObjectPreconditions(o.objectPreconditions); | 640 checkComposeRequestSourceObjectsObjectPreconditions(o.objectPreconditions); |
626 } | 641 } |
627 buildCounterComposeRequestSourceObjects--; | 642 buildCounterComposeRequestSourceObjects--; |
628 } | 643 } |
629 | 644 |
630 buildUnnamed780() { | 645 buildUnnamed768() { |
631 var o = new core.List<api.ComposeRequestSourceObjects>(); | 646 var o = new core.List<api.ComposeRequestSourceObjects>(); |
632 o.add(buildComposeRequestSourceObjects()); | 647 o.add(buildComposeRequestSourceObjects()); |
633 o.add(buildComposeRequestSourceObjects()); | 648 o.add(buildComposeRequestSourceObjects()); |
634 return o; | 649 return o; |
635 } | 650 } |
636 | 651 |
637 checkUnnamed780(core.List<api.ComposeRequestSourceObjects> o) { | 652 checkUnnamed768(core.List<api.ComposeRequestSourceObjects> o) { |
638 unittest.expect(o, unittest.hasLength(2)); | 653 unittest.expect(o, unittest.hasLength(2)); |
639 checkComposeRequestSourceObjects(o[0]); | 654 checkComposeRequestSourceObjects(o[0]); |
640 checkComposeRequestSourceObjects(o[1]); | 655 checkComposeRequestSourceObjects(o[1]); |
641 } | 656 } |
642 | 657 |
643 core.int buildCounterComposeRequest = 0; | 658 core.int buildCounterComposeRequest = 0; |
644 buildComposeRequest() { | 659 buildComposeRequest() { |
645 var o = new api.ComposeRequest(); | 660 var o = new api.ComposeRequest(); |
646 buildCounterComposeRequest++; | 661 buildCounterComposeRequest++; |
647 if (buildCounterComposeRequest < 3) { | 662 if (buildCounterComposeRequest < 3) { |
648 o.destination = buildObject(); | 663 o.destination = buildObject(); |
649 o.kind = "foo"; | 664 o.kind = "foo"; |
650 o.sourceObjects = buildUnnamed780(); | 665 o.sourceObjects = buildUnnamed768(); |
651 } | 666 } |
652 buildCounterComposeRequest--; | 667 buildCounterComposeRequest--; |
653 return o; | 668 return o; |
654 } | 669 } |
655 | 670 |
656 checkComposeRequest(api.ComposeRequest o) { | 671 checkComposeRequest(api.ComposeRequest o) { |
657 buildCounterComposeRequest++; | 672 buildCounterComposeRequest++; |
658 if (buildCounterComposeRequest < 3) { | 673 if (buildCounterComposeRequest < 3) { |
659 checkObject(o.destination); | 674 checkObject(o.destination); |
660 unittest.expect(o.kind, unittest.equals('foo')); | 675 unittest.expect(o.kind, unittest.equals('foo')); |
661 checkUnnamed780(o.sourceObjects); | 676 checkUnnamed768(o.sourceObjects); |
662 } | 677 } |
663 buildCounterComposeRequest--; | 678 buildCounterComposeRequest--; |
664 } | 679 } |
665 | 680 |
666 buildUnnamed781() { | 681 buildUnnamed769() { |
| 682 var o = new core.Map<core.String, core.String>(); |
| 683 o["x"] = "foo"; |
| 684 o["y"] = "foo"; |
| 685 return o; |
| 686 } |
| 687 |
| 688 checkUnnamed769(core.Map<core.String, core.String> o) { |
| 689 unittest.expect(o, unittest.hasLength(2)); |
| 690 unittest.expect(o["x"], unittest.equals('foo')); |
| 691 unittest.expect(o["y"], unittest.equals('foo')); |
| 692 } |
| 693 |
| 694 buildUnnamed770() { |
| 695 var o = new core.List<core.String>(); |
| 696 o.add("foo"); |
| 697 o.add("foo"); |
| 698 return o; |
| 699 } |
| 700 |
| 701 checkUnnamed770(core.List<core.String> o) { |
| 702 unittest.expect(o, unittest.hasLength(2)); |
| 703 unittest.expect(o[0], unittest.equals('foo')); |
| 704 unittest.expect(o[1], unittest.equals('foo')); |
| 705 } |
| 706 |
| 707 core.int buildCounterNotification = 0; |
| 708 buildNotification() { |
| 709 var o = new api.Notification(); |
| 710 buildCounterNotification++; |
| 711 if (buildCounterNotification < 3) { |
| 712 o.customAttributes = buildUnnamed769(); |
| 713 o.etag = "foo"; |
| 714 o.eventTypes = buildUnnamed770(); |
| 715 o.id = "foo"; |
| 716 o.kind = "foo"; |
| 717 o.objectNamePrefix = "foo"; |
| 718 o.payloadFormat = "foo"; |
| 719 o.selfLink = "foo"; |
| 720 o.topic = "foo"; |
| 721 } |
| 722 buildCounterNotification--; |
| 723 return o; |
| 724 } |
| 725 |
| 726 checkNotification(api.Notification o) { |
| 727 buildCounterNotification++; |
| 728 if (buildCounterNotification < 3) { |
| 729 checkUnnamed769(o.customAttributes); |
| 730 unittest.expect(o.etag, unittest.equals('foo')); |
| 731 checkUnnamed770(o.eventTypes); |
| 732 unittest.expect(o.id, unittest.equals('foo')); |
| 733 unittest.expect(o.kind, unittest.equals('foo')); |
| 734 unittest.expect(o.objectNamePrefix, unittest.equals('foo')); |
| 735 unittest.expect(o.payloadFormat, unittest.equals('foo')); |
| 736 unittest.expect(o.selfLink, unittest.equals('foo')); |
| 737 unittest.expect(o.topic, unittest.equals('foo')); |
| 738 } |
| 739 buildCounterNotification--; |
| 740 } |
| 741 |
| 742 buildUnnamed771() { |
| 743 var o = new core.List<api.Notification>(); |
| 744 o.add(buildNotification()); |
| 745 o.add(buildNotification()); |
| 746 return o; |
| 747 } |
| 748 |
| 749 checkUnnamed771(core.List<api.Notification> o) { |
| 750 unittest.expect(o, unittest.hasLength(2)); |
| 751 checkNotification(o[0]); |
| 752 checkNotification(o[1]); |
| 753 } |
| 754 |
| 755 core.int buildCounterNotifications = 0; |
| 756 buildNotifications() { |
| 757 var o = new api.Notifications(); |
| 758 buildCounterNotifications++; |
| 759 if (buildCounterNotifications < 3) { |
| 760 o.items = buildUnnamed771(); |
| 761 o.kind = "foo"; |
| 762 } |
| 763 buildCounterNotifications--; |
| 764 return o; |
| 765 } |
| 766 |
| 767 checkNotifications(api.Notifications o) { |
| 768 buildCounterNotifications++; |
| 769 if (buildCounterNotifications < 3) { |
| 770 checkUnnamed771(o.items); |
| 771 unittest.expect(o.kind, unittest.equals('foo')); |
| 772 } |
| 773 buildCounterNotifications--; |
| 774 } |
| 775 |
| 776 buildUnnamed772() { |
667 var o = new core.List<api.ObjectAccessControl>(); | 777 var o = new core.List<api.ObjectAccessControl>(); |
668 o.add(buildObjectAccessControl()); | 778 o.add(buildObjectAccessControl()); |
669 o.add(buildObjectAccessControl()); | 779 o.add(buildObjectAccessControl()); |
670 return o; | 780 return o; |
671 } | 781 } |
672 | 782 |
673 checkUnnamed781(core.List<api.ObjectAccessControl> o) { | 783 checkUnnamed772(core.List<api.ObjectAccessControl> o) { |
674 unittest.expect(o, unittest.hasLength(2)); | 784 unittest.expect(o, unittest.hasLength(2)); |
675 checkObjectAccessControl(o[0]); | 785 checkObjectAccessControl(o[0]); |
676 checkObjectAccessControl(o[1]); | 786 checkObjectAccessControl(o[1]); |
677 } | 787 } |
678 | 788 |
679 core.int buildCounterObjectCustomerEncryption = 0; | 789 core.int buildCounterObjectCustomerEncryption = 0; |
680 buildObjectCustomerEncryption() { | 790 buildObjectCustomerEncryption() { |
681 var o = new api.ObjectCustomerEncryption(); | 791 var o = new api.ObjectCustomerEncryption(); |
682 buildCounterObjectCustomerEncryption++; | 792 buildCounterObjectCustomerEncryption++; |
683 if (buildCounterObjectCustomerEncryption < 3) { | 793 if (buildCounterObjectCustomerEncryption < 3) { |
684 o.encryptionAlgorithm = "foo"; | 794 o.encryptionAlgorithm = "foo"; |
685 o.keySha256 = "foo"; | 795 o.keySha256 = "foo"; |
686 } | 796 } |
687 buildCounterObjectCustomerEncryption--; | 797 buildCounterObjectCustomerEncryption--; |
688 return o; | 798 return o; |
689 } | 799 } |
690 | 800 |
691 checkObjectCustomerEncryption(api.ObjectCustomerEncryption o) { | 801 checkObjectCustomerEncryption(api.ObjectCustomerEncryption o) { |
692 buildCounterObjectCustomerEncryption++; | 802 buildCounterObjectCustomerEncryption++; |
693 if (buildCounterObjectCustomerEncryption < 3) { | 803 if (buildCounterObjectCustomerEncryption < 3) { |
694 unittest.expect(o.encryptionAlgorithm, unittest.equals('foo')); | 804 unittest.expect(o.encryptionAlgorithm, unittest.equals('foo')); |
695 unittest.expect(o.keySha256, unittest.equals('foo')); | 805 unittest.expect(o.keySha256, unittest.equals('foo')); |
696 } | 806 } |
697 buildCounterObjectCustomerEncryption--; | 807 buildCounterObjectCustomerEncryption--; |
698 } | 808 } |
699 | 809 |
700 buildUnnamed782() { | 810 buildUnnamed773() { |
701 var o = new core.Map<core.String, core.String>(); | 811 var o = new core.Map<core.String, core.String>(); |
702 o["x"] = "foo"; | 812 o["x"] = "foo"; |
703 o["y"] = "foo"; | 813 o["y"] = "foo"; |
704 return o; | 814 return o; |
705 } | 815 } |
706 | 816 |
707 checkUnnamed782(core.Map<core.String, core.String> o) { | 817 checkUnnamed773(core.Map<core.String, core.String> o) { |
708 unittest.expect(o, unittest.hasLength(2)); | 818 unittest.expect(o, unittest.hasLength(2)); |
709 unittest.expect(o["x"], unittest.equals('foo')); | 819 unittest.expect(o["x"], unittest.equals('foo')); |
710 unittest.expect(o["y"], unittest.equals('foo')); | 820 unittest.expect(o["y"], unittest.equals('foo')); |
711 } | 821 } |
712 | 822 |
713 core.int buildCounterObjectOwner = 0; | 823 core.int buildCounterObjectOwner = 0; |
714 buildObjectOwner() { | 824 buildObjectOwner() { |
715 var o = new api.ObjectOwner(); | 825 var o = new api.ObjectOwner(); |
716 buildCounterObjectOwner++; | 826 buildCounterObjectOwner++; |
717 if (buildCounterObjectOwner < 3) { | 827 if (buildCounterObjectOwner < 3) { |
(...skipping 11 matching lines...) Expand all Loading... |
729 unittest.expect(o.entityId, unittest.equals('foo')); | 839 unittest.expect(o.entityId, unittest.equals('foo')); |
730 } | 840 } |
731 buildCounterObjectOwner--; | 841 buildCounterObjectOwner--; |
732 } | 842 } |
733 | 843 |
734 core.int buildCounterObject = 0; | 844 core.int buildCounterObject = 0; |
735 buildObject() { | 845 buildObject() { |
736 var o = new api.Object(); | 846 var o = new api.Object(); |
737 buildCounterObject++; | 847 buildCounterObject++; |
738 if (buildCounterObject < 3) { | 848 if (buildCounterObject < 3) { |
739 o.acl = buildUnnamed781(); | 849 o.acl = buildUnnamed772(); |
740 o.bucket = "foo"; | 850 o.bucket = "foo"; |
741 o.cacheControl = "foo"; | 851 o.cacheControl = "foo"; |
742 o.componentCount = 42; | 852 o.componentCount = 42; |
743 o.contentDisposition = "foo"; | 853 o.contentDisposition = "foo"; |
744 o.contentEncoding = "foo"; | 854 o.contentEncoding = "foo"; |
745 o.contentLanguage = "foo"; | 855 o.contentLanguage = "foo"; |
746 o.contentType = "foo"; | 856 o.contentType = "foo"; |
747 o.crc32c = "foo"; | 857 o.crc32c = "foo"; |
748 o.customerEncryption = buildObjectCustomerEncryption(); | 858 o.customerEncryption = buildObjectCustomerEncryption(); |
749 o.etag = "foo"; | 859 o.etag = "foo"; |
750 o.generation = "foo"; | 860 o.generation = "foo"; |
751 o.id = "foo"; | 861 o.id = "foo"; |
752 o.kind = "foo"; | 862 o.kind = "foo"; |
753 o.md5Hash = "foo"; | 863 o.md5Hash = "foo"; |
754 o.mediaLink = "foo"; | 864 o.mediaLink = "foo"; |
755 o.metadata = buildUnnamed782(); | 865 o.metadata = buildUnnamed773(); |
756 o.metageneration = "foo"; | 866 o.metageneration = "foo"; |
757 o.name = "foo"; | 867 o.name = "foo"; |
758 o.owner = buildObjectOwner(); | 868 o.owner = buildObjectOwner(); |
759 o.selfLink = "foo"; | 869 o.selfLink = "foo"; |
760 o.size = "foo"; | 870 o.size = "foo"; |
761 o.storageClass = "foo"; | 871 o.storageClass = "foo"; |
762 o.timeCreated = core.DateTime.parse("2002-02-27T14:01:02"); | 872 o.timeCreated = core.DateTime.parse("2002-02-27T14:01:02"); |
763 o.timeDeleted = core.DateTime.parse("2002-02-27T14:01:02"); | 873 o.timeDeleted = core.DateTime.parse("2002-02-27T14:01:02"); |
764 o.timeStorageClassUpdated = core.DateTime.parse("2002-02-27T14:01:02"); | 874 o.timeStorageClassUpdated = core.DateTime.parse("2002-02-27T14:01:02"); |
765 o.updated = core.DateTime.parse("2002-02-27T14:01:02"); | 875 o.updated = core.DateTime.parse("2002-02-27T14:01:02"); |
766 } | 876 } |
767 buildCounterObject--; | 877 buildCounterObject--; |
768 return o; | 878 return o; |
769 } | 879 } |
770 | 880 |
771 checkObject(api.Object o) { | 881 checkObject(api.Object o) { |
772 buildCounterObject++; | 882 buildCounterObject++; |
773 if (buildCounterObject < 3) { | 883 if (buildCounterObject < 3) { |
774 checkUnnamed781(o.acl); | 884 checkUnnamed772(o.acl); |
775 unittest.expect(o.bucket, unittest.equals('foo')); | 885 unittest.expect(o.bucket, unittest.equals('foo')); |
776 unittest.expect(o.cacheControl, unittest.equals('foo')); | 886 unittest.expect(o.cacheControl, unittest.equals('foo')); |
777 unittest.expect(o.componentCount, unittest.equals(42)); | 887 unittest.expect(o.componentCount, unittest.equals(42)); |
778 unittest.expect(o.contentDisposition, unittest.equals('foo')); | 888 unittest.expect(o.contentDisposition, unittest.equals('foo')); |
779 unittest.expect(o.contentEncoding, unittest.equals('foo')); | 889 unittest.expect(o.contentEncoding, unittest.equals('foo')); |
780 unittest.expect(o.contentLanguage, unittest.equals('foo')); | 890 unittest.expect(o.contentLanguage, unittest.equals('foo')); |
781 unittest.expect(o.contentType, unittest.equals('foo')); | 891 unittest.expect(o.contentType, unittest.equals('foo')); |
782 unittest.expect(o.crc32c, unittest.equals('foo')); | 892 unittest.expect(o.crc32c, unittest.equals('foo')); |
783 checkObjectCustomerEncryption(o.customerEncryption); | 893 checkObjectCustomerEncryption(o.customerEncryption); |
784 unittest.expect(o.etag, unittest.equals('foo')); | 894 unittest.expect(o.etag, unittest.equals('foo')); |
785 unittest.expect(o.generation, unittest.equals('foo')); | 895 unittest.expect(o.generation, unittest.equals('foo')); |
786 unittest.expect(o.id, unittest.equals('foo')); | 896 unittest.expect(o.id, unittest.equals('foo')); |
787 unittest.expect(o.kind, unittest.equals('foo')); | 897 unittest.expect(o.kind, unittest.equals('foo')); |
788 unittest.expect(o.md5Hash, unittest.equals('foo')); | 898 unittest.expect(o.md5Hash, unittest.equals('foo')); |
789 unittest.expect(o.mediaLink, unittest.equals('foo')); | 899 unittest.expect(o.mediaLink, unittest.equals('foo')); |
790 checkUnnamed782(o.metadata); | 900 checkUnnamed773(o.metadata); |
791 unittest.expect(o.metageneration, unittest.equals('foo')); | 901 unittest.expect(o.metageneration, unittest.equals('foo')); |
792 unittest.expect(o.name, unittest.equals('foo')); | 902 unittest.expect(o.name, unittest.equals('foo')); |
793 checkObjectOwner(o.owner); | 903 checkObjectOwner(o.owner); |
794 unittest.expect(o.selfLink, unittest.equals('foo')); | 904 unittest.expect(o.selfLink, unittest.equals('foo')); |
795 unittest.expect(o.size, unittest.equals('foo')); | 905 unittest.expect(o.size, unittest.equals('foo')); |
796 unittest.expect(o.storageClass, unittest.equals('foo')); | 906 unittest.expect(o.storageClass, unittest.equals('foo')); |
797 unittest.expect(o.timeCreated, unittest.equals(core.DateTime.parse("2002-02-
27T14:01:02"))); | 907 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"))); | 908 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"))); | 909 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"))); | 910 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')); | 969 unittest.expect(o.id, unittest.equals('foo')); |
860 unittest.expect(o.kind, unittest.equals('foo')); | 970 unittest.expect(o.kind, unittest.equals('foo')); |
861 unittest.expect(o.object, unittest.equals('foo')); | 971 unittest.expect(o.object, unittest.equals('foo')); |
862 checkObjectAccessControlProjectTeam(o.projectTeam); | 972 checkObjectAccessControlProjectTeam(o.projectTeam); |
863 unittest.expect(o.role, unittest.equals('foo')); | 973 unittest.expect(o.role, unittest.equals('foo')); |
864 unittest.expect(o.selfLink, unittest.equals('foo')); | 974 unittest.expect(o.selfLink, unittest.equals('foo')); |
865 } | 975 } |
866 buildCounterObjectAccessControl--; | 976 buildCounterObjectAccessControl--; |
867 } | 977 } |
868 | 978 |
869 buildUnnamed783() { | 979 buildUnnamed774() { |
870 var o = new core.List<api.ObjectAccessControl>(); | 980 var o = new core.List<api.ObjectAccessControl>(); |
871 o.add(buildObjectAccessControl()); | 981 o.add(buildObjectAccessControl()); |
872 o.add(buildObjectAccessControl()); | 982 o.add(buildObjectAccessControl()); |
873 return o; | 983 return o; |
874 } | 984 } |
875 | 985 |
876 checkUnnamed783(core.List<api.ObjectAccessControl> o) { | 986 checkUnnamed774(core.List<api.ObjectAccessControl> o) { |
877 unittest.expect(o, unittest.hasLength(2)); | 987 unittest.expect(o, unittest.hasLength(2)); |
878 checkObjectAccessControl(o[0]); | 988 checkObjectAccessControl(o[0]); |
879 checkObjectAccessControl(o[1]); | 989 checkObjectAccessControl(o[1]); |
880 } | 990 } |
881 | 991 |
882 core.int buildCounterObjectAccessControls = 0; | 992 core.int buildCounterObjectAccessControls = 0; |
883 buildObjectAccessControls() { | 993 buildObjectAccessControls() { |
884 var o = new api.ObjectAccessControls(); | 994 var o = new api.ObjectAccessControls(); |
885 buildCounterObjectAccessControls++; | 995 buildCounterObjectAccessControls++; |
886 if (buildCounterObjectAccessControls < 3) { | 996 if (buildCounterObjectAccessControls < 3) { |
887 o.items = buildUnnamed783(); | 997 o.items = buildUnnamed774(); |
888 o.kind = "foo"; | 998 o.kind = "foo"; |
889 } | 999 } |
890 buildCounterObjectAccessControls--; | 1000 buildCounterObjectAccessControls--; |
891 return o; | 1001 return o; |
892 } | 1002 } |
893 | 1003 |
894 checkObjectAccessControls(api.ObjectAccessControls o) { | 1004 checkObjectAccessControls(api.ObjectAccessControls o) { |
895 buildCounterObjectAccessControls++; | 1005 buildCounterObjectAccessControls++; |
896 if (buildCounterObjectAccessControls < 3) { | 1006 if (buildCounterObjectAccessControls < 3) { |
897 checkUnnamed783(o.items); | 1007 checkUnnamed774(o.items); |
898 unittest.expect(o.kind, unittest.equals('foo')); | 1008 unittest.expect(o.kind, unittest.equals('foo')); |
899 } | 1009 } |
900 buildCounterObjectAccessControls--; | 1010 buildCounterObjectAccessControls--; |
901 } | 1011 } |
902 | 1012 |
903 buildUnnamed784() { | 1013 buildUnnamed775() { |
904 var o = new core.List<api.Object>(); | 1014 var o = new core.List<api.Object>(); |
905 o.add(buildObject()); | 1015 o.add(buildObject()); |
906 o.add(buildObject()); | 1016 o.add(buildObject()); |
907 return o; | 1017 return o; |
908 } | 1018 } |
909 | 1019 |
910 checkUnnamed784(core.List<api.Object> o) { | 1020 checkUnnamed775(core.List<api.Object> o) { |
911 unittest.expect(o, unittest.hasLength(2)); | 1021 unittest.expect(o, unittest.hasLength(2)); |
912 checkObject(o[0]); | 1022 checkObject(o[0]); |
913 checkObject(o[1]); | 1023 checkObject(o[1]); |
914 } | 1024 } |
915 | 1025 |
916 buildUnnamed785() { | 1026 buildUnnamed776() { |
917 var o = new core.List<core.String>(); | 1027 var o = new core.List<core.String>(); |
918 o.add("foo"); | 1028 o.add("foo"); |
919 o.add("foo"); | 1029 o.add("foo"); |
920 return o; | 1030 return o; |
921 } | 1031 } |
922 | 1032 |
923 checkUnnamed785(core.List<core.String> o) { | 1033 checkUnnamed776(core.List<core.String> o) { |
924 unittest.expect(o, unittest.hasLength(2)); | 1034 unittest.expect(o, unittest.hasLength(2)); |
925 unittest.expect(o[0], unittest.equals('foo')); | 1035 unittest.expect(o[0], unittest.equals('foo')); |
926 unittest.expect(o[1], unittest.equals('foo')); | 1036 unittest.expect(o[1], unittest.equals('foo')); |
927 } | 1037 } |
928 | 1038 |
929 core.int buildCounterObjects = 0; | 1039 core.int buildCounterObjects = 0; |
930 buildObjects() { | 1040 buildObjects() { |
931 var o = new api.Objects(); | 1041 var o = new api.Objects(); |
932 buildCounterObjects++; | 1042 buildCounterObjects++; |
933 if (buildCounterObjects < 3) { | 1043 if (buildCounterObjects < 3) { |
934 o.items = buildUnnamed784(); | 1044 o.items = buildUnnamed775(); |
935 o.kind = "foo"; | 1045 o.kind = "foo"; |
936 o.nextPageToken = "foo"; | 1046 o.nextPageToken = "foo"; |
937 o.prefixes = buildUnnamed785(); | 1047 o.prefixes = buildUnnamed776(); |
938 } | 1048 } |
939 buildCounterObjects--; | 1049 buildCounterObjects--; |
940 return o; | 1050 return o; |
941 } | 1051 } |
942 | 1052 |
943 checkObjects(api.Objects o) { | 1053 checkObjects(api.Objects o) { |
944 buildCounterObjects++; | 1054 buildCounterObjects++; |
945 if (buildCounterObjects < 3) { | 1055 if (buildCounterObjects < 3) { |
946 checkUnnamed784(o.items); | 1056 checkUnnamed775(o.items); |
947 unittest.expect(o.kind, unittest.equals('foo')); | 1057 unittest.expect(o.kind, unittest.equals('foo')); |
948 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 1058 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
949 checkUnnamed785(o.prefixes); | 1059 checkUnnamed776(o.prefixes); |
950 } | 1060 } |
951 buildCounterObjects--; | 1061 buildCounterObjects--; |
952 } | 1062 } |
953 | 1063 |
954 buildUnnamed786() { | 1064 buildUnnamed777() { |
955 var o = new core.List<core.String>(); | 1065 var o = new core.List<core.String>(); |
956 o.add("foo"); | 1066 o.add("foo"); |
957 o.add("foo"); | 1067 o.add("foo"); |
958 return o; | 1068 return o; |
959 } | 1069 } |
960 | 1070 |
961 checkUnnamed786(core.List<core.String> o) { | 1071 checkUnnamed777(core.List<core.String> o) { |
962 unittest.expect(o, unittest.hasLength(2)); | 1072 unittest.expect(o, unittest.hasLength(2)); |
963 unittest.expect(o[0], unittest.equals('foo')); | 1073 unittest.expect(o[0], unittest.equals('foo')); |
964 unittest.expect(o[1], unittest.equals('foo')); | 1074 unittest.expect(o[1], unittest.equals('foo')); |
965 } | 1075 } |
966 | 1076 |
967 core.int buildCounterPolicyBindings = 0; | 1077 core.int buildCounterPolicyBindings = 0; |
968 buildPolicyBindings() { | 1078 buildPolicyBindings() { |
969 var o = new api.PolicyBindings(); | 1079 var o = new api.PolicyBindings(); |
970 buildCounterPolicyBindings++; | 1080 buildCounterPolicyBindings++; |
971 if (buildCounterPolicyBindings < 3) { | 1081 if (buildCounterPolicyBindings < 3) { |
972 o.members = buildUnnamed786(); | 1082 o.members = buildUnnamed777(); |
973 o.role = "foo"; | 1083 o.role = "foo"; |
974 } | 1084 } |
975 buildCounterPolicyBindings--; | 1085 buildCounterPolicyBindings--; |
976 return o; | 1086 return o; |
977 } | 1087 } |
978 | 1088 |
979 checkPolicyBindings(api.PolicyBindings o) { | 1089 checkPolicyBindings(api.PolicyBindings o) { |
980 buildCounterPolicyBindings++; | 1090 buildCounterPolicyBindings++; |
981 if (buildCounterPolicyBindings < 3) { | 1091 if (buildCounterPolicyBindings < 3) { |
982 checkUnnamed786(o.members); | 1092 checkUnnamed777(o.members); |
983 unittest.expect(o.role, unittest.equals('foo')); | 1093 unittest.expect(o.role, unittest.equals('foo')); |
984 } | 1094 } |
985 buildCounterPolicyBindings--; | 1095 buildCounterPolicyBindings--; |
986 } | 1096 } |
987 | 1097 |
988 buildUnnamed787() { | 1098 buildUnnamed778() { |
989 var o = new core.List<api.PolicyBindings>(); | 1099 var o = new core.List<api.PolicyBindings>(); |
990 o.add(buildPolicyBindings()); | 1100 o.add(buildPolicyBindings()); |
991 o.add(buildPolicyBindings()); | 1101 o.add(buildPolicyBindings()); |
992 return o; | 1102 return o; |
993 } | 1103 } |
994 | 1104 |
995 checkUnnamed787(core.List<api.PolicyBindings> o) { | 1105 checkUnnamed778(core.List<api.PolicyBindings> o) { |
996 unittest.expect(o, unittest.hasLength(2)); | 1106 unittest.expect(o, unittest.hasLength(2)); |
997 checkPolicyBindings(o[0]); | 1107 checkPolicyBindings(o[0]); |
998 checkPolicyBindings(o[1]); | 1108 checkPolicyBindings(o[1]); |
999 } | 1109 } |
1000 | 1110 |
1001 core.int buildCounterPolicy = 0; | 1111 core.int buildCounterPolicy = 0; |
1002 buildPolicy() { | 1112 buildPolicy() { |
1003 var o = new api.Policy(); | 1113 var o = new api.Policy(); |
1004 buildCounterPolicy++; | 1114 buildCounterPolicy++; |
1005 if (buildCounterPolicy < 3) { | 1115 if (buildCounterPolicy < 3) { |
1006 o.bindings = buildUnnamed787(); | 1116 o.bindings = buildUnnamed778(); |
1007 o.etag = "foo"; | 1117 o.etag = "foo"; |
1008 o.kind = "foo"; | 1118 o.kind = "foo"; |
1009 o.resourceId = "foo"; | 1119 o.resourceId = "foo"; |
1010 } | 1120 } |
1011 buildCounterPolicy--; | 1121 buildCounterPolicy--; |
1012 return o; | 1122 return o; |
1013 } | 1123 } |
1014 | 1124 |
1015 checkPolicy(api.Policy o) { | 1125 checkPolicy(api.Policy o) { |
1016 buildCounterPolicy++; | 1126 buildCounterPolicy++; |
1017 if (buildCounterPolicy < 3) { | 1127 if (buildCounterPolicy < 3) { |
1018 checkUnnamed787(o.bindings); | 1128 checkUnnamed778(o.bindings); |
1019 unittest.expect(o.etag, unittest.equals('foo')); | 1129 unittest.expect(o.etag, unittest.equals('foo')); |
1020 unittest.expect(o.kind, unittest.equals('foo')); | 1130 unittest.expect(o.kind, unittest.equals('foo')); |
1021 unittest.expect(o.resourceId, unittest.equals('foo')); | 1131 unittest.expect(o.resourceId, unittest.equals('foo')); |
1022 } | 1132 } |
1023 buildCounterPolicy--; | 1133 buildCounterPolicy--; |
1024 } | 1134 } |
1025 | 1135 |
1026 core.int buildCounterRewriteResponse = 0; | 1136 core.int buildCounterRewriteResponse = 0; |
1027 buildRewriteResponse() { | 1137 buildRewriteResponse() { |
1028 var o = new api.RewriteResponse(); | 1138 var o = new api.RewriteResponse(); |
(...skipping 16 matching lines...) Expand all Loading... |
1045 unittest.expect(o.done, unittest.isTrue); | 1155 unittest.expect(o.done, unittest.isTrue); |
1046 unittest.expect(o.kind, unittest.equals('foo')); | 1156 unittest.expect(o.kind, unittest.equals('foo')); |
1047 unittest.expect(o.objectSize, unittest.equals('foo')); | 1157 unittest.expect(o.objectSize, unittest.equals('foo')); |
1048 checkObject(o.resource); | 1158 checkObject(o.resource); |
1049 unittest.expect(o.rewriteToken, unittest.equals('foo')); | 1159 unittest.expect(o.rewriteToken, unittest.equals('foo')); |
1050 unittest.expect(o.totalBytesRewritten, unittest.equals('foo')); | 1160 unittest.expect(o.totalBytesRewritten, unittest.equals('foo')); |
1051 } | 1161 } |
1052 buildCounterRewriteResponse--; | 1162 buildCounterRewriteResponse--; |
1053 } | 1163 } |
1054 | 1164 |
1055 buildUnnamed788() { | 1165 core.int buildCounterServiceAccount = 0; |
| 1166 buildServiceAccount() { |
| 1167 var o = new api.ServiceAccount(); |
| 1168 buildCounterServiceAccount++; |
| 1169 if (buildCounterServiceAccount < 3) { |
| 1170 o.emailAddress = "foo"; |
| 1171 o.kind = "foo"; |
| 1172 } |
| 1173 buildCounterServiceAccount--; |
| 1174 return o; |
| 1175 } |
| 1176 |
| 1177 checkServiceAccount(api.ServiceAccount o) { |
| 1178 buildCounterServiceAccount++; |
| 1179 if (buildCounterServiceAccount < 3) { |
| 1180 unittest.expect(o.emailAddress, unittest.equals('foo')); |
| 1181 unittest.expect(o.kind, unittest.equals('foo')); |
| 1182 } |
| 1183 buildCounterServiceAccount--; |
| 1184 } |
| 1185 |
| 1186 buildUnnamed779() { |
1056 var o = new core.List<core.String>(); | 1187 var o = new core.List<core.String>(); |
1057 o.add("foo"); | 1188 o.add("foo"); |
1058 o.add("foo"); | 1189 o.add("foo"); |
1059 return o; | 1190 return o; |
1060 } | 1191 } |
1061 | 1192 |
1062 checkUnnamed788(core.List<core.String> o) { | 1193 checkUnnamed779(core.List<core.String> o) { |
1063 unittest.expect(o, unittest.hasLength(2)); | 1194 unittest.expect(o, unittest.hasLength(2)); |
1064 unittest.expect(o[0], unittest.equals('foo')); | 1195 unittest.expect(o[0], unittest.equals('foo')); |
1065 unittest.expect(o[1], unittest.equals('foo')); | 1196 unittest.expect(o[1], unittest.equals('foo')); |
1066 } | 1197 } |
1067 | 1198 |
1068 core.int buildCounterTestIamPermissionsResponse = 0; | 1199 core.int buildCounterTestIamPermissionsResponse = 0; |
1069 buildTestIamPermissionsResponse() { | 1200 buildTestIamPermissionsResponse() { |
1070 var o = new api.TestIamPermissionsResponse(); | 1201 var o = new api.TestIamPermissionsResponse(); |
1071 buildCounterTestIamPermissionsResponse++; | 1202 buildCounterTestIamPermissionsResponse++; |
1072 if (buildCounterTestIamPermissionsResponse < 3) { | 1203 if (buildCounterTestIamPermissionsResponse < 3) { |
1073 o.kind = "foo"; | 1204 o.kind = "foo"; |
1074 o.permissions = buildUnnamed788(); | 1205 o.permissions = buildUnnamed779(); |
1075 } | 1206 } |
1076 buildCounterTestIamPermissionsResponse--; | 1207 buildCounterTestIamPermissionsResponse--; |
1077 return o; | 1208 return o; |
1078 } | 1209 } |
1079 | 1210 |
1080 checkTestIamPermissionsResponse(api.TestIamPermissionsResponse o) { | 1211 checkTestIamPermissionsResponse(api.TestIamPermissionsResponse o) { |
1081 buildCounterTestIamPermissionsResponse++; | 1212 buildCounterTestIamPermissionsResponse++; |
1082 if (buildCounterTestIamPermissionsResponse < 3) { | 1213 if (buildCounterTestIamPermissionsResponse < 3) { |
1083 unittest.expect(o.kind, unittest.equals('foo')); | 1214 unittest.expect(o.kind, unittest.equals('foo')); |
1084 checkUnnamed788(o.permissions); | 1215 checkUnnamed779(o.permissions); |
1085 } | 1216 } |
1086 buildCounterTestIamPermissionsResponse--; | 1217 buildCounterTestIamPermissionsResponse--; |
1087 } | 1218 } |
1088 | 1219 |
1089 buildUnnamed789() { | 1220 buildUnnamed780() { |
1090 var o = new core.List<core.String>(); | 1221 var o = new core.List<core.String>(); |
1091 o.add("foo"); | 1222 o.add("foo"); |
1092 o.add("foo"); | 1223 o.add("foo"); |
1093 return o; | 1224 return o; |
1094 } | 1225 } |
1095 | 1226 |
1096 checkUnnamed789(core.List<core.String> o) { | 1227 checkUnnamed780(core.List<core.String> o) { |
1097 unittest.expect(o, unittest.hasLength(2)); | 1228 unittest.expect(o, unittest.hasLength(2)); |
1098 unittest.expect(o[0], unittest.equals('foo')); | 1229 unittest.expect(o[0], unittest.equals('foo')); |
1099 unittest.expect(o[1], unittest.equals('foo')); | 1230 unittest.expect(o[1], unittest.equals('foo')); |
1100 } | 1231 } |
1101 | 1232 |
1102 buildUnnamed790() { | 1233 buildUnnamed781() { |
1103 var o = new core.List<core.String>(); | 1234 var o = new core.List<core.String>(); |
1104 o.add("foo"); | 1235 o.add("foo"); |
1105 o.add("foo"); | 1236 o.add("foo"); |
1106 return o; | 1237 return o; |
1107 } | 1238 } |
1108 | 1239 |
1109 checkUnnamed790(core.List<core.String> o) { | 1240 checkUnnamed781(core.List<core.String> o) { |
1110 unittest.expect(o, unittest.hasLength(2)); | 1241 unittest.expect(o, unittest.hasLength(2)); |
1111 unittest.expect(o[0], unittest.equals('foo')); | 1242 unittest.expect(o[0], unittest.equals('foo')); |
1112 unittest.expect(o[1], unittest.equals('foo')); | 1243 unittest.expect(o[1], unittest.equals('foo')); |
1113 } | 1244 } |
1114 | 1245 |
1115 | 1246 |
1116 main() { | 1247 main() { |
1117 unittest.group("obj-schema-BucketCors", () { | 1248 unittest.group("obj-schema-BucketCors", () { |
1118 unittest.test("to-json--from-json", () { | 1249 unittest.test("to-json--from-json", () { |
1119 var o = buildBucketCors(); | 1250 var o = buildBucketCors(); |
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1269 | 1400 |
1270 unittest.group("obj-schema-ComposeRequest", () { | 1401 unittest.group("obj-schema-ComposeRequest", () { |
1271 unittest.test("to-json--from-json", () { | 1402 unittest.test("to-json--from-json", () { |
1272 var o = buildComposeRequest(); | 1403 var o = buildComposeRequest(); |
1273 var od = new api.ComposeRequest.fromJson(o.toJson()); | 1404 var od = new api.ComposeRequest.fromJson(o.toJson()); |
1274 checkComposeRequest(od); | 1405 checkComposeRequest(od); |
1275 }); | 1406 }); |
1276 }); | 1407 }); |
1277 | 1408 |
1278 | 1409 |
| 1410 unittest.group("obj-schema-Notification", () { |
| 1411 unittest.test("to-json--from-json", () { |
| 1412 var o = buildNotification(); |
| 1413 var od = new api.Notification.fromJson(o.toJson()); |
| 1414 checkNotification(od); |
| 1415 }); |
| 1416 }); |
| 1417 |
| 1418 |
| 1419 unittest.group("obj-schema-Notifications", () { |
| 1420 unittest.test("to-json--from-json", () { |
| 1421 var o = buildNotifications(); |
| 1422 var od = new api.Notifications.fromJson(o.toJson()); |
| 1423 checkNotifications(od); |
| 1424 }); |
| 1425 }); |
| 1426 |
| 1427 |
1279 unittest.group("obj-schema-ObjectCustomerEncryption", () { | 1428 unittest.group("obj-schema-ObjectCustomerEncryption", () { |
1280 unittest.test("to-json--from-json", () { | 1429 unittest.test("to-json--from-json", () { |
1281 var o = buildObjectCustomerEncryption(); | 1430 var o = buildObjectCustomerEncryption(); |
1282 var od = new api.ObjectCustomerEncryption.fromJson(o.toJson()); | 1431 var od = new api.ObjectCustomerEncryption.fromJson(o.toJson()); |
1283 checkObjectCustomerEncryption(od); | 1432 checkObjectCustomerEncryption(od); |
1284 }); | 1433 }); |
1285 }); | 1434 }); |
1286 | 1435 |
1287 | 1436 |
1288 unittest.group("obj-schema-ObjectOwner", () { | 1437 unittest.group("obj-schema-ObjectOwner", () { |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1359 | 1508 |
1360 unittest.group("obj-schema-RewriteResponse", () { | 1509 unittest.group("obj-schema-RewriteResponse", () { |
1361 unittest.test("to-json--from-json", () { | 1510 unittest.test("to-json--from-json", () { |
1362 var o = buildRewriteResponse(); | 1511 var o = buildRewriteResponse(); |
1363 var od = new api.RewriteResponse.fromJson(o.toJson()); | 1512 var od = new api.RewriteResponse.fromJson(o.toJson()); |
1364 checkRewriteResponse(od); | 1513 checkRewriteResponse(od); |
1365 }); | 1514 }); |
1366 }); | 1515 }); |
1367 | 1516 |
1368 | 1517 |
| 1518 unittest.group("obj-schema-ServiceAccount", () { |
| 1519 unittest.test("to-json--from-json", () { |
| 1520 var o = buildServiceAccount(); |
| 1521 var od = new api.ServiceAccount.fromJson(o.toJson()); |
| 1522 checkServiceAccount(od); |
| 1523 }); |
| 1524 }); |
| 1525 |
| 1526 |
1369 unittest.group("obj-schema-TestIamPermissionsResponse", () { | 1527 unittest.group("obj-schema-TestIamPermissionsResponse", () { |
1370 unittest.test("to-json--from-json", () { | 1528 unittest.test("to-json--from-json", () { |
1371 var o = buildTestIamPermissionsResponse(); | 1529 var o = buildTestIamPermissionsResponse(); |
1372 var od = new api.TestIamPermissionsResponse.fromJson(o.toJson()); | 1530 var od = new api.TestIamPermissionsResponse.fromJson(o.toJson()); |
1373 checkTestIamPermissionsResponse(od); | 1531 checkTestIamPermissionsResponse(od); |
1374 }); | 1532 }); |
1375 }); | 1533 }); |
1376 | 1534 |
1377 | 1535 |
1378 unittest.group("resource-BucketAccessControlsResourceApi", () { | 1536 unittest.group("resource-BucketAccessControlsResourceApi", () { |
(...skipping 734 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2113 res.setIamPolicy(arg_request, arg_bucket).then(unittest.expectAsync(((api.
Policy response) { | 2271 res.setIamPolicy(arg_request, arg_bucket).then(unittest.expectAsync(((api.
Policy response) { |
2114 checkPolicy(response); | 2272 checkPolicy(response); |
2115 }))); | 2273 }))); |
2116 }); | 2274 }); |
2117 | 2275 |
2118 unittest.test("method--testIamPermissions", () { | 2276 unittest.test("method--testIamPermissions", () { |
2119 | 2277 |
2120 var mock = new HttpServerMock(); | 2278 var mock = new HttpServerMock(); |
2121 api.BucketsResourceApi res = new api.StorageApi(mock).buckets; | 2279 api.BucketsResourceApi res = new api.StorageApi(mock).buckets; |
2122 var arg_bucket = "foo"; | 2280 var arg_bucket = "foo"; |
2123 var arg_permissions = buildUnnamed789(); | 2281 var arg_permissions = buildUnnamed780(); |
2124 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2282 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
2125 var path = (req.url).path; | 2283 var path = (req.url).path; |
2126 var pathOffset = 0; | 2284 var pathOffset = 0; |
2127 var index; | 2285 var index; |
2128 var subPart; | 2286 var subPart; |
2129 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2287 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
2130 pathOffset += 1; | 2288 pathOffset += 1; |
2131 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("storage/v1/")); | 2289 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("storage/v1/")); |
2132 pathOffset += 11; | 2290 pathOffset += 11; |
2133 unittest.expect(path.substring(pathOffset, pathOffset + 2), unittest.equ
als("b/")); | 2291 unittest.expect(path.substring(pathOffset, pathOffset + 2), unittest.equ
als("b/")); |
(...skipping 498 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2632 return new async.Future.value(stringResponse(200, h, resp)); | 2790 return new async.Future.value(stringResponse(200, h, resp)); |
2633 }), true); | 2791 }), true); |
2634 res.update(arg_request, arg_bucket, arg_entity).then(unittest.expectAsync(
((api.ObjectAccessControl response) { | 2792 res.update(arg_request, arg_bucket, arg_entity).then(unittest.expectAsync(
((api.ObjectAccessControl response) { |
2635 checkObjectAccessControl(response); | 2793 checkObjectAccessControl(response); |
2636 }))); | 2794 }))); |
2637 }); | 2795 }); |
2638 | 2796 |
2639 }); | 2797 }); |
2640 | 2798 |
2641 | 2799 |
| 2800 unittest.group("resource-NotificationsResourceApi", () { |
| 2801 unittest.test("method--delete", () { |
| 2802 |
| 2803 var mock = new HttpServerMock(); |
| 2804 api.NotificationsResourceApi res = new api.StorageApi(mock).notifications; |
| 2805 var arg_bucket = "foo"; |
| 2806 var arg_notification = "foo"; |
| 2807 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 2808 var path = (req.url).path; |
| 2809 var pathOffset = 0; |
| 2810 var index; |
| 2811 var subPart; |
| 2812 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 2813 pathOffset += 1; |
| 2814 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("storage/v1/")); |
| 2815 pathOffset += 11; |
| 2816 unittest.expect(path.substring(pathOffset, pathOffset + 2), unittest.equ
als("b/")); |
| 2817 pathOffset += 2; |
| 2818 index = path.indexOf("/notificationConfigs/", pathOffset); |
| 2819 unittest.expect(index >= 0, unittest.isTrue); |
| 2820 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); |
| 2821 pathOffset = index; |
| 2822 unittest.expect(subPart, unittest.equals("$arg_bucket")); |
| 2823 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq
uals("/notificationConfigs/")); |
| 2824 pathOffset += 21; |
| 2825 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); |
| 2826 pathOffset = path.length; |
| 2827 unittest.expect(subPart, unittest.equals("$arg_notification")); |
| 2828 |
| 2829 var query = (req.url).query; |
| 2830 var queryOffset = 0; |
| 2831 var queryMap = {}; |
| 2832 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 2833 parseBool(n) { |
| 2834 if (n == "true") return true; |
| 2835 if (n == "false") return false; |
| 2836 if (n == null) return null; |
| 2837 throw new core.ArgumentError("Invalid boolean: $n"); |
| 2838 } |
| 2839 if (query.length > 0) { |
| 2840 for (var part in query.split("&")) { |
| 2841 var keyvalue = part.split("="); |
| 2842 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 2843 } |
| 2844 } |
| 2845 |
| 2846 |
| 2847 var h = { |
| 2848 "content-type" : "application/json; charset=utf-8", |
| 2849 }; |
| 2850 var resp = ""; |
| 2851 return new async.Future.value(stringResponse(200, h, resp)); |
| 2852 }), true); |
| 2853 res.delete(arg_bucket, arg_notification).then(unittest.expectAsync((_) {})
); |
| 2854 }); |
| 2855 |
| 2856 unittest.test("method--get", () { |
| 2857 |
| 2858 var mock = new HttpServerMock(); |
| 2859 api.NotificationsResourceApi res = new api.StorageApi(mock).notifications; |
| 2860 var arg_bucket = "foo"; |
| 2861 var arg_notification = "foo"; |
| 2862 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 2863 var path = (req.url).path; |
| 2864 var pathOffset = 0; |
| 2865 var index; |
| 2866 var subPart; |
| 2867 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 2868 pathOffset += 1; |
| 2869 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("storage/v1/")); |
| 2870 pathOffset += 11; |
| 2871 unittest.expect(path.substring(pathOffset, pathOffset + 2), unittest.equ
als("b/")); |
| 2872 pathOffset += 2; |
| 2873 index = path.indexOf("/notificationConfigs/", pathOffset); |
| 2874 unittest.expect(index >= 0, unittest.isTrue); |
| 2875 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); |
| 2876 pathOffset = index; |
| 2877 unittest.expect(subPart, unittest.equals("$arg_bucket")); |
| 2878 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq
uals("/notificationConfigs/")); |
| 2879 pathOffset += 21; |
| 2880 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); |
| 2881 pathOffset = path.length; |
| 2882 unittest.expect(subPart, unittest.equals("$arg_notification")); |
| 2883 |
| 2884 var query = (req.url).query; |
| 2885 var queryOffset = 0; |
| 2886 var queryMap = {}; |
| 2887 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 2888 parseBool(n) { |
| 2889 if (n == "true") return true; |
| 2890 if (n == "false") return false; |
| 2891 if (n == null) return null; |
| 2892 throw new core.ArgumentError("Invalid boolean: $n"); |
| 2893 } |
| 2894 if (query.length > 0) { |
| 2895 for (var part in query.split("&")) { |
| 2896 var keyvalue = part.split("="); |
| 2897 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 2898 } |
| 2899 } |
| 2900 |
| 2901 |
| 2902 var h = { |
| 2903 "content-type" : "application/json; charset=utf-8", |
| 2904 }; |
| 2905 var resp = convert.JSON.encode(buildNotification()); |
| 2906 return new async.Future.value(stringResponse(200, h, resp)); |
| 2907 }), true); |
| 2908 res.get(arg_bucket, arg_notification).then(unittest.expectAsync(((api.Noti
fication response) { |
| 2909 checkNotification(response); |
| 2910 }))); |
| 2911 }); |
| 2912 |
| 2913 unittest.test("method--insert", () { |
| 2914 |
| 2915 var mock = new HttpServerMock(); |
| 2916 api.NotificationsResourceApi res = new api.StorageApi(mock).notifications; |
| 2917 var arg_request = buildNotification(); |
| 2918 var arg_bucket = "foo"; |
| 2919 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 2920 var obj = new api.Notification.fromJson(json); |
| 2921 checkNotification(obj); |
| 2922 |
| 2923 var path = (req.url).path; |
| 2924 var pathOffset = 0; |
| 2925 var index; |
| 2926 var subPart; |
| 2927 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 2928 pathOffset += 1; |
| 2929 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("storage/v1/")); |
| 2930 pathOffset += 11; |
| 2931 unittest.expect(path.substring(pathOffset, pathOffset + 2), unittest.equ
als("b/")); |
| 2932 pathOffset += 2; |
| 2933 index = path.indexOf("/notificationConfigs", pathOffset); |
| 2934 unittest.expect(index >= 0, unittest.isTrue); |
| 2935 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); |
| 2936 pathOffset = index; |
| 2937 unittest.expect(subPart, unittest.equals("$arg_bucket")); |
| 2938 unittest.expect(path.substring(pathOffset, pathOffset + 20), unittest.eq
uals("/notificationConfigs")); |
| 2939 pathOffset += 20; |
| 2940 |
| 2941 var query = (req.url).query; |
| 2942 var queryOffset = 0; |
| 2943 var queryMap = {}; |
| 2944 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 2945 parseBool(n) { |
| 2946 if (n == "true") return true; |
| 2947 if (n == "false") return false; |
| 2948 if (n == null) return null; |
| 2949 throw new core.ArgumentError("Invalid boolean: $n"); |
| 2950 } |
| 2951 if (query.length > 0) { |
| 2952 for (var part in query.split("&")) { |
| 2953 var keyvalue = part.split("="); |
| 2954 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 2955 } |
| 2956 } |
| 2957 |
| 2958 |
| 2959 var h = { |
| 2960 "content-type" : "application/json; charset=utf-8", |
| 2961 }; |
| 2962 var resp = convert.JSON.encode(buildNotification()); |
| 2963 return new async.Future.value(stringResponse(200, h, resp)); |
| 2964 }), true); |
| 2965 res.insert(arg_request, arg_bucket).then(unittest.expectAsync(((api.Notifi
cation response) { |
| 2966 checkNotification(response); |
| 2967 }))); |
| 2968 }); |
| 2969 |
| 2970 unittest.test("method--list", () { |
| 2971 |
| 2972 var mock = new HttpServerMock(); |
| 2973 api.NotificationsResourceApi res = new api.StorageApi(mock).notifications; |
| 2974 var arg_bucket = "foo"; |
| 2975 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 2976 var path = (req.url).path; |
| 2977 var pathOffset = 0; |
| 2978 var index; |
| 2979 var subPart; |
| 2980 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 2981 pathOffset += 1; |
| 2982 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("storage/v1/")); |
| 2983 pathOffset += 11; |
| 2984 unittest.expect(path.substring(pathOffset, pathOffset + 2), unittest.equ
als("b/")); |
| 2985 pathOffset += 2; |
| 2986 index = path.indexOf("/notificationConfigs", pathOffset); |
| 2987 unittest.expect(index >= 0, unittest.isTrue); |
| 2988 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); |
| 2989 pathOffset = index; |
| 2990 unittest.expect(subPart, unittest.equals("$arg_bucket")); |
| 2991 unittest.expect(path.substring(pathOffset, pathOffset + 20), unittest.eq
uals("/notificationConfigs")); |
| 2992 pathOffset += 20; |
| 2993 |
| 2994 var query = (req.url).query; |
| 2995 var queryOffset = 0; |
| 2996 var queryMap = {}; |
| 2997 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 2998 parseBool(n) { |
| 2999 if (n == "true") return true; |
| 3000 if (n == "false") return false; |
| 3001 if (n == null) return null; |
| 3002 throw new core.ArgumentError("Invalid boolean: $n"); |
| 3003 } |
| 3004 if (query.length > 0) { |
| 3005 for (var part in query.split("&")) { |
| 3006 var keyvalue = part.split("="); |
| 3007 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 3008 } |
| 3009 } |
| 3010 |
| 3011 |
| 3012 var h = { |
| 3013 "content-type" : "application/json; charset=utf-8", |
| 3014 }; |
| 3015 var resp = convert.JSON.encode(buildNotifications()); |
| 3016 return new async.Future.value(stringResponse(200, h, resp)); |
| 3017 }), true); |
| 3018 res.list(arg_bucket).then(unittest.expectAsync(((api.Notifications respons
e) { |
| 3019 checkNotifications(response); |
| 3020 }))); |
| 3021 }); |
| 3022 |
| 3023 }); |
| 3024 |
| 3025 |
2642 unittest.group("resource-ObjectAccessControlsResourceApi", () { | 3026 unittest.group("resource-ObjectAccessControlsResourceApi", () { |
2643 unittest.test("method--delete", () { | 3027 unittest.test("method--delete", () { |
2644 | 3028 |
2645 var mock = new HttpServerMock(); | 3029 var mock = new HttpServerMock(); |
2646 api.ObjectAccessControlsResourceApi res = new api.StorageApi(mock).objectA
ccessControls; | 3030 api.ObjectAccessControlsResourceApi res = new api.StorageApi(mock).objectA
ccessControls; |
2647 var arg_bucket = "foo"; | 3031 var arg_bucket = "foo"; |
2648 var arg_object = "foo"; | 3032 var arg_object = "foo"; |
2649 var arg_entity = "foo"; | 3033 var arg_entity = "foo"; |
2650 var arg_generation = "foo"; | 3034 var arg_generation = "foo"; |
2651 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 3035 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
(...skipping 1153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3805 checkPolicy(response); | 4189 checkPolicy(response); |
3806 }))); | 4190 }))); |
3807 }); | 4191 }); |
3808 | 4192 |
3809 unittest.test("method--testIamPermissions", () { | 4193 unittest.test("method--testIamPermissions", () { |
3810 | 4194 |
3811 var mock = new HttpServerMock(); | 4195 var mock = new HttpServerMock(); |
3812 api.ObjectsResourceApi res = new api.StorageApi(mock).objects; | 4196 api.ObjectsResourceApi res = new api.StorageApi(mock).objects; |
3813 var arg_bucket = "foo"; | 4197 var arg_bucket = "foo"; |
3814 var arg_object = "foo"; | 4198 var arg_object = "foo"; |
3815 var arg_permissions = buildUnnamed790(); | 4199 var arg_permissions = buildUnnamed781(); |
3816 var arg_generation = "foo"; | 4200 var arg_generation = "foo"; |
3817 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 4201 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
3818 var path = (req.url).path; | 4202 var path = (req.url).path; |
3819 var pathOffset = 0; | 4203 var pathOffset = 0; |
3820 var index; | 4204 var index; |
3821 var subPart; | 4205 var subPart; |
3822 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 4206 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
3823 pathOffset += 1; | 4207 pathOffset += 1; |
3824 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("storage/v1/")); | 4208 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("storage/v1/")); |
3825 pathOffset += 11; | 4209 pathOffset += 11; |
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4013 return new async.Future.value(stringResponse(200, h, resp)); | 4397 return new async.Future.value(stringResponse(200, h, resp)); |
4014 }), true); | 4398 }), true); |
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) { | 4399 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) { |
4016 checkChannel(response); | 4400 checkChannel(response); |
4017 }))); | 4401 }))); |
4018 }); | 4402 }); |
4019 | 4403 |
4020 }); | 4404 }); |
4021 | 4405 |
4022 | 4406 |
| 4407 unittest.group("resource-ProjectsServiceAccountResourceApi", () { |
| 4408 unittest.test("method--get", () { |
| 4409 |
| 4410 var mock = new HttpServerMock(); |
| 4411 api.ProjectsServiceAccountResourceApi res = new api.StorageApi(mock).proje
cts.serviceAccount; |
| 4412 var arg_projectId = "foo"; |
| 4413 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 4414 var path = (req.url).path; |
| 4415 var pathOffset = 0; |
| 4416 var index; |
| 4417 var subPart; |
| 4418 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 4419 pathOffset += 1; |
| 4420 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("storage/v1/")); |
| 4421 pathOffset += 11; |
| 4422 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("projects/")); |
| 4423 pathOffset += 9; |
| 4424 index = path.indexOf("/serviceAccount", pathOffset); |
| 4425 unittest.expect(index >= 0, unittest.isTrue); |
| 4426 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); |
| 4427 pathOffset = index; |
| 4428 unittest.expect(subPart, unittest.equals("$arg_projectId")); |
| 4429 unittest.expect(path.substring(pathOffset, pathOffset + 15), unittest.eq
uals("/serviceAccount")); |
| 4430 pathOffset += 15; |
| 4431 |
| 4432 var query = (req.url).query; |
| 4433 var queryOffset = 0; |
| 4434 var queryMap = {}; |
| 4435 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 4436 parseBool(n) { |
| 4437 if (n == "true") return true; |
| 4438 if (n == "false") return false; |
| 4439 if (n == null) return null; |
| 4440 throw new core.ArgumentError("Invalid boolean: $n"); |
| 4441 } |
| 4442 if (query.length > 0) { |
| 4443 for (var part in query.split("&")) { |
| 4444 var keyvalue = part.split("="); |
| 4445 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 4446 } |
| 4447 } |
| 4448 |
| 4449 |
| 4450 var h = { |
| 4451 "content-type" : "application/json; charset=utf-8", |
| 4452 }; |
| 4453 var resp = convert.JSON.encode(buildServiceAccount()); |
| 4454 return new async.Future.value(stringResponse(200, h, resp)); |
| 4455 }), true); |
| 4456 res.get(arg_projectId).then(unittest.expectAsync(((api.ServiceAccount resp
onse) { |
| 4457 checkServiceAccount(response); |
| 4458 }))); |
| 4459 }); |
| 4460 |
| 4461 }); |
| 4462 |
| 4463 |
4023 } | 4464 } |
4024 | 4465 |
OLD | NEW |