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

Side by Side Diff: generated/googleapis/test/admin/reports_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.admin.reports_v1.test; 1 library googleapis.admin.reports_v1.test;
2 2
3 import "dart:core" as core; 3 import "dart:core" as core;
4 import "dart:collection" as collection; 4 import "dart:collection" as collection;
5 import "dart:async" as async; 5 import "dart:async" as async;
6 import "dart:convert" as convert; 6 import "dart:convert" as convert;
7 7
8 import 'package:http/http.dart' as http; 8 import 'package:http/http.dart' as http;
9 import 'package:http/testing.dart' as http_testing; 9 import 'package:http/testing.dart' as http_testing;
10 import 'package:unittest/unittest.dart' as unittest; 10 import 'package:unittest/unittest.dart' as unittest;
11 import 'package:googleapis/common/common.dart' as common;
12 import 'package:googleapis/src/common_internal.dart' as common_internal;
13 import '../common/common_internal_test.dart' as common_test;
14 11
15 import 'package:googleapis/admin/reports_v1.dart' as api; 12 import 'package:googleapis/admin/reports_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 }
18 22
19 buildUnnamed675() { 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 }
53
54 buildUnnamed121() {
20 var o = new core.List<api.Activity>(); 55 var o = new core.List<api.Activity>();
21 o.add(buildActivity()); 56 o.add(buildActivity());
22 o.add(buildActivity()); 57 o.add(buildActivity());
23 return o; 58 return o;
24 } 59 }
25 60
26 checkUnnamed675(core.List<api.Activity> o) { 61 checkUnnamed121(core.List<api.Activity> o) {
27 unittest.expect(o, unittest.hasLength(2)); 62 unittest.expect(o, unittest.hasLength(2));
28 checkActivity(o[0]); 63 checkActivity(o[0]);
29 checkActivity(o[1]); 64 checkActivity(o[1]);
30 } 65 }
31 66
32 core.int buildCounterActivities = 0; 67 core.int buildCounterActivities = 0;
33 buildActivities() { 68 buildActivities() {
34 var o = new api.Activities(); 69 var o = new api.Activities();
35 buildCounterActivities++; 70 buildCounterActivities++;
36 if (buildCounterActivities < 3) { 71 if (buildCounterActivities < 3) {
37 o.etag = "foo"; 72 o.etag = "foo";
38 o.items = buildUnnamed675(); 73 o.items = buildUnnamed121();
39 o.kind = "foo"; 74 o.kind = "foo";
40 o.nextPageToken = "foo"; 75 o.nextPageToken = "foo";
41 } 76 }
42 buildCounterActivities--; 77 buildCounterActivities--;
43 return o; 78 return o;
44 } 79 }
45 80
46 checkActivities(api.Activities o) { 81 checkActivities(api.Activities o) {
47 buildCounterActivities++; 82 buildCounterActivities++;
48 if (buildCounterActivities < 3) { 83 if (buildCounterActivities < 3) {
49 unittest.expect(o.etag, unittest.equals('foo')); 84 unittest.expect(o.etag, unittest.equals('foo'));
50 checkUnnamed675(o.items); 85 checkUnnamed121(o.items);
51 unittest.expect(o.kind, unittest.equals('foo')); 86 unittest.expect(o.kind, unittest.equals('foo'));
52 unittest.expect(o.nextPageToken, unittest.equals('foo')); 87 unittest.expect(o.nextPageToken, unittest.equals('foo'));
53 } 88 }
54 buildCounterActivities--; 89 buildCounterActivities--;
55 } 90 }
56 91
57 core.int buildCounterActivityActor = 0; 92 core.int buildCounterActivityActor = 0;
58 buildActivityActor() { 93 buildActivityActor() {
59 var o = new api.ActivityActor(); 94 var o = new api.ActivityActor();
60 buildCounterActivityActor++; 95 buildCounterActivityActor++;
(...skipping 11 matching lines...) Expand all
72 buildCounterActivityActor++; 107 buildCounterActivityActor++;
73 if (buildCounterActivityActor < 3) { 108 if (buildCounterActivityActor < 3) {
74 unittest.expect(o.callerType, unittest.equals('foo')); 109 unittest.expect(o.callerType, unittest.equals('foo'));
75 unittest.expect(o.email, unittest.equals('foo')); 110 unittest.expect(o.email, unittest.equals('foo'));
76 unittest.expect(o.key, unittest.equals('foo')); 111 unittest.expect(o.key, unittest.equals('foo'));
77 unittest.expect(o.profileId, unittest.equals('foo')); 112 unittest.expect(o.profileId, unittest.equals('foo'));
78 } 113 }
79 buildCounterActivityActor--; 114 buildCounterActivityActor--;
80 } 115 }
81 116
82 buildUnnamed676() { 117 buildUnnamed122() {
83 var o = new core.List<core.String>(); 118 var o = new core.List<core.String>();
84 o.add("foo"); 119 o.add("foo");
85 o.add("foo"); 120 o.add("foo");
86 return o; 121 return o;
87 } 122 }
88 123
89 checkUnnamed676(core.List<core.String> o) { 124 checkUnnamed122(core.List<core.String> o) {
90 unittest.expect(o, unittest.hasLength(2)); 125 unittest.expect(o, unittest.hasLength(2));
91 unittest.expect(o[0], unittest.equals('foo')); 126 unittest.expect(o[0], unittest.equals('foo'));
92 unittest.expect(o[1], unittest.equals('foo')); 127 unittest.expect(o[1], unittest.equals('foo'));
93 } 128 }
94 129
95 buildUnnamed677() { 130 buildUnnamed123() {
96 var o = new core.List<core.String>(); 131 var o = new core.List<core.String>();
97 o.add("foo"); 132 o.add("foo");
98 o.add("foo"); 133 o.add("foo");
99 return o; 134 return o;
100 } 135 }
101 136
102 checkUnnamed677(core.List<core.String> o) { 137 checkUnnamed123(core.List<core.String> o) {
103 unittest.expect(o, unittest.hasLength(2)); 138 unittest.expect(o, unittest.hasLength(2));
104 unittest.expect(o[0], unittest.equals('foo')); 139 unittest.expect(o[0], unittest.equals('foo'));
105 unittest.expect(o[1], unittest.equals('foo')); 140 unittest.expect(o[1], unittest.equals('foo'));
106 } 141 }
107 142
108 core.int buildCounterActivityEventsParameters = 0; 143 core.int buildCounterActivityEventsParameters = 0;
109 buildActivityEventsParameters() { 144 buildActivityEventsParameters() {
110 var o = new api.ActivityEventsParameters(); 145 var o = new api.ActivityEventsParameters();
111 buildCounterActivityEventsParameters++; 146 buildCounterActivityEventsParameters++;
112 if (buildCounterActivityEventsParameters < 3) { 147 if (buildCounterActivityEventsParameters < 3) {
113 o.boolValue = true; 148 o.boolValue = true;
114 o.intValue = "foo"; 149 o.intValue = "foo";
115 o.multiIntValue = buildUnnamed676(); 150 o.multiIntValue = buildUnnamed122();
116 o.multiValue = buildUnnamed677(); 151 o.multiValue = buildUnnamed123();
117 o.name = "foo"; 152 o.name = "foo";
118 o.value = "foo"; 153 o.value = "foo";
119 } 154 }
120 buildCounterActivityEventsParameters--; 155 buildCounterActivityEventsParameters--;
121 return o; 156 return o;
122 } 157 }
123 158
124 checkActivityEventsParameters(api.ActivityEventsParameters o) { 159 checkActivityEventsParameters(api.ActivityEventsParameters o) {
125 buildCounterActivityEventsParameters++; 160 buildCounterActivityEventsParameters++;
126 if (buildCounterActivityEventsParameters < 3) { 161 if (buildCounterActivityEventsParameters < 3) {
127 unittest.expect(o.boolValue, unittest.isTrue); 162 unittest.expect(o.boolValue, unittest.isTrue);
128 unittest.expect(o.intValue, unittest.equals('foo')); 163 unittest.expect(o.intValue, unittest.equals('foo'));
129 checkUnnamed676(o.multiIntValue); 164 checkUnnamed122(o.multiIntValue);
130 checkUnnamed677(o.multiValue); 165 checkUnnamed123(o.multiValue);
131 unittest.expect(o.name, unittest.equals('foo')); 166 unittest.expect(o.name, unittest.equals('foo'));
132 unittest.expect(o.value, unittest.equals('foo')); 167 unittest.expect(o.value, unittest.equals('foo'));
133 } 168 }
134 buildCounterActivityEventsParameters--; 169 buildCounterActivityEventsParameters--;
135 } 170 }
136 171
137 buildUnnamed678() { 172 buildUnnamed124() {
138 var o = new core.List<api.ActivityEventsParameters>(); 173 var o = new core.List<api.ActivityEventsParameters>();
139 o.add(buildActivityEventsParameters()); 174 o.add(buildActivityEventsParameters());
140 o.add(buildActivityEventsParameters()); 175 o.add(buildActivityEventsParameters());
141 return o; 176 return o;
142 } 177 }
143 178
144 checkUnnamed678(core.List<api.ActivityEventsParameters> o) { 179 checkUnnamed124(core.List<api.ActivityEventsParameters> o) {
145 unittest.expect(o, unittest.hasLength(2)); 180 unittest.expect(o, unittest.hasLength(2));
146 checkActivityEventsParameters(o[0]); 181 checkActivityEventsParameters(o[0]);
147 checkActivityEventsParameters(o[1]); 182 checkActivityEventsParameters(o[1]);
148 } 183 }
149 184
150 core.int buildCounterActivityEvents = 0; 185 core.int buildCounterActivityEvents = 0;
151 buildActivityEvents() { 186 buildActivityEvents() {
152 var o = new api.ActivityEvents(); 187 var o = new api.ActivityEvents();
153 buildCounterActivityEvents++; 188 buildCounterActivityEvents++;
154 if (buildCounterActivityEvents < 3) { 189 if (buildCounterActivityEvents < 3) {
155 o.name = "foo"; 190 o.name = "foo";
156 o.parameters = buildUnnamed678(); 191 o.parameters = buildUnnamed124();
157 o.type = "foo"; 192 o.type = "foo";
158 } 193 }
159 buildCounterActivityEvents--; 194 buildCounterActivityEvents--;
160 return o; 195 return o;
161 } 196 }
162 197
163 checkActivityEvents(api.ActivityEvents o) { 198 checkActivityEvents(api.ActivityEvents o) {
164 buildCounterActivityEvents++; 199 buildCounterActivityEvents++;
165 if (buildCounterActivityEvents < 3) { 200 if (buildCounterActivityEvents < 3) {
166 unittest.expect(o.name, unittest.equals('foo')); 201 unittest.expect(o.name, unittest.equals('foo'));
167 checkUnnamed678(o.parameters); 202 checkUnnamed124(o.parameters);
168 unittest.expect(o.type, unittest.equals('foo')); 203 unittest.expect(o.type, unittest.equals('foo'));
169 } 204 }
170 buildCounterActivityEvents--; 205 buildCounterActivityEvents--;
171 } 206 }
172 207
173 buildUnnamed679() { 208 buildUnnamed125() {
174 var o = new core.List<api.ActivityEvents>(); 209 var o = new core.List<api.ActivityEvents>();
175 o.add(buildActivityEvents()); 210 o.add(buildActivityEvents());
176 o.add(buildActivityEvents()); 211 o.add(buildActivityEvents());
177 return o; 212 return o;
178 } 213 }
179 214
180 checkUnnamed679(core.List<api.ActivityEvents> o) { 215 checkUnnamed125(core.List<api.ActivityEvents> o) {
181 unittest.expect(o, unittest.hasLength(2)); 216 unittest.expect(o, unittest.hasLength(2));
182 checkActivityEvents(o[0]); 217 checkActivityEvents(o[0]);
183 checkActivityEvents(o[1]); 218 checkActivityEvents(o[1]);
184 } 219 }
185 220
186 core.int buildCounterActivityId = 0; 221 core.int buildCounterActivityId = 0;
187 buildActivityId() { 222 buildActivityId() {
188 var o = new api.ActivityId(); 223 var o = new api.ActivityId();
189 buildCounterActivityId++; 224 buildCounterActivityId++;
190 if (buildCounterActivityId < 3) { 225 if (buildCounterActivityId < 3) {
(...skipping 17 matching lines...) Expand all
208 buildCounterActivityId--; 243 buildCounterActivityId--;
209 } 244 }
210 245
211 core.int buildCounterActivity = 0; 246 core.int buildCounterActivity = 0;
212 buildActivity() { 247 buildActivity() {
213 var o = new api.Activity(); 248 var o = new api.Activity();
214 buildCounterActivity++; 249 buildCounterActivity++;
215 if (buildCounterActivity < 3) { 250 if (buildCounterActivity < 3) {
216 o.actor = buildActivityActor(); 251 o.actor = buildActivityActor();
217 o.etag = "foo"; 252 o.etag = "foo";
218 o.events = buildUnnamed679(); 253 o.events = buildUnnamed125();
219 o.id = buildActivityId(); 254 o.id = buildActivityId();
220 o.ipAddress = "foo"; 255 o.ipAddress = "foo";
221 o.kind = "foo"; 256 o.kind = "foo";
222 o.ownerDomain = "foo"; 257 o.ownerDomain = "foo";
223 } 258 }
224 buildCounterActivity--; 259 buildCounterActivity--;
225 return o; 260 return o;
226 } 261 }
227 262
228 checkActivity(api.Activity o) { 263 checkActivity(api.Activity o) {
229 buildCounterActivity++; 264 buildCounterActivity++;
230 if (buildCounterActivity < 3) { 265 if (buildCounterActivity < 3) {
231 checkActivityActor(o.actor); 266 checkActivityActor(o.actor);
232 unittest.expect(o.etag, unittest.equals('foo')); 267 unittest.expect(o.etag, unittest.equals('foo'));
233 checkUnnamed679(o.events); 268 checkUnnamed125(o.events);
234 checkActivityId(o.id); 269 checkActivityId(o.id);
235 unittest.expect(o.ipAddress, unittest.equals('foo')); 270 unittest.expect(o.ipAddress, unittest.equals('foo'));
236 unittest.expect(o.kind, unittest.equals('foo')); 271 unittest.expect(o.kind, unittest.equals('foo'));
237 unittest.expect(o.ownerDomain, unittest.equals('foo')); 272 unittest.expect(o.ownerDomain, unittest.equals('foo'));
238 } 273 }
239 buildCounterActivity--; 274 buildCounterActivity--;
240 } 275 }
241 276
242 buildUnnamed680() { 277 buildUnnamed126() {
243 var o = new core.Map<core.String, core.String>(); 278 var o = new core.Map<core.String, core.String>();
244 o["x"] = "foo"; 279 o["x"] = "foo";
245 o["y"] = "foo"; 280 o["y"] = "foo";
246 return o; 281 return o;
247 } 282 }
248 283
249 checkUnnamed680(core.Map<core.String, core.String> o) { 284 checkUnnamed126(core.Map<core.String, core.String> o) {
250 unittest.expect(o, unittest.hasLength(2)); 285 unittest.expect(o, unittest.hasLength(2));
251 unittest.expect(o["x"], unittest.equals('foo')); 286 unittest.expect(o["x"], unittest.equals('foo'));
252 unittest.expect(o["y"], unittest.equals('foo')); 287 unittest.expect(o["y"], unittest.equals('foo'));
253 } 288 }
254 289
255 core.int buildCounterChannel = 0; 290 core.int buildCounterChannel = 0;
256 buildChannel() { 291 buildChannel() {
257 var o = new api.Channel(); 292 var o = new api.Channel();
258 buildCounterChannel++; 293 buildCounterChannel++;
259 if (buildCounterChannel < 3) { 294 if (buildCounterChannel < 3) {
260 o.address = "foo"; 295 o.address = "foo";
261 o.expiration = "foo"; 296 o.expiration = "foo";
262 o.id = "foo"; 297 o.id = "foo";
263 o.kind = "foo"; 298 o.kind = "foo";
264 o.params = buildUnnamed680(); 299 o.params = buildUnnamed126();
265 o.payload = true; 300 o.payload = true;
266 o.resourceId = "foo"; 301 o.resourceId = "foo";
267 o.resourceUri = "foo"; 302 o.resourceUri = "foo";
268 o.token = "foo"; 303 o.token = "foo";
269 o.type = "foo"; 304 o.type = "foo";
270 } 305 }
271 buildCounterChannel--; 306 buildCounterChannel--;
272 return o; 307 return o;
273 } 308 }
274 309
275 checkChannel(api.Channel o) { 310 checkChannel(api.Channel o) {
276 buildCounterChannel++; 311 buildCounterChannel++;
277 if (buildCounterChannel < 3) { 312 if (buildCounterChannel < 3) {
278 unittest.expect(o.address, unittest.equals('foo')); 313 unittest.expect(o.address, unittest.equals('foo'));
279 unittest.expect(o.expiration, unittest.equals('foo')); 314 unittest.expect(o.expiration, unittest.equals('foo'));
280 unittest.expect(o.id, unittest.equals('foo')); 315 unittest.expect(o.id, unittest.equals('foo'));
281 unittest.expect(o.kind, unittest.equals('foo')); 316 unittest.expect(o.kind, unittest.equals('foo'));
282 checkUnnamed680(o.params); 317 checkUnnamed126(o.params);
283 unittest.expect(o.payload, unittest.isTrue); 318 unittest.expect(o.payload, unittest.isTrue);
284 unittest.expect(o.resourceId, unittest.equals('foo')); 319 unittest.expect(o.resourceId, unittest.equals('foo'));
285 unittest.expect(o.resourceUri, unittest.equals('foo')); 320 unittest.expect(o.resourceUri, unittest.equals('foo'));
286 unittest.expect(o.token, unittest.equals('foo')); 321 unittest.expect(o.token, unittest.equals('foo'));
287 unittest.expect(o.type, unittest.equals('foo')); 322 unittest.expect(o.type, unittest.equals('foo'));
288 } 323 }
289 buildCounterChannel--; 324 buildCounterChannel--;
290 } 325 }
291 326
292 core.int buildCounterUsageReportEntity = 0; 327 core.int buildCounterUsageReportEntity = 0;
(...skipping 14 matching lines...) Expand all
307 buildCounterUsageReportEntity++; 342 buildCounterUsageReportEntity++;
308 if (buildCounterUsageReportEntity < 3) { 343 if (buildCounterUsageReportEntity < 3) {
309 unittest.expect(o.customerId, unittest.equals('foo')); 344 unittest.expect(o.customerId, unittest.equals('foo'));
310 unittest.expect(o.profileId, unittest.equals('foo')); 345 unittest.expect(o.profileId, unittest.equals('foo'));
311 unittest.expect(o.type, unittest.equals('foo')); 346 unittest.expect(o.type, unittest.equals('foo'));
312 unittest.expect(o.userEmail, unittest.equals('foo')); 347 unittest.expect(o.userEmail, unittest.equals('foo'));
313 } 348 }
314 buildCounterUsageReportEntity--; 349 buildCounterUsageReportEntity--;
315 } 350 }
316 351
317 buildUnnamed681() { 352 buildUnnamed127() {
318 var o = new core.Map<core.String, core.Object>(); 353 var o = new core.Map<core.String, core.Object>();
319 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; 354 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'};
320 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; 355 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'};
321 return o; 356 return o;
322 } 357 }
323 358
324 checkUnnamed681(core.Map<core.String, core.Object> o) { 359 checkUnnamed127(core.Map<core.String, core.Object> o) {
325 unittest.expect(o, unittest.hasLength(2)); 360 unittest.expect(o, unittest.hasLength(2));
326 var casted1 = (o["x"]) as core.Map; unittest.expect(casted1, unittest.hasLengt h(3)); unittest.expect(casted1["list"], unittest.equals([1, 2, 3])); unittest.ex pect(casted1["bool"], unittest.equals(true)); unittest.expect(casted1["string"], unittest.equals('foo')); 361 var casted1 = (o["x"]) as core.Map; unittest.expect(casted1, unittest.hasLengt h(3)); unittest.expect(casted1["list"], unittest.equals([1, 2, 3])); unittest.ex pect(casted1["bool"], unittest.equals(true)); unittest.expect(casted1["string"], unittest.equals('foo'));
327 var casted2 = (o["y"]) as core.Map; unittest.expect(casted2, unittest.hasLengt h(3)); unittest.expect(casted2["list"], unittest.equals([1, 2, 3])); unittest.ex pect(casted2["bool"], unittest.equals(true)); unittest.expect(casted2["string"], unittest.equals('foo')); 362 var casted2 = (o["y"]) as core.Map; unittest.expect(casted2, unittest.hasLengt h(3)); unittest.expect(casted2["list"], unittest.equals([1, 2, 3])); unittest.ex pect(casted2["bool"], unittest.equals(true)); unittest.expect(casted2["string"], unittest.equals('foo'));
328 } 363 }
329 364
330 buildUnnamed682() { 365 buildUnnamed128() {
331 var o = new core.List<core.Map<core.String, core.Object>>(); 366 var o = new core.List<core.Map<core.String, core.Object>>();
332 o.add(buildUnnamed681()); 367 o.add(buildUnnamed127());
333 o.add(buildUnnamed681()); 368 o.add(buildUnnamed127());
334 return o; 369 return o;
335 } 370 }
336 371
337 checkUnnamed682(core.List<core.Map<core.String, core.Object>> o) { 372 checkUnnamed128(core.List<core.Map<core.String, core.Object>> o) {
338 unittest.expect(o, unittest.hasLength(2)); 373 unittest.expect(o, unittest.hasLength(2));
339 checkUnnamed681(o[0]); 374 checkUnnamed127(o[0]);
340 checkUnnamed681(o[1]); 375 checkUnnamed127(o[1]);
341 } 376 }
342 377
343 core.int buildCounterUsageReportParameters = 0; 378 core.int buildCounterUsageReportParameters = 0;
344 buildUsageReportParameters() { 379 buildUsageReportParameters() {
345 var o = new api.UsageReportParameters(); 380 var o = new api.UsageReportParameters();
346 buildCounterUsageReportParameters++; 381 buildCounterUsageReportParameters++;
347 if (buildCounterUsageReportParameters < 3) { 382 if (buildCounterUsageReportParameters < 3) {
348 o.boolValue = true; 383 o.boolValue = true;
349 o.datetimeValue = core.DateTime.parse("2002-02-27T14:01:02"); 384 o.datetimeValue = core.DateTime.parse("2002-02-27T14:01:02");
350 o.intValue = "foo"; 385 o.intValue = "foo";
351 o.msgValue = buildUnnamed682(); 386 o.msgValue = buildUnnamed128();
352 o.name = "foo"; 387 o.name = "foo";
353 o.stringValue = "foo"; 388 o.stringValue = "foo";
354 } 389 }
355 buildCounterUsageReportParameters--; 390 buildCounterUsageReportParameters--;
356 return o; 391 return o;
357 } 392 }
358 393
359 checkUsageReportParameters(api.UsageReportParameters o) { 394 checkUsageReportParameters(api.UsageReportParameters o) {
360 buildCounterUsageReportParameters++; 395 buildCounterUsageReportParameters++;
361 if (buildCounterUsageReportParameters < 3) { 396 if (buildCounterUsageReportParameters < 3) {
362 unittest.expect(o.boolValue, unittest.isTrue); 397 unittest.expect(o.boolValue, unittest.isTrue);
363 unittest.expect(o.datetimeValue, unittest.equals(core.DateTime.parse("2002-0 2-27T14:01:02"))); 398 unittest.expect(o.datetimeValue, unittest.equals(core.DateTime.parse("2002-0 2-27T14:01:02")));
364 unittest.expect(o.intValue, unittest.equals('foo')); 399 unittest.expect(o.intValue, unittest.equals('foo'));
365 checkUnnamed682(o.msgValue); 400 checkUnnamed128(o.msgValue);
366 unittest.expect(o.name, unittest.equals('foo')); 401 unittest.expect(o.name, unittest.equals('foo'));
367 unittest.expect(o.stringValue, unittest.equals('foo')); 402 unittest.expect(o.stringValue, unittest.equals('foo'));
368 } 403 }
369 buildCounterUsageReportParameters--; 404 buildCounterUsageReportParameters--;
370 } 405 }
371 406
372 buildUnnamed683() { 407 buildUnnamed129() {
373 var o = new core.List<api.UsageReportParameters>(); 408 var o = new core.List<api.UsageReportParameters>();
374 o.add(buildUsageReportParameters()); 409 o.add(buildUsageReportParameters());
375 o.add(buildUsageReportParameters()); 410 o.add(buildUsageReportParameters());
376 return o; 411 return o;
377 } 412 }
378 413
379 checkUnnamed683(core.List<api.UsageReportParameters> o) { 414 checkUnnamed129(core.List<api.UsageReportParameters> o) {
380 unittest.expect(o, unittest.hasLength(2)); 415 unittest.expect(o, unittest.hasLength(2));
381 checkUsageReportParameters(o[0]); 416 checkUsageReportParameters(o[0]);
382 checkUsageReportParameters(o[1]); 417 checkUsageReportParameters(o[1]);
383 } 418 }
384 419
385 core.int buildCounterUsageReport = 0; 420 core.int buildCounterUsageReport = 0;
386 buildUsageReport() { 421 buildUsageReport() {
387 var o = new api.UsageReport(); 422 var o = new api.UsageReport();
388 buildCounterUsageReport++; 423 buildCounterUsageReport++;
389 if (buildCounterUsageReport < 3) { 424 if (buildCounterUsageReport < 3) {
390 o.date = "foo"; 425 o.date = "foo";
391 o.entity = buildUsageReportEntity(); 426 o.entity = buildUsageReportEntity();
392 o.etag = "foo"; 427 o.etag = "foo";
393 o.kind = "foo"; 428 o.kind = "foo";
394 o.parameters = buildUnnamed683(); 429 o.parameters = buildUnnamed129();
395 } 430 }
396 buildCounterUsageReport--; 431 buildCounterUsageReport--;
397 return o; 432 return o;
398 } 433 }
399 434
400 checkUsageReport(api.UsageReport o) { 435 checkUsageReport(api.UsageReport o) {
401 buildCounterUsageReport++; 436 buildCounterUsageReport++;
402 if (buildCounterUsageReport < 3) { 437 if (buildCounterUsageReport < 3) {
403 unittest.expect(o.date, unittest.equals('foo')); 438 unittest.expect(o.date, unittest.equals('foo'));
404 checkUsageReportEntity(o.entity); 439 checkUsageReportEntity(o.entity);
405 unittest.expect(o.etag, unittest.equals('foo')); 440 unittest.expect(o.etag, unittest.equals('foo'));
406 unittest.expect(o.kind, unittest.equals('foo')); 441 unittest.expect(o.kind, unittest.equals('foo'));
407 checkUnnamed683(o.parameters); 442 checkUnnamed129(o.parameters);
408 } 443 }
409 buildCounterUsageReport--; 444 buildCounterUsageReport--;
410 } 445 }
411 446
412 buildUnnamed684() { 447 buildUnnamed130() {
413 var o = new core.List<api.UsageReport>(); 448 var o = new core.List<api.UsageReport>();
414 o.add(buildUsageReport()); 449 o.add(buildUsageReport());
415 o.add(buildUsageReport()); 450 o.add(buildUsageReport());
416 return o; 451 return o;
417 } 452 }
418 453
419 checkUnnamed684(core.List<api.UsageReport> o) { 454 checkUnnamed130(core.List<api.UsageReport> o) {
420 unittest.expect(o, unittest.hasLength(2)); 455 unittest.expect(o, unittest.hasLength(2));
421 checkUsageReport(o[0]); 456 checkUsageReport(o[0]);
422 checkUsageReport(o[1]); 457 checkUsageReport(o[1]);
423 } 458 }
424 459
425 core.int buildCounterUsageReportsWarningsData = 0; 460 core.int buildCounterUsageReportsWarningsData = 0;
426 buildUsageReportsWarningsData() { 461 buildUsageReportsWarningsData() {
427 var o = new api.UsageReportsWarningsData(); 462 var o = new api.UsageReportsWarningsData();
428 buildCounterUsageReportsWarningsData++; 463 buildCounterUsageReportsWarningsData++;
429 if (buildCounterUsageReportsWarningsData < 3) { 464 if (buildCounterUsageReportsWarningsData < 3) {
430 o.key = "foo"; 465 o.key = "foo";
431 o.value = "foo"; 466 o.value = "foo";
432 } 467 }
433 buildCounterUsageReportsWarningsData--; 468 buildCounterUsageReportsWarningsData--;
434 return o; 469 return o;
435 } 470 }
436 471
437 checkUsageReportsWarningsData(api.UsageReportsWarningsData o) { 472 checkUsageReportsWarningsData(api.UsageReportsWarningsData o) {
438 buildCounterUsageReportsWarningsData++; 473 buildCounterUsageReportsWarningsData++;
439 if (buildCounterUsageReportsWarningsData < 3) { 474 if (buildCounterUsageReportsWarningsData < 3) {
440 unittest.expect(o.key, unittest.equals('foo')); 475 unittest.expect(o.key, unittest.equals('foo'));
441 unittest.expect(o.value, unittest.equals('foo')); 476 unittest.expect(o.value, unittest.equals('foo'));
442 } 477 }
443 buildCounterUsageReportsWarningsData--; 478 buildCounterUsageReportsWarningsData--;
444 } 479 }
445 480
446 buildUnnamed685() { 481 buildUnnamed131() {
447 var o = new core.List<api.UsageReportsWarningsData>(); 482 var o = new core.List<api.UsageReportsWarningsData>();
448 o.add(buildUsageReportsWarningsData()); 483 o.add(buildUsageReportsWarningsData());
449 o.add(buildUsageReportsWarningsData()); 484 o.add(buildUsageReportsWarningsData());
450 return o; 485 return o;
451 } 486 }
452 487
453 checkUnnamed685(core.List<api.UsageReportsWarningsData> o) { 488 checkUnnamed131(core.List<api.UsageReportsWarningsData> o) {
454 unittest.expect(o, unittest.hasLength(2)); 489 unittest.expect(o, unittest.hasLength(2));
455 checkUsageReportsWarningsData(o[0]); 490 checkUsageReportsWarningsData(o[0]);
456 checkUsageReportsWarningsData(o[1]); 491 checkUsageReportsWarningsData(o[1]);
457 } 492 }
458 493
459 core.int buildCounterUsageReportsWarnings = 0; 494 core.int buildCounterUsageReportsWarnings = 0;
460 buildUsageReportsWarnings() { 495 buildUsageReportsWarnings() {
461 var o = new api.UsageReportsWarnings(); 496 var o = new api.UsageReportsWarnings();
462 buildCounterUsageReportsWarnings++; 497 buildCounterUsageReportsWarnings++;
463 if (buildCounterUsageReportsWarnings < 3) { 498 if (buildCounterUsageReportsWarnings < 3) {
464 o.code = "foo"; 499 o.code = "foo";
465 o.data = buildUnnamed685(); 500 o.data = buildUnnamed131();
466 o.message = "foo"; 501 o.message = "foo";
467 } 502 }
468 buildCounterUsageReportsWarnings--; 503 buildCounterUsageReportsWarnings--;
469 return o; 504 return o;
470 } 505 }
471 506
472 checkUsageReportsWarnings(api.UsageReportsWarnings o) { 507 checkUsageReportsWarnings(api.UsageReportsWarnings o) {
473 buildCounterUsageReportsWarnings++; 508 buildCounterUsageReportsWarnings++;
474 if (buildCounterUsageReportsWarnings < 3) { 509 if (buildCounterUsageReportsWarnings < 3) {
475 unittest.expect(o.code, unittest.equals('foo')); 510 unittest.expect(o.code, unittest.equals('foo'));
476 checkUnnamed685(o.data); 511 checkUnnamed131(o.data);
477 unittest.expect(o.message, unittest.equals('foo')); 512 unittest.expect(o.message, unittest.equals('foo'));
478 } 513 }
479 buildCounterUsageReportsWarnings--; 514 buildCounterUsageReportsWarnings--;
480 } 515 }
481 516
482 buildUnnamed686() { 517 buildUnnamed132() {
483 var o = new core.List<api.UsageReportsWarnings>(); 518 var o = new core.List<api.UsageReportsWarnings>();
484 o.add(buildUsageReportsWarnings()); 519 o.add(buildUsageReportsWarnings());
485 o.add(buildUsageReportsWarnings()); 520 o.add(buildUsageReportsWarnings());
486 return o; 521 return o;
487 } 522 }
488 523
489 checkUnnamed686(core.List<api.UsageReportsWarnings> o) { 524 checkUnnamed132(core.List<api.UsageReportsWarnings> o) {
490 unittest.expect(o, unittest.hasLength(2)); 525 unittest.expect(o, unittest.hasLength(2));
491 checkUsageReportsWarnings(o[0]); 526 checkUsageReportsWarnings(o[0]);
492 checkUsageReportsWarnings(o[1]); 527 checkUsageReportsWarnings(o[1]);
493 } 528 }
494 529
495 core.int buildCounterUsageReports = 0; 530 core.int buildCounterUsageReports = 0;
496 buildUsageReports() { 531 buildUsageReports() {
497 var o = new api.UsageReports(); 532 var o = new api.UsageReports();
498 buildCounterUsageReports++; 533 buildCounterUsageReports++;
499 if (buildCounterUsageReports < 3) { 534 if (buildCounterUsageReports < 3) {
500 o.etag = "foo"; 535 o.etag = "foo";
501 o.kind = "foo"; 536 o.kind = "foo";
502 o.nextPageToken = "foo"; 537 o.nextPageToken = "foo";
503 o.usageReports = buildUnnamed684(); 538 o.usageReports = buildUnnamed130();
504 o.warnings = buildUnnamed686(); 539 o.warnings = buildUnnamed132();
505 } 540 }
506 buildCounterUsageReports--; 541 buildCounterUsageReports--;
507 return o; 542 return o;
508 } 543 }
509 544
510 checkUsageReports(api.UsageReports o) { 545 checkUsageReports(api.UsageReports o) {
511 buildCounterUsageReports++; 546 buildCounterUsageReports++;
512 if (buildCounterUsageReports < 3) { 547 if (buildCounterUsageReports < 3) {
513 unittest.expect(o.etag, unittest.equals('foo')); 548 unittest.expect(o.etag, unittest.equals('foo'));
514 unittest.expect(o.kind, unittest.equals('foo')); 549 unittest.expect(o.kind, unittest.equals('foo'));
515 unittest.expect(o.nextPageToken, unittest.equals('foo')); 550 unittest.expect(o.nextPageToken, unittest.equals('foo'));
516 checkUnnamed684(o.usageReports); 551 checkUnnamed130(o.usageReports);
517 checkUnnamed686(o.warnings); 552 checkUnnamed132(o.warnings);
518 } 553 }
519 buildCounterUsageReports--; 554 buildCounterUsageReports--;
520 } 555 }
521 556
522 557
523 main() { 558 main() {
524 unittest.group("obj-schema-Activities", () { 559 unittest.group("obj-schema-Activities", () {
525 unittest.test("to-json--from-json", () { 560 unittest.test("to-json--from-json", () {
526 var o = buildActivities(); 561 var o = buildActivities();
527 var od = new api.Activities.fromJson(o.toJson()); 562 var od = new api.Activities.fromJson(o.toJson());
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
634 var o = buildUsageReports(); 669 var o = buildUsageReports();
635 var od = new api.UsageReports.fromJson(o.toJson()); 670 var od = new api.UsageReports.fromJson(o.toJson());
636 checkUsageReports(od); 671 checkUsageReports(od);
637 }); 672 });
638 }); 673 });
639 674
640 675
641 unittest.group("resource-ActivitiesResourceApi", () { 676 unittest.group("resource-ActivitiesResourceApi", () {
642 unittest.test("method--list", () { 677 unittest.test("method--list", () {
643 678
644 var mock = new common_test.HttpServerMock(); 679 var mock = new HttpServerMock();
645 api.ActivitiesResourceApi res = new api.AdminApi(mock).activities; 680 api.ActivitiesResourceApi res = new api.AdminApi(mock).activities;
646 var arg_userKey = "foo"; 681 var arg_userKey = "foo";
647 var arg_applicationName = "foo"; 682 var arg_applicationName = "foo";
648 var arg_actorIpAddress = "foo"; 683 var arg_actorIpAddress = "foo";
649 var arg_customerId = "foo"; 684 var arg_customerId = "foo";
650 var arg_endTime = "foo"; 685 var arg_endTime = "foo";
651 var arg_eventName = "foo"; 686 var arg_eventName = "foo";
652 var arg_filters = "foo"; 687 var arg_filters = "foo";
653 var arg_maxResults = 42; 688 var arg_maxResults = 42;
654 var arg_pageToken = "foo"; 689 var arg_pageToken = "foo";
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
698 unittest.expect(queryMap["filters"].first, unittest.equals(arg_filters)) ; 733 unittest.expect(queryMap["filters"].first, unittest.equals(arg_filters)) ;
699 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e quals(arg_maxResults)); 734 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e quals(arg_maxResults));
700 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok en)); 735 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok en));
701 unittest.expect(queryMap["startTime"].first, unittest.equals(arg_startTi me)); 736 unittest.expect(queryMap["startTime"].first, unittest.equals(arg_startTi me));
702 737
703 738
704 var h = { 739 var h = {
705 "content-type" : "application/json; charset=utf-8", 740 "content-type" : "application/json; charset=utf-8",
706 }; 741 };
707 var resp = convert.JSON.encode(buildActivities()); 742 var resp = convert.JSON.encode(buildActivities());
708 return new async.Future.value(common_test.stringResponse(200, h, resp)); 743 return new async.Future.value(stringResponse(200, h, resp));
709 }), true); 744 }), true);
710 res.list(arg_userKey, arg_applicationName, actorIpAddress: arg_actorIpAddr ess, customerId: arg_customerId, endTime: arg_endTime, eventName: arg_eventName, filters: arg_filters, maxResults: arg_maxResults, pageToken: arg_pageToken, sta rtTime: arg_startTime).then(unittest.expectAsync(((api.Activities response) { 745 res.list(arg_userKey, arg_applicationName, actorIpAddress: arg_actorIpAddr ess, customerId: arg_customerId, endTime: arg_endTime, eventName: arg_eventName, filters: arg_filters, maxResults: arg_maxResults, pageToken: arg_pageToken, sta rtTime: arg_startTime).then(unittest.expectAsync(((api.Activities response) {
711 checkActivities(response); 746 checkActivities(response);
712 }))); 747 })));
713 }); 748 });
714 749
715 unittest.test("method--watch", () { 750 unittest.test("method--watch", () {
716 751
717 var mock = new common_test.HttpServerMock(); 752 var mock = new HttpServerMock();
718 api.ActivitiesResourceApi res = new api.AdminApi(mock).activities; 753 api.ActivitiesResourceApi res = new api.AdminApi(mock).activities;
719 var arg_request = buildChannel(); 754 var arg_request = buildChannel();
720 var arg_userKey = "foo"; 755 var arg_userKey = "foo";
721 var arg_applicationName = "foo"; 756 var arg_applicationName = "foo";
722 var arg_actorIpAddress = "foo"; 757 var arg_actorIpAddress = "foo";
723 var arg_customerId = "foo"; 758 var arg_customerId = "foo";
724 var arg_endTime = "foo"; 759 var arg_endTime = "foo";
725 var arg_eventName = "foo"; 760 var arg_eventName = "foo";
726 var arg_filters = "foo"; 761 var arg_filters = "foo";
727 var arg_maxResults = 42; 762 var arg_maxResults = 42;
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
779 unittest.expect(queryMap["filters"].first, unittest.equals(arg_filters)) ; 814 unittest.expect(queryMap["filters"].first, unittest.equals(arg_filters)) ;
780 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e quals(arg_maxResults)); 815 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e quals(arg_maxResults));
781 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok en)); 816 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok en));
782 unittest.expect(queryMap["startTime"].first, unittest.equals(arg_startTi me)); 817 unittest.expect(queryMap["startTime"].first, unittest.equals(arg_startTi me));
783 818
784 819
785 var h = { 820 var h = {
786 "content-type" : "application/json; charset=utf-8", 821 "content-type" : "application/json; charset=utf-8",
787 }; 822 };
788 var resp = convert.JSON.encode(buildChannel()); 823 var resp = convert.JSON.encode(buildChannel());
789 return new async.Future.value(common_test.stringResponse(200, h, resp)); 824 return new async.Future.value(stringResponse(200, h, resp));
790 }), true); 825 }), true);
791 res.watch(arg_request, arg_userKey, arg_applicationName, actorIpAddress: a rg_actorIpAddress, customerId: arg_customerId, endTime: arg_endTime, eventName: arg_eventName, filters: arg_filters, maxResults: arg_maxResults, pageToken: arg_ pageToken, startTime: arg_startTime).then(unittest.expectAsync(((api.Channel res ponse) { 826 res.watch(arg_request, arg_userKey, arg_applicationName, actorIpAddress: a rg_actorIpAddress, customerId: arg_customerId, endTime: arg_endTime, eventName: arg_eventName, filters: arg_filters, maxResults: arg_maxResults, pageToken: arg_ pageToken, startTime: arg_startTime).then(unittest.expectAsync(((api.Channel res ponse) {
792 checkChannel(response); 827 checkChannel(response);
793 }))); 828 })));
794 }); 829 });
795 830
796 }); 831 });
797 832
798 833
799 unittest.group("resource-ChannelsResourceApi", () { 834 unittest.group("resource-ChannelsResourceApi", () {
800 unittest.test("method--stop", () { 835 unittest.test("method--stop", () {
801 836
802 var mock = new common_test.HttpServerMock(); 837 var mock = new HttpServerMock();
803 api.ChannelsResourceApi res = new api.AdminApi(mock).channels; 838 api.ChannelsResourceApi res = new api.AdminApi(mock).channels;
804 var arg_request = buildChannel(); 839 var arg_request = buildChannel();
805 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 840 mock.register(unittest.expectAsync((http.BaseRequest req, json) {
806 var obj = new api.Channel.fromJson(json); 841 var obj = new api.Channel.fromJson(json);
807 checkChannel(obj); 842 checkChannel(obj);
808 843
809 var path = (req.url).path; 844 var path = (req.url).path;
810 var pathOffset = 0; 845 var pathOffset = 0;
811 var index; 846 var index;
812 var subPart; 847 var subPart;
(...skipping 17 matching lines...) Expand all
830 var keyvalue = part.split("="); 865 var keyvalue = part.split("=");
831 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1])); 866 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1]));
832 } 867 }
833 } 868 }
834 869
835 870
836 var h = { 871 var h = {
837 "content-type" : "application/json; charset=utf-8", 872 "content-type" : "application/json; charset=utf-8",
838 }; 873 };
839 var resp = ""; 874 var resp = "";
840 return new async.Future.value(common_test.stringResponse(200, h, resp)); 875 return new async.Future.value(stringResponse(200, h, resp));
841 }), true); 876 }), true);
842 res.stop(arg_request).then(unittest.expectAsync((_) {})); 877 res.stop(arg_request).then(unittest.expectAsync((_) {}));
843 }); 878 });
844 879
845 }); 880 });
846 881
847 882
848 unittest.group("resource-CustomerUsageReportsResourceApi", () { 883 unittest.group("resource-CustomerUsageReportsResourceApi", () {
849 unittest.test("method--get", () { 884 unittest.test("method--get", () {
850 885
851 var mock = new common_test.HttpServerMock(); 886 var mock = new HttpServerMock();
852 api.CustomerUsageReportsResourceApi res = new api.AdminApi(mock).customerU sageReports; 887 api.CustomerUsageReportsResourceApi res = new api.AdminApi(mock).customerU sageReports;
853 var arg_date = "foo"; 888 var arg_date = "foo";
854 var arg_customerId = "foo"; 889 var arg_customerId = "foo";
855 var arg_pageToken = "foo"; 890 var arg_pageToken = "foo";
856 var arg_parameters = "foo"; 891 var arg_parameters = "foo";
857 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 892 mock.register(unittest.expectAsync((http.BaseRequest req, json) {
858 var path = (req.url).path; 893 var path = (req.url).path;
859 var pathOffset = 0; 894 var pathOffset = 0;
860 var index; 895 var index;
861 var subPart; 896 var subPart;
(...skipping 25 matching lines...) Expand all
887 } 922 }
888 unittest.expect(queryMap["customerId"].first, unittest.equals(arg_custom erId)); 923 unittest.expect(queryMap["customerId"].first, unittest.equals(arg_custom erId));
889 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok en)); 924 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok en));
890 unittest.expect(queryMap["parameters"].first, unittest.equals(arg_parame ters)); 925 unittest.expect(queryMap["parameters"].first, unittest.equals(arg_parame ters));
891 926
892 927
893 var h = { 928 var h = {
894 "content-type" : "application/json; charset=utf-8", 929 "content-type" : "application/json; charset=utf-8",
895 }; 930 };
896 var resp = convert.JSON.encode(buildUsageReports()); 931 var resp = convert.JSON.encode(buildUsageReports());
897 return new async.Future.value(common_test.stringResponse(200, h, resp)); 932 return new async.Future.value(stringResponse(200, h, resp));
898 }), true); 933 }), true);
899 res.get(arg_date, customerId: arg_customerId, pageToken: arg_pageToken, pa rameters: arg_parameters).then(unittest.expectAsync(((api.UsageReports response) { 934 res.get(arg_date, customerId: arg_customerId, pageToken: arg_pageToken, pa rameters: arg_parameters).then(unittest.expectAsync(((api.UsageReports response) {
900 checkUsageReports(response); 935 checkUsageReports(response);
901 }))); 936 })));
902 }); 937 });
903 938
904 }); 939 });
905 940
906 941
907 unittest.group("resource-UserUsageReportResourceApi", () { 942 unittest.group("resource-UserUsageReportResourceApi", () {
908 unittest.test("method--get", () { 943 unittest.test("method--get", () {
909 944
910 var mock = new common_test.HttpServerMock(); 945 var mock = new HttpServerMock();
911 api.UserUsageReportResourceApi res = new api.AdminApi(mock).userUsageRepor t; 946 api.UserUsageReportResourceApi res = new api.AdminApi(mock).userUsageRepor t;
912 var arg_userKey = "foo"; 947 var arg_userKey = "foo";
913 var arg_date = "foo"; 948 var arg_date = "foo";
914 var arg_customerId = "foo"; 949 var arg_customerId = "foo";
915 var arg_filters = "foo"; 950 var arg_filters = "foo";
916 var arg_maxResults = 42; 951 var arg_maxResults = 42;
917 var arg_pageToken = "foo"; 952 var arg_pageToken = "foo";
918 var arg_parameters = "foo"; 953 var arg_parameters = "foo";
919 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 954 mock.register(unittest.expectAsync((http.BaseRequest req, json) {
920 var path = (req.url).path; 955 var path = (req.url).path;
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
958 unittest.expect(queryMap["filters"].first, unittest.equals(arg_filters)) ; 993 unittest.expect(queryMap["filters"].first, unittest.equals(arg_filters)) ;
959 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e quals(arg_maxResults)); 994 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e quals(arg_maxResults));
960 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok en)); 995 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok en));
961 unittest.expect(queryMap["parameters"].first, unittest.equals(arg_parame ters)); 996 unittest.expect(queryMap["parameters"].first, unittest.equals(arg_parame ters));
962 997
963 998
964 var h = { 999 var h = {
965 "content-type" : "application/json; charset=utf-8", 1000 "content-type" : "application/json; charset=utf-8",
966 }; 1001 };
967 var resp = convert.JSON.encode(buildUsageReports()); 1002 var resp = convert.JSON.encode(buildUsageReports());
968 return new async.Future.value(common_test.stringResponse(200, h, resp)); 1003 return new async.Future.value(stringResponse(200, h, resp));
969 }), true); 1004 }), true);
970 res.get(arg_userKey, arg_date, customerId: arg_customerId, filters: arg_fi lters, maxResults: arg_maxResults, pageToken: arg_pageToken, parameters: arg_par ameters).then(unittest.expectAsync(((api.UsageReports response) { 1005 res.get(arg_userKey, arg_date, customerId: arg_customerId, filters: arg_fi lters, maxResults: arg_maxResults, pageToken: arg_pageToken, parameters: arg_par ameters).then(unittest.expectAsync(((api.UsageReports response) {
971 checkUsageReports(response); 1006 checkUsageReports(response);
972 }))); 1007 })));
973 }); 1008 });
974 1009
975 }); 1010 });
976 1011
977 1012
978 } 1013 }
979 1014
OLDNEW
« no previous file with comments | « generated/googleapis/test/admin/email_migration_v2_test.dart ('k') | generated/googleapis/test/adsense/v1_4_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698