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

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

Issue 1078053002: Roll of googleapis as of 4/7/2015. (Closed) Base URL: https://github.com/dart-lang/googleapis.git@master
Patch Set: Created 5 years, 8 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.discovery.v1.test; 1 library googleapis.discovery.v1.test;
2 2
3 import "dart:core" as core; 3 import "dart:core" as core;
4 import "dart:collection" as collection; 4 import "dart:collection" as collection;
5 import "dart:async" as async; 5 import "dart:async" as async;
6 import "dart:convert" as convert; 6 import "dart:convert" as convert;
7 7
8 import 'package:http/http.dart' as http; 8 import 'package:http/http.dart' as http;
9 import 'package:http/testing.dart' as http_testing; 9 import 'package:http/testing.dart' as http_testing;
10 import 'package:unittest/unittest.dart' as unittest; 10 import 'package:unittest/unittest.dart' as unittest;
11 import 'package:googleapis/common/common.dart' as common;
12 import 'package:googleapis/src/common_internal.dart' as common_internal;
13 import '../common/common_internal_test.dart' as common_test;
14 11
15 import 'package:googleapis/discovery/v1.dart' as api; 12 import 'package:googleapis/discovery/v1.dart' as api;
16 13
14 class HttpServerMock extends http.BaseClient {
15 core.Function _callback;
16 core.bool _expectJson;
17 17
18 void register(core.Function callback, core.bool expectJson) {
19 _callback = callback;
20 _expectJson = expectJson;
21 }
22
23 async.Future<http.StreamedResponse> send(http.BaseRequest request) {
24 if (_expectJson) {
25 return request.finalize()
26 .transform(convert.UTF8.decoder)
27 .join('')
28 .then((core.String jsonString) {
29 if (jsonString.isEmpty) {
30 return _callback(request, null);
31 } else {
32 return _callback(request, convert.JSON.decode(jsonString));
33 }
34 });
35 } else {
36 var stream = request.finalize();
37 if (stream == null) {
38 return _callback(request, []);
39 } else {
40 return stream.toBytes().then((data) {
41 return _callback(request, data);
42 });
43 }
44 }
45 }
46 }
47
48 http.StreamedResponse stringResponse(
49 core.int status, core.Map headers, core.String body) {
50 var stream = new async.Stream.fromIterable([convert.UTF8.encode(body)]);
51 return new http.StreamedResponse(stream, status, headers: headers);
52 }
18 53
19 core.int buildCounterDirectoryListItemsIcons = 0; 54 core.int buildCounterDirectoryListItemsIcons = 0;
20 buildDirectoryListItemsIcons() { 55 buildDirectoryListItemsIcons() {
21 var o = new api.DirectoryListItemsIcons(); 56 var o = new api.DirectoryListItemsIcons();
22 buildCounterDirectoryListItemsIcons++; 57 buildCounterDirectoryListItemsIcons++;
23 if (buildCounterDirectoryListItemsIcons < 3) { 58 if (buildCounterDirectoryListItemsIcons < 3) {
24 o.x16 = "foo"; 59 o.x16 = "foo";
25 o.x32 = "foo"; 60 o.x32 = "foo";
26 } 61 }
27 buildCounterDirectoryListItemsIcons--; 62 buildCounterDirectoryListItemsIcons--;
28 return o; 63 return o;
29 } 64 }
30 65
31 checkDirectoryListItemsIcons(api.DirectoryListItemsIcons o) { 66 checkDirectoryListItemsIcons(api.DirectoryListItemsIcons o) {
32 buildCounterDirectoryListItemsIcons++; 67 buildCounterDirectoryListItemsIcons++;
33 if (buildCounterDirectoryListItemsIcons < 3) { 68 if (buildCounterDirectoryListItemsIcons < 3) {
34 unittest.expect(o.x16, unittest.equals('foo')); 69 unittest.expect(o.x16, unittest.equals('foo'));
35 unittest.expect(o.x32, unittest.equals('foo')); 70 unittest.expect(o.x32, unittest.equals('foo'));
36 } 71 }
37 buildCounterDirectoryListItemsIcons--; 72 buildCounterDirectoryListItemsIcons--;
38 } 73 }
39 74
40 buildUnnamed519() { 75 buildUnnamed932() {
41 var o = new core.List<core.String>(); 76 var o = new core.List<core.String>();
42 o.add("foo"); 77 o.add("foo");
43 o.add("foo"); 78 o.add("foo");
44 return o; 79 return o;
45 } 80 }
46 81
47 checkUnnamed519(core.List<core.String> o) { 82 checkUnnamed932(core.List<core.String> o) {
48 unittest.expect(o, unittest.hasLength(2)); 83 unittest.expect(o, unittest.hasLength(2));
49 unittest.expect(o[0], unittest.equals('foo')); 84 unittest.expect(o[0], unittest.equals('foo'));
50 unittest.expect(o[1], unittest.equals('foo')); 85 unittest.expect(o[1], unittest.equals('foo'));
51 } 86 }
52 87
53 core.int buildCounterDirectoryListItems = 0; 88 core.int buildCounterDirectoryListItems = 0;
54 buildDirectoryListItems() { 89 buildDirectoryListItems() {
55 var o = new api.DirectoryListItems(); 90 var o = new api.DirectoryListItems();
56 buildCounterDirectoryListItems++; 91 buildCounterDirectoryListItems++;
57 if (buildCounterDirectoryListItems < 3) { 92 if (buildCounterDirectoryListItems < 3) {
58 o.description = "foo"; 93 o.description = "foo";
59 o.discoveryLink = "foo"; 94 o.discoveryLink = "foo";
60 o.discoveryRestUrl = "foo"; 95 o.discoveryRestUrl = "foo";
61 o.documentationLink = "foo"; 96 o.documentationLink = "foo";
62 o.icons = buildDirectoryListItemsIcons(); 97 o.icons = buildDirectoryListItemsIcons();
63 o.id = "foo"; 98 o.id = "foo";
64 o.kind = "foo"; 99 o.kind = "foo";
65 o.labels = buildUnnamed519(); 100 o.labels = buildUnnamed932();
66 o.name = "foo"; 101 o.name = "foo";
67 o.preferred = true; 102 o.preferred = true;
68 o.title = "foo"; 103 o.title = "foo";
69 o.version = "foo"; 104 o.version = "foo";
70 } 105 }
71 buildCounterDirectoryListItems--; 106 buildCounterDirectoryListItems--;
72 return o; 107 return o;
73 } 108 }
74 109
75 checkDirectoryListItems(api.DirectoryListItems o) { 110 checkDirectoryListItems(api.DirectoryListItems o) {
76 buildCounterDirectoryListItems++; 111 buildCounterDirectoryListItems++;
77 if (buildCounterDirectoryListItems < 3) { 112 if (buildCounterDirectoryListItems < 3) {
78 unittest.expect(o.description, unittest.equals('foo')); 113 unittest.expect(o.description, unittest.equals('foo'));
79 unittest.expect(o.discoveryLink, unittest.equals('foo')); 114 unittest.expect(o.discoveryLink, unittest.equals('foo'));
80 unittest.expect(o.discoveryRestUrl, unittest.equals('foo')); 115 unittest.expect(o.discoveryRestUrl, unittest.equals('foo'));
81 unittest.expect(o.documentationLink, unittest.equals('foo')); 116 unittest.expect(o.documentationLink, unittest.equals('foo'));
82 checkDirectoryListItemsIcons(o.icons); 117 checkDirectoryListItemsIcons(o.icons);
83 unittest.expect(o.id, unittest.equals('foo')); 118 unittest.expect(o.id, unittest.equals('foo'));
84 unittest.expect(o.kind, unittest.equals('foo')); 119 unittest.expect(o.kind, unittest.equals('foo'));
85 checkUnnamed519(o.labels); 120 checkUnnamed932(o.labels);
86 unittest.expect(o.name, unittest.equals('foo')); 121 unittest.expect(o.name, unittest.equals('foo'));
87 unittest.expect(o.preferred, unittest.isTrue); 122 unittest.expect(o.preferred, unittest.isTrue);
88 unittest.expect(o.title, unittest.equals('foo')); 123 unittest.expect(o.title, unittest.equals('foo'));
89 unittest.expect(o.version, unittest.equals('foo')); 124 unittest.expect(o.version, unittest.equals('foo'));
90 } 125 }
91 buildCounterDirectoryListItems--; 126 buildCounterDirectoryListItems--;
92 } 127 }
93 128
94 buildUnnamed520() { 129 buildUnnamed933() {
95 var o = new core.List<api.DirectoryListItems>(); 130 var o = new core.List<api.DirectoryListItems>();
96 o.add(buildDirectoryListItems()); 131 o.add(buildDirectoryListItems());
97 o.add(buildDirectoryListItems()); 132 o.add(buildDirectoryListItems());
98 return o; 133 return o;
99 } 134 }
100 135
101 checkUnnamed520(core.List<api.DirectoryListItems> o) { 136 checkUnnamed933(core.List<api.DirectoryListItems> o) {
102 unittest.expect(o, unittest.hasLength(2)); 137 unittest.expect(o, unittest.hasLength(2));
103 checkDirectoryListItems(o[0]); 138 checkDirectoryListItems(o[0]);
104 checkDirectoryListItems(o[1]); 139 checkDirectoryListItems(o[1]);
105 } 140 }
106 141
107 core.int buildCounterDirectoryList = 0; 142 core.int buildCounterDirectoryList = 0;
108 buildDirectoryList() { 143 buildDirectoryList() {
109 var o = new api.DirectoryList(); 144 var o = new api.DirectoryList();
110 buildCounterDirectoryList++; 145 buildCounterDirectoryList++;
111 if (buildCounterDirectoryList < 3) { 146 if (buildCounterDirectoryList < 3) {
112 o.discoveryVersion = "foo"; 147 o.discoveryVersion = "foo";
113 o.items = buildUnnamed520(); 148 o.items = buildUnnamed933();
114 o.kind = "foo"; 149 o.kind = "foo";
115 } 150 }
116 buildCounterDirectoryList--; 151 buildCounterDirectoryList--;
117 return o; 152 return o;
118 } 153 }
119 154
120 checkDirectoryList(api.DirectoryList o) { 155 checkDirectoryList(api.DirectoryList o) {
121 buildCounterDirectoryList++; 156 buildCounterDirectoryList++;
122 if (buildCounterDirectoryList < 3) { 157 if (buildCounterDirectoryList < 3) {
123 unittest.expect(o.discoveryVersion, unittest.equals('foo')); 158 unittest.expect(o.discoveryVersion, unittest.equals('foo'));
124 checkUnnamed520(o.items); 159 checkUnnamed933(o.items);
125 unittest.expect(o.kind, unittest.equals('foo')); 160 unittest.expect(o.kind, unittest.equals('foo'));
126 } 161 }
127 buildCounterDirectoryList--; 162 buildCounterDirectoryList--;
128 } 163 }
129 164
130 buildUnnamed521() { 165 buildUnnamed934() {
131 var o = new core.List<core.String>(); 166 var o = new core.List<core.String>();
132 o.add("foo"); 167 o.add("foo");
133 o.add("foo"); 168 o.add("foo");
134 return o; 169 return o;
135 } 170 }
136 171
137 checkUnnamed521(core.List<core.String> o) { 172 checkUnnamed934(core.List<core.String> o) {
138 unittest.expect(o, unittest.hasLength(2)); 173 unittest.expect(o, unittest.hasLength(2));
139 unittest.expect(o[0], unittest.equals('foo')); 174 unittest.expect(o[0], unittest.equals('foo'));
140 unittest.expect(o[1], unittest.equals('foo')); 175 unittest.expect(o[1], unittest.equals('foo'));
141 } 176 }
142 177
143 core.int buildCounterJsonSchemaAnnotations = 0; 178 core.int buildCounterJsonSchemaAnnotations = 0;
144 buildJsonSchemaAnnotations() { 179 buildJsonSchemaAnnotations() {
145 var o = new api.JsonSchemaAnnotations(); 180 var o = new api.JsonSchemaAnnotations();
146 buildCounterJsonSchemaAnnotations++; 181 buildCounterJsonSchemaAnnotations++;
147 if (buildCounterJsonSchemaAnnotations < 3) { 182 if (buildCounterJsonSchemaAnnotations < 3) {
148 o.required = buildUnnamed521(); 183 o.required = buildUnnamed934();
149 } 184 }
150 buildCounterJsonSchemaAnnotations--; 185 buildCounterJsonSchemaAnnotations--;
151 return o; 186 return o;
152 } 187 }
153 188
154 checkJsonSchemaAnnotations(api.JsonSchemaAnnotations o) { 189 checkJsonSchemaAnnotations(api.JsonSchemaAnnotations o) {
155 buildCounterJsonSchemaAnnotations++; 190 buildCounterJsonSchemaAnnotations++;
156 if (buildCounterJsonSchemaAnnotations < 3) { 191 if (buildCounterJsonSchemaAnnotations < 3) {
157 checkUnnamed521(o.required); 192 checkUnnamed934(o.required);
158 } 193 }
159 buildCounterJsonSchemaAnnotations--; 194 buildCounterJsonSchemaAnnotations--;
160 } 195 }
161 196
162 buildUnnamed522() { 197 buildUnnamed935() {
163 var o = new core.List<core.String>(); 198 var o = new core.List<core.String>();
164 o.add("foo"); 199 o.add("foo");
165 o.add("foo"); 200 o.add("foo");
166 return o; 201 return o;
167 } 202 }
168 203
169 checkUnnamed522(core.List<core.String> o) { 204 checkUnnamed935(core.List<core.String> o) {
170 unittest.expect(o, unittest.hasLength(2)); 205 unittest.expect(o, unittest.hasLength(2));
171 unittest.expect(o[0], unittest.equals('foo')); 206 unittest.expect(o[0], unittest.equals('foo'));
172 unittest.expect(o[1], unittest.equals('foo')); 207 unittest.expect(o[1], unittest.equals('foo'));
173 } 208 }
174 209
175 buildUnnamed523() { 210 buildUnnamed936() {
176 var o = new core.List<core.String>(); 211 var o = new core.List<core.String>();
177 o.add("foo"); 212 o.add("foo");
178 o.add("foo"); 213 o.add("foo");
179 return o; 214 return o;
180 } 215 }
181 216
182 checkUnnamed523(core.List<core.String> o) { 217 checkUnnamed936(core.List<core.String> o) {
183 unittest.expect(o, unittest.hasLength(2)); 218 unittest.expect(o, unittest.hasLength(2));
184 unittest.expect(o[0], unittest.equals('foo')); 219 unittest.expect(o[0], unittest.equals('foo'));
185 unittest.expect(o[1], unittest.equals('foo')); 220 unittest.expect(o[1], unittest.equals('foo'));
186 } 221 }
187 222
188 buildUnnamed524() { 223 buildUnnamed937() {
189 var o = new core.Map<core.String, api.JsonSchema>(); 224 var o = new core.Map<core.String, api.JsonSchema>();
190 o["x"] = buildJsonSchema(); 225 o["x"] = buildJsonSchema();
191 o["y"] = buildJsonSchema(); 226 o["y"] = buildJsonSchema();
192 return o; 227 return o;
193 } 228 }
194 229
195 checkUnnamed524(core.Map<core.String, api.JsonSchema> o) { 230 checkUnnamed937(core.Map<core.String, api.JsonSchema> o) {
196 unittest.expect(o, unittest.hasLength(2)); 231 unittest.expect(o, unittest.hasLength(2));
197 checkJsonSchema(o["x"]); 232 checkJsonSchema(o["x"]);
198 checkJsonSchema(o["y"]); 233 checkJsonSchema(o["y"]);
199 } 234 }
200 235
201 core.int buildCounterJsonSchemaVariantMap = 0; 236 core.int buildCounterJsonSchemaVariantMap = 0;
202 buildJsonSchemaVariantMap() { 237 buildJsonSchemaVariantMap() {
203 var o = new api.JsonSchemaVariantMap(); 238 var o = new api.JsonSchemaVariantMap();
204 buildCounterJsonSchemaVariantMap++; 239 buildCounterJsonSchemaVariantMap++;
205 if (buildCounterJsonSchemaVariantMap < 3) { 240 if (buildCounterJsonSchemaVariantMap < 3) {
206 o.P_ref = "foo"; 241 o.P_ref = "foo";
207 o.typeValue = "foo"; 242 o.typeValue = "foo";
208 } 243 }
209 buildCounterJsonSchemaVariantMap--; 244 buildCounterJsonSchemaVariantMap--;
210 return o; 245 return o;
211 } 246 }
212 247
213 checkJsonSchemaVariantMap(api.JsonSchemaVariantMap o) { 248 checkJsonSchemaVariantMap(api.JsonSchemaVariantMap o) {
214 buildCounterJsonSchemaVariantMap++; 249 buildCounterJsonSchemaVariantMap++;
215 if (buildCounterJsonSchemaVariantMap < 3) { 250 if (buildCounterJsonSchemaVariantMap < 3) {
216 unittest.expect(o.P_ref, unittest.equals('foo')); 251 unittest.expect(o.P_ref, unittest.equals('foo'));
217 unittest.expect(o.typeValue, unittest.equals('foo')); 252 unittest.expect(o.typeValue, unittest.equals('foo'));
218 } 253 }
219 buildCounterJsonSchemaVariantMap--; 254 buildCounterJsonSchemaVariantMap--;
220 } 255 }
221 256
222 buildUnnamed525() { 257 buildUnnamed938() {
223 var o = new core.List<api.JsonSchemaVariantMap>(); 258 var o = new core.List<api.JsonSchemaVariantMap>();
224 o.add(buildJsonSchemaVariantMap()); 259 o.add(buildJsonSchemaVariantMap());
225 o.add(buildJsonSchemaVariantMap()); 260 o.add(buildJsonSchemaVariantMap());
226 return o; 261 return o;
227 } 262 }
228 263
229 checkUnnamed525(core.List<api.JsonSchemaVariantMap> o) { 264 checkUnnamed938(core.List<api.JsonSchemaVariantMap> o) {
230 unittest.expect(o, unittest.hasLength(2)); 265 unittest.expect(o, unittest.hasLength(2));
231 checkJsonSchemaVariantMap(o[0]); 266 checkJsonSchemaVariantMap(o[0]);
232 checkJsonSchemaVariantMap(o[1]); 267 checkJsonSchemaVariantMap(o[1]);
233 } 268 }
234 269
235 core.int buildCounterJsonSchemaVariant = 0; 270 core.int buildCounterJsonSchemaVariant = 0;
236 buildJsonSchemaVariant() { 271 buildJsonSchemaVariant() {
237 var o = new api.JsonSchemaVariant(); 272 var o = new api.JsonSchemaVariant();
238 buildCounterJsonSchemaVariant++; 273 buildCounterJsonSchemaVariant++;
239 if (buildCounterJsonSchemaVariant < 3) { 274 if (buildCounterJsonSchemaVariant < 3) {
240 o.discriminant = "foo"; 275 o.discriminant = "foo";
241 o.map = buildUnnamed525(); 276 o.map = buildUnnamed938();
242 } 277 }
243 buildCounterJsonSchemaVariant--; 278 buildCounterJsonSchemaVariant--;
244 return o; 279 return o;
245 } 280 }
246 281
247 checkJsonSchemaVariant(api.JsonSchemaVariant o) { 282 checkJsonSchemaVariant(api.JsonSchemaVariant o) {
248 buildCounterJsonSchemaVariant++; 283 buildCounterJsonSchemaVariant++;
249 if (buildCounterJsonSchemaVariant < 3) { 284 if (buildCounterJsonSchemaVariant < 3) {
250 unittest.expect(o.discriminant, unittest.equals('foo')); 285 unittest.expect(o.discriminant, unittest.equals('foo'));
251 checkUnnamed525(o.map); 286 checkUnnamed938(o.map);
252 } 287 }
253 buildCounterJsonSchemaVariant--; 288 buildCounterJsonSchemaVariant--;
254 } 289 }
255 290
256 core.int buildCounterJsonSchema = 0; 291 core.int buildCounterJsonSchema = 0;
257 buildJsonSchema() { 292 buildJsonSchema() {
258 var o = new api.JsonSchema(); 293 var o = new api.JsonSchema();
259 buildCounterJsonSchema++; 294 buildCounterJsonSchema++;
260 if (buildCounterJsonSchema < 3) { 295 if (buildCounterJsonSchema < 3) {
261 o.P_ref = "foo"; 296 o.P_ref = "foo";
262 o.additionalProperties = buildJsonSchema(); 297 o.additionalProperties = buildJsonSchema();
263 o.annotations = buildJsonSchemaAnnotations(); 298 o.annotations = buildJsonSchemaAnnotations();
264 o.default_ = "foo"; 299 o.default_ = "foo";
265 o.description = "foo"; 300 o.description = "foo";
266 o.enum_ = buildUnnamed522(); 301 o.enum_ = buildUnnamed935();
267 o.enumDescriptions = buildUnnamed523(); 302 o.enumDescriptions = buildUnnamed936();
268 o.format = "foo"; 303 o.format = "foo";
269 o.id = "foo"; 304 o.id = "foo";
270 o.items = buildJsonSchema(); 305 o.items = buildJsonSchema();
271 o.location = "foo"; 306 o.location = "foo";
272 o.maximum = "foo"; 307 o.maximum = "foo";
273 o.minimum = "foo"; 308 o.minimum = "foo";
274 o.pattern = "foo"; 309 o.pattern = "foo";
275 o.properties = buildUnnamed524(); 310 o.properties = buildUnnamed937();
276 o.readOnly = true; 311 o.readOnly = true;
277 o.repeated = true; 312 o.repeated = true;
278 o.required = true; 313 o.required = true;
279 o.type = "foo"; 314 o.type = "foo";
280 o.variant = buildJsonSchemaVariant(); 315 o.variant = buildJsonSchemaVariant();
281 } 316 }
282 buildCounterJsonSchema--; 317 buildCounterJsonSchema--;
283 return o; 318 return o;
284 } 319 }
285 320
286 checkJsonSchema(api.JsonSchema o) { 321 checkJsonSchema(api.JsonSchema o) {
287 buildCounterJsonSchema++; 322 buildCounterJsonSchema++;
288 if (buildCounterJsonSchema < 3) { 323 if (buildCounterJsonSchema < 3) {
289 unittest.expect(o.P_ref, unittest.equals('foo')); 324 unittest.expect(o.P_ref, unittest.equals('foo'));
290 checkJsonSchema(o.additionalProperties); 325 checkJsonSchema(o.additionalProperties);
291 checkJsonSchemaAnnotations(o.annotations); 326 checkJsonSchemaAnnotations(o.annotations);
292 unittest.expect(o.default_, unittest.equals('foo')); 327 unittest.expect(o.default_, unittest.equals('foo'));
293 unittest.expect(o.description, unittest.equals('foo')); 328 unittest.expect(o.description, unittest.equals('foo'));
294 checkUnnamed522(o.enum_); 329 checkUnnamed935(o.enum_);
295 checkUnnamed523(o.enumDescriptions); 330 checkUnnamed936(o.enumDescriptions);
296 unittest.expect(o.format, unittest.equals('foo')); 331 unittest.expect(o.format, unittest.equals('foo'));
297 unittest.expect(o.id, unittest.equals('foo')); 332 unittest.expect(o.id, unittest.equals('foo'));
298 checkJsonSchema(o.items); 333 checkJsonSchema(o.items);
299 unittest.expect(o.location, unittest.equals('foo')); 334 unittest.expect(o.location, unittest.equals('foo'));
300 unittest.expect(o.maximum, unittest.equals('foo')); 335 unittest.expect(o.maximum, unittest.equals('foo'));
301 unittest.expect(o.minimum, unittest.equals('foo')); 336 unittest.expect(o.minimum, unittest.equals('foo'));
302 unittest.expect(o.pattern, unittest.equals('foo')); 337 unittest.expect(o.pattern, unittest.equals('foo'));
303 checkUnnamed524(o.properties); 338 checkUnnamed937(o.properties);
304 unittest.expect(o.readOnly, unittest.isTrue); 339 unittest.expect(o.readOnly, unittest.isTrue);
305 unittest.expect(o.repeated, unittest.isTrue); 340 unittest.expect(o.repeated, unittest.isTrue);
306 unittest.expect(o.required, unittest.isTrue); 341 unittest.expect(o.required, unittest.isTrue);
307 unittest.expect(o.type, unittest.equals('foo')); 342 unittest.expect(o.type, unittest.equals('foo'));
308 checkJsonSchemaVariant(o.variant); 343 checkJsonSchemaVariant(o.variant);
309 } 344 }
310 buildCounterJsonSchema--; 345 buildCounterJsonSchema--;
311 } 346 }
312 347
313 core.int buildCounterRestDescriptionAuthOauth2ScopesValue = 0; 348 core.int buildCounterRestDescriptionAuthOauth2ScopesValue = 0;
314 buildRestDescriptionAuthOauth2ScopesValue() { 349 buildRestDescriptionAuthOauth2ScopesValue() {
315 var o = new api.RestDescriptionAuthOauth2ScopesValue(); 350 var o = new api.RestDescriptionAuthOauth2ScopesValue();
316 buildCounterRestDescriptionAuthOauth2ScopesValue++; 351 buildCounterRestDescriptionAuthOauth2ScopesValue++;
317 if (buildCounterRestDescriptionAuthOauth2ScopesValue < 3) { 352 if (buildCounterRestDescriptionAuthOauth2ScopesValue < 3) {
318 o.description = "foo"; 353 o.description = "foo";
319 } 354 }
320 buildCounterRestDescriptionAuthOauth2ScopesValue--; 355 buildCounterRestDescriptionAuthOauth2ScopesValue--;
321 return o; 356 return o;
322 } 357 }
323 358
324 checkRestDescriptionAuthOauth2ScopesValue(api.RestDescriptionAuthOauth2ScopesVal ue o) { 359 checkRestDescriptionAuthOauth2ScopesValue(api.RestDescriptionAuthOauth2ScopesVal ue o) {
325 buildCounterRestDescriptionAuthOauth2ScopesValue++; 360 buildCounterRestDescriptionAuthOauth2ScopesValue++;
326 if (buildCounterRestDescriptionAuthOauth2ScopesValue < 3) { 361 if (buildCounterRestDescriptionAuthOauth2ScopesValue < 3) {
327 unittest.expect(o.description, unittest.equals('foo')); 362 unittest.expect(o.description, unittest.equals('foo'));
328 } 363 }
329 buildCounterRestDescriptionAuthOauth2ScopesValue--; 364 buildCounterRestDescriptionAuthOauth2ScopesValue--;
330 } 365 }
331 366
332 buildUnnamed526() { 367 buildUnnamed939() {
333 var o = new core.Map<core.String, api.RestDescriptionAuthOauth2ScopesValue>(); 368 var o = new core.Map<core.String, api.RestDescriptionAuthOauth2ScopesValue>();
334 o["x"] = buildRestDescriptionAuthOauth2ScopesValue(); 369 o["x"] = buildRestDescriptionAuthOauth2ScopesValue();
335 o["y"] = buildRestDescriptionAuthOauth2ScopesValue(); 370 o["y"] = buildRestDescriptionAuthOauth2ScopesValue();
336 return o; 371 return o;
337 } 372 }
338 373
339 checkUnnamed526(core.Map<core.String, api.RestDescriptionAuthOauth2ScopesValue> o) { 374 checkUnnamed939(core.Map<core.String, api.RestDescriptionAuthOauth2ScopesValue> o) {
340 unittest.expect(o, unittest.hasLength(2)); 375 unittest.expect(o, unittest.hasLength(2));
341 checkRestDescriptionAuthOauth2ScopesValue(o["x"]); 376 checkRestDescriptionAuthOauth2ScopesValue(o["x"]);
342 checkRestDescriptionAuthOauth2ScopesValue(o["y"]); 377 checkRestDescriptionAuthOauth2ScopesValue(o["y"]);
343 } 378 }
344 379
345 core.int buildCounterRestDescriptionAuthOauth2 = 0; 380 core.int buildCounterRestDescriptionAuthOauth2 = 0;
346 buildRestDescriptionAuthOauth2() { 381 buildRestDescriptionAuthOauth2() {
347 var o = new api.RestDescriptionAuthOauth2(); 382 var o = new api.RestDescriptionAuthOauth2();
348 buildCounterRestDescriptionAuthOauth2++; 383 buildCounterRestDescriptionAuthOauth2++;
349 if (buildCounterRestDescriptionAuthOauth2 < 3) { 384 if (buildCounterRestDescriptionAuthOauth2 < 3) {
350 o.scopes = buildUnnamed526(); 385 o.scopes = buildUnnamed939();
351 } 386 }
352 buildCounterRestDescriptionAuthOauth2--; 387 buildCounterRestDescriptionAuthOauth2--;
353 return o; 388 return o;
354 } 389 }
355 390
356 checkRestDescriptionAuthOauth2(api.RestDescriptionAuthOauth2 o) { 391 checkRestDescriptionAuthOauth2(api.RestDescriptionAuthOauth2 o) {
357 buildCounterRestDescriptionAuthOauth2++; 392 buildCounterRestDescriptionAuthOauth2++;
358 if (buildCounterRestDescriptionAuthOauth2 < 3) { 393 if (buildCounterRestDescriptionAuthOauth2 < 3) {
359 checkUnnamed526(o.scopes); 394 checkUnnamed939(o.scopes);
360 } 395 }
361 buildCounterRestDescriptionAuthOauth2--; 396 buildCounterRestDescriptionAuthOauth2--;
362 } 397 }
363 398
364 core.int buildCounterRestDescriptionAuth = 0; 399 core.int buildCounterRestDescriptionAuth = 0;
365 buildRestDescriptionAuth() { 400 buildRestDescriptionAuth() {
366 var o = new api.RestDescriptionAuth(); 401 var o = new api.RestDescriptionAuth();
367 buildCounterRestDescriptionAuth++; 402 buildCounterRestDescriptionAuth++;
368 if (buildCounterRestDescriptionAuth < 3) { 403 if (buildCounterRestDescriptionAuth < 3) {
369 o.oauth2 = buildRestDescriptionAuthOauth2(); 404 o.oauth2 = buildRestDescriptionAuthOauth2();
370 } 405 }
371 buildCounterRestDescriptionAuth--; 406 buildCounterRestDescriptionAuth--;
372 return o; 407 return o;
373 } 408 }
374 409
375 checkRestDescriptionAuth(api.RestDescriptionAuth o) { 410 checkRestDescriptionAuth(api.RestDescriptionAuth o) {
376 buildCounterRestDescriptionAuth++; 411 buildCounterRestDescriptionAuth++;
377 if (buildCounterRestDescriptionAuth < 3) { 412 if (buildCounterRestDescriptionAuth < 3) {
378 checkRestDescriptionAuthOauth2(o.oauth2); 413 checkRestDescriptionAuthOauth2(o.oauth2);
379 } 414 }
380 buildCounterRestDescriptionAuth--; 415 buildCounterRestDescriptionAuth--;
381 } 416 }
382 417
383 buildUnnamed527() { 418 buildUnnamed940() {
384 var o = new core.List<core.String>(); 419 var o = new core.List<core.String>();
385 o.add("foo"); 420 o.add("foo");
386 o.add("foo"); 421 o.add("foo");
387 return o; 422 return o;
388 } 423 }
389 424
390 checkUnnamed527(core.List<core.String> o) { 425 checkUnnamed940(core.List<core.String> o) {
391 unittest.expect(o, unittest.hasLength(2)); 426 unittest.expect(o, unittest.hasLength(2));
392 unittest.expect(o[0], unittest.equals('foo')); 427 unittest.expect(o[0], unittest.equals('foo'));
393 unittest.expect(o[1], unittest.equals('foo')); 428 unittest.expect(o[1], unittest.equals('foo'));
394 } 429 }
395 430
396 core.int buildCounterRestDescriptionIcons = 0; 431 core.int buildCounterRestDescriptionIcons = 0;
397 buildRestDescriptionIcons() { 432 buildRestDescriptionIcons() {
398 var o = new api.RestDescriptionIcons(); 433 var o = new api.RestDescriptionIcons();
399 buildCounterRestDescriptionIcons++; 434 buildCounterRestDescriptionIcons++;
400 if (buildCounterRestDescriptionIcons < 3) { 435 if (buildCounterRestDescriptionIcons < 3) {
401 o.x16 = "foo"; 436 o.x16 = "foo";
402 o.x32 = "foo"; 437 o.x32 = "foo";
403 } 438 }
404 buildCounterRestDescriptionIcons--; 439 buildCounterRestDescriptionIcons--;
405 return o; 440 return o;
406 } 441 }
407 442
408 checkRestDescriptionIcons(api.RestDescriptionIcons o) { 443 checkRestDescriptionIcons(api.RestDescriptionIcons o) {
409 buildCounterRestDescriptionIcons++; 444 buildCounterRestDescriptionIcons++;
410 if (buildCounterRestDescriptionIcons < 3) { 445 if (buildCounterRestDescriptionIcons < 3) {
411 unittest.expect(o.x16, unittest.equals('foo')); 446 unittest.expect(o.x16, unittest.equals('foo'));
412 unittest.expect(o.x32, unittest.equals('foo')); 447 unittest.expect(o.x32, unittest.equals('foo'));
413 } 448 }
414 buildCounterRestDescriptionIcons--; 449 buildCounterRestDescriptionIcons--;
415 } 450 }
416 451
417 buildUnnamed528() { 452 buildUnnamed941() {
418 var o = new core.List<core.String>(); 453 var o = new core.List<core.String>();
419 o.add("foo"); 454 o.add("foo");
420 o.add("foo"); 455 o.add("foo");
421 return o; 456 return o;
422 } 457 }
423 458
424 checkUnnamed528(core.List<core.String> o) { 459 checkUnnamed941(core.List<core.String> o) {
425 unittest.expect(o, unittest.hasLength(2)); 460 unittest.expect(o, unittest.hasLength(2));
426 unittest.expect(o[0], unittest.equals('foo')); 461 unittest.expect(o[0], unittest.equals('foo'));
427 unittest.expect(o[1], unittest.equals('foo')); 462 unittest.expect(o[1], unittest.equals('foo'));
428 } 463 }
429 464
430 buildUnnamed529() { 465 buildUnnamed942() {
431 var o = new core.Map<core.String, api.RestMethod>(); 466 var o = new core.Map<core.String, api.RestMethod>();
432 o["x"] = buildRestMethod(); 467 o["x"] = buildRestMethod();
433 o["y"] = buildRestMethod(); 468 o["y"] = buildRestMethod();
434 return o; 469 return o;
435 } 470 }
436 471
437 checkUnnamed529(core.Map<core.String, api.RestMethod> o) { 472 checkUnnamed942(core.Map<core.String, api.RestMethod> o) {
438 unittest.expect(o, unittest.hasLength(2)); 473 unittest.expect(o, unittest.hasLength(2));
439 checkRestMethod(o["x"]); 474 checkRestMethod(o["x"]);
440 checkRestMethod(o["y"]); 475 checkRestMethod(o["y"]);
441 } 476 }
442 477
443 buildUnnamed530() { 478 buildUnnamed943() {
444 var o = new core.Map<core.String, api.JsonSchema>(); 479 var o = new core.Map<core.String, api.JsonSchema>();
445 o["x"] = buildJsonSchema(); 480 o["x"] = buildJsonSchema();
446 o["y"] = buildJsonSchema(); 481 o["y"] = buildJsonSchema();
447 return o; 482 return o;
448 } 483 }
449 484
450 checkUnnamed530(core.Map<core.String, api.JsonSchema> o) { 485 checkUnnamed943(core.Map<core.String, api.JsonSchema> o) {
451 unittest.expect(o, unittest.hasLength(2)); 486 unittest.expect(o, unittest.hasLength(2));
452 checkJsonSchema(o["x"]); 487 checkJsonSchema(o["x"]);
453 checkJsonSchema(o["y"]); 488 checkJsonSchema(o["y"]);
454 } 489 }
455 490
456 buildUnnamed531() { 491 buildUnnamed944() {
457 var o = new core.Map<core.String, api.RestResource>(); 492 var o = new core.Map<core.String, api.RestResource>();
458 o["x"] = buildRestResource(); 493 o["x"] = buildRestResource();
459 o["y"] = buildRestResource(); 494 o["y"] = buildRestResource();
460 return o; 495 return o;
461 } 496 }
462 497
463 checkUnnamed531(core.Map<core.String, api.RestResource> o) { 498 checkUnnamed944(core.Map<core.String, api.RestResource> o) {
464 unittest.expect(o, unittest.hasLength(2)); 499 unittest.expect(o, unittest.hasLength(2));
465 checkRestResource(o["x"]); 500 checkRestResource(o["x"]);
466 checkRestResource(o["y"]); 501 checkRestResource(o["y"]);
467 } 502 }
468 503
469 buildUnnamed532() { 504 buildUnnamed945() {
470 var o = new core.Map<core.String, api.JsonSchema>(); 505 var o = new core.Map<core.String, api.JsonSchema>();
471 o["x"] = buildJsonSchema(); 506 o["x"] = buildJsonSchema();
472 o["y"] = buildJsonSchema(); 507 o["y"] = buildJsonSchema();
473 return o; 508 return o;
474 } 509 }
475 510
476 checkUnnamed532(core.Map<core.String, api.JsonSchema> o) { 511 checkUnnamed945(core.Map<core.String, api.JsonSchema> o) {
477 unittest.expect(o, unittest.hasLength(2)); 512 unittest.expect(o, unittest.hasLength(2));
478 checkJsonSchema(o["x"]); 513 checkJsonSchema(o["x"]);
479 checkJsonSchema(o["y"]); 514 checkJsonSchema(o["y"]);
480 } 515 }
481 516
482 core.int buildCounterRestDescription = 0; 517 core.int buildCounterRestDescription = 0;
483 buildRestDescription() { 518 buildRestDescription() {
484 var o = new api.RestDescription(); 519 var o = new api.RestDescription();
485 buildCounterRestDescription++; 520 buildCounterRestDescription++;
486 if (buildCounterRestDescription < 3) { 521 if (buildCounterRestDescription < 3) {
487 o.auth = buildRestDescriptionAuth(); 522 o.auth = buildRestDescriptionAuth();
488 o.basePath = "foo"; 523 o.basePath = "foo";
489 o.baseUrl = "foo"; 524 o.baseUrl = "foo";
490 o.batchPath = "foo"; 525 o.batchPath = "foo";
491 o.canonicalName = "foo"; 526 o.canonicalName = "foo";
492 o.description = "foo"; 527 o.description = "foo";
493 o.discoveryVersion = "foo"; 528 o.discoveryVersion = "foo";
494 o.documentationLink = "foo"; 529 o.documentationLink = "foo";
495 o.etag = "foo"; 530 o.etag = "foo";
496 o.features = buildUnnamed527(); 531 o.features = buildUnnamed940();
497 o.icons = buildRestDescriptionIcons(); 532 o.icons = buildRestDescriptionIcons();
498 o.id = "foo"; 533 o.id = "foo";
499 o.kind = "foo"; 534 o.kind = "foo";
500 o.labels = buildUnnamed528(); 535 o.labels = buildUnnamed941();
501 o.methods = buildUnnamed529(); 536 o.methods = buildUnnamed942();
502 o.name = "foo"; 537 o.name = "foo";
503 o.ownerDomain = "foo"; 538 o.ownerDomain = "foo";
504 o.ownerName = "foo"; 539 o.ownerName = "foo";
505 o.packagePath = "foo"; 540 o.packagePath = "foo";
506 o.parameters = buildUnnamed530(); 541 o.parameters = buildUnnamed943();
507 o.protocol = "foo"; 542 o.protocol = "foo";
508 o.resources = buildUnnamed531(); 543 o.resources = buildUnnamed944();
509 o.revision = "foo"; 544 o.revision = "foo";
510 o.rootUrl = "foo"; 545 o.rootUrl = "foo";
511 o.schemas = buildUnnamed532(); 546 o.schemas = buildUnnamed945();
512 o.servicePath = "foo"; 547 o.servicePath = "foo";
513 o.title = "foo"; 548 o.title = "foo";
514 o.version = "foo"; 549 o.version = "foo";
515 } 550 }
516 buildCounterRestDescription--; 551 buildCounterRestDescription--;
517 return o; 552 return o;
518 } 553 }
519 554
520 checkRestDescription(api.RestDescription o) { 555 checkRestDescription(api.RestDescription o) {
521 buildCounterRestDescription++; 556 buildCounterRestDescription++;
522 if (buildCounterRestDescription < 3) { 557 if (buildCounterRestDescription < 3) {
523 checkRestDescriptionAuth(o.auth); 558 checkRestDescriptionAuth(o.auth);
524 unittest.expect(o.basePath, unittest.equals('foo')); 559 unittest.expect(o.basePath, unittest.equals('foo'));
525 unittest.expect(o.baseUrl, unittest.equals('foo')); 560 unittest.expect(o.baseUrl, unittest.equals('foo'));
526 unittest.expect(o.batchPath, unittest.equals('foo')); 561 unittest.expect(o.batchPath, unittest.equals('foo'));
527 unittest.expect(o.canonicalName, unittest.equals('foo')); 562 unittest.expect(o.canonicalName, unittest.equals('foo'));
528 unittest.expect(o.description, unittest.equals('foo')); 563 unittest.expect(o.description, unittest.equals('foo'));
529 unittest.expect(o.discoveryVersion, unittest.equals('foo')); 564 unittest.expect(o.discoveryVersion, unittest.equals('foo'));
530 unittest.expect(o.documentationLink, unittest.equals('foo')); 565 unittest.expect(o.documentationLink, unittest.equals('foo'));
531 unittest.expect(o.etag, unittest.equals('foo')); 566 unittest.expect(o.etag, unittest.equals('foo'));
532 checkUnnamed527(o.features); 567 checkUnnamed940(o.features);
533 checkRestDescriptionIcons(o.icons); 568 checkRestDescriptionIcons(o.icons);
534 unittest.expect(o.id, unittest.equals('foo')); 569 unittest.expect(o.id, unittest.equals('foo'));
535 unittest.expect(o.kind, unittest.equals('foo')); 570 unittest.expect(o.kind, unittest.equals('foo'));
536 checkUnnamed528(o.labels); 571 checkUnnamed941(o.labels);
537 checkUnnamed529(o.methods); 572 checkUnnamed942(o.methods);
538 unittest.expect(o.name, unittest.equals('foo')); 573 unittest.expect(o.name, unittest.equals('foo'));
539 unittest.expect(o.ownerDomain, unittest.equals('foo')); 574 unittest.expect(o.ownerDomain, unittest.equals('foo'));
540 unittest.expect(o.ownerName, unittest.equals('foo')); 575 unittest.expect(o.ownerName, unittest.equals('foo'));
541 unittest.expect(o.packagePath, unittest.equals('foo')); 576 unittest.expect(o.packagePath, unittest.equals('foo'));
542 checkUnnamed530(o.parameters); 577 checkUnnamed943(o.parameters);
543 unittest.expect(o.protocol, unittest.equals('foo')); 578 unittest.expect(o.protocol, unittest.equals('foo'));
544 checkUnnamed531(o.resources); 579 checkUnnamed944(o.resources);
545 unittest.expect(o.revision, unittest.equals('foo')); 580 unittest.expect(o.revision, unittest.equals('foo'));
546 unittest.expect(o.rootUrl, unittest.equals('foo')); 581 unittest.expect(o.rootUrl, unittest.equals('foo'));
547 checkUnnamed532(o.schemas); 582 checkUnnamed945(o.schemas);
548 unittest.expect(o.servicePath, unittest.equals('foo')); 583 unittest.expect(o.servicePath, unittest.equals('foo'));
549 unittest.expect(o.title, unittest.equals('foo')); 584 unittest.expect(o.title, unittest.equals('foo'));
550 unittest.expect(o.version, unittest.equals('foo')); 585 unittest.expect(o.version, unittest.equals('foo'));
551 } 586 }
552 buildCounterRestDescription--; 587 buildCounterRestDescription--;
553 } 588 }
554 589
555 buildUnnamed533() { 590 buildUnnamed946() {
556 var o = new core.List<core.String>(); 591 var o = new core.List<core.String>();
557 o.add("foo"); 592 o.add("foo");
558 o.add("foo"); 593 o.add("foo");
559 return o; 594 return o;
560 } 595 }
561 596
562 checkUnnamed533(core.List<core.String> o) { 597 checkUnnamed946(core.List<core.String> o) {
563 unittest.expect(o, unittest.hasLength(2)); 598 unittest.expect(o, unittest.hasLength(2));
564 unittest.expect(o[0], unittest.equals('foo')); 599 unittest.expect(o[0], unittest.equals('foo'));
565 unittest.expect(o[1], unittest.equals('foo')); 600 unittest.expect(o[1], unittest.equals('foo'));
566 } 601 }
567 602
568 core.int buildCounterRestMethodMediaUploadProtocolsResumable = 0; 603 core.int buildCounterRestMethodMediaUploadProtocolsResumable = 0;
569 buildRestMethodMediaUploadProtocolsResumable() { 604 buildRestMethodMediaUploadProtocolsResumable() {
570 var o = new api.RestMethodMediaUploadProtocolsResumable(); 605 var o = new api.RestMethodMediaUploadProtocolsResumable();
571 buildCounterRestMethodMediaUploadProtocolsResumable++; 606 buildCounterRestMethodMediaUploadProtocolsResumable++;
572 if (buildCounterRestMethodMediaUploadProtocolsResumable < 3) { 607 if (buildCounterRestMethodMediaUploadProtocolsResumable < 3) {
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
626 checkRestMethodMediaUploadProtocolsSimple(o.simple); 661 checkRestMethodMediaUploadProtocolsSimple(o.simple);
627 } 662 }
628 buildCounterRestMethodMediaUploadProtocols--; 663 buildCounterRestMethodMediaUploadProtocols--;
629 } 664 }
630 665
631 core.int buildCounterRestMethodMediaUpload = 0; 666 core.int buildCounterRestMethodMediaUpload = 0;
632 buildRestMethodMediaUpload() { 667 buildRestMethodMediaUpload() {
633 var o = new api.RestMethodMediaUpload(); 668 var o = new api.RestMethodMediaUpload();
634 buildCounterRestMethodMediaUpload++; 669 buildCounterRestMethodMediaUpload++;
635 if (buildCounterRestMethodMediaUpload < 3) { 670 if (buildCounterRestMethodMediaUpload < 3) {
636 o.accept = buildUnnamed533(); 671 o.accept = buildUnnamed946();
637 o.maxSize = "foo"; 672 o.maxSize = "foo";
638 o.protocols = buildRestMethodMediaUploadProtocols(); 673 o.protocols = buildRestMethodMediaUploadProtocols();
639 } 674 }
640 buildCounterRestMethodMediaUpload--; 675 buildCounterRestMethodMediaUpload--;
641 return o; 676 return o;
642 } 677 }
643 678
644 checkRestMethodMediaUpload(api.RestMethodMediaUpload o) { 679 checkRestMethodMediaUpload(api.RestMethodMediaUpload o) {
645 buildCounterRestMethodMediaUpload++; 680 buildCounterRestMethodMediaUpload++;
646 if (buildCounterRestMethodMediaUpload < 3) { 681 if (buildCounterRestMethodMediaUpload < 3) {
647 checkUnnamed533(o.accept); 682 checkUnnamed946(o.accept);
648 unittest.expect(o.maxSize, unittest.equals('foo')); 683 unittest.expect(o.maxSize, unittest.equals('foo'));
649 checkRestMethodMediaUploadProtocols(o.protocols); 684 checkRestMethodMediaUploadProtocols(o.protocols);
650 } 685 }
651 buildCounterRestMethodMediaUpload--; 686 buildCounterRestMethodMediaUpload--;
652 } 687 }
653 688
654 buildUnnamed534() { 689 buildUnnamed947() {
655 var o = new core.List<core.String>(); 690 var o = new core.List<core.String>();
656 o.add("foo"); 691 o.add("foo");
657 o.add("foo"); 692 o.add("foo");
658 return o; 693 return o;
659 } 694 }
660 695
661 checkUnnamed534(core.List<core.String> o) { 696 checkUnnamed947(core.List<core.String> o) {
662 unittest.expect(o, unittest.hasLength(2)); 697 unittest.expect(o, unittest.hasLength(2));
663 unittest.expect(o[0], unittest.equals('foo')); 698 unittest.expect(o[0], unittest.equals('foo'));
664 unittest.expect(o[1], unittest.equals('foo')); 699 unittest.expect(o[1], unittest.equals('foo'));
665 } 700 }
666 701
667 buildUnnamed535() { 702 buildUnnamed948() {
668 var o = new core.Map<core.String, api.JsonSchema>(); 703 var o = new core.Map<core.String, api.JsonSchema>();
669 o["x"] = buildJsonSchema(); 704 o["x"] = buildJsonSchema();
670 o["y"] = buildJsonSchema(); 705 o["y"] = buildJsonSchema();
671 return o; 706 return o;
672 } 707 }
673 708
674 checkUnnamed535(core.Map<core.String, api.JsonSchema> o) { 709 checkUnnamed948(core.Map<core.String, api.JsonSchema> o) {
675 unittest.expect(o, unittest.hasLength(2)); 710 unittest.expect(o, unittest.hasLength(2));
676 checkJsonSchema(o["x"]); 711 checkJsonSchema(o["x"]);
677 checkJsonSchema(o["y"]); 712 checkJsonSchema(o["y"]);
678 } 713 }
679 714
680 core.int buildCounterRestMethodRequest = 0; 715 core.int buildCounterRestMethodRequest = 0;
681 buildRestMethodRequest() { 716 buildRestMethodRequest() {
682 var o = new api.RestMethodRequest(); 717 var o = new api.RestMethodRequest();
683 buildCounterRestMethodRequest++; 718 buildCounterRestMethodRequest++;
684 if (buildCounterRestMethodRequest < 3) { 719 if (buildCounterRestMethodRequest < 3) {
(...skipping 25 matching lines...) Expand all
710 } 745 }
711 746
712 checkRestMethodResponse(api.RestMethodResponse o) { 747 checkRestMethodResponse(api.RestMethodResponse o) {
713 buildCounterRestMethodResponse++; 748 buildCounterRestMethodResponse++;
714 if (buildCounterRestMethodResponse < 3) { 749 if (buildCounterRestMethodResponse < 3) {
715 unittest.expect(o.P_ref, unittest.equals('foo')); 750 unittest.expect(o.P_ref, unittest.equals('foo'));
716 } 751 }
717 buildCounterRestMethodResponse--; 752 buildCounterRestMethodResponse--;
718 } 753 }
719 754
720 buildUnnamed536() { 755 buildUnnamed949() {
721 var o = new core.List<core.String>(); 756 var o = new core.List<core.String>();
722 o.add("foo"); 757 o.add("foo");
723 o.add("foo"); 758 o.add("foo");
724 return o; 759 return o;
725 } 760 }
726 761
727 checkUnnamed536(core.List<core.String> o) { 762 checkUnnamed949(core.List<core.String> o) {
728 unittest.expect(o, unittest.hasLength(2)); 763 unittest.expect(o, unittest.hasLength(2));
729 unittest.expect(o[0], unittest.equals('foo')); 764 unittest.expect(o[0], unittest.equals('foo'));
730 unittest.expect(o[1], unittest.equals('foo')); 765 unittest.expect(o[1], unittest.equals('foo'));
731 } 766 }
732 767
733 core.int buildCounterRestMethod = 0; 768 core.int buildCounterRestMethod = 0;
734 buildRestMethod() { 769 buildRestMethod() {
735 var o = new api.RestMethod(); 770 var o = new api.RestMethod();
736 buildCounterRestMethod++; 771 buildCounterRestMethod++;
737 if (buildCounterRestMethod < 3) { 772 if (buildCounterRestMethod < 3) {
738 o.description = "foo"; 773 o.description = "foo";
739 o.etagRequired = true; 774 o.etagRequired = true;
740 o.httpMethod = "foo"; 775 o.httpMethod = "foo";
741 o.id = "foo"; 776 o.id = "foo";
742 o.mediaUpload = buildRestMethodMediaUpload(); 777 o.mediaUpload = buildRestMethodMediaUpload();
743 o.parameterOrder = buildUnnamed534(); 778 o.parameterOrder = buildUnnamed947();
744 o.parameters = buildUnnamed535(); 779 o.parameters = buildUnnamed948();
745 o.path = "foo"; 780 o.path = "foo";
746 o.request = buildRestMethodRequest(); 781 o.request = buildRestMethodRequest();
747 o.response = buildRestMethodResponse(); 782 o.response = buildRestMethodResponse();
748 o.scopes = buildUnnamed536(); 783 o.scopes = buildUnnamed949();
749 o.supportsMediaDownload = true; 784 o.supportsMediaDownload = true;
750 o.supportsMediaUpload = true; 785 o.supportsMediaUpload = true;
751 o.supportsSubscription = true; 786 o.supportsSubscription = true;
787 o.useMediaDownloadService = true;
752 } 788 }
753 buildCounterRestMethod--; 789 buildCounterRestMethod--;
754 return o; 790 return o;
755 } 791 }
756 792
757 checkRestMethod(api.RestMethod o) { 793 checkRestMethod(api.RestMethod o) {
758 buildCounterRestMethod++; 794 buildCounterRestMethod++;
759 if (buildCounterRestMethod < 3) { 795 if (buildCounterRestMethod < 3) {
760 unittest.expect(o.description, unittest.equals('foo')); 796 unittest.expect(o.description, unittest.equals('foo'));
761 unittest.expect(o.etagRequired, unittest.isTrue); 797 unittest.expect(o.etagRequired, unittest.isTrue);
762 unittest.expect(o.httpMethod, unittest.equals('foo')); 798 unittest.expect(o.httpMethod, unittest.equals('foo'));
763 unittest.expect(o.id, unittest.equals('foo')); 799 unittest.expect(o.id, unittest.equals('foo'));
764 checkRestMethodMediaUpload(o.mediaUpload); 800 checkRestMethodMediaUpload(o.mediaUpload);
765 checkUnnamed534(o.parameterOrder); 801 checkUnnamed947(o.parameterOrder);
766 checkUnnamed535(o.parameters); 802 checkUnnamed948(o.parameters);
767 unittest.expect(o.path, unittest.equals('foo')); 803 unittest.expect(o.path, unittest.equals('foo'));
768 checkRestMethodRequest(o.request); 804 checkRestMethodRequest(o.request);
769 checkRestMethodResponse(o.response); 805 checkRestMethodResponse(o.response);
770 checkUnnamed536(o.scopes); 806 checkUnnamed949(o.scopes);
771 unittest.expect(o.supportsMediaDownload, unittest.isTrue); 807 unittest.expect(o.supportsMediaDownload, unittest.isTrue);
772 unittest.expect(o.supportsMediaUpload, unittest.isTrue); 808 unittest.expect(o.supportsMediaUpload, unittest.isTrue);
773 unittest.expect(o.supportsSubscription, unittest.isTrue); 809 unittest.expect(o.supportsSubscription, unittest.isTrue);
810 unittest.expect(o.useMediaDownloadService, unittest.isTrue);
774 } 811 }
775 buildCounterRestMethod--; 812 buildCounterRestMethod--;
776 } 813 }
777 814
778 buildUnnamed537() { 815 buildUnnamed950() {
779 var o = new core.Map<core.String, api.RestMethod>(); 816 var o = new core.Map<core.String, api.RestMethod>();
780 o["x"] = buildRestMethod(); 817 o["x"] = buildRestMethod();
781 o["y"] = buildRestMethod(); 818 o["y"] = buildRestMethod();
782 return o; 819 return o;
783 } 820 }
784 821
785 checkUnnamed537(core.Map<core.String, api.RestMethod> o) { 822 checkUnnamed950(core.Map<core.String, api.RestMethod> o) {
786 unittest.expect(o, unittest.hasLength(2)); 823 unittest.expect(o, unittest.hasLength(2));
787 checkRestMethod(o["x"]); 824 checkRestMethod(o["x"]);
788 checkRestMethod(o["y"]); 825 checkRestMethod(o["y"]);
789 } 826 }
790 827
791 buildUnnamed538() { 828 buildUnnamed951() {
792 var o = new core.Map<core.String, api.RestResource>(); 829 var o = new core.Map<core.String, api.RestResource>();
793 o["x"] = buildRestResource(); 830 o["x"] = buildRestResource();
794 o["y"] = buildRestResource(); 831 o["y"] = buildRestResource();
795 return o; 832 return o;
796 } 833 }
797 834
798 checkUnnamed538(core.Map<core.String, api.RestResource> o) { 835 checkUnnamed951(core.Map<core.String, api.RestResource> o) {
799 unittest.expect(o, unittest.hasLength(2)); 836 unittest.expect(o, unittest.hasLength(2));
800 checkRestResource(o["x"]); 837 checkRestResource(o["x"]);
801 checkRestResource(o["y"]); 838 checkRestResource(o["y"]);
802 } 839 }
803 840
804 core.int buildCounterRestResource = 0; 841 core.int buildCounterRestResource = 0;
805 buildRestResource() { 842 buildRestResource() {
806 var o = new api.RestResource(); 843 var o = new api.RestResource();
807 buildCounterRestResource++; 844 buildCounterRestResource++;
808 if (buildCounterRestResource < 3) { 845 if (buildCounterRestResource < 3) {
809 o.methods = buildUnnamed537(); 846 o.methods = buildUnnamed950();
810 o.resources = buildUnnamed538(); 847 o.resources = buildUnnamed951();
811 } 848 }
812 buildCounterRestResource--; 849 buildCounterRestResource--;
813 return o; 850 return o;
814 } 851 }
815 852
816 checkRestResource(api.RestResource o) { 853 checkRestResource(api.RestResource o) {
817 buildCounterRestResource++; 854 buildCounterRestResource++;
818 if (buildCounterRestResource < 3) { 855 if (buildCounterRestResource < 3) {
819 checkUnnamed537(o.methods); 856 checkUnnamed950(o.methods);
820 checkUnnamed538(o.resources); 857 checkUnnamed951(o.resources);
821 } 858 }
822 buildCounterRestResource--; 859 buildCounterRestResource--;
823 } 860 }
824 861
825 862
826 main() { 863 main() {
827 unittest.group("obj-schema-DirectoryListItemsIcons", () { 864 unittest.group("obj-schema-DirectoryListItemsIcons", () {
828 unittest.test("to-json--from-json", () { 865 unittest.test("to-json--from-json", () {
829 var o = buildDirectoryListItemsIcons(); 866 var o = buildDirectoryListItemsIcons();
830 var od = new api.DirectoryListItemsIcons.fromJson(o.toJson()); 867 var od = new api.DirectoryListItemsIcons.fromJson(o.toJson());
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
1000 var o = buildRestResource(); 1037 var o = buildRestResource();
1001 var od = new api.RestResource.fromJson(o.toJson()); 1038 var od = new api.RestResource.fromJson(o.toJson());
1002 checkRestResource(od); 1039 checkRestResource(od);
1003 }); 1040 });
1004 }); 1041 });
1005 1042
1006 1043
1007 unittest.group("resource-ApisResourceApi", () { 1044 unittest.group("resource-ApisResourceApi", () {
1008 unittest.test("method--getRest", () { 1045 unittest.test("method--getRest", () {
1009 1046
1010 var mock = new common_test.HttpServerMock(); 1047 var mock = new HttpServerMock();
1011 api.ApisResourceApi res = new api.DiscoveryApi(mock).apis; 1048 api.ApisResourceApi res = new api.DiscoveryApi(mock).apis;
1012 var arg_api = "foo"; 1049 var arg_api = "foo";
1013 var arg_version = "foo"; 1050 var arg_version = "foo";
1014 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 1051 mock.register(unittest.expectAsync((http.BaseRequest req, json) {
1015 var path = (req.url).path; 1052 var path = (req.url).path;
1016 var pathOffset = 0; 1053 var pathOffset = 0;
1017 var index; 1054 var index;
1018 var subPart; 1055 var subPart;
1019 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 1056 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
1020 pathOffset += 1; 1057 pathOffset += 1;
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
1052 var keyvalue = part.split("="); 1089 var keyvalue = part.split("=");
1053 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1])); 1090 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1]));
1054 } 1091 }
1055 } 1092 }
1056 1093
1057 1094
1058 var h = { 1095 var h = {
1059 "content-type" : "application/json; charset=utf-8", 1096 "content-type" : "application/json; charset=utf-8",
1060 }; 1097 };
1061 var resp = convert.JSON.encode(buildRestDescription()); 1098 var resp = convert.JSON.encode(buildRestDescription());
1062 return new async.Future.value(common_test.stringResponse(200, h, resp)); 1099 return new async.Future.value(stringResponse(200, h, resp));
1063 }), true); 1100 }), true);
1064 res.getRest(arg_api, arg_version).then(unittest.expectAsync(((api.RestDesc ription response) { 1101 res.getRest(arg_api, arg_version).then(unittest.expectAsync(((api.RestDesc ription response) {
1065 checkRestDescription(response); 1102 checkRestDescription(response);
1066 }))); 1103 })));
1067 }); 1104 });
1068 1105
1069 unittest.test("method--list", () { 1106 unittest.test("method--list", () {
1070 1107
1071 var mock = new common_test.HttpServerMock(); 1108 var mock = new HttpServerMock();
1072 api.ApisResourceApi res = new api.DiscoveryApi(mock).apis; 1109 api.ApisResourceApi res = new api.DiscoveryApi(mock).apis;
1073 var arg_name = "foo"; 1110 var arg_name = "foo";
1074 var arg_preferred = true; 1111 var arg_preferred = true;
1075 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 1112 mock.register(unittest.expectAsync((http.BaseRequest req, json) {
1076 var path = (req.url).path; 1113 var path = (req.url).path;
1077 var pathOffset = 0; 1114 var pathOffset = 0;
1078 var index; 1115 var index;
1079 var subPart; 1116 var subPart;
1080 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 1117 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
1081 pathOffset += 1; 1118 pathOffset += 1;
(...skipping 19 matching lines...) Expand all
1101 } 1138 }
1102 } 1139 }
1103 unittest.expect(queryMap["name"].first, unittest.equals(arg_name)); 1140 unittest.expect(queryMap["name"].first, unittest.equals(arg_name));
1104 unittest.expect(queryMap["preferred"].first, unittest.equals("$arg_prefe rred")); 1141 unittest.expect(queryMap["preferred"].first, unittest.equals("$arg_prefe rred"));
1105 1142
1106 1143
1107 var h = { 1144 var h = {
1108 "content-type" : "application/json; charset=utf-8", 1145 "content-type" : "application/json; charset=utf-8",
1109 }; 1146 };
1110 var resp = convert.JSON.encode(buildDirectoryList()); 1147 var resp = convert.JSON.encode(buildDirectoryList());
1111 return new async.Future.value(common_test.stringResponse(200, h, resp)); 1148 return new async.Future.value(stringResponse(200, h, resp));
1112 }), true); 1149 }), true);
1113 res.list(name: arg_name, preferred: arg_preferred).then(unittest.expectAsy nc(((api.DirectoryList response) { 1150 res.list(name: arg_name, preferred: arg_preferred).then(unittest.expectAsy nc(((api.DirectoryList response) {
1114 checkDirectoryList(response); 1151 checkDirectoryList(response);
1115 }))); 1152 })));
1116 }); 1153 });
1117 1154
1118 }); 1155 });
1119 1156
1120 1157
1121 } 1158 }
1122 1159
OLDNEW
« no previous file with comments | « generated/googleapis/test/dfareporting/v2_0_test.dart ('k') | generated/googleapis/test/doubleclickbidmanager/v1_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698