Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(905)

Side by Side Diff: generated/googleapis/test/androidenterprise/v1_test.dart

Issue 2159673002: Api-roll 39: 2016-07-18 (Closed) Base URL: git@github.com:dart-lang/googleapis.git@master
Patch Set: Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 library googleapis.androidenterprise.v1.test; 1 library googleapis.androidenterprise.v1.test;
2 2
3 import "dart:core" as core; 3 import "dart:core" as core;
4 import "dart:collection" as collection; 4 import "dart:collection" as collection;
5 import "dart:async" as async; 5 import "dart:async" as async;
6 import "dart:convert" as convert; 6 import "dart:convert" as convert;
7 7
8 import 'package:http/http.dart' as http; 8 import 'package:http/http.dart' as http;
9 import 'package:http/testing.dart' as http_testing; 9 import 'package:http/testing.dart' as http_testing;
10 import 'package:unittest/unittest.dart' as unittest; 10 import 'package:unittest/unittest.dart' as unittest;
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 } 44 }
45 } 45 }
46 } 46 }
47 47
48 http.StreamedResponse stringResponse( 48 http.StreamedResponse stringResponse(
49 core.int status, core.Map headers, core.String body) { 49 core.int status, core.Map headers, core.String body) {
50 var stream = new async.Stream.fromIterable([convert.UTF8.encode(body)]); 50 var stream = new async.Stream.fromIterable([convert.UTF8.encode(body)]);
51 return new http.StreamedResponse(stream, status, headers: headers); 51 return new http.StreamedResponse(stream, status, headers: headers);
52 } 52 }
53 53
54 buildUnnamed395() { 54 core.int buildCounterAdministrator = 0;
55 buildAdministrator() {
56 var o = new api.Administrator();
57 buildCounterAdministrator++;
58 if (buildCounterAdministrator < 3) {
59 o.email = "foo";
60 }
61 buildCounterAdministrator--;
62 return o;
63 }
64
65 checkAdministrator(api.Administrator o) {
66 buildCounterAdministrator++;
67 if (buildCounterAdministrator < 3) {
68 unittest.expect(o.email, unittest.equals('foo'));
69 }
70 buildCounterAdministrator--;
71 }
72
73 buildUnnamed2226() {
55 var o = new core.List<api.AppRestrictionsSchemaRestriction>(); 74 var o = new core.List<api.AppRestrictionsSchemaRestriction>();
56 o.add(buildAppRestrictionsSchemaRestriction()); 75 o.add(buildAppRestrictionsSchemaRestriction());
57 o.add(buildAppRestrictionsSchemaRestriction()); 76 o.add(buildAppRestrictionsSchemaRestriction());
58 return o; 77 return o;
59 } 78 }
60 79
61 checkUnnamed395(core.List<api.AppRestrictionsSchemaRestriction> o) { 80 checkUnnamed2226(core.List<api.AppRestrictionsSchemaRestriction> o) {
62 unittest.expect(o, unittest.hasLength(2)); 81 unittest.expect(o, unittest.hasLength(2));
63 checkAppRestrictionsSchemaRestriction(o[0]); 82 checkAppRestrictionsSchemaRestriction(o[0]);
64 checkAppRestrictionsSchemaRestriction(o[1]); 83 checkAppRestrictionsSchemaRestriction(o[1]);
65 } 84 }
66 85
67 core.int buildCounterAppRestrictionsSchema = 0; 86 core.int buildCounterAppRestrictionsSchema = 0;
68 buildAppRestrictionsSchema() { 87 buildAppRestrictionsSchema() {
69 var o = new api.AppRestrictionsSchema(); 88 var o = new api.AppRestrictionsSchema();
70 buildCounterAppRestrictionsSchema++; 89 buildCounterAppRestrictionsSchema++;
71 if (buildCounterAppRestrictionsSchema < 3) { 90 if (buildCounterAppRestrictionsSchema < 3) {
72 o.kind = "foo"; 91 o.kind = "foo";
73 o.restrictions = buildUnnamed395(); 92 o.restrictions = buildUnnamed2226();
74 } 93 }
75 buildCounterAppRestrictionsSchema--; 94 buildCounterAppRestrictionsSchema--;
76 return o; 95 return o;
77 } 96 }
78 97
79 checkAppRestrictionsSchema(api.AppRestrictionsSchema o) { 98 checkAppRestrictionsSchema(api.AppRestrictionsSchema o) {
80 buildCounterAppRestrictionsSchema++; 99 buildCounterAppRestrictionsSchema++;
81 if (buildCounterAppRestrictionsSchema < 3) { 100 if (buildCounterAppRestrictionsSchema < 3) {
82 unittest.expect(o.kind, unittest.equals('foo')); 101 unittest.expect(o.kind, unittest.equals('foo'));
83 checkUnnamed395(o.restrictions); 102 checkUnnamed2226(o.restrictions);
84 } 103 }
85 buildCounterAppRestrictionsSchema--; 104 buildCounterAppRestrictionsSchema--;
86 } 105 }
87 106
88 buildUnnamed396() { 107 core.int buildCounterAppRestrictionsSchemaChangeEvent = 0;
108 buildAppRestrictionsSchemaChangeEvent() {
109 var o = new api.AppRestrictionsSchemaChangeEvent();
110 buildCounterAppRestrictionsSchemaChangeEvent++;
111 if (buildCounterAppRestrictionsSchemaChangeEvent < 3) {
112 o.productId = "foo";
113 }
114 buildCounterAppRestrictionsSchemaChangeEvent--;
115 return o;
116 }
117
118 checkAppRestrictionsSchemaChangeEvent(api.AppRestrictionsSchemaChangeEvent o) {
119 buildCounterAppRestrictionsSchemaChangeEvent++;
120 if (buildCounterAppRestrictionsSchemaChangeEvent < 3) {
121 unittest.expect(o.productId, unittest.equals('foo'));
122 }
123 buildCounterAppRestrictionsSchemaChangeEvent--;
124 }
125
126 buildUnnamed2227() {
89 var o = new core.List<core.String>(); 127 var o = new core.List<core.String>();
90 o.add("foo"); 128 o.add("foo");
91 o.add("foo"); 129 o.add("foo");
92 return o; 130 return o;
93 } 131 }
94 132
95 checkUnnamed396(core.List<core.String> o) { 133 checkUnnamed2227(core.List<core.String> o) {
96 unittest.expect(o, unittest.hasLength(2)); 134 unittest.expect(o, unittest.hasLength(2));
97 unittest.expect(o[0], unittest.equals('foo')); 135 unittest.expect(o[0], unittest.equals('foo'));
98 unittest.expect(o[1], unittest.equals('foo')); 136 unittest.expect(o[1], unittest.equals('foo'));
99 } 137 }
100 138
101 buildUnnamed397() { 139 buildUnnamed2228() {
102 var o = new core.List<core.String>(); 140 var o = new core.List<core.String>();
103 o.add("foo"); 141 o.add("foo");
104 o.add("foo"); 142 o.add("foo");
105 return o; 143 return o;
106 } 144 }
107 145
108 checkUnnamed397(core.List<core.String> o) { 146 checkUnnamed2228(core.List<core.String> o) {
109 unittest.expect(o, unittest.hasLength(2)); 147 unittest.expect(o, unittest.hasLength(2));
110 unittest.expect(o[0], unittest.equals('foo')); 148 unittest.expect(o[0], unittest.equals('foo'));
111 unittest.expect(o[1], unittest.equals('foo')); 149 unittest.expect(o[1], unittest.equals('foo'));
112 } 150 }
113 151
114 core.int buildCounterAppRestrictionsSchemaRestriction = 0; 152 core.int buildCounterAppRestrictionsSchemaRestriction = 0;
115 buildAppRestrictionsSchemaRestriction() { 153 buildAppRestrictionsSchemaRestriction() {
116 var o = new api.AppRestrictionsSchemaRestriction(); 154 var o = new api.AppRestrictionsSchemaRestriction();
117 buildCounterAppRestrictionsSchemaRestriction++; 155 buildCounterAppRestrictionsSchemaRestriction++;
118 if (buildCounterAppRestrictionsSchemaRestriction < 3) { 156 if (buildCounterAppRestrictionsSchemaRestriction < 3) {
119 o.defaultValue = buildAppRestrictionsSchemaRestrictionRestrictionValue(); 157 o.defaultValue = buildAppRestrictionsSchemaRestrictionRestrictionValue();
120 o.description = "foo"; 158 o.description = "foo";
121 o.entry = buildUnnamed396(); 159 o.entry = buildUnnamed2227();
122 o.entryValue = buildUnnamed397(); 160 o.entryValue = buildUnnamed2228();
123 o.key = "foo"; 161 o.key = "foo";
124 o.restrictionType = "foo"; 162 o.restrictionType = "foo";
125 o.title = "foo"; 163 o.title = "foo";
126 } 164 }
127 buildCounterAppRestrictionsSchemaRestriction--; 165 buildCounterAppRestrictionsSchemaRestriction--;
128 return o; 166 return o;
129 } 167 }
130 168
131 checkAppRestrictionsSchemaRestriction(api.AppRestrictionsSchemaRestriction o) { 169 checkAppRestrictionsSchemaRestriction(api.AppRestrictionsSchemaRestriction o) {
132 buildCounterAppRestrictionsSchemaRestriction++; 170 buildCounterAppRestrictionsSchemaRestriction++;
133 if (buildCounterAppRestrictionsSchemaRestriction < 3) { 171 if (buildCounterAppRestrictionsSchemaRestriction < 3) {
134 checkAppRestrictionsSchemaRestrictionRestrictionValue(o.defaultValue); 172 checkAppRestrictionsSchemaRestrictionRestrictionValue(o.defaultValue);
135 unittest.expect(o.description, unittest.equals('foo')); 173 unittest.expect(o.description, unittest.equals('foo'));
136 checkUnnamed396(o.entry); 174 checkUnnamed2227(o.entry);
137 checkUnnamed397(o.entryValue); 175 checkUnnamed2228(o.entryValue);
138 unittest.expect(o.key, unittest.equals('foo')); 176 unittest.expect(o.key, unittest.equals('foo'));
139 unittest.expect(o.restrictionType, unittest.equals('foo')); 177 unittest.expect(o.restrictionType, unittest.equals('foo'));
140 unittest.expect(o.title, unittest.equals('foo')); 178 unittest.expect(o.title, unittest.equals('foo'));
141 } 179 }
142 buildCounterAppRestrictionsSchemaRestriction--; 180 buildCounterAppRestrictionsSchemaRestriction--;
143 } 181 }
144 182
145 buildUnnamed398() { 183 buildUnnamed2229() {
146 var o = new core.List<core.String>(); 184 var o = new core.List<core.String>();
147 o.add("foo"); 185 o.add("foo");
148 o.add("foo"); 186 o.add("foo");
149 return o; 187 return o;
150 } 188 }
151 189
152 checkUnnamed398(core.List<core.String> o) { 190 checkUnnamed2229(core.List<core.String> o) {
153 unittest.expect(o, unittest.hasLength(2)); 191 unittest.expect(o, unittest.hasLength(2));
154 unittest.expect(o[0], unittest.equals('foo')); 192 unittest.expect(o[0], unittest.equals('foo'));
155 unittest.expect(o[1], unittest.equals('foo')); 193 unittest.expect(o[1], unittest.equals('foo'));
156 } 194 }
157 195
158 core.int buildCounterAppRestrictionsSchemaRestrictionRestrictionValue = 0; 196 core.int buildCounterAppRestrictionsSchemaRestrictionRestrictionValue = 0;
159 buildAppRestrictionsSchemaRestrictionRestrictionValue() { 197 buildAppRestrictionsSchemaRestrictionRestrictionValue() {
160 var o = new api.AppRestrictionsSchemaRestrictionRestrictionValue(); 198 var o = new api.AppRestrictionsSchemaRestrictionRestrictionValue();
161 buildCounterAppRestrictionsSchemaRestrictionRestrictionValue++; 199 buildCounterAppRestrictionsSchemaRestrictionRestrictionValue++;
162 if (buildCounterAppRestrictionsSchemaRestrictionRestrictionValue < 3) { 200 if (buildCounterAppRestrictionsSchemaRestrictionRestrictionValue < 3) {
163 o.type = "foo"; 201 o.type = "foo";
164 o.valueBool = true; 202 o.valueBool = true;
165 o.valueInteger = 42; 203 o.valueInteger = 42;
166 o.valueMultiselect = buildUnnamed398(); 204 o.valueMultiselect = buildUnnamed2229();
167 o.valueString = "foo"; 205 o.valueString = "foo";
168 } 206 }
169 buildCounterAppRestrictionsSchemaRestrictionRestrictionValue--; 207 buildCounterAppRestrictionsSchemaRestrictionRestrictionValue--;
170 return o; 208 return o;
171 } 209 }
172 210
173 checkAppRestrictionsSchemaRestrictionRestrictionValue(api.AppRestrictionsSchemaR estrictionRestrictionValue o) { 211 checkAppRestrictionsSchemaRestrictionRestrictionValue(api.AppRestrictionsSchemaR estrictionRestrictionValue o) {
174 buildCounterAppRestrictionsSchemaRestrictionRestrictionValue++; 212 buildCounterAppRestrictionsSchemaRestrictionRestrictionValue++;
175 if (buildCounterAppRestrictionsSchemaRestrictionRestrictionValue < 3) { 213 if (buildCounterAppRestrictionsSchemaRestrictionRestrictionValue < 3) {
176 unittest.expect(o.type, unittest.equals('foo')); 214 unittest.expect(o.type, unittest.equals('foo'));
177 unittest.expect(o.valueBool, unittest.isTrue); 215 unittest.expect(o.valueBool, unittest.isTrue);
178 unittest.expect(o.valueInteger, unittest.equals(42)); 216 unittest.expect(o.valueInteger, unittest.equals(42));
179 checkUnnamed398(o.valueMultiselect); 217 checkUnnamed2229(o.valueMultiselect);
180 unittest.expect(o.valueString, unittest.equals('foo')); 218 unittest.expect(o.valueString, unittest.equals('foo'));
181 } 219 }
182 buildCounterAppRestrictionsSchemaRestrictionRestrictionValue--; 220 buildCounterAppRestrictionsSchemaRestrictionRestrictionValue--;
183 } 221 }
184 222
223 core.int buildCounterAppUpdateEvent = 0;
224 buildAppUpdateEvent() {
225 var o = new api.AppUpdateEvent();
226 buildCounterAppUpdateEvent++;
227 if (buildCounterAppUpdateEvent < 3) {
228 o.productId = "foo";
229 }
230 buildCounterAppUpdateEvent--;
231 return o;
232 }
233
234 checkAppUpdateEvent(api.AppUpdateEvent o) {
235 buildCounterAppUpdateEvent++;
236 if (buildCounterAppUpdateEvent < 3) {
237 unittest.expect(o.productId, unittest.equals('foo'));
238 }
239 buildCounterAppUpdateEvent--;
240 }
241
185 core.int buildCounterAppVersion = 0; 242 core.int buildCounterAppVersion = 0;
186 buildAppVersion() { 243 buildAppVersion() {
187 var o = new api.AppVersion(); 244 var o = new api.AppVersion();
188 buildCounterAppVersion++; 245 buildCounterAppVersion++;
189 if (buildCounterAppVersion < 3) { 246 if (buildCounterAppVersion < 3) {
190 o.versionCode = 42; 247 o.versionCode = 42;
191 o.versionString = "foo"; 248 o.versionString = "foo";
192 } 249 }
193 buildCounterAppVersion--; 250 buildCounterAppVersion--;
194 return o; 251 return o;
(...skipping 22 matching lines...) Expand all
217 274
218 checkApprovalUrlInfo(api.ApprovalUrlInfo o) { 275 checkApprovalUrlInfo(api.ApprovalUrlInfo o) {
219 buildCounterApprovalUrlInfo++; 276 buildCounterApprovalUrlInfo++;
220 if (buildCounterApprovalUrlInfo < 3) { 277 if (buildCounterApprovalUrlInfo < 3) {
221 unittest.expect(o.approvalUrl, unittest.equals('foo')); 278 unittest.expect(o.approvalUrl, unittest.equals('foo'));
222 unittest.expect(o.kind, unittest.equals('foo')); 279 unittest.expect(o.kind, unittest.equals('foo'));
223 } 280 }
224 buildCounterApprovalUrlInfo--; 281 buildCounterApprovalUrlInfo--;
225 } 282 }
226 283
227 buildUnnamed399() { 284 core.int buildCounterAuthenticationToken = 0;
285 buildAuthenticationToken() {
286 var o = new api.AuthenticationToken();
287 buildCounterAuthenticationToken++;
288 if (buildCounterAuthenticationToken < 3) {
289 o.kind = "foo";
290 o.token = "foo";
291 }
292 buildCounterAuthenticationToken--;
293 return o;
294 }
295
296 checkAuthenticationToken(api.AuthenticationToken o) {
297 buildCounterAuthenticationToken++;
298 if (buildCounterAuthenticationToken < 3) {
299 unittest.expect(o.kind, unittest.equals('foo'));
300 unittest.expect(o.token, unittest.equals('foo'));
301 }
302 buildCounterAuthenticationToken--;
303 }
304
305 buildUnnamed2230() {
228 var o = new core.List<core.String>(); 306 var o = new core.List<core.String>();
229 o.add("foo"); 307 o.add("foo");
230 o.add("foo"); 308 o.add("foo");
231 return o; 309 return o;
232 } 310 }
233 311
234 checkUnnamed399(core.List<core.String> o) { 312 checkUnnamed2230(core.List<core.String> o) {
235 unittest.expect(o, unittest.hasLength(2)); 313 unittest.expect(o, unittest.hasLength(2));
236 unittest.expect(o[0], unittest.equals('foo')); 314 unittest.expect(o[0], unittest.equals('foo'));
237 unittest.expect(o[1], unittest.equals('foo')); 315 unittest.expect(o[1], unittest.equals('foo'));
238 } 316 }
239 317
240 core.int buildCounterCollection = 0; 318 core.int buildCounterCollection = 0;
241 buildCollection() { 319 buildCollection() {
242 var o = new api.Collection(); 320 var o = new api.Collection();
243 buildCounterCollection++; 321 buildCounterCollection++;
244 if (buildCounterCollection < 3) { 322 if (buildCounterCollection < 3) {
245 o.collectionId = "foo"; 323 o.collectionId = "foo";
246 o.kind = "foo"; 324 o.kind = "foo";
247 o.name = "foo"; 325 o.name = "foo";
248 o.productId = buildUnnamed399(); 326 o.productId = buildUnnamed2230();
249 o.visibility = "foo"; 327 o.visibility = "foo";
250 } 328 }
251 buildCounterCollection--; 329 buildCounterCollection--;
252 return o; 330 return o;
253 } 331 }
254 332
255 checkCollection(api.Collection o) { 333 checkCollection(api.Collection o) {
256 buildCounterCollection++; 334 buildCounterCollection++;
257 if (buildCounterCollection < 3) { 335 if (buildCounterCollection < 3) {
258 unittest.expect(o.collectionId, unittest.equals('foo')); 336 unittest.expect(o.collectionId, unittest.equals('foo'));
259 unittest.expect(o.kind, unittest.equals('foo')); 337 unittest.expect(o.kind, unittest.equals('foo'));
260 unittest.expect(o.name, unittest.equals('foo')); 338 unittest.expect(o.name, unittest.equals('foo'));
261 checkUnnamed399(o.productId); 339 checkUnnamed2230(o.productId);
262 unittest.expect(o.visibility, unittest.equals('foo')); 340 unittest.expect(o.visibility, unittest.equals('foo'));
263 } 341 }
264 buildCounterCollection--; 342 buildCounterCollection--;
265 } 343 }
266 344
267 buildUnnamed400() { 345 buildUnnamed2231() {
268 var o = new core.List<api.User>(); 346 var o = new core.List<api.User>();
269 o.add(buildUser()); 347 o.add(buildUser());
270 o.add(buildUser()); 348 o.add(buildUser());
271 return o; 349 return o;
272 } 350 }
273 351
274 checkUnnamed400(core.List<api.User> o) { 352 checkUnnamed2231(core.List<api.User> o) {
275 unittest.expect(o, unittest.hasLength(2)); 353 unittest.expect(o, unittest.hasLength(2));
276 checkUser(o[0]); 354 checkUser(o[0]);
277 checkUser(o[1]); 355 checkUser(o[1]);
278 } 356 }
279 357
280 core.int buildCounterCollectionViewersListResponse = 0; 358 core.int buildCounterCollectionViewersListResponse = 0;
281 buildCollectionViewersListResponse() { 359 buildCollectionViewersListResponse() {
282 var o = new api.CollectionViewersListResponse(); 360 var o = new api.CollectionViewersListResponse();
283 buildCounterCollectionViewersListResponse++; 361 buildCounterCollectionViewersListResponse++;
284 if (buildCounterCollectionViewersListResponse < 3) { 362 if (buildCounterCollectionViewersListResponse < 3) {
285 o.kind = "foo"; 363 o.kind = "foo";
286 o.user = buildUnnamed400(); 364 o.user = buildUnnamed2231();
287 } 365 }
288 buildCounterCollectionViewersListResponse--; 366 buildCounterCollectionViewersListResponse--;
289 return o; 367 return o;
290 } 368 }
291 369
292 checkCollectionViewersListResponse(api.CollectionViewersListResponse o) { 370 checkCollectionViewersListResponse(api.CollectionViewersListResponse o) {
293 buildCounterCollectionViewersListResponse++; 371 buildCounterCollectionViewersListResponse++;
294 if (buildCounterCollectionViewersListResponse < 3) { 372 if (buildCounterCollectionViewersListResponse < 3) {
295 unittest.expect(o.kind, unittest.equals('foo')); 373 unittest.expect(o.kind, unittest.equals('foo'));
296 checkUnnamed400(o.user); 374 checkUnnamed2231(o.user);
297 } 375 }
298 buildCounterCollectionViewersListResponse--; 376 buildCounterCollectionViewersListResponse--;
299 } 377 }
300 378
301 buildUnnamed401() { 379 buildUnnamed2232() {
302 var o = new core.List<api.Collection>(); 380 var o = new core.List<api.Collection>();
303 o.add(buildCollection()); 381 o.add(buildCollection());
304 o.add(buildCollection()); 382 o.add(buildCollection());
305 return o; 383 return o;
306 } 384 }
307 385
308 checkUnnamed401(core.List<api.Collection> o) { 386 checkUnnamed2232(core.List<api.Collection> o) {
309 unittest.expect(o, unittest.hasLength(2)); 387 unittest.expect(o, unittest.hasLength(2));
310 checkCollection(o[0]); 388 checkCollection(o[0]);
311 checkCollection(o[1]); 389 checkCollection(o[1]);
312 } 390 }
313 391
314 core.int buildCounterCollectionsListResponse = 0; 392 core.int buildCounterCollectionsListResponse = 0;
315 buildCollectionsListResponse() { 393 buildCollectionsListResponse() {
316 var o = new api.CollectionsListResponse(); 394 var o = new api.CollectionsListResponse();
317 buildCounterCollectionsListResponse++; 395 buildCounterCollectionsListResponse++;
318 if (buildCounterCollectionsListResponse < 3) { 396 if (buildCounterCollectionsListResponse < 3) {
319 o.collection = buildUnnamed401(); 397 o.collection = buildUnnamed2232();
320 o.kind = "foo"; 398 o.kind = "foo";
321 } 399 }
322 buildCounterCollectionsListResponse--; 400 buildCounterCollectionsListResponse--;
323 return o; 401 return o;
324 } 402 }
325 403
326 checkCollectionsListResponse(api.CollectionsListResponse o) { 404 checkCollectionsListResponse(api.CollectionsListResponse o) {
327 buildCounterCollectionsListResponse++; 405 buildCounterCollectionsListResponse++;
328 if (buildCounterCollectionsListResponse < 3) { 406 if (buildCounterCollectionsListResponse < 3) {
329 checkUnnamed401(o.collection); 407 checkUnnamed2232(o.collection);
330 unittest.expect(o.kind, unittest.equals('foo')); 408 unittest.expect(o.kind, unittest.equals('foo'));
331 } 409 }
332 buildCounterCollectionsListResponse--; 410 buildCounterCollectionsListResponse--;
333 } 411 }
334 412
335 core.int buildCounterDevice = 0; 413 core.int buildCounterDevice = 0;
336 buildDevice() { 414 buildDevice() {
337 var o = new api.Device(); 415 var o = new api.Device();
338 buildCounterDevice++; 416 buildCounterDevice++;
339 if (buildCounterDevice < 3) { 417 if (buildCounterDevice < 3) {
(...skipping 29 matching lines...) Expand all
369 447
370 checkDeviceState(api.DeviceState o) { 448 checkDeviceState(api.DeviceState o) {
371 buildCounterDeviceState++; 449 buildCounterDeviceState++;
372 if (buildCounterDeviceState < 3) { 450 if (buildCounterDeviceState < 3) {
373 unittest.expect(o.accountState, unittest.equals('foo')); 451 unittest.expect(o.accountState, unittest.equals('foo'));
374 unittest.expect(o.kind, unittest.equals('foo')); 452 unittest.expect(o.kind, unittest.equals('foo'));
375 } 453 }
376 buildCounterDeviceState--; 454 buildCounterDeviceState--;
377 } 455 }
378 456
379 buildUnnamed402() { 457 buildUnnamed2233() {
380 var o = new core.List<api.Device>(); 458 var o = new core.List<api.Device>();
381 o.add(buildDevice()); 459 o.add(buildDevice());
382 o.add(buildDevice()); 460 o.add(buildDevice());
383 return o; 461 return o;
384 } 462 }
385 463
386 checkUnnamed402(core.List<api.Device> o) { 464 checkUnnamed2233(core.List<api.Device> o) {
387 unittest.expect(o, unittest.hasLength(2)); 465 unittest.expect(o, unittest.hasLength(2));
388 checkDevice(o[0]); 466 checkDevice(o[0]);
389 checkDevice(o[1]); 467 checkDevice(o[1]);
390 } 468 }
391 469
392 core.int buildCounterDevicesListResponse = 0; 470 core.int buildCounterDevicesListResponse = 0;
393 buildDevicesListResponse() { 471 buildDevicesListResponse() {
394 var o = new api.DevicesListResponse(); 472 var o = new api.DevicesListResponse();
395 buildCounterDevicesListResponse++; 473 buildCounterDevicesListResponse++;
396 if (buildCounterDevicesListResponse < 3) { 474 if (buildCounterDevicesListResponse < 3) {
397 o.device = buildUnnamed402(); 475 o.device = buildUnnamed2233();
398 o.kind = "foo"; 476 o.kind = "foo";
399 } 477 }
400 buildCounterDevicesListResponse--; 478 buildCounterDevicesListResponse--;
401 return o; 479 return o;
402 } 480 }
403 481
404 checkDevicesListResponse(api.DevicesListResponse o) { 482 checkDevicesListResponse(api.DevicesListResponse o) {
405 buildCounterDevicesListResponse++; 483 buildCounterDevicesListResponse++;
406 if (buildCounterDevicesListResponse < 3) { 484 if (buildCounterDevicesListResponse < 3) {
407 checkUnnamed402(o.device); 485 checkUnnamed2233(o.device);
408 unittest.expect(o.kind, unittest.equals('foo')); 486 unittest.expect(o.kind, unittest.equals('foo'));
409 } 487 }
410 buildCounterDevicesListResponse--; 488 buildCounterDevicesListResponse--;
411 } 489 }
412 490
491 buildUnnamed2234() {
492 var o = new core.List<api.Administrator>();
493 o.add(buildAdministrator());
494 o.add(buildAdministrator());
495 return o;
496 }
497
498 checkUnnamed2234(core.List<api.Administrator> o) {
499 unittest.expect(o, unittest.hasLength(2));
500 checkAdministrator(o[0]);
501 checkAdministrator(o[1]);
502 }
503
413 core.int buildCounterEnterprise = 0; 504 core.int buildCounterEnterprise = 0;
414 buildEnterprise() { 505 buildEnterprise() {
415 var o = new api.Enterprise(); 506 var o = new api.Enterprise();
416 buildCounterEnterprise++; 507 buildCounterEnterprise++;
417 if (buildCounterEnterprise < 3) { 508 if (buildCounterEnterprise < 3) {
509 o.administrator = buildUnnamed2234();
418 o.id = "foo"; 510 o.id = "foo";
419 o.kind = "foo"; 511 o.kind = "foo";
420 o.name = "foo"; 512 o.name = "foo";
421 o.primaryDomain = "foo"; 513 o.primaryDomain = "foo";
422 } 514 }
423 buildCounterEnterprise--; 515 buildCounterEnterprise--;
424 return o; 516 return o;
425 } 517 }
426 518
427 checkEnterprise(api.Enterprise o) { 519 checkEnterprise(api.Enterprise o) {
428 buildCounterEnterprise++; 520 buildCounterEnterprise++;
429 if (buildCounterEnterprise < 3) { 521 if (buildCounterEnterprise < 3) {
522 checkUnnamed2234(o.administrator);
430 unittest.expect(o.id, unittest.equals('foo')); 523 unittest.expect(o.id, unittest.equals('foo'));
431 unittest.expect(o.kind, unittest.equals('foo')); 524 unittest.expect(o.kind, unittest.equals('foo'));
432 unittest.expect(o.name, unittest.equals('foo')); 525 unittest.expect(o.name, unittest.equals('foo'));
433 unittest.expect(o.primaryDomain, unittest.equals('foo')); 526 unittest.expect(o.primaryDomain, unittest.equals('foo'));
434 } 527 }
435 buildCounterEnterprise--; 528 buildCounterEnterprise--;
436 } 529 }
437 530
438 core.int buildCounterEnterpriseAccount = 0; 531 core.int buildCounterEnterpriseAccount = 0;
439 buildEnterpriseAccount() { 532 buildEnterpriseAccount() {
440 var o = new api.EnterpriseAccount(); 533 var o = new api.EnterpriseAccount();
441 buildCounterEnterpriseAccount++; 534 buildCounterEnterpriseAccount++;
442 if (buildCounterEnterpriseAccount < 3) { 535 if (buildCounterEnterpriseAccount < 3) {
443 o.accountEmail = "foo"; 536 o.accountEmail = "foo";
444 o.kind = "foo"; 537 o.kind = "foo";
445 } 538 }
446 buildCounterEnterpriseAccount--; 539 buildCounterEnterpriseAccount--;
447 return o; 540 return o;
448 } 541 }
449 542
450 checkEnterpriseAccount(api.EnterpriseAccount o) { 543 checkEnterpriseAccount(api.EnterpriseAccount o) {
451 buildCounterEnterpriseAccount++; 544 buildCounterEnterpriseAccount++;
452 if (buildCounterEnterpriseAccount < 3) { 545 if (buildCounterEnterpriseAccount < 3) {
453 unittest.expect(o.accountEmail, unittest.equals('foo')); 546 unittest.expect(o.accountEmail, unittest.equals('foo'));
454 unittest.expect(o.kind, unittest.equals('foo')); 547 unittest.expect(o.kind, unittest.equals('foo'));
455 } 548 }
456 buildCounterEnterpriseAccount--; 549 buildCounterEnterpriseAccount--;
457 } 550 }
458 551
459 buildUnnamed403() { 552 buildUnnamed2235() {
460 var o = new core.List<api.Enterprise>(); 553 var o = new core.List<api.Enterprise>();
461 o.add(buildEnterprise()); 554 o.add(buildEnterprise());
462 o.add(buildEnterprise()); 555 o.add(buildEnterprise());
463 return o; 556 return o;
464 } 557 }
465 558
466 checkUnnamed403(core.List<api.Enterprise> o) { 559 checkUnnamed2235(core.List<api.Enterprise> o) {
467 unittest.expect(o, unittest.hasLength(2)); 560 unittest.expect(o, unittest.hasLength(2));
468 checkEnterprise(o[0]); 561 checkEnterprise(o[0]);
469 checkEnterprise(o[1]); 562 checkEnterprise(o[1]);
470 } 563 }
471 564
472 core.int buildCounterEnterprisesListResponse = 0; 565 core.int buildCounterEnterprisesListResponse = 0;
473 buildEnterprisesListResponse() { 566 buildEnterprisesListResponse() {
474 var o = new api.EnterprisesListResponse(); 567 var o = new api.EnterprisesListResponse();
475 buildCounterEnterprisesListResponse++; 568 buildCounterEnterprisesListResponse++;
476 if (buildCounterEnterprisesListResponse < 3) { 569 if (buildCounterEnterprisesListResponse < 3) {
477 o.enterprise = buildUnnamed403(); 570 o.enterprise = buildUnnamed2235();
478 o.kind = "foo"; 571 o.kind = "foo";
479 } 572 }
480 buildCounterEnterprisesListResponse--; 573 buildCounterEnterprisesListResponse--;
481 return o; 574 return o;
482 } 575 }
483 576
484 checkEnterprisesListResponse(api.EnterprisesListResponse o) { 577 checkEnterprisesListResponse(api.EnterprisesListResponse o) {
485 buildCounterEnterprisesListResponse++; 578 buildCounterEnterprisesListResponse++;
486 if (buildCounterEnterprisesListResponse < 3) { 579 if (buildCounterEnterprisesListResponse < 3) {
487 checkUnnamed403(o.enterprise); 580 checkUnnamed2235(o.enterprise);
488 unittest.expect(o.kind, unittest.equals('foo')); 581 unittest.expect(o.kind, unittest.equals('foo'));
489 } 582 }
490 buildCounterEnterprisesListResponse--; 583 buildCounterEnterprisesListResponse--;
491 } 584 }
492 585
493 core.int buildCounterEnterprisesSendTestPushNotificationResponse = 0; 586 core.int buildCounterEnterprisesSendTestPushNotificationResponse = 0;
494 buildEnterprisesSendTestPushNotificationResponse() { 587 buildEnterprisesSendTestPushNotificationResponse() {
495 var o = new api.EnterprisesSendTestPushNotificationResponse(); 588 var o = new api.EnterprisesSendTestPushNotificationResponse();
496 buildCounterEnterprisesSendTestPushNotificationResponse++; 589 buildCounterEnterprisesSendTestPushNotificationResponse++;
497 if (buildCounterEnterprisesSendTestPushNotificationResponse < 3) { 590 if (buildCounterEnterprisesSendTestPushNotificationResponse < 3) {
(...skipping 29 matching lines...) Expand all
527 checkEntitlement(api.Entitlement o) { 620 checkEntitlement(api.Entitlement o) {
528 buildCounterEntitlement++; 621 buildCounterEntitlement++;
529 if (buildCounterEntitlement < 3) { 622 if (buildCounterEntitlement < 3) {
530 unittest.expect(o.kind, unittest.equals('foo')); 623 unittest.expect(o.kind, unittest.equals('foo'));
531 unittest.expect(o.productId, unittest.equals('foo')); 624 unittest.expect(o.productId, unittest.equals('foo'));
532 unittest.expect(o.reason, unittest.equals('foo')); 625 unittest.expect(o.reason, unittest.equals('foo'));
533 } 626 }
534 buildCounterEntitlement--; 627 buildCounterEntitlement--;
535 } 628 }
536 629
537 buildUnnamed404() { 630 buildUnnamed2236() {
538 var o = new core.List<api.Entitlement>(); 631 var o = new core.List<api.Entitlement>();
539 o.add(buildEntitlement()); 632 o.add(buildEntitlement());
540 o.add(buildEntitlement()); 633 o.add(buildEntitlement());
541 return o; 634 return o;
542 } 635 }
543 636
544 checkUnnamed404(core.List<api.Entitlement> o) { 637 checkUnnamed2236(core.List<api.Entitlement> o) {
545 unittest.expect(o, unittest.hasLength(2)); 638 unittest.expect(o, unittest.hasLength(2));
546 checkEntitlement(o[0]); 639 checkEntitlement(o[0]);
547 checkEntitlement(o[1]); 640 checkEntitlement(o[1]);
548 } 641 }
549 642
550 core.int buildCounterEntitlementsListResponse = 0; 643 core.int buildCounterEntitlementsListResponse = 0;
551 buildEntitlementsListResponse() { 644 buildEntitlementsListResponse() {
552 var o = new api.EntitlementsListResponse(); 645 var o = new api.EntitlementsListResponse();
553 buildCounterEntitlementsListResponse++; 646 buildCounterEntitlementsListResponse++;
554 if (buildCounterEntitlementsListResponse < 3) { 647 if (buildCounterEntitlementsListResponse < 3) {
555 o.entitlement = buildUnnamed404(); 648 o.entitlement = buildUnnamed2236();
556 o.kind = "foo"; 649 o.kind = "foo";
557 } 650 }
558 buildCounterEntitlementsListResponse--; 651 buildCounterEntitlementsListResponse--;
559 return o; 652 return o;
560 } 653 }
561 654
562 checkEntitlementsListResponse(api.EntitlementsListResponse o) { 655 checkEntitlementsListResponse(api.EntitlementsListResponse o) {
563 buildCounterEntitlementsListResponse++; 656 buildCounterEntitlementsListResponse++;
564 if (buildCounterEntitlementsListResponse < 3) { 657 if (buildCounterEntitlementsListResponse < 3) {
565 checkUnnamed404(o.entitlement); 658 checkUnnamed2236(o.entitlement);
566 unittest.expect(o.kind, unittest.equals('foo')); 659 unittest.expect(o.kind, unittest.equals('foo'));
567 } 660 }
568 buildCounterEntitlementsListResponse--; 661 buildCounterEntitlementsListResponse--;
569 } 662 }
570 663
571 core.int buildCounterGroupLicense = 0; 664 core.int buildCounterGroupLicense = 0;
572 buildGroupLicense() { 665 buildGroupLicense() {
573 var o = new api.GroupLicense(); 666 var o = new api.GroupLicense();
574 buildCounterGroupLicense++; 667 buildCounterGroupLicense++;
575 if (buildCounterGroupLicense < 3) { 668 if (buildCounterGroupLicense < 3) {
(...skipping 14 matching lines...) Expand all
590 unittest.expect(o.acquisitionKind, unittest.equals('foo')); 683 unittest.expect(o.acquisitionKind, unittest.equals('foo'));
591 unittest.expect(o.approval, unittest.equals('foo')); 684 unittest.expect(o.approval, unittest.equals('foo'));
592 unittest.expect(o.kind, unittest.equals('foo')); 685 unittest.expect(o.kind, unittest.equals('foo'));
593 unittest.expect(o.numProvisioned, unittest.equals(42)); 686 unittest.expect(o.numProvisioned, unittest.equals(42));
594 unittest.expect(o.numPurchased, unittest.equals(42)); 687 unittest.expect(o.numPurchased, unittest.equals(42));
595 unittest.expect(o.productId, unittest.equals('foo')); 688 unittest.expect(o.productId, unittest.equals('foo'));
596 } 689 }
597 buildCounterGroupLicense--; 690 buildCounterGroupLicense--;
598 } 691 }
599 692
600 buildUnnamed405() { 693 buildUnnamed2237() {
601 var o = new core.List<api.User>(); 694 var o = new core.List<api.User>();
602 o.add(buildUser()); 695 o.add(buildUser());
603 o.add(buildUser()); 696 o.add(buildUser());
604 return o; 697 return o;
605 } 698 }
606 699
607 checkUnnamed405(core.List<api.User> o) { 700 checkUnnamed2237(core.List<api.User> o) {
608 unittest.expect(o, unittest.hasLength(2)); 701 unittest.expect(o, unittest.hasLength(2));
609 checkUser(o[0]); 702 checkUser(o[0]);
610 checkUser(o[1]); 703 checkUser(o[1]);
611 } 704 }
612 705
613 core.int buildCounterGroupLicenseUsersListResponse = 0; 706 core.int buildCounterGroupLicenseUsersListResponse = 0;
614 buildGroupLicenseUsersListResponse() { 707 buildGroupLicenseUsersListResponse() {
615 var o = new api.GroupLicenseUsersListResponse(); 708 var o = new api.GroupLicenseUsersListResponse();
616 buildCounterGroupLicenseUsersListResponse++; 709 buildCounterGroupLicenseUsersListResponse++;
617 if (buildCounterGroupLicenseUsersListResponse < 3) { 710 if (buildCounterGroupLicenseUsersListResponse < 3) {
618 o.kind = "foo"; 711 o.kind = "foo";
619 o.user = buildUnnamed405(); 712 o.user = buildUnnamed2237();
620 } 713 }
621 buildCounterGroupLicenseUsersListResponse--; 714 buildCounterGroupLicenseUsersListResponse--;
622 return o; 715 return o;
623 } 716 }
624 717
625 checkGroupLicenseUsersListResponse(api.GroupLicenseUsersListResponse o) { 718 checkGroupLicenseUsersListResponse(api.GroupLicenseUsersListResponse o) {
626 buildCounterGroupLicenseUsersListResponse++; 719 buildCounterGroupLicenseUsersListResponse++;
627 if (buildCounterGroupLicenseUsersListResponse < 3) { 720 if (buildCounterGroupLicenseUsersListResponse < 3) {
628 unittest.expect(o.kind, unittest.equals('foo')); 721 unittest.expect(o.kind, unittest.equals('foo'));
629 checkUnnamed405(o.user); 722 checkUnnamed2237(o.user);
630 } 723 }
631 buildCounterGroupLicenseUsersListResponse--; 724 buildCounterGroupLicenseUsersListResponse--;
632 } 725 }
633 726
634 buildUnnamed406() { 727 buildUnnamed2238() {
635 var o = new core.List<api.GroupLicense>(); 728 var o = new core.List<api.GroupLicense>();
636 o.add(buildGroupLicense()); 729 o.add(buildGroupLicense());
637 o.add(buildGroupLicense()); 730 o.add(buildGroupLicense());
638 return o; 731 return o;
639 } 732 }
640 733
641 checkUnnamed406(core.List<api.GroupLicense> o) { 734 checkUnnamed2238(core.List<api.GroupLicense> o) {
642 unittest.expect(o, unittest.hasLength(2)); 735 unittest.expect(o, unittest.hasLength(2));
643 checkGroupLicense(o[0]); 736 checkGroupLicense(o[0]);
644 checkGroupLicense(o[1]); 737 checkGroupLicense(o[1]);
645 } 738 }
646 739
647 core.int buildCounterGroupLicensesListResponse = 0; 740 core.int buildCounterGroupLicensesListResponse = 0;
648 buildGroupLicensesListResponse() { 741 buildGroupLicensesListResponse() {
649 var o = new api.GroupLicensesListResponse(); 742 var o = new api.GroupLicensesListResponse();
650 buildCounterGroupLicensesListResponse++; 743 buildCounterGroupLicensesListResponse++;
651 if (buildCounterGroupLicensesListResponse < 3) { 744 if (buildCounterGroupLicensesListResponse < 3) {
652 o.groupLicense = buildUnnamed406(); 745 o.groupLicense = buildUnnamed2238();
653 o.kind = "foo"; 746 o.kind = "foo";
654 } 747 }
655 buildCounterGroupLicensesListResponse--; 748 buildCounterGroupLicensesListResponse--;
656 return o; 749 return o;
657 } 750 }
658 751
659 checkGroupLicensesListResponse(api.GroupLicensesListResponse o) { 752 checkGroupLicensesListResponse(api.GroupLicensesListResponse o) {
660 buildCounterGroupLicensesListResponse++; 753 buildCounterGroupLicensesListResponse++;
661 if (buildCounterGroupLicensesListResponse < 3) { 754 if (buildCounterGroupLicensesListResponse < 3) {
662 checkUnnamed406(o.groupLicense); 755 checkUnnamed2238(o.groupLicense);
663 unittest.expect(o.kind, unittest.equals('foo')); 756 unittest.expect(o.kind, unittest.equals('foo'));
664 } 757 }
665 buildCounterGroupLicensesListResponse--; 758 buildCounterGroupLicensesListResponse--;
666 } 759 }
667 760
668 core.int buildCounterInstall = 0; 761 core.int buildCounterInstall = 0;
669 buildInstall() { 762 buildInstall() {
670 var o = new api.Install(); 763 var o = new api.Install();
671 buildCounterInstall++; 764 buildCounterInstall++;
672 if (buildCounterInstall < 3) { 765 if (buildCounterInstall < 3) {
(...skipping 10 matching lines...) Expand all
683 buildCounterInstall++; 776 buildCounterInstall++;
684 if (buildCounterInstall < 3) { 777 if (buildCounterInstall < 3) {
685 unittest.expect(o.installState, unittest.equals('foo')); 778 unittest.expect(o.installState, unittest.equals('foo'));
686 unittest.expect(o.kind, unittest.equals('foo')); 779 unittest.expect(o.kind, unittest.equals('foo'));
687 unittest.expect(o.productId, unittest.equals('foo')); 780 unittest.expect(o.productId, unittest.equals('foo'));
688 unittest.expect(o.versionCode, unittest.equals(42)); 781 unittest.expect(o.versionCode, unittest.equals(42));
689 } 782 }
690 buildCounterInstall--; 783 buildCounterInstall--;
691 } 784 }
692 785
693 buildUnnamed407() { 786 core.int buildCounterInstallFailureEvent = 0;
787 buildInstallFailureEvent() {
788 var o = new api.InstallFailureEvent();
789 buildCounterInstallFailureEvent++;
790 if (buildCounterInstallFailureEvent < 3) {
791 o.deviceId = "foo";
792 o.failureDetails = "foo";
793 o.failureReason = "foo";
794 o.productId = "foo";
795 o.userId = "foo";
796 }
797 buildCounterInstallFailureEvent--;
798 return o;
799 }
800
801 checkInstallFailureEvent(api.InstallFailureEvent o) {
802 buildCounterInstallFailureEvent++;
803 if (buildCounterInstallFailureEvent < 3) {
804 unittest.expect(o.deviceId, unittest.equals('foo'));
805 unittest.expect(o.failureDetails, unittest.equals('foo'));
806 unittest.expect(o.failureReason, unittest.equals('foo'));
807 unittest.expect(o.productId, unittest.equals('foo'));
808 unittest.expect(o.userId, unittest.equals('foo'));
809 }
810 buildCounterInstallFailureEvent--;
811 }
812
813 buildUnnamed2239() {
694 var o = new core.List<api.Install>(); 814 var o = new core.List<api.Install>();
695 o.add(buildInstall()); 815 o.add(buildInstall());
696 o.add(buildInstall()); 816 o.add(buildInstall());
697 return o; 817 return o;
698 } 818 }
699 819
700 checkUnnamed407(core.List<api.Install> o) { 820 checkUnnamed2239(core.List<api.Install> o) {
701 unittest.expect(o, unittest.hasLength(2)); 821 unittest.expect(o, unittest.hasLength(2));
702 checkInstall(o[0]); 822 checkInstall(o[0]);
703 checkInstall(o[1]); 823 checkInstall(o[1]);
704 } 824 }
705 825
706 core.int buildCounterInstallsListResponse = 0; 826 core.int buildCounterInstallsListResponse = 0;
707 buildInstallsListResponse() { 827 buildInstallsListResponse() {
708 var o = new api.InstallsListResponse(); 828 var o = new api.InstallsListResponse();
709 buildCounterInstallsListResponse++; 829 buildCounterInstallsListResponse++;
710 if (buildCounterInstallsListResponse < 3) { 830 if (buildCounterInstallsListResponse < 3) {
711 o.install = buildUnnamed407(); 831 o.install = buildUnnamed2239();
712 o.kind = "foo"; 832 o.kind = "foo";
713 } 833 }
714 buildCounterInstallsListResponse--; 834 buildCounterInstallsListResponse--;
715 return o; 835 return o;
716 } 836 }
717 837
718 checkInstallsListResponse(api.InstallsListResponse o) { 838 checkInstallsListResponse(api.InstallsListResponse o) {
719 buildCounterInstallsListResponse++; 839 buildCounterInstallsListResponse++;
720 if (buildCounterInstallsListResponse < 3) { 840 if (buildCounterInstallsListResponse < 3) {
721 checkUnnamed407(o.install); 841 checkUnnamed2239(o.install);
722 unittest.expect(o.kind, unittest.equals('foo')); 842 unittest.expect(o.kind, unittest.equals('foo'));
723 } 843 }
724 buildCounterInstallsListResponse--; 844 buildCounterInstallsListResponse--;
725 } 845 }
726 846
727 core.int buildCounterLocalizedText = 0; 847 core.int buildCounterLocalizedText = 0;
728 buildLocalizedText() { 848 buildLocalizedText() {
729 var o = new api.LocalizedText(); 849 var o = new api.LocalizedText();
730 buildCounterLocalizedText++; 850 buildCounterLocalizedText++;
731 if (buildCounterLocalizedText < 3) { 851 if (buildCounterLocalizedText < 3) {
732 o.locale = "foo"; 852 o.locale = "foo";
733 o.text = "foo"; 853 o.text = "foo";
734 } 854 }
735 buildCounterLocalizedText--; 855 buildCounterLocalizedText--;
736 return o; 856 return o;
737 } 857 }
738 858
739 checkLocalizedText(api.LocalizedText o) { 859 checkLocalizedText(api.LocalizedText o) {
740 buildCounterLocalizedText++; 860 buildCounterLocalizedText++;
741 if (buildCounterLocalizedText < 3) { 861 if (buildCounterLocalizedText < 3) {
742 unittest.expect(o.locale, unittest.equals('foo')); 862 unittest.expect(o.locale, unittest.equals('foo'));
743 unittest.expect(o.text, unittest.equals('foo')); 863 unittest.expect(o.text, unittest.equals('foo'));
744 } 864 }
745 buildCounterLocalizedText--; 865 buildCounterLocalizedText--;
746 } 866 }
747 867
868 buildUnnamed2240() {
869 var o = new core.List<core.String>();
870 o.add("foo");
871 o.add("foo");
872 return o;
873 }
874
875 checkUnnamed2240(core.List<core.String> o) {
876 unittest.expect(o, unittest.hasLength(2));
877 unittest.expect(o[0], unittest.equals('foo'));
878 unittest.expect(o[1], unittest.equals('foo'));
879 }
880
881 buildUnnamed2241() {
882 var o = new core.List<core.String>();
883 o.add("foo");
884 o.add("foo");
885 return o;
886 }
887
888 checkUnnamed2241(core.List<core.String> o) {
889 unittest.expect(o, unittest.hasLength(2));
890 unittest.expect(o[0], unittest.equals('foo'));
891 unittest.expect(o[1], unittest.equals('foo'));
892 }
893
894 core.int buildCounterNewPermissionsEvent = 0;
895 buildNewPermissionsEvent() {
896 var o = new api.NewPermissionsEvent();
897 buildCounterNewPermissionsEvent++;
898 if (buildCounterNewPermissionsEvent < 3) {
899 o.approvedPermissions = buildUnnamed2240();
900 o.productId = "foo";
901 o.requestedPermissions = buildUnnamed2241();
902 }
903 buildCounterNewPermissionsEvent--;
904 return o;
905 }
906
907 checkNewPermissionsEvent(api.NewPermissionsEvent o) {
908 buildCounterNewPermissionsEvent++;
909 if (buildCounterNewPermissionsEvent < 3) {
910 checkUnnamed2240(o.approvedPermissions);
911 unittest.expect(o.productId, unittest.equals('foo'));
912 checkUnnamed2241(o.requestedPermissions);
913 }
914 buildCounterNewPermissionsEvent--;
915 }
916
917 core.int buildCounterNotification = 0;
918 buildNotification() {
919 var o = new api.Notification();
920 buildCounterNotification++;
921 if (buildCounterNotification < 3) {
922 o.appRestrictionsSchemaChangeEvent = buildAppRestrictionsSchemaChangeEvent() ;
923 o.appUpdateEvent = buildAppUpdateEvent();
924 o.enterpriseId = "foo";
925 o.installFailureEvent = buildInstallFailureEvent();
926 o.newPermissionsEvent = buildNewPermissionsEvent();
927 o.productApprovalEvent = buildProductApprovalEvent();
928 o.productAvailabilityChangeEvent = buildProductAvailabilityChangeEvent();
929 o.timestampMillis = "foo";
930 }
931 buildCounterNotification--;
932 return o;
933 }
934
935 checkNotification(api.Notification o) {
936 buildCounterNotification++;
937 if (buildCounterNotification < 3) {
938 checkAppRestrictionsSchemaChangeEvent(o.appRestrictionsSchemaChangeEvent);
939 checkAppUpdateEvent(o.appUpdateEvent);
940 unittest.expect(o.enterpriseId, unittest.equals('foo'));
941 checkInstallFailureEvent(o.installFailureEvent);
942 checkNewPermissionsEvent(o.newPermissionsEvent);
943 checkProductApprovalEvent(o.productApprovalEvent);
944 checkProductAvailabilityChangeEvent(o.productAvailabilityChangeEvent);
945 unittest.expect(o.timestampMillis, unittest.equals('foo'));
946 }
947 buildCounterNotification--;
948 }
949
950 buildUnnamed2242() {
951 var o = new core.List<api.Notification>();
952 o.add(buildNotification());
953 o.add(buildNotification());
954 return o;
955 }
956
957 checkUnnamed2242(core.List<api.Notification> o) {
958 unittest.expect(o, unittest.hasLength(2));
959 checkNotification(o[0]);
960 checkNotification(o[1]);
961 }
962
963 core.int buildCounterNotificationSet = 0;
964 buildNotificationSet() {
965 var o = new api.NotificationSet();
966 buildCounterNotificationSet++;
967 if (buildCounterNotificationSet < 3) {
968 o.kind = "foo";
969 o.notification = buildUnnamed2242();
970 o.notificationSetId = "foo";
971 }
972 buildCounterNotificationSet--;
973 return o;
974 }
975
976 checkNotificationSet(api.NotificationSet o) {
977 buildCounterNotificationSet++;
978 if (buildCounterNotificationSet < 3) {
979 unittest.expect(o.kind, unittest.equals('foo'));
980 checkUnnamed2242(o.notification);
981 unittest.expect(o.notificationSetId, unittest.equals('foo'));
982 }
983 buildCounterNotificationSet--;
984 }
985
748 core.int buildCounterPageInfo = 0; 986 core.int buildCounterPageInfo = 0;
749 buildPageInfo() { 987 buildPageInfo() {
750 var o = new api.PageInfo(); 988 var o = new api.PageInfo();
751 buildCounterPageInfo++; 989 buildCounterPageInfo++;
752 if (buildCounterPageInfo < 3) { 990 if (buildCounterPageInfo < 3) {
753 o.resultPerPage = 42; 991 o.resultPerPage = 42;
754 o.startIndex = 42; 992 o.startIndex = 42;
755 o.totalResults = 42; 993 o.totalResults = 42;
756 } 994 }
757 buildCounterPageInfo--; 995 buildCounterPageInfo--;
(...skipping 28 matching lines...) Expand all
786 buildCounterPermission++; 1024 buildCounterPermission++;
787 if (buildCounterPermission < 3) { 1025 if (buildCounterPermission < 3) {
788 unittest.expect(o.description, unittest.equals('foo')); 1026 unittest.expect(o.description, unittest.equals('foo'));
789 unittest.expect(o.kind, unittest.equals('foo')); 1027 unittest.expect(o.kind, unittest.equals('foo'));
790 unittest.expect(o.name, unittest.equals('foo')); 1028 unittest.expect(o.name, unittest.equals('foo'));
791 unittest.expect(o.permissionId, unittest.equals('foo')); 1029 unittest.expect(o.permissionId, unittest.equals('foo'));
792 } 1030 }
793 buildCounterPermission--; 1031 buildCounterPermission--;
794 } 1032 }
795 1033
796 buildUnnamed408() { 1034 buildUnnamed2243() {
797 var o = new core.List<api.AppVersion>(); 1035 var o = new core.List<api.AppVersion>();
798 o.add(buildAppVersion()); 1036 o.add(buildAppVersion());
799 o.add(buildAppVersion()); 1037 o.add(buildAppVersion());
800 return o; 1038 return o;
801 } 1039 }
802 1040
803 checkUnnamed408(core.List<api.AppVersion> o) { 1041 checkUnnamed2243(core.List<api.AppVersion> o) {
804 unittest.expect(o, unittest.hasLength(2)); 1042 unittest.expect(o, unittest.hasLength(2));
805 checkAppVersion(o[0]); 1043 checkAppVersion(o[0]);
806 checkAppVersion(o[1]); 1044 checkAppVersion(o[1]);
807 } 1045 }
808 1046
809 core.int buildCounterProduct = 0; 1047 core.int buildCounterProduct = 0;
810 buildProduct() { 1048 buildProduct() {
811 var o = new api.Product(); 1049 var o = new api.Product();
812 buildCounterProduct++; 1050 buildCounterProduct++;
813 if (buildCounterProduct < 3) { 1051 if (buildCounterProduct < 3) {
814 o.appVersion = buildUnnamed408(); 1052 o.appVersion = buildUnnamed2243();
815 o.authorName = "foo"; 1053 o.authorName = "foo";
816 o.detailsUrl = "foo"; 1054 o.detailsUrl = "foo";
817 o.distributionChannel = "foo"; 1055 o.distributionChannel = "foo";
818 o.iconUrl = "foo"; 1056 o.iconUrl = "foo";
819 o.kind = "foo"; 1057 o.kind = "foo";
820 o.productId = "foo"; 1058 o.productId = "foo";
821 o.productPricing = "foo"; 1059 o.productPricing = "foo";
822 o.requiresContainerApp = true; 1060 o.requiresContainerApp = true;
823 o.smallIconUrl = "foo"; 1061 o.smallIconUrl = "foo";
824 o.title = "foo"; 1062 o.title = "foo";
825 o.workDetailsUrl = "foo"; 1063 o.workDetailsUrl = "foo";
826 } 1064 }
827 buildCounterProduct--; 1065 buildCounterProduct--;
828 return o; 1066 return o;
829 } 1067 }
830 1068
831 checkProduct(api.Product o) { 1069 checkProduct(api.Product o) {
832 buildCounterProduct++; 1070 buildCounterProduct++;
833 if (buildCounterProduct < 3) { 1071 if (buildCounterProduct < 3) {
834 checkUnnamed408(o.appVersion); 1072 checkUnnamed2243(o.appVersion);
835 unittest.expect(o.authorName, unittest.equals('foo')); 1073 unittest.expect(o.authorName, unittest.equals('foo'));
836 unittest.expect(o.detailsUrl, unittest.equals('foo')); 1074 unittest.expect(o.detailsUrl, unittest.equals('foo'));
837 unittest.expect(o.distributionChannel, unittest.equals('foo')); 1075 unittest.expect(o.distributionChannel, unittest.equals('foo'));
838 unittest.expect(o.iconUrl, unittest.equals('foo')); 1076 unittest.expect(o.iconUrl, unittest.equals('foo'));
839 unittest.expect(o.kind, unittest.equals('foo')); 1077 unittest.expect(o.kind, unittest.equals('foo'));
840 unittest.expect(o.productId, unittest.equals('foo')); 1078 unittest.expect(o.productId, unittest.equals('foo'));
841 unittest.expect(o.productPricing, unittest.equals('foo')); 1079 unittest.expect(o.productPricing, unittest.equals('foo'));
842 unittest.expect(o.requiresContainerApp, unittest.isTrue); 1080 unittest.expect(o.requiresContainerApp, unittest.isTrue);
843 unittest.expect(o.smallIconUrl, unittest.equals('foo')); 1081 unittest.expect(o.smallIconUrl, unittest.equals('foo'));
844 unittest.expect(o.title, unittest.equals('foo')); 1082 unittest.expect(o.title, unittest.equals('foo'));
845 unittest.expect(o.workDetailsUrl, unittest.equals('foo')); 1083 unittest.expect(o.workDetailsUrl, unittest.equals('foo'));
846 } 1084 }
847 buildCounterProduct--; 1085 buildCounterProduct--;
848 } 1086 }
849 1087
1088 core.int buildCounterProductApprovalEvent = 0;
1089 buildProductApprovalEvent() {
1090 var o = new api.ProductApprovalEvent();
1091 buildCounterProductApprovalEvent++;
1092 if (buildCounterProductApprovalEvent < 3) {
1093 o.approved = "foo";
1094 o.productId = "foo";
1095 }
1096 buildCounterProductApprovalEvent--;
1097 return o;
1098 }
1099
1100 checkProductApprovalEvent(api.ProductApprovalEvent o) {
1101 buildCounterProductApprovalEvent++;
1102 if (buildCounterProductApprovalEvent < 3) {
1103 unittest.expect(o.approved, unittest.equals('foo'));
1104 unittest.expect(o.productId, unittest.equals('foo'));
1105 }
1106 buildCounterProductApprovalEvent--;
1107 }
1108
1109 core.int buildCounterProductAvailabilityChangeEvent = 0;
1110 buildProductAvailabilityChangeEvent() {
1111 var o = new api.ProductAvailabilityChangeEvent();
1112 buildCounterProductAvailabilityChangeEvent++;
1113 if (buildCounterProductAvailabilityChangeEvent < 3) {
1114 o.availabilityStatus = "foo";
1115 o.productId = "foo";
1116 }
1117 buildCounterProductAvailabilityChangeEvent--;
1118 return o;
1119 }
1120
1121 checkProductAvailabilityChangeEvent(api.ProductAvailabilityChangeEvent o) {
1122 buildCounterProductAvailabilityChangeEvent++;
1123 if (buildCounterProductAvailabilityChangeEvent < 3) {
1124 unittest.expect(o.availabilityStatus, unittest.equals('foo'));
1125 unittest.expect(o.productId, unittest.equals('foo'));
1126 }
1127 buildCounterProductAvailabilityChangeEvent--;
1128 }
1129
850 core.int buildCounterProductPermission = 0; 1130 core.int buildCounterProductPermission = 0;
851 buildProductPermission() { 1131 buildProductPermission() {
852 var o = new api.ProductPermission(); 1132 var o = new api.ProductPermission();
853 buildCounterProductPermission++; 1133 buildCounterProductPermission++;
854 if (buildCounterProductPermission < 3) { 1134 if (buildCounterProductPermission < 3) {
855 o.permissionId = "foo"; 1135 o.permissionId = "foo";
856 o.state = "foo"; 1136 o.state = "foo";
857 } 1137 }
858 buildCounterProductPermission--; 1138 buildCounterProductPermission--;
859 return o; 1139 return o;
860 } 1140 }
861 1141
862 checkProductPermission(api.ProductPermission o) { 1142 checkProductPermission(api.ProductPermission o) {
863 buildCounterProductPermission++; 1143 buildCounterProductPermission++;
864 if (buildCounterProductPermission < 3) { 1144 if (buildCounterProductPermission < 3) {
865 unittest.expect(o.permissionId, unittest.equals('foo')); 1145 unittest.expect(o.permissionId, unittest.equals('foo'));
866 unittest.expect(o.state, unittest.equals('foo')); 1146 unittest.expect(o.state, unittest.equals('foo'));
867 } 1147 }
868 buildCounterProductPermission--; 1148 buildCounterProductPermission--;
869 } 1149 }
870 1150
871 buildUnnamed409() { 1151 buildUnnamed2244() {
872 var o = new core.List<api.ProductPermission>(); 1152 var o = new core.List<api.ProductPermission>();
873 o.add(buildProductPermission()); 1153 o.add(buildProductPermission());
874 o.add(buildProductPermission()); 1154 o.add(buildProductPermission());
875 return o; 1155 return o;
876 } 1156 }
877 1157
878 checkUnnamed409(core.List<api.ProductPermission> o) { 1158 checkUnnamed2244(core.List<api.ProductPermission> o) {
879 unittest.expect(o, unittest.hasLength(2)); 1159 unittest.expect(o, unittest.hasLength(2));
880 checkProductPermission(o[0]); 1160 checkProductPermission(o[0]);
881 checkProductPermission(o[1]); 1161 checkProductPermission(o[1]);
882 } 1162 }
883 1163
884 core.int buildCounterProductPermissions = 0; 1164 core.int buildCounterProductPermissions = 0;
885 buildProductPermissions() { 1165 buildProductPermissions() {
886 var o = new api.ProductPermissions(); 1166 var o = new api.ProductPermissions();
887 buildCounterProductPermissions++; 1167 buildCounterProductPermissions++;
888 if (buildCounterProductPermissions < 3) { 1168 if (buildCounterProductPermissions < 3) {
889 o.kind = "foo"; 1169 o.kind = "foo";
890 o.permission = buildUnnamed409(); 1170 o.permission = buildUnnamed2244();
891 o.productId = "foo"; 1171 o.productId = "foo";
892 } 1172 }
893 buildCounterProductPermissions--; 1173 buildCounterProductPermissions--;
894 return o; 1174 return o;
895 } 1175 }
896 1176
897 checkProductPermissions(api.ProductPermissions o) { 1177 checkProductPermissions(api.ProductPermissions o) {
898 buildCounterProductPermissions++; 1178 buildCounterProductPermissions++;
899 if (buildCounterProductPermissions < 3) { 1179 if (buildCounterProductPermissions < 3) {
900 unittest.expect(o.kind, unittest.equals('foo')); 1180 unittest.expect(o.kind, unittest.equals('foo'));
901 checkUnnamed409(o.permission); 1181 checkUnnamed2244(o.permission);
902 unittest.expect(o.productId, unittest.equals('foo')); 1182 unittest.expect(o.productId, unittest.equals('foo'));
903 } 1183 }
904 buildCounterProductPermissions--; 1184 buildCounterProductPermissions--;
905 } 1185 }
906 1186
907 buildUnnamed410() { 1187 buildUnnamed2245() {
908 var o = new core.List<core.String>(); 1188 var o = new core.List<core.String>();
909 o.add("foo"); 1189 o.add("foo");
910 o.add("foo"); 1190 o.add("foo");
911 return o; 1191 return o;
912 } 1192 }
913 1193
914 checkUnnamed410(core.List<core.String> o) { 1194 checkUnnamed2245(core.List<core.String> o) {
915 unittest.expect(o, unittest.hasLength(2)); 1195 unittest.expect(o, unittest.hasLength(2));
916 unittest.expect(o[0], unittest.equals('foo')); 1196 unittest.expect(o[0], unittest.equals('foo'));
917 unittest.expect(o[1], unittest.equals('foo')); 1197 unittest.expect(o[1], unittest.equals('foo'));
918 } 1198 }
919 1199
920 core.int buildCounterProductSet = 0; 1200 core.int buildCounterProductSet = 0;
921 buildProductSet() { 1201 buildProductSet() {
922 var o = new api.ProductSet(); 1202 var o = new api.ProductSet();
923 buildCounterProductSet++; 1203 buildCounterProductSet++;
924 if (buildCounterProductSet < 3) { 1204 if (buildCounterProductSet < 3) {
925 o.kind = "foo"; 1205 o.kind = "foo";
926 o.productId = buildUnnamed410(); 1206 o.productId = buildUnnamed2245();
927 } 1207 }
928 buildCounterProductSet--; 1208 buildCounterProductSet--;
929 return o; 1209 return o;
930 } 1210 }
931 1211
932 checkProductSet(api.ProductSet o) { 1212 checkProductSet(api.ProductSet o) {
933 buildCounterProductSet++; 1213 buildCounterProductSet++;
934 if (buildCounterProductSet < 3) { 1214 if (buildCounterProductSet < 3) {
935 unittest.expect(o.kind, unittest.equals('foo')); 1215 unittest.expect(o.kind, unittest.equals('foo'));
936 checkUnnamed410(o.productId); 1216 checkUnnamed2245(o.productId);
937 } 1217 }
938 buildCounterProductSet--; 1218 buildCounterProductSet--;
939 } 1219 }
940 1220
941 core.int buildCounterProductsApproveRequest = 0; 1221 core.int buildCounterProductsApproveRequest = 0;
942 buildProductsApproveRequest() { 1222 buildProductsApproveRequest() {
943 var o = new api.ProductsApproveRequest(); 1223 var o = new api.ProductsApproveRequest();
944 buildCounterProductsApproveRequest++; 1224 buildCounterProductsApproveRequest++;
945 if (buildCounterProductsApproveRequest < 3) { 1225 if (buildCounterProductsApproveRequest < 3) {
946 o.approvalUrlInfo = buildApprovalUrlInfo(); 1226 o.approvalUrlInfo = buildApprovalUrlInfo();
(...skipping 22 matching lines...) Expand all
969 } 1249 }
970 1250
971 checkProductsGenerateApprovalUrlResponse(api.ProductsGenerateApprovalUrlResponse o) { 1251 checkProductsGenerateApprovalUrlResponse(api.ProductsGenerateApprovalUrlResponse o) {
972 buildCounterProductsGenerateApprovalUrlResponse++; 1252 buildCounterProductsGenerateApprovalUrlResponse++;
973 if (buildCounterProductsGenerateApprovalUrlResponse < 3) { 1253 if (buildCounterProductsGenerateApprovalUrlResponse < 3) {
974 unittest.expect(o.url, unittest.equals('foo')); 1254 unittest.expect(o.url, unittest.equals('foo'));
975 } 1255 }
976 buildCounterProductsGenerateApprovalUrlResponse--; 1256 buildCounterProductsGenerateApprovalUrlResponse--;
977 } 1257 }
978 1258
979 buildUnnamed411() { 1259 buildUnnamed2246() {
980 var o = new core.List<api.Product>(); 1260 var o = new core.List<api.Product>();
981 o.add(buildProduct()); 1261 o.add(buildProduct());
982 o.add(buildProduct()); 1262 o.add(buildProduct());
983 return o; 1263 return o;
984 } 1264 }
985 1265
986 checkUnnamed411(core.List<api.Product> o) { 1266 checkUnnamed2246(core.List<api.Product> o) {
987 unittest.expect(o, unittest.hasLength(2)); 1267 unittest.expect(o, unittest.hasLength(2));
988 checkProduct(o[0]); 1268 checkProduct(o[0]);
989 checkProduct(o[1]); 1269 checkProduct(o[1]);
990 } 1270 }
991 1271
992 core.int buildCounterProductsListResponse = 0; 1272 core.int buildCounterProductsListResponse = 0;
993 buildProductsListResponse() { 1273 buildProductsListResponse() {
994 var o = new api.ProductsListResponse(); 1274 var o = new api.ProductsListResponse();
995 buildCounterProductsListResponse++; 1275 buildCounterProductsListResponse++;
996 if (buildCounterProductsListResponse < 3) { 1276 if (buildCounterProductsListResponse < 3) {
997 o.kind = "foo"; 1277 o.kind = "foo";
998 o.pageInfo = buildPageInfo(); 1278 o.pageInfo = buildPageInfo();
999 o.product = buildUnnamed411(); 1279 o.product = buildUnnamed2246();
1000 o.tokenPagination = buildTokenPagination(); 1280 o.tokenPagination = buildTokenPagination();
1001 } 1281 }
1002 buildCounterProductsListResponse--; 1282 buildCounterProductsListResponse--;
1003 return o; 1283 return o;
1004 } 1284 }
1005 1285
1006 checkProductsListResponse(api.ProductsListResponse o) { 1286 checkProductsListResponse(api.ProductsListResponse o) {
1007 buildCounterProductsListResponse++; 1287 buildCounterProductsListResponse++;
1008 if (buildCounterProductsListResponse < 3) { 1288 if (buildCounterProductsListResponse < 3) {
1009 unittest.expect(o.kind, unittest.equals('foo')); 1289 unittest.expect(o.kind, unittest.equals('foo'));
1010 checkPageInfo(o.pageInfo); 1290 checkPageInfo(o.pageInfo);
1011 checkUnnamed411(o.product); 1291 checkUnnamed2246(o.product);
1012 checkTokenPagination(o.tokenPagination); 1292 checkTokenPagination(o.tokenPagination);
1013 } 1293 }
1014 buildCounterProductsListResponse--; 1294 buildCounterProductsListResponse--;
1015 } 1295 }
1016 1296
1017 buildUnnamed412() { 1297 core.int buildCounterServiceAccount = 0;
1298 buildServiceAccount() {
1299 var o = new api.ServiceAccount();
1300 buildCounterServiceAccount++;
1301 if (buildCounterServiceAccount < 3) {
1302 o.key = buildServiceAccountKey();
1303 o.kind = "foo";
1304 o.name = "foo";
1305 }
1306 buildCounterServiceAccount--;
1307 return o;
1308 }
1309
1310 checkServiceAccount(api.ServiceAccount o) {
1311 buildCounterServiceAccount++;
1312 if (buildCounterServiceAccount < 3) {
1313 checkServiceAccountKey(o.key);
1314 unittest.expect(o.kind, unittest.equals('foo'));
1315 unittest.expect(o.name, unittest.equals('foo'));
1316 }
1317 buildCounterServiceAccount--;
1318 }
1319
1320 core.int buildCounterServiceAccountKey = 0;
1321 buildServiceAccountKey() {
1322 var o = new api.ServiceAccountKey();
1323 buildCounterServiceAccountKey++;
1324 if (buildCounterServiceAccountKey < 3) {
1325 o.data = "foo";
1326 o.id = "foo";
1327 o.kind = "foo";
1328 o.type = "foo";
1329 }
1330 buildCounterServiceAccountKey--;
1331 return o;
1332 }
1333
1334 checkServiceAccountKey(api.ServiceAccountKey o) {
1335 buildCounterServiceAccountKey++;
1336 if (buildCounterServiceAccountKey < 3) {
1337 unittest.expect(o.data, unittest.equals('foo'));
1338 unittest.expect(o.id, unittest.equals('foo'));
1339 unittest.expect(o.kind, unittest.equals('foo'));
1340 unittest.expect(o.type, unittest.equals('foo'));
1341 }
1342 buildCounterServiceAccountKey--;
1343 }
1344
1345 buildUnnamed2247() {
1346 var o = new core.List<api.ServiceAccountKey>();
1347 o.add(buildServiceAccountKey());
1348 o.add(buildServiceAccountKey());
1349 return o;
1350 }
1351
1352 checkUnnamed2247(core.List<api.ServiceAccountKey> o) {
1353 unittest.expect(o, unittest.hasLength(2));
1354 checkServiceAccountKey(o[0]);
1355 checkServiceAccountKey(o[1]);
1356 }
1357
1358 core.int buildCounterServiceAccountKeysListResponse = 0;
1359 buildServiceAccountKeysListResponse() {
1360 var o = new api.ServiceAccountKeysListResponse();
1361 buildCounterServiceAccountKeysListResponse++;
1362 if (buildCounterServiceAccountKeysListResponse < 3) {
1363 o.serviceAccountKey = buildUnnamed2247();
1364 }
1365 buildCounterServiceAccountKeysListResponse--;
1366 return o;
1367 }
1368
1369 checkServiceAccountKeysListResponse(api.ServiceAccountKeysListResponse o) {
1370 buildCounterServiceAccountKeysListResponse++;
1371 if (buildCounterServiceAccountKeysListResponse < 3) {
1372 checkUnnamed2247(o.serviceAccountKey);
1373 }
1374 buildCounterServiceAccountKeysListResponse--;
1375 }
1376
1377 core.int buildCounterSignupInfo = 0;
1378 buildSignupInfo() {
1379 var o = new api.SignupInfo();
1380 buildCounterSignupInfo++;
1381 if (buildCounterSignupInfo < 3) {
1382 o.completionToken = "foo";
1383 o.kind = "foo";
1384 o.url = "foo";
1385 }
1386 buildCounterSignupInfo--;
1387 return o;
1388 }
1389
1390 checkSignupInfo(api.SignupInfo o) {
1391 buildCounterSignupInfo++;
1392 if (buildCounterSignupInfo < 3) {
1393 unittest.expect(o.completionToken, unittest.equals('foo'));
1394 unittest.expect(o.kind, unittest.equals('foo'));
1395 unittest.expect(o.url, unittest.equals('foo'));
1396 }
1397 buildCounterSignupInfo--;
1398 }
1399
1400 buildUnnamed2248() {
1018 var o = new core.List<api.LocalizedText>(); 1401 var o = new core.List<api.LocalizedText>();
1019 o.add(buildLocalizedText()); 1402 o.add(buildLocalizedText());
1020 o.add(buildLocalizedText()); 1403 o.add(buildLocalizedText());
1021 return o; 1404 return o;
1022 } 1405 }
1023 1406
1024 checkUnnamed412(core.List<api.LocalizedText> o) { 1407 checkUnnamed2248(core.List<api.LocalizedText> o) {
1025 unittest.expect(o, unittest.hasLength(2)); 1408 unittest.expect(o, unittest.hasLength(2));
1026 checkLocalizedText(o[0]); 1409 checkLocalizedText(o[0]);
1027 checkLocalizedText(o[1]); 1410 checkLocalizedText(o[1]);
1028 } 1411 }
1029 1412
1030 buildUnnamed413() { 1413 buildUnnamed2249() {
1031 var o = new core.List<core.String>(); 1414 var o = new core.List<core.String>();
1032 o.add("foo"); 1415 o.add("foo");
1033 o.add("foo"); 1416 o.add("foo");
1034 return o; 1417 return o;
1035 } 1418 }
1036 1419
1037 checkUnnamed413(core.List<core.String> o) { 1420 checkUnnamed2249(core.List<core.String> o) {
1038 unittest.expect(o, unittest.hasLength(2)); 1421 unittest.expect(o, unittest.hasLength(2));
1039 unittest.expect(o[0], unittest.equals('foo')); 1422 unittest.expect(o[0], unittest.equals('foo'));
1040 unittest.expect(o[1], unittest.equals('foo')); 1423 unittest.expect(o[1], unittest.equals('foo'));
1041 } 1424 }
1042 1425
1043 core.int buildCounterStoreCluster = 0; 1426 core.int buildCounterStoreCluster = 0;
1044 buildStoreCluster() { 1427 buildStoreCluster() {
1045 var o = new api.StoreCluster(); 1428 var o = new api.StoreCluster();
1046 buildCounterStoreCluster++; 1429 buildCounterStoreCluster++;
1047 if (buildCounterStoreCluster < 3) { 1430 if (buildCounterStoreCluster < 3) {
1048 o.id = "foo"; 1431 o.id = "foo";
1049 o.kind = "foo"; 1432 o.kind = "foo";
1050 o.name = buildUnnamed412(); 1433 o.name = buildUnnamed2248();
1051 o.orderInPage = "foo"; 1434 o.orderInPage = "foo";
1052 o.productId = buildUnnamed413(); 1435 o.productId = buildUnnamed2249();
1053 } 1436 }
1054 buildCounterStoreCluster--; 1437 buildCounterStoreCluster--;
1055 return o; 1438 return o;
1056 } 1439 }
1057 1440
1058 checkStoreCluster(api.StoreCluster o) { 1441 checkStoreCluster(api.StoreCluster o) {
1059 buildCounterStoreCluster++; 1442 buildCounterStoreCluster++;
1060 if (buildCounterStoreCluster < 3) { 1443 if (buildCounterStoreCluster < 3) {
1061 unittest.expect(o.id, unittest.equals('foo')); 1444 unittest.expect(o.id, unittest.equals('foo'));
1062 unittest.expect(o.kind, unittest.equals('foo')); 1445 unittest.expect(o.kind, unittest.equals('foo'));
1063 checkUnnamed412(o.name); 1446 checkUnnamed2248(o.name);
1064 unittest.expect(o.orderInPage, unittest.equals('foo')); 1447 unittest.expect(o.orderInPage, unittest.equals('foo'));
1065 checkUnnamed413(o.productId); 1448 checkUnnamed2249(o.productId);
1066 } 1449 }
1067 buildCounterStoreCluster--; 1450 buildCounterStoreCluster--;
1068 } 1451 }
1069 1452
1070 core.int buildCounterStoreLayout = 0; 1453 core.int buildCounterStoreLayout = 0;
1071 buildStoreLayout() { 1454 buildStoreLayout() {
1072 var o = new api.StoreLayout(); 1455 var o = new api.StoreLayout();
1073 buildCounterStoreLayout++; 1456 buildCounterStoreLayout++;
1074 if (buildCounterStoreLayout < 3) { 1457 if (buildCounterStoreLayout < 3) {
1075 o.homepageId = "foo"; 1458 o.homepageId = "foo";
1076 o.kind = "foo"; 1459 o.kind = "foo";
1077 } 1460 }
1078 buildCounterStoreLayout--; 1461 buildCounterStoreLayout--;
1079 return o; 1462 return o;
1080 } 1463 }
1081 1464
1082 checkStoreLayout(api.StoreLayout o) { 1465 checkStoreLayout(api.StoreLayout o) {
1083 buildCounterStoreLayout++; 1466 buildCounterStoreLayout++;
1084 if (buildCounterStoreLayout < 3) { 1467 if (buildCounterStoreLayout < 3) {
1085 unittest.expect(o.homepageId, unittest.equals('foo')); 1468 unittest.expect(o.homepageId, unittest.equals('foo'));
1086 unittest.expect(o.kind, unittest.equals('foo')); 1469 unittest.expect(o.kind, unittest.equals('foo'));
1087 } 1470 }
1088 buildCounterStoreLayout--; 1471 buildCounterStoreLayout--;
1089 } 1472 }
1090 1473
1091 buildUnnamed414() { 1474 buildUnnamed2250() {
1092 var o = new core.List<api.StoreCluster>(); 1475 var o = new core.List<api.StoreCluster>();
1093 o.add(buildStoreCluster()); 1476 o.add(buildStoreCluster());
1094 o.add(buildStoreCluster()); 1477 o.add(buildStoreCluster());
1095 return o; 1478 return o;
1096 } 1479 }
1097 1480
1098 checkUnnamed414(core.List<api.StoreCluster> o) { 1481 checkUnnamed2250(core.List<api.StoreCluster> o) {
1099 unittest.expect(o, unittest.hasLength(2)); 1482 unittest.expect(o, unittest.hasLength(2));
1100 checkStoreCluster(o[0]); 1483 checkStoreCluster(o[0]);
1101 checkStoreCluster(o[1]); 1484 checkStoreCluster(o[1]);
1102 } 1485 }
1103 1486
1104 core.int buildCounterStoreLayoutClustersListResponse = 0; 1487 core.int buildCounterStoreLayoutClustersListResponse = 0;
1105 buildStoreLayoutClustersListResponse() { 1488 buildStoreLayoutClustersListResponse() {
1106 var o = new api.StoreLayoutClustersListResponse(); 1489 var o = new api.StoreLayoutClustersListResponse();
1107 buildCounterStoreLayoutClustersListResponse++; 1490 buildCounterStoreLayoutClustersListResponse++;
1108 if (buildCounterStoreLayoutClustersListResponse < 3) { 1491 if (buildCounterStoreLayoutClustersListResponse < 3) {
1109 o.cluster = buildUnnamed414(); 1492 o.cluster = buildUnnamed2250();
1110 o.kind = "foo"; 1493 o.kind = "foo";
1111 } 1494 }
1112 buildCounterStoreLayoutClustersListResponse--; 1495 buildCounterStoreLayoutClustersListResponse--;
1113 return o; 1496 return o;
1114 } 1497 }
1115 1498
1116 checkStoreLayoutClustersListResponse(api.StoreLayoutClustersListResponse o) { 1499 checkStoreLayoutClustersListResponse(api.StoreLayoutClustersListResponse o) {
1117 buildCounterStoreLayoutClustersListResponse++; 1500 buildCounterStoreLayoutClustersListResponse++;
1118 if (buildCounterStoreLayoutClustersListResponse < 3) { 1501 if (buildCounterStoreLayoutClustersListResponse < 3) {
1119 checkUnnamed414(o.cluster); 1502 checkUnnamed2250(o.cluster);
1120 unittest.expect(o.kind, unittest.equals('foo')); 1503 unittest.expect(o.kind, unittest.equals('foo'));
1121 } 1504 }
1122 buildCounterStoreLayoutClustersListResponse--; 1505 buildCounterStoreLayoutClustersListResponse--;
1123 } 1506 }
1124 1507
1125 buildUnnamed415() { 1508 buildUnnamed2251() {
1126 var o = new core.List<api.StorePage>(); 1509 var o = new core.List<api.StorePage>();
1127 o.add(buildStorePage()); 1510 o.add(buildStorePage());
1128 o.add(buildStorePage()); 1511 o.add(buildStorePage());
1129 return o; 1512 return o;
1130 } 1513 }
1131 1514
1132 checkUnnamed415(core.List<api.StorePage> o) { 1515 checkUnnamed2251(core.List<api.StorePage> o) {
1133 unittest.expect(o, unittest.hasLength(2)); 1516 unittest.expect(o, unittest.hasLength(2));
1134 checkStorePage(o[0]); 1517 checkStorePage(o[0]);
1135 checkStorePage(o[1]); 1518 checkStorePage(o[1]);
1136 } 1519 }
1137 1520
1138 core.int buildCounterStoreLayoutPagesListResponse = 0; 1521 core.int buildCounterStoreLayoutPagesListResponse = 0;
1139 buildStoreLayoutPagesListResponse() { 1522 buildStoreLayoutPagesListResponse() {
1140 var o = new api.StoreLayoutPagesListResponse(); 1523 var o = new api.StoreLayoutPagesListResponse();
1141 buildCounterStoreLayoutPagesListResponse++; 1524 buildCounterStoreLayoutPagesListResponse++;
1142 if (buildCounterStoreLayoutPagesListResponse < 3) { 1525 if (buildCounterStoreLayoutPagesListResponse < 3) {
1143 o.kind = "foo"; 1526 o.kind = "foo";
1144 o.page = buildUnnamed415(); 1527 o.page = buildUnnamed2251();
1145 } 1528 }
1146 buildCounterStoreLayoutPagesListResponse--; 1529 buildCounterStoreLayoutPagesListResponse--;
1147 return o; 1530 return o;
1148 } 1531 }
1149 1532
1150 checkStoreLayoutPagesListResponse(api.StoreLayoutPagesListResponse o) { 1533 checkStoreLayoutPagesListResponse(api.StoreLayoutPagesListResponse o) {
1151 buildCounterStoreLayoutPagesListResponse++; 1534 buildCounterStoreLayoutPagesListResponse++;
1152 if (buildCounterStoreLayoutPagesListResponse < 3) { 1535 if (buildCounterStoreLayoutPagesListResponse < 3) {
1153 unittest.expect(o.kind, unittest.equals('foo')); 1536 unittest.expect(o.kind, unittest.equals('foo'));
1154 checkUnnamed415(o.page); 1537 checkUnnamed2251(o.page);
1155 } 1538 }
1156 buildCounterStoreLayoutPagesListResponse--; 1539 buildCounterStoreLayoutPagesListResponse--;
1157 } 1540 }
1158 1541
1159 buildUnnamed416() { 1542 buildUnnamed2252() {
1160 var o = new core.List<core.String>(); 1543 var o = new core.List<core.String>();
1161 o.add("foo"); 1544 o.add("foo");
1162 o.add("foo"); 1545 o.add("foo");
1163 return o; 1546 return o;
1164 } 1547 }
1165 1548
1166 checkUnnamed416(core.List<core.String> o) { 1549 checkUnnamed2252(core.List<core.String> o) {
1167 unittest.expect(o, unittest.hasLength(2)); 1550 unittest.expect(o, unittest.hasLength(2));
1168 unittest.expect(o[0], unittest.equals('foo')); 1551 unittest.expect(o[0], unittest.equals('foo'));
1169 unittest.expect(o[1], unittest.equals('foo')); 1552 unittest.expect(o[1], unittest.equals('foo'));
1170 } 1553 }
1171 1554
1172 buildUnnamed417() { 1555 buildUnnamed2253() {
1173 var o = new core.List<api.LocalizedText>(); 1556 var o = new core.List<api.LocalizedText>();
1174 o.add(buildLocalizedText()); 1557 o.add(buildLocalizedText());
1175 o.add(buildLocalizedText()); 1558 o.add(buildLocalizedText());
1176 return o; 1559 return o;
1177 } 1560 }
1178 1561
1179 checkUnnamed417(core.List<api.LocalizedText> o) { 1562 checkUnnamed2253(core.List<api.LocalizedText> o) {
1180 unittest.expect(o, unittest.hasLength(2)); 1563 unittest.expect(o, unittest.hasLength(2));
1181 checkLocalizedText(o[0]); 1564 checkLocalizedText(o[0]);
1182 checkLocalizedText(o[1]); 1565 checkLocalizedText(o[1]);
1183 } 1566 }
1184 1567
1185 core.int buildCounterStorePage = 0; 1568 core.int buildCounterStorePage = 0;
1186 buildStorePage() { 1569 buildStorePage() {
1187 var o = new api.StorePage(); 1570 var o = new api.StorePage();
1188 buildCounterStorePage++; 1571 buildCounterStorePage++;
1189 if (buildCounterStorePage < 3) { 1572 if (buildCounterStorePage < 3) {
1190 o.id = "foo"; 1573 o.id = "foo";
1191 o.kind = "foo"; 1574 o.kind = "foo";
1192 o.link = buildUnnamed416(); 1575 o.link = buildUnnamed2252();
1193 o.name = buildUnnamed417(); 1576 o.name = buildUnnamed2253();
1194 } 1577 }
1195 buildCounterStorePage--; 1578 buildCounterStorePage--;
1196 return o; 1579 return o;
1197 } 1580 }
1198 1581
1199 checkStorePage(api.StorePage o) { 1582 checkStorePage(api.StorePage o) {
1200 buildCounterStorePage++; 1583 buildCounterStorePage++;
1201 if (buildCounterStorePage < 3) { 1584 if (buildCounterStorePage < 3) {
1202 unittest.expect(o.id, unittest.equals('foo')); 1585 unittest.expect(o.id, unittest.equals('foo'));
1203 unittest.expect(o.kind, unittest.equals('foo')); 1586 unittest.expect(o.kind, unittest.equals('foo'));
1204 checkUnnamed416(o.link); 1587 checkUnnamed2252(o.link);
1205 checkUnnamed417(o.name); 1588 checkUnnamed2253(o.name);
1206 } 1589 }
1207 buildCounterStorePage--; 1590 buildCounterStorePage--;
1208 } 1591 }
1209 1592
1210 core.int buildCounterTokenPagination = 0; 1593 core.int buildCounterTokenPagination = 0;
1211 buildTokenPagination() { 1594 buildTokenPagination() {
1212 var o = new api.TokenPagination(); 1595 var o = new api.TokenPagination();
1213 buildCounterTokenPagination++; 1596 buildCounterTokenPagination++;
1214 if (buildCounterTokenPagination < 3) { 1597 if (buildCounterTokenPagination < 3) {
1215 o.nextPageToken = "foo"; 1598 o.nextPageToken = "foo";
(...skipping 10 matching lines...) Expand all
1226 unittest.expect(o.previousPageToken, unittest.equals('foo')); 1609 unittest.expect(o.previousPageToken, unittest.equals('foo'));
1227 } 1610 }
1228 buildCounterTokenPagination--; 1611 buildCounterTokenPagination--;
1229 } 1612 }
1230 1613
1231 core.int buildCounterUser = 0; 1614 core.int buildCounterUser = 0;
1232 buildUser() { 1615 buildUser() {
1233 var o = new api.User(); 1616 var o = new api.User();
1234 buildCounterUser++; 1617 buildCounterUser++;
1235 if (buildCounterUser < 3) { 1618 if (buildCounterUser < 3) {
1619 o.accountIdentifier = "foo";
1620 o.accountType = "foo";
1621 o.displayName = "foo";
1236 o.id = "foo"; 1622 o.id = "foo";
1237 o.kind = "foo"; 1623 o.kind = "foo";
1624 o.managementType = "foo";
1238 o.primaryEmail = "foo"; 1625 o.primaryEmail = "foo";
1239 } 1626 }
1240 buildCounterUser--; 1627 buildCounterUser--;
1241 return o; 1628 return o;
1242 } 1629 }
1243 1630
1244 checkUser(api.User o) { 1631 checkUser(api.User o) {
1245 buildCounterUser++; 1632 buildCounterUser++;
1246 if (buildCounterUser < 3) { 1633 if (buildCounterUser < 3) {
1634 unittest.expect(o.accountIdentifier, unittest.equals('foo'));
1635 unittest.expect(o.accountType, unittest.equals('foo'));
1636 unittest.expect(o.displayName, unittest.equals('foo'));
1247 unittest.expect(o.id, unittest.equals('foo')); 1637 unittest.expect(o.id, unittest.equals('foo'));
1248 unittest.expect(o.kind, unittest.equals('foo')); 1638 unittest.expect(o.kind, unittest.equals('foo'));
1639 unittest.expect(o.managementType, unittest.equals('foo'));
1249 unittest.expect(o.primaryEmail, unittest.equals('foo')); 1640 unittest.expect(o.primaryEmail, unittest.equals('foo'));
1250 } 1641 }
1251 buildCounterUser--; 1642 buildCounterUser--;
1252 } 1643 }
1253 1644
1254 core.int buildCounterUserToken = 0; 1645 core.int buildCounterUserToken = 0;
1255 buildUserToken() { 1646 buildUserToken() {
1256 var o = new api.UserToken(); 1647 var o = new api.UserToken();
1257 buildCounterUserToken++; 1648 buildCounterUserToken++;
1258 if (buildCounterUserToken < 3) { 1649 if (buildCounterUserToken < 3) {
1259 o.kind = "foo"; 1650 o.kind = "foo";
1260 o.token = "foo"; 1651 o.token = "foo";
1261 o.userId = "foo"; 1652 o.userId = "foo";
1262 } 1653 }
1263 buildCounterUserToken--; 1654 buildCounterUserToken--;
1264 return o; 1655 return o;
1265 } 1656 }
1266 1657
1267 checkUserToken(api.UserToken o) { 1658 checkUserToken(api.UserToken o) {
1268 buildCounterUserToken++; 1659 buildCounterUserToken++;
1269 if (buildCounterUserToken < 3) { 1660 if (buildCounterUserToken < 3) {
1270 unittest.expect(o.kind, unittest.equals('foo')); 1661 unittest.expect(o.kind, unittest.equals('foo'));
1271 unittest.expect(o.token, unittest.equals('foo')); 1662 unittest.expect(o.token, unittest.equals('foo'));
1272 unittest.expect(o.userId, unittest.equals('foo')); 1663 unittest.expect(o.userId, unittest.equals('foo'));
1273 } 1664 }
1274 buildCounterUserToken--; 1665 buildCounterUserToken--;
1275 } 1666 }
1276 1667
1277 buildUnnamed418() { 1668 buildUnnamed2254() {
1278 var o = new core.List<api.User>(); 1669 var o = new core.List<api.User>();
1279 o.add(buildUser()); 1670 o.add(buildUser());
1280 o.add(buildUser()); 1671 o.add(buildUser());
1281 return o; 1672 return o;
1282 } 1673 }
1283 1674
1284 checkUnnamed418(core.List<api.User> o) { 1675 checkUnnamed2254(core.List<api.User> o) {
1285 unittest.expect(o, unittest.hasLength(2)); 1676 unittest.expect(o, unittest.hasLength(2));
1286 checkUser(o[0]); 1677 checkUser(o[0]);
1287 checkUser(o[1]); 1678 checkUser(o[1]);
1288 } 1679 }
1289 1680
1290 core.int buildCounterUsersListResponse = 0; 1681 core.int buildCounterUsersListResponse = 0;
1291 buildUsersListResponse() { 1682 buildUsersListResponse() {
1292 var o = new api.UsersListResponse(); 1683 var o = new api.UsersListResponse();
1293 buildCounterUsersListResponse++; 1684 buildCounterUsersListResponse++;
1294 if (buildCounterUsersListResponse < 3) { 1685 if (buildCounterUsersListResponse < 3) {
1295 o.kind = "foo"; 1686 o.kind = "foo";
1296 o.user = buildUnnamed418(); 1687 o.user = buildUnnamed2254();
1297 } 1688 }
1298 buildCounterUsersListResponse--; 1689 buildCounterUsersListResponse--;
1299 return o; 1690 return o;
1300 } 1691 }
1301 1692
1302 checkUsersListResponse(api.UsersListResponse o) { 1693 checkUsersListResponse(api.UsersListResponse o) {
1303 buildCounterUsersListResponse++; 1694 buildCounterUsersListResponse++;
1304 if (buildCounterUsersListResponse < 3) { 1695 if (buildCounterUsersListResponse < 3) {
1305 unittest.expect(o.kind, unittest.equals('foo')); 1696 unittest.expect(o.kind, unittest.equals('foo'));
1306 checkUnnamed418(o.user); 1697 checkUnnamed2254(o.user);
1307 } 1698 }
1308 buildCounterUsersListResponse--; 1699 buildCounterUsersListResponse--;
1309 } 1700 }
1310 1701
1311 1702
1312 main() { 1703 main() {
1704 unittest.group("obj-schema-Administrator", () {
1705 unittest.test("to-json--from-json", () {
1706 var o = buildAdministrator();
1707 var od = new api.Administrator.fromJson(o.toJson());
1708 checkAdministrator(od);
1709 });
1710 });
1711
1712
1313 unittest.group("obj-schema-AppRestrictionsSchema", () { 1713 unittest.group("obj-schema-AppRestrictionsSchema", () {
1314 unittest.test("to-json--from-json", () { 1714 unittest.test("to-json--from-json", () {
1315 var o = buildAppRestrictionsSchema(); 1715 var o = buildAppRestrictionsSchema();
1316 var od = new api.AppRestrictionsSchema.fromJson(o.toJson()); 1716 var od = new api.AppRestrictionsSchema.fromJson(o.toJson());
1317 checkAppRestrictionsSchema(od); 1717 checkAppRestrictionsSchema(od);
1318 }); 1718 });
1319 }); 1719 });
1320 1720
1321 1721
1722 unittest.group("obj-schema-AppRestrictionsSchemaChangeEvent", () {
1723 unittest.test("to-json--from-json", () {
1724 var o = buildAppRestrictionsSchemaChangeEvent();
1725 var od = new api.AppRestrictionsSchemaChangeEvent.fromJson(o.toJson());
1726 checkAppRestrictionsSchemaChangeEvent(od);
1727 });
1728 });
1729
1730
1322 unittest.group("obj-schema-AppRestrictionsSchemaRestriction", () { 1731 unittest.group("obj-schema-AppRestrictionsSchemaRestriction", () {
1323 unittest.test("to-json--from-json", () { 1732 unittest.test("to-json--from-json", () {
1324 var o = buildAppRestrictionsSchemaRestriction(); 1733 var o = buildAppRestrictionsSchemaRestriction();
1325 var od = new api.AppRestrictionsSchemaRestriction.fromJson(o.toJson()); 1734 var od = new api.AppRestrictionsSchemaRestriction.fromJson(o.toJson());
1326 checkAppRestrictionsSchemaRestriction(od); 1735 checkAppRestrictionsSchemaRestriction(od);
1327 }); 1736 });
1328 }); 1737 });
1329 1738
1330 1739
1331 unittest.group("obj-schema-AppRestrictionsSchemaRestrictionRestrictionValue", () { 1740 unittest.group("obj-schema-AppRestrictionsSchemaRestrictionRestrictionValue", () {
1332 unittest.test("to-json--from-json", () { 1741 unittest.test("to-json--from-json", () {
1333 var o = buildAppRestrictionsSchemaRestrictionRestrictionValue(); 1742 var o = buildAppRestrictionsSchemaRestrictionRestrictionValue();
1334 var od = new api.AppRestrictionsSchemaRestrictionRestrictionValue.fromJson (o.toJson()); 1743 var od = new api.AppRestrictionsSchemaRestrictionRestrictionValue.fromJson (o.toJson());
1335 checkAppRestrictionsSchemaRestrictionRestrictionValue(od); 1744 checkAppRestrictionsSchemaRestrictionRestrictionValue(od);
1336 }); 1745 });
1337 }); 1746 });
1338 1747
1339 1748
1749 unittest.group("obj-schema-AppUpdateEvent", () {
1750 unittest.test("to-json--from-json", () {
1751 var o = buildAppUpdateEvent();
1752 var od = new api.AppUpdateEvent.fromJson(o.toJson());
1753 checkAppUpdateEvent(od);
1754 });
1755 });
1756
1757
1340 unittest.group("obj-schema-AppVersion", () { 1758 unittest.group("obj-schema-AppVersion", () {
1341 unittest.test("to-json--from-json", () { 1759 unittest.test("to-json--from-json", () {
1342 var o = buildAppVersion(); 1760 var o = buildAppVersion();
1343 var od = new api.AppVersion.fromJson(o.toJson()); 1761 var od = new api.AppVersion.fromJson(o.toJson());
1344 checkAppVersion(od); 1762 checkAppVersion(od);
1345 }); 1763 });
1346 }); 1764 });
1347 1765
1348 1766
1349 unittest.group("obj-schema-ApprovalUrlInfo", () { 1767 unittest.group("obj-schema-ApprovalUrlInfo", () {
1350 unittest.test("to-json--from-json", () { 1768 unittest.test("to-json--from-json", () {
1351 var o = buildApprovalUrlInfo(); 1769 var o = buildApprovalUrlInfo();
1352 var od = new api.ApprovalUrlInfo.fromJson(o.toJson()); 1770 var od = new api.ApprovalUrlInfo.fromJson(o.toJson());
1353 checkApprovalUrlInfo(od); 1771 checkApprovalUrlInfo(od);
1354 }); 1772 });
1355 }); 1773 });
1356 1774
1357 1775
1776 unittest.group("obj-schema-AuthenticationToken", () {
1777 unittest.test("to-json--from-json", () {
1778 var o = buildAuthenticationToken();
1779 var od = new api.AuthenticationToken.fromJson(o.toJson());
1780 checkAuthenticationToken(od);
1781 });
1782 });
1783
1784
1358 unittest.group("obj-schema-Collection", () { 1785 unittest.group("obj-schema-Collection", () {
1359 unittest.test("to-json--from-json", () { 1786 unittest.test("to-json--from-json", () {
1360 var o = buildCollection(); 1787 var o = buildCollection();
1361 var od = new api.Collection.fromJson(o.toJson()); 1788 var od = new api.Collection.fromJson(o.toJson());
1362 checkCollection(od); 1789 checkCollection(od);
1363 }); 1790 });
1364 }); 1791 });
1365 1792
1366 1793
1367 unittest.group("obj-schema-CollectionViewersListResponse", () { 1794 unittest.group("obj-schema-CollectionViewersListResponse", () {
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
1492 1919
1493 unittest.group("obj-schema-Install", () { 1920 unittest.group("obj-schema-Install", () {
1494 unittest.test("to-json--from-json", () { 1921 unittest.test("to-json--from-json", () {
1495 var o = buildInstall(); 1922 var o = buildInstall();
1496 var od = new api.Install.fromJson(o.toJson()); 1923 var od = new api.Install.fromJson(o.toJson());
1497 checkInstall(od); 1924 checkInstall(od);
1498 }); 1925 });
1499 }); 1926 });
1500 1927
1501 1928
1929 unittest.group("obj-schema-InstallFailureEvent", () {
1930 unittest.test("to-json--from-json", () {
1931 var o = buildInstallFailureEvent();
1932 var od = new api.InstallFailureEvent.fromJson(o.toJson());
1933 checkInstallFailureEvent(od);
1934 });
1935 });
1936
1937
1502 unittest.group("obj-schema-InstallsListResponse", () { 1938 unittest.group("obj-schema-InstallsListResponse", () {
1503 unittest.test("to-json--from-json", () { 1939 unittest.test("to-json--from-json", () {
1504 var o = buildInstallsListResponse(); 1940 var o = buildInstallsListResponse();
1505 var od = new api.InstallsListResponse.fromJson(o.toJson()); 1941 var od = new api.InstallsListResponse.fromJson(o.toJson());
1506 checkInstallsListResponse(od); 1942 checkInstallsListResponse(od);
1507 }); 1943 });
1508 }); 1944 });
1509 1945
1510 1946
1511 unittest.group("obj-schema-LocalizedText", () { 1947 unittest.group("obj-schema-LocalizedText", () {
1512 unittest.test("to-json--from-json", () { 1948 unittest.test("to-json--from-json", () {
1513 var o = buildLocalizedText(); 1949 var o = buildLocalizedText();
1514 var od = new api.LocalizedText.fromJson(o.toJson()); 1950 var od = new api.LocalizedText.fromJson(o.toJson());
1515 checkLocalizedText(od); 1951 checkLocalizedText(od);
1516 }); 1952 });
1517 }); 1953 });
1518 1954
1519 1955
1956 unittest.group("obj-schema-NewPermissionsEvent", () {
1957 unittest.test("to-json--from-json", () {
1958 var o = buildNewPermissionsEvent();
1959 var od = new api.NewPermissionsEvent.fromJson(o.toJson());
1960 checkNewPermissionsEvent(od);
1961 });
1962 });
1963
1964
1965 unittest.group("obj-schema-Notification", () {
1966 unittest.test("to-json--from-json", () {
1967 var o = buildNotification();
1968 var od = new api.Notification.fromJson(o.toJson());
1969 checkNotification(od);
1970 });
1971 });
1972
1973
1974 unittest.group("obj-schema-NotificationSet", () {
1975 unittest.test("to-json--from-json", () {
1976 var o = buildNotificationSet();
1977 var od = new api.NotificationSet.fromJson(o.toJson());
1978 checkNotificationSet(od);
1979 });
1980 });
1981
1982
1520 unittest.group("obj-schema-PageInfo", () { 1983 unittest.group("obj-schema-PageInfo", () {
1521 unittest.test("to-json--from-json", () { 1984 unittest.test("to-json--from-json", () {
1522 var o = buildPageInfo(); 1985 var o = buildPageInfo();
1523 var od = new api.PageInfo.fromJson(o.toJson()); 1986 var od = new api.PageInfo.fromJson(o.toJson());
1524 checkPageInfo(od); 1987 checkPageInfo(od);
1525 }); 1988 });
1526 }); 1989 });
1527 1990
1528 1991
1529 unittest.group("obj-schema-Permission", () { 1992 unittest.group("obj-schema-Permission", () {
1530 unittest.test("to-json--from-json", () { 1993 unittest.test("to-json--from-json", () {
1531 var o = buildPermission(); 1994 var o = buildPermission();
1532 var od = new api.Permission.fromJson(o.toJson()); 1995 var od = new api.Permission.fromJson(o.toJson());
1533 checkPermission(od); 1996 checkPermission(od);
1534 }); 1997 });
1535 }); 1998 });
1536 1999
1537 2000
1538 unittest.group("obj-schema-Product", () { 2001 unittest.group("obj-schema-Product", () {
1539 unittest.test("to-json--from-json", () { 2002 unittest.test("to-json--from-json", () {
1540 var o = buildProduct(); 2003 var o = buildProduct();
1541 var od = new api.Product.fromJson(o.toJson()); 2004 var od = new api.Product.fromJson(o.toJson());
1542 checkProduct(od); 2005 checkProduct(od);
1543 }); 2006 });
1544 }); 2007 });
1545 2008
1546 2009
2010 unittest.group("obj-schema-ProductApprovalEvent", () {
2011 unittest.test("to-json--from-json", () {
2012 var o = buildProductApprovalEvent();
2013 var od = new api.ProductApprovalEvent.fromJson(o.toJson());
2014 checkProductApprovalEvent(od);
2015 });
2016 });
2017
2018
2019 unittest.group("obj-schema-ProductAvailabilityChangeEvent", () {
2020 unittest.test("to-json--from-json", () {
2021 var o = buildProductAvailabilityChangeEvent();
2022 var od = new api.ProductAvailabilityChangeEvent.fromJson(o.toJson());
2023 checkProductAvailabilityChangeEvent(od);
2024 });
2025 });
2026
2027
1547 unittest.group("obj-schema-ProductPermission", () { 2028 unittest.group("obj-schema-ProductPermission", () {
1548 unittest.test("to-json--from-json", () { 2029 unittest.test("to-json--from-json", () {
1549 var o = buildProductPermission(); 2030 var o = buildProductPermission();
1550 var od = new api.ProductPermission.fromJson(o.toJson()); 2031 var od = new api.ProductPermission.fromJson(o.toJson());
1551 checkProductPermission(od); 2032 checkProductPermission(od);
1552 }); 2033 });
1553 }); 2034 });
1554 2035
1555 2036
1556 unittest.group("obj-schema-ProductPermissions", () { 2037 unittest.group("obj-schema-ProductPermissions", () {
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
1591 2072
1592 unittest.group("obj-schema-ProductsListResponse", () { 2073 unittest.group("obj-schema-ProductsListResponse", () {
1593 unittest.test("to-json--from-json", () { 2074 unittest.test("to-json--from-json", () {
1594 var o = buildProductsListResponse(); 2075 var o = buildProductsListResponse();
1595 var od = new api.ProductsListResponse.fromJson(o.toJson()); 2076 var od = new api.ProductsListResponse.fromJson(o.toJson());
1596 checkProductsListResponse(od); 2077 checkProductsListResponse(od);
1597 }); 2078 });
1598 }); 2079 });
1599 2080
1600 2081
2082 unittest.group("obj-schema-ServiceAccount", () {
2083 unittest.test("to-json--from-json", () {
2084 var o = buildServiceAccount();
2085 var od = new api.ServiceAccount.fromJson(o.toJson());
2086 checkServiceAccount(od);
2087 });
2088 });
2089
2090
2091 unittest.group("obj-schema-ServiceAccountKey", () {
2092 unittest.test("to-json--from-json", () {
2093 var o = buildServiceAccountKey();
2094 var od = new api.ServiceAccountKey.fromJson(o.toJson());
2095 checkServiceAccountKey(od);
2096 });
2097 });
2098
2099
2100 unittest.group("obj-schema-ServiceAccountKeysListResponse", () {
2101 unittest.test("to-json--from-json", () {
2102 var o = buildServiceAccountKeysListResponse();
2103 var od = new api.ServiceAccountKeysListResponse.fromJson(o.toJson());
2104 checkServiceAccountKeysListResponse(od);
2105 });
2106 });
2107
2108
2109 unittest.group("obj-schema-SignupInfo", () {
2110 unittest.test("to-json--from-json", () {
2111 var o = buildSignupInfo();
2112 var od = new api.SignupInfo.fromJson(o.toJson());
2113 checkSignupInfo(od);
2114 });
2115 });
2116
2117
1601 unittest.group("obj-schema-StoreCluster", () { 2118 unittest.group("obj-schema-StoreCluster", () {
1602 unittest.test("to-json--from-json", () { 2119 unittest.test("to-json--from-json", () {
1603 var o = buildStoreCluster(); 2120 var o = buildStoreCluster();
1604 var od = new api.StoreCluster.fromJson(o.toJson()); 2121 var od = new api.StoreCluster.fromJson(o.toJson());
1605 checkStoreCluster(od); 2122 checkStoreCluster(od);
1606 }); 2123 });
1607 }); 2124 });
1608 2125
1609 2126
1610 unittest.group("obj-schema-StoreLayout", () { 2127 unittest.group("obj-schema-StoreLayout", () {
(...skipping 1013 matching lines...) Expand 10 before | Expand all | Expand 10 after
2624 }), true); 3141 }), true);
2625 res.setState(arg_request, arg_enterpriseId, arg_userId, arg_deviceId).then (unittest.expectAsync(((api.DeviceState response) { 3142 res.setState(arg_request, arg_enterpriseId, arg_userId, arg_deviceId).then (unittest.expectAsync(((api.DeviceState response) {
2626 checkDeviceState(response); 3143 checkDeviceState(response);
2627 }))); 3144 })));
2628 }); 3145 });
2629 3146
2630 }); 3147 });
2631 3148
2632 3149
2633 unittest.group("resource-EnterprisesResourceApi", () { 3150 unittest.group("resource-EnterprisesResourceApi", () {
2634 unittest.test("method--delete", () { 3151 unittest.test("method--acknowledgeNotificationSet", () {
2635 3152
2636 var mock = new HttpServerMock(); 3153 var mock = new HttpServerMock();
2637 api.EnterprisesResourceApi res = new api.AndroidenterpriseApi(mock).enterp rises; 3154 api.EnterprisesResourceApi res = new api.AndroidenterpriseApi(mock).enterp rises;
2638 var arg_enterpriseId = "foo"; 3155 var arg_notificationSetId = "foo";
2639 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 3156 mock.register(unittest.expectAsync((http.BaseRequest req, json) {
2640 var path = (req.url).path; 3157 var path = (req.url).path;
2641 var pathOffset = 0; 3158 var pathOffset = 0;
2642 var index; 3159 var index;
2643 var subPart; 3160 var subPart;
2644 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 3161 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
2645 pathOffset += 1; 3162 pathOffset += 1;
2646 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq uals("androidenterprise/v1/")); 3163 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq uals("androidenterprise/v1/"));
2647 pathOffset += 21; 3164 pathOffset += 21;
2648 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq uals("enterprises/")); 3165 unittest.expect(path.substring(pathOffset, pathOffset + 38), unittest.eq uals("enterprises/acknowledgeNotificationSet"));
2649 pathOffset += 12; 3166 pathOffset += 38;
2650 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset));
2651 pathOffset = path.length;
2652 unittest.expect(subPart, unittest.equals("$arg_enterpriseId"));
2653 3167
2654 var query = (req.url).query; 3168 var query = (req.url).query;
2655 var queryOffset = 0; 3169 var queryOffset = 0;
2656 var queryMap = {}; 3170 var queryMap = {};
2657 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); 3171 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
2658 parseBool(n) { 3172 parseBool(n) {
2659 if (n == "true") return true; 3173 if (n == "true") return true;
2660 if (n == "false") return false; 3174 if (n == "false") return false;
2661 if (n == null) return null; 3175 if (n == null) return null;
2662 throw new core.ArgumentError("Invalid boolean: $n"); 3176 throw new core.ArgumentError("Invalid boolean: $n");
2663 } 3177 }
2664 if (query.length > 0) { 3178 if (query.length > 0) {
2665 for (var part in query.split("&")) { 3179 for (var part in query.split("&")) {
2666 var keyvalue = part.split("="); 3180 var keyvalue = part.split("=");
2667 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1])); 3181 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1]));
2668 } 3182 }
2669 } 3183 }
3184 unittest.expect(queryMap["notificationSetId"].first, unittest.equals(arg _notificationSetId));
2670 3185
2671 3186
2672 var h = { 3187 var h = {
2673 "content-type" : "application/json; charset=utf-8", 3188 "content-type" : "application/json; charset=utf-8",
2674 }; 3189 };
2675 var resp = ""; 3190 var resp = "";
2676 return new async.Future.value(stringResponse(200, h, resp)); 3191 return new async.Future.value(stringResponse(200, h, resp));
2677 }), true); 3192 }), true);
3193 res.acknowledgeNotificationSet(notificationSetId: arg_notificationSetId).t hen(unittest.expectAsync((_) {}));
3194 });
3195
3196 unittest.test("method--completeSignup", () {
3197
3198 var mock = new HttpServerMock();
3199 api.EnterprisesResourceApi res = new api.AndroidenterpriseApi(mock).enterp rises;
3200 var arg_completionToken = "foo";
3201 var arg_enterpriseToken = "foo";
3202 mock.register(unittest.expectAsync((http.BaseRequest req, json) {
3203 var path = (req.url).path;
3204 var pathOffset = 0;
3205 var index;
3206 var subPart;
3207 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
3208 pathOffset += 1;
3209 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq uals("androidenterprise/v1/"));
3210 pathOffset += 21;
3211 unittest.expect(path.substring(pathOffset, pathOffset + 26), unittest.eq uals("enterprises/completeSignup"));
3212 pathOffset += 26;
3213
3214 var query = (req.url).query;
3215 var queryOffset = 0;
3216 var queryMap = {};
3217 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
3218 parseBool(n) {
3219 if (n == "true") return true;
3220 if (n == "false") return false;
3221 if (n == null) return null;
3222 throw new core.ArgumentError("Invalid boolean: $n");
3223 }
3224 if (query.length > 0) {
3225 for (var part in query.split("&")) {
3226 var keyvalue = part.split("=");
3227 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1]));
3228 }
3229 }
3230 unittest.expect(queryMap["completionToken"].first, unittest.equals(arg_c ompletionToken));
3231 unittest.expect(queryMap["enterpriseToken"].first, unittest.equals(arg_e nterpriseToken));
3232
3233
3234 var h = {
3235 "content-type" : "application/json; charset=utf-8",
3236 };
3237 var resp = convert.JSON.encode(buildEnterprise());
3238 return new async.Future.value(stringResponse(200, h, resp));
3239 }), true);
3240 res.completeSignup(completionToken: arg_completionToken, enterpriseToken: arg_enterpriseToken).then(unittest.expectAsync(((api.Enterprise response) {
3241 checkEnterprise(response);
3242 })));
3243 });
3244
3245 unittest.test("method--delete", () {
3246
3247 var mock = new HttpServerMock();
3248 api.EnterprisesResourceApi res = new api.AndroidenterpriseApi(mock).enterp rises;
3249 var arg_enterpriseId = "foo";
3250 mock.register(unittest.expectAsync((http.BaseRequest req, json) {
3251 var path = (req.url).path;
3252 var pathOffset = 0;
3253 var index;
3254 var subPart;
3255 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
3256 pathOffset += 1;
3257 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq uals("androidenterprise/v1/"));
3258 pathOffset += 21;
3259 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq uals("enterprises/"));
3260 pathOffset += 12;
3261 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset));
3262 pathOffset = path.length;
3263 unittest.expect(subPart, unittest.equals("$arg_enterpriseId"));
3264
3265 var query = (req.url).query;
3266 var queryOffset = 0;
3267 var queryMap = {};
3268 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
3269 parseBool(n) {
3270 if (n == "true") return true;
3271 if (n == "false") return false;
3272 if (n == null) return null;
3273 throw new core.ArgumentError("Invalid boolean: $n");
3274 }
3275 if (query.length > 0) {
3276 for (var part in query.split("&")) {
3277 var keyvalue = part.split("=");
3278 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1]));
3279 }
3280 }
3281
3282
3283 var h = {
3284 "content-type" : "application/json; charset=utf-8",
3285 };
3286 var resp = "";
3287 return new async.Future.value(stringResponse(200, h, resp));
3288 }), true);
2678 res.delete(arg_enterpriseId).then(unittest.expectAsync((_) {})); 3289 res.delete(arg_enterpriseId).then(unittest.expectAsync((_) {}));
2679 }); 3290 });
2680 3291
2681 unittest.test("method--enroll", () { 3292 unittest.test("method--enroll", () {
2682 3293
2683 var mock = new HttpServerMock(); 3294 var mock = new HttpServerMock();
2684 api.EnterprisesResourceApi res = new api.AndroidenterpriseApi(mock).enterp rises; 3295 api.EnterprisesResourceApi res = new api.AndroidenterpriseApi(mock).enterp rises;
2685 var arg_request = buildEnterprise(); 3296 var arg_request = buildEnterprise();
2686 var arg_token = "foo"; 3297 var arg_token = "foo";
2687 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 3298 mock.register(unittest.expectAsync((http.BaseRequest req, json) {
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
2722 "content-type" : "application/json; charset=utf-8", 3333 "content-type" : "application/json; charset=utf-8",
2723 }; 3334 };
2724 var resp = convert.JSON.encode(buildEnterprise()); 3335 var resp = convert.JSON.encode(buildEnterprise());
2725 return new async.Future.value(stringResponse(200, h, resp)); 3336 return new async.Future.value(stringResponse(200, h, resp));
2726 }), true); 3337 }), true);
2727 res.enroll(arg_request, arg_token).then(unittest.expectAsync(((api.Enterpr ise response) { 3338 res.enroll(arg_request, arg_token).then(unittest.expectAsync(((api.Enterpr ise response) {
2728 checkEnterprise(response); 3339 checkEnterprise(response);
2729 }))); 3340 })));
2730 }); 3341 });
2731 3342
3343 unittest.test("method--generateSignupUrl", () {
3344
3345 var mock = new HttpServerMock();
3346 api.EnterprisesResourceApi res = new api.AndroidenterpriseApi(mock).enterp rises;
3347 var arg_callbackUrl = "foo";
3348 mock.register(unittest.expectAsync((http.BaseRequest req, json) {
3349 var path = (req.url).path;
3350 var pathOffset = 0;
3351 var index;
3352 var subPart;
3353 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
3354 pathOffset += 1;
3355 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq uals("androidenterprise/v1/"));
3356 pathOffset += 21;
3357 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq uals("enterprises/signupUrl"));
3358 pathOffset += 21;
3359
3360 var query = (req.url).query;
3361 var queryOffset = 0;
3362 var queryMap = {};
3363 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
3364 parseBool(n) {
3365 if (n == "true") return true;
3366 if (n == "false") return false;
3367 if (n == null) return null;
3368 throw new core.ArgumentError("Invalid boolean: $n");
3369 }
3370 if (query.length > 0) {
3371 for (var part in query.split("&")) {
3372 var keyvalue = part.split("=");
3373 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1]));
3374 }
3375 }
3376 unittest.expect(queryMap["callbackUrl"].first, unittest.equals(arg_callb ackUrl));
3377
3378
3379 var h = {
3380 "content-type" : "application/json; charset=utf-8",
3381 };
3382 var resp = convert.JSON.encode(buildSignupInfo());
3383 return new async.Future.value(stringResponse(200, h, resp));
3384 }), true);
3385 res.generateSignupUrl(callbackUrl: arg_callbackUrl).then(unittest.expectAs ync(((api.SignupInfo response) {
3386 checkSignupInfo(response);
3387 })));
3388 });
3389
2732 unittest.test("method--get", () { 3390 unittest.test("method--get", () {
2733 3391
2734 var mock = new HttpServerMock(); 3392 var mock = new HttpServerMock();
2735 api.EnterprisesResourceApi res = new api.AndroidenterpriseApi(mock).enterp rises; 3393 api.EnterprisesResourceApi res = new api.AndroidenterpriseApi(mock).enterp rises;
2736 var arg_enterpriseId = "foo"; 3394 var arg_enterpriseId = "foo";
2737 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 3395 mock.register(unittest.expectAsync((http.BaseRequest req, json) {
2738 var path = (req.url).path; 3396 var path = (req.url).path;
2739 var pathOffset = 0; 3397 var pathOffset = 0;
2740 var index; 3398 var index;
2741 var subPart; 3399 var subPart;
(...skipping 29 matching lines...) Expand all
2771 "content-type" : "application/json; charset=utf-8", 3429 "content-type" : "application/json; charset=utf-8",
2772 }; 3430 };
2773 var resp = convert.JSON.encode(buildEnterprise()); 3431 var resp = convert.JSON.encode(buildEnterprise());
2774 return new async.Future.value(stringResponse(200, h, resp)); 3432 return new async.Future.value(stringResponse(200, h, resp));
2775 }), true); 3433 }), true);
2776 res.get(arg_enterpriseId).then(unittest.expectAsync(((api.Enterprise respo nse) { 3434 res.get(arg_enterpriseId).then(unittest.expectAsync(((api.Enterprise respo nse) {
2777 checkEnterprise(response); 3435 checkEnterprise(response);
2778 }))); 3436 })));
2779 }); 3437 });
2780 3438
3439 unittest.test("method--getServiceAccount", () {
3440
3441 var mock = new HttpServerMock();
3442 api.EnterprisesResourceApi res = new api.AndroidenterpriseApi(mock).enterp rises;
3443 var arg_enterpriseId = "foo";
3444 var arg_keyType = "foo";
3445 mock.register(unittest.expectAsync((http.BaseRequest req, json) {
3446 var path = (req.url).path;
3447 var pathOffset = 0;
3448 var index;
3449 var subPart;
3450 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
3451 pathOffset += 1;
3452 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq uals("androidenterprise/v1/"));
3453 pathOffset += 21;
3454 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq uals("enterprises/"));
3455 pathOffset += 12;
3456 index = path.indexOf("/serviceAccount", pathOffset);
3457 unittest.expect(index >= 0, unittest.isTrue);
3458 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index ));
3459 pathOffset = index;
3460 unittest.expect(subPart, unittest.equals("$arg_enterpriseId"));
3461 unittest.expect(path.substring(pathOffset, pathOffset + 15), unittest.eq uals("/serviceAccount"));
3462 pathOffset += 15;
3463
3464 var query = (req.url).query;
3465 var queryOffset = 0;
3466 var queryMap = {};
3467 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
3468 parseBool(n) {
3469 if (n == "true") return true;
3470 if (n == "false") return false;
3471 if (n == null) return null;
3472 throw new core.ArgumentError("Invalid boolean: $n");
3473 }
3474 if (query.length > 0) {
3475 for (var part in query.split("&")) {
3476 var keyvalue = part.split("=");
3477 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1]));
3478 }
3479 }
3480 unittest.expect(queryMap["keyType"].first, unittest.equals(arg_keyType)) ;
3481
3482
3483 var h = {
3484 "content-type" : "application/json; charset=utf-8",
3485 };
3486 var resp = convert.JSON.encode(buildServiceAccount());
3487 return new async.Future.value(stringResponse(200, h, resp));
3488 }), true);
3489 res.getServiceAccount(arg_enterpriseId, keyType: arg_keyType).then(unittes t.expectAsync(((api.ServiceAccount response) {
3490 checkServiceAccount(response);
3491 })));
3492 });
3493
2781 unittest.test("method--getStoreLayout", () { 3494 unittest.test("method--getStoreLayout", () {
2782 3495
2783 var mock = new HttpServerMock(); 3496 var mock = new HttpServerMock();
2784 api.EnterprisesResourceApi res = new api.AndroidenterpriseApi(mock).enterp rises; 3497 api.EnterprisesResourceApi res = new api.AndroidenterpriseApi(mock).enterp rises;
2785 var arg_enterpriseId = "foo"; 3498 var arg_enterpriseId = "foo";
2786 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 3499 mock.register(unittest.expectAsync((http.BaseRequest req, json) {
2787 var path = (req.url).path; 3500 var path = (req.url).path;
2788 var pathOffset = 0; 3501 var pathOffset = 0;
2789 var index; 3502 var index;
2790 var subPart; 3503 var subPart;
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
2922 "content-type" : "application/json; charset=utf-8", 3635 "content-type" : "application/json; charset=utf-8",
2923 }; 3636 };
2924 var resp = convert.JSON.encode(buildEnterprisesListResponse()); 3637 var resp = convert.JSON.encode(buildEnterprisesListResponse());
2925 return new async.Future.value(stringResponse(200, h, resp)); 3638 return new async.Future.value(stringResponse(200, h, resp));
2926 }), true); 3639 }), true);
2927 res.list(arg_domain).then(unittest.expectAsync(((api.EnterprisesListRespon se response) { 3640 res.list(arg_domain).then(unittest.expectAsync(((api.EnterprisesListRespon se response) {
2928 checkEnterprisesListResponse(response); 3641 checkEnterprisesListResponse(response);
2929 }))); 3642 })));
2930 }); 3643 });
2931 3644
3645 unittest.test("method--pullNotificationSet", () {
3646
3647 var mock = new HttpServerMock();
3648 api.EnterprisesResourceApi res = new api.AndroidenterpriseApi(mock).enterp rises;
3649 var arg_requestMode = "foo";
3650 mock.register(unittest.expectAsync((http.BaseRequest req, json) {
3651 var path = (req.url).path;
3652 var pathOffset = 0;
3653 var index;
3654 var subPart;
3655 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
3656 pathOffset += 1;
3657 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq uals("androidenterprise/v1/"));
3658 pathOffset += 21;
3659 unittest.expect(path.substring(pathOffset, pathOffset + 31), unittest.eq uals("enterprises/pullNotificationSet"));
3660 pathOffset += 31;
3661
3662 var query = (req.url).query;
3663 var queryOffset = 0;
3664 var queryMap = {};
3665 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
3666 parseBool(n) {
3667 if (n == "true") return true;
3668 if (n == "false") return false;
3669 if (n == null) return null;
3670 throw new core.ArgumentError("Invalid boolean: $n");
3671 }
3672 if (query.length > 0) {
3673 for (var part in query.split("&")) {
3674 var keyvalue = part.split("=");
3675 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1]));
3676 }
3677 }
3678 unittest.expect(queryMap["requestMode"].first, unittest.equals(arg_reque stMode));
3679
3680
3681 var h = {
3682 "content-type" : "application/json; charset=utf-8",
3683 };
3684 var resp = convert.JSON.encode(buildNotificationSet());
3685 return new async.Future.value(stringResponse(200, h, resp));
3686 }), true);
3687 res.pullNotificationSet(requestMode: arg_requestMode).then(unittest.expect Async(((api.NotificationSet response) {
3688 checkNotificationSet(response);
3689 })));
3690 });
3691
2932 unittest.test("method--sendTestPushNotification", () { 3692 unittest.test("method--sendTestPushNotification", () {
2933 3693
2934 var mock = new HttpServerMock(); 3694 var mock = new HttpServerMock();
2935 api.EnterprisesResourceApi res = new api.AndroidenterpriseApi(mock).enterp rises; 3695 api.EnterprisesResourceApi res = new api.AndroidenterpriseApi(mock).enterp rises;
2936 var arg_enterpriseId = "foo"; 3696 var arg_enterpriseId = "foo";
2937 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 3697 mock.register(unittest.expectAsync((http.BaseRequest req, json) {
2938 var path = (req.url).path; 3698 var path = (req.url).path;
2939 var pathOffset = 0; 3699 var pathOffset = 0;
2940 var index; 3700 var index;
2941 var subPart; 3701 var subPart;
(...skipping 1514 matching lines...) Expand 10 before | Expand all | Expand 10 after
4456 "content-type" : "application/json; charset=utf-8", 5216 "content-type" : "application/json; charset=utf-8",
4457 }; 5217 };
4458 var resp = convert.JSON.encode(buildProductsListResponse()); 5218 var resp = convert.JSON.encode(buildProductsListResponse());
4459 return new async.Future.value(stringResponse(200, h, resp)); 5219 return new async.Future.value(stringResponse(200, h, resp));
4460 }), true); 5220 }), true);
4461 res.list(arg_enterpriseId, approved: arg_approved, language: arg_language, maxResults: arg_maxResults, query: arg_query, token: arg_token).then(unittest.e xpectAsync(((api.ProductsListResponse response) { 5221 res.list(arg_enterpriseId, approved: arg_approved, language: arg_language, maxResults: arg_maxResults, query: arg_query, token: arg_token).then(unittest.e xpectAsync(((api.ProductsListResponse response) {
4462 checkProductsListResponse(response); 5222 checkProductsListResponse(response);
4463 }))); 5223 })));
4464 }); 5224 });
4465 5225
4466 unittest.test("method--updatePermissions", () { 5226 unittest.test("method--unapprove", () {
4467 5227
4468 var mock = new HttpServerMock(); 5228 var mock = new HttpServerMock();
4469 api.ProductsResourceApi res = new api.AndroidenterpriseApi(mock).products; 5229 api.ProductsResourceApi res = new api.AndroidenterpriseApi(mock).products;
4470 var arg_request = buildProductPermissions();
4471 var arg_enterpriseId = "foo"; 5230 var arg_enterpriseId = "foo";
4472 var arg_productId = "foo"; 5231 var arg_productId = "foo";
4473 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 5232 mock.register(unittest.expectAsync((http.BaseRequest req, json) {
4474 var obj = new api.ProductPermissions.fromJson(json);
4475 checkProductPermissions(obj);
4476
4477 var path = (req.url).path; 5233 var path = (req.url).path;
4478 var pathOffset = 0; 5234 var pathOffset = 0;
4479 var index; 5235 var index;
4480 var subPart; 5236 var subPart;
4481 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 5237 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
4482 pathOffset += 1; 5238 pathOffset += 1;
4483 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq uals("androidenterprise/v1/")); 5239 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq uals("androidenterprise/v1/"));
4484 pathOffset += 21; 5240 pathOffset += 21;
4485 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq uals("enterprises/")); 5241 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq uals("enterprises/"));
4486 pathOffset += 12; 5242 pathOffset += 12;
4487 index = path.indexOf("/products/", pathOffset); 5243 index = path.indexOf("/products/", pathOffset);
4488 unittest.expect(index >= 0, unittest.isTrue); 5244 unittest.expect(index >= 0, unittest.isTrue);
4489 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index )); 5245 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index ));
4490 pathOffset = index; 5246 pathOffset = index;
4491 unittest.expect(subPart, unittest.equals("$arg_enterpriseId")); 5247 unittest.expect(subPart, unittest.equals("$arg_enterpriseId"));
4492 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq uals("/products/")); 5248 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq uals("/products/"));
4493 pathOffset += 10; 5249 pathOffset += 10;
4494 index = path.indexOf("/permissions", pathOffset); 5250 index = path.indexOf("/unapprove", pathOffset);
4495 unittest.expect(index >= 0, unittest.isTrue); 5251 unittest.expect(index >= 0, unittest.isTrue);
4496 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index )); 5252 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index ));
4497 pathOffset = index; 5253 pathOffset = index;
4498 unittest.expect(subPart, unittest.equals("$arg_productId")); 5254 unittest.expect(subPart, unittest.equals("$arg_productId"));
4499 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq uals("/permissions")); 5255 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq uals("/unapprove"));
4500 pathOffset += 12; 5256 pathOffset += 10;
4501 5257
4502 var query = (req.url).query; 5258 var query = (req.url).query;
4503 var queryOffset = 0; 5259 var queryOffset = 0;
4504 var queryMap = {}; 5260 var queryMap = {};
4505 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); 5261 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
4506 parseBool(n) { 5262 parseBool(n) {
4507 if (n == "true") return true; 5263 if (n == "true") return true;
4508 if (n == "false") return false; 5264 if (n == "false") return false;
4509 if (n == null) return null; 5265 if (n == null) return null;
4510 throw new core.ArgumentError("Invalid boolean: $n"); 5266 throw new core.ArgumentError("Invalid boolean: $n");
4511 } 5267 }
4512 if (query.length > 0) { 5268 if (query.length > 0) {
4513 for (var part in query.split("&")) { 5269 for (var part in query.split("&")) {
4514 var keyvalue = part.split("="); 5270 var keyvalue = part.split("=");
4515 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1])); 5271 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1]));
4516 } 5272 }
4517 } 5273 }
4518 5274
4519 5275
4520 var h = { 5276 var h = {
4521 "content-type" : "application/json; charset=utf-8", 5277 "content-type" : "application/json; charset=utf-8",
4522 }; 5278 };
4523 var resp = convert.JSON.encode(buildProductPermissions()); 5279 var resp = "";
4524 return new async.Future.value(stringResponse(200, h, resp)); 5280 return new async.Future.value(stringResponse(200, h, resp));
4525 }), true); 5281 }), true);
4526 res.updatePermissions(arg_request, arg_enterpriseId, arg_productId).then(u nittest.expectAsync(((api.ProductPermissions response) { 5282 res.unapprove(arg_enterpriseId, arg_productId).then(unittest.expectAsync(( _) {}));
4527 checkProductPermissions(response);
4528 })));
4529 }); 5283 });
4530 5284
4531 }); 5285 unittest.test("method--updatePermissions", () {
4532
4533
4534 unittest.group("resource-StorelayoutclustersResourceApi", () {
4535 unittest.test("method--delete", () {
4536 5286
4537 var mock = new HttpServerMock(); 5287 var mock = new HttpServerMock();
4538 api.StorelayoutclustersResourceApi res = new api.AndroidenterpriseApi(mock ).storelayoutclusters; 5288 api.ProductsResourceApi res = new api.AndroidenterpriseApi(mock).products;
5289 var arg_request = buildProductPermissions();
4539 var arg_enterpriseId = "foo"; 5290 var arg_enterpriseId = "foo";
4540 var arg_pageId = "foo"; 5291 var arg_productId = "foo";
4541 var arg_clusterId = "foo";
4542 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 5292 mock.register(unittest.expectAsync((http.BaseRequest req, json) {
5293 var obj = new api.ProductPermissions.fromJson(json);
5294 checkProductPermissions(obj);
5295
4543 var path = (req.url).path; 5296 var path = (req.url).path;
4544 var pathOffset = 0; 5297 var pathOffset = 0;
4545 var index; 5298 var index;
4546 var subPart; 5299 var subPart;
4547 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 5300 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
4548 pathOffset += 1; 5301 pathOffset += 1;
4549 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq uals("androidenterprise/v1/")); 5302 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq uals("androidenterprise/v1/"));
4550 pathOffset += 21; 5303 pathOffset += 21;
4551 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq uals("enterprises/")); 5304 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq uals("enterprises/"));
4552 pathOffset += 12; 5305 pathOffset += 12;
5306 index = path.indexOf("/products/", pathOffset);
5307 unittest.expect(index >= 0, unittest.isTrue);
5308 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index ));
5309 pathOffset = index;
5310 unittest.expect(subPart, unittest.equals("$arg_enterpriseId"));
5311 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq uals("/products/"));
5312 pathOffset += 10;
5313 index = path.indexOf("/permissions", pathOffset);
5314 unittest.expect(index >= 0, unittest.isTrue);
5315 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index ));
5316 pathOffset = index;
5317 unittest.expect(subPart, unittest.equals("$arg_productId"));
5318 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq uals("/permissions"));
5319 pathOffset += 12;
5320
5321 var query = (req.url).query;
5322 var queryOffset = 0;
5323 var queryMap = {};
5324 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
5325 parseBool(n) {
5326 if (n == "true") return true;
5327 if (n == "false") return false;
5328 if (n == null) return null;
5329 throw new core.ArgumentError("Invalid boolean: $n");
5330 }
5331 if (query.length > 0) {
5332 for (var part in query.split("&")) {
5333 var keyvalue = part.split("=");
5334 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1]));
5335 }
5336 }
5337
5338
5339 var h = {
5340 "content-type" : "application/json; charset=utf-8",
5341 };
5342 var resp = convert.JSON.encode(buildProductPermissions());
5343 return new async.Future.value(stringResponse(200, h, resp));
5344 }), true);
5345 res.updatePermissions(arg_request, arg_enterpriseId, arg_productId).then(u nittest.expectAsync(((api.ProductPermissions response) {
5346 checkProductPermissions(response);
5347 })));
5348 });
5349
5350 });
5351
5352
5353 unittest.group("resource-ServiceaccountkeysResourceApi", () {
5354 unittest.test("method--delete", () {
5355
5356 var mock = new HttpServerMock();
5357 api.ServiceaccountkeysResourceApi res = new api.AndroidenterpriseApi(mock) .serviceaccountkeys;
5358 var arg_enterpriseId = "foo";
5359 var arg_keyId = "foo";
5360 mock.register(unittest.expectAsync((http.BaseRequest req, json) {
5361 var path = (req.url).path;
5362 var pathOffset = 0;
5363 var index;
5364 var subPart;
5365 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
5366 pathOffset += 1;
5367 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq uals("androidenterprise/v1/"));
5368 pathOffset += 21;
5369 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq uals("enterprises/"));
5370 pathOffset += 12;
5371 index = path.indexOf("/serviceAccountKeys/", pathOffset);
5372 unittest.expect(index >= 0, unittest.isTrue);
5373 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index ));
5374 pathOffset = index;
5375 unittest.expect(subPart, unittest.equals("$arg_enterpriseId"));
5376 unittest.expect(path.substring(pathOffset, pathOffset + 20), unittest.eq uals("/serviceAccountKeys/"));
5377 pathOffset += 20;
5378 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset));
5379 pathOffset = path.length;
5380 unittest.expect(subPart, unittest.equals("$arg_keyId"));
5381
5382 var query = (req.url).query;
5383 var queryOffset = 0;
5384 var queryMap = {};
5385 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
5386 parseBool(n) {
5387 if (n == "true") return true;
5388 if (n == "false") return false;
5389 if (n == null) return null;
5390 throw new core.ArgumentError("Invalid boolean: $n");
5391 }
5392 if (query.length > 0) {
5393 for (var part in query.split("&")) {
5394 var keyvalue = part.split("=");
5395 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1]));
5396 }
5397 }
5398
5399
5400 var h = {
5401 "content-type" : "application/json; charset=utf-8",
5402 };
5403 var resp = "";
5404 return new async.Future.value(stringResponse(200, h, resp));
5405 }), true);
5406 res.delete(arg_enterpriseId, arg_keyId).then(unittest.expectAsync((_) {})) ;
5407 });
5408
5409 unittest.test("method--insert", () {
5410
5411 var mock = new HttpServerMock();
5412 api.ServiceaccountkeysResourceApi res = new api.AndroidenterpriseApi(mock) .serviceaccountkeys;
5413 var arg_request = buildServiceAccountKey();
5414 var arg_enterpriseId = "foo";
5415 mock.register(unittest.expectAsync((http.BaseRequest req, json) {
5416 var obj = new api.ServiceAccountKey.fromJson(json);
5417 checkServiceAccountKey(obj);
5418
5419 var path = (req.url).path;
5420 var pathOffset = 0;
5421 var index;
5422 var subPart;
5423 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
5424 pathOffset += 1;
5425 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq uals("androidenterprise/v1/"));
5426 pathOffset += 21;
5427 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq uals("enterprises/"));
5428 pathOffset += 12;
5429 index = path.indexOf("/serviceAccountKeys", pathOffset);
5430 unittest.expect(index >= 0, unittest.isTrue);
5431 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index ));
5432 pathOffset = index;
5433 unittest.expect(subPart, unittest.equals("$arg_enterpriseId"));
5434 unittest.expect(path.substring(pathOffset, pathOffset + 19), unittest.eq uals("/serviceAccountKeys"));
5435 pathOffset += 19;
5436
5437 var query = (req.url).query;
5438 var queryOffset = 0;
5439 var queryMap = {};
5440 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
5441 parseBool(n) {
5442 if (n == "true") return true;
5443 if (n == "false") return false;
5444 if (n == null) return null;
5445 throw new core.ArgumentError("Invalid boolean: $n");
5446 }
5447 if (query.length > 0) {
5448 for (var part in query.split("&")) {
5449 var keyvalue = part.split("=");
5450 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1]));
5451 }
5452 }
5453
5454
5455 var h = {
5456 "content-type" : "application/json; charset=utf-8",
5457 };
5458 var resp = convert.JSON.encode(buildServiceAccountKey());
5459 return new async.Future.value(stringResponse(200, h, resp));
5460 }), true);
5461 res.insert(arg_request, arg_enterpriseId).then(unittest.expectAsync(((api. ServiceAccountKey response) {
5462 checkServiceAccountKey(response);
5463 })));
5464 });
5465
5466 unittest.test("method--list", () {
5467
5468 var mock = new HttpServerMock();
5469 api.ServiceaccountkeysResourceApi res = new api.AndroidenterpriseApi(mock) .serviceaccountkeys;
5470 var arg_enterpriseId = "foo";
5471 mock.register(unittest.expectAsync((http.BaseRequest req, json) {
5472 var path = (req.url).path;
5473 var pathOffset = 0;
5474 var index;
5475 var subPart;
5476 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
5477 pathOffset += 1;
5478 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq uals("androidenterprise/v1/"));
5479 pathOffset += 21;
5480 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq uals("enterprises/"));
5481 pathOffset += 12;
5482 index = path.indexOf("/serviceAccountKeys", pathOffset);
5483 unittest.expect(index >= 0, unittest.isTrue);
5484 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index ));
5485 pathOffset = index;
5486 unittest.expect(subPart, unittest.equals("$arg_enterpriseId"));
5487 unittest.expect(path.substring(pathOffset, pathOffset + 19), unittest.eq uals("/serviceAccountKeys"));
5488 pathOffset += 19;
5489
5490 var query = (req.url).query;
5491 var queryOffset = 0;
5492 var queryMap = {};
5493 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
5494 parseBool(n) {
5495 if (n == "true") return true;
5496 if (n == "false") return false;
5497 if (n == null) return null;
5498 throw new core.ArgumentError("Invalid boolean: $n");
5499 }
5500 if (query.length > 0) {
5501 for (var part in query.split("&")) {
5502 var keyvalue = part.split("=");
5503 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1]));
5504 }
5505 }
5506
5507
5508 var h = {
5509 "content-type" : "application/json; charset=utf-8",
5510 };
5511 var resp = convert.JSON.encode(buildServiceAccountKeysListResponse());
5512 return new async.Future.value(stringResponse(200, h, resp));
5513 }), true);
5514 res.list(arg_enterpriseId).then(unittest.expectAsync(((api.ServiceAccountK eysListResponse response) {
5515 checkServiceAccountKeysListResponse(response);
5516 })));
5517 });
5518
5519 });
5520
5521
5522 unittest.group("resource-StorelayoutclustersResourceApi", () {
5523 unittest.test("method--delete", () {
5524
5525 var mock = new HttpServerMock();
5526 api.StorelayoutclustersResourceApi res = new api.AndroidenterpriseApi(mock ).storelayoutclusters;
5527 var arg_enterpriseId = "foo";
5528 var arg_pageId = "foo";
5529 var arg_clusterId = "foo";
5530 mock.register(unittest.expectAsync((http.BaseRequest req, json) {
5531 var path = (req.url).path;
5532 var pathOffset = 0;
5533 var index;
5534 var subPart;
5535 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
5536 pathOffset += 1;
5537 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq uals("androidenterprise/v1/"));
5538 pathOffset += 21;
5539 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq uals("enterprises/"));
5540 pathOffset += 12;
4553 index = path.indexOf("/storeLayout/pages/", pathOffset); 5541 index = path.indexOf("/storeLayout/pages/", pathOffset);
4554 unittest.expect(index >= 0, unittest.isTrue); 5542 unittest.expect(index >= 0, unittest.isTrue);
4555 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index )); 5543 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index ));
4556 pathOffset = index; 5544 pathOffset = index;
4557 unittest.expect(subPart, unittest.equals("$arg_enterpriseId")); 5545 unittest.expect(subPart, unittest.equals("$arg_enterpriseId"));
4558 unittest.expect(path.substring(pathOffset, pathOffset + 19), unittest.eq uals("/storeLayout/pages/")); 5546 unittest.expect(path.substring(pathOffset, pathOffset + 19), unittest.eq uals("/storeLayout/pages/"));
4559 pathOffset += 19; 5547 pathOffset += 19;
4560 index = path.indexOf("/clusters/", pathOffset); 5548 index = path.indexOf("/clusters/", pathOffset);
4561 unittest.expect(index >= 0, unittest.isTrue); 5549 unittest.expect(index >= 0, unittest.isTrue);
4562 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index )); 5550 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index ));
(...skipping 706 matching lines...) Expand 10 before | Expand all | Expand 10 after
5269 }), true); 6257 }), true);
5270 res.update(arg_request, arg_enterpriseId, arg_pageId).then(unittest.expect Async(((api.StorePage response) { 6258 res.update(arg_request, arg_enterpriseId, arg_pageId).then(unittest.expect Async(((api.StorePage response) {
5271 checkStorePage(response); 6259 checkStorePage(response);
5272 }))); 6260 })));
5273 }); 6261 });
5274 6262
5275 }); 6263 });
5276 6264
5277 6265
5278 unittest.group("resource-UsersResourceApi", () { 6266 unittest.group("resource-UsersResourceApi", () {
6267 unittest.test("method--delete", () {
6268
6269 var mock = new HttpServerMock();
6270 api.UsersResourceApi res = new api.AndroidenterpriseApi(mock).users;
6271 var arg_enterpriseId = "foo";
6272 var arg_userId = "foo";
6273 mock.register(unittest.expectAsync((http.BaseRequest req, json) {
6274 var path = (req.url).path;
6275 var pathOffset = 0;
6276 var index;
6277 var subPart;
6278 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
6279 pathOffset += 1;
6280 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq uals("androidenterprise/v1/"));
6281 pathOffset += 21;
6282 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq uals("enterprises/"));
6283 pathOffset += 12;
6284 index = path.indexOf("/users/", pathOffset);
6285 unittest.expect(index >= 0, unittest.isTrue);
6286 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index ));
6287 pathOffset = index;
6288 unittest.expect(subPart, unittest.equals("$arg_enterpriseId"));
6289 unittest.expect(path.substring(pathOffset, pathOffset + 7), unittest.equ als("/users/"));
6290 pathOffset += 7;
6291 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset));
6292 pathOffset = path.length;
6293 unittest.expect(subPart, unittest.equals("$arg_userId"));
6294
6295 var query = (req.url).query;
6296 var queryOffset = 0;
6297 var queryMap = {};
6298 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
6299 parseBool(n) {
6300 if (n == "true") return true;
6301 if (n == "false") return false;
6302 if (n == null) return null;
6303 throw new core.ArgumentError("Invalid boolean: $n");
6304 }
6305 if (query.length > 0) {
6306 for (var part in query.split("&")) {
6307 var keyvalue = part.split("=");
6308 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1]));
6309 }
6310 }
6311
6312
6313 var h = {
6314 "content-type" : "application/json; charset=utf-8",
6315 };
6316 var resp = "";
6317 return new async.Future.value(stringResponse(200, h, resp));
6318 }), true);
6319 res.delete(arg_enterpriseId, arg_userId).then(unittest.expectAsync((_) {}) );
6320 });
6321
6322 unittest.test("method--generateAuthenticationToken", () {
6323
6324 var mock = new HttpServerMock();
6325 api.UsersResourceApi res = new api.AndroidenterpriseApi(mock).users;
6326 var arg_enterpriseId = "foo";
6327 var arg_userId = "foo";
6328 mock.register(unittest.expectAsync((http.BaseRequest req, json) {
6329 var path = (req.url).path;
6330 var pathOffset = 0;
6331 var index;
6332 var subPart;
6333 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
6334 pathOffset += 1;
6335 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq uals("androidenterprise/v1/"));
6336 pathOffset += 21;
6337 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq uals("enterprises/"));
6338 pathOffset += 12;
6339 index = path.indexOf("/users/", pathOffset);
6340 unittest.expect(index >= 0, unittest.isTrue);
6341 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index ));
6342 pathOffset = index;
6343 unittest.expect(subPart, unittest.equals("$arg_enterpriseId"));
6344 unittest.expect(path.substring(pathOffset, pathOffset + 7), unittest.equ als("/users/"));
6345 pathOffset += 7;
6346 index = path.indexOf("/authenticationToken", pathOffset);
6347 unittest.expect(index >= 0, unittest.isTrue);
6348 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index ));
6349 pathOffset = index;
6350 unittest.expect(subPart, unittest.equals("$arg_userId"));
6351 unittest.expect(path.substring(pathOffset, pathOffset + 20), unittest.eq uals("/authenticationToken"));
6352 pathOffset += 20;
6353
6354 var query = (req.url).query;
6355 var queryOffset = 0;
6356 var queryMap = {};
6357 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
6358 parseBool(n) {
6359 if (n == "true") return true;
6360 if (n == "false") return false;
6361 if (n == null) return null;
6362 throw new core.ArgumentError("Invalid boolean: $n");
6363 }
6364 if (query.length > 0) {
6365 for (var part in query.split("&")) {
6366 var keyvalue = part.split("=");
6367 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1]));
6368 }
6369 }
6370
6371
6372 var h = {
6373 "content-type" : "application/json; charset=utf-8",
6374 };
6375 var resp = convert.JSON.encode(buildAuthenticationToken());
6376 return new async.Future.value(stringResponse(200, h, resp));
6377 }), true);
6378 res.generateAuthenticationToken(arg_enterpriseId, arg_userId).then(unittes t.expectAsync(((api.AuthenticationToken response) {
6379 checkAuthenticationToken(response);
6380 })));
6381 });
6382
5279 unittest.test("method--generateToken", () { 6383 unittest.test("method--generateToken", () {
5280 6384
5281 var mock = new HttpServerMock(); 6385 var mock = new HttpServerMock();
5282 api.UsersResourceApi res = new api.AndroidenterpriseApi(mock).users; 6386 api.UsersResourceApi res = new api.AndroidenterpriseApi(mock).users;
5283 var arg_enterpriseId = "foo"; 6387 var arg_enterpriseId = "foo";
5284 var arg_userId = "foo"; 6388 var arg_userId = "foo";
5285 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 6389 mock.register(unittest.expectAsync((http.BaseRequest req, json) {
5286 var path = (req.url).path; 6390 var path = (req.url).path;
5287 var pathOffset = 0; 6391 var pathOffset = 0;
5288 var index; 6392 var index;
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
5448 "content-type" : "application/json; charset=utf-8", 6552 "content-type" : "application/json; charset=utf-8",
5449 }; 6553 };
5450 var resp = convert.JSON.encode(buildProductSet()); 6554 var resp = convert.JSON.encode(buildProductSet());
5451 return new async.Future.value(stringResponse(200, h, resp)); 6555 return new async.Future.value(stringResponse(200, h, resp));
5452 }), true); 6556 }), true);
5453 res.getAvailableProductSet(arg_enterpriseId, arg_userId).then(unittest.exp ectAsync(((api.ProductSet response) { 6557 res.getAvailableProductSet(arg_enterpriseId, arg_userId).then(unittest.exp ectAsync(((api.ProductSet response) {
5454 checkProductSet(response); 6558 checkProductSet(response);
5455 }))); 6559 })));
5456 }); 6560 });
5457 6561
6562 unittest.test("method--insert", () {
6563
6564 var mock = new HttpServerMock();
6565 api.UsersResourceApi res = new api.AndroidenterpriseApi(mock).users;
6566 var arg_request = buildUser();
6567 var arg_enterpriseId = "foo";
6568 mock.register(unittest.expectAsync((http.BaseRequest req, json) {
6569 var obj = new api.User.fromJson(json);
6570 checkUser(obj);
6571
6572 var path = (req.url).path;
6573 var pathOffset = 0;
6574 var index;
6575 var subPart;
6576 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
6577 pathOffset += 1;
6578 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq uals("androidenterprise/v1/"));
6579 pathOffset += 21;
6580 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq uals("enterprises/"));
6581 pathOffset += 12;
6582 index = path.indexOf("/users", pathOffset);
6583 unittest.expect(index >= 0, unittest.isTrue);
6584 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index ));
6585 pathOffset = index;
6586 unittest.expect(subPart, unittest.equals("$arg_enterpriseId"));
6587 unittest.expect(path.substring(pathOffset, pathOffset + 6), unittest.equ als("/users"));
6588 pathOffset += 6;
6589
6590 var query = (req.url).query;
6591 var queryOffset = 0;
6592 var queryMap = {};
6593 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
6594 parseBool(n) {
6595 if (n == "true") return true;
6596 if (n == "false") return false;
6597 if (n == null) return null;
6598 throw new core.ArgumentError("Invalid boolean: $n");
6599 }
6600 if (query.length > 0) {
6601 for (var part in query.split("&")) {
6602 var keyvalue = part.split("=");
6603 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1]));
6604 }
6605 }
6606
6607
6608 var h = {
6609 "content-type" : "application/json; charset=utf-8",
6610 };
6611 var resp = convert.JSON.encode(buildUser());
6612 return new async.Future.value(stringResponse(200, h, resp));
6613 }), true);
6614 res.insert(arg_request, arg_enterpriseId).then(unittest.expectAsync(((api. User response) {
6615 checkUser(response);
6616 })));
6617 });
6618
5458 unittest.test("method--list", () { 6619 unittest.test("method--list", () {
5459 6620
5460 var mock = new HttpServerMock(); 6621 var mock = new HttpServerMock();
5461 api.UsersResourceApi res = new api.AndroidenterpriseApi(mock).users; 6622 api.UsersResourceApi res = new api.AndroidenterpriseApi(mock).users;
5462 var arg_enterpriseId = "foo"; 6623 var arg_enterpriseId = "foo";
5463 var arg_email = "foo"; 6624 var arg_email = "foo";
5464 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 6625 mock.register(unittest.expectAsync((http.BaseRequest req, json) {
5465 var path = (req.url).path; 6626 var path = (req.url).path;
5466 var pathOffset = 0; 6627 var pathOffset = 0;
5467 var index; 6628 var index;
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
5503 "content-type" : "application/json; charset=utf-8", 6664 "content-type" : "application/json; charset=utf-8",
5504 }; 6665 };
5505 var resp = convert.JSON.encode(buildUsersListResponse()); 6666 var resp = convert.JSON.encode(buildUsersListResponse());
5506 return new async.Future.value(stringResponse(200, h, resp)); 6667 return new async.Future.value(stringResponse(200, h, resp));
5507 }), true); 6668 }), true);
5508 res.list(arg_enterpriseId, arg_email).then(unittest.expectAsync(((api.User sListResponse response) { 6669 res.list(arg_enterpriseId, arg_email).then(unittest.expectAsync(((api.User sListResponse response) {
5509 checkUsersListResponse(response); 6670 checkUsersListResponse(response);
5510 }))); 6671 })));
5511 }); 6672 });
5512 6673
6674 unittest.test("method--patch", () {
6675
6676 var mock = new HttpServerMock();
6677 api.UsersResourceApi res = new api.AndroidenterpriseApi(mock).users;
6678 var arg_request = buildUser();
6679 var arg_enterpriseId = "foo";
6680 var arg_userId = "foo";
6681 mock.register(unittest.expectAsync((http.BaseRequest req, json) {
6682 var obj = new api.User.fromJson(json);
6683 checkUser(obj);
6684
6685 var path = (req.url).path;
6686 var pathOffset = 0;
6687 var index;
6688 var subPart;
6689 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
6690 pathOffset += 1;
6691 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq uals("androidenterprise/v1/"));
6692 pathOffset += 21;
6693 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq uals("enterprises/"));
6694 pathOffset += 12;
6695 index = path.indexOf("/users/", pathOffset);
6696 unittest.expect(index >= 0, unittest.isTrue);
6697 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index ));
6698 pathOffset = index;
6699 unittest.expect(subPart, unittest.equals("$arg_enterpriseId"));
6700 unittest.expect(path.substring(pathOffset, pathOffset + 7), unittest.equ als("/users/"));
6701 pathOffset += 7;
6702 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset));
6703 pathOffset = path.length;
6704 unittest.expect(subPart, unittest.equals("$arg_userId"));
6705
6706 var query = (req.url).query;
6707 var queryOffset = 0;
6708 var queryMap = {};
6709 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
6710 parseBool(n) {
6711 if (n == "true") return true;
6712 if (n == "false") return false;
6713 if (n == null) return null;
6714 throw new core.ArgumentError("Invalid boolean: $n");
6715 }
6716 if (query.length > 0) {
6717 for (var part in query.split("&")) {
6718 var keyvalue = part.split("=");
6719 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1]));
6720 }
6721 }
6722
6723
6724 var h = {
6725 "content-type" : "application/json; charset=utf-8",
6726 };
6727 var resp = convert.JSON.encode(buildUser());
6728 return new async.Future.value(stringResponse(200, h, resp));
6729 }), true);
6730 res.patch(arg_request, arg_enterpriseId, arg_userId).then(unittest.expectA sync(((api.User response) {
6731 checkUser(response);
6732 })));
6733 });
6734
5513 unittest.test("method--revokeToken", () { 6735 unittest.test("method--revokeToken", () {
5514 6736
5515 var mock = new HttpServerMock(); 6737 var mock = new HttpServerMock();
5516 api.UsersResourceApi res = new api.AndroidenterpriseApi(mock).users; 6738 api.UsersResourceApi res = new api.AndroidenterpriseApi(mock).users;
5517 var arg_enterpriseId = "foo"; 6739 var arg_enterpriseId = "foo";
5518 var arg_userId = "foo"; 6740 var arg_userId = "foo";
5519 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 6741 mock.register(unittest.expectAsync((http.BaseRequest req, json) {
5520 var path = (req.url).path; 6742 var path = (req.url).path;
5521 var pathOffset = 0; 6743 var pathOffset = 0;
5522 var index; 6744 var index;
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
5627 "content-type" : "application/json; charset=utf-8", 6849 "content-type" : "application/json; charset=utf-8",
5628 }; 6850 };
5629 var resp = convert.JSON.encode(buildProductSet()); 6851 var resp = convert.JSON.encode(buildProductSet());
5630 return new async.Future.value(stringResponse(200, h, resp)); 6852 return new async.Future.value(stringResponse(200, h, resp));
5631 }), true); 6853 }), true);
5632 res.setAvailableProductSet(arg_request, arg_enterpriseId, arg_userId).then (unittest.expectAsync(((api.ProductSet response) { 6854 res.setAvailableProductSet(arg_request, arg_enterpriseId, arg_userId).then (unittest.expectAsync(((api.ProductSet response) {
5633 checkProductSet(response); 6855 checkProductSet(response);
5634 }))); 6856 })));
5635 }); 6857 });
5636 6858
6859 unittest.test("method--update", () {
6860
6861 var mock = new HttpServerMock();
6862 api.UsersResourceApi res = new api.AndroidenterpriseApi(mock).users;
6863 var arg_request = buildUser();
6864 var arg_enterpriseId = "foo";
6865 var arg_userId = "foo";
6866 mock.register(unittest.expectAsync((http.BaseRequest req, json) {
6867 var obj = new api.User.fromJson(json);
6868 checkUser(obj);
6869
6870 var path = (req.url).path;
6871 var pathOffset = 0;
6872 var index;
6873 var subPart;
6874 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
6875 pathOffset += 1;
6876 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq uals("androidenterprise/v1/"));
6877 pathOffset += 21;
6878 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq uals("enterprises/"));
6879 pathOffset += 12;
6880 index = path.indexOf("/users/", pathOffset);
6881 unittest.expect(index >= 0, unittest.isTrue);
6882 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index ));
6883 pathOffset = index;
6884 unittest.expect(subPart, unittest.equals("$arg_enterpriseId"));
6885 unittest.expect(path.substring(pathOffset, pathOffset + 7), unittest.equ als("/users/"));
6886 pathOffset += 7;
6887 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset));
6888 pathOffset = path.length;
6889 unittest.expect(subPart, unittest.equals("$arg_userId"));
6890
6891 var query = (req.url).query;
6892 var queryOffset = 0;
6893 var queryMap = {};
6894 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
6895 parseBool(n) {
6896 if (n == "true") return true;
6897 if (n == "false") return false;
6898 if (n == null) return null;
6899 throw new core.ArgumentError("Invalid boolean: $n");
6900 }
6901 if (query.length > 0) {
6902 for (var part in query.split("&")) {
6903 var keyvalue = part.split("=");
6904 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1]));
6905 }
6906 }
6907
6908
6909 var h = {
6910 "content-type" : "application/json; charset=utf-8",
6911 };
6912 var resp = convert.JSON.encode(buildUser());
6913 return new async.Future.value(stringResponse(200, h, resp));
6914 }), true);
6915 res.update(arg_request, arg_enterpriseId, arg_userId).then(unittest.expect Async(((api.User response) {
6916 checkUser(response);
6917 })));
6918 });
6919
5637 }); 6920 });
5638 6921
5639 6922
5640 } 6923 }
5641 6924
OLDNEW
« no previous file with comments | « generated/googleapis/test/analyticsreporting/v4_test.dart ('k') | generated/googleapis/test/androidpublisher/v2_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698