OLD | NEW |
1 library googleapis.admin.directory_v1.test; | 1 library googleapis.admin.directory_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; |
11 import 'package:googleapis/common/common.dart' as common; | |
12 import 'package:googleapis/src/common_internal.dart' as common_internal; | |
13 import '../common/common_internal_test.dart' as common_test; | |
14 | 11 |
15 import 'package:googleapis/admin/directory_v1.dart' as api; | 12 import 'package:googleapis/admin/directory_v1.dart' as api; |
16 | 13 |
| 14 class HttpServerMock extends http.BaseClient { |
| 15 core.Function _callback; |
| 16 core.bool _expectJson; |
17 | 17 |
| 18 void register(core.Function callback, core.bool expectJson) { |
| 19 _callback = callback; |
| 20 _expectJson = expectJson; |
| 21 } |
| 22 |
| 23 async.Future<http.StreamedResponse> send(http.BaseRequest request) { |
| 24 if (_expectJson) { |
| 25 return request.finalize() |
| 26 .transform(convert.UTF8.decoder) |
| 27 .join('') |
| 28 .then((core.String jsonString) { |
| 29 if (jsonString.isEmpty) { |
| 30 return _callback(request, null); |
| 31 } else { |
| 32 return _callback(request, convert.JSON.decode(jsonString)); |
| 33 } |
| 34 }); |
| 35 } else { |
| 36 var stream = request.finalize(); |
| 37 if (stream == null) { |
| 38 return _callback(request, []); |
| 39 } else { |
| 40 return stream.toBytes().then((data) { |
| 41 return _callback(request, data); |
| 42 }); |
| 43 } |
| 44 } |
| 45 } |
| 46 } |
| 47 |
| 48 http.StreamedResponse stringResponse( |
| 49 core.int status, core.Map headers, core.String body) { |
| 50 var stream = new async.Stream.fromIterable([convert.UTF8.encode(body)]); |
| 51 return new http.StreamedResponse(stream, status, headers: headers); |
| 52 } |
18 | 53 |
19 core.int buildCounterAlias = 0; | 54 core.int buildCounterAlias = 0; |
20 buildAlias() { | 55 buildAlias() { |
21 var o = new api.Alias(); | 56 var o = new api.Alias(); |
22 buildCounterAlias++; | 57 buildCounterAlias++; |
23 if (buildCounterAlias < 3) { | 58 if (buildCounterAlias < 3) { |
24 o.alias = "foo"; | 59 o.alias = "foo"; |
25 o.etag = "foo"; | 60 o.etag = "foo"; |
26 o.id = "foo"; | 61 o.id = "foo"; |
27 o.kind = "foo"; | 62 o.kind = "foo"; |
28 o.primaryEmail = "foo"; | 63 o.primaryEmail = "foo"; |
29 } | 64 } |
30 buildCounterAlias--; | 65 buildCounterAlias--; |
31 return o; | 66 return o; |
32 } | 67 } |
33 | 68 |
34 checkAlias(api.Alias o) { | 69 checkAlias(api.Alias o) { |
35 buildCounterAlias++; | 70 buildCounterAlias++; |
36 if (buildCounterAlias < 3) { | 71 if (buildCounterAlias < 3) { |
37 unittest.expect(o.alias, unittest.equals('foo')); | 72 unittest.expect(o.alias, unittest.equals('foo')); |
38 unittest.expect(o.etag, unittest.equals('foo')); | 73 unittest.expect(o.etag, unittest.equals('foo')); |
39 unittest.expect(o.id, unittest.equals('foo')); | 74 unittest.expect(o.id, unittest.equals('foo')); |
40 unittest.expect(o.kind, unittest.equals('foo')); | 75 unittest.expect(o.kind, unittest.equals('foo')); |
41 unittest.expect(o.primaryEmail, unittest.equals('foo')); | 76 unittest.expect(o.primaryEmail, unittest.equals('foo')); |
42 } | 77 } |
43 buildCounterAlias--; | 78 buildCounterAlias--; |
44 } | 79 } |
45 | 80 |
46 buildUnnamed760() { | 81 buildUnnamed90() { |
47 var o = new core.List<api.Alias>(); | 82 var o = new core.List<api.Alias>(); |
48 o.add(buildAlias()); | 83 o.add(buildAlias()); |
49 o.add(buildAlias()); | 84 o.add(buildAlias()); |
50 return o; | 85 return o; |
51 } | 86 } |
52 | 87 |
53 checkUnnamed760(core.List<api.Alias> o) { | 88 checkUnnamed90(core.List<api.Alias> o) { |
54 unittest.expect(o, unittest.hasLength(2)); | 89 unittest.expect(o, unittest.hasLength(2)); |
55 checkAlias(o[0]); | 90 checkAlias(o[0]); |
56 checkAlias(o[1]); | 91 checkAlias(o[1]); |
57 } | 92 } |
58 | 93 |
59 core.int buildCounterAliases = 0; | 94 core.int buildCounterAliases = 0; |
60 buildAliases() { | 95 buildAliases() { |
61 var o = new api.Aliases(); | 96 var o = new api.Aliases(); |
62 buildCounterAliases++; | 97 buildCounterAliases++; |
63 if (buildCounterAliases < 3) { | 98 if (buildCounterAliases < 3) { |
64 o.aliases = buildUnnamed760(); | 99 o.aliases = buildUnnamed90(); |
65 o.etag = "foo"; | 100 o.etag = "foo"; |
66 o.kind = "foo"; | 101 o.kind = "foo"; |
67 } | 102 } |
68 buildCounterAliases--; | 103 buildCounterAliases--; |
69 return o; | 104 return o; |
70 } | 105 } |
71 | 106 |
72 checkAliases(api.Aliases o) { | 107 checkAliases(api.Aliases o) { |
73 buildCounterAliases++; | 108 buildCounterAliases++; |
74 if (buildCounterAliases < 3) { | 109 if (buildCounterAliases < 3) { |
75 checkUnnamed760(o.aliases); | 110 checkUnnamed90(o.aliases); |
76 unittest.expect(o.etag, unittest.equals('foo')); | 111 unittest.expect(o.etag, unittest.equals('foo')); |
77 unittest.expect(o.kind, unittest.equals('foo')); | 112 unittest.expect(o.kind, unittest.equals('foo')); |
78 } | 113 } |
79 buildCounterAliases--; | 114 buildCounterAliases--; |
80 } | 115 } |
81 | 116 |
82 core.int buildCounterAsp = 0; | 117 core.int buildCounterAsp = 0; |
83 buildAsp() { | 118 buildAsp() { |
84 var o = new api.Asp(); | 119 var o = new api.Asp(); |
85 buildCounterAsp++; | 120 buildCounterAsp++; |
(...skipping 17 matching lines...) Expand all Loading... |
103 unittest.expect(o.creationTime, unittest.equals('foo')); | 138 unittest.expect(o.creationTime, unittest.equals('foo')); |
104 unittest.expect(o.etag, unittest.equals('foo')); | 139 unittest.expect(o.etag, unittest.equals('foo')); |
105 unittest.expect(o.kind, unittest.equals('foo')); | 140 unittest.expect(o.kind, unittest.equals('foo')); |
106 unittest.expect(o.lastTimeUsed, unittest.equals('foo')); | 141 unittest.expect(o.lastTimeUsed, unittest.equals('foo')); |
107 unittest.expect(o.name, unittest.equals('foo')); | 142 unittest.expect(o.name, unittest.equals('foo')); |
108 unittest.expect(o.userKey, unittest.equals('foo')); | 143 unittest.expect(o.userKey, unittest.equals('foo')); |
109 } | 144 } |
110 buildCounterAsp--; | 145 buildCounterAsp--; |
111 } | 146 } |
112 | 147 |
113 buildUnnamed761() { | 148 buildUnnamed91() { |
114 var o = new core.List<api.Asp>(); | 149 var o = new core.List<api.Asp>(); |
115 o.add(buildAsp()); | 150 o.add(buildAsp()); |
116 o.add(buildAsp()); | 151 o.add(buildAsp()); |
117 return o; | 152 return o; |
118 } | 153 } |
119 | 154 |
120 checkUnnamed761(core.List<api.Asp> o) { | 155 checkUnnamed91(core.List<api.Asp> o) { |
121 unittest.expect(o, unittest.hasLength(2)); | 156 unittest.expect(o, unittest.hasLength(2)); |
122 checkAsp(o[0]); | 157 checkAsp(o[0]); |
123 checkAsp(o[1]); | 158 checkAsp(o[1]); |
124 } | 159 } |
125 | 160 |
126 core.int buildCounterAsps = 0; | 161 core.int buildCounterAsps = 0; |
127 buildAsps() { | 162 buildAsps() { |
128 var o = new api.Asps(); | 163 var o = new api.Asps(); |
129 buildCounterAsps++; | 164 buildCounterAsps++; |
130 if (buildCounterAsps < 3) { | 165 if (buildCounterAsps < 3) { |
131 o.etag = "foo"; | 166 o.etag = "foo"; |
132 o.items = buildUnnamed761(); | 167 o.items = buildUnnamed91(); |
133 o.kind = "foo"; | 168 o.kind = "foo"; |
134 } | 169 } |
135 buildCounterAsps--; | 170 buildCounterAsps--; |
136 return o; | 171 return o; |
137 } | 172 } |
138 | 173 |
139 checkAsps(api.Asps o) { | 174 checkAsps(api.Asps o) { |
140 buildCounterAsps++; | 175 buildCounterAsps++; |
141 if (buildCounterAsps < 3) { | 176 if (buildCounterAsps < 3) { |
142 unittest.expect(o.etag, unittest.equals('foo')); | 177 unittest.expect(o.etag, unittest.equals('foo')); |
143 checkUnnamed761(o.items); | 178 checkUnnamed91(o.items); |
144 unittest.expect(o.kind, unittest.equals('foo')); | 179 unittest.expect(o.kind, unittest.equals('foo')); |
145 } | 180 } |
146 buildCounterAsps--; | 181 buildCounterAsps--; |
147 } | 182 } |
148 | 183 |
149 buildUnnamed762() { | 184 buildUnnamed92() { |
150 var o = new core.Map<core.String, core.String>(); | 185 var o = new core.Map<core.String, core.String>(); |
151 o["x"] = "foo"; | 186 o["x"] = "foo"; |
152 o["y"] = "foo"; | 187 o["y"] = "foo"; |
153 return o; | 188 return o; |
154 } | 189 } |
155 | 190 |
156 checkUnnamed762(core.Map<core.String, core.String> o) { | 191 checkUnnamed92(core.Map<core.String, core.String> o) { |
157 unittest.expect(o, unittest.hasLength(2)); | 192 unittest.expect(o, unittest.hasLength(2)); |
158 unittest.expect(o["x"], unittest.equals('foo')); | 193 unittest.expect(o["x"], unittest.equals('foo')); |
159 unittest.expect(o["y"], unittest.equals('foo')); | 194 unittest.expect(o["y"], unittest.equals('foo')); |
160 } | 195 } |
161 | 196 |
162 core.int buildCounterChannel = 0; | 197 core.int buildCounterChannel = 0; |
163 buildChannel() { | 198 buildChannel() { |
164 var o = new api.Channel(); | 199 var o = new api.Channel(); |
165 buildCounterChannel++; | 200 buildCounterChannel++; |
166 if (buildCounterChannel < 3) { | 201 if (buildCounterChannel < 3) { |
167 o.address = "foo"; | 202 o.address = "foo"; |
168 o.expiration = "foo"; | 203 o.expiration = "foo"; |
169 o.id = "foo"; | 204 o.id = "foo"; |
170 o.kind = "foo"; | 205 o.kind = "foo"; |
171 o.params = buildUnnamed762(); | 206 o.params = buildUnnamed92(); |
172 o.payload = true; | 207 o.payload = true; |
173 o.resourceId = "foo"; | 208 o.resourceId = "foo"; |
174 o.resourceUri = "foo"; | 209 o.resourceUri = "foo"; |
175 o.token = "foo"; | 210 o.token = "foo"; |
176 o.type = "foo"; | 211 o.type = "foo"; |
177 } | 212 } |
178 buildCounterChannel--; | 213 buildCounterChannel--; |
179 return o; | 214 return o; |
180 } | 215 } |
181 | 216 |
182 checkChannel(api.Channel o) { | 217 checkChannel(api.Channel o) { |
183 buildCounterChannel++; | 218 buildCounterChannel++; |
184 if (buildCounterChannel < 3) { | 219 if (buildCounterChannel < 3) { |
185 unittest.expect(o.address, unittest.equals('foo')); | 220 unittest.expect(o.address, unittest.equals('foo')); |
186 unittest.expect(o.expiration, unittest.equals('foo')); | 221 unittest.expect(o.expiration, unittest.equals('foo')); |
187 unittest.expect(o.id, unittest.equals('foo')); | 222 unittest.expect(o.id, unittest.equals('foo')); |
188 unittest.expect(o.kind, unittest.equals('foo')); | 223 unittest.expect(o.kind, unittest.equals('foo')); |
189 checkUnnamed762(o.params); | 224 checkUnnamed92(o.params); |
190 unittest.expect(o.payload, unittest.isTrue); | 225 unittest.expect(o.payload, unittest.isTrue); |
191 unittest.expect(o.resourceId, unittest.equals('foo')); | 226 unittest.expect(o.resourceId, unittest.equals('foo')); |
192 unittest.expect(o.resourceUri, unittest.equals('foo')); | 227 unittest.expect(o.resourceUri, unittest.equals('foo')); |
193 unittest.expect(o.token, unittest.equals('foo')); | 228 unittest.expect(o.token, unittest.equals('foo')); |
194 unittest.expect(o.type, unittest.equals('foo')); | 229 unittest.expect(o.type, unittest.equals('foo')); |
195 } | 230 } |
196 buildCounterChannel--; | 231 buildCounterChannel--; |
197 } | 232 } |
198 | 233 |
199 core.int buildCounterChromeOsDeviceActiveTimeRanges = 0; | 234 core.int buildCounterChromeOsDeviceActiveTimeRanges = 0; |
(...skipping 10 matching lines...) Expand all Loading... |
210 | 245 |
211 checkChromeOsDeviceActiveTimeRanges(api.ChromeOsDeviceActiveTimeRanges o) { | 246 checkChromeOsDeviceActiveTimeRanges(api.ChromeOsDeviceActiveTimeRanges o) { |
212 buildCounterChromeOsDeviceActiveTimeRanges++; | 247 buildCounterChromeOsDeviceActiveTimeRanges++; |
213 if (buildCounterChromeOsDeviceActiveTimeRanges < 3) { | 248 if (buildCounterChromeOsDeviceActiveTimeRanges < 3) { |
214 unittest.expect(o.activeTime, unittest.equals(42)); | 249 unittest.expect(o.activeTime, unittest.equals(42)); |
215 unittest.expect(o.date, unittest.equals(core.DateTime.parse("2002-02-27T00:0
0:00"))); | 250 unittest.expect(o.date, unittest.equals(core.DateTime.parse("2002-02-27T00:0
0:00"))); |
216 } | 251 } |
217 buildCounterChromeOsDeviceActiveTimeRanges--; | 252 buildCounterChromeOsDeviceActiveTimeRanges--; |
218 } | 253 } |
219 | 254 |
220 buildUnnamed763() { | 255 buildUnnamed93() { |
221 var o = new core.List<api.ChromeOsDeviceActiveTimeRanges>(); | 256 var o = new core.List<api.ChromeOsDeviceActiveTimeRanges>(); |
222 o.add(buildChromeOsDeviceActiveTimeRanges()); | 257 o.add(buildChromeOsDeviceActiveTimeRanges()); |
223 o.add(buildChromeOsDeviceActiveTimeRanges()); | 258 o.add(buildChromeOsDeviceActiveTimeRanges()); |
224 return o; | 259 return o; |
225 } | 260 } |
226 | 261 |
227 checkUnnamed763(core.List<api.ChromeOsDeviceActiveTimeRanges> o) { | 262 checkUnnamed93(core.List<api.ChromeOsDeviceActiveTimeRanges> o) { |
228 unittest.expect(o, unittest.hasLength(2)); | 263 unittest.expect(o, unittest.hasLength(2)); |
229 checkChromeOsDeviceActiveTimeRanges(o[0]); | 264 checkChromeOsDeviceActiveTimeRanges(o[0]); |
230 checkChromeOsDeviceActiveTimeRanges(o[1]); | 265 checkChromeOsDeviceActiveTimeRanges(o[1]); |
231 } | 266 } |
232 | 267 |
233 core.int buildCounterChromeOsDeviceRecentUsers = 0; | 268 core.int buildCounterChromeOsDeviceRecentUsers = 0; |
234 buildChromeOsDeviceRecentUsers() { | 269 buildChromeOsDeviceRecentUsers() { |
235 var o = new api.ChromeOsDeviceRecentUsers(); | 270 var o = new api.ChromeOsDeviceRecentUsers(); |
236 buildCounterChromeOsDeviceRecentUsers++; | 271 buildCounterChromeOsDeviceRecentUsers++; |
237 if (buildCounterChromeOsDeviceRecentUsers < 3) { | 272 if (buildCounterChromeOsDeviceRecentUsers < 3) { |
238 o.email = "foo"; | 273 o.email = "foo"; |
239 o.type = "foo"; | 274 o.type = "foo"; |
240 } | 275 } |
241 buildCounterChromeOsDeviceRecentUsers--; | 276 buildCounterChromeOsDeviceRecentUsers--; |
242 return o; | 277 return o; |
243 } | 278 } |
244 | 279 |
245 checkChromeOsDeviceRecentUsers(api.ChromeOsDeviceRecentUsers o) { | 280 checkChromeOsDeviceRecentUsers(api.ChromeOsDeviceRecentUsers o) { |
246 buildCounterChromeOsDeviceRecentUsers++; | 281 buildCounterChromeOsDeviceRecentUsers++; |
247 if (buildCounterChromeOsDeviceRecentUsers < 3) { | 282 if (buildCounterChromeOsDeviceRecentUsers < 3) { |
248 unittest.expect(o.email, unittest.equals('foo')); | 283 unittest.expect(o.email, unittest.equals('foo')); |
249 unittest.expect(o.type, unittest.equals('foo')); | 284 unittest.expect(o.type, unittest.equals('foo')); |
250 } | 285 } |
251 buildCounterChromeOsDeviceRecentUsers--; | 286 buildCounterChromeOsDeviceRecentUsers--; |
252 } | 287 } |
253 | 288 |
254 buildUnnamed764() { | 289 buildUnnamed94() { |
255 var o = new core.List<api.ChromeOsDeviceRecentUsers>(); | 290 var o = new core.List<api.ChromeOsDeviceRecentUsers>(); |
256 o.add(buildChromeOsDeviceRecentUsers()); | 291 o.add(buildChromeOsDeviceRecentUsers()); |
257 o.add(buildChromeOsDeviceRecentUsers()); | 292 o.add(buildChromeOsDeviceRecentUsers()); |
258 return o; | 293 return o; |
259 } | 294 } |
260 | 295 |
261 checkUnnamed764(core.List<api.ChromeOsDeviceRecentUsers> o) { | 296 checkUnnamed94(core.List<api.ChromeOsDeviceRecentUsers> o) { |
262 unittest.expect(o, unittest.hasLength(2)); | 297 unittest.expect(o, unittest.hasLength(2)); |
263 checkChromeOsDeviceRecentUsers(o[0]); | 298 checkChromeOsDeviceRecentUsers(o[0]); |
264 checkChromeOsDeviceRecentUsers(o[1]); | 299 checkChromeOsDeviceRecentUsers(o[1]); |
265 } | 300 } |
266 | 301 |
267 core.int buildCounterChromeOsDevice = 0; | 302 core.int buildCounterChromeOsDevice = 0; |
268 buildChromeOsDevice() { | 303 buildChromeOsDevice() { |
269 var o = new api.ChromeOsDevice(); | 304 var o = new api.ChromeOsDevice(); |
270 buildCounterChromeOsDevice++; | 305 buildCounterChromeOsDevice++; |
271 if (buildCounterChromeOsDevice < 3) { | 306 if (buildCounterChromeOsDevice < 3) { |
272 o.activeTimeRanges = buildUnnamed763(); | 307 o.activeTimeRanges = buildUnnamed93(); |
273 o.annotatedLocation = "foo"; | 308 o.annotatedLocation = "foo"; |
274 o.annotatedUser = "foo"; | 309 o.annotatedUser = "foo"; |
275 o.bootMode = "foo"; | 310 o.bootMode = "foo"; |
276 o.deviceId = "foo"; | 311 o.deviceId = "foo"; |
277 o.etag = "foo"; | 312 o.etag = "foo"; |
278 o.ethernetMacAddress = "foo"; | 313 o.ethernetMacAddress = "foo"; |
279 o.firmwareVersion = "foo"; | 314 o.firmwareVersion = "foo"; |
280 o.kind = "foo"; | 315 o.kind = "foo"; |
281 o.lastEnrollmentTime = core.DateTime.parse("2002-02-27T14:01:02"); | 316 o.lastEnrollmentTime = core.DateTime.parse("2002-02-27T14:01:02"); |
282 o.lastSync = core.DateTime.parse("2002-02-27T14:01:02"); | 317 o.lastSync = core.DateTime.parse("2002-02-27T14:01:02"); |
283 o.macAddress = "foo"; | 318 o.macAddress = "foo"; |
284 o.meid = "foo"; | 319 o.meid = "foo"; |
285 o.model = "foo"; | 320 o.model = "foo"; |
286 o.notes = "foo"; | 321 o.notes = "foo"; |
287 o.orderNumber = "foo"; | 322 o.orderNumber = "foo"; |
288 o.orgUnitPath = "foo"; | 323 o.orgUnitPath = "foo"; |
289 o.osVersion = "foo"; | 324 o.osVersion = "foo"; |
290 o.platformVersion = "foo"; | 325 o.platformVersion = "foo"; |
291 o.recentUsers = buildUnnamed764(); | 326 o.recentUsers = buildUnnamed94(); |
292 o.serialNumber = "foo"; | 327 o.serialNumber = "foo"; |
293 o.status = "foo"; | 328 o.status = "foo"; |
294 o.supportEndDate = core.DateTime.parse("2002-02-27T14:01:02"); | 329 o.supportEndDate = core.DateTime.parse("2002-02-27T14:01:02"); |
295 o.willAutoRenew = true; | 330 o.willAutoRenew = true; |
296 } | 331 } |
297 buildCounterChromeOsDevice--; | 332 buildCounterChromeOsDevice--; |
298 return o; | 333 return o; |
299 } | 334 } |
300 | 335 |
301 checkChromeOsDevice(api.ChromeOsDevice o) { | 336 checkChromeOsDevice(api.ChromeOsDevice o) { |
302 buildCounterChromeOsDevice++; | 337 buildCounterChromeOsDevice++; |
303 if (buildCounterChromeOsDevice < 3) { | 338 if (buildCounterChromeOsDevice < 3) { |
304 checkUnnamed763(o.activeTimeRanges); | 339 checkUnnamed93(o.activeTimeRanges); |
305 unittest.expect(o.annotatedLocation, unittest.equals('foo')); | 340 unittest.expect(o.annotatedLocation, unittest.equals('foo')); |
306 unittest.expect(o.annotatedUser, unittest.equals('foo')); | 341 unittest.expect(o.annotatedUser, unittest.equals('foo')); |
307 unittest.expect(o.bootMode, unittest.equals('foo')); | 342 unittest.expect(o.bootMode, unittest.equals('foo')); |
308 unittest.expect(o.deviceId, unittest.equals('foo')); | 343 unittest.expect(o.deviceId, unittest.equals('foo')); |
309 unittest.expect(o.etag, unittest.equals('foo')); | 344 unittest.expect(o.etag, unittest.equals('foo')); |
310 unittest.expect(o.ethernetMacAddress, unittest.equals('foo')); | 345 unittest.expect(o.ethernetMacAddress, unittest.equals('foo')); |
311 unittest.expect(o.firmwareVersion, unittest.equals('foo')); | 346 unittest.expect(o.firmwareVersion, unittest.equals('foo')); |
312 unittest.expect(o.kind, unittest.equals('foo')); | 347 unittest.expect(o.kind, unittest.equals('foo')); |
313 unittest.expect(o.lastEnrollmentTime, unittest.equals(core.DateTime.parse("2
002-02-27T14:01:02"))); | 348 unittest.expect(o.lastEnrollmentTime, unittest.equals(core.DateTime.parse("2
002-02-27T14:01:02"))); |
314 unittest.expect(o.lastSync, unittest.equals(core.DateTime.parse("2002-02-27T
14:01:02"))); | 349 unittest.expect(o.lastSync, unittest.equals(core.DateTime.parse("2002-02-27T
14:01:02"))); |
315 unittest.expect(o.macAddress, unittest.equals('foo')); | 350 unittest.expect(o.macAddress, unittest.equals('foo')); |
316 unittest.expect(o.meid, unittest.equals('foo')); | 351 unittest.expect(o.meid, unittest.equals('foo')); |
317 unittest.expect(o.model, unittest.equals('foo')); | 352 unittest.expect(o.model, unittest.equals('foo')); |
318 unittest.expect(o.notes, unittest.equals('foo')); | 353 unittest.expect(o.notes, unittest.equals('foo')); |
319 unittest.expect(o.orderNumber, unittest.equals('foo')); | 354 unittest.expect(o.orderNumber, unittest.equals('foo')); |
320 unittest.expect(o.orgUnitPath, unittest.equals('foo')); | 355 unittest.expect(o.orgUnitPath, unittest.equals('foo')); |
321 unittest.expect(o.osVersion, unittest.equals('foo')); | 356 unittest.expect(o.osVersion, unittest.equals('foo')); |
322 unittest.expect(o.platformVersion, unittest.equals('foo')); | 357 unittest.expect(o.platformVersion, unittest.equals('foo')); |
323 checkUnnamed764(o.recentUsers); | 358 checkUnnamed94(o.recentUsers); |
324 unittest.expect(o.serialNumber, unittest.equals('foo')); | 359 unittest.expect(o.serialNumber, unittest.equals('foo')); |
325 unittest.expect(o.status, unittest.equals('foo')); | 360 unittest.expect(o.status, unittest.equals('foo')); |
326 unittest.expect(o.supportEndDate, unittest.equals(core.DateTime.parse("2002-
02-27T14:01:02"))); | 361 unittest.expect(o.supportEndDate, unittest.equals(core.DateTime.parse("2002-
02-27T14:01:02"))); |
327 unittest.expect(o.willAutoRenew, unittest.isTrue); | 362 unittest.expect(o.willAutoRenew, unittest.isTrue); |
328 } | 363 } |
329 buildCounterChromeOsDevice--; | 364 buildCounterChromeOsDevice--; |
330 } | 365 } |
331 | 366 |
332 buildUnnamed765() { | 367 buildUnnamed95() { |
333 var o = new core.List<api.ChromeOsDevice>(); | 368 var o = new core.List<api.ChromeOsDevice>(); |
334 o.add(buildChromeOsDevice()); | 369 o.add(buildChromeOsDevice()); |
335 o.add(buildChromeOsDevice()); | 370 o.add(buildChromeOsDevice()); |
336 return o; | 371 return o; |
337 } | 372 } |
338 | 373 |
339 checkUnnamed765(core.List<api.ChromeOsDevice> o) { | 374 checkUnnamed95(core.List<api.ChromeOsDevice> o) { |
340 unittest.expect(o, unittest.hasLength(2)); | 375 unittest.expect(o, unittest.hasLength(2)); |
341 checkChromeOsDevice(o[0]); | 376 checkChromeOsDevice(o[0]); |
342 checkChromeOsDevice(o[1]); | 377 checkChromeOsDevice(o[1]); |
343 } | 378 } |
344 | 379 |
345 core.int buildCounterChromeOsDevices = 0; | 380 core.int buildCounterChromeOsDevices = 0; |
346 buildChromeOsDevices() { | 381 buildChromeOsDevices() { |
347 var o = new api.ChromeOsDevices(); | 382 var o = new api.ChromeOsDevices(); |
348 buildCounterChromeOsDevices++; | 383 buildCounterChromeOsDevices++; |
349 if (buildCounterChromeOsDevices < 3) { | 384 if (buildCounterChromeOsDevices < 3) { |
350 o.chromeosdevices = buildUnnamed765(); | 385 o.chromeosdevices = buildUnnamed95(); |
351 o.etag = "foo"; | 386 o.etag = "foo"; |
352 o.kind = "foo"; | 387 o.kind = "foo"; |
353 o.nextPageToken = "foo"; | 388 o.nextPageToken = "foo"; |
354 } | 389 } |
355 buildCounterChromeOsDevices--; | 390 buildCounterChromeOsDevices--; |
356 return o; | 391 return o; |
357 } | 392 } |
358 | 393 |
359 checkChromeOsDevices(api.ChromeOsDevices o) { | 394 checkChromeOsDevices(api.ChromeOsDevices o) { |
360 buildCounterChromeOsDevices++; | 395 buildCounterChromeOsDevices++; |
361 if (buildCounterChromeOsDevices < 3) { | 396 if (buildCounterChromeOsDevices < 3) { |
362 checkUnnamed765(o.chromeosdevices); | 397 checkUnnamed95(o.chromeosdevices); |
363 unittest.expect(o.etag, unittest.equals('foo')); | 398 unittest.expect(o.etag, unittest.equals('foo')); |
364 unittest.expect(o.kind, unittest.equals('foo')); | 399 unittest.expect(o.kind, unittest.equals('foo')); |
365 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 400 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
366 } | 401 } |
367 buildCounterChromeOsDevices--; | 402 buildCounterChromeOsDevices--; |
368 } | 403 } |
369 | 404 |
370 buildUnnamed766() { | 405 buildUnnamed96() { |
371 var o = new core.List<core.String>(); | 406 var o = new core.List<core.String>(); |
372 o.add("foo"); | 407 o.add("foo"); |
373 o.add("foo"); | 408 o.add("foo"); |
374 return o; | 409 return o; |
375 } | 410 } |
376 | 411 |
377 checkUnnamed766(core.List<core.String> o) { | 412 checkUnnamed96(core.List<core.String> o) { |
378 unittest.expect(o, unittest.hasLength(2)); | 413 unittest.expect(o, unittest.hasLength(2)); |
379 unittest.expect(o[0], unittest.equals('foo')); | 414 unittest.expect(o[0], unittest.equals('foo')); |
380 unittest.expect(o[1], unittest.equals('foo')); | 415 unittest.expect(o[1], unittest.equals('foo')); |
381 } | 416 } |
382 | 417 |
383 buildUnnamed767() { | 418 buildUnnamed97() { |
384 var o = new core.List<core.String>(); | 419 var o = new core.List<core.String>(); |
385 o.add("foo"); | 420 o.add("foo"); |
386 o.add("foo"); | 421 o.add("foo"); |
387 return o; | 422 return o; |
388 } | 423 } |
389 | 424 |
390 checkUnnamed767(core.List<core.String> o) { | 425 checkUnnamed97(core.List<core.String> o) { |
391 unittest.expect(o, unittest.hasLength(2)); | 426 unittest.expect(o, unittest.hasLength(2)); |
392 unittest.expect(o[0], unittest.equals('foo')); | 427 unittest.expect(o[0], unittest.equals('foo')); |
393 unittest.expect(o[1], unittest.equals('foo')); | 428 unittest.expect(o[1], unittest.equals('foo')); |
394 } | 429 } |
395 | 430 |
396 core.int buildCounterGroup = 0; | 431 core.int buildCounterGroup = 0; |
397 buildGroup() { | 432 buildGroup() { |
398 var o = new api.Group(); | 433 var o = new api.Group(); |
399 buildCounterGroup++; | 434 buildCounterGroup++; |
400 if (buildCounterGroup < 3) { | 435 if (buildCounterGroup < 3) { |
401 o.adminCreated = true; | 436 o.adminCreated = true; |
402 o.aliases = buildUnnamed766(); | 437 o.aliases = buildUnnamed96(); |
403 o.description = "foo"; | 438 o.description = "foo"; |
404 o.directMembersCount = "foo"; | 439 o.directMembersCount = "foo"; |
405 o.email = "foo"; | 440 o.email = "foo"; |
406 o.etag = "foo"; | 441 o.etag = "foo"; |
407 o.id = "foo"; | 442 o.id = "foo"; |
408 o.kind = "foo"; | 443 o.kind = "foo"; |
409 o.name = "foo"; | 444 o.name = "foo"; |
410 o.nonEditableAliases = buildUnnamed767(); | 445 o.nonEditableAliases = buildUnnamed97(); |
411 } | 446 } |
412 buildCounterGroup--; | 447 buildCounterGroup--; |
413 return o; | 448 return o; |
414 } | 449 } |
415 | 450 |
416 checkGroup(api.Group o) { | 451 checkGroup(api.Group o) { |
417 buildCounterGroup++; | 452 buildCounterGroup++; |
418 if (buildCounterGroup < 3) { | 453 if (buildCounterGroup < 3) { |
419 unittest.expect(o.adminCreated, unittest.isTrue); | 454 unittest.expect(o.adminCreated, unittest.isTrue); |
420 checkUnnamed766(o.aliases); | 455 checkUnnamed96(o.aliases); |
421 unittest.expect(o.description, unittest.equals('foo')); | 456 unittest.expect(o.description, unittest.equals('foo')); |
422 unittest.expect(o.directMembersCount, unittest.equals('foo')); | 457 unittest.expect(o.directMembersCount, unittest.equals('foo')); |
423 unittest.expect(o.email, unittest.equals('foo')); | 458 unittest.expect(o.email, unittest.equals('foo')); |
424 unittest.expect(o.etag, unittest.equals('foo')); | 459 unittest.expect(o.etag, unittest.equals('foo')); |
425 unittest.expect(o.id, unittest.equals('foo')); | 460 unittest.expect(o.id, unittest.equals('foo')); |
426 unittest.expect(o.kind, unittest.equals('foo')); | 461 unittest.expect(o.kind, unittest.equals('foo')); |
427 unittest.expect(o.name, unittest.equals('foo')); | 462 unittest.expect(o.name, unittest.equals('foo')); |
428 checkUnnamed767(o.nonEditableAliases); | 463 checkUnnamed97(o.nonEditableAliases); |
429 } | 464 } |
430 buildCounterGroup--; | 465 buildCounterGroup--; |
431 } | 466 } |
432 | 467 |
433 buildUnnamed768() { | 468 buildUnnamed98() { |
434 var o = new core.List<api.Group>(); | 469 var o = new core.List<api.Group>(); |
435 o.add(buildGroup()); | 470 o.add(buildGroup()); |
436 o.add(buildGroup()); | 471 o.add(buildGroup()); |
437 return o; | 472 return o; |
438 } | 473 } |
439 | 474 |
440 checkUnnamed768(core.List<api.Group> o) { | 475 checkUnnamed98(core.List<api.Group> o) { |
441 unittest.expect(o, unittest.hasLength(2)); | 476 unittest.expect(o, unittest.hasLength(2)); |
442 checkGroup(o[0]); | 477 checkGroup(o[0]); |
443 checkGroup(o[1]); | 478 checkGroup(o[1]); |
444 } | 479 } |
445 | 480 |
446 core.int buildCounterGroups = 0; | 481 core.int buildCounterGroups = 0; |
447 buildGroups() { | 482 buildGroups() { |
448 var o = new api.Groups(); | 483 var o = new api.Groups(); |
449 buildCounterGroups++; | 484 buildCounterGroups++; |
450 if (buildCounterGroups < 3) { | 485 if (buildCounterGroups < 3) { |
451 o.etag = "foo"; | 486 o.etag = "foo"; |
452 o.groups = buildUnnamed768(); | 487 o.groups = buildUnnamed98(); |
453 o.kind = "foo"; | 488 o.kind = "foo"; |
454 o.nextPageToken = "foo"; | 489 o.nextPageToken = "foo"; |
455 } | 490 } |
456 buildCounterGroups--; | 491 buildCounterGroups--; |
457 return o; | 492 return o; |
458 } | 493 } |
459 | 494 |
460 checkGroups(api.Groups o) { | 495 checkGroups(api.Groups o) { |
461 buildCounterGroups++; | 496 buildCounterGroups++; |
462 if (buildCounterGroups < 3) { | 497 if (buildCounterGroups < 3) { |
463 unittest.expect(o.etag, unittest.equals('foo')); | 498 unittest.expect(o.etag, unittest.equals('foo')); |
464 checkUnnamed768(o.groups); | 499 checkUnnamed98(o.groups); |
465 unittest.expect(o.kind, unittest.equals('foo')); | 500 unittest.expect(o.kind, unittest.equals('foo')); |
466 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 501 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
467 } | 502 } |
468 buildCounterGroups--; | 503 buildCounterGroups--; |
469 } | 504 } |
470 | 505 |
471 core.int buildCounterMember = 0; | 506 core.int buildCounterMember = 0; |
472 buildMember() { | 507 buildMember() { |
473 var o = new api.Member(); | 508 var o = new api.Member(); |
474 buildCounterMember++; | 509 buildCounterMember++; |
(...skipping 15 matching lines...) Expand all Loading... |
490 unittest.expect(o.email, unittest.equals('foo')); | 525 unittest.expect(o.email, unittest.equals('foo')); |
491 unittest.expect(o.etag, unittest.equals('foo')); | 526 unittest.expect(o.etag, unittest.equals('foo')); |
492 unittest.expect(o.id, unittest.equals('foo')); | 527 unittest.expect(o.id, unittest.equals('foo')); |
493 unittest.expect(o.kind, unittest.equals('foo')); | 528 unittest.expect(o.kind, unittest.equals('foo')); |
494 unittest.expect(o.role, unittest.equals('foo')); | 529 unittest.expect(o.role, unittest.equals('foo')); |
495 unittest.expect(o.type, unittest.equals('foo')); | 530 unittest.expect(o.type, unittest.equals('foo')); |
496 } | 531 } |
497 buildCounterMember--; | 532 buildCounterMember--; |
498 } | 533 } |
499 | 534 |
500 buildUnnamed769() { | 535 buildUnnamed99() { |
501 var o = new core.List<api.Member>(); | 536 var o = new core.List<api.Member>(); |
502 o.add(buildMember()); | 537 o.add(buildMember()); |
503 o.add(buildMember()); | 538 o.add(buildMember()); |
504 return o; | 539 return o; |
505 } | 540 } |
506 | 541 |
507 checkUnnamed769(core.List<api.Member> o) { | 542 checkUnnamed99(core.List<api.Member> o) { |
508 unittest.expect(o, unittest.hasLength(2)); | 543 unittest.expect(o, unittest.hasLength(2)); |
509 checkMember(o[0]); | 544 checkMember(o[0]); |
510 checkMember(o[1]); | 545 checkMember(o[1]); |
511 } | 546 } |
512 | 547 |
513 core.int buildCounterMembers = 0; | 548 core.int buildCounterMembers = 0; |
514 buildMembers() { | 549 buildMembers() { |
515 var o = new api.Members(); | 550 var o = new api.Members(); |
516 buildCounterMembers++; | 551 buildCounterMembers++; |
517 if (buildCounterMembers < 3) { | 552 if (buildCounterMembers < 3) { |
518 o.etag = "foo"; | 553 o.etag = "foo"; |
519 o.kind = "foo"; | 554 o.kind = "foo"; |
520 o.members = buildUnnamed769(); | 555 o.members = buildUnnamed99(); |
521 o.nextPageToken = "foo"; | 556 o.nextPageToken = "foo"; |
522 } | 557 } |
523 buildCounterMembers--; | 558 buildCounterMembers--; |
524 return o; | 559 return o; |
525 } | 560 } |
526 | 561 |
527 checkMembers(api.Members o) { | 562 checkMembers(api.Members o) { |
528 buildCounterMembers++; | 563 buildCounterMembers++; |
529 if (buildCounterMembers < 3) { | 564 if (buildCounterMembers < 3) { |
530 unittest.expect(o.etag, unittest.equals('foo')); | 565 unittest.expect(o.etag, unittest.equals('foo')); |
531 unittest.expect(o.kind, unittest.equals('foo')); | 566 unittest.expect(o.kind, unittest.equals('foo')); |
532 checkUnnamed769(o.members); | 567 checkUnnamed99(o.members); |
533 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 568 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
534 } | 569 } |
535 buildCounterMembers--; | 570 buildCounterMembers--; |
536 } | 571 } |
537 | 572 |
538 buildUnnamed770() { | 573 buildUnnamed100() { |
539 var o = new core.List<core.String>(); | 574 var o = new core.List<core.String>(); |
540 o.add("foo"); | 575 o.add("foo"); |
541 o.add("foo"); | 576 o.add("foo"); |
542 return o; | 577 return o; |
543 } | 578 } |
544 | 579 |
545 checkUnnamed770(core.List<core.String> o) { | 580 checkUnnamed100(core.List<core.String> o) { |
546 unittest.expect(o, unittest.hasLength(2)); | 581 unittest.expect(o, unittest.hasLength(2)); |
547 unittest.expect(o[0], unittest.equals('foo')); | 582 unittest.expect(o[0], unittest.equals('foo')); |
548 unittest.expect(o[1], unittest.equals('foo')); | 583 unittest.expect(o[1], unittest.equals('foo')); |
549 } | 584 } |
550 | 585 |
551 core.int buildCounterMobileDeviceApplications = 0; | 586 core.int buildCounterMobileDeviceApplications = 0; |
552 buildMobileDeviceApplications() { | 587 buildMobileDeviceApplications() { |
553 var o = new api.MobileDeviceApplications(); | 588 var o = new api.MobileDeviceApplications(); |
554 buildCounterMobileDeviceApplications++; | 589 buildCounterMobileDeviceApplications++; |
555 if (buildCounterMobileDeviceApplications < 3) { | 590 if (buildCounterMobileDeviceApplications < 3) { |
556 o.displayName = "foo"; | 591 o.displayName = "foo"; |
557 o.packageName = "foo"; | 592 o.packageName = "foo"; |
558 o.permission = buildUnnamed770(); | 593 o.permission = buildUnnamed100(); |
559 o.versionCode = 42; | 594 o.versionCode = 42; |
560 o.versionName = "foo"; | 595 o.versionName = "foo"; |
561 } | 596 } |
562 buildCounterMobileDeviceApplications--; | 597 buildCounterMobileDeviceApplications--; |
563 return o; | 598 return o; |
564 } | 599 } |
565 | 600 |
566 checkMobileDeviceApplications(api.MobileDeviceApplications o) { | 601 checkMobileDeviceApplications(api.MobileDeviceApplications o) { |
567 buildCounterMobileDeviceApplications++; | 602 buildCounterMobileDeviceApplications++; |
568 if (buildCounterMobileDeviceApplications < 3) { | 603 if (buildCounterMobileDeviceApplications < 3) { |
569 unittest.expect(o.displayName, unittest.equals('foo')); | 604 unittest.expect(o.displayName, unittest.equals('foo')); |
570 unittest.expect(o.packageName, unittest.equals('foo')); | 605 unittest.expect(o.packageName, unittest.equals('foo')); |
571 checkUnnamed770(o.permission); | 606 checkUnnamed100(o.permission); |
572 unittest.expect(o.versionCode, unittest.equals(42)); | 607 unittest.expect(o.versionCode, unittest.equals(42)); |
573 unittest.expect(o.versionName, unittest.equals('foo')); | 608 unittest.expect(o.versionName, unittest.equals('foo')); |
574 } | 609 } |
575 buildCounterMobileDeviceApplications--; | 610 buildCounterMobileDeviceApplications--; |
576 } | 611 } |
577 | 612 |
578 buildUnnamed771() { | 613 buildUnnamed101() { |
579 var o = new core.List<api.MobileDeviceApplications>(); | 614 var o = new core.List<api.MobileDeviceApplications>(); |
580 o.add(buildMobileDeviceApplications()); | 615 o.add(buildMobileDeviceApplications()); |
581 o.add(buildMobileDeviceApplications()); | 616 o.add(buildMobileDeviceApplications()); |
582 return o; | 617 return o; |
583 } | 618 } |
584 | 619 |
585 checkUnnamed771(core.List<api.MobileDeviceApplications> o) { | 620 checkUnnamed101(core.List<api.MobileDeviceApplications> o) { |
586 unittest.expect(o, unittest.hasLength(2)); | 621 unittest.expect(o, unittest.hasLength(2)); |
587 checkMobileDeviceApplications(o[0]); | 622 checkMobileDeviceApplications(o[0]); |
588 checkMobileDeviceApplications(o[1]); | 623 checkMobileDeviceApplications(o[1]); |
589 } | 624 } |
590 | 625 |
591 buildUnnamed772() { | 626 buildUnnamed102() { |
592 var o = new core.List<core.String>(); | 627 var o = new core.List<core.String>(); |
593 o.add("foo"); | 628 o.add("foo"); |
594 o.add("foo"); | 629 o.add("foo"); |
595 return o; | 630 return o; |
596 } | 631 } |
597 | 632 |
598 checkUnnamed772(core.List<core.String> o) { | 633 checkUnnamed102(core.List<core.String> o) { |
599 unittest.expect(o, unittest.hasLength(2)); | 634 unittest.expect(o, unittest.hasLength(2)); |
600 unittest.expect(o[0], unittest.equals('foo')); | 635 unittest.expect(o[0], unittest.equals('foo')); |
601 unittest.expect(o[1], unittest.equals('foo')); | 636 unittest.expect(o[1], unittest.equals('foo')); |
602 } | 637 } |
603 | 638 |
604 buildUnnamed773() { | 639 buildUnnamed103() { |
605 var o = new core.List<core.String>(); | 640 var o = new core.List<core.String>(); |
606 o.add("foo"); | 641 o.add("foo"); |
607 o.add("foo"); | 642 o.add("foo"); |
608 return o; | 643 return o; |
609 } | 644 } |
610 | 645 |
611 checkUnnamed773(core.List<core.String> o) { | 646 checkUnnamed103(core.List<core.String> o) { |
612 unittest.expect(o, unittest.hasLength(2)); | 647 unittest.expect(o, unittest.hasLength(2)); |
613 unittest.expect(o[0], unittest.equals('foo')); | 648 unittest.expect(o[0], unittest.equals('foo')); |
614 unittest.expect(o[1], unittest.equals('foo')); | 649 unittest.expect(o[1], unittest.equals('foo')); |
615 } | 650 } |
616 | 651 |
617 core.int buildCounterMobileDevice = 0; | 652 core.int buildCounterMobileDevice = 0; |
618 buildMobileDevice() { | 653 buildMobileDevice() { |
619 var o = new api.MobileDevice(); | 654 var o = new api.MobileDevice(); |
620 buildCounterMobileDevice++; | 655 buildCounterMobileDevice++; |
621 if (buildCounterMobileDevice < 3) { | 656 if (buildCounterMobileDevice < 3) { |
622 o.applications = buildUnnamed771(); | 657 o.applications = buildUnnamed101(); |
623 o.basebandVersion = "foo"; | 658 o.basebandVersion = "foo"; |
624 o.buildNumber = "foo"; | 659 o.buildNumber = "foo"; |
625 o.defaultLanguage = "foo"; | 660 o.defaultLanguage = "foo"; |
626 o.deviceCompromisedStatus = "foo"; | 661 o.deviceCompromisedStatus = "foo"; |
627 o.deviceId = "foo"; | 662 o.deviceId = "foo"; |
628 o.email = buildUnnamed772(); | 663 o.email = buildUnnamed102(); |
629 o.etag = "foo"; | 664 o.etag = "foo"; |
630 o.firstSync = core.DateTime.parse("2002-02-27T14:01:02"); | 665 o.firstSync = core.DateTime.parse("2002-02-27T14:01:02"); |
631 o.hardwareId = "foo"; | 666 o.hardwareId = "foo"; |
632 o.imei = "foo"; | 667 o.imei = "foo"; |
633 o.kernelVersion = "foo"; | 668 o.kernelVersion = "foo"; |
634 o.kind = "foo"; | 669 o.kind = "foo"; |
635 o.lastSync = core.DateTime.parse("2002-02-27T14:01:02"); | 670 o.lastSync = core.DateTime.parse("2002-02-27T14:01:02"); |
636 o.managedAccountIsOnOwnerProfile = true; | 671 o.managedAccountIsOnOwnerProfile = true; |
637 o.meid = "foo"; | 672 o.meid = "foo"; |
638 o.model = "foo"; | 673 o.model = "foo"; |
639 o.name = buildUnnamed773(); | 674 o.name = buildUnnamed103(); |
640 o.networkOperator = "foo"; | 675 o.networkOperator = "foo"; |
641 o.os = "foo"; | 676 o.os = "foo"; |
642 o.resourceId = "foo"; | 677 o.resourceId = "foo"; |
643 o.serialNumber = "foo"; | 678 o.serialNumber = "foo"; |
644 o.status = "foo"; | 679 o.status = "foo"; |
645 o.type = "foo"; | 680 o.type = "foo"; |
646 o.userAgent = "foo"; | 681 o.userAgent = "foo"; |
647 o.wifiMacAddress = "foo"; | 682 o.wifiMacAddress = "foo"; |
648 } | 683 } |
649 buildCounterMobileDevice--; | 684 buildCounterMobileDevice--; |
650 return o; | 685 return o; |
651 } | 686 } |
652 | 687 |
653 checkMobileDevice(api.MobileDevice o) { | 688 checkMobileDevice(api.MobileDevice o) { |
654 buildCounterMobileDevice++; | 689 buildCounterMobileDevice++; |
655 if (buildCounterMobileDevice < 3) { | 690 if (buildCounterMobileDevice < 3) { |
656 checkUnnamed771(o.applications); | 691 checkUnnamed101(o.applications); |
657 unittest.expect(o.basebandVersion, unittest.equals('foo')); | 692 unittest.expect(o.basebandVersion, unittest.equals('foo')); |
658 unittest.expect(o.buildNumber, unittest.equals('foo')); | 693 unittest.expect(o.buildNumber, unittest.equals('foo')); |
659 unittest.expect(o.defaultLanguage, unittest.equals('foo')); | 694 unittest.expect(o.defaultLanguage, unittest.equals('foo')); |
660 unittest.expect(o.deviceCompromisedStatus, unittest.equals('foo')); | 695 unittest.expect(o.deviceCompromisedStatus, unittest.equals('foo')); |
661 unittest.expect(o.deviceId, unittest.equals('foo')); | 696 unittest.expect(o.deviceId, unittest.equals('foo')); |
662 checkUnnamed772(o.email); | 697 checkUnnamed102(o.email); |
663 unittest.expect(o.etag, unittest.equals('foo')); | 698 unittest.expect(o.etag, unittest.equals('foo')); |
664 unittest.expect(o.firstSync, unittest.equals(core.DateTime.parse("2002-02-27
T14:01:02"))); | 699 unittest.expect(o.firstSync, unittest.equals(core.DateTime.parse("2002-02-27
T14:01:02"))); |
665 unittest.expect(o.hardwareId, unittest.equals('foo')); | 700 unittest.expect(o.hardwareId, unittest.equals('foo')); |
666 unittest.expect(o.imei, unittest.equals('foo')); | 701 unittest.expect(o.imei, unittest.equals('foo')); |
667 unittest.expect(o.kernelVersion, unittest.equals('foo')); | 702 unittest.expect(o.kernelVersion, unittest.equals('foo')); |
668 unittest.expect(o.kind, unittest.equals('foo')); | 703 unittest.expect(o.kind, unittest.equals('foo')); |
669 unittest.expect(o.lastSync, unittest.equals(core.DateTime.parse("2002-02-27T
14:01:02"))); | 704 unittest.expect(o.lastSync, unittest.equals(core.DateTime.parse("2002-02-27T
14:01:02"))); |
670 unittest.expect(o.managedAccountIsOnOwnerProfile, unittest.isTrue); | 705 unittest.expect(o.managedAccountIsOnOwnerProfile, unittest.isTrue); |
671 unittest.expect(o.meid, unittest.equals('foo')); | 706 unittest.expect(o.meid, unittest.equals('foo')); |
672 unittest.expect(o.model, unittest.equals('foo')); | 707 unittest.expect(o.model, unittest.equals('foo')); |
673 checkUnnamed773(o.name); | 708 checkUnnamed103(o.name); |
674 unittest.expect(o.networkOperator, unittest.equals('foo')); | 709 unittest.expect(o.networkOperator, unittest.equals('foo')); |
675 unittest.expect(o.os, unittest.equals('foo')); | 710 unittest.expect(o.os, unittest.equals('foo')); |
676 unittest.expect(o.resourceId, unittest.equals('foo')); | 711 unittest.expect(o.resourceId, unittest.equals('foo')); |
677 unittest.expect(o.serialNumber, unittest.equals('foo')); | 712 unittest.expect(o.serialNumber, unittest.equals('foo')); |
678 unittest.expect(o.status, unittest.equals('foo')); | 713 unittest.expect(o.status, unittest.equals('foo')); |
679 unittest.expect(o.type, unittest.equals('foo')); | 714 unittest.expect(o.type, unittest.equals('foo')); |
680 unittest.expect(o.userAgent, unittest.equals('foo')); | 715 unittest.expect(o.userAgent, unittest.equals('foo')); |
681 unittest.expect(o.wifiMacAddress, unittest.equals('foo')); | 716 unittest.expect(o.wifiMacAddress, unittest.equals('foo')); |
682 } | 717 } |
683 buildCounterMobileDevice--; | 718 buildCounterMobileDevice--; |
(...skipping 11 matching lines...) Expand all Loading... |
695 } | 730 } |
696 | 731 |
697 checkMobileDeviceAction(api.MobileDeviceAction o) { | 732 checkMobileDeviceAction(api.MobileDeviceAction o) { |
698 buildCounterMobileDeviceAction++; | 733 buildCounterMobileDeviceAction++; |
699 if (buildCounterMobileDeviceAction < 3) { | 734 if (buildCounterMobileDeviceAction < 3) { |
700 unittest.expect(o.action, unittest.equals('foo')); | 735 unittest.expect(o.action, unittest.equals('foo')); |
701 } | 736 } |
702 buildCounterMobileDeviceAction--; | 737 buildCounterMobileDeviceAction--; |
703 } | 738 } |
704 | 739 |
705 buildUnnamed774() { | 740 buildUnnamed104() { |
706 var o = new core.List<api.MobileDevice>(); | 741 var o = new core.List<api.MobileDevice>(); |
707 o.add(buildMobileDevice()); | 742 o.add(buildMobileDevice()); |
708 o.add(buildMobileDevice()); | 743 o.add(buildMobileDevice()); |
709 return o; | 744 return o; |
710 } | 745 } |
711 | 746 |
712 checkUnnamed774(core.List<api.MobileDevice> o) { | 747 checkUnnamed104(core.List<api.MobileDevice> o) { |
713 unittest.expect(o, unittest.hasLength(2)); | 748 unittest.expect(o, unittest.hasLength(2)); |
714 checkMobileDevice(o[0]); | 749 checkMobileDevice(o[0]); |
715 checkMobileDevice(o[1]); | 750 checkMobileDevice(o[1]); |
716 } | 751 } |
717 | 752 |
718 core.int buildCounterMobileDevices = 0; | 753 core.int buildCounterMobileDevices = 0; |
719 buildMobileDevices() { | 754 buildMobileDevices() { |
720 var o = new api.MobileDevices(); | 755 var o = new api.MobileDevices(); |
721 buildCounterMobileDevices++; | 756 buildCounterMobileDevices++; |
722 if (buildCounterMobileDevices < 3) { | 757 if (buildCounterMobileDevices < 3) { |
723 o.etag = "foo"; | 758 o.etag = "foo"; |
724 o.kind = "foo"; | 759 o.kind = "foo"; |
725 o.mobiledevices = buildUnnamed774(); | 760 o.mobiledevices = buildUnnamed104(); |
726 o.nextPageToken = "foo"; | 761 o.nextPageToken = "foo"; |
727 } | 762 } |
728 buildCounterMobileDevices--; | 763 buildCounterMobileDevices--; |
729 return o; | 764 return o; |
730 } | 765 } |
731 | 766 |
732 checkMobileDevices(api.MobileDevices o) { | 767 checkMobileDevices(api.MobileDevices o) { |
733 buildCounterMobileDevices++; | 768 buildCounterMobileDevices++; |
734 if (buildCounterMobileDevices < 3) { | 769 if (buildCounterMobileDevices < 3) { |
735 unittest.expect(o.etag, unittest.equals('foo')); | 770 unittest.expect(o.etag, unittest.equals('foo')); |
736 unittest.expect(o.kind, unittest.equals('foo')); | 771 unittest.expect(o.kind, unittest.equals('foo')); |
737 checkUnnamed774(o.mobiledevices); | 772 checkUnnamed104(o.mobiledevices); |
738 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 773 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
739 } | 774 } |
740 buildCounterMobileDevices--; | 775 buildCounterMobileDevices--; |
741 } | 776 } |
742 | 777 |
743 core.int buildCounterNotification = 0; | 778 core.int buildCounterNotification = 0; |
744 buildNotification() { | 779 buildNotification() { |
745 var o = new api.Notification(); | 780 var o = new api.Notification(); |
746 buildCounterNotification++; | 781 buildCounterNotification++; |
747 if (buildCounterNotification < 3) { | 782 if (buildCounterNotification < 3) { |
(...skipping 18 matching lines...) Expand all Loading... |
766 unittest.expect(o.fromAddress, unittest.equals('foo')); | 801 unittest.expect(o.fromAddress, unittest.equals('foo')); |
767 unittest.expect(o.isUnread, unittest.isTrue); | 802 unittest.expect(o.isUnread, unittest.isTrue); |
768 unittest.expect(o.kind, unittest.equals('foo')); | 803 unittest.expect(o.kind, unittest.equals('foo')); |
769 unittest.expect(o.notificationId, unittest.equals('foo')); | 804 unittest.expect(o.notificationId, unittest.equals('foo')); |
770 unittest.expect(o.sendTime, unittest.equals(core.DateTime.parse("2002-02-27T
14:01:02"))); | 805 unittest.expect(o.sendTime, unittest.equals(core.DateTime.parse("2002-02-27T
14:01:02"))); |
771 unittest.expect(o.subject, unittest.equals('foo')); | 806 unittest.expect(o.subject, unittest.equals('foo')); |
772 } | 807 } |
773 buildCounterNotification--; | 808 buildCounterNotification--; |
774 } | 809 } |
775 | 810 |
776 buildUnnamed775() { | 811 buildUnnamed105() { |
777 var o = new core.List<api.Notification>(); | 812 var o = new core.List<api.Notification>(); |
778 o.add(buildNotification()); | 813 o.add(buildNotification()); |
779 o.add(buildNotification()); | 814 o.add(buildNotification()); |
780 return o; | 815 return o; |
781 } | 816 } |
782 | 817 |
783 checkUnnamed775(core.List<api.Notification> o) { | 818 checkUnnamed105(core.List<api.Notification> o) { |
784 unittest.expect(o, unittest.hasLength(2)); | 819 unittest.expect(o, unittest.hasLength(2)); |
785 checkNotification(o[0]); | 820 checkNotification(o[0]); |
786 checkNotification(o[1]); | 821 checkNotification(o[1]); |
787 } | 822 } |
788 | 823 |
789 core.int buildCounterNotifications = 0; | 824 core.int buildCounterNotifications = 0; |
790 buildNotifications() { | 825 buildNotifications() { |
791 var o = new api.Notifications(); | 826 var o = new api.Notifications(); |
792 buildCounterNotifications++; | 827 buildCounterNotifications++; |
793 if (buildCounterNotifications < 3) { | 828 if (buildCounterNotifications < 3) { |
794 o.etag = "foo"; | 829 o.etag = "foo"; |
795 o.items = buildUnnamed775(); | 830 o.items = buildUnnamed105(); |
796 o.kind = "foo"; | 831 o.kind = "foo"; |
797 o.nextPageToken = "foo"; | 832 o.nextPageToken = "foo"; |
798 o.unreadNotificationsCount = 42; | 833 o.unreadNotificationsCount = 42; |
799 } | 834 } |
800 buildCounterNotifications--; | 835 buildCounterNotifications--; |
801 return o; | 836 return o; |
802 } | 837 } |
803 | 838 |
804 checkNotifications(api.Notifications o) { | 839 checkNotifications(api.Notifications o) { |
805 buildCounterNotifications++; | 840 buildCounterNotifications++; |
806 if (buildCounterNotifications < 3) { | 841 if (buildCounterNotifications < 3) { |
807 unittest.expect(o.etag, unittest.equals('foo')); | 842 unittest.expect(o.etag, unittest.equals('foo')); |
808 checkUnnamed775(o.items); | 843 checkUnnamed105(o.items); |
809 unittest.expect(o.kind, unittest.equals('foo')); | 844 unittest.expect(o.kind, unittest.equals('foo')); |
810 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 845 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
811 unittest.expect(o.unreadNotificationsCount, unittest.equals(42)); | 846 unittest.expect(o.unreadNotificationsCount, unittest.equals(42)); |
812 } | 847 } |
813 buildCounterNotifications--; | 848 buildCounterNotifications--; |
814 } | 849 } |
815 | 850 |
816 core.int buildCounterOrgUnit = 0; | 851 core.int buildCounterOrgUnit = 0; |
817 buildOrgUnit() { | 852 buildOrgUnit() { |
818 var o = new api.OrgUnit(); | 853 var o = new api.OrgUnit(); |
819 buildCounterOrgUnit++; | 854 buildCounterOrgUnit++; |
820 if (buildCounterOrgUnit < 3) { | 855 if (buildCounterOrgUnit < 3) { |
821 o.blockInheritance = true; | 856 o.blockInheritance = true; |
822 o.description = "foo"; | 857 o.description = "foo"; |
823 o.etag = "foo"; | 858 o.etag = "foo"; |
824 o.kind = "foo"; | 859 o.kind = "foo"; |
825 o.name = "foo"; | 860 o.name = "foo"; |
| 861 o.orgUnitId = "foo"; |
826 o.orgUnitPath = "foo"; | 862 o.orgUnitPath = "foo"; |
| 863 o.parentOrgUnitId = "foo"; |
827 o.parentOrgUnitPath = "foo"; | 864 o.parentOrgUnitPath = "foo"; |
828 } | 865 } |
829 buildCounterOrgUnit--; | 866 buildCounterOrgUnit--; |
830 return o; | 867 return o; |
831 } | 868 } |
832 | 869 |
833 checkOrgUnit(api.OrgUnit o) { | 870 checkOrgUnit(api.OrgUnit o) { |
834 buildCounterOrgUnit++; | 871 buildCounterOrgUnit++; |
835 if (buildCounterOrgUnit < 3) { | 872 if (buildCounterOrgUnit < 3) { |
836 unittest.expect(o.blockInheritance, unittest.isTrue); | 873 unittest.expect(o.blockInheritance, unittest.isTrue); |
837 unittest.expect(o.description, unittest.equals('foo')); | 874 unittest.expect(o.description, unittest.equals('foo')); |
838 unittest.expect(o.etag, unittest.equals('foo')); | 875 unittest.expect(o.etag, unittest.equals('foo')); |
839 unittest.expect(o.kind, unittest.equals('foo')); | 876 unittest.expect(o.kind, unittest.equals('foo')); |
840 unittest.expect(o.name, unittest.equals('foo')); | 877 unittest.expect(o.name, unittest.equals('foo')); |
| 878 unittest.expect(o.orgUnitId, unittest.equals('foo')); |
841 unittest.expect(o.orgUnitPath, unittest.equals('foo')); | 879 unittest.expect(o.orgUnitPath, unittest.equals('foo')); |
| 880 unittest.expect(o.parentOrgUnitId, unittest.equals('foo')); |
842 unittest.expect(o.parentOrgUnitPath, unittest.equals('foo')); | 881 unittest.expect(o.parentOrgUnitPath, unittest.equals('foo')); |
843 } | 882 } |
844 buildCounterOrgUnit--; | 883 buildCounterOrgUnit--; |
845 } | 884 } |
846 | 885 |
847 buildUnnamed776() { | 886 buildUnnamed106() { |
848 var o = new core.List<api.OrgUnit>(); | 887 var o = new core.List<api.OrgUnit>(); |
849 o.add(buildOrgUnit()); | 888 o.add(buildOrgUnit()); |
850 o.add(buildOrgUnit()); | 889 o.add(buildOrgUnit()); |
851 return o; | 890 return o; |
852 } | 891 } |
853 | 892 |
854 checkUnnamed776(core.List<api.OrgUnit> o) { | 893 checkUnnamed106(core.List<api.OrgUnit> o) { |
855 unittest.expect(o, unittest.hasLength(2)); | 894 unittest.expect(o, unittest.hasLength(2)); |
856 checkOrgUnit(o[0]); | 895 checkOrgUnit(o[0]); |
857 checkOrgUnit(o[1]); | 896 checkOrgUnit(o[1]); |
858 } | 897 } |
859 | 898 |
860 core.int buildCounterOrgUnits = 0; | 899 core.int buildCounterOrgUnits = 0; |
861 buildOrgUnits() { | 900 buildOrgUnits() { |
862 var o = new api.OrgUnits(); | 901 var o = new api.OrgUnits(); |
863 buildCounterOrgUnits++; | 902 buildCounterOrgUnits++; |
864 if (buildCounterOrgUnits < 3) { | 903 if (buildCounterOrgUnits < 3) { |
865 o.etag = "foo"; | 904 o.etag = "foo"; |
866 o.kind = "foo"; | 905 o.kind = "foo"; |
867 o.organizationUnits = buildUnnamed776(); | 906 o.organizationUnits = buildUnnamed106(); |
868 } | 907 } |
869 buildCounterOrgUnits--; | 908 buildCounterOrgUnits--; |
870 return o; | 909 return o; |
871 } | 910 } |
872 | 911 |
873 checkOrgUnits(api.OrgUnits o) { | 912 checkOrgUnits(api.OrgUnits o) { |
874 buildCounterOrgUnits++; | 913 buildCounterOrgUnits++; |
875 if (buildCounterOrgUnits < 3) { | 914 if (buildCounterOrgUnits < 3) { |
876 unittest.expect(o.etag, unittest.equals('foo')); | 915 unittest.expect(o.etag, unittest.equals('foo')); |
877 unittest.expect(o.kind, unittest.equals('foo')); | 916 unittest.expect(o.kind, unittest.equals('foo')); |
878 checkUnnamed776(o.organizationUnits); | 917 checkUnnamed106(o.organizationUnits); |
879 } | 918 } |
880 buildCounterOrgUnits--; | 919 buildCounterOrgUnits--; |
881 } | 920 } |
882 | 921 |
883 buildUnnamed777() { | 922 buildUnnamed107() { |
884 var o = new core.List<api.SchemaFieldSpec>(); | 923 var o = new core.List<api.SchemaFieldSpec>(); |
885 o.add(buildSchemaFieldSpec()); | 924 o.add(buildSchemaFieldSpec()); |
886 o.add(buildSchemaFieldSpec()); | 925 o.add(buildSchemaFieldSpec()); |
887 return o; | 926 return o; |
888 } | 927 } |
889 | 928 |
890 checkUnnamed777(core.List<api.SchemaFieldSpec> o) { | 929 checkUnnamed107(core.List<api.SchemaFieldSpec> o) { |
891 unittest.expect(o, unittest.hasLength(2)); | 930 unittest.expect(o, unittest.hasLength(2)); |
892 checkSchemaFieldSpec(o[0]); | 931 checkSchemaFieldSpec(o[0]); |
893 checkSchemaFieldSpec(o[1]); | 932 checkSchemaFieldSpec(o[1]); |
894 } | 933 } |
895 | 934 |
896 core.int buildCounterSchema = 0; | 935 core.int buildCounterSchema = 0; |
897 buildSchema() { | 936 buildSchema() { |
898 var o = new api.Schema(); | 937 var o = new api.Schema(); |
899 buildCounterSchema++; | 938 buildCounterSchema++; |
900 if (buildCounterSchema < 3) { | 939 if (buildCounterSchema < 3) { |
901 o.etag = "foo"; | 940 o.etag = "foo"; |
902 o.fields = buildUnnamed777(); | 941 o.fields = buildUnnamed107(); |
903 o.kind = "foo"; | 942 o.kind = "foo"; |
904 o.schemaId = "foo"; | 943 o.schemaId = "foo"; |
905 o.schemaName = "foo"; | 944 o.schemaName = "foo"; |
906 } | 945 } |
907 buildCounterSchema--; | 946 buildCounterSchema--; |
908 return o; | 947 return o; |
909 } | 948 } |
910 | 949 |
911 checkSchema(api.Schema o) { | 950 checkSchema(api.Schema o) { |
912 buildCounterSchema++; | 951 buildCounterSchema++; |
913 if (buildCounterSchema < 3) { | 952 if (buildCounterSchema < 3) { |
914 unittest.expect(o.etag, unittest.equals('foo')); | 953 unittest.expect(o.etag, unittest.equals('foo')); |
915 checkUnnamed777(o.fields); | 954 checkUnnamed107(o.fields); |
916 unittest.expect(o.kind, unittest.equals('foo')); | 955 unittest.expect(o.kind, unittest.equals('foo')); |
917 unittest.expect(o.schemaId, unittest.equals('foo')); | 956 unittest.expect(o.schemaId, unittest.equals('foo')); |
918 unittest.expect(o.schemaName, unittest.equals('foo')); | 957 unittest.expect(o.schemaName, unittest.equals('foo')); |
919 } | 958 } |
920 buildCounterSchema--; | 959 buildCounterSchema--; |
921 } | 960 } |
922 | 961 |
923 core.int buildCounterSchemaFieldSpecNumericIndexingSpec = 0; | 962 core.int buildCounterSchemaFieldSpecNumericIndexingSpec = 0; |
924 buildSchemaFieldSpecNumericIndexingSpec() { | 963 buildSchemaFieldSpecNumericIndexingSpec() { |
925 var o = new api.SchemaFieldSpecNumericIndexingSpec(); | 964 var o = new api.SchemaFieldSpecNumericIndexingSpec(); |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
969 unittest.expect(o.fieldType, unittest.equals('foo')); | 1008 unittest.expect(o.fieldType, unittest.equals('foo')); |
970 unittest.expect(o.indexed, unittest.isTrue); | 1009 unittest.expect(o.indexed, unittest.isTrue); |
971 unittest.expect(o.kind, unittest.equals('foo')); | 1010 unittest.expect(o.kind, unittest.equals('foo')); |
972 unittest.expect(o.multiValued, unittest.isTrue); | 1011 unittest.expect(o.multiValued, unittest.isTrue); |
973 checkSchemaFieldSpecNumericIndexingSpec(o.numericIndexingSpec); | 1012 checkSchemaFieldSpecNumericIndexingSpec(o.numericIndexingSpec); |
974 unittest.expect(o.readAccessType, unittest.equals('foo')); | 1013 unittest.expect(o.readAccessType, unittest.equals('foo')); |
975 } | 1014 } |
976 buildCounterSchemaFieldSpec--; | 1015 buildCounterSchemaFieldSpec--; |
977 } | 1016 } |
978 | 1017 |
979 buildUnnamed778() { | 1018 buildUnnamed108() { |
980 var o = new core.List<api.Schema>(); | 1019 var o = new core.List<api.Schema>(); |
981 o.add(buildSchema()); | 1020 o.add(buildSchema()); |
982 o.add(buildSchema()); | 1021 o.add(buildSchema()); |
983 return o; | 1022 return o; |
984 } | 1023 } |
985 | 1024 |
986 checkUnnamed778(core.List<api.Schema> o) { | 1025 checkUnnamed108(core.List<api.Schema> o) { |
987 unittest.expect(o, unittest.hasLength(2)); | 1026 unittest.expect(o, unittest.hasLength(2)); |
988 checkSchema(o[0]); | 1027 checkSchema(o[0]); |
989 checkSchema(o[1]); | 1028 checkSchema(o[1]); |
990 } | 1029 } |
991 | 1030 |
992 core.int buildCounterSchemas = 0; | 1031 core.int buildCounterSchemas = 0; |
993 buildSchemas() { | 1032 buildSchemas() { |
994 var o = new api.Schemas(); | 1033 var o = new api.Schemas(); |
995 buildCounterSchemas++; | 1034 buildCounterSchemas++; |
996 if (buildCounterSchemas < 3) { | 1035 if (buildCounterSchemas < 3) { |
997 o.etag = "foo"; | 1036 o.etag = "foo"; |
998 o.kind = "foo"; | 1037 o.kind = "foo"; |
999 o.schemas = buildUnnamed778(); | 1038 o.schemas = buildUnnamed108(); |
1000 } | 1039 } |
1001 buildCounterSchemas--; | 1040 buildCounterSchemas--; |
1002 return o; | 1041 return o; |
1003 } | 1042 } |
1004 | 1043 |
1005 checkSchemas(api.Schemas o) { | 1044 checkSchemas(api.Schemas o) { |
1006 buildCounterSchemas++; | 1045 buildCounterSchemas++; |
1007 if (buildCounterSchemas < 3) { | 1046 if (buildCounterSchemas < 3) { |
1008 unittest.expect(o.etag, unittest.equals('foo')); | 1047 unittest.expect(o.etag, unittest.equals('foo')); |
1009 unittest.expect(o.kind, unittest.equals('foo')); | 1048 unittest.expect(o.kind, unittest.equals('foo')); |
1010 checkUnnamed778(o.schemas); | 1049 checkUnnamed108(o.schemas); |
1011 } | 1050 } |
1012 buildCounterSchemas--; | 1051 buildCounterSchemas--; |
1013 } | 1052 } |
1014 | 1053 |
1015 buildUnnamed779() { | 1054 buildUnnamed109() { |
1016 var o = new core.List<core.String>(); | 1055 var o = new core.List<core.String>(); |
1017 o.add("foo"); | 1056 o.add("foo"); |
1018 o.add("foo"); | 1057 o.add("foo"); |
1019 return o; | 1058 return o; |
1020 } | 1059 } |
1021 | 1060 |
1022 checkUnnamed779(core.List<core.String> o) { | 1061 checkUnnamed109(core.List<core.String> o) { |
1023 unittest.expect(o, unittest.hasLength(2)); | 1062 unittest.expect(o, unittest.hasLength(2)); |
1024 unittest.expect(o[0], unittest.equals('foo')); | 1063 unittest.expect(o[0], unittest.equals('foo')); |
1025 unittest.expect(o[1], unittest.equals('foo')); | 1064 unittest.expect(o[1], unittest.equals('foo')); |
1026 } | 1065 } |
1027 | 1066 |
1028 core.int buildCounterToken = 0; | 1067 core.int buildCounterToken = 0; |
1029 buildToken() { | 1068 buildToken() { |
1030 var o = new api.Token(); | 1069 var o = new api.Token(); |
1031 buildCounterToken++; | 1070 buildCounterToken++; |
1032 if (buildCounterToken < 3) { | 1071 if (buildCounterToken < 3) { |
1033 o.anonymous = true; | 1072 o.anonymous = true; |
1034 o.clientId = "foo"; | 1073 o.clientId = "foo"; |
1035 o.displayText = "foo"; | 1074 o.displayText = "foo"; |
1036 o.etag = "foo"; | 1075 o.etag = "foo"; |
1037 o.kind = "foo"; | 1076 o.kind = "foo"; |
1038 o.nativeApp = true; | 1077 o.nativeApp = true; |
1039 o.scopes = buildUnnamed779(); | 1078 o.scopes = buildUnnamed109(); |
1040 o.userKey = "foo"; | 1079 o.userKey = "foo"; |
1041 } | 1080 } |
1042 buildCounterToken--; | 1081 buildCounterToken--; |
1043 return o; | 1082 return o; |
1044 } | 1083 } |
1045 | 1084 |
1046 checkToken(api.Token o) { | 1085 checkToken(api.Token o) { |
1047 buildCounterToken++; | 1086 buildCounterToken++; |
1048 if (buildCounterToken < 3) { | 1087 if (buildCounterToken < 3) { |
1049 unittest.expect(o.anonymous, unittest.isTrue); | 1088 unittest.expect(o.anonymous, unittest.isTrue); |
1050 unittest.expect(o.clientId, unittest.equals('foo')); | 1089 unittest.expect(o.clientId, unittest.equals('foo')); |
1051 unittest.expect(o.displayText, unittest.equals('foo')); | 1090 unittest.expect(o.displayText, unittest.equals('foo')); |
1052 unittest.expect(o.etag, unittest.equals('foo')); | 1091 unittest.expect(o.etag, unittest.equals('foo')); |
1053 unittest.expect(o.kind, unittest.equals('foo')); | 1092 unittest.expect(o.kind, unittest.equals('foo')); |
1054 unittest.expect(o.nativeApp, unittest.isTrue); | 1093 unittest.expect(o.nativeApp, unittest.isTrue); |
1055 checkUnnamed779(o.scopes); | 1094 checkUnnamed109(o.scopes); |
1056 unittest.expect(o.userKey, unittest.equals('foo')); | 1095 unittest.expect(o.userKey, unittest.equals('foo')); |
1057 } | 1096 } |
1058 buildCounterToken--; | 1097 buildCounterToken--; |
1059 } | 1098 } |
1060 | 1099 |
1061 buildUnnamed780() { | 1100 buildUnnamed110() { |
1062 var o = new core.List<api.Token>(); | 1101 var o = new core.List<api.Token>(); |
1063 o.add(buildToken()); | 1102 o.add(buildToken()); |
1064 o.add(buildToken()); | 1103 o.add(buildToken()); |
1065 return o; | 1104 return o; |
1066 } | 1105 } |
1067 | 1106 |
1068 checkUnnamed780(core.List<api.Token> o) { | 1107 checkUnnamed110(core.List<api.Token> o) { |
1069 unittest.expect(o, unittest.hasLength(2)); | 1108 unittest.expect(o, unittest.hasLength(2)); |
1070 checkToken(o[0]); | 1109 checkToken(o[0]); |
1071 checkToken(o[1]); | 1110 checkToken(o[1]); |
1072 } | 1111 } |
1073 | 1112 |
1074 core.int buildCounterTokens = 0; | 1113 core.int buildCounterTokens = 0; |
1075 buildTokens() { | 1114 buildTokens() { |
1076 var o = new api.Tokens(); | 1115 var o = new api.Tokens(); |
1077 buildCounterTokens++; | 1116 buildCounterTokens++; |
1078 if (buildCounterTokens < 3) { | 1117 if (buildCounterTokens < 3) { |
1079 o.etag = "foo"; | 1118 o.etag = "foo"; |
1080 o.items = buildUnnamed780(); | 1119 o.items = buildUnnamed110(); |
1081 o.kind = "foo"; | 1120 o.kind = "foo"; |
1082 } | 1121 } |
1083 buildCounterTokens--; | 1122 buildCounterTokens--; |
1084 return o; | 1123 return o; |
1085 } | 1124 } |
1086 | 1125 |
1087 checkTokens(api.Tokens o) { | 1126 checkTokens(api.Tokens o) { |
1088 buildCounterTokens++; | 1127 buildCounterTokens++; |
1089 if (buildCounterTokens < 3) { | 1128 if (buildCounterTokens < 3) { |
1090 unittest.expect(o.etag, unittest.equals('foo')); | 1129 unittest.expect(o.etag, unittest.equals('foo')); |
1091 checkUnnamed780(o.items); | 1130 checkUnnamed110(o.items); |
1092 unittest.expect(o.kind, unittest.equals('foo')); | 1131 unittest.expect(o.kind, unittest.equals('foo')); |
1093 } | 1132 } |
1094 buildCounterTokens--; | 1133 buildCounterTokens--; |
1095 } | 1134 } |
1096 | 1135 |
1097 buildUnnamed781() { | 1136 buildUnnamed111() { |
1098 var o = new core.List<core.String>(); | 1137 var o = new core.List<core.String>(); |
1099 o.add("foo"); | 1138 o.add("foo"); |
1100 o.add("foo"); | 1139 o.add("foo"); |
1101 return o; | 1140 return o; |
1102 } | 1141 } |
1103 | 1142 |
1104 checkUnnamed781(core.List<core.String> o) { | 1143 checkUnnamed111(core.List<core.String> o) { |
1105 unittest.expect(o, unittest.hasLength(2)); | 1144 unittest.expect(o, unittest.hasLength(2)); |
1106 unittest.expect(o[0], unittest.equals('foo')); | 1145 unittest.expect(o[0], unittest.equals('foo')); |
1107 unittest.expect(o[1], unittest.equals('foo')); | 1146 unittest.expect(o[1], unittest.equals('foo')); |
1108 } | 1147 } |
1109 | 1148 |
1110 buildUnnamed782() { | 1149 buildUnnamed112() { |
1111 var o = new core.Map<core.String, api.UserCustomProperties>(); | 1150 var o = new core.Map<core.String, api.UserCustomProperties>(); |
1112 o["x"] = buildUserCustomProperties(); | 1151 o["x"] = buildUserCustomProperties(); |
1113 o["y"] = buildUserCustomProperties(); | 1152 o["y"] = buildUserCustomProperties(); |
1114 return o; | 1153 return o; |
1115 } | 1154 } |
1116 | 1155 |
1117 checkUnnamed782(core.Map<core.String, api.UserCustomProperties> o) { | 1156 checkUnnamed112(core.Map<core.String, api.UserCustomProperties> o) { |
1118 unittest.expect(o, unittest.hasLength(2)); | 1157 unittest.expect(o, unittest.hasLength(2)); |
1119 checkUserCustomProperties(o["x"]); | 1158 checkUserCustomProperties(o["x"]); |
1120 checkUserCustomProperties(o["y"]); | 1159 checkUserCustomProperties(o["y"]); |
1121 } | 1160 } |
1122 | 1161 |
1123 buildUnnamed783() { | 1162 buildUnnamed113() { |
1124 var o = new core.List<core.String>(); | 1163 var o = new core.List<core.String>(); |
1125 o.add("foo"); | 1164 o.add("foo"); |
1126 o.add("foo"); | 1165 o.add("foo"); |
1127 return o; | 1166 return o; |
1128 } | 1167 } |
1129 | 1168 |
1130 checkUnnamed783(core.List<core.String> o) { | 1169 checkUnnamed113(core.List<core.String> o) { |
1131 unittest.expect(o, unittest.hasLength(2)); | 1170 unittest.expect(o, unittest.hasLength(2)); |
1132 unittest.expect(o[0], unittest.equals('foo')); | 1171 unittest.expect(o[0], unittest.equals('foo')); |
1133 unittest.expect(o[1], unittest.equals('foo')); | 1172 unittest.expect(o[1], unittest.equals('foo')); |
1134 } | 1173 } |
1135 | 1174 |
1136 core.int buildCounterUser = 0; | 1175 core.int buildCounterUser = 0; |
1137 buildUser() { | 1176 buildUser() { |
1138 var o = new api.User(); | 1177 var o = new api.User(); |
1139 buildCounterUser++; | 1178 buildCounterUser++; |
1140 if (buildCounterUser < 3) { | 1179 if (buildCounterUser < 3) { |
1141 o.addresses = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 1180 o.addresses = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; |
1142 o.agreedToTerms = true; | 1181 o.agreedToTerms = true; |
1143 o.aliases = buildUnnamed781(); | 1182 o.aliases = buildUnnamed111(); |
1144 o.changePasswordAtNextLogin = true; | 1183 o.changePasswordAtNextLogin = true; |
1145 o.creationTime = core.DateTime.parse("2002-02-27T14:01:02"); | 1184 o.creationTime = core.DateTime.parse("2002-02-27T14:01:02"); |
1146 o.customSchemas = buildUnnamed782(); | 1185 o.customSchemas = buildUnnamed112(); |
1147 o.customerId = "foo"; | 1186 o.customerId = "foo"; |
1148 o.deletionTime = core.DateTime.parse("2002-02-27T14:01:02"); | 1187 o.deletionTime = core.DateTime.parse("2002-02-27T14:01:02"); |
1149 o.emails = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 1188 o.emails = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; |
1150 o.etag = "foo"; | 1189 o.etag = "foo"; |
1151 o.externalIds = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 1190 o.externalIds = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; |
1152 o.hashFunction = "foo"; | 1191 o.hashFunction = "foo"; |
1153 o.id = "foo"; | 1192 o.id = "foo"; |
1154 o.ims = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 1193 o.ims = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; |
1155 o.includeInGlobalAddressList = true; | 1194 o.includeInGlobalAddressList = true; |
1156 o.ipWhitelisted = true; | 1195 o.ipWhitelisted = true; |
1157 o.isAdmin = true; | 1196 o.isAdmin = true; |
1158 o.isDelegatedAdmin = true; | 1197 o.isDelegatedAdmin = true; |
1159 o.isMailboxSetup = true; | 1198 o.isMailboxSetup = true; |
1160 o.kind = "foo"; | 1199 o.kind = "foo"; |
1161 o.lastLoginTime = core.DateTime.parse("2002-02-27T14:01:02"); | 1200 o.lastLoginTime = core.DateTime.parse("2002-02-27T14:01:02"); |
1162 o.name = buildUserName(); | 1201 o.name = buildUserName(); |
1163 o.nonEditableAliases = buildUnnamed783(); | 1202 o.nonEditableAliases = buildUnnamed113(); |
1164 o.notes = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 1203 o.notes = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; |
1165 o.orgUnitPath = "foo"; | 1204 o.orgUnitPath = "foo"; |
1166 o.organizations = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 1205 o.organizations = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; |
1167 o.password = "foo"; | 1206 o.password = "foo"; |
1168 o.phones = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 1207 o.phones = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; |
1169 o.primaryEmail = "foo"; | 1208 o.primaryEmail = "foo"; |
1170 o.relations = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 1209 o.relations = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; |
1171 o.suspended = true; | 1210 o.suspended = true; |
1172 o.suspensionReason = "foo"; | 1211 o.suspensionReason = "foo"; |
1173 o.thumbnailPhotoUrl = "foo"; | 1212 o.thumbnailPhotoUrl = "foo"; |
1174 o.websites = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 1213 o.websites = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; |
1175 } | 1214 } |
1176 buildCounterUser--; | 1215 buildCounterUser--; |
1177 return o; | 1216 return o; |
1178 } | 1217 } |
1179 | 1218 |
1180 checkUser(api.User o) { | 1219 checkUser(api.User o) { |
1181 buildCounterUser++; | 1220 buildCounterUser++; |
1182 if (buildCounterUser < 3) { | 1221 if (buildCounterUser < 3) { |
1183 var casted1 = (o.addresses) as core.Map; unittest.expect(casted1, unittest.h
asLength(3)); unittest.expect(casted1["list"], unittest.equals([1, 2, 3])); unit
test.expect(casted1["bool"], unittest.equals(true)); unittest.expect(casted1["st
ring"], unittest.equals('foo')); | 1222 var casted1 = (o.addresses) as core.Map; unittest.expect(casted1, unittest.h
asLength(3)); unittest.expect(casted1["list"], unittest.equals([1, 2, 3])); unit
test.expect(casted1["bool"], unittest.equals(true)); unittest.expect(casted1["st
ring"], unittest.equals('foo')); |
1184 unittest.expect(o.agreedToTerms, unittest.isTrue); | 1223 unittest.expect(o.agreedToTerms, unittest.isTrue); |
1185 checkUnnamed781(o.aliases); | 1224 checkUnnamed111(o.aliases); |
1186 unittest.expect(o.changePasswordAtNextLogin, unittest.isTrue); | 1225 unittest.expect(o.changePasswordAtNextLogin, unittest.isTrue); |
1187 unittest.expect(o.creationTime, unittest.equals(core.DateTime.parse("2002-02
-27T14:01:02"))); | 1226 unittest.expect(o.creationTime, unittest.equals(core.DateTime.parse("2002-02
-27T14:01:02"))); |
1188 checkUnnamed782(o.customSchemas); | 1227 checkUnnamed112(o.customSchemas); |
1189 unittest.expect(o.customerId, unittest.equals('foo')); | 1228 unittest.expect(o.customerId, unittest.equals('foo')); |
1190 unittest.expect(o.deletionTime, unittest.equals(core.DateTime.parse("2002-02
-27T14:01:02"))); | 1229 unittest.expect(o.deletionTime, unittest.equals(core.DateTime.parse("2002-02
-27T14:01:02"))); |
1191 var casted2 = (o.emails) as core.Map; unittest.expect(casted2, unittest.hasL
ength(3)); unittest.expect(casted2["list"], unittest.equals([1, 2, 3])); unittes
t.expect(casted2["bool"], unittest.equals(true)); unittest.expect(casted2["strin
g"], unittest.equals('foo')); | 1230 var casted2 = (o.emails) as core.Map; unittest.expect(casted2, unittest.hasL
ength(3)); unittest.expect(casted2["list"], unittest.equals([1, 2, 3])); unittes
t.expect(casted2["bool"], unittest.equals(true)); unittest.expect(casted2["strin
g"], unittest.equals('foo')); |
1192 unittest.expect(o.etag, unittest.equals('foo')); | 1231 unittest.expect(o.etag, unittest.equals('foo')); |
1193 var casted3 = (o.externalIds) as core.Map; unittest.expect(casted3, unittest
.hasLength(3)); unittest.expect(casted3["list"], unittest.equals([1, 2, 3])); un
ittest.expect(casted3["bool"], unittest.equals(true)); unittest.expect(casted3["
string"], unittest.equals('foo')); | 1232 var casted3 = (o.externalIds) as core.Map; unittest.expect(casted3, unittest
.hasLength(3)); unittest.expect(casted3["list"], unittest.equals([1, 2, 3])); un
ittest.expect(casted3["bool"], unittest.equals(true)); unittest.expect(casted3["
string"], unittest.equals('foo')); |
1194 unittest.expect(o.hashFunction, unittest.equals('foo')); | 1233 unittest.expect(o.hashFunction, unittest.equals('foo')); |
1195 unittest.expect(o.id, unittest.equals('foo')); | 1234 unittest.expect(o.id, unittest.equals('foo')); |
1196 var casted4 = (o.ims) as core.Map; unittest.expect(casted4, unittest.hasLeng
th(3)); unittest.expect(casted4["list"], unittest.equals([1, 2, 3])); unittest.e
xpect(casted4["bool"], unittest.equals(true)); unittest.expect(casted4["string"]
, unittest.equals('foo')); | 1235 var casted4 = (o.ims) as core.Map; unittest.expect(casted4, unittest.hasLeng
th(3)); unittest.expect(casted4["list"], unittest.equals([1, 2, 3])); unittest.e
xpect(casted4["bool"], unittest.equals(true)); unittest.expect(casted4["string"]
, unittest.equals('foo')); |
1197 unittest.expect(o.includeInGlobalAddressList, unittest.isTrue); | 1236 unittest.expect(o.includeInGlobalAddressList, unittest.isTrue); |
1198 unittest.expect(o.ipWhitelisted, unittest.isTrue); | 1237 unittest.expect(o.ipWhitelisted, unittest.isTrue); |
1199 unittest.expect(o.isAdmin, unittest.isTrue); | 1238 unittest.expect(o.isAdmin, unittest.isTrue); |
1200 unittest.expect(o.isDelegatedAdmin, unittest.isTrue); | 1239 unittest.expect(o.isDelegatedAdmin, unittest.isTrue); |
1201 unittest.expect(o.isMailboxSetup, unittest.isTrue); | 1240 unittest.expect(o.isMailboxSetup, unittest.isTrue); |
1202 unittest.expect(o.kind, unittest.equals('foo')); | 1241 unittest.expect(o.kind, unittest.equals('foo')); |
1203 unittest.expect(o.lastLoginTime, unittest.equals(core.DateTime.parse("2002-0
2-27T14:01:02"))); | 1242 unittest.expect(o.lastLoginTime, unittest.equals(core.DateTime.parse("2002-0
2-27T14:01:02"))); |
1204 checkUserName(o.name); | 1243 checkUserName(o.name); |
1205 checkUnnamed783(o.nonEditableAliases); | 1244 checkUnnamed113(o.nonEditableAliases); |
1206 var casted5 = (o.notes) as core.Map; unittest.expect(casted5, unittest.hasLe
ngth(3)); unittest.expect(casted5["list"], unittest.equals([1, 2, 3])); unittest
.expect(casted5["bool"], unittest.equals(true)); unittest.expect(casted5["string
"], unittest.equals('foo')); | 1245 var casted5 = (o.notes) as core.Map; unittest.expect(casted5, unittest.hasLe
ngth(3)); unittest.expect(casted5["list"], unittest.equals([1, 2, 3])); unittest
.expect(casted5["bool"], unittest.equals(true)); unittest.expect(casted5["string
"], unittest.equals('foo')); |
1207 unittest.expect(o.orgUnitPath, unittest.equals('foo')); | 1246 unittest.expect(o.orgUnitPath, unittest.equals('foo')); |
1208 var casted6 = (o.organizations) as core.Map; unittest.expect(casted6, unitte
st.hasLength(3)); unittest.expect(casted6["list"], unittest.equals([1, 2, 3]));
unittest.expect(casted6["bool"], unittest.equals(true)); unittest.expect(casted6
["string"], unittest.equals('foo')); | 1247 var casted6 = (o.organizations) as core.Map; unittest.expect(casted6, unitte
st.hasLength(3)); unittest.expect(casted6["list"], unittest.equals([1, 2, 3]));
unittest.expect(casted6["bool"], unittest.equals(true)); unittest.expect(casted6
["string"], unittest.equals('foo')); |
1209 unittest.expect(o.password, unittest.equals('foo')); | 1248 unittest.expect(o.password, unittest.equals('foo')); |
1210 var casted7 = (o.phones) as core.Map; unittest.expect(casted7, unittest.hasL
ength(3)); unittest.expect(casted7["list"], unittest.equals([1, 2, 3])); unittes
t.expect(casted7["bool"], unittest.equals(true)); unittest.expect(casted7["strin
g"], unittest.equals('foo')); | 1249 var casted7 = (o.phones) as core.Map; unittest.expect(casted7, unittest.hasL
ength(3)); unittest.expect(casted7["list"], unittest.equals([1, 2, 3])); unittes
t.expect(casted7["bool"], unittest.equals(true)); unittest.expect(casted7["strin
g"], unittest.equals('foo')); |
1211 unittest.expect(o.primaryEmail, unittest.equals('foo')); | 1250 unittest.expect(o.primaryEmail, unittest.equals('foo')); |
1212 var casted8 = (o.relations) as core.Map; unittest.expect(casted8, unittest.h
asLength(3)); unittest.expect(casted8["list"], unittest.equals([1, 2, 3])); unit
test.expect(casted8["bool"], unittest.equals(true)); unittest.expect(casted8["st
ring"], unittest.equals('foo')); | 1251 var casted8 = (o.relations) as core.Map; unittest.expect(casted8, unittest.h
asLength(3)); unittest.expect(casted8["list"], unittest.equals([1, 2, 3])); unit
test.expect(casted8["bool"], unittest.equals(true)); unittest.expect(casted8["st
ring"], unittest.equals('foo')); |
1213 unittest.expect(o.suspended, unittest.isTrue); | 1252 unittest.expect(o.suspended, unittest.isTrue); |
1214 unittest.expect(o.suspensionReason, unittest.equals('foo')); | 1253 unittest.expect(o.suspensionReason, unittest.equals('foo')); |
1215 unittest.expect(o.thumbnailPhotoUrl, unittest.equals('foo')); | 1254 unittest.expect(o.thumbnailPhotoUrl, unittest.equals('foo')); |
(...skipping 355 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1571 buildCounterUserWebsite++; | 1610 buildCounterUserWebsite++; |
1572 if (buildCounterUserWebsite < 3) { | 1611 if (buildCounterUserWebsite < 3) { |
1573 unittest.expect(o.customType, unittest.equals('foo')); | 1612 unittest.expect(o.customType, unittest.equals('foo')); |
1574 unittest.expect(o.primary, unittest.isTrue); | 1613 unittest.expect(o.primary, unittest.isTrue); |
1575 unittest.expect(o.type, unittest.equals('foo')); | 1614 unittest.expect(o.type, unittest.equals('foo')); |
1576 unittest.expect(o.value, unittest.equals('foo')); | 1615 unittest.expect(o.value, unittest.equals('foo')); |
1577 } | 1616 } |
1578 buildCounterUserWebsite--; | 1617 buildCounterUserWebsite--; |
1579 } | 1618 } |
1580 | 1619 |
1581 buildUnnamed784() { | 1620 buildUnnamed114() { |
1582 var o = new core.List<api.User>(); | 1621 var o = new core.List<api.User>(); |
1583 o.add(buildUser()); | 1622 o.add(buildUser()); |
1584 o.add(buildUser()); | 1623 o.add(buildUser()); |
1585 return o; | 1624 return o; |
1586 } | 1625 } |
1587 | 1626 |
1588 checkUnnamed784(core.List<api.User> o) { | 1627 checkUnnamed114(core.List<api.User> o) { |
1589 unittest.expect(o, unittest.hasLength(2)); | 1628 unittest.expect(o, unittest.hasLength(2)); |
1590 checkUser(o[0]); | 1629 checkUser(o[0]); |
1591 checkUser(o[1]); | 1630 checkUser(o[1]); |
1592 } | 1631 } |
1593 | 1632 |
1594 core.int buildCounterUsers = 0; | 1633 core.int buildCounterUsers = 0; |
1595 buildUsers() { | 1634 buildUsers() { |
1596 var o = new api.Users(); | 1635 var o = new api.Users(); |
1597 buildCounterUsers++; | 1636 buildCounterUsers++; |
1598 if (buildCounterUsers < 3) { | 1637 if (buildCounterUsers < 3) { |
1599 o.etag = "foo"; | 1638 o.etag = "foo"; |
1600 o.kind = "foo"; | 1639 o.kind = "foo"; |
1601 o.nextPageToken = "foo"; | 1640 o.nextPageToken = "foo"; |
1602 o.triggerEvent = "foo"; | 1641 o.triggerEvent = "foo"; |
1603 o.users = buildUnnamed784(); | 1642 o.users = buildUnnamed114(); |
1604 } | 1643 } |
1605 buildCounterUsers--; | 1644 buildCounterUsers--; |
1606 return o; | 1645 return o; |
1607 } | 1646 } |
1608 | 1647 |
1609 checkUsers(api.Users o) { | 1648 checkUsers(api.Users o) { |
1610 buildCounterUsers++; | 1649 buildCounterUsers++; |
1611 if (buildCounterUsers < 3) { | 1650 if (buildCounterUsers < 3) { |
1612 unittest.expect(o.etag, unittest.equals('foo')); | 1651 unittest.expect(o.etag, unittest.equals('foo')); |
1613 unittest.expect(o.kind, unittest.equals('foo')); | 1652 unittest.expect(o.kind, unittest.equals('foo')); |
1614 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 1653 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
1615 unittest.expect(o.triggerEvent, unittest.equals('foo')); | 1654 unittest.expect(o.triggerEvent, unittest.equals('foo')); |
1616 checkUnnamed784(o.users); | 1655 checkUnnamed114(o.users); |
1617 } | 1656 } |
1618 buildCounterUsers--; | 1657 buildCounterUsers--; |
1619 } | 1658 } |
1620 | 1659 |
1621 core.int buildCounterVerificationCode = 0; | 1660 core.int buildCounterVerificationCode = 0; |
1622 buildVerificationCode() { | 1661 buildVerificationCode() { |
1623 var o = new api.VerificationCode(); | 1662 var o = new api.VerificationCode(); |
1624 buildCounterVerificationCode++; | 1663 buildCounterVerificationCode++; |
1625 if (buildCounterVerificationCode < 3) { | 1664 if (buildCounterVerificationCode < 3) { |
1626 o.etag = "foo"; | 1665 o.etag = "foo"; |
1627 o.kind = "foo"; | 1666 o.kind = "foo"; |
1628 o.userId = "foo"; | 1667 o.userId = "foo"; |
1629 o.verificationCode = "foo"; | 1668 o.verificationCode = "foo"; |
1630 } | 1669 } |
1631 buildCounterVerificationCode--; | 1670 buildCounterVerificationCode--; |
1632 return o; | 1671 return o; |
1633 } | 1672 } |
1634 | 1673 |
1635 checkVerificationCode(api.VerificationCode o) { | 1674 checkVerificationCode(api.VerificationCode o) { |
1636 buildCounterVerificationCode++; | 1675 buildCounterVerificationCode++; |
1637 if (buildCounterVerificationCode < 3) { | 1676 if (buildCounterVerificationCode < 3) { |
1638 unittest.expect(o.etag, unittest.equals('foo')); | 1677 unittest.expect(o.etag, unittest.equals('foo')); |
1639 unittest.expect(o.kind, unittest.equals('foo')); | 1678 unittest.expect(o.kind, unittest.equals('foo')); |
1640 unittest.expect(o.userId, unittest.equals('foo')); | 1679 unittest.expect(o.userId, unittest.equals('foo')); |
1641 unittest.expect(o.verificationCode, unittest.equals('foo')); | 1680 unittest.expect(o.verificationCode, unittest.equals('foo')); |
1642 } | 1681 } |
1643 buildCounterVerificationCode--; | 1682 buildCounterVerificationCode--; |
1644 } | 1683 } |
1645 | 1684 |
1646 buildUnnamed785() { | 1685 buildUnnamed115() { |
1647 var o = new core.List<api.VerificationCode>(); | 1686 var o = new core.List<api.VerificationCode>(); |
1648 o.add(buildVerificationCode()); | 1687 o.add(buildVerificationCode()); |
1649 o.add(buildVerificationCode()); | 1688 o.add(buildVerificationCode()); |
1650 return o; | 1689 return o; |
1651 } | 1690 } |
1652 | 1691 |
1653 checkUnnamed785(core.List<api.VerificationCode> o) { | 1692 checkUnnamed115(core.List<api.VerificationCode> o) { |
1654 unittest.expect(o, unittest.hasLength(2)); | 1693 unittest.expect(o, unittest.hasLength(2)); |
1655 checkVerificationCode(o[0]); | 1694 checkVerificationCode(o[0]); |
1656 checkVerificationCode(o[1]); | 1695 checkVerificationCode(o[1]); |
1657 } | 1696 } |
1658 | 1697 |
1659 core.int buildCounterVerificationCodes = 0; | 1698 core.int buildCounterVerificationCodes = 0; |
1660 buildVerificationCodes() { | 1699 buildVerificationCodes() { |
1661 var o = new api.VerificationCodes(); | 1700 var o = new api.VerificationCodes(); |
1662 buildCounterVerificationCodes++; | 1701 buildCounterVerificationCodes++; |
1663 if (buildCounterVerificationCodes < 3) { | 1702 if (buildCounterVerificationCodes < 3) { |
1664 o.etag = "foo"; | 1703 o.etag = "foo"; |
1665 o.items = buildUnnamed785(); | 1704 o.items = buildUnnamed115(); |
1666 o.kind = "foo"; | 1705 o.kind = "foo"; |
1667 } | 1706 } |
1668 buildCounterVerificationCodes--; | 1707 buildCounterVerificationCodes--; |
1669 return o; | 1708 return o; |
1670 } | 1709 } |
1671 | 1710 |
1672 checkVerificationCodes(api.VerificationCodes o) { | 1711 checkVerificationCodes(api.VerificationCodes o) { |
1673 buildCounterVerificationCodes++; | 1712 buildCounterVerificationCodes++; |
1674 if (buildCounterVerificationCodes < 3) { | 1713 if (buildCounterVerificationCodes < 3) { |
1675 unittest.expect(o.etag, unittest.equals('foo')); | 1714 unittest.expect(o.etag, unittest.equals('foo')); |
1676 checkUnnamed785(o.items); | 1715 checkUnnamed115(o.items); |
1677 unittest.expect(o.kind, unittest.equals('foo')); | 1716 unittest.expect(o.kind, unittest.equals('foo')); |
1678 } | 1717 } |
1679 buildCounterVerificationCodes--; | 1718 buildCounterVerificationCodes--; |
1680 } | 1719 } |
1681 | 1720 |
1682 buildUnnamed786() { | 1721 buildUnnamed116() { |
1683 var o = new core.List<core.String>(); | 1722 var o = new core.List<core.String>(); |
1684 o.add("foo"); | 1723 o.add("foo"); |
1685 o.add("foo"); | 1724 o.add("foo"); |
1686 return o; | 1725 return o; |
1687 } | 1726 } |
1688 | 1727 |
1689 checkUnnamed786(core.List<core.String> o) { | 1728 checkUnnamed116(core.List<core.String> o) { |
1690 unittest.expect(o, unittest.hasLength(2)); | 1729 unittest.expect(o, unittest.hasLength(2)); |
1691 unittest.expect(o[0], unittest.equals('foo')); | 1730 unittest.expect(o[0], unittest.equals('foo')); |
1692 unittest.expect(o[1], unittest.equals('foo')); | 1731 unittest.expect(o[1], unittest.equals('foo')); |
1693 } | 1732 } |
1694 | 1733 |
1695 buildUnnamed787() { | 1734 buildUnnamed117() { |
1696 var o = new core.List<core.String>(); | 1735 var o = new core.List<core.String>(); |
1697 o.add("foo"); | 1736 o.add("foo"); |
1698 o.add("foo"); | 1737 o.add("foo"); |
1699 return o; | 1738 return o; |
1700 } | 1739 } |
1701 | 1740 |
1702 checkUnnamed787(core.List<core.String> o) { | 1741 checkUnnamed117(core.List<core.String> o) { |
1703 unittest.expect(o, unittest.hasLength(2)); | 1742 unittest.expect(o, unittest.hasLength(2)); |
1704 unittest.expect(o[0], unittest.equals('foo')); | 1743 unittest.expect(o[0], unittest.equals('foo')); |
1705 unittest.expect(o[1], unittest.equals('foo')); | 1744 unittest.expect(o[1], unittest.equals('foo')); |
1706 } | 1745 } |
1707 | 1746 |
1708 buildUnnamed788() { | 1747 buildUnnamed118() { |
1709 var o = new core.List<core.String>(); | 1748 var o = new core.List<core.String>(); |
1710 o.add("foo"); | 1749 o.add("foo"); |
1711 o.add("foo"); | 1750 o.add("foo"); |
1712 return o; | 1751 return o; |
1713 } | 1752 } |
1714 | 1753 |
1715 checkUnnamed788(core.List<core.String> o) { | 1754 checkUnnamed118(core.List<core.String> o) { |
1716 unittest.expect(o, unittest.hasLength(2)); | 1755 unittest.expect(o, unittest.hasLength(2)); |
1717 unittest.expect(o[0], unittest.equals('foo')); | 1756 unittest.expect(o[0], unittest.equals('foo')); |
1718 unittest.expect(o[1], unittest.equals('foo')); | 1757 unittest.expect(o[1], unittest.equals('foo')); |
1719 } | 1758 } |
1720 | 1759 |
1721 buildUnnamed789() { | 1760 buildUnnamed119() { |
1722 var o = new core.List<core.String>(); | 1761 var o = new core.List<core.String>(); |
1723 o.add("foo"); | 1762 o.add("foo"); |
1724 o.add("foo"); | 1763 o.add("foo"); |
1725 return o; | 1764 return o; |
1726 } | 1765 } |
1727 | 1766 |
1728 checkUnnamed789(core.List<core.String> o) { | 1767 checkUnnamed119(core.List<core.String> o) { |
1729 unittest.expect(o, unittest.hasLength(2)); | 1768 unittest.expect(o, unittest.hasLength(2)); |
1730 unittest.expect(o[0], unittest.equals('foo')); | 1769 unittest.expect(o[0], unittest.equals('foo')); |
1731 unittest.expect(o[1], unittest.equals('foo')); | 1770 unittest.expect(o[1], unittest.equals('foo')); |
1732 } | 1771 } |
1733 | 1772 |
1734 | 1773 |
1735 main() { | 1774 main() { |
1736 unittest.group("obj-schema-Alias", () { | 1775 unittest.group("obj-schema-Alias", () { |
1737 unittest.test("to-json--from-json", () { | 1776 unittest.test("to-json--from-json", () { |
1738 var o = buildAlias(); | 1777 var o = buildAlias(); |
(...skipping 395 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2134 var o = buildVerificationCodes(); | 2173 var o = buildVerificationCodes(); |
2135 var od = new api.VerificationCodes.fromJson(o.toJson()); | 2174 var od = new api.VerificationCodes.fromJson(o.toJson()); |
2136 checkVerificationCodes(od); | 2175 checkVerificationCodes(od); |
2137 }); | 2176 }); |
2138 }); | 2177 }); |
2139 | 2178 |
2140 | 2179 |
2141 unittest.group("resource-AspsResourceApi", () { | 2180 unittest.group("resource-AspsResourceApi", () { |
2142 unittest.test("method--delete", () { | 2181 unittest.test("method--delete", () { |
2143 | 2182 |
2144 var mock = new common_test.HttpServerMock(); | 2183 var mock = new HttpServerMock(); |
2145 api.AspsResourceApi res = new api.AdminApi(mock).asps; | 2184 api.AspsResourceApi res = new api.AdminApi(mock).asps; |
2146 var arg_userKey = "foo"; | 2185 var arg_userKey = "foo"; |
2147 var arg_codeId = 42; | 2186 var arg_codeId = 42; |
2148 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2187 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
2149 var path = (req.url).path; | 2188 var path = (req.url).path; |
2150 var pathOffset = 0; | 2189 var pathOffset = 0; |
2151 var index; | 2190 var index; |
2152 var subPart; | 2191 var subPart; |
2153 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2192 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
2154 pathOffset += 1; | 2193 pathOffset += 1; |
(...skipping 27 matching lines...) Expand all Loading... |
2182 var keyvalue = part.split("="); | 2221 var keyvalue = part.split("="); |
2183 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 2222 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
2184 } | 2223 } |
2185 } | 2224 } |
2186 | 2225 |
2187 | 2226 |
2188 var h = { | 2227 var h = { |
2189 "content-type" : "application/json; charset=utf-8", | 2228 "content-type" : "application/json; charset=utf-8", |
2190 }; | 2229 }; |
2191 var resp = ""; | 2230 var resp = ""; |
2192 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 2231 return new async.Future.value(stringResponse(200, h, resp)); |
2193 }), true); | 2232 }), true); |
2194 res.delete(arg_userKey, arg_codeId).then(unittest.expectAsync((_) {})); | 2233 res.delete(arg_userKey, arg_codeId).then(unittest.expectAsync((_) {})); |
2195 }); | 2234 }); |
2196 | 2235 |
2197 unittest.test("method--get", () { | 2236 unittest.test("method--get", () { |
2198 | 2237 |
2199 var mock = new common_test.HttpServerMock(); | 2238 var mock = new HttpServerMock(); |
2200 api.AspsResourceApi res = new api.AdminApi(mock).asps; | 2239 api.AspsResourceApi res = new api.AdminApi(mock).asps; |
2201 var arg_userKey = "foo"; | 2240 var arg_userKey = "foo"; |
2202 var arg_codeId = 42; | 2241 var arg_codeId = 42; |
2203 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2242 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
2204 var path = (req.url).path; | 2243 var path = (req.url).path; |
2205 var pathOffset = 0; | 2244 var pathOffset = 0; |
2206 var index; | 2245 var index; |
2207 var subPart; | 2246 var subPart; |
2208 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2247 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
2209 pathOffset += 1; | 2248 pathOffset += 1; |
(...skipping 27 matching lines...) Expand all Loading... |
2237 var keyvalue = part.split("="); | 2276 var keyvalue = part.split("="); |
2238 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 2277 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
2239 } | 2278 } |
2240 } | 2279 } |
2241 | 2280 |
2242 | 2281 |
2243 var h = { | 2282 var h = { |
2244 "content-type" : "application/json; charset=utf-8", | 2283 "content-type" : "application/json; charset=utf-8", |
2245 }; | 2284 }; |
2246 var resp = convert.JSON.encode(buildAsp()); | 2285 var resp = convert.JSON.encode(buildAsp()); |
2247 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 2286 return new async.Future.value(stringResponse(200, h, resp)); |
2248 }), true); | 2287 }), true); |
2249 res.get(arg_userKey, arg_codeId).then(unittest.expectAsync(((api.Asp respo
nse) { | 2288 res.get(arg_userKey, arg_codeId).then(unittest.expectAsync(((api.Asp respo
nse) { |
2250 checkAsp(response); | 2289 checkAsp(response); |
2251 }))); | 2290 }))); |
2252 }); | 2291 }); |
2253 | 2292 |
2254 unittest.test("method--list", () { | 2293 unittest.test("method--list", () { |
2255 | 2294 |
2256 var mock = new common_test.HttpServerMock(); | 2295 var mock = new HttpServerMock(); |
2257 api.AspsResourceApi res = new api.AdminApi(mock).asps; | 2296 api.AspsResourceApi res = new api.AdminApi(mock).asps; |
2258 var arg_userKey = "foo"; | 2297 var arg_userKey = "foo"; |
2259 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2298 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
2260 var path = (req.url).path; | 2299 var path = (req.url).path; |
2261 var pathOffset = 0; | 2300 var pathOffset = 0; |
2262 var index; | 2301 var index; |
2263 var subPart; | 2302 var subPart; |
2264 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2303 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
2265 pathOffset += 1; | 2304 pathOffset += 1; |
2266 unittest.expect(path.substring(pathOffset, pathOffset + 19), unittest.eq
uals("admin/directory/v1/")); | 2305 unittest.expect(path.substring(pathOffset, pathOffset + 19), unittest.eq
uals("admin/directory/v1/")); |
(...skipping 23 matching lines...) Expand all Loading... |
2290 var keyvalue = part.split("="); | 2329 var keyvalue = part.split("="); |
2291 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 2330 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
2292 } | 2331 } |
2293 } | 2332 } |
2294 | 2333 |
2295 | 2334 |
2296 var h = { | 2335 var h = { |
2297 "content-type" : "application/json; charset=utf-8", | 2336 "content-type" : "application/json; charset=utf-8", |
2298 }; | 2337 }; |
2299 var resp = convert.JSON.encode(buildAsps()); | 2338 var resp = convert.JSON.encode(buildAsps()); |
2300 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 2339 return new async.Future.value(stringResponse(200, h, resp)); |
2301 }), true); | 2340 }), true); |
2302 res.list(arg_userKey).then(unittest.expectAsync(((api.Asps response) { | 2341 res.list(arg_userKey).then(unittest.expectAsync(((api.Asps response) { |
2303 checkAsps(response); | 2342 checkAsps(response); |
2304 }))); | 2343 }))); |
2305 }); | 2344 }); |
2306 | 2345 |
2307 }); | 2346 }); |
2308 | 2347 |
2309 | 2348 |
2310 unittest.group("resource-ChannelsResourceApi", () { | 2349 unittest.group("resource-ChannelsResourceApi", () { |
2311 unittest.test("method--stop", () { | 2350 unittest.test("method--stop", () { |
2312 | 2351 |
2313 var mock = new common_test.HttpServerMock(); | 2352 var mock = new HttpServerMock(); |
2314 api.ChannelsResourceApi res = new api.AdminApi(mock).channels; | 2353 api.ChannelsResourceApi res = new api.AdminApi(mock).channels; |
2315 var arg_request = buildChannel(); | 2354 var arg_request = buildChannel(); |
2316 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2355 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
2317 var obj = new api.Channel.fromJson(json); | 2356 var obj = new api.Channel.fromJson(json); |
2318 checkChannel(obj); | 2357 checkChannel(obj); |
2319 | 2358 |
2320 var path = (req.url).path; | 2359 var path = (req.url).path; |
2321 var pathOffset = 0; | 2360 var pathOffset = 0; |
2322 var index; | 2361 var index; |
2323 var subPart; | 2362 var subPart; |
(...skipping 17 matching lines...) Expand all Loading... |
2341 var keyvalue = part.split("="); | 2380 var keyvalue = part.split("="); |
2342 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 2381 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
2343 } | 2382 } |
2344 } | 2383 } |
2345 | 2384 |
2346 | 2385 |
2347 var h = { | 2386 var h = { |
2348 "content-type" : "application/json; charset=utf-8", | 2387 "content-type" : "application/json; charset=utf-8", |
2349 }; | 2388 }; |
2350 var resp = ""; | 2389 var resp = ""; |
2351 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 2390 return new async.Future.value(stringResponse(200, h, resp)); |
2352 }), true); | 2391 }), true); |
2353 res.stop(arg_request).then(unittest.expectAsync((_) {})); | 2392 res.stop(arg_request).then(unittest.expectAsync((_) {})); |
2354 }); | 2393 }); |
2355 | 2394 |
2356 }); | 2395 }); |
2357 | 2396 |
2358 | 2397 |
2359 unittest.group("resource-ChromeosdevicesResourceApi", () { | 2398 unittest.group("resource-ChromeosdevicesResourceApi", () { |
2360 unittest.test("method--get", () { | 2399 unittest.test("method--get", () { |
2361 | 2400 |
2362 var mock = new common_test.HttpServerMock(); | 2401 var mock = new HttpServerMock(); |
2363 api.ChromeosdevicesResourceApi res = new api.AdminApi(mock).chromeosdevice
s; | 2402 api.ChromeosdevicesResourceApi res = new api.AdminApi(mock).chromeosdevice
s; |
2364 var arg_customerId = "foo"; | 2403 var arg_customerId = "foo"; |
2365 var arg_deviceId = "foo"; | 2404 var arg_deviceId = "foo"; |
2366 var arg_projection = "foo"; | 2405 var arg_projection = "foo"; |
2367 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2406 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
2368 var path = (req.url).path; | 2407 var path = (req.url).path; |
2369 var pathOffset = 0; | 2408 var pathOffset = 0; |
2370 var index; | 2409 var index; |
2371 var subPart; | 2410 var subPart; |
2372 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2411 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
(...skipping 29 matching lines...) Expand all Loading... |
2402 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 2441 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
2403 } | 2442 } |
2404 } | 2443 } |
2405 unittest.expect(queryMap["projection"].first, unittest.equals(arg_projec
tion)); | 2444 unittest.expect(queryMap["projection"].first, unittest.equals(arg_projec
tion)); |
2406 | 2445 |
2407 | 2446 |
2408 var h = { | 2447 var h = { |
2409 "content-type" : "application/json; charset=utf-8", | 2448 "content-type" : "application/json; charset=utf-8", |
2410 }; | 2449 }; |
2411 var resp = convert.JSON.encode(buildChromeOsDevice()); | 2450 var resp = convert.JSON.encode(buildChromeOsDevice()); |
2412 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 2451 return new async.Future.value(stringResponse(200, h, resp)); |
2413 }), true); | 2452 }), true); |
2414 res.get(arg_customerId, arg_deviceId, projection: arg_projection).then(uni
ttest.expectAsync(((api.ChromeOsDevice response) { | 2453 res.get(arg_customerId, arg_deviceId, projection: arg_projection).then(uni
ttest.expectAsync(((api.ChromeOsDevice response) { |
2415 checkChromeOsDevice(response); | 2454 checkChromeOsDevice(response); |
2416 }))); | 2455 }))); |
2417 }); | 2456 }); |
2418 | 2457 |
2419 unittest.test("method--list", () { | 2458 unittest.test("method--list", () { |
2420 | 2459 |
2421 var mock = new common_test.HttpServerMock(); | 2460 var mock = new HttpServerMock(); |
2422 api.ChromeosdevicesResourceApi res = new api.AdminApi(mock).chromeosdevice
s; | 2461 api.ChromeosdevicesResourceApi res = new api.AdminApi(mock).chromeosdevice
s; |
2423 var arg_customerId = "foo"; | 2462 var arg_customerId = "foo"; |
2424 var arg_maxResults = 42; | 2463 var arg_maxResults = 42; |
2425 var arg_orderBy = "foo"; | 2464 var arg_orderBy = "foo"; |
2426 var arg_pageToken = "foo"; | 2465 var arg_pageToken = "foo"; |
2427 var arg_projection = "foo"; | 2466 var arg_projection = "foo"; |
2428 var arg_query = "foo"; | 2467 var arg_query = "foo"; |
2429 var arg_sortOrder = "foo"; | 2468 var arg_sortOrder = "foo"; |
2430 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2469 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
2431 var path = (req.url).path; | 2470 var path = (req.url).path; |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2467 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | 2506 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); |
2468 unittest.expect(queryMap["projection"].first, unittest.equals(arg_projec
tion)); | 2507 unittest.expect(queryMap["projection"].first, unittest.equals(arg_projec
tion)); |
2469 unittest.expect(queryMap["query"].first, unittest.equals(arg_query)); | 2508 unittest.expect(queryMap["query"].first, unittest.equals(arg_query)); |
2470 unittest.expect(queryMap["sortOrder"].first, unittest.equals(arg_sortOrd
er)); | 2509 unittest.expect(queryMap["sortOrder"].first, unittest.equals(arg_sortOrd
er)); |
2471 | 2510 |
2472 | 2511 |
2473 var h = { | 2512 var h = { |
2474 "content-type" : "application/json; charset=utf-8", | 2513 "content-type" : "application/json; charset=utf-8", |
2475 }; | 2514 }; |
2476 var resp = convert.JSON.encode(buildChromeOsDevices()); | 2515 var resp = convert.JSON.encode(buildChromeOsDevices()); |
2477 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 2516 return new async.Future.value(stringResponse(200, h, resp)); |
2478 }), true); | 2517 }), true); |
2479 res.list(arg_customerId, maxResults: arg_maxResults, orderBy: arg_orderBy,
pageToken: arg_pageToken, projection: arg_projection, query: arg_query, sortOrd
er: arg_sortOrder).then(unittest.expectAsync(((api.ChromeOsDevices response) { | 2518 res.list(arg_customerId, maxResults: arg_maxResults, orderBy: arg_orderBy,
pageToken: arg_pageToken, projection: arg_projection, query: arg_query, sortOrd
er: arg_sortOrder).then(unittest.expectAsync(((api.ChromeOsDevices response) { |
2480 checkChromeOsDevices(response); | 2519 checkChromeOsDevices(response); |
2481 }))); | 2520 }))); |
2482 }); | 2521 }); |
2483 | 2522 |
2484 unittest.test("method--patch", () { | 2523 unittest.test("method--patch", () { |
2485 | 2524 |
2486 var mock = new common_test.HttpServerMock(); | 2525 var mock = new HttpServerMock(); |
2487 api.ChromeosdevicesResourceApi res = new api.AdminApi(mock).chromeosdevice
s; | 2526 api.ChromeosdevicesResourceApi res = new api.AdminApi(mock).chromeosdevice
s; |
2488 var arg_request = buildChromeOsDevice(); | 2527 var arg_request = buildChromeOsDevice(); |
2489 var arg_customerId = "foo"; | 2528 var arg_customerId = "foo"; |
2490 var arg_deviceId = "foo"; | 2529 var arg_deviceId = "foo"; |
2491 var arg_projection = "foo"; | 2530 var arg_projection = "foo"; |
2492 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2531 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
2493 var obj = new api.ChromeOsDevice.fromJson(json); | 2532 var obj = new api.ChromeOsDevice.fromJson(json); |
2494 checkChromeOsDevice(obj); | 2533 checkChromeOsDevice(obj); |
2495 | 2534 |
2496 var path = (req.url).path; | 2535 var path = (req.url).path; |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2530 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 2569 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
2531 } | 2570 } |
2532 } | 2571 } |
2533 unittest.expect(queryMap["projection"].first, unittest.equals(arg_projec
tion)); | 2572 unittest.expect(queryMap["projection"].first, unittest.equals(arg_projec
tion)); |
2534 | 2573 |
2535 | 2574 |
2536 var h = { | 2575 var h = { |
2537 "content-type" : "application/json; charset=utf-8", | 2576 "content-type" : "application/json; charset=utf-8", |
2538 }; | 2577 }; |
2539 var resp = convert.JSON.encode(buildChromeOsDevice()); | 2578 var resp = convert.JSON.encode(buildChromeOsDevice()); |
2540 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 2579 return new async.Future.value(stringResponse(200, h, resp)); |
2541 }), true); | 2580 }), true); |
2542 res.patch(arg_request, arg_customerId, arg_deviceId, projection: arg_proje
ction).then(unittest.expectAsync(((api.ChromeOsDevice response) { | 2581 res.patch(arg_request, arg_customerId, arg_deviceId, projection: arg_proje
ction).then(unittest.expectAsync(((api.ChromeOsDevice response) { |
2543 checkChromeOsDevice(response); | 2582 checkChromeOsDevice(response); |
2544 }))); | 2583 }))); |
2545 }); | 2584 }); |
2546 | 2585 |
2547 unittest.test("method--update", () { | 2586 unittest.test("method--update", () { |
2548 | 2587 |
2549 var mock = new common_test.HttpServerMock(); | 2588 var mock = new HttpServerMock(); |
2550 api.ChromeosdevicesResourceApi res = new api.AdminApi(mock).chromeosdevice
s; | 2589 api.ChromeosdevicesResourceApi res = new api.AdminApi(mock).chromeosdevice
s; |
2551 var arg_request = buildChromeOsDevice(); | 2590 var arg_request = buildChromeOsDevice(); |
2552 var arg_customerId = "foo"; | 2591 var arg_customerId = "foo"; |
2553 var arg_deviceId = "foo"; | 2592 var arg_deviceId = "foo"; |
2554 var arg_projection = "foo"; | 2593 var arg_projection = "foo"; |
2555 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2594 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
2556 var obj = new api.ChromeOsDevice.fromJson(json); | 2595 var obj = new api.ChromeOsDevice.fromJson(json); |
2557 checkChromeOsDevice(obj); | 2596 checkChromeOsDevice(obj); |
2558 | 2597 |
2559 var path = (req.url).path; | 2598 var path = (req.url).path; |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2593 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 2632 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
2594 } | 2633 } |
2595 } | 2634 } |
2596 unittest.expect(queryMap["projection"].first, unittest.equals(arg_projec
tion)); | 2635 unittest.expect(queryMap["projection"].first, unittest.equals(arg_projec
tion)); |
2597 | 2636 |
2598 | 2637 |
2599 var h = { | 2638 var h = { |
2600 "content-type" : "application/json; charset=utf-8", | 2639 "content-type" : "application/json; charset=utf-8", |
2601 }; | 2640 }; |
2602 var resp = convert.JSON.encode(buildChromeOsDevice()); | 2641 var resp = convert.JSON.encode(buildChromeOsDevice()); |
2603 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 2642 return new async.Future.value(stringResponse(200, h, resp)); |
2604 }), true); | 2643 }), true); |
2605 res.update(arg_request, arg_customerId, arg_deviceId, projection: arg_proj
ection).then(unittest.expectAsync(((api.ChromeOsDevice response) { | 2644 res.update(arg_request, arg_customerId, arg_deviceId, projection: arg_proj
ection).then(unittest.expectAsync(((api.ChromeOsDevice response) { |
2606 checkChromeOsDevice(response); | 2645 checkChromeOsDevice(response); |
2607 }))); | 2646 }))); |
2608 }); | 2647 }); |
2609 | 2648 |
2610 }); | 2649 }); |
2611 | 2650 |
2612 | 2651 |
2613 unittest.group("resource-GroupsResourceApi", () { | 2652 unittest.group("resource-GroupsResourceApi", () { |
2614 unittest.test("method--delete", () { | 2653 unittest.test("method--delete", () { |
2615 | 2654 |
2616 var mock = new common_test.HttpServerMock(); | 2655 var mock = new HttpServerMock(); |
2617 api.GroupsResourceApi res = new api.AdminApi(mock).groups; | 2656 api.GroupsResourceApi res = new api.AdminApi(mock).groups; |
2618 var arg_groupKey = "foo"; | 2657 var arg_groupKey = "foo"; |
2619 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2658 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
2620 var path = (req.url).path; | 2659 var path = (req.url).path; |
2621 var pathOffset = 0; | 2660 var pathOffset = 0; |
2622 var index; | 2661 var index; |
2623 var subPart; | 2662 var subPart; |
2624 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2663 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
2625 pathOffset += 1; | 2664 pathOffset += 1; |
2626 unittest.expect(path.substring(pathOffset, pathOffset + 19), unittest.eq
uals("admin/directory/v1/")); | 2665 unittest.expect(path.substring(pathOffset, pathOffset + 19), unittest.eq
uals("admin/directory/v1/")); |
(...skipping 19 matching lines...) Expand all Loading... |
2646 var keyvalue = part.split("="); | 2685 var keyvalue = part.split("="); |
2647 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 2686 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
2648 } | 2687 } |
2649 } | 2688 } |
2650 | 2689 |
2651 | 2690 |
2652 var h = { | 2691 var h = { |
2653 "content-type" : "application/json; charset=utf-8", | 2692 "content-type" : "application/json; charset=utf-8", |
2654 }; | 2693 }; |
2655 var resp = ""; | 2694 var resp = ""; |
2656 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 2695 return new async.Future.value(stringResponse(200, h, resp)); |
2657 }), true); | 2696 }), true); |
2658 res.delete(arg_groupKey).then(unittest.expectAsync((_) {})); | 2697 res.delete(arg_groupKey).then(unittest.expectAsync((_) {})); |
2659 }); | 2698 }); |
2660 | 2699 |
2661 unittest.test("method--get", () { | 2700 unittest.test("method--get", () { |
2662 | 2701 |
2663 var mock = new common_test.HttpServerMock(); | 2702 var mock = new HttpServerMock(); |
2664 api.GroupsResourceApi res = new api.AdminApi(mock).groups; | 2703 api.GroupsResourceApi res = new api.AdminApi(mock).groups; |
2665 var arg_groupKey = "foo"; | 2704 var arg_groupKey = "foo"; |
2666 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2705 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
2667 var path = (req.url).path; | 2706 var path = (req.url).path; |
2668 var pathOffset = 0; | 2707 var pathOffset = 0; |
2669 var index; | 2708 var index; |
2670 var subPart; | 2709 var subPart; |
2671 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2710 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
2672 pathOffset += 1; | 2711 pathOffset += 1; |
2673 unittest.expect(path.substring(pathOffset, pathOffset + 19), unittest.eq
uals("admin/directory/v1/")); | 2712 unittest.expect(path.substring(pathOffset, pathOffset + 19), unittest.eq
uals("admin/directory/v1/")); |
(...skipping 19 matching lines...) Expand all Loading... |
2693 var keyvalue = part.split("="); | 2732 var keyvalue = part.split("="); |
2694 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 2733 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
2695 } | 2734 } |
2696 } | 2735 } |
2697 | 2736 |
2698 | 2737 |
2699 var h = { | 2738 var h = { |
2700 "content-type" : "application/json; charset=utf-8", | 2739 "content-type" : "application/json; charset=utf-8", |
2701 }; | 2740 }; |
2702 var resp = convert.JSON.encode(buildGroup()); | 2741 var resp = convert.JSON.encode(buildGroup()); |
2703 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 2742 return new async.Future.value(stringResponse(200, h, resp)); |
2704 }), true); | 2743 }), true); |
2705 res.get(arg_groupKey).then(unittest.expectAsync(((api.Group response) { | 2744 res.get(arg_groupKey).then(unittest.expectAsync(((api.Group response) { |
2706 checkGroup(response); | 2745 checkGroup(response); |
2707 }))); | 2746 }))); |
2708 }); | 2747 }); |
2709 | 2748 |
2710 unittest.test("method--insert", () { | 2749 unittest.test("method--insert", () { |
2711 | 2750 |
2712 var mock = new common_test.HttpServerMock(); | 2751 var mock = new HttpServerMock(); |
2713 api.GroupsResourceApi res = new api.AdminApi(mock).groups; | 2752 api.GroupsResourceApi res = new api.AdminApi(mock).groups; |
2714 var arg_request = buildGroup(); | 2753 var arg_request = buildGroup(); |
2715 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2754 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
2716 var obj = new api.Group.fromJson(json); | 2755 var obj = new api.Group.fromJson(json); |
2717 checkGroup(obj); | 2756 checkGroup(obj); |
2718 | 2757 |
2719 var path = (req.url).path; | 2758 var path = (req.url).path; |
2720 var pathOffset = 0; | 2759 var pathOffset = 0; |
2721 var index; | 2760 var index; |
2722 var subPart; | 2761 var subPart; |
(...skipping 19 matching lines...) Expand all Loading... |
2742 var keyvalue = part.split("="); | 2781 var keyvalue = part.split("="); |
2743 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 2782 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
2744 } | 2783 } |
2745 } | 2784 } |
2746 | 2785 |
2747 | 2786 |
2748 var h = { | 2787 var h = { |
2749 "content-type" : "application/json; charset=utf-8", | 2788 "content-type" : "application/json; charset=utf-8", |
2750 }; | 2789 }; |
2751 var resp = convert.JSON.encode(buildGroup()); | 2790 var resp = convert.JSON.encode(buildGroup()); |
2752 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 2791 return new async.Future.value(stringResponse(200, h, resp)); |
2753 }), true); | 2792 }), true); |
2754 res.insert(arg_request).then(unittest.expectAsync(((api.Group response) { | 2793 res.insert(arg_request).then(unittest.expectAsync(((api.Group response) { |
2755 checkGroup(response); | 2794 checkGroup(response); |
2756 }))); | 2795 }))); |
2757 }); | 2796 }); |
2758 | 2797 |
2759 unittest.test("method--list", () { | 2798 unittest.test("method--list", () { |
2760 | 2799 |
2761 var mock = new common_test.HttpServerMock(); | 2800 var mock = new HttpServerMock(); |
2762 api.GroupsResourceApi res = new api.AdminApi(mock).groups; | 2801 api.GroupsResourceApi res = new api.AdminApi(mock).groups; |
2763 var arg_customer = "foo"; | 2802 var arg_customer = "foo"; |
2764 var arg_domain = "foo"; | 2803 var arg_domain = "foo"; |
2765 var arg_maxResults = 42; | 2804 var arg_maxResults = 42; |
2766 var arg_pageToken = "foo"; | 2805 var arg_pageToken = "foo"; |
2767 var arg_userKey = "foo"; | 2806 var arg_userKey = "foo"; |
2768 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2807 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
2769 var path = (req.url).path; | 2808 var path = (req.url).path; |
2770 var pathOffset = 0; | 2809 var pathOffset = 0; |
2771 var index; | 2810 var index; |
(...skipping 25 matching lines...) Expand all Loading... |
2797 unittest.expect(queryMap["domain"].first, unittest.equals(arg_domain)); | 2836 unittest.expect(queryMap["domain"].first, unittest.equals(arg_domain)); |
2798 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | 2837 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); |
2799 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | 2838 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); |
2800 unittest.expect(queryMap["userKey"].first, unittest.equals(arg_userKey))
; | 2839 unittest.expect(queryMap["userKey"].first, unittest.equals(arg_userKey))
; |
2801 | 2840 |
2802 | 2841 |
2803 var h = { | 2842 var h = { |
2804 "content-type" : "application/json; charset=utf-8", | 2843 "content-type" : "application/json; charset=utf-8", |
2805 }; | 2844 }; |
2806 var resp = convert.JSON.encode(buildGroups()); | 2845 var resp = convert.JSON.encode(buildGroups()); |
2807 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 2846 return new async.Future.value(stringResponse(200, h, resp)); |
2808 }), true); | 2847 }), true); |
2809 res.list(customer: arg_customer, domain: arg_domain, maxResults: arg_maxRe
sults, pageToken: arg_pageToken, userKey: arg_userKey).then(unittest.expectAsync
(((api.Groups response) { | 2848 res.list(customer: arg_customer, domain: arg_domain, maxResults: arg_maxRe
sults, pageToken: arg_pageToken, userKey: arg_userKey).then(unittest.expectAsync
(((api.Groups response) { |
2810 checkGroups(response); | 2849 checkGroups(response); |
2811 }))); | 2850 }))); |
2812 }); | 2851 }); |
2813 | 2852 |
2814 unittest.test("method--patch", () { | 2853 unittest.test("method--patch", () { |
2815 | 2854 |
2816 var mock = new common_test.HttpServerMock(); | 2855 var mock = new HttpServerMock(); |
2817 api.GroupsResourceApi res = new api.AdminApi(mock).groups; | 2856 api.GroupsResourceApi res = new api.AdminApi(mock).groups; |
2818 var arg_request = buildGroup(); | 2857 var arg_request = buildGroup(); |
2819 var arg_groupKey = "foo"; | 2858 var arg_groupKey = "foo"; |
2820 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2859 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
2821 var obj = new api.Group.fromJson(json); | 2860 var obj = new api.Group.fromJson(json); |
2822 checkGroup(obj); | 2861 checkGroup(obj); |
2823 | 2862 |
2824 var path = (req.url).path; | 2863 var path = (req.url).path; |
2825 var pathOffset = 0; | 2864 var pathOffset = 0; |
2826 var index; | 2865 var index; |
(...skipping 23 matching lines...) Expand all Loading... |
2850 var keyvalue = part.split("="); | 2889 var keyvalue = part.split("="); |
2851 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 2890 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
2852 } | 2891 } |
2853 } | 2892 } |
2854 | 2893 |
2855 | 2894 |
2856 var h = { | 2895 var h = { |
2857 "content-type" : "application/json; charset=utf-8", | 2896 "content-type" : "application/json; charset=utf-8", |
2858 }; | 2897 }; |
2859 var resp = convert.JSON.encode(buildGroup()); | 2898 var resp = convert.JSON.encode(buildGroup()); |
2860 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 2899 return new async.Future.value(stringResponse(200, h, resp)); |
2861 }), true); | 2900 }), true); |
2862 res.patch(arg_request, arg_groupKey).then(unittest.expectAsync(((api.Group
response) { | 2901 res.patch(arg_request, arg_groupKey).then(unittest.expectAsync(((api.Group
response) { |
2863 checkGroup(response); | 2902 checkGroup(response); |
2864 }))); | 2903 }))); |
2865 }); | 2904 }); |
2866 | 2905 |
2867 unittest.test("method--update", () { | 2906 unittest.test("method--update", () { |
2868 | 2907 |
2869 var mock = new common_test.HttpServerMock(); | 2908 var mock = new HttpServerMock(); |
2870 api.GroupsResourceApi res = new api.AdminApi(mock).groups; | 2909 api.GroupsResourceApi res = new api.AdminApi(mock).groups; |
2871 var arg_request = buildGroup(); | 2910 var arg_request = buildGroup(); |
2872 var arg_groupKey = "foo"; | 2911 var arg_groupKey = "foo"; |
2873 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2912 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
2874 var obj = new api.Group.fromJson(json); | 2913 var obj = new api.Group.fromJson(json); |
2875 checkGroup(obj); | 2914 checkGroup(obj); |
2876 | 2915 |
2877 var path = (req.url).path; | 2916 var path = (req.url).path; |
2878 var pathOffset = 0; | 2917 var pathOffset = 0; |
2879 var index; | 2918 var index; |
(...skipping 23 matching lines...) Expand all Loading... |
2903 var keyvalue = part.split("="); | 2942 var keyvalue = part.split("="); |
2904 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 2943 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
2905 } | 2944 } |
2906 } | 2945 } |
2907 | 2946 |
2908 | 2947 |
2909 var h = { | 2948 var h = { |
2910 "content-type" : "application/json; charset=utf-8", | 2949 "content-type" : "application/json; charset=utf-8", |
2911 }; | 2950 }; |
2912 var resp = convert.JSON.encode(buildGroup()); | 2951 var resp = convert.JSON.encode(buildGroup()); |
2913 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 2952 return new async.Future.value(stringResponse(200, h, resp)); |
2914 }), true); | 2953 }), true); |
2915 res.update(arg_request, arg_groupKey).then(unittest.expectAsync(((api.Grou
p response) { | 2954 res.update(arg_request, arg_groupKey).then(unittest.expectAsync(((api.Grou
p response) { |
2916 checkGroup(response); | 2955 checkGroup(response); |
2917 }))); | 2956 }))); |
2918 }); | 2957 }); |
2919 | 2958 |
2920 }); | 2959 }); |
2921 | 2960 |
2922 | 2961 |
2923 unittest.group("resource-GroupsAliasesResourceApi", () { | 2962 unittest.group("resource-GroupsAliasesResourceApi", () { |
2924 unittest.test("method--delete", () { | 2963 unittest.test("method--delete", () { |
2925 | 2964 |
2926 var mock = new common_test.HttpServerMock(); | 2965 var mock = new HttpServerMock(); |
2927 api.GroupsAliasesResourceApi res = new api.AdminApi(mock).groups.aliases; | 2966 api.GroupsAliasesResourceApi res = new api.AdminApi(mock).groups.aliases; |
2928 var arg_groupKey = "foo"; | 2967 var arg_groupKey = "foo"; |
2929 var arg_alias = "foo"; | 2968 var arg_alias = "foo"; |
2930 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2969 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
2931 var path = (req.url).path; | 2970 var path = (req.url).path; |
2932 var pathOffset = 0; | 2971 var pathOffset = 0; |
2933 var index; | 2972 var index; |
2934 var subPart; | 2973 var subPart; |
2935 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2974 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
2936 pathOffset += 1; | 2975 pathOffset += 1; |
(...skipping 27 matching lines...) Expand all Loading... |
2964 var keyvalue = part.split("="); | 3003 var keyvalue = part.split("="); |
2965 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 3004 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
2966 } | 3005 } |
2967 } | 3006 } |
2968 | 3007 |
2969 | 3008 |
2970 var h = { | 3009 var h = { |
2971 "content-type" : "application/json; charset=utf-8", | 3010 "content-type" : "application/json; charset=utf-8", |
2972 }; | 3011 }; |
2973 var resp = ""; | 3012 var resp = ""; |
2974 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 3013 return new async.Future.value(stringResponse(200, h, resp)); |
2975 }), true); | 3014 }), true); |
2976 res.delete(arg_groupKey, arg_alias).then(unittest.expectAsync((_) {})); | 3015 res.delete(arg_groupKey, arg_alias).then(unittest.expectAsync((_) {})); |
2977 }); | 3016 }); |
2978 | 3017 |
2979 unittest.test("method--insert", () { | 3018 unittest.test("method--insert", () { |
2980 | 3019 |
2981 var mock = new common_test.HttpServerMock(); | 3020 var mock = new HttpServerMock(); |
2982 api.GroupsAliasesResourceApi res = new api.AdminApi(mock).groups.aliases; | 3021 api.GroupsAliasesResourceApi res = new api.AdminApi(mock).groups.aliases; |
2983 var arg_request = buildAlias(); | 3022 var arg_request = buildAlias(); |
2984 var arg_groupKey = "foo"; | 3023 var arg_groupKey = "foo"; |
2985 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 3024 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
2986 var obj = new api.Alias.fromJson(json); | 3025 var obj = new api.Alias.fromJson(json); |
2987 checkAlias(obj); | 3026 checkAlias(obj); |
2988 | 3027 |
2989 var path = (req.url).path; | 3028 var path = (req.url).path; |
2990 var pathOffset = 0; | 3029 var pathOffset = 0; |
2991 var index; | 3030 var index; |
(...skipping 27 matching lines...) Expand all Loading... |
3019 var keyvalue = part.split("="); | 3058 var keyvalue = part.split("="); |
3020 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 3059 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
3021 } | 3060 } |
3022 } | 3061 } |
3023 | 3062 |
3024 | 3063 |
3025 var h = { | 3064 var h = { |
3026 "content-type" : "application/json; charset=utf-8", | 3065 "content-type" : "application/json; charset=utf-8", |
3027 }; | 3066 }; |
3028 var resp = convert.JSON.encode(buildAlias()); | 3067 var resp = convert.JSON.encode(buildAlias()); |
3029 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 3068 return new async.Future.value(stringResponse(200, h, resp)); |
3030 }), true); | 3069 }), true); |
3031 res.insert(arg_request, arg_groupKey).then(unittest.expectAsync(((api.Alia
s response) { | 3070 res.insert(arg_request, arg_groupKey).then(unittest.expectAsync(((api.Alia
s response) { |
3032 checkAlias(response); | 3071 checkAlias(response); |
3033 }))); | 3072 }))); |
3034 }); | 3073 }); |
3035 | 3074 |
3036 unittest.test("method--list", () { | 3075 unittest.test("method--list", () { |
3037 | 3076 |
3038 var mock = new common_test.HttpServerMock(); | 3077 var mock = new HttpServerMock(); |
3039 api.GroupsAliasesResourceApi res = new api.AdminApi(mock).groups.aliases; | 3078 api.GroupsAliasesResourceApi res = new api.AdminApi(mock).groups.aliases; |
3040 var arg_groupKey = "foo"; | 3079 var arg_groupKey = "foo"; |
3041 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 3080 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
3042 var path = (req.url).path; | 3081 var path = (req.url).path; |
3043 var pathOffset = 0; | 3082 var pathOffset = 0; |
3044 var index; | 3083 var index; |
3045 var subPart; | 3084 var subPart; |
3046 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 3085 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
3047 pathOffset += 1; | 3086 pathOffset += 1; |
3048 unittest.expect(path.substring(pathOffset, pathOffset + 19), unittest.eq
uals("admin/directory/v1/")); | 3087 unittest.expect(path.substring(pathOffset, pathOffset + 19), unittest.eq
uals("admin/directory/v1/")); |
(...skipping 23 matching lines...) Expand all Loading... |
3072 var keyvalue = part.split("="); | 3111 var keyvalue = part.split("="); |
3073 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 3112 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
3074 } | 3113 } |
3075 } | 3114 } |
3076 | 3115 |
3077 | 3116 |
3078 var h = { | 3117 var h = { |
3079 "content-type" : "application/json; charset=utf-8", | 3118 "content-type" : "application/json; charset=utf-8", |
3080 }; | 3119 }; |
3081 var resp = convert.JSON.encode(buildAliases()); | 3120 var resp = convert.JSON.encode(buildAliases()); |
3082 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 3121 return new async.Future.value(stringResponse(200, h, resp)); |
3083 }), true); | 3122 }), true); |
3084 res.list(arg_groupKey).then(unittest.expectAsync(((api.Aliases response) { | 3123 res.list(arg_groupKey).then(unittest.expectAsync(((api.Aliases response) { |
3085 checkAliases(response); | 3124 checkAliases(response); |
3086 }))); | 3125 }))); |
3087 }); | 3126 }); |
3088 | 3127 |
3089 }); | 3128 }); |
3090 | 3129 |
3091 | 3130 |
3092 unittest.group("resource-MembersResourceApi", () { | 3131 unittest.group("resource-MembersResourceApi", () { |
3093 unittest.test("method--delete", () { | 3132 unittest.test("method--delete", () { |
3094 | 3133 |
3095 var mock = new common_test.HttpServerMock(); | 3134 var mock = new HttpServerMock(); |
3096 api.MembersResourceApi res = new api.AdminApi(mock).members; | 3135 api.MembersResourceApi res = new api.AdminApi(mock).members; |
3097 var arg_groupKey = "foo"; | 3136 var arg_groupKey = "foo"; |
3098 var arg_memberKey = "foo"; | 3137 var arg_memberKey = "foo"; |
3099 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 3138 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
3100 var path = (req.url).path; | 3139 var path = (req.url).path; |
3101 var pathOffset = 0; | 3140 var pathOffset = 0; |
3102 var index; | 3141 var index; |
3103 var subPart; | 3142 var subPart; |
3104 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 3143 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
3105 pathOffset += 1; | 3144 pathOffset += 1; |
(...skipping 27 matching lines...) Expand all Loading... |
3133 var keyvalue = part.split("="); | 3172 var keyvalue = part.split("="); |
3134 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 3173 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
3135 } | 3174 } |
3136 } | 3175 } |
3137 | 3176 |
3138 | 3177 |
3139 var h = { | 3178 var h = { |
3140 "content-type" : "application/json; charset=utf-8", | 3179 "content-type" : "application/json; charset=utf-8", |
3141 }; | 3180 }; |
3142 var resp = ""; | 3181 var resp = ""; |
3143 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 3182 return new async.Future.value(stringResponse(200, h, resp)); |
3144 }), true); | 3183 }), true); |
3145 res.delete(arg_groupKey, arg_memberKey).then(unittest.expectAsync((_) {}))
; | 3184 res.delete(arg_groupKey, arg_memberKey).then(unittest.expectAsync((_) {}))
; |
3146 }); | 3185 }); |
3147 | 3186 |
3148 unittest.test("method--get", () { | 3187 unittest.test("method--get", () { |
3149 | 3188 |
3150 var mock = new common_test.HttpServerMock(); | 3189 var mock = new HttpServerMock(); |
3151 api.MembersResourceApi res = new api.AdminApi(mock).members; | 3190 api.MembersResourceApi res = new api.AdminApi(mock).members; |
3152 var arg_groupKey = "foo"; | 3191 var arg_groupKey = "foo"; |
3153 var arg_memberKey = "foo"; | 3192 var arg_memberKey = "foo"; |
3154 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 3193 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
3155 var path = (req.url).path; | 3194 var path = (req.url).path; |
3156 var pathOffset = 0; | 3195 var pathOffset = 0; |
3157 var index; | 3196 var index; |
3158 var subPart; | 3197 var subPart; |
3159 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 3198 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
3160 pathOffset += 1; | 3199 pathOffset += 1; |
(...skipping 27 matching lines...) Expand all Loading... |
3188 var keyvalue = part.split("="); | 3227 var keyvalue = part.split("="); |
3189 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 3228 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
3190 } | 3229 } |
3191 } | 3230 } |
3192 | 3231 |
3193 | 3232 |
3194 var h = { | 3233 var h = { |
3195 "content-type" : "application/json; charset=utf-8", | 3234 "content-type" : "application/json; charset=utf-8", |
3196 }; | 3235 }; |
3197 var resp = convert.JSON.encode(buildMember()); | 3236 var resp = convert.JSON.encode(buildMember()); |
3198 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 3237 return new async.Future.value(stringResponse(200, h, resp)); |
3199 }), true); | 3238 }), true); |
3200 res.get(arg_groupKey, arg_memberKey).then(unittest.expectAsync(((api.Membe
r response) { | 3239 res.get(arg_groupKey, arg_memberKey).then(unittest.expectAsync(((api.Membe
r response) { |
3201 checkMember(response); | 3240 checkMember(response); |
3202 }))); | 3241 }))); |
3203 }); | 3242 }); |
3204 | 3243 |
3205 unittest.test("method--insert", () { | 3244 unittest.test("method--insert", () { |
3206 | 3245 |
3207 var mock = new common_test.HttpServerMock(); | 3246 var mock = new HttpServerMock(); |
3208 api.MembersResourceApi res = new api.AdminApi(mock).members; | 3247 api.MembersResourceApi res = new api.AdminApi(mock).members; |
3209 var arg_request = buildMember(); | 3248 var arg_request = buildMember(); |
3210 var arg_groupKey = "foo"; | 3249 var arg_groupKey = "foo"; |
3211 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 3250 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
3212 var obj = new api.Member.fromJson(json); | 3251 var obj = new api.Member.fromJson(json); |
3213 checkMember(obj); | 3252 checkMember(obj); |
3214 | 3253 |
3215 var path = (req.url).path; | 3254 var path = (req.url).path; |
3216 var pathOffset = 0; | 3255 var pathOffset = 0; |
3217 var index; | 3256 var index; |
(...skipping 27 matching lines...) Expand all Loading... |
3245 var keyvalue = part.split("="); | 3284 var keyvalue = part.split("="); |
3246 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 3285 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
3247 } | 3286 } |
3248 } | 3287 } |
3249 | 3288 |
3250 | 3289 |
3251 var h = { | 3290 var h = { |
3252 "content-type" : "application/json; charset=utf-8", | 3291 "content-type" : "application/json; charset=utf-8", |
3253 }; | 3292 }; |
3254 var resp = convert.JSON.encode(buildMember()); | 3293 var resp = convert.JSON.encode(buildMember()); |
3255 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 3294 return new async.Future.value(stringResponse(200, h, resp)); |
3256 }), true); | 3295 }), true); |
3257 res.insert(arg_request, arg_groupKey).then(unittest.expectAsync(((api.Memb
er response) { | 3296 res.insert(arg_request, arg_groupKey).then(unittest.expectAsync(((api.Memb
er response) { |
3258 checkMember(response); | 3297 checkMember(response); |
3259 }))); | 3298 }))); |
3260 }); | 3299 }); |
3261 | 3300 |
3262 unittest.test("method--list", () { | 3301 unittest.test("method--list", () { |
3263 | 3302 |
3264 var mock = new common_test.HttpServerMock(); | 3303 var mock = new HttpServerMock(); |
3265 api.MembersResourceApi res = new api.AdminApi(mock).members; | 3304 api.MembersResourceApi res = new api.AdminApi(mock).members; |
3266 var arg_groupKey = "foo"; | 3305 var arg_groupKey = "foo"; |
3267 var arg_maxResults = 42; | 3306 var arg_maxResults = 42; |
3268 var arg_pageToken = "foo"; | 3307 var arg_pageToken = "foo"; |
3269 var arg_roles = "foo"; | 3308 var arg_roles = "foo"; |
3270 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 3309 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
3271 var path = (req.url).path; | 3310 var path = (req.url).path; |
3272 var pathOffset = 0; | 3311 var pathOffset = 0; |
3273 var index; | 3312 var index; |
3274 var subPart; | 3313 var subPart; |
(...skipping 29 matching lines...) Expand all Loading... |
3304 } | 3343 } |
3305 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | 3344 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); |
3306 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | 3345 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); |
3307 unittest.expect(queryMap["roles"].first, unittest.equals(arg_roles)); | 3346 unittest.expect(queryMap["roles"].first, unittest.equals(arg_roles)); |
3308 | 3347 |
3309 | 3348 |
3310 var h = { | 3349 var h = { |
3311 "content-type" : "application/json; charset=utf-8", | 3350 "content-type" : "application/json; charset=utf-8", |
3312 }; | 3351 }; |
3313 var resp = convert.JSON.encode(buildMembers()); | 3352 var resp = convert.JSON.encode(buildMembers()); |
3314 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 3353 return new async.Future.value(stringResponse(200, h, resp)); |
3315 }), true); | 3354 }), true); |
3316 res.list(arg_groupKey, maxResults: arg_maxResults, pageToken: arg_pageToke
n, roles: arg_roles).then(unittest.expectAsync(((api.Members response) { | 3355 res.list(arg_groupKey, maxResults: arg_maxResults, pageToken: arg_pageToke
n, roles: arg_roles).then(unittest.expectAsync(((api.Members response) { |
3317 checkMembers(response); | 3356 checkMembers(response); |
3318 }))); | 3357 }))); |
3319 }); | 3358 }); |
3320 | 3359 |
3321 unittest.test("method--patch", () { | 3360 unittest.test("method--patch", () { |
3322 | 3361 |
3323 var mock = new common_test.HttpServerMock(); | 3362 var mock = new HttpServerMock(); |
3324 api.MembersResourceApi res = new api.AdminApi(mock).members; | 3363 api.MembersResourceApi res = new api.AdminApi(mock).members; |
3325 var arg_request = buildMember(); | 3364 var arg_request = buildMember(); |
3326 var arg_groupKey = "foo"; | 3365 var arg_groupKey = "foo"; |
3327 var arg_memberKey = "foo"; | 3366 var arg_memberKey = "foo"; |
3328 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 3367 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
3329 var obj = new api.Member.fromJson(json); | 3368 var obj = new api.Member.fromJson(json); |
3330 checkMember(obj); | 3369 checkMember(obj); |
3331 | 3370 |
3332 var path = (req.url).path; | 3371 var path = (req.url).path; |
3333 var pathOffset = 0; | 3372 var pathOffset = 0; |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3365 var keyvalue = part.split("="); | 3404 var keyvalue = part.split("="); |
3366 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 3405 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
3367 } | 3406 } |
3368 } | 3407 } |
3369 | 3408 |
3370 | 3409 |
3371 var h = { | 3410 var h = { |
3372 "content-type" : "application/json; charset=utf-8", | 3411 "content-type" : "application/json; charset=utf-8", |
3373 }; | 3412 }; |
3374 var resp = convert.JSON.encode(buildMember()); | 3413 var resp = convert.JSON.encode(buildMember()); |
3375 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 3414 return new async.Future.value(stringResponse(200, h, resp)); |
3376 }), true); | 3415 }), true); |
3377 res.patch(arg_request, arg_groupKey, arg_memberKey).then(unittest.expectAs
ync(((api.Member response) { | 3416 res.patch(arg_request, arg_groupKey, arg_memberKey).then(unittest.expectAs
ync(((api.Member response) { |
3378 checkMember(response); | 3417 checkMember(response); |
3379 }))); | 3418 }))); |
3380 }); | 3419 }); |
3381 | 3420 |
3382 unittest.test("method--update", () { | 3421 unittest.test("method--update", () { |
3383 | 3422 |
3384 var mock = new common_test.HttpServerMock(); | 3423 var mock = new HttpServerMock(); |
3385 api.MembersResourceApi res = new api.AdminApi(mock).members; | 3424 api.MembersResourceApi res = new api.AdminApi(mock).members; |
3386 var arg_request = buildMember(); | 3425 var arg_request = buildMember(); |
3387 var arg_groupKey = "foo"; | 3426 var arg_groupKey = "foo"; |
3388 var arg_memberKey = "foo"; | 3427 var arg_memberKey = "foo"; |
3389 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 3428 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
3390 var obj = new api.Member.fromJson(json); | 3429 var obj = new api.Member.fromJson(json); |
3391 checkMember(obj); | 3430 checkMember(obj); |
3392 | 3431 |
3393 var path = (req.url).path; | 3432 var path = (req.url).path; |
3394 var pathOffset = 0; | 3433 var pathOffset = 0; |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3426 var keyvalue = part.split("="); | 3465 var keyvalue = part.split("="); |
3427 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 3466 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
3428 } | 3467 } |
3429 } | 3468 } |
3430 | 3469 |
3431 | 3470 |
3432 var h = { | 3471 var h = { |
3433 "content-type" : "application/json; charset=utf-8", | 3472 "content-type" : "application/json; charset=utf-8", |
3434 }; | 3473 }; |
3435 var resp = convert.JSON.encode(buildMember()); | 3474 var resp = convert.JSON.encode(buildMember()); |
3436 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 3475 return new async.Future.value(stringResponse(200, h, resp)); |
3437 }), true); | 3476 }), true); |
3438 res.update(arg_request, arg_groupKey, arg_memberKey).then(unittest.expectA
sync(((api.Member response) { | 3477 res.update(arg_request, arg_groupKey, arg_memberKey).then(unittest.expectA
sync(((api.Member response) { |
3439 checkMember(response); | 3478 checkMember(response); |
3440 }))); | 3479 }))); |
3441 }); | 3480 }); |
3442 | 3481 |
3443 }); | 3482 }); |
3444 | 3483 |
3445 | 3484 |
3446 unittest.group("resource-MobiledevicesResourceApi", () { | 3485 unittest.group("resource-MobiledevicesResourceApi", () { |
3447 unittest.test("method--action", () { | 3486 unittest.test("method--action", () { |
3448 | 3487 |
3449 var mock = new common_test.HttpServerMock(); | 3488 var mock = new HttpServerMock(); |
3450 api.MobiledevicesResourceApi res = new api.AdminApi(mock).mobiledevices; | 3489 api.MobiledevicesResourceApi res = new api.AdminApi(mock).mobiledevices; |
3451 var arg_request = buildMobileDeviceAction(); | 3490 var arg_request = buildMobileDeviceAction(); |
3452 var arg_customerId = "foo"; | 3491 var arg_customerId = "foo"; |
3453 var arg_resourceId = "foo"; | 3492 var arg_resourceId = "foo"; |
3454 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 3493 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
3455 var obj = new api.MobileDeviceAction.fromJson(json); | 3494 var obj = new api.MobileDeviceAction.fromJson(json); |
3456 checkMobileDeviceAction(obj); | 3495 checkMobileDeviceAction(obj); |
3457 | 3496 |
3458 var path = (req.url).path; | 3497 var path = (req.url).path; |
3459 var pathOffset = 0; | 3498 var pathOffset = 0; |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3495 var keyvalue = part.split("="); | 3534 var keyvalue = part.split("="); |
3496 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 3535 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
3497 } | 3536 } |
3498 } | 3537 } |
3499 | 3538 |
3500 | 3539 |
3501 var h = { | 3540 var h = { |
3502 "content-type" : "application/json; charset=utf-8", | 3541 "content-type" : "application/json; charset=utf-8", |
3503 }; | 3542 }; |
3504 var resp = ""; | 3543 var resp = ""; |
3505 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 3544 return new async.Future.value(stringResponse(200, h, resp)); |
3506 }), true); | 3545 }), true); |
3507 res.action(arg_request, arg_customerId, arg_resourceId).then(unittest.expe
ctAsync((_) {})); | 3546 res.action(arg_request, arg_customerId, arg_resourceId).then(unittest.expe
ctAsync((_) {})); |
3508 }); | 3547 }); |
3509 | 3548 |
3510 unittest.test("method--delete", () { | 3549 unittest.test("method--delete", () { |
3511 | 3550 |
3512 var mock = new common_test.HttpServerMock(); | 3551 var mock = new HttpServerMock(); |
3513 api.MobiledevicesResourceApi res = new api.AdminApi(mock).mobiledevices; | 3552 api.MobiledevicesResourceApi res = new api.AdminApi(mock).mobiledevices; |
3514 var arg_customerId = "foo"; | 3553 var arg_customerId = "foo"; |
3515 var arg_resourceId = "foo"; | 3554 var arg_resourceId = "foo"; |
3516 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 3555 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
3517 var path = (req.url).path; | 3556 var path = (req.url).path; |
3518 var pathOffset = 0; | 3557 var pathOffset = 0; |
3519 var index; | 3558 var index; |
3520 var subPart; | 3559 var subPart; |
3521 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 3560 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
3522 pathOffset += 1; | 3561 pathOffset += 1; |
(...skipping 27 matching lines...) Expand all Loading... |
3550 var keyvalue = part.split("="); | 3589 var keyvalue = part.split("="); |
3551 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 3590 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
3552 } | 3591 } |
3553 } | 3592 } |
3554 | 3593 |
3555 | 3594 |
3556 var h = { | 3595 var h = { |
3557 "content-type" : "application/json; charset=utf-8", | 3596 "content-type" : "application/json; charset=utf-8", |
3558 }; | 3597 }; |
3559 var resp = ""; | 3598 var resp = ""; |
3560 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 3599 return new async.Future.value(stringResponse(200, h, resp)); |
3561 }), true); | 3600 }), true); |
3562 res.delete(arg_customerId, arg_resourceId).then(unittest.expectAsync((_) {
})); | 3601 res.delete(arg_customerId, arg_resourceId).then(unittest.expectAsync((_) {
})); |
3563 }); | 3602 }); |
3564 | 3603 |
3565 unittest.test("method--get", () { | 3604 unittest.test("method--get", () { |
3566 | 3605 |
3567 var mock = new common_test.HttpServerMock(); | 3606 var mock = new HttpServerMock(); |
3568 api.MobiledevicesResourceApi res = new api.AdminApi(mock).mobiledevices; | 3607 api.MobiledevicesResourceApi res = new api.AdminApi(mock).mobiledevices; |
3569 var arg_customerId = "foo"; | 3608 var arg_customerId = "foo"; |
3570 var arg_resourceId = "foo"; | 3609 var arg_resourceId = "foo"; |
3571 var arg_projection = "foo"; | 3610 var arg_projection = "foo"; |
3572 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 3611 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
3573 var path = (req.url).path; | 3612 var path = (req.url).path; |
3574 var pathOffset = 0; | 3613 var pathOffset = 0; |
3575 var index; | 3614 var index; |
3576 var subPart; | 3615 var subPart; |
3577 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 3616 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
(...skipping 29 matching lines...) Expand all Loading... |
3607 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 3646 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
3608 } | 3647 } |
3609 } | 3648 } |
3610 unittest.expect(queryMap["projection"].first, unittest.equals(arg_projec
tion)); | 3649 unittest.expect(queryMap["projection"].first, unittest.equals(arg_projec
tion)); |
3611 | 3650 |
3612 | 3651 |
3613 var h = { | 3652 var h = { |
3614 "content-type" : "application/json; charset=utf-8", | 3653 "content-type" : "application/json; charset=utf-8", |
3615 }; | 3654 }; |
3616 var resp = convert.JSON.encode(buildMobileDevice()); | 3655 var resp = convert.JSON.encode(buildMobileDevice()); |
3617 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 3656 return new async.Future.value(stringResponse(200, h, resp)); |
3618 }), true); | 3657 }), true); |
3619 res.get(arg_customerId, arg_resourceId, projection: arg_projection).then(u
nittest.expectAsync(((api.MobileDevice response) { | 3658 res.get(arg_customerId, arg_resourceId, projection: arg_projection).then(u
nittest.expectAsync(((api.MobileDevice response) { |
3620 checkMobileDevice(response); | 3659 checkMobileDevice(response); |
3621 }))); | 3660 }))); |
3622 }); | 3661 }); |
3623 | 3662 |
3624 unittest.test("method--list", () { | 3663 unittest.test("method--list", () { |
3625 | 3664 |
3626 var mock = new common_test.HttpServerMock(); | 3665 var mock = new HttpServerMock(); |
3627 api.MobiledevicesResourceApi res = new api.AdminApi(mock).mobiledevices; | 3666 api.MobiledevicesResourceApi res = new api.AdminApi(mock).mobiledevices; |
3628 var arg_customerId = "foo"; | 3667 var arg_customerId = "foo"; |
3629 var arg_maxResults = 42; | 3668 var arg_maxResults = 42; |
3630 var arg_orderBy = "foo"; | 3669 var arg_orderBy = "foo"; |
3631 var arg_pageToken = "foo"; | 3670 var arg_pageToken = "foo"; |
3632 var arg_projection = "foo"; | 3671 var arg_projection = "foo"; |
3633 var arg_query = "foo"; | 3672 var arg_query = "foo"; |
3634 var arg_sortOrder = "foo"; | 3673 var arg_sortOrder = "foo"; |
3635 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 3674 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
3636 var path = (req.url).path; | 3675 var path = (req.url).path; |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3672 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | 3711 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); |
3673 unittest.expect(queryMap["projection"].first, unittest.equals(arg_projec
tion)); | 3712 unittest.expect(queryMap["projection"].first, unittest.equals(arg_projec
tion)); |
3674 unittest.expect(queryMap["query"].first, unittest.equals(arg_query)); | 3713 unittest.expect(queryMap["query"].first, unittest.equals(arg_query)); |
3675 unittest.expect(queryMap["sortOrder"].first, unittest.equals(arg_sortOrd
er)); | 3714 unittest.expect(queryMap["sortOrder"].first, unittest.equals(arg_sortOrd
er)); |
3676 | 3715 |
3677 | 3716 |
3678 var h = { | 3717 var h = { |
3679 "content-type" : "application/json; charset=utf-8", | 3718 "content-type" : "application/json; charset=utf-8", |
3680 }; | 3719 }; |
3681 var resp = convert.JSON.encode(buildMobileDevices()); | 3720 var resp = convert.JSON.encode(buildMobileDevices()); |
3682 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 3721 return new async.Future.value(stringResponse(200, h, resp)); |
3683 }), true); | 3722 }), true); |
3684 res.list(arg_customerId, maxResults: arg_maxResults, orderBy: arg_orderBy,
pageToken: arg_pageToken, projection: arg_projection, query: arg_query, sortOrd
er: arg_sortOrder).then(unittest.expectAsync(((api.MobileDevices response) { | 3723 res.list(arg_customerId, maxResults: arg_maxResults, orderBy: arg_orderBy,
pageToken: arg_pageToken, projection: arg_projection, query: arg_query, sortOrd
er: arg_sortOrder).then(unittest.expectAsync(((api.MobileDevices response) { |
3685 checkMobileDevices(response); | 3724 checkMobileDevices(response); |
3686 }))); | 3725 }))); |
3687 }); | 3726 }); |
3688 | 3727 |
3689 }); | 3728 }); |
3690 | 3729 |
3691 | 3730 |
3692 unittest.group("resource-NotificationsResourceApi", () { | 3731 unittest.group("resource-NotificationsResourceApi", () { |
3693 unittest.test("method--delete", () { | 3732 unittest.test("method--delete", () { |
3694 | 3733 |
3695 var mock = new common_test.HttpServerMock(); | 3734 var mock = new HttpServerMock(); |
3696 api.NotificationsResourceApi res = new api.AdminApi(mock).notifications; | 3735 api.NotificationsResourceApi res = new api.AdminApi(mock).notifications; |
3697 var arg_customer = "foo"; | 3736 var arg_customer = "foo"; |
3698 var arg_notificationId = "foo"; | 3737 var arg_notificationId = "foo"; |
3699 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 3738 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
3700 var path = (req.url).path; | 3739 var path = (req.url).path; |
3701 var pathOffset = 0; | 3740 var pathOffset = 0; |
3702 var index; | 3741 var index; |
3703 var subPart; | 3742 var subPart; |
3704 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 3743 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
3705 pathOffset += 1; | 3744 pathOffset += 1; |
(...skipping 27 matching lines...) Expand all Loading... |
3733 var keyvalue = part.split("="); | 3772 var keyvalue = part.split("="); |
3734 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 3773 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
3735 } | 3774 } |
3736 } | 3775 } |
3737 | 3776 |
3738 | 3777 |
3739 var h = { | 3778 var h = { |
3740 "content-type" : "application/json; charset=utf-8", | 3779 "content-type" : "application/json; charset=utf-8", |
3741 }; | 3780 }; |
3742 var resp = ""; | 3781 var resp = ""; |
3743 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 3782 return new async.Future.value(stringResponse(200, h, resp)); |
3744 }), true); | 3783 }), true); |
3745 res.delete(arg_customer, arg_notificationId).then(unittest.expectAsync((_)
{})); | 3784 res.delete(arg_customer, arg_notificationId).then(unittest.expectAsync((_)
{})); |
3746 }); | 3785 }); |
3747 | 3786 |
3748 unittest.test("method--get", () { | 3787 unittest.test("method--get", () { |
3749 | 3788 |
3750 var mock = new common_test.HttpServerMock(); | 3789 var mock = new HttpServerMock(); |
3751 api.NotificationsResourceApi res = new api.AdminApi(mock).notifications; | 3790 api.NotificationsResourceApi res = new api.AdminApi(mock).notifications; |
3752 var arg_customer = "foo"; | 3791 var arg_customer = "foo"; |
3753 var arg_notificationId = "foo"; | 3792 var arg_notificationId = "foo"; |
3754 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 3793 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
3755 var path = (req.url).path; | 3794 var path = (req.url).path; |
3756 var pathOffset = 0; | 3795 var pathOffset = 0; |
3757 var index; | 3796 var index; |
3758 var subPart; | 3797 var subPart; |
3759 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 3798 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
3760 pathOffset += 1; | 3799 pathOffset += 1; |
(...skipping 27 matching lines...) Expand all Loading... |
3788 var keyvalue = part.split("="); | 3827 var keyvalue = part.split("="); |
3789 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 3828 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
3790 } | 3829 } |
3791 } | 3830 } |
3792 | 3831 |
3793 | 3832 |
3794 var h = { | 3833 var h = { |
3795 "content-type" : "application/json; charset=utf-8", | 3834 "content-type" : "application/json; charset=utf-8", |
3796 }; | 3835 }; |
3797 var resp = convert.JSON.encode(buildNotification()); | 3836 var resp = convert.JSON.encode(buildNotification()); |
3798 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 3837 return new async.Future.value(stringResponse(200, h, resp)); |
3799 }), true); | 3838 }), true); |
3800 res.get(arg_customer, arg_notificationId).then(unittest.expectAsync(((api.
Notification response) { | 3839 res.get(arg_customer, arg_notificationId).then(unittest.expectAsync(((api.
Notification response) { |
3801 checkNotification(response); | 3840 checkNotification(response); |
3802 }))); | 3841 }))); |
3803 }); | 3842 }); |
3804 | 3843 |
3805 unittest.test("method--list", () { | 3844 unittest.test("method--list", () { |
3806 | 3845 |
3807 var mock = new common_test.HttpServerMock(); | 3846 var mock = new HttpServerMock(); |
3808 api.NotificationsResourceApi res = new api.AdminApi(mock).notifications; | 3847 api.NotificationsResourceApi res = new api.AdminApi(mock).notifications; |
3809 var arg_customer = "foo"; | 3848 var arg_customer = "foo"; |
3810 var arg_language = "foo"; | 3849 var arg_language = "foo"; |
3811 var arg_maxResults = 42; | 3850 var arg_maxResults = 42; |
3812 var arg_pageToken = "foo"; | 3851 var arg_pageToken = "foo"; |
3813 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 3852 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
3814 var path = (req.url).path; | 3853 var path = (req.url).path; |
3815 var pathOffset = 0; | 3854 var pathOffset = 0; |
3816 var index; | 3855 var index; |
3817 var subPart; | 3856 var subPart; |
(...skipping 29 matching lines...) Expand all Loading... |
3847 } | 3886 } |
3848 unittest.expect(queryMap["language"].first, unittest.equals(arg_language
)); | 3887 unittest.expect(queryMap["language"].first, unittest.equals(arg_language
)); |
3849 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | 3888 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); |
3850 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | 3889 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); |
3851 | 3890 |
3852 | 3891 |
3853 var h = { | 3892 var h = { |
3854 "content-type" : "application/json; charset=utf-8", | 3893 "content-type" : "application/json; charset=utf-8", |
3855 }; | 3894 }; |
3856 var resp = convert.JSON.encode(buildNotifications()); | 3895 var resp = convert.JSON.encode(buildNotifications()); |
3857 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 3896 return new async.Future.value(stringResponse(200, h, resp)); |
3858 }), true); | 3897 }), true); |
3859 res.list(arg_customer, language: arg_language, maxResults: arg_maxResults,
pageToken: arg_pageToken).then(unittest.expectAsync(((api.Notifications respons
e) { | 3898 res.list(arg_customer, language: arg_language, maxResults: arg_maxResults,
pageToken: arg_pageToken).then(unittest.expectAsync(((api.Notifications respons
e) { |
3860 checkNotifications(response); | 3899 checkNotifications(response); |
3861 }))); | 3900 }))); |
3862 }); | 3901 }); |
3863 | 3902 |
3864 unittest.test("method--patch", () { | 3903 unittest.test("method--patch", () { |
3865 | 3904 |
3866 var mock = new common_test.HttpServerMock(); | 3905 var mock = new HttpServerMock(); |
3867 api.NotificationsResourceApi res = new api.AdminApi(mock).notifications; | 3906 api.NotificationsResourceApi res = new api.AdminApi(mock).notifications; |
3868 var arg_request = buildNotification(); | 3907 var arg_request = buildNotification(); |
3869 var arg_customer = "foo"; | 3908 var arg_customer = "foo"; |
3870 var arg_notificationId = "foo"; | 3909 var arg_notificationId = "foo"; |
3871 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 3910 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
3872 var obj = new api.Notification.fromJson(json); | 3911 var obj = new api.Notification.fromJson(json); |
3873 checkNotification(obj); | 3912 checkNotification(obj); |
3874 | 3913 |
3875 var path = (req.url).path; | 3914 var path = (req.url).path; |
3876 var pathOffset = 0; | 3915 var pathOffset = 0; |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3908 var keyvalue = part.split("="); | 3947 var keyvalue = part.split("="); |
3909 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 3948 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
3910 } | 3949 } |
3911 } | 3950 } |
3912 | 3951 |
3913 | 3952 |
3914 var h = { | 3953 var h = { |
3915 "content-type" : "application/json; charset=utf-8", | 3954 "content-type" : "application/json; charset=utf-8", |
3916 }; | 3955 }; |
3917 var resp = convert.JSON.encode(buildNotification()); | 3956 var resp = convert.JSON.encode(buildNotification()); |
3918 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 3957 return new async.Future.value(stringResponse(200, h, resp)); |
3919 }), true); | 3958 }), true); |
3920 res.patch(arg_request, arg_customer, arg_notificationId).then(unittest.exp
ectAsync(((api.Notification response) { | 3959 res.patch(arg_request, arg_customer, arg_notificationId).then(unittest.exp
ectAsync(((api.Notification response) { |
3921 checkNotification(response); | 3960 checkNotification(response); |
3922 }))); | 3961 }))); |
3923 }); | 3962 }); |
3924 | 3963 |
3925 unittest.test("method--update", () { | 3964 unittest.test("method--update", () { |
3926 | 3965 |
3927 var mock = new common_test.HttpServerMock(); | 3966 var mock = new HttpServerMock(); |
3928 api.NotificationsResourceApi res = new api.AdminApi(mock).notifications; | 3967 api.NotificationsResourceApi res = new api.AdminApi(mock).notifications; |
3929 var arg_request = buildNotification(); | 3968 var arg_request = buildNotification(); |
3930 var arg_customer = "foo"; | 3969 var arg_customer = "foo"; |
3931 var arg_notificationId = "foo"; | 3970 var arg_notificationId = "foo"; |
3932 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 3971 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
3933 var obj = new api.Notification.fromJson(json); | 3972 var obj = new api.Notification.fromJson(json); |
3934 checkNotification(obj); | 3973 checkNotification(obj); |
3935 | 3974 |
3936 var path = (req.url).path; | 3975 var path = (req.url).path; |
3937 var pathOffset = 0; | 3976 var pathOffset = 0; |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3969 var keyvalue = part.split("="); | 4008 var keyvalue = part.split("="); |
3970 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 4009 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
3971 } | 4010 } |
3972 } | 4011 } |
3973 | 4012 |
3974 | 4013 |
3975 var h = { | 4014 var h = { |
3976 "content-type" : "application/json; charset=utf-8", | 4015 "content-type" : "application/json; charset=utf-8", |
3977 }; | 4016 }; |
3978 var resp = convert.JSON.encode(buildNotification()); | 4017 var resp = convert.JSON.encode(buildNotification()); |
3979 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 4018 return new async.Future.value(stringResponse(200, h, resp)); |
3980 }), true); | 4019 }), true); |
3981 res.update(arg_request, arg_customer, arg_notificationId).then(unittest.ex
pectAsync(((api.Notification response) { | 4020 res.update(arg_request, arg_customer, arg_notificationId).then(unittest.ex
pectAsync(((api.Notification response) { |
3982 checkNotification(response); | 4021 checkNotification(response); |
3983 }))); | 4022 }))); |
3984 }); | 4023 }); |
3985 | 4024 |
3986 }); | 4025 }); |
3987 | 4026 |
3988 | 4027 |
3989 unittest.group("resource-OrgunitsResourceApi", () { | 4028 unittest.group("resource-OrgunitsResourceApi", () { |
3990 unittest.test("method--delete", () { | 4029 unittest.test("method--delete", () { |
3991 | 4030 |
3992 var mock = new common_test.HttpServerMock(); | 4031 var mock = new HttpServerMock(); |
3993 api.OrgunitsResourceApi res = new api.AdminApi(mock).orgunits; | 4032 api.OrgunitsResourceApi res = new api.AdminApi(mock).orgunits; |
3994 var arg_customerId = "foo"; | 4033 var arg_customerId = "foo"; |
3995 var arg_orgUnitPath = buildUnnamed786(); | 4034 var arg_orgUnitPath = buildUnnamed116(); |
3996 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 4035 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
3997 var path = (req.url).path; | 4036 var path = (req.url).path; |
3998 var pathOffset = 0; | 4037 var pathOffset = 0; |
3999 var index; | 4038 var index; |
4000 var subPart; | 4039 var subPart; |
4001 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 4040 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
4002 pathOffset += 1; | 4041 pathOffset += 1; |
4003 unittest.expect(path.substring(pathOffset, pathOffset + 19), unittest.eq
uals("admin/directory/v1/")); | 4042 unittest.expect(path.substring(pathOffset, pathOffset + 19), unittest.eq
uals("admin/directory/v1/")); |
4004 pathOffset += 19; | 4043 pathOffset += 19; |
4005 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("customer/")); | 4044 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("customer/")); |
(...skipping 23 matching lines...) Expand all Loading... |
4029 var keyvalue = part.split("="); | 4068 var keyvalue = part.split("="); |
4030 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 4069 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
4031 } | 4070 } |
4032 } | 4071 } |
4033 | 4072 |
4034 | 4073 |
4035 var h = { | 4074 var h = { |
4036 "content-type" : "application/json; charset=utf-8", | 4075 "content-type" : "application/json; charset=utf-8", |
4037 }; | 4076 }; |
4038 var resp = ""; | 4077 var resp = ""; |
4039 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 4078 return new async.Future.value(stringResponse(200, h, resp)); |
4040 }), true); | 4079 }), true); |
4041 res.delete(arg_customerId, arg_orgUnitPath).then(unittest.expectAsync((_)
{})); | 4080 res.delete(arg_customerId, arg_orgUnitPath).then(unittest.expectAsync((_)
{})); |
4042 }); | 4081 }); |
4043 | 4082 |
4044 unittest.test("method--get", () { | 4083 unittest.test("method--get", () { |
4045 | 4084 |
4046 var mock = new common_test.HttpServerMock(); | 4085 var mock = new HttpServerMock(); |
4047 api.OrgunitsResourceApi res = new api.AdminApi(mock).orgunits; | 4086 api.OrgunitsResourceApi res = new api.AdminApi(mock).orgunits; |
4048 var arg_customerId = "foo"; | 4087 var arg_customerId = "foo"; |
4049 var arg_orgUnitPath = buildUnnamed787(); | 4088 var arg_orgUnitPath = buildUnnamed117(); |
4050 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 4089 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
4051 var path = (req.url).path; | 4090 var path = (req.url).path; |
4052 var pathOffset = 0; | 4091 var pathOffset = 0; |
4053 var index; | 4092 var index; |
4054 var subPart; | 4093 var subPart; |
4055 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 4094 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
4056 pathOffset += 1; | 4095 pathOffset += 1; |
4057 unittest.expect(path.substring(pathOffset, pathOffset + 19), unittest.eq
uals("admin/directory/v1/")); | 4096 unittest.expect(path.substring(pathOffset, pathOffset + 19), unittest.eq
uals("admin/directory/v1/")); |
4058 pathOffset += 19; | 4097 pathOffset += 19; |
4059 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("customer/")); | 4098 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("customer/")); |
(...skipping 23 matching lines...) Expand all Loading... |
4083 var keyvalue = part.split("="); | 4122 var keyvalue = part.split("="); |
4084 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 4123 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
4085 } | 4124 } |
4086 } | 4125 } |
4087 | 4126 |
4088 | 4127 |
4089 var h = { | 4128 var h = { |
4090 "content-type" : "application/json; charset=utf-8", | 4129 "content-type" : "application/json; charset=utf-8", |
4091 }; | 4130 }; |
4092 var resp = convert.JSON.encode(buildOrgUnit()); | 4131 var resp = convert.JSON.encode(buildOrgUnit()); |
4093 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 4132 return new async.Future.value(stringResponse(200, h, resp)); |
4094 }), true); | 4133 }), true); |
4095 res.get(arg_customerId, arg_orgUnitPath).then(unittest.expectAsync(((api.O
rgUnit response) { | 4134 res.get(arg_customerId, arg_orgUnitPath).then(unittest.expectAsync(((api.O
rgUnit response) { |
4096 checkOrgUnit(response); | 4135 checkOrgUnit(response); |
4097 }))); | 4136 }))); |
4098 }); | 4137 }); |
4099 | 4138 |
4100 unittest.test("method--insert", () { | 4139 unittest.test("method--insert", () { |
4101 | 4140 |
4102 var mock = new common_test.HttpServerMock(); | 4141 var mock = new HttpServerMock(); |
4103 api.OrgunitsResourceApi res = new api.AdminApi(mock).orgunits; | 4142 api.OrgunitsResourceApi res = new api.AdminApi(mock).orgunits; |
4104 var arg_request = buildOrgUnit(); | 4143 var arg_request = buildOrgUnit(); |
4105 var arg_customerId = "foo"; | 4144 var arg_customerId = "foo"; |
4106 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 4145 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
4107 var obj = new api.OrgUnit.fromJson(json); | 4146 var obj = new api.OrgUnit.fromJson(json); |
4108 checkOrgUnit(obj); | 4147 checkOrgUnit(obj); |
4109 | 4148 |
4110 var path = (req.url).path; | 4149 var path = (req.url).path; |
4111 var pathOffset = 0; | 4150 var pathOffset = 0; |
4112 var index; | 4151 var index; |
(...skipping 27 matching lines...) Expand all Loading... |
4140 var keyvalue = part.split("="); | 4179 var keyvalue = part.split("="); |
4141 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 4180 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
4142 } | 4181 } |
4143 } | 4182 } |
4144 | 4183 |
4145 | 4184 |
4146 var h = { | 4185 var h = { |
4147 "content-type" : "application/json; charset=utf-8", | 4186 "content-type" : "application/json; charset=utf-8", |
4148 }; | 4187 }; |
4149 var resp = convert.JSON.encode(buildOrgUnit()); | 4188 var resp = convert.JSON.encode(buildOrgUnit()); |
4150 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 4189 return new async.Future.value(stringResponse(200, h, resp)); |
4151 }), true); | 4190 }), true); |
4152 res.insert(arg_request, arg_customerId).then(unittest.expectAsync(((api.Or
gUnit response) { | 4191 res.insert(arg_request, arg_customerId).then(unittest.expectAsync(((api.Or
gUnit response) { |
4153 checkOrgUnit(response); | 4192 checkOrgUnit(response); |
4154 }))); | 4193 }))); |
4155 }); | 4194 }); |
4156 | 4195 |
4157 unittest.test("method--list", () { | 4196 unittest.test("method--list", () { |
4158 | 4197 |
4159 var mock = new common_test.HttpServerMock(); | 4198 var mock = new HttpServerMock(); |
4160 api.OrgunitsResourceApi res = new api.AdminApi(mock).orgunits; | 4199 api.OrgunitsResourceApi res = new api.AdminApi(mock).orgunits; |
4161 var arg_customerId = "foo"; | 4200 var arg_customerId = "foo"; |
4162 var arg_orgUnitPath = "foo"; | 4201 var arg_orgUnitPath = "foo"; |
4163 var arg_type = "foo"; | 4202 var arg_type = "foo"; |
4164 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 4203 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
4165 var path = (req.url).path; | 4204 var path = (req.url).path; |
4166 var pathOffset = 0; | 4205 var pathOffset = 0; |
4167 var index; | 4206 var index; |
4168 var subPart; | 4207 var subPart; |
4169 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 4208 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
(...skipping 27 matching lines...) Expand all Loading... |
4197 } | 4236 } |
4198 } | 4237 } |
4199 unittest.expect(queryMap["orgUnitPath"].first, unittest.equals(arg_orgUn
itPath)); | 4238 unittest.expect(queryMap["orgUnitPath"].first, unittest.equals(arg_orgUn
itPath)); |
4200 unittest.expect(queryMap["type"].first, unittest.equals(arg_type)); | 4239 unittest.expect(queryMap["type"].first, unittest.equals(arg_type)); |
4201 | 4240 |
4202 | 4241 |
4203 var h = { | 4242 var h = { |
4204 "content-type" : "application/json; charset=utf-8", | 4243 "content-type" : "application/json; charset=utf-8", |
4205 }; | 4244 }; |
4206 var resp = convert.JSON.encode(buildOrgUnits()); | 4245 var resp = convert.JSON.encode(buildOrgUnits()); |
4207 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 4246 return new async.Future.value(stringResponse(200, h, resp)); |
4208 }), true); | 4247 }), true); |
4209 res.list(arg_customerId, orgUnitPath: arg_orgUnitPath, type: arg_type).the
n(unittest.expectAsync(((api.OrgUnits response) { | 4248 res.list(arg_customerId, orgUnitPath: arg_orgUnitPath, type: arg_type).the
n(unittest.expectAsync(((api.OrgUnits response) { |
4210 checkOrgUnits(response); | 4249 checkOrgUnits(response); |
4211 }))); | 4250 }))); |
4212 }); | 4251 }); |
4213 | 4252 |
4214 unittest.test("method--patch", () { | 4253 unittest.test("method--patch", () { |
4215 | 4254 |
4216 var mock = new common_test.HttpServerMock(); | 4255 var mock = new HttpServerMock(); |
4217 api.OrgunitsResourceApi res = new api.AdminApi(mock).orgunits; | 4256 api.OrgunitsResourceApi res = new api.AdminApi(mock).orgunits; |
4218 var arg_request = buildOrgUnit(); | 4257 var arg_request = buildOrgUnit(); |
4219 var arg_customerId = "foo"; | 4258 var arg_customerId = "foo"; |
4220 var arg_orgUnitPath = buildUnnamed788(); | 4259 var arg_orgUnitPath = buildUnnamed118(); |
4221 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 4260 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
4222 var obj = new api.OrgUnit.fromJson(json); | 4261 var obj = new api.OrgUnit.fromJson(json); |
4223 checkOrgUnit(obj); | 4262 checkOrgUnit(obj); |
4224 | 4263 |
4225 var path = (req.url).path; | 4264 var path = (req.url).path; |
4226 var pathOffset = 0; | 4265 var pathOffset = 0; |
4227 var index; | 4266 var index; |
4228 var subPart; | 4267 var subPart; |
4229 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 4268 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
4230 pathOffset += 1; | 4269 pathOffset += 1; |
(...skipping 26 matching lines...) Expand all Loading... |
4257 var keyvalue = part.split("="); | 4296 var keyvalue = part.split("="); |
4258 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 4297 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
4259 } | 4298 } |
4260 } | 4299 } |
4261 | 4300 |
4262 | 4301 |
4263 var h = { | 4302 var h = { |
4264 "content-type" : "application/json; charset=utf-8", | 4303 "content-type" : "application/json; charset=utf-8", |
4265 }; | 4304 }; |
4266 var resp = convert.JSON.encode(buildOrgUnit()); | 4305 var resp = convert.JSON.encode(buildOrgUnit()); |
4267 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 4306 return new async.Future.value(stringResponse(200, h, resp)); |
4268 }), true); | 4307 }), true); |
4269 res.patch(arg_request, arg_customerId, arg_orgUnitPath).then(unittest.expe
ctAsync(((api.OrgUnit response) { | 4308 res.patch(arg_request, arg_customerId, arg_orgUnitPath).then(unittest.expe
ctAsync(((api.OrgUnit response) { |
4270 checkOrgUnit(response); | 4309 checkOrgUnit(response); |
4271 }))); | 4310 }))); |
4272 }); | 4311 }); |
4273 | 4312 |
4274 unittest.test("method--update", () { | 4313 unittest.test("method--update", () { |
4275 | 4314 |
4276 var mock = new common_test.HttpServerMock(); | 4315 var mock = new HttpServerMock(); |
4277 api.OrgunitsResourceApi res = new api.AdminApi(mock).orgunits; | 4316 api.OrgunitsResourceApi res = new api.AdminApi(mock).orgunits; |
4278 var arg_request = buildOrgUnit(); | 4317 var arg_request = buildOrgUnit(); |
4279 var arg_customerId = "foo"; | 4318 var arg_customerId = "foo"; |
4280 var arg_orgUnitPath = buildUnnamed789(); | 4319 var arg_orgUnitPath = buildUnnamed119(); |
4281 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 4320 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
4282 var obj = new api.OrgUnit.fromJson(json); | 4321 var obj = new api.OrgUnit.fromJson(json); |
4283 checkOrgUnit(obj); | 4322 checkOrgUnit(obj); |
4284 | 4323 |
4285 var path = (req.url).path; | 4324 var path = (req.url).path; |
4286 var pathOffset = 0; | 4325 var pathOffset = 0; |
4287 var index; | 4326 var index; |
4288 var subPart; | 4327 var subPart; |
4289 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 4328 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
4290 pathOffset += 1; | 4329 pathOffset += 1; |
(...skipping 26 matching lines...) Expand all Loading... |
4317 var keyvalue = part.split("="); | 4356 var keyvalue = part.split("="); |
4318 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 4357 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
4319 } | 4358 } |
4320 } | 4359 } |
4321 | 4360 |
4322 | 4361 |
4323 var h = { | 4362 var h = { |
4324 "content-type" : "application/json; charset=utf-8", | 4363 "content-type" : "application/json; charset=utf-8", |
4325 }; | 4364 }; |
4326 var resp = convert.JSON.encode(buildOrgUnit()); | 4365 var resp = convert.JSON.encode(buildOrgUnit()); |
4327 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 4366 return new async.Future.value(stringResponse(200, h, resp)); |
4328 }), true); | 4367 }), true); |
4329 res.update(arg_request, arg_customerId, arg_orgUnitPath).then(unittest.exp
ectAsync(((api.OrgUnit response) { | 4368 res.update(arg_request, arg_customerId, arg_orgUnitPath).then(unittest.exp
ectAsync(((api.OrgUnit response) { |
4330 checkOrgUnit(response); | 4369 checkOrgUnit(response); |
4331 }))); | 4370 }))); |
4332 }); | 4371 }); |
4333 | 4372 |
4334 }); | 4373 }); |
4335 | 4374 |
4336 | 4375 |
4337 unittest.group("resource-SchemasResourceApi", () { | 4376 unittest.group("resource-SchemasResourceApi", () { |
4338 unittest.test("method--delete", () { | 4377 unittest.test("method--delete", () { |
4339 | 4378 |
4340 var mock = new common_test.HttpServerMock(); | 4379 var mock = new HttpServerMock(); |
4341 api.SchemasResourceApi res = new api.AdminApi(mock).schemas; | 4380 api.SchemasResourceApi res = new api.AdminApi(mock).schemas; |
4342 var arg_customerId = "foo"; | 4381 var arg_customerId = "foo"; |
4343 var arg_schemaKey = "foo"; | 4382 var arg_schemaKey = "foo"; |
4344 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 4383 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
4345 var path = (req.url).path; | 4384 var path = (req.url).path; |
4346 var pathOffset = 0; | 4385 var pathOffset = 0; |
4347 var index; | 4386 var index; |
4348 var subPart; | 4387 var subPart; |
4349 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 4388 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
4350 pathOffset += 1; | 4389 pathOffset += 1; |
(...skipping 27 matching lines...) Expand all Loading... |
4378 var keyvalue = part.split("="); | 4417 var keyvalue = part.split("="); |
4379 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 4418 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
4380 } | 4419 } |
4381 } | 4420 } |
4382 | 4421 |
4383 | 4422 |
4384 var h = { | 4423 var h = { |
4385 "content-type" : "application/json; charset=utf-8", | 4424 "content-type" : "application/json; charset=utf-8", |
4386 }; | 4425 }; |
4387 var resp = ""; | 4426 var resp = ""; |
4388 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 4427 return new async.Future.value(stringResponse(200, h, resp)); |
4389 }), true); | 4428 }), true); |
4390 res.delete(arg_customerId, arg_schemaKey).then(unittest.expectAsync((_) {}
)); | 4429 res.delete(arg_customerId, arg_schemaKey).then(unittest.expectAsync((_) {}
)); |
4391 }); | 4430 }); |
4392 | 4431 |
4393 unittest.test("method--get", () { | 4432 unittest.test("method--get", () { |
4394 | 4433 |
4395 var mock = new common_test.HttpServerMock(); | 4434 var mock = new HttpServerMock(); |
4396 api.SchemasResourceApi res = new api.AdminApi(mock).schemas; | 4435 api.SchemasResourceApi res = new api.AdminApi(mock).schemas; |
4397 var arg_customerId = "foo"; | 4436 var arg_customerId = "foo"; |
4398 var arg_schemaKey = "foo"; | 4437 var arg_schemaKey = "foo"; |
4399 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 4438 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
4400 var path = (req.url).path; | 4439 var path = (req.url).path; |
4401 var pathOffset = 0; | 4440 var pathOffset = 0; |
4402 var index; | 4441 var index; |
4403 var subPart; | 4442 var subPart; |
4404 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 4443 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
4405 pathOffset += 1; | 4444 pathOffset += 1; |
(...skipping 27 matching lines...) Expand all Loading... |
4433 var keyvalue = part.split("="); | 4472 var keyvalue = part.split("="); |
4434 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 4473 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
4435 } | 4474 } |
4436 } | 4475 } |
4437 | 4476 |
4438 | 4477 |
4439 var h = { | 4478 var h = { |
4440 "content-type" : "application/json; charset=utf-8", | 4479 "content-type" : "application/json; charset=utf-8", |
4441 }; | 4480 }; |
4442 var resp = convert.JSON.encode(buildSchema()); | 4481 var resp = convert.JSON.encode(buildSchema()); |
4443 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 4482 return new async.Future.value(stringResponse(200, h, resp)); |
4444 }), true); | 4483 }), true); |
4445 res.get(arg_customerId, arg_schemaKey).then(unittest.expectAsync(((api.Sch
ema response) { | 4484 res.get(arg_customerId, arg_schemaKey).then(unittest.expectAsync(((api.Sch
ema response) { |
4446 checkSchema(response); | 4485 checkSchema(response); |
4447 }))); | 4486 }))); |
4448 }); | 4487 }); |
4449 | 4488 |
4450 unittest.test("method--insert", () { | 4489 unittest.test("method--insert", () { |
4451 | 4490 |
4452 var mock = new common_test.HttpServerMock(); | 4491 var mock = new HttpServerMock(); |
4453 api.SchemasResourceApi res = new api.AdminApi(mock).schemas; | 4492 api.SchemasResourceApi res = new api.AdminApi(mock).schemas; |
4454 var arg_request = buildSchema(); | 4493 var arg_request = buildSchema(); |
4455 var arg_customerId = "foo"; | 4494 var arg_customerId = "foo"; |
4456 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 4495 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
4457 var obj = new api.Schema.fromJson(json); | 4496 var obj = new api.Schema.fromJson(json); |
4458 checkSchema(obj); | 4497 checkSchema(obj); |
4459 | 4498 |
4460 var path = (req.url).path; | 4499 var path = (req.url).path; |
4461 var pathOffset = 0; | 4500 var pathOffset = 0; |
4462 var index; | 4501 var index; |
(...skipping 27 matching lines...) Expand all Loading... |
4490 var keyvalue = part.split("="); | 4529 var keyvalue = part.split("="); |
4491 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 4530 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
4492 } | 4531 } |
4493 } | 4532 } |
4494 | 4533 |
4495 | 4534 |
4496 var h = { | 4535 var h = { |
4497 "content-type" : "application/json; charset=utf-8", | 4536 "content-type" : "application/json; charset=utf-8", |
4498 }; | 4537 }; |
4499 var resp = convert.JSON.encode(buildSchema()); | 4538 var resp = convert.JSON.encode(buildSchema()); |
4500 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 4539 return new async.Future.value(stringResponse(200, h, resp)); |
4501 }), true); | 4540 }), true); |
4502 res.insert(arg_request, arg_customerId).then(unittest.expectAsync(((api.Sc
hema response) { | 4541 res.insert(arg_request, arg_customerId).then(unittest.expectAsync(((api.Sc
hema response) { |
4503 checkSchema(response); | 4542 checkSchema(response); |
4504 }))); | 4543 }))); |
4505 }); | 4544 }); |
4506 | 4545 |
4507 unittest.test("method--list", () { | 4546 unittest.test("method--list", () { |
4508 | 4547 |
4509 var mock = new common_test.HttpServerMock(); | 4548 var mock = new HttpServerMock(); |
4510 api.SchemasResourceApi res = new api.AdminApi(mock).schemas; | 4549 api.SchemasResourceApi res = new api.AdminApi(mock).schemas; |
4511 var arg_customerId = "foo"; | 4550 var arg_customerId = "foo"; |
4512 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 4551 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
4513 var path = (req.url).path; | 4552 var path = (req.url).path; |
4514 var pathOffset = 0; | 4553 var pathOffset = 0; |
4515 var index; | 4554 var index; |
4516 var subPart; | 4555 var subPart; |
4517 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 4556 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
4518 pathOffset += 1; | 4557 pathOffset += 1; |
4519 unittest.expect(path.substring(pathOffset, pathOffset + 19), unittest.eq
uals("admin/directory/v1/")); | 4558 unittest.expect(path.substring(pathOffset, pathOffset + 19), unittest.eq
uals("admin/directory/v1/")); |
(...skipping 23 matching lines...) Expand all Loading... |
4543 var keyvalue = part.split("="); | 4582 var keyvalue = part.split("="); |
4544 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 4583 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
4545 } | 4584 } |
4546 } | 4585 } |
4547 | 4586 |
4548 | 4587 |
4549 var h = { | 4588 var h = { |
4550 "content-type" : "application/json; charset=utf-8", | 4589 "content-type" : "application/json; charset=utf-8", |
4551 }; | 4590 }; |
4552 var resp = convert.JSON.encode(buildSchemas()); | 4591 var resp = convert.JSON.encode(buildSchemas()); |
4553 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 4592 return new async.Future.value(stringResponse(200, h, resp)); |
4554 }), true); | 4593 }), true); |
4555 res.list(arg_customerId).then(unittest.expectAsync(((api.Schemas response)
{ | 4594 res.list(arg_customerId).then(unittest.expectAsync(((api.Schemas response)
{ |
4556 checkSchemas(response); | 4595 checkSchemas(response); |
4557 }))); | 4596 }))); |
4558 }); | 4597 }); |
4559 | 4598 |
4560 unittest.test("method--patch", () { | 4599 unittest.test("method--patch", () { |
4561 | 4600 |
4562 var mock = new common_test.HttpServerMock(); | 4601 var mock = new HttpServerMock(); |
4563 api.SchemasResourceApi res = new api.AdminApi(mock).schemas; | 4602 api.SchemasResourceApi res = new api.AdminApi(mock).schemas; |
4564 var arg_request = buildSchema(); | 4603 var arg_request = buildSchema(); |
4565 var arg_customerId = "foo"; | 4604 var arg_customerId = "foo"; |
4566 var arg_schemaKey = "foo"; | 4605 var arg_schemaKey = "foo"; |
4567 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 4606 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
4568 var obj = new api.Schema.fromJson(json); | 4607 var obj = new api.Schema.fromJson(json); |
4569 checkSchema(obj); | 4608 checkSchema(obj); |
4570 | 4609 |
4571 var path = (req.url).path; | 4610 var path = (req.url).path; |
4572 var pathOffset = 0; | 4611 var pathOffset = 0; |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4604 var keyvalue = part.split("="); | 4643 var keyvalue = part.split("="); |
4605 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 4644 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
4606 } | 4645 } |
4607 } | 4646 } |
4608 | 4647 |
4609 | 4648 |
4610 var h = { | 4649 var h = { |
4611 "content-type" : "application/json; charset=utf-8", | 4650 "content-type" : "application/json; charset=utf-8", |
4612 }; | 4651 }; |
4613 var resp = convert.JSON.encode(buildSchema()); | 4652 var resp = convert.JSON.encode(buildSchema()); |
4614 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 4653 return new async.Future.value(stringResponse(200, h, resp)); |
4615 }), true); | 4654 }), true); |
4616 res.patch(arg_request, arg_customerId, arg_schemaKey).then(unittest.expect
Async(((api.Schema response) { | 4655 res.patch(arg_request, arg_customerId, arg_schemaKey).then(unittest.expect
Async(((api.Schema response) { |
4617 checkSchema(response); | 4656 checkSchema(response); |
4618 }))); | 4657 }))); |
4619 }); | 4658 }); |
4620 | 4659 |
4621 unittest.test("method--update", () { | 4660 unittest.test("method--update", () { |
4622 | 4661 |
4623 var mock = new common_test.HttpServerMock(); | 4662 var mock = new HttpServerMock(); |
4624 api.SchemasResourceApi res = new api.AdminApi(mock).schemas; | 4663 api.SchemasResourceApi res = new api.AdminApi(mock).schemas; |
4625 var arg_request = buildSchema(); | 4664 var arg_request = buildSchema(); |
4626 var arg_customerId = "foo"; | 4665 var arg_customerId = "foo"; |
4627 var arg_schemaKey = "foo"; | 4666 var arg_schemaKey = "foo"; |
4628 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 4667 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
4629 var obj = new api.Schema.fromJson(json); | 4668 var obj = new api.Schema.fromJson(json); |
4630 checkSchema(obj); | 4669 checkSchema(obj); |
4631 | 4670 |
4632 var path = (req.url).path; | 4671 var path = (req.url).path; |
4633 var pathOffset = 0; | 4672 var pathOffset = 0; |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4665 var keyvalue = part.split("="); | 4704 var keyvalue = part.split("="); |
4666 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 4705 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
4667 } | 4706 } |
4668 } | 4707 } |
4669 | 4708 |
4670 | 4709 |
4671 var h = { | 4710 var h = { |
4672 "content-type" : "application/json; charset=utf-8", | 4711 "content-type" : "application/json; charset=utf-8", |
4673 }; | 4712 }; |
4674 var resp = convert.JSON.encode(buildSchema()); | 4713 var resp = convert.JSON.encode(buildSchema()); |
4675 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 4714 return new async.Future.value(stringResponse(200, h, resp)); |
4676 }), true); | 4715 }), true); |
4677 res.update(arg_request, arg_customerId, arg_schemaKey).then(unittest.expec
tAsync(((api.Schema response) { | 4716 res.update(arg_request, arg_customerId, arg_schemaKey).then(unittest.expec
tAsync(((api.Schema response) { |
4678 checkSchema(response); | 4717 checkSchema(response); |
4679 }))); | 4718 }))); |
4680 }); | 4719 }); |
4681 | 4720 |
4682 }); | 4721 }); |
4683 | 4722 |
4684 | 4723 |
4685 unittest.group("resource-TokensResourceApi", () { | 4724 unittest.group("resource-TokensResourceApi", () { |
4686 unittest.test("method--delete", () { | 4725 unittest.test("method--delete", () { |
4687 | 4726 |
4688 var mock = new common_test.HttpServerMock(); | 4727 var mock = new HttpServerMock(); |
4689 api.TokensResourceApi res = new api.AdminApi(mock).tokens; | 4728 api.TokensResourceApi res = new api.AdminApi(mock).tokens; |
4690 var arg_userKey = "foo"; | 4729 var arg_userKey = "foo"; |
4691 var arg_clientId = "foo"; | 4730 var arg_clientId = "foo"; |
4692 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 4731 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
4693 var path = (req.url).path; | 4732 var path = (req.url).path; |
4694 var pathOffset = 0; | 4733 var pathOffset = 0; |
4695 var index; | 4734 var index; |
4696 var subPart; | 4735 var subPart; |
4697 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 4736 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
4698 pathOffset += 1; | 4737 pathOffset += 1; |
(...skipping 27 matching lines...) Expand all Loading... |
4726 var keyvalue = part.split("="); | 4765 var keyvalue = part.split("="); |
4727 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 4766 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
4728 } | 4767 } |
4729 } | 4768 } |
4730 | 4769 |
4731 | 4770 |
4732 var h = { | 4771 var h = { |
4733 "content-type" : "application/json; charset=utf-8", | 4772 "content-type" : "application/json; charset=utf-8", |
4734 }; | 4773 }; |
4735 var resp = ""; | 4774 var resp = ""; |
4736 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 4775 return new async.Future.value(stringResponse(200, h, resp)); |
4737 }), true); | 4776 }), true); |
4738 res.delete(arg_userKey, arg_clientId).then(unittest.expectAsync((_) {})); | 4777 res.delete(arg_userKey, arg_clientId).then(unittest.expectAsync((_) {})); |
4739 }); | 4778 }); |
4740 | 4779 |
4741 unittest.test("method--get", () { | 4780 unittest.test("method--get", () { |
4742 | 4781 |
4743 var mock = new common_test.HttpServerMock(); | 4782 var mock = new HttpServerMock(); |
4744 api.TokensResourceApi res = new api.AdminApi(mock).tokens; | 4783 api.TokensResourceApi res = new api.AdminApi(mock).tokens; |
4745 var arg_userKey = "foo"; | 4784 var arg_userKey = "foo"; |
4746 var arg_clientId = "foo"; | 4785 var arg_clientId = "foo"; |
4747 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 4786 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
4748 var path = (req.url).path; | 4787 var path = (req.url).path; |
4749 var pathOffset = 0; | 4788 var pathOffset = 0; |
4750 var index; | 4789 var index; |
4751 var subPart; | 4790 var subPart; |
4752 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 4791 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
4753 pathOffset += 1; | 4792 pathOffset += 1; |
(...skipping 27 matching lines...) Expand all Loading... |
4781 var keyvalue = part.split("="); | 4820 var keyvalue = part.split("="); |
4782 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 4821 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
4783 } | 4822 } |
4784 } | 4823 } |
4785 | 4824 |
4786 | 4825 |
4787 var h = { | 4826 var h = { |
4788 "content-type" : "application/json; charset=utf-8", | 4827 "content-type" : "application/json; charset=utf-8", |
4789 }; | 4828 }; |
4790 var resp = convert.JSON.encode(buildToken()); | 4829 var resp = convert.JSON.encode(buildToken()); |
4791 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 4830 return new async.Future.value(stringResponse(200, h, resp)); |
4792 }), true); | 4831 }), true); |
4793 res.get(arg_userKey, arg_clientId).then(unittest.expectAsync(((api.Token r
esponse) { | 4832 res.get(arg_userKey, arg_clientId).then(unittest.expectAsync(((api.Token r
esponse) { |
4794 checkToken(response); | 4833 checkToken(response); |
4795 }))); | 4834 }))); |
4796 }); | 4835 }); |
4797 | 4836 |
4798 unittest.test("method--list", () { | 4837 unittest.test("method--list", () { |
4799 | 4838 |
4800 var mock = new common_test.HttpServerMock(); | 4839 var mock = new HttpServerMock(); |
4801 api.TokensResourceApi res = new api.AdminApi(mock).tokens; | 4840 api.TokensResourceApi res = new api.AdminApi(mock).tokens; |
4802 var arg_userKey = "foo"; | 4841 var arg_userKey = "foo"; |
4803 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 4842 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
4804 var path = (req.url).path; | 4843 var path = (req.url).path; |
4805 var pathOffset = 0; | 4844 var pathOffset = 0; |
4806 var index; | 4845 var index; |
4807 var subPart; | 4846 var subPart; |
4808 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 4847 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
4809 pathOffset += 1; | 4848 pathOffset += 1; |
4810 unittest.expect(path.substring(pathOffset, pathOffset + 19), unittest.eq
uals("admin/directory/v1/")); | 4849 unittest.expect(path.substring(pathOffset, pathOffset + 19), unittest.eq
uals("admin/directory/v1/")); |
(...skipping 23 matching lines...) Expand all Loading... |
4834 var keyvalue = part.split("="); | 4873 var keyvalue = part.split("="); |
4835 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 4874 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
4836 } | 4875 } |
4837 } | 4876 } |
4838 | 4877 |
4839 | 4878 |
4840 var h = { | 4879 var h = { |
4841 "content-type" : "application/json; charset=utf-8", | 4880 "content-type" : "application/json; charset=utf-8", |
4842 }; | 4881 }; |
4843 var resp = convert.JSON.encode(buildTokens()); | 4882 var resp = convert.JSON.encode(buildTokens()); |
4844 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 4883 return new async.Future.value(stringResponse(200, h, resp)); |
4845 }), true); | 4884 }), true); |
4846 res.list(arg_userKey).then(unittest.expectAsync(((api.Tokens response) { | 4885 res.list(arg_userKey).then(unittest.expectAsync(((api.Tokens response) { |
4847 checkTokens(response); | 4886 checkTokens(response); |
4848 }))); | 4887 }))); |
4849 }); | 4888 }); |
4850 | 4889 |
4851 }); | 4890 }); |
4852 | 4891 |
4853 | 4892 |
4854 unittest.group("resource-UsersResourceApi", () { | 4893 unittest.group("resource-UsersResourceApi", () { |
4855 unittest.test("method--delete", () { | 4894 unittest.test("method--delete", () { |
4856 | 4895 |
4857 var mock = new common_test.HttpServerMock(); | 4896 var mock = new HttpServerMock(); |
4858 api.UsersResourceApi res = new api.AdminApi(mock).users; | 4897 api.UsersResourceApi res = new api.AdminApi(mock).users; |
4859 var arg_userKey = "foo"; | 4898 var arg_userKey = "foo"; |
4860 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 4899 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
4861 var path = (req.url).path; | 4900 var path = (req.url).path; |
4862 var pathOffset = 0; | 4901 var pathOffset = 0; |
4863 var index; | 4902 var index; |
4864 var subPart; | 4903 var subPart; |
4865 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 4904 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
4866 pathOffset += 1; | 4905 pathOffset += 1; |
4867 unittest.expect(path.substring(pathOffset, pathOffset + 19), unittest.eq
uals("admin/directory/v1/")); | 4906 unittest.expect(path.substring(pathOffset, pathOffset + 19), unittest.eq
uals("admin/directory/v1/")); |
(...skipping 19 matching lines...) Expand all Loading... |
4887 var keyvalue = part.split("="); | 4926 var keyvalue = part.split("="); |
4888 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 4927 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
4889 } | 4928 } |
4890 } | 4929 } |
4891 | 4930 |
4892 | 4931 |
4893 var h = { | 4932 var h = { |
4894 "content-type" : "application/json; charset=utf-8", | 4933 "content-type" : "application/json; charset=utf-8", |
4895 }; | 4934 }; |
4896 var resp = ""; | 4935 var resp = ""; |
4897 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 4936 return new async.Future.value(stringResponse(200, h, resp)); |
4898 }), true); | 4937 }), true); |
4899 res.delete(arg_userKey).then(unittest.expectAsync((_) {})); | 4938 res.delete(arg_userKey).then(unittest.expectAsync((_) {})); |
4900 }); | 4939 }); |
4901 | 4940 |
4902 unittest.test("method--get", () { | 4941 unittest.test("method--get", () { |
4903 | 4942 |
4904 var mock = new common_test.HttpServerMock(); | 4943 var mock = new HttpServerMock(); |
4905 api.UsersResourceApi res = new api.AdminApi(mock).users; | 4944 api.UsersResourceApi res = new api.AdminApi(mock).users; |
4906 var arg_userKey = "foo"; | 4945 var arg_userKey = "foo"; |
4907 var arg_customFieldMask = "foo"; | 4946 var arg_customFieldMask = "foo"; |
4908 var arg_projection = "foo"; | 4947 var arg_projection = "foo"; |
4909 var arg_viewType = "foo"; | 4948 var arg_viewType = "foo"; |
4910 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 4949 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
4911 var path = (req.url).path; | 4950 var path = (req.url).path; |
4912 var pathOffset = 0; | 4951 var pathOffset = 0; |
4913 var index; | 4952 var index; |
4914 var subPart; | 4953 var subPart; |
(...skipping 25 matching lines...) Expand all Loading... |
4940 } | 4979 } |
4941 unittest.expect(queryMap["customFieldMask"].first, unittest.equals(arg_c
ustomFieldMask)); | 4980 unittest.expect(queryMap["customFieldMask"].first, unittest.equals(arg_c
ustomFieldMask)); |
4942 unittest.expect(queryMap["projection"].first, unittest.equals(arg_projec
tion)); | 4981 unittest.expect(queryMap["projection"].first, unittest.equals(arg_projec
tion)); |
4943 unittest.expect(queryMap["viewType"].first, unittest.equals(arg_viewType
)); | 4982 unittest.expect(queryMap["viewType"].first, unittest.equals(arg_viewType
)); |
4944 | 4983 |
4945 | 4984 |
4946 var h = { | 4985 var h = { |
4947 "content-type" : "application/json; charset=utf-8", | 4986 "content-type" : "application/json; charset=utf-8", |
4948 }; | 4987 }; |
4949 var resp = convert.JSON.encode(buildUser()); | 4988 var resp = convert.JSON.encode(buildUser()); |
4950 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 4989 return new async.Future.value(stringResponse(200, h, resp)); |
4951 }), true); | 4990 }), true); |
4952 res.get(arg_userKey, customFieldMask: arg_customFieldMask, projection: arg
_projection, viewType: arg_viewType).then(unittest.expectAsync(((api.User respon
se) { | 4991 res.get(arg_userKey, customFieldMask: arg_customFieldMask, projection: arg
_projection, viewType: arg_viewType).then(unittest.expectAsync(((api.User respon
se) { |
4953 checkUser(response); | 4992 checkUser(response); |
4954 }))); | 4993 }))); |
4955 }); | 4994 }); |
4956 | 4995 |
4957 unittest.test("method--insert", () { | 4996 unittest.test("method--insert", () { |
4958 | 4997 |
4959 var mock = new common_test.HttpServerMock(); | 4998 var mock = new HttpServerMock(); |
4960 api.UsersResourceApi res = new api.AdminApi(mock).users; | 4999 api.UsersResourceApi res = new api.AdminApi(mock).users; |
4961 var arg_request = buildUser(); | 5000 var arg_request = buildUser(); |
4962 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 5001 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
4963 var obj = new api.User.fromJson(json); | 5002 var obj = new api.User.fromJson(json); |
4964 checkUser(obj); | 5003 checkUser(obj); |
4965 | 5004 |
4966 var path = (req.url).path; | 5005 var path = (req.url).path; |
4967 var pathOffset = 0; | 5006 var pathOffset = 0; |
4968 var index; | 5007 var index; |
4969 var subPart; | 5008 var subPart; |
(...skipping 19 matching lines...) Expand all Loading... |
4989 var keyvalue = part.split("="); | 5028 var keyvalue = part.split("="); |
4990 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 5029 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
4991 } | 5030 } |
4992 } | 5031 } |
4993 | 5032 |
4994 | 5033 |
4995 var h = { | 5034 var h = { |
4996 "content-type" : "application/json; charset=utf-8", | 5035 "content-type" : "application/json; charset=utf-8", |
4997 }; | 5036 }; |
4998 var resp = convert.JSON.encode(buildUser()); | 5037 var resp = convert.JSON.encode(buildUser()); |
4999 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 5038 return new async.Future.value(stringResponse(200, h, resp)); |
5000 }), true); | 5039 }), true); |
5001 res.insert(arg_request).then(unittest.expectAsync(((api.User response) { | 5040 res.insert(arg_request).then(unittest.expectAsync(((api.User response) { |
5002 checkUser(response); | 5041 checkUser(response); |
5003 }))); | 5042 }))); |
5004 }); | 5043 }); |
5005 | 5044 |
5006 unittest.test("method--list", () { | 5045 unittest.test("method--list", () { |
5007 | 5046 |
5008 var mock = new common_test.HttpServerMock(); | 5047 var mock = new HttpServerMock(); |
5009 api.UsersResourceApi res = new api.AdminApi(mock).users; | 5048 api.UsersResourceApi res = new api.AdminApi(mock).users; |
5010 var arg_customFieldMask = "foo"; | 5049 var arg_customFieldMask = "foo"; |
5011 var arg_customer = "foo"; | 5050 var arg_customer = "foo"; |
5012 var arg_domain = "foo"; | 5051 var arg_domain = "foo"; |
5013 var arg_event = "foo"; | 5052 var arg_event = "foo"; |
5014 var arg_maxResults = 42; | 5053 var arg_maxResults = 42; |
5015 var arg_orderBy = "foo"; | 5054 var arg_orderBy = "foo"; |
5016 var arg_pageToken = "foo"; | 5055 var arg_pageToken = "foo"; |
5017 var arg_projection = "foo"; | 5056 var arg_projection = "foo"; |
5018 var arg_query = "foo"; | 5057 var arg_query = "foo"; |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5058 unittest.expect(queryMap["query"].first, unittest.equals(arg_query)); | 5097 unittest.expect(queryMap["query"].first, unittest.equals(arg_query)); |
5059 unittest.expect(queryMap["showDeleted"].first, unittest.equals(arg_showD
eleted)); | 5098 unittest.expect(queryMap["showDeleted"].first, unittest.equals(arg_showD
eleted)); |
5060 unittest.expect(queryMap["sortOrder"].first, unittest.equals(arg_sortOrd
er)); | 5099 unittest.expect(queryMap["sortOrder"].first, unittest.equals(arg_sortOrd
er)); |
5061 unittest.expect(queryMap["viewType"].first, unittest.equals(arg_viewType
)); | 5100 unittest.expect(queryMap["viewType"].first, unittest.equals(arg_viewType
)); |
5062 | 5101 |
5063 | 5102 |
5064 var h = { | 5103 var h = { |
5065 "content-type" : "application/json; charset=utf-8", | 5104 "content-type" : "application/json; charset=utf-8", |
5066 }; | 5105 }; |
5067 var resp = convert.JSON.encode(buildUsers()); | 5106 var resp = convert.JSON.encode(buildUsers()); |
5068 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 5107 return new async.Future.value(stringResponse(200, h, resp)); |
5069 }), true); | 5108 }), true); |
5070 res.list(customFieldMask: arg_customFieldMask, customer: arg_customer, dom
ain: arg_domain, event: arg_event, maxResults: arg_maxResults, orderBy: arg_orde
rBy, pageToken: arg_pageToken, projection: arg_projection, query: arg_query, sho
wDeleted: arg_showDeleted, sortOrder: arg_sortOrder, viewType: arg_viewType).the
n(unittest.expectAsync(((api.Users response) { | 5109 res.list(customFieldMask: arg_customFieldMask, customer: arg_customer, dom
ain: arg_domain, event: arg_event, maxResults: arg_maxResults, orderBy: arg_orde
rBy, pageToken: arg_pageToken, projection: arg_projection, query: arg_query, sho
wDeleted: arg_showDeleted, sortOrder: arg_sortOrder, viewType: arg_viewType).the
n(unittest.expectAsync(((api.Users response) { |
5071 checkUsers(response); | 5110 checkUsers(response); |
5072 }))); | 5111 }))); |
5073 }); | 5112 }); |
5074 | 5113 |
5075 unittest.test("method--makeAdmin", () { | 5114 unittest.test("method--makeAdmin", () { |
5076 | 5115 |
5077 var mock = new common_test.HttpServerMock(); | 5116 var mock = new HttpServerMock(); |
5078 api.UsersResourceApi res = new api.AdminApi(mock).users; | 5117 api.UsersResourceApi res = new api.AdminApi(mock).users; |
5079 var arg_request = buildUserMakeAdmin(); | 5118 var arg_request = buildUserMakeAdmin(); |
5080 var arg_userKey = "foo"; | 5119 var arg_userKey = "foo"; |
5081 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 5120 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
5082 var obj = new api.UserMakeAdmin.fromJson(json); | 5121 var obj = new api.UserMakeAdmin.fromJson(json); |
5083 checkUserMakeAdmin(obj); | 5122 checkUserMakeAdmin(obj); |
5084 | 5123 |
5085 var path = (req.url).path; | 5124 var path = (req.url).path; |
5086 var pathOffset = 0; | 5125 var pathOffset = 0; |
5087 var index; | 5126 var index; |
(...skipping 27 matching lines...) Expand all Loading... |
5115 var keyvalue = part.split("="); | 5154 var keyvalue = part.split("="); |
5116 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 5155 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
5117 } | 5156 } |
5118 } | 5157 } |
5119 | 5158 |
5120 | 5159 |
5121 var h = { | 5160 var h = { |
5122 "content-type" : "application/json; charset=utf-8", | 5161 "content-type" : "application/json; charset=utf-8", |
5123 }; | 5162 }; |
5124 var resp = ""; | 5163 var resp = ""; |
5125 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 5164 return new async.Future.value(stringResponse(200, h, resp)); |
5126 }), true); | 5165 }), true); |
5127 res.makeAdmin(arg_request, arg_userKey).then(unittest.expectAsync((_) {}))
; | 5166 res.makeAdmin(arg_request, arg_userKey).then(unittest.expectAsync((_) {}))
; |
5128 }); | 5167 }); |
5129 | 5168 |
5130 unittest.test("method--patch", () { | 5169 unittest.test("method--patch", () { |
5131 | 5170 |
5132 var mock = new common_test.HttpServerMock(); | 5171 var mock = new HttpServerMock(); |
5133 api.UsersResourceApi res = new api.AdminApi(mock).users; | 5172 api.UsersResourceApi res = new api.AdminApi(mock).users; |
5134 var arg_request = buildUser(); | 5173 var arg_request = buildUser(); |
5135 var arg_userKey = "foo"; | 5174 var arg_userKey = "foo"; |
5136 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 5175 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
5137 var obj = new api.User.fromJson(json); | 5176 var obj = new api.User.fromJson(json); |
5138 checkUser(obj); | 5177 checkUser(obj); |
5139 | 5178 |
5140 var path = (req.url).path; | 5179 var path = (req.url).path; |
5141 var pathOffset = 0; | 5180 var pathOffset = 0; |
5142 var index; | 5181 var index; |
(...skipping 23 matching lines...) Expand all Loading... |
5166 var keyvalue = part.split("="); | 5205 var keyvalue = part.split("="); |
5167 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 5206 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
5168 } | 5207 } |
5169 } | 5208 } |
5170 | 5209 |
5171 | 5210 |
5172 var h = { | 5211 var h = { |
5173 "content-type" : "application/json; charset=utf-8", | 5212 "content-type" : "application/json; charset=utf-8", |
5174 }; | 5213 }; |
5175 var resp = convert.JSON.encode(buildUser()); | 5214 var resp = convert.JSON.encode(buildUser()); |
5176 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 5215 return new async.Future.value(stringResponse(200, h, resp)); |
5177 }), true); | 5216 }), true); |
5178 res.patch(arg_request, arg_userKey).then(unittest.expectAsync(((api.User r
esponse) { | 5217 res.patch(arg_request, arg_userKey).then(unittest.expectAsync(((api.User r
esponse) { |
5179 checkUser(response); | 5218 checkUser(response); |
5180 }))); | 5219 }))); |
5181 }); | 5220 }); |
5182 | 5221 |
5183 unittest.test("method--undelete", () { | 5222 unittest.test("method--undelete", () { |
5184 | 5223 |
5185 var mock = new common_test.HttpServerMock(); | 5224 var mock = new HttpServerMock(); |
5186 api.UsersResourceApi res = new api.AdminApi(mock).users; | 5225 api.UsersResourceApi res = new api.AdminApi(mock).users; |
5187 var arg_request = buildUserUndelete(); | 5226 var arg_request = buildUserUndelete(); |
5188 var arg_userKey = "foo"; | 5227 var arg_userKey = "foo"; |
5189 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 5228 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
5190 var obj = new api.UserUndelete.fromJson(json); | 5229 var obj = new api.UserUndelete.fromJson(json); |
5191 checkUserUndelete(obj); | 5230 checkUserUndelete(obj); |
5192 | 5231 |
5193 var path = (req.url).path; | 5232 var path = (req.url).path; |
5194 var pathOffset = 0; | 5233 var pathOffset = 0; |
5195 var index; | 5234 var index; |
(...skipping 27 matching lines...) Expand all Loading... |
5223 var keyvalue = part.split("="); | 5262 var keyvalue = part.split("="); |
5224 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 5263 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
5225 } | 5264 } |
5226 } | 5265 } |
5227 | 5266 |
5228 | 5267 |
5229 var h = { | 5268 var h = { |
5230 "content-type" : "application/json; charset=utf-8", | 5269 "content-type" : "application/json; charset=utf-8", |
5231 }; | 5270 }; |
5232 var resp = ""; | 5271 var resp = ""; |
5233 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 5272 return new async.Future.value(stringResponse(200, h, resp)); |
5234 }), true); | 5273 }), true); |
5235 res.undelete(arg_request, arg_userKey).then(unittest.expectAsync((_) {})); | 5274 res.undelete(arg_request, arg_userKey).then(unittest.expectAsync((_) {})); |
5236 }); | 5275 }); |
5237 | 5276 |
5238 unittest.test("method--update", () { | 5277 unittest.test("method--update", () { |
5239 | 5278 |
5240 var mock = new common_test.HttpServerMock(); | 5279 var mock = new HttpServerMock(); |
5241 api.UsersResourceApi res = new api.AdminApi(mock).users; | 5280 api.UsersResourceApi res = new api.AdminApi(mock).users; |
5242 var arg_request = buildUser(); | 5281 var arg_request = buildUser(); |
5243 var arg_userKey = "foo"; | 5282 var arg_userKey = "foo"; |
5244 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 5283 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
5245 var obj = new api.User.fromJson(json); | 5284 var obj = new api.User.fromJson(json); |
5246 checkUser(obj); | 5285 checkUser(obj); |
5247 | 5286 |
5248 var path = (req.url).path; | 5287 var path = (req.url).path; |
5249 var pathOffset = 0; | 5288 var pathOffset = 0; |
5250 var index; | 5289 var index; |
(...skipping 23 matching lines...) Expand all Loading... |
5274 var keyvalue = part.split("="); | 5313 var keyvalue = part.split("="); |
5275 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 5314 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
5276 } | 5315 } |
5277 } | 5316 } |
5278 | 5317 |
5279 | 5318 |
5280 var h = { | 5319 var h = { |
5281 "content-type" : "application/json; charset=utf-8", | 5320 "content-type" : "application/json; charset=utf-8", |
5282 }; | 5321 }; |
5283 var resp = convert.JSON.encode(buildUser()); | 5322 var resp = convert.JSON.encode(buildUser()); |
5284 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 5323 return new async.Future.value(stringResponse(200, h, resp)); |
5285 }), true); | 5324 }), true); |
5286 res.update(arg_request, arg_userKey).then(unittest.expectAsync(((api.User
response) { | 5325 res.update(arg_request, arg_userKey).then(unittest.expectAsync(((api.User
response) { |
5287 checkUser(response); | 5326 checkUser(response); |
5288 }))); | 5327 }))); |
5289 }); | 5328 }); |
5290 | 5329 |
5291 unittest.test("method--watch", () { | 5330 unittest.test("method--watch", () { |
5292 | 5331 |
5293 var mock = new common_test.HttpServerMock(); | 5332 var mock = new HttpServerMock(); |
5294 api.UsersResourceApi res = new api.AdminApi(mock).users; | 5333 api.UsersResourceApi res = new api.AdminApi(mock).users; |
5295 var arg_request = buildChannel(); | 5334 var arg_request = buildChannel(); |
5296 var arg_customFieldMask = "foo"; | 5335 var arg_customFieldMask = "foo"; |
5297 var arg_customer = "foo"; | 5336 var arg_customer = "foo"; |
5298 var arg_domain = "foo"; | 5337 var arg_domain = "foo"; |
5299 var arg_event = "foo"; | 5338 var arg_event = "foo"; |
5300 var arg_maxResults = 42; | 5339 var arg_maxResults = 42; |
5301 var arg_orderBy = "foo"; | 5340 var arg_orderBy = "foo"; |
5302 var arg_pageToken = "foo"; | 5341 var arg_pageToken = "foo"; |
5303 var arg_projection = "foo"; | 5342 var arg_projection = "foo"; |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5347 unittest.expect(queryMap["query"].first, unittest.equals(arg_query)); | 5386 unittest.expect(queryMap["query"].first, unittest.equals(arg_query)); |
5348 unittest.expect(queryMap["showDeleted"].first, unittest.equals(arg_showD
eleted)); | 5387 unittest.expect(queryMap["showDeleted"].first, unittest.equals(arg_showD
eleted)); |
5349 unittest.expect(queryMap["sortOrder"].first, unittest.equals(arg_sortOrd
er)); | 5388 unittest.expect(queryMap["sortOrder"].first, unittest.equals(arg_sortOrd
er)); |
5350 unittest.expect(queryMap["viewType"].first, unittest.equals(arg_viewType
)); | 5389 unittest.expect(queryMap["viewType"].first, unittest.equals(arg_viewType
)); |
5351 | 5390 |
5352 | 5391 |
5353 var h = { | 5392 var h = { |
5354 "content-type" : "application/json; charset=utf-8", | 5393 "content-type" : "application/json; charset=utf-8", |
5355 }; | 5394 }; |
5356 var resp = convert.JSON.encode(buildChannel()); | 5395 var resp = convert.JSON.encode(buildChannel()); |
5357 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 5396 return new async.Future.value(stringResponse(200, h, resp)); |
5358 }), true); | 5397 }), true); |
5359 res.watch(arg_request, customFieldMask: arg_customFieldMask, customer: arg
_customer, domain: arg_domain, event: arg_event, maxResults: arg_maxResults, ord
erBy: arg_orderBy, pageToken: arg_pageToken, projection: arg_projection, query:
arg_query, showDeleted: arg_showDeleted, sortOrder: arg_sortOrder, viewType: arg
_viewType).then(unittest.expectAsync(((api.Channel response) { | 5398 res.watch(arg_request, customFieldMask: arg_customFieldMask, customer: arg
_customer, domain: arg_domain, event: arg_event, maxResults: arg_maxResults, ord
erBy: arg_orderBy, pageToken: arg_pageToken, projection: arg_projection, query:
arg_query, showDeleted: arg_showDeleted, sortOrder: arg_sortOrder, viewType: arg
_viewType).then(unittest.expectAsync(((api.Channel response) { |
5360 checkChannel(response); | 5399 checkChannel(response); |
5361 }))); | 5400 }))); |
5362 }); | 5401 }); |
5363 | 5402 |
5364 }); | 5403 }); |
5365 | 5404 |
5366 | 5405 |
5367 unittest.group("resource-UsersAliasesResourceApi", () { | 5406 unittest.group("resource-UsersAliasesResourceApi", () { |
5368 unittest.test("method--delete", () { | 5407 unittest.test("method--delete", () { |
5369 | 5408 |
5370 var mock = new common_test.HttpServerMock(); | 5409 var mock = new HttpServerMock(); |
5371 api.UsersAliasesResourceApi res = new api.AdminApi(mock).users.aliases; | 5410 api.UsersAliasesResourceApi res = new api.AdminApi(mock).users.aliases; |
5372 var arg_userKey = "foo"; | 5411 var arg_userKey = "foo"; |
5373 var arg_alias = "foo"; | 5412 var arg_alias = "foo"; |
5374 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 5413 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
5375 var path = (req.url).path; | 5414 var path = (req.url).path; |
5376 var pathOffset = 0; | 5415 var pathOffset = 0; |
5377 var index; | 5416 var index; |
5378 var subPart; | 5417 var subPart; |
5379 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 5418 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
5380 pathOffset += 1; | 5419 pathOffset += 1; |
(...skipping 27 matching lines...) Expand all Loading... |
5408 var keyvalue = part.split("="); | 5447 var keyvalue = part.split("="); |
5409 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 5448 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
5410 } | 5449 } |
5411 } | 5450 } |
5412 | 5451 |
5413 | 5452 |
5414 var h = { | 5453 var h = { |
5415 "content-type" : "application/json; charset=utf-8", | 5454 "content-type" : "application/json; charset=utf-8", |
5416 }; | 5455 }; |
5417 var resp = ""; | 5456 var resp = ""; |
5418 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 5457 return new async.Future.value(stringResponse(200, h, resp)); |
5419 }), true); | 5458 }), true); |
5420 res.delete(arg_userKey, arg_alias).then(unittest.expectAsync((_) {})); | 5459 res.delete(arg_userKey, arg_alias).then(unittest.expectAsync((_) {})); |
5421 }); | 5460 }); |
5422 | 5461 |
5423 unittest.test("method--insert", () { | 5462 unittest.test("method--insert", () { |
5424 | 5463 |
5425 var mock = new common_test.HttpServerMock(); | 5464 var mock = new HttpServerMock(); |
5426 api.UsersAliasesResourceApi res = new api.AdminApi(mock).users.aliases; | 5465 api.UsersAliasesResourceApi res = new api.AdminApi(mock).users.aliases; |
5427 var arg_request = buildAlias(); | 5466 var arg_request = buildAlias(); |
5428 var arg_userKey = "foo"; | 5467 var arg_userKey = "foo"; |
5429 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 5468 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
5430 var obj = new api.Alias.fromJson(json); | 5469 var obj = new api.Alias.fromJson(json); |
5431 checkAlias(obj); | 5470 checkAlias(obj); |
5432 | 5471 |
5433 var path = (req.url).path; | 5472 var path = (req.url).path; |
5434 var pathOffset = 0; | 5473 var pathOffset = 0; |
5435 var index; | 5474 var index; |
(...skipping 27 matching lines...) Expand all Loading... |
5463 var keyvalue = part.split("="); | 5502 var keyvalue = part.split("="); |
5464 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 5503 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
5465 } | 5504 } |
5466 } | 5505 } |
5467 | 5506 |
5468 | 5507 |
5469 var h = { | 5508 var h = { |
5470 "content-type" : "application/json; charset=utf-8", | 5509 "content-type" : "application/json; charset=utf-8", |
5471 }; | 5510 }; |
5472 var resp = convert.JSON.encode(buildAlias()); | 5511 var resp = convert.JSON.encode(buildAlias()); |
5473 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 5512 return new async.Future.value(stringResponse(200, h, resp)); |
5474 }), true); | 5513 }), true); |
5475 res.insert(arg_request, arg_userKey).then(unittest.expectAsync(((api.Alias
response) { | 5514 res.insert(arg_request, arg_userKey).then(unittest.expectAsync(((api.Alias
response) { |
5476 checkAlias(response); | 5515 checkAlias(response); |
5477 }))); | 5516 }))); |
5478 }); | 5517 }); |
5479 | 5518 |
5480 unittest.test("method--list", () { | 5519 unittest.test("method--list", () { |
5481 | 5520 |
5482 var mock = new common_test.HttpServerMock(); | 5521 var mock = new HttpServerMock(); |
5483 api.UsersAliasesResourceApi res = new api.AdminApi(mock).users.aliases; | 5522 api.UsersAliasesResourceApi res = new api.AdminApi(mock).users.aliases; |
5484 var arg_userKey = "foo"; | 5523 var arg_userKey = "foo"; |
5485 var arg_event = "foo"; | 5524 var arg_event = "foo"; |
5486 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 5525 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
5487 var path = (req.url).path; | 5526 var path = (req.url).path; |
5488 var pathOffset = 0; | 5527 var pathOffset = 0; |
5489 var index; | 5528 var index; |
5490 var subPart; | 5529 var subPart; |
5491 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 5530 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
5492 pathOffset += 1; | 5531 pathOffset += 1; |
(...skipping 25 matching lines...) Expand all Loading... |
5518 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 5557 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
5519 } | 5558 } |
5520 } | 5559 } |
5521 unittest.expect(queryMap["event"].first, unittest.equals(arg_event)); | 5560 unittest.expect(queryMap["event"].first, unittest.equals(arg_event)); |
5522 | 5561 |
5523 | 5562 |
5524 var h = { | 5563 var h = { |
5525 "content-type" : "application/json; charset=utf-8", | 5564 "content-type" : "application/json; charset=utf-8", |
5526 }; | 5565 }; |
5527 var resp = convert.JSON.encode(buildAliases()); | 5566 var resp = convert.JSON.encode(buildAliases()); |
5528 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 5567 return new async.Future.value(stringResponse(200, h, resp)); |
5529 }), true); | 5568 }), true); |
5530 res.list(arg_userKey, event: arg_event).then(unittest.expectAsync(((api.Al
iases response) { | 5569 res.list(arg_userKey, event: arg_event).then(unittest.expectAsync(((api.Al
iases response) { |
5531 checkAliases(response); | 5570 checkAliases(response); |
5532 }))); | 5571 }))); |
5533 }); | 5572 }); |
5534 | 5573 |
5535 unittest.test("method--watch", () { | 5574 unittest.test("method--watch", () { |
5536 | 5575 |
5537 var mock = new common_test.HttpServerMock(); | 5576 var mock = new HttpServerMock(); |
5538 api.UsersAliasesResourceApi res = new api.AdminApi(mock).users.aliases; | 5577 api.UsersAliasesResourceApi res = new api.AdminApi(mock).users.aliases; |
5539 var arg_request = buildChannel(); | 5578 var arg_request = buildChannel(); |
5540 var arg_userKey = "foo"; | 5579 var arg_userKey = "foo"; |
5541 var arg_event = "foo"; | 5580 var arg_event = "foo"; |
5542 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 5581 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
5543 var obj = new api.Channel.fromJson(json); | 5582 var obj = new api.Channel.fromJson(json); |
5544 checkChannel(obj); | 5583 checkChannel(obj); |
5545 | 5584 |
5546 var path = (req.url).path; | 5585 var path = (req.url).path; |
5547 var pathOffset = 0; | 5586 var pathOffset = 0; |
(...skipping 29 matching lines...) Expand all Loading... |
5577 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 5616 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
5578 } | 5617 } |
5579 } | 5618 } |
5580 unittest.expect(queryMap["event"].first, unittest.equals(arg_event)); | 5619 unittest.expect(queryMap["event"].first, unittest.equals(arg_event)); |
5581 | 5620 |
5582 | 5621 |
5583 var h = { | 5622 var h = { |
5584 "content-type" : "application/json; charset=utf-8", | 5623 "content-type" : "application/json; charset=utf-8", |
5585 }; | 5624 }; |
5586 var resp = convert.JSON.encode(buildChannel()); | 5625 var resp = convert.JSON.encode(buildChannel()); |
5587 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 5626 return new async.Future.value(stringResponse(200, h, resp)); |
5588 }), true); | 5627 }), true); |
5589 res.watch(arg_request, arg_userKey, event: arg_event).then(unittest.expect
Async(((api.Channel response) { | 5628 res.watch(arg_request, arg_userKey, event: arg_event).then(unittest.expect
Async(((api.Channel response) { |
5590 checkChannel(response); | 5629 checkChannel(response); |
5591 }))); | 5630 }))); |
5592 }); | 5631 }); |
5593 | 5632 |
5594 }); | 5633 }); |
5595 | 5634 |
5596 | 5635 |
5597 unittest.group("resource-UsersPhotosResourceApi", () { | 5636 unittest.group("resource-UsersPhotosResourceApi", () { |
5598 unittest.test("method--delete", () { | 5637 unittest.test("method--delete", () { |
5599 | 5638 |
5600 var mock = new common_test.HttpServerMock(); | 5639 var mock = new HttpServerMock(); |
5601 api.UsersPhotosResourceApi res = new api.AdminApi(mock).users.photos; | 5640 api.UsersPhotosResourceApi res = new api.AdminApi(mock).users.photos; |
5602 var arg_userKey = "foo"; | 5641 var arg_userKey = "foo"; |
5603 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 5642 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
5604 var path = (req.url).path; | 5643 var path = (req.url).path; |
5605 var pathOffset = 0; | 5644 var pathOffset = 0; |
5606 var index; | 5645 var index; |
5607 var subPart; | 5646 var subPart; |
5608 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 5647 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
5609 pathOffset += 1; | 5648 pathOffset += 1; |
5610 unittest.expect(path.substring(pathOffset, pathOffset + 19), unittest.eq
uals("admin/directory/v1/")); | 5649 unittest.expect(path.substring(pathOffset, pathOffset + 19), unittest.eq
uals("admin/directory/v1/")); |
(...skipping 23 matching lines...) Expand all Loading... |
5634 var keyvalue = part.split("="); | 5673 var keyvalue = part.split("="); |
5635 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 5674 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
5636 } | 5675 } |
5637 } | 5676 } |
5638 | 5677 |
5639 | 5678 |
5640 var h = { | 5679 var h = { |
5641 "content-type" : "application/json; charset=utf-8", | 5680 "content-type" : "application/json; charset=utf-8", |
5642 }; | 5681 }; |
5643 var resp = ""; | 5682 var resp = ""; |
5644 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 5683 return new async.Future.value(stringResponse(200, h, resp)); |
5645 }), true); | 5684 }), true); |
5646 res.delete(arg_userKey).then(unittest.expectAsync((_) {})); | 5685 res.delete(arg_userKey).then(unittest.expectAsync((_) {})); |
5647 }); | 5686 }); |
5648 | 5687 |
5649 unittest.test("method--get", () { | 5688 unittest.test("method--get", () { |
5650 | 5689 |
5651 var mock = new common_test.HttpServerMock(); | 5690 var mock = new HttpServerMock(); |
5652 api.UsersPhotosResourceApi res = new api.AdminApi(mock).users.photos; | 5691 api.UsersPhotosResourceApi res = new api.AdminApi(mock).users.photos; |
5653 var arg_userKey = "foo"; | 5692 var arg_userKey = "foo"; |
5654 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 5693 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
5655 var path = (req.url).path; | 5694 var path = (req.url).path; |
5656 var pathOffset = 0; | 5695 var pathOffset = 0; |
5657 var index; | 5696 var index; |
5658 var subPart; | 5697 var subPart; |
5659 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 5698 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
5660 pathOffset += 1; | 5699 pathOffset += 1; |
5661 unittest.expect(path.substring(pathOffset, pathOffset + 19), unittest.eq
uals("admin/directory/v1/")); | 5700 unittest.expect(path.substring(pathOffset, pathOffset + 19), unittest.eq
uals("admin/directory/v1/")); |
(...skipping 23 matching lines...) Expand all Loading... |
5685 var keyvalue = part.split("="); | 5724 var keyvalue = part.split("="); |
5686 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 5725 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
5687 } | 5726 } |
5688 } | 5727 } |
5689 | 5728 |
5690 | 5729 |
5691 var h = { | 5730 var h = { |
5692 "content-type" : "application/json; charset=utf-8", | 5731 "content-type" : "application/json; charset=utf-8", |
5693 }; | 5732 }; |
5694 var resp = convert.JSON.encode(buildUserPhoto()); | 5733 var resp = convert.JSON.encode(buildUserPhoto()); |
5695 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 5734 return new async.Future.value(stringResponse(200, h, resp)); |
5696 }), true); | 5735 }), true); |
5697 res.get(arg_userKey).then(unittest.expectAsync(((api.UserPhoto response) { | 5736 res.get(arg_userKey).then(unittest.expectAsync(((api.UserPhoto response) { |
5698 checkUserPhoto(response); | 5737 checkUserPhoto(response); |
5699 }))); | 5738 }))); |
5700 }); | 5739 }); |
5701 | 5740 |
5702 unittest.test("method--patch", () { | 5741 unittest.test("method--patch", () { |
5703 | 5742 |
5704 var mock = new common_test.HttpServerMock(); | 5743 var mock = new HttpServerMock(); |
5705 api.UsersPhotosResourceApi res = new api.AdminApi(mock).users.photos; | 5744 api.UsersPhotosResourceApi res = new api.AdminApi(mock).users.photos; |
5706 var arg_request = buildUserPhoto(); | 5745 var arg_request = buildUserPhoto(); |
5707 var arg_userKey = "foo"; | 5746 var arg_userKey = "foo"; |
5708 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 5747 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
5709 var obj = new api.UserPhoto.fromJson(json); | 5748 var obj = new api.UserPhoto.fromJson(json); |
5710 checkUserPhoto(obj); | 5749 checkUserPhoto(obj); |
5711 | 5750 |
5712 var path = (req.url).path; | 5751 var path = (req.url).path; |
5713 var pathOffset = 0; | 5752 var pathOffset = 0; |
5714 var index; | 5753 var index; |
(...skipping 27 matching lines...) Expand all Loading... |
5742 var keyvalue = part.split("="); | 5781 var keyvalue = part.split("="); |
5743 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 5782 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
5744 } | 5783 } |
5745 } | 5784 } |
5746 | 5785 |
5747 | 5786 |
5748 var h = { | 5787 var h = { |
5749 "content-type" : "application/json; charset=utf-8", | 5788 "content-type" : "application/json; charset=utf-8", |
5750 }; | 5789 }; |
5751 var resp = convert.JSON.encode(buildUserPhoto()); | 5790 var resp = convert.JSON.encode(buildUserPhoto()); |
5752 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 5791 return new async.Future.value(stringResponse(200, h, resp)); |
5753 }), true); | 5792 }), true); |
5754 res.patch(arg_request, arg_userKey).then(unittest.expectAsync(((api.UserPh
oto response) { | 5793 res.patch(arg_request, arg_userKey).then(unittest.expectAsync(((api.UserPh
oto response) { |
5755 checkUserPhoto(response); | 5794 checkUserPhoto(response); |
5756 }))); | 5795 }))); |
5757 }); | 5796 }); |
5758 | 5797 |
5759 unittest.test("method--update", () { | 5798 unittest.test("method--update", () { |
5760 | 5799 |
5761 var mock = new common_test.HttpServerMock(); | 5800 var mock = new HttpServerMock(); |
5762 api.UsersPhotosResourceApi res = new api.AdminApi(mock).users.photos; | 5801 api.UsersPhotosResourceApi res = new api.AdminApi(mock).users.photos; |
5763 var arg_request = buildUserPhoto(); | 5802 var arg_request = buildUserPhoto(); |
5764 var arg_userKey = "foo"; | 5803 var arg_userKey = "foo"; |
5765 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 5804 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
5766 var obj = new api.UserPhoto.fromJson(json); | 5805 var obj = new api.UserPhoto.fromJson(json); |
5767 checkUserPhoto(obj); | 5806 checkUserPhoto(obj); |
5768 | 5807 |
5769 var path = (req.url).path; | 5808 var path = (req.url).path; |
5770 var pathOffset = 0; | 5809 var pathOffset = 0; |
5771 var index; | 5810 var index; |
(...skipping 27 matching lines...) Expand all Loading... |
5799 var keyvalue = part.split("="); | 5838 var keyvalue = part.split("="); |
5800 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 5839 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
5801 } | 5840 } |
5802 } | 5841 } |
5803 | 5842 |
5804 | 5843 |
5805 var h = { | 5844 var h = { |
5806 "content-type" : "application/json; charset=utf-8", | 5845 "content-type" : "application/json; charset=utf-8", |
5807 }; | 5846 }; |
5808 var resp = convert.JSON.encode(buildUserPhoto()); | 5847 var resp = convert.JSON.encode(buildUserPhoto()); |
5809 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 5848 return new async.Future.value(stringResponse(200, h, resp)); |
5810 }), true); | 5849 }), true); |
5811 res.update(arg_request, arg_userKey).then(unittest.expectAsync(((api.UserP
hoto response) { | 5850 res.update(arg_request, arg_userKey).then(unittest.expectAsync(((api.UserP
hoto response) { |
5812 checkUserPhoto(response); | 5851 checkUserPhoto(response); |
5813 }))); | 5852 }))); |
5814 }); | 5853 }); |
5815 | 5854 |
5816 }); | 5855 }); |
5817 | 5856 |
5818 | 5857 |
5819 unittest.group("resource-VerificationCodesResourceApi", () { | 5858 unittest.group("resource-VerificationCodesResourceApi", () { |
5820 unittest.test("method--generate", () { | 5859 unittest.test("method--generate", () { |
5821 | 5860 |
5822 var mock = new common_test.HttpServerMock(); | 5861 var mock = new HttpServerMock(); |
5823 api.VerificationCodesResourceApi res = new api.AdminApi(mock).verification
Codes; | 5862 api.VerificationCodesResourceApi res = new api.AdminApi(mock).verification
Codes; |
5824 var arg_userKey = "foo"; | 5863 var arg_userKey = "foo"; |
5825 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 5864 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
5826 var path = (req.url).path; | 5865 var path = (req.url).path; |
5827 var pathOffset = 0; | 5866 var pathOffset = 0; |
5828 var index; | 5867 var index; |
5829 var subPart; | 5868 var subPart; |
5830 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 5869 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
5831 pathOffset += 1; | 5870 pathOffset += 1; |
5832 unittest.expect(path.substring(pathOffset, pathOffset + 19), unittest.eq
uals("admin/directory/v1/")); | 5871 unittest.expect(path.substring(pathOffset, pathOffset + 19), unittest.eq
uals("admin/directory/v1/")); |
(...skipping 23 matching lines...) Expand all Loading... |
5856 var keyvalue = part.split("="); | 5895 var keyvalue = part.split("="); |
5857 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 5896 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
5858 } | 5897 } |
5859 } | 5898 } |
5860 | 5899 |
5861 | 5900 |
5862 var h = { | 5901 var h = { |
5863 "content-type" : "application/json; charset=utf-8", | 5902 "content-type" : "application/json; charset=utf-8", |
5864 }; | 5903 }; |
5865 var resp = ""; | 5904 var resp = ""; |
5866 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 5905 return new async.Future.value(stringResponse(200, h, resp)); |
5867 }), true); | 5906 }), true); |
5868 res.generate(arg_userKey).then(unittest.expectAsync((_) {})); | 5907 res.generate(arg_userKey).then(unittest.expectAsync((_) {})); |
5869 }); | 5908 }); |
5870 | 5909 |
5871 unittest.test("method--invalidate", () { | 5910 unittest.test("method--invalidate", () { |
5872 | 5911 |
5873 var mock = new common_test.HttpServerMock(); | 5912 var mock = new HttpServerMock(); |
5874 api.VerificationCodesResourceApi res = new api.AdminApi(mock).verification
Codes; | 5913 api.VerificationCodesResourceApi res = new api.AdminApi(mock).verification
Codes; |
5875 var arg_userKey = "foo"; | 5914 var arg_userKey = "foo"; |
5876 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 5915 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
5877 var path = (req.url).path; | 5916 var path = (req.url).path; |
5878 var pathOffset = 0; | 5917 var pathOffset = 0; |
5879 var index; | 5918 var index; |
5880 var subPart; | 5919 var subPart; |
5881 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 5920 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
5882 pathOffset += 1; | 5921 pathOffset += 1; |
5883 unittest.expect(path.substring(pathOffset, pathOffset + 19), unittest.eq
uals("admin/directory/v1/")); | 5922 unittest.expect(path.substring(pathOffset, pathOffset + 19), unittest.eq
uals("admin/directory/v1/")); |
(...skipping 23 matching lines...) Expand all Loading... |
5907 var keyvalue = part.split("="); | 5946 var keyvalue = part.split("="); |
5908 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 5947 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
5909 } | 5948 } |
5910 } | 5949 } |
5911 | 5950 |
5912 | 5951 |
5913 var h = { | 5952 var h = { |
5914 "content-type" : "application/json; charset=utf-8", | 5953 "content-type" : "application/json; charset=utf-8", |
5915 }; | 5954 }; |
5916 var resp = ""; | 5955 var resp = ""; |
5917 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 5956 return new async.Future.value(stringResponse(200, h, resp)); |
5918 }), true); | 5957 }), true); |
5919 res.invalidate(arg_userKey).then(unittest.expectAsync((_) {})); | 5958 res.invalidate(arg_userKey).then(unittest.expectAsync((_) {})); |
5920 }); | 5959 }); |
5921 | 5960 |
5922 unittest.test("method--list", () { | 5961 unittest.test("method--list", () { |
5923 | 5962 |
5924 var mock = new common_test.HttpServerMock(); | 5963 var mock = new HttpServerMock(); |
5925 api.VerificationCodesResourceApi res = new api.AdminApi(mock).verification
Codes; | 5964 api.VerificationCodesResourceApi res = new api.AdminApi(mock).verification
Codes; |
5926 var arg_userKey = "foo"; | 5965 var arg_userKey = "foo"; |
5927 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 5966 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
5928 var path = (req.url).path; | 5967 var path = (req.url).path; |
5929 var pathOffset = 0; | 5968 var pathOffset = 0; |
5930 var index; | 5969 var index; |
5931 var subPart; | 5970 var subPart; |
5932 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 5971 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
5933 pathOffset += 1; | 5972 pathOffset += 1; |
5934 unittest.expect(path.substring(pathOffset, pathOffset + 19), unittest.eq
uals("admin/directory/v1/")); | 5973 unittest.expect(path.substring(pathOffset, pathOffset + 19), unittest.eq
uals("admin/directory/v1/")); |
(...skipping 23 matching lines...) Expand all Loading... |
5958 var keyvalue = part.split("="); | 5997 var keyvalue = part.split("="); |
5959 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 5998 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
5960 } | 5999 } |
5961 } | 6000 } |
5962 | 6001 |
5963 | 6002 |
5964 var h = { | 6003 var h = { |
5965 "content-type" : "application/json; charset=utf-8", | 6004 "content-type" : "application/json; charset=utf-8", |
5966 }; | 6005 }; |
5967 var resp = convert.JSON.encode(buildVerificationCodes()); | 6006 var resp = convert.JSON.encode(buildVerificationCodes()); |
5968 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 6007 return new async.Future.value(stringResponse(200, h, resp)); |
5969 }), true); | 6008 }), true); |
5970 res.list(arg_userKey).then(unittest.expectAsync(((api.VerificationCodes re
sponse) { | 6009 res.list(arg_userKey).then(unittest.expectAsync(((api.VerificationCodes re
sponse) { |
5971 checkVerificationCodes(response); | 6010 checkVerificationCodes(response); |
5972 }))); | 6011 }))); |
5973 }); | 6012 }); |
5974 | 6013 |
5975 }); | 6014 }); |
5976 | 6015 |
5977 | 6016 |
5978 } | 6017 } |
5979 | 6018 |
OLD | NEW |