OLD | NEW |
1 library googleapis.doubleclickbidmanager.v1.test; | 1 library googleapis.doubleclickbidmanager.v1.test; |
2 | 2 |
3 import "dart:core" as core; | 3 import "dart:core" as core; |
4 import "dart:collection" as collection; | 4 import "dart:collection" as collection; |
5 import "dart:async" as async; | 5 import "dart:async" as async; |
6 import "dart:convert" as convert; | 6 import "dart:convert" as convert; |
7 | 7 |
8 import 'package:http/http.dart' as http; | 8 import 'package:http/http.dart' as http; |
9 import 'package:http/testing.dart' as http_testing; | 9 import 'package:http/testing.dart' as http_testing; |
10 import 'package:unittest/unittest.dart' as unittest; | 10 import 'package:unittest/unittest.dart' as unittest; |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 } | 44 } |
45 } | 45 } |
46 } | 46 } |
47 | 47 |
48 http.StreamedResponse stringResponse( | 48 http.StreamedResponse stringResponse( |
49 core.int status, core.Map headers, core.String body) { | 49 core.int status, core.Map headers, core.String body) { |
50 var stream = new async.Stream.fromIterable([convert.UTF8.encode(body)]); | 50 var stream = new async.Stream.fromIterable([convert.UTF8.encode(body)]); |
51 return new http.StreamedResponse(stream, status, headers: headers); | 51 return new http.StreamedResponse(stream, status, headers: headers); |
52 } | 52 } |
53 | 53 |
54 buildUnnamed1329() { | 54 buildUnnamed1350() { |
55 var o = new core.List<core.String>(); | 55 var o = new core.List<core.String>(); |
56 o.add("foo"); | 56 o.add("foo"); |
57 o.add("foo"); | 57 o.add("foo"); |
58 return o; | 58 return o; |
59 } | 59 } |
60 | 60 |
61 checkUnnamed1329(core.List<core.String> o) { | 61 checkUnnamed1350(core.List<core.String> o) { |
62 unittest.expect(o, unittest.hasLength(2)); | 62 unittest.expect(o, unittest.hasLength(2)); |
63 unittest.expect(o[0], unittest.equals('foo')); | 63 unittest.expect(o[0], unittest.equals('foo')); |
64 unittest.expect(o[1], unittest.equals('foo')); | 64 unittest.expect(o[1], unittest.equals('foo')); |
65 } | 65 } |
66 | 66 |
67 core.int buildCounterDownloadLineItemsRequest = 0; | 67 core.int buildCounterDownloadLineItemsRequest = 0; |
68 buildDownloadLineItemsRequest() { | 68 buildDownloadLineItemsRequest() { |
69 var o = new api.DownloadLineItemsRequest(); | 69 var o = new api.DownloadLineItemsRequest(); |
70 buildCounterDownloadLineItemsRequest++; | 70 buildCounterDownloadLineItemsRequest++; |
71 if (buildCounterDownloadLineItemsRequest < 3) { | 71 if (buildCounterDownloadLineItemsRequest < 3) { |
72 o.fileSpec = "foo"; | 72 o.fileSpec = "foo"; |
73 o.filterIds = buildUnnamed1329(); | 73 o.filterIds = buildUnnamed1350(); |
74 o.filterType = "foo"; | 74 o.filterType = "foo"; |
75 o.format = "foo"; | 75 o.format = "foo"; |
76 } | 76 } |
77 buildCounterDownloadLineItemsRequest--; | 77 buildCounterDownloadLineItemsRequest--; |
78 return o; | 78 return o; |
79 } | 79 } |
80 | 80 |
81 checkDownloadLineItemsRequest(api.DownloadLineItemsRequest o) { | 81 checkDownloadLineItemsRequest(api.DownloadLineItemsRequest o) { |
82 buildCounterDownloadLineItemsRequest++; | 82 buildCounterDownloadLineItemsRequest++; |
83 if (buildCounterDownloadLineItemsRequest < 3) { | 83 if (buildCounterDownloadLineItemsRequest < 3) { |
84 unittest.expect(o.fileSpec, unittest.equals('foo')); | 84 unittest.expect(o.fileSpec, unittest.equals('foo')); |
85 checkUnnamed1329(o.filterIds); | 85 checkUnnamed1350(o.filterIds); |
86 unittest.expect(o.filterType, unittest.equals('foo')); | 86 unittest.expect(o.filterType, unittest.equals('foo')); |
87 unittest.expect(o.format, unittest.equals('foo')); | 87 unittest.expect(o.format, unittest.equals('foo')); |
88 } | 88 } |
89 buildCounterDownloadLineItemsRequest--; | 89 buildCounterDownloadLineItemsRequest--; |
90 } | 90 } |
91 | 91 |
92 core.int buildCounterDownloadLineItemsResponse = 0; | 92 core.int buildCounterDownloadLineItemsResponse = 0; |
93 buildDownloadLineItemsResponse() { | 93 buildDownloadLineItemsResponse() { |
94 var o = new api.DownloadLineItemsResponse(); | 94 var o = new api.DownloadLineItemsResponse(); |
95 buildCounterDownloadLineItemsResponse++; | 95 buildCounterDownloadLineItemsResponse++; |
96 if (buildCounterDownloadLineItemsResponse < 3) { | 96 if (buildCounterDownloadLineItemsResponse < 3) { |
97 o.lineItems = "foo"; | 97 o.lineItems = "foo"; |
98 } | 98 } |
99 buildCounterDownloadLineItemsResponse--; | 99 buildCounterDownloadLineItemsResponse--; |
100 return o; | 100 return o; |
101 } | 101 } |
102 | 102 |
103 checkDownloadLineItemsResponse(api.DownloadLineItemsResponse o) { | 103 checkDownloadLineItemsResponse(api.DownloadLineItemsResponse o) { |
104 buildCounterDownloadLineItemsResponse++; | 104 buildCounterDownloadLineItemsResponse++; |
105 if (buildCounterDownloadLineItemsResponse < 3) { | 105 if (buildCounterDownloadLineItemsResponse < 3) { |
106 unittest.expect(o.lineItems, unittest.equals('foo')); | 106 unittest.expect(o.lineItems, unittest.equals('foo')); |
107 } | 107 } |
108 buildCounterDownloadLineItemsResponse--; | 108 buildCounterDownloadLineItemsResponse--; |
109 } | 109 } |
110 | 110 |
| 111 buildUnnamed1351() { |
| 112 var o = new core.List<core.String>(); |
| 113 o.add("foo"); |
| 114 o.add("foo"); |
| 115 return o; |
| 116 } |
| 117 |
| 118 checkUnnamed1351(core.List<core.String> o) { |
| 119 unittest.expect(o, unittest.hasLength(2)); |
| 120 unittest.expect(o[0], unittest.equals('foo')); |
| 121 unittest.expect(o[1], unittest.equals('foo')); |
| 122 } |
| 123 |
| 124 buildUnnamed1352() { |
| 125 var o = new core.List<core.String>(); |
| 126 o.add("foo"); |
| 127 o.add("foo"); |
| 128 return o; |
| 129 } |
| 130 |
| 131 checkUnnamed1352(core.List<core.String> o) { |
| 132 unittest.expect(o, unittest.hasLength(2)); |
| 133 unittest.expect(o[0], unittest.equals('foo')); |
| 134 unittest.expect(o[1], unittest.equals('foo')); |
| 135 } |
| 136 |
| 137 core.int buildCounterDownloadRequest = 0; |
| 138 buildDownloadRequest() { |
| 139 var o = new api.DownloadRequest(); |
| 140 buildCounterDownloadRequest++; |
| 141 if (buildCounterDownloadRequest < 3) { |
| 142 o.fileTypes = buildUnnamed1351(); |
| 143 o.filterIds = buildUnnamed1352(); |
| 144 o.filterType = "foo"; |
| 145 o.version = "foo"; |
| 146 } |
| 147 buildCounterDownloadRequest--; |
| 148 return o; |
| 149 } |
| 150 |
| 151 checkDownloadRequest(api.DownloadRequest o) { |
| 152 buildCounterDownloadRequest++; |
| 153 if (buildCounterDownloadRequest < 3) { |
| 154 checkUnnamed1351(o.fileTypes); |
| 155 checkUnnamed1352(o.filterIds); |
| 156 unittest.expect(o.filterType, unittest.equals('foo')); |
| 157 unittest.expect(o.version, unittest.equals('foo')); |
| 158 } |
| 159 buildCounterDownloadRequest--; |
| 160 } |
| 161 |
| 162 core.int buildCounterDownloadResponse = 0; |
| 163 buildDownloadResponse() { |
| 164 var o = new api.DownloadResponse(); |
| 165 buildCounterDownloadResponse++; |
| 166 if (buildCounterDownloadResponse < 3) { |
| 167 o.adGroups = "foo"; |
| 168 o.ads = "foo"; |
| 169 o.insertionOrders = "foo"; |
| 170 o.lineItems = "foo"; |
| 171 } |
| 172 buildCounterDownloadResponse--; |
| 173 return o; |
| 174 } |
| 175 |
| 176 checkDownloadResponse(api.DownloadResponse o) { |
| 177 buildCounterDownloadResponse++; |
| 178 if (buildCounterDownloadResponse < 3) { |
| 179 unittest.expect(o.adGroups, unittest.equals('foo')); |
| 180 unittest.expect(o.ads, unittest.equals('foo')); |
| 181 unittest.expect(o.insertionOrders, unittest.equals('foo')); |
| 182 unittest.expect(o.lineItems, unittest.equals('foo')); |
| 183 } |
| 184 buildCounterDownloadResponse--; |
| 185 } |
| 186 |
111 core.int buildCounterFilterPair = 0; | 187 core.int buildCounterFilterPair = 0; |
112 buildFilterPair() { | 188 buildFilterPair() { |
113 var o = new api.FilterPair(); | 189 var o = new api.FilterPair(); |
114 buildCounterFilterPair++; | 190 buildCounterFilterPair++; |
115 if (buildCounterFilterPair < 3) { | 191 if (buildCounterFilterPair < 3) { |
116 o.type = "foo"; | 192 o.type = "foo"; |
117 o.value = "foo"; | 193 o.value = "foo"; |
118 } | 194 } |
119 buildCounterFilterPair--; | 195 buildCounterFilterPair--; |
120 return o; | 196 return o; |
121 } | 197 } |
122 | 198 |
123 checkFilterPair(api.FilterPair o) { | 199 checkFilterPair(api.FilterPair o) { |
124 buildCounterFilterPair++; | 200 buildCounterFilterPair++; |
125 if (buildCounterFilterPair < 3) { | 201 if (buildCounterFilterPair < 3) { |
126 unittest.expect(o.type, unittest.equals('foo')); | 202 unittest.expect(o.type, unittest.equals('foo')); |
127 unittest.expect(o.value, unittest.equals('foo')); | 203 unittest.expect(o.value, unittest.equals('foo')); |
128 } | 204 } |
129 buildCounterFilterPair--; | 205 buildCounterFilterPair--; |
130 } | 206 } |
131 | 207 |
132 buildUnnamed1330() { | 208 buildUnnamed1353() { |
133 var o = new core.List<api.Query>(); | 209 var o = new core.List<api.Query>(); |
134 o.add(buildQuery()); | 210 o.add(buildQuery()); |
135 o.add(buildQuery()); | 211 o.add(buildQuery()); |
136 return o; | 212 return o; |
137 } | 213 } |
138 | 214 |
139 checkUnnamed1330(core.List<api.Query> o) { | 215 checkUnnamed1353(core.List<api.Query> o) { |
140 unittest.expect(o, unittest.hasLength(2)); | 216 unittest.expect(o, unittest.hasLength(2)); |
141 checkQuery(o[0]); | 217 checkQuery(o[0]); |
142 checkQuery(o[1]); | 218 checkQuery(o[1]); |
143 } | 219 } |
144 | 220 |
145 core.int buildCounterListQueriesResponse = 0; | 221 core.int buildCounterListQueriesResponse = 0; |
146 buildListQueriesResponse() { | 222 buildListQueriesResponse() { |
147 var o = new api.ListQueriesResponse(); | 223 var o = new api.ListQueriesResponse(); |
148 buildCounterListQueriesResponse++; | 224 buildCounterListQueriesResponse++; |
149 if (buildCounterListQueriesResponse < 3) { | 225 if (buildCounterListQueriesResponse < 3) { |
150 o.kind = "foo"; | 226 o.kind = "foo"; |
151 o.queries = buildUnnamed1330(); | 227 o.queries = buildUnnamed1353(); |
152 } | 228 } |
153 buildCounterListQueriesResponse--; | 229 buildCounterListQueriesResponse--; |
154 return o; | 230 return o; |
155 } | 231 } |
156 | 232 |
157 checkListQueriesResponse(api.ListQueriesResponse o) { | 233 checkListQueriesResponse(api.ListQueriesResponse o) { |
158 buildCounterListQueriesResponse++; | 234 buildCounterListQueriesResponse++; |
159 if (buildCounterListQueriesResponse < 3) { | 235 if (buildCounterListQueriesResponse < 3) { |
160 unittest.expect(o.kind, unittest.equals('foo')); | 236 unittest.expect(o.kind, unittest.equals('foo')); |
161 checkUnnamed1330(o.queries); | 237 checkUnnamed1353(o.queries); |
162 } | 238 } |
163 buildCounterListQueriesResponse--; | 239 buildCounterListQueriesResponse--; |
164 } | 240 } |
165 | 241 |
166 buildUnnamed1331() { | 242 buildUnnamed1354() { |
167 var o = new core.List<api.Report>(); | 243 var o = new core.List<api.Report>(); |
168 o.add(buildReport()); | 244 o.add(buildReport()); |
169 o.add(buildReport()); | 245 o.add(buildReport()); |
170 return o; | 246 return o; |
171 } | 247 } |
172 | 248 |
173 checkUnnamed1331(core.List<api.Report> o) { | 249 checkUnnamed1354(core.List<api.Report> o) { |
174 unittest.expect(o, unittest.hasLength(2)); | 250 unittest.expect(o, unittest.hasLength(2)); |
175 checkReport(o[0]); | 251 checkReport(o[0]); |
176 checkReport(o[1]); | 252 checkReport(o[1]); |
177 } | 253 } |
178 | 254 |
179 core.int buildCounterListReportsResponse = 0; | 255 core.int buildCounterListReportsResponse = 0; |
180 buildListReportsResponse() { | 256 buildListReportsResponse() { |
181 var o = new api.ListReportsResponse(); | 257 var o = new api.ListReportsResponse(); |
182 buildCounterListReportsResponse++; | 258 buildCounterListReportsResponse++; |
183 if (buildCounterListReportsResponse < 3) { | 259 if (buildCounterListReportsResponse < 3) { |
184 o.kind = "foo"; | 260 o.kind = "foo"; |
185 o.reports = buildUnnamed1331(); | 261 o.reports = buildUnnamed1354(); |
186 } | 262 } |
187 buildCounterListReportsResponse--; | 263 buildCounterListReportsResponse--; |
188 return o; | 264 return o; |
189 } | 265 } |
190 | 266 |
191 checkListReportsResponse(api.ListReportsResponse o) { | 267 checkListReportsResponse(api.ListReportsResponse o) { |
192 buildCounterListReportsResponse++; | 268 buildCounterListReportsResponse++; |
193 if (buildCounterListReportsResponse < 3) { | 269 if (buildCounterListReportsResponse < 3) { |
194 unittest.expect(o.kind, unittest.equals('foo')); | 270 unittest.expect(o.kind, unittest.equals('foo')); |
195 checkUnnamed1331(o.reports); | 271 checkUnnamed1354(o.reports); |
196 } | 272 } |
197 buildCounterListReportsResponse--; | 273 buildCounterListReportsResponse--; |
198 } | 274 } |
199 | 275 |
200 core.int buildCounterNote = 0; | 276 buildUnnamed1355() { |
201 buildNote() { | |
202 var o = new api.Note(); | |
203 buildCounterNote++; | |
204 if (buildCounterNote < 3) { | |
205 o.id = "foo"; | |
206 o.message = "foo"; | |
207 o.source = "foo"; | |
208 o.timestamp = "foo"; | |
209 o.username = "foo"; | |
210 } | |
211 buildCounterNote--; | |
212 return o; | |
213 } | |
214 | |
215 checkNote(api.Note o) { | |
216 buildCounterNote++; | |
217 if (buildCounterNote < 3) { | |
218 unittest.expect(o.id, unittest.equals('foo')); | |
219 unittest.expect(o.message, unittest.equals('foo')); | |
220 unittest.expect(o.source, unittest.equals('foo')); | |
221 unittest.expect(o.timestamp, unittest.equals('foo')); | |
222 unittest.expect(o.username, unittest.equals('foo')); | |
223 } | |
224 buildCounterNote--; | |
225 } | |
226 | |
227 buildUnnamed1332() { | |
228 var o = new core.List<api.Note>(); | |
229 o.add(buildNote()); | |
230 o.add(buildNote()); | |
231 return o; | |
232 } | |
233 | |
234 checkUnnamed1332(core.List<api.Note> o) { | |
235 unittest.expect(o, unittest.hasLength(2)); | |
236 checkNote(o[0]); | |
237 checkNote(o[1]); | |
238 } | |
239 | |
240 core.int buildCounterNotifyProposalChangeRequest = 0; | |
241 buildNotifyProposalChangeRequest() { | |
242 var o = new api.NotifyProposalChangeRequest(); | |
243 buildCounterNotifyProposalChangeRequest++; | |
244 if (buildCounterNotifyProposalChangeRequest < 3) { | |
245 o.action = "foo"; | |
246 o.href = "foo"; | |
247 o.id = "foo"; | |
248 o.notes = buildUnnamed1332(); | |
249 o.token = "foo"; | |
250 } | |
251 buildCounterNotifyProposalChangeRequest--; | |
252 return o; | |
253 } | |
254 | |
255 checkNotifyProposalChangeRequest(api.NotifyProposalChangeRequest o) { | |
256 buildCounterNotifyProposalChangeRequest++; | |
257 if (buildCounterNotifyProposalChangeRequest < 3) { | |
258 unittest.expect(o.action, unittest.equals('foo')); | |
259 unittest.expect(o.href, unittest.equals('foo')); | |
260 unittest.expect(o.id, unittest.equals('foo')); | |
261 checkUnnamed1332(o.notes); | |
262 unittest.expect(o.token, unittest.equals('foo')); | |
263 } | |
264 buildCounterNotifyProposalChangeRequest--; | |
265 } | |
266 | |
267 buildUnnamed1333() { | |
268 var o = new core.List<api.FilterPair>(); | 277 var o = new core.List<api.FilterPair>(); |
269 o.add(buildFilterPair()); | 278 o.add(buildFilterPair()); |
270 o.add(buildFilterPair()); | 279 o.add(buildFilterPair()); |
271 return o; | 280 return o; |
272 } | 281 } |
273 | 282 |
274 checkUnnamed1333(core.List<api.FilterPair> o) { | 283 checkUnnamed1355(core.List<api.FilterPair> o) { |
275 unittest.expect(o, unittest.hasLength(2)); | 284 unittest.expect(o, unittest.hasLength(2)); |
276 checkFilterPair(o[0]); | 285 checkFilterPair(o[0]); |
277 checkFilterPair(o[1]); | 286 checkFilterPair(o[1]); |
278 } | 287 } |
279 | 288 |
280 buildUnnamed1334() { | 289 buildUnnamed1356() { |
281 var o = new core.List<core.String>(); | 290 var o = new core.List<core.String>(); |
282 o.add("foo"); | 291 o.add("foo"); |
283 o.add("foo"); | 292 o.add("foo"); |
284 return o; | 293 return o; |
285 } | 294 } |
286 | 295 |
287 checkUnnamed1334(core.List<core.String> o) { | 296 checkUnnamed1356(core.List<core.String> o) { |
288 unittest.expect(o, unittest.hasLength(2)); | 297 unittest.expect(o, unittest.hasLength(2)); |
289 unittest.expect(o[0], unittest.equals('foo')); | 298 unittest.expect(o[0], unittest.equals('foo')); |
290 unittest.expect(o[1], unittest.equals('foo')); | 299 unittest.expect(o[1], unittest.equals('foo')); |
291 } | 300 } |
292 | 301 |
293 buildUnnamed1335() { | 302 buildUnnamed1357() { |
294 var o = new core.List<core.String>(); | 303 var o = new core.List<core.String>(); |
295 o.add("foo"); | 304 o.add("foo"); |
296 o.add("foo"); | 305 o.add("foo"); |
297 return o; | 306 return o; |
298 } | 307 } |
299 | 308 |
300 checkUnnamed1335(core.List<core.String> o) { | 309 checkUnnamed1357(core.List<core.String> o) { |
301 unittest.expect(o, unittest.hasLength(2)); | 310 unittest.expect(o, unittest.hasLength(2)); |
302 unittest.expect(o[0], unittest.equals('foo')); | 311 unittest.expect(o[0], unittest.equals('foo')); |
303 unittest.expect(o[1], unittest.equals('foo')); | 312 unittest.expect(o[1], unittest.equals('foo')); |
304 } | 313 } |
305 | 314 |
306 core.int buildCounterParameters = 0; | 315 core.int buildCounterParameters = 0; |
307 buildParameters() { | 316 buildParameters() { |
308 var o = new api.Parameters(); | 317 var o = new api.Parameters(); |
309 buildCounterParameters++; | 318 buildCounterParameters++; |
310 if (buildCounterParameters < 3) { | 319 if (buildCounterParameters < 3) { |
311 o.filters = buildUnnamed1333(); | 320 o.filters = buildUnnamed1355(); |
312 o.groupBys = buildUnnamed1334(); | 321 o.groupBys = buildUnnamed1356(); |
313 o.includeInviteData = true; | 322 o.includeInviteData = true; |
314 o.metrics = buildUnnamed1335(); | 323 o.metrics = buildUnnamed1357(); |
315 o.type = "foo"; | 324 o.type = "foo"; |
316 } | 325 } |
317 buildCounterParameters--; | 326 buildCounterParameters--; |
318 return o; | 327 return o; |
319 } | 328 } |
320 | 329 |
321 checkParameters(api.Parameters o) { | 330 checkParameters(api.Parameters o) { |
322 buildCounterParameters++; | 331 buildCounterParameters++; |
323 if (buildCounterParameters < 3) { | 332 if (buildCounterParameters < 3) { |
324 checkUnnamed1333(o.filters); | 333 checkUnnamed1355(o.filters); |
325 checkUnnamed1334(o.groupBys); | 334 checkUnnamed1356(o.groupBys); |
326 unittest.expect(o.includeInviteData, unittest.isTrue); | 335 unittest.expect(o.includeInviteData, unittest.isTrue); |
327 checkUnnamed1335(o.metrics); | 336 checkUnnamed1357(o.metrics); |
328 unittest.expect(o.type, unittest.equals('foo')); | 337 unittest.expect(o.type, unittest.equals('foo')); |
329 } | 338 } |
330 buildCounterParameters--; | 339 buildCounterParameters--; |
331 } | 340 } |
332 | 341 |
333 core.int buildCounterQuery = 0; | 342 core.int buildCounterQuery = 0; |
334 buildQuery() { | 343 buildQuery() { |
335 var o = new api.Query(); | 344 var o = new api.Query(); |
336 buildCounterQuery++; | 345 buildCounterQuery++; |
337 if (buildCounterQuery < 3) { | 346 if (buildCounterQuery < 3) { |
(...skipping 18 matching lines...) Expand all Loading... |
356 checkParameters(o.params); | 365 checkParameters(o.params); |
357 unittest.expect(o.queryId, unittest.equals('foo')); | 366 unittest.expect(o.queryId, unittest.equals('foo')); |
358 unittest.expect(o.reportDataEndTimeMs, unittest.equals('foo')); | 367 unittest.expect(o.reportDataEndTimeMs, unittest.equals('foo')); |
359 unittest.expect(o.reportDataStartTimeMs, unittest.equals('foo')); | 368 unittest.expect(o.reportDataStartTimeMs, unittest.equals('foo')); |
360 checkQuerySchedule(o.schedule); | 369 checkQuerySchedule(o.schedule); |
361 unittest.expect(o.timezoneCode, unittest.equals('foo')); | 370 unittest.expect(o.timezoneCode, unittest.equals('foo')); |
362 } | 371 } |
363 buildCounterQuery--; | 372 buildCounterQuery--; |
364 } | 373 } |
365 | 374 |
366 buildUnnamed1336() { | 375 buildUnnamed1358() { |
367 var o = new core.List<core.String>(); | 376 var o = new core.List<core.String>(); |
368 o.add("foo"); | 377 o.add("foo"); |
369 o.add("foo"); | 378 o.add("foo"); |
370 return o; | 379 return o; |
371 } | 380 } |
372 | 381 |
373 checkUnnamed1336(core.List<core.String> o) { | 382 checkUnnamed1358(core.List<core.String> o) { |
374 unittest.expect(o, unittest.hasLength(2)); | 383 unittest.expect(o, unittest.hasLength(2)); |
375 unittest.expect(o[0], unittest.equals('foo')); | 384 unittest.expect(o[0], unittest.equals('foo')); |
376 unittest.expect(o[1], unittest.equals('foo')); | 385 unittest.expect(o[1], unittest.equals('foo')); |
377 } | 386 } |
378 | 387 |
379 core.int buildCounterQueryMetadata = 0; | 388 core.int buildCounterQueryMetadata = 0; |
380 buildQueryMetadata() { | 389 buildQueryMetadata() { |
381 var o = new api.QueryMetadata(); | 390 var o = new api.QueryMetadata(); |
382 buildCounterQueryMetadata++; | 391 buildCounterQueryMetadata++; |
383 if (buildCounterQueryMetadata < 3) { | 392 if (buildCounterQueryMetadata < 3) { |
384 o.dataRange = "foo"; | 393 o.dataRange = "foo"; |
385 o.format = "foo"; | 394 o.format = "foo"; |
386 o.googleCloudStoragePathForLatestReport = "foo"; | 395 o.googleCloudStoragePathForLatestReport = "foo"; |
387 o.googleDrivePathForLatestReport = "foo"; | 396 o.googleDrivePathForLatestReport = "foo"; |
388 o.latestReportRunTimeMs = "foo"; | 397 o.latestReportRunTimeMs = "foo"; |
389 o.locale = "foo"; | 398 o.locale = "foo"; |
390 o.reportCount = 42; | 399 o.reportCount = 42; |
391 o.running = true; | 400 o.running = true; |
392 o.sendNotification = true; | 401 o.sendNotification = true; |
393 o.shareEmailAddress = buildUnnamed1336(); | 402 o.shareEmailAddress = buildUnnamed1358(); |
394 o.title = "foo"; | 403 o.title = "foo"; |
395 } | 404 } |
396 buildCounterQueryMetadata--; | 405 buildCounterQueryMetadata--; |
397 return o; | 406 return o; |
398 } | 407 } |
399 | 408 |
400 checkQueryMetadata(api.QueryMetadata o) { | 409 checkQueryMetadata(api.QueryMetadata o) { |
401 buildCounterQueryMetadata++; | 410 buildCounterQueryMetadata++; |
402 if (buildCounterQueryMetadata < 3) { | 411 if (buildCounterQueryMetadata < 3) { |
403 unittest.expect(o.dataRange, unittest.equals('foo')); | 412 unittest.expect(o.dataRange, unittest.equals('foo')); |
404 unittest.expect(o.format, unittest.equals('foo')); | 413 unittest.expect(o.format, unittest.equals('foo')); |
405 unittest.expect(o.googleCloudStoragePathForLatestReport, unittest.equals('fo
o')); | 414 unittest.expect(o.googleCloudStoragePathForLatestReport, unittest.equals('fo
o')); |
406 unittest.expect(o.googleDrivePathForLatestReport, unittest.equals('foo')); | 415 unittest.expect(o.googleDrivePathForLatestReport, unittest.equals('foo')); |
407 unittest.expect(o.latestReportRunTimeMs, unittest.equals('foo')); | 416 unittest.expect(o.latestReportRunTimeMs, unittest.equals('foo')); |
408 unittest.expect(o.locale, unittest.equals('foo')); | 417 unittest.expect(o.locale, unittest.equals('foo')); |
409 unittest.expect(o.reportCount, unittest.equals(42)); | 418 unittest.expect(o.reportCount, unittest.equals(42)); |
410 unittest.expect(o.running, unittest.isTrue); | 419 unittest.expect(o.running, unittest.isTrue); |
411 unittest.expect(o.sendNotification, unittest.isTrue); | 420 unittest.expect(o.sendNotification, unittest.isTrue); |
412 checkUnnamed1336(o.shareEmailAddress); | 421 checkUnnamed1358(o.shareEmailAddress); |
413 unittest.expect(o.title, unittest.equals('foo')); | 422 unittest.expect(o.title, unittest.equals('foo')); |
414 } | 423 } |
415 buildCounterQueryMetadata--; | 424 buildCounterQueryMetadata--; |
416 } | 425 } |
417 | 426 |
418 core.int buildCounterQuerySchedule = 0; | 427 core.int buildCounterQuerySchedule = 0; |
419 buildQuerySchedule() { | 428 buildQuerySchedule() { |
420 var o = new api.QuerySchedule(); | 429 var o = new api.QuerySchedule(); |
421 buildCounterQuerySchedule++; | 430 buildCounterQuerySchedule++; |
422 if (buildCounterQuerySchedule < 3) { | 431 if (buildCounterQuerySchedule < 3) { |
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
546 buildCounterReportStatus++; | 555 buildCounterReportStatus++; |
547 if (buildCounterReportStatus < 3) { | 556 if (buildCounterReportStatus < 3) { |
548 checkReportFailure(o.failure); | 557 checkReportFailure(o.failure); |
549 unittest.expect(o.finishTimeMs, unittest.equals('foo')); | 558 unittest.expect(o.finishTimeMs, unittest.equals('foo')); |
550 unittest.expect(o.format, unittest.equals('foo')); | 559 unittest.expect(o.format, unittest.equals('foo')); |
551 unittest.expect(o.state, unittest.equals('foo')); | 560 unittest.expect(o.state, unittest.equals('foo')); |
552 } | 561 } |
553 buildCounterReportStatus--; | 562 buildCounterReportStatus--; |
554 } | 563 } |
555 | 564 |
556 buildUnnamed1337() { | 565 buildUnnamed1359() { |
557 var o = new core.List<core.String>(); | 566 var o = new core.List<core.String>(); |
558 o.add("foo"); | 567 o.add("foo"); |
559 o.add("foo"); | 568 o.add("foo"); |
560 return o; | 569 return o; |
561 } | 570 } |
562 | 571 |
563 checkUnnamed1337(core.List<core.String> o) { | 572 checkUnnamed1359(core.List<core.String> o) { |
564 unittest.expect(o, unittest.hasLength(2)); | 573 unittest.expect(o, unittest.hasLength(2)); |
565 unittest.expect(o[0], unittest.equals('foo')); | 574 unittest.expect(o[0], unittest.equals('foo')); |
566 unittest.expect(o[1], unittest.equals('foo')); | 575 unittest.expect(o[1], unittest.equals('foo')); |
567 } | 576 } |
568 | 577 |
569 core.int buildCounterRowStatus = 0; | 578 core.int buildCounterRowStatus = 0; |
570 buildRowStatus() { | 579 buildRowStatus() { |
571 var o = new api.RowStatus(); | 580 var o = new api.RowStatus(); |
572 buildCounterRowStatus++; | 581 buildCounterRowStatus++; |
573 if (buildCounterRowStatus < 3) { | 582 if (buildCounterRowStatus < 3) { |
574 o.changed = true; | 583 o.changed = true; |
575 o.entityId = "foo"; | 584 o.entityId = "foo"; |
576 o.entityName = "foo"; | 585 o.entityName = "foo"; |
577 o.errors = buildUnnamed1337(); | 586 o.errors = buildUnnamed1359(); |
578 o.persisted = true; | 587 o.persisted = true; |
579 o.rowNumber = 42; | 588 o.rowNumber = 42; |
580 } | 589 } |
581 buildCounterRowStatus--; | 590 buildCounterRowStatus--; |
582 return o; | 591 return o; |
583 } | 592 } |
584 | 593 |
585 checkRowStatus(api.RowStatus o) { | 594 checkRowStatus(api.RowStatus o) { |
586 buildCounterRowStatus++; | 595 buildCounterRowStatus++; |
587 if (buildCounterRowStatus < 3) { | 596 if (buildCounterRowStatus < 3) { |
588 unittest.expect(o.changed, unittest.isTrue); | 597 unittest.expect(o.changed, unittest.isTrue); |
589 unittest.expect(o.entityId, unittest.equals('foo')); | 598 unittest.expect(o.entityId, unittest.equals('foo')); |
590 unittest.expect(o.entityName, unittest.equals('foo')); | 599 unittest.expect(o.entityName, unittest.equals('foo')); |
591 checkUnnamed1337(o.errors); | 600 checkUnnamed1359(o.errors); |
592 unittest.expect(o.persisted, unittest.isTrue); | 601 unittest.expect(o.persisted, unittest.isTrue); |
593 unittest.expect(o.rowNumber, unittest.equals(42)); | 602 unittest.expect(o.rowNumber, unittest.equals(42)); |
594 } | 603 } |
595 buildCounterRowStatus--; | 604 buildCounterRowStatus--; |
596 } | 605 } |
597 | 606 |
598 core.int buildCounterRunQueryRequest = 0; | 607 core.int buildCounterRunQueryRequest = 0; |
599 buildRunQueryRequest() { | 608 buildRunQueryRequest() { |
600 var o = new api.RunQueryRequest(); | 609 var o = new api.RunQueryRequest(); |
601 buildCounterRunQueryRequest++; | 610 buildCounterRunQueryRequest++; |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
655 } | 664 } |
656 | 665 |
657 checkUploadLineItemsResponse(api.UploadLineItemsResponse o) { | 666 checkUploadLineItemsResponse(api.UploadLineItemsResponse o) { |
658 buildCounterUploadLineItemsResponse++; | 667 buildCounterUploadLineItemsResponse++; |
659 if (buildCounterUploadLineItemsResponse < 3) { | 668 if (buildCounterUploadLineItemsResponse < 3) { |
660 checkUploadStatus(o.uploadStatus); | 669 checkUploadStatus(o.uploadStatus); |
661 } | 670 } |
662 buildCounterUploadLineItemsResponse--; | 671 buildCounterUploadLineItemsResponse--; |
663 } | 672 } |
664 | 673 |
665 buildUnnamed1338() { | 674 buildUnnamed1360() { |
666 var o = new core.List<core.String>(); | 675 var o = new core.List<core.String>(); |
667 o.add("foo"); | 676 o.add("foo"); |
668 o.add("foo"); | 677 o.add("foo"); |
669 return o; | 678 return o; |
670 } | 679 } |
671 | 680 |
672 checkUnnamed1338(core.List<core.String> o) { | 681 checkUnnamed1360(core.List<core.String> o) { |
673 unittest.expect(o, unittest.hasLength(2)); | 682 unittest.expect(o, unittest.hasLength(2)); |
674 unittest.expect(o[0], unittest.equals('foo')); | 683 unittest.expect(o[0], unittest.equals('foo')); |
675 unittest.expect(o[1], unittest.equals('foo')); | 684 unittest.expect(o[1], unittest.equals('foo')); |
676 } | 685 } |
677 | 686 |
678 buildUnnamed1339() { | 687 buildUnnamed1361() { |
679 var o = new core.List<api.RowStatus>(); | 688 var o = new core.List<api.RowStatus>(); |
680 o.add(buildRowStatus()); | 689 o.add(buildRowStatus()); |
681 o.add(buildRowStatus()); | 690 o.add(buildRowStatus()); |
682 return o; | 691 return o; |
683 } | 692 } |
684 | 693 |
685 checkUnnamed1339(core.List<api.RowStatus> o) { | 694 checkUnnamed1361(core.List<api.RowStatus> o) { |
686 unittest.expect(o, unittest.hasLength(2)); | 695 unittest.expect(o, unittest.hasLength(2)); |
687 checkRowStatus(o[0]); | 696 checkRowStatus(o[0]); |
688 checkRowStatus(o[1]); | 697 checkRowStatus(o[1]); |
689 } | 698 } |
690 | 699 |
691 core.int buildCounterUploadStatus = 0; | 700 core.int buildCounterUploadStatus = 0; |
692 buildUploadStatus() { | 701 buildUploadStatus() { |
693 var o = new api.UploadStatus(); | 702 var o = new api.UploadStatus(); |
694 buildCounterUploadStatus++; | 703 buildCounterUploadStatus++; |
695 if (buildCounterUploadStatus < 3) { | 704 if (buildCounterUploadStatus < 3) { |
696 o.errors = buildUnnamed1338(); | 705 o.errors = buildUnnamed1360(); |
697 o.rowStatus = buildUnnamed1339(); | 706 o.rowStatus = buildUnnamed1361(); |
698 } | 707 } |
699 buildCounterUploadStatus--; | 708 buildCounterUploadStatus--; |
700 return o; | 709 return o; |
701 } | 710 } |
702 | 711 |
703 checkUploadStatus(api.UploadStatus o) { | 712 checkUploadStatus(api.UploadStatus o) { |
704 buildCounterUploadStatus++; | 713 buildCounterUploadStatus++; |
705 if (buildCounterUploadStatus < 3) { | 714 if (buildCounterUploadStatus < 3) { |
706 checkUnnamed1338(o.errors); | 715 checkUnnamed1360(o.errors); |
707 checkUnnamed1339(o.rowStatus); | 716 checkUnnamed1361(o.rowStatus); |
708 } | 717 } |
709 buildCounterUploadStatus--; | 718 buildCounterUploadStatus--; |
710 } | 719 } |
711 | 720 |
712 | 721 |
713 main() { | 722 main() { |
714 unittest.group("obj-schema-DownloadLineItemsRequest", () { | 723 unittest.group("obj-schema-DownloadLineItemsRequest", () { |
715 unittest.test("to-json--from-json", () { | 724 unittest.test("to-json--from-json", () { |
716 var o = buildDownloadLineItemsRequest(); | 725 var o = buildDownloadLineItemsRequest(); |
717 var od = new api.DownloadLineItemsRequest.fromJson(o.toJson()); | 726 var od = new api.DownloadLineItemsRequest.fromJson(o.toJson()); |
718 checkDownloadLineItemsRequest(od); | 727 checkDownloadLineItemsRequest(od); |
719 }); | 728 }); |
720 }); | 729 }); |
721 | 730 |
722 | 731 |
723 unittest.group("obj-schema-DownloadLineItemsResponse", () { | 732 unittest.group("obj-schema-DownloadLineItemsResponse", () { |
724 unittest.test("to-json--from-json", () { | 733 unittest.test("to-json--from-json", () { |
725 var o = buildDownloadLineItemsResponse(); | 734 var o = buildDownloadLineItemsResponse(); |
726 var od = new api.DownloadLineItemsResponse.fromJson(o.toJson()); | 735 var od = new api.DownloadLineItemsResponse.fromJson(o.toJson()); |
727 checkDownloadLineItemsResponse(od); | 736 checkDownloadLineItemsResponse(od); |
728 }); | 737 }); |
729 }); | 738 }); |
730 | 739 |
731 | 740 |
| 741 unittest.group("obj-schema-DownloadRequest", () { |
| 742 unittest.test("to-json--from-json", () { |
| 743 var o = buildDownloadRequest(); |
| 744 var od = new api.DownloadRequest.fromJson(o.toJson()); |
| 745 checkDownloadRequest(od); |
| 746 }); |
| 747 }); |
| 748 |
| 749 |
| 750 unittest.group("obj-schema-DownloadResponse", () { |
| 751 unittest.test("to-json--from-json", () { |
| 752 var o = buildDownloadResponse(); |
| 753 var od = new api.DownloadResponse.fromJson(o.toJson()); |
| 754 checkDownloadResponse(od); |
| 755 }); |
| 756 }); |
| 757 |
| 758 |
732 unittest.group("obj-schema-FilterPair", () { | 759 unittest.group("obj-schema-FilterPair", () { |
733 unittest.test("to-json--from-json", () { | 760 unittest.test("to-json--from-json", () { |
734 var o = buildFilterPair(); | 761 var o = buildFilterPair(); |
735 var od = new api.FilterPair.fromJson(o.toJson()); | 762 var od = new api.FilterPair.fromJson(o.toJson()); |
736 checkFilterPair(od); | 763 checkFilterPair(od); |
737 }); | 764 }); |
738 }); | 765 }); |
739 | 766 |
740 | 767 |
741 unittest.group("obj-schema-ListQueriesResponse", () { | 768 unittest.group("obj-schema-ListQueriesResponse", () { |
742 unittest.test("to-json--from-json", () { | 769 unittest.test("to-json--from-json", () { |
743 var o = buildListQueriesResponse(); | 770 var o = buildListQueriesResponse(); |
744 var od = new api.ListQueriesResponse.fromJson(o.toJson()); | 771 var od = new api.ListQueriesResponse.fromJson(o.toJson()); |
745 checkListQueriesResponse(od); | 772 checkListQueriesResponse(od); |
746 }); | 773 }); |
747 }); | 774 }); |
748 | 775 |
749 | 776 |
750 unittest.group("obj-schema-ListReportsResponse", () { | 777 unittest.group("obj-schema-ListReportsResponse", () { |
751 unittest.test("to-json--from-json", () { | 778 unittest.test("to-json--from-json", () { |
752 var o = buildListReportsResponse(); | 779 var o = buildListReportsResponse(); |
753 var od = new api.ListReportsResponse.fromJson(o.toJson()); | 780 var od = new api.ListReportsResponse.fromJson(o.toJson()); |
754 checkListReportsResponse(od); | 781 checkListReportsResponse(od); |
755 }); | 782 }); |
756 }); | 783 }); |
757 | 784 |
758 | 785 |
759 unittest.group("obj-schema-Note", () { | |
760 unittest.test("to-json--from-json", () { | |
761 var o = buildNote(); | |
762 var od = new api.Note.fromJson(o.toJson()); | |
763 checkNote(od); | |
764 }); | |
765 }); | |
766 | |
767 | |
768 unittest.group("obj-schema-NotifyProposalChangeRequest", () { | |
769 unittest.test("to-json--from-json", () { | |
770 var o = buildNotifyProposalChangeRequest(); | |
771 var od = new api.NotifyProposalChangeRequest.fromJson(o.toJson()); | |
772 checkNotifyProposalChangeRequest(od); | |
773 }); | |
774 }); | |
775 | |
776 | |
777 unittest.group("obj-schema-Parameters", () { | 786 unittest.group("obj-schema-Parameters", () { |
778 unittest.test("to-json--from-json", () { | 787 unittest.test("to-json--from-json", () { |
779 var o = buildParameters(); | 788 var o = buildParameters(); |
780 var od = new api.Parameters.fromJson(o.toJson()); | 789 var od = new api.Parameters.fromJson(o.toJson()); |
781 checkParameters(od); | 790 checkParameters(od); |
782 }); | 791 }); |
783 }); | 792 }); |
784 | 793 |
785 | 794 |
786 unittest.group("obj-schema-Query", () { | 795 unittest.group("obj-schema-Query", () { |
(...skipping 510 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1297 return new async.Future.value(stringResponse(200, h, resp)); | 1306 return new async.Future.value(stringResponse(200, h, resp)); |
1298 }), true); | 1307 }), true); |
1299 res.listreports(arg_queryId).then(unittest.expectAsync(((api.ListReportsRe
sponse response) { | 1308 res.listreports(arg_queryId).then(unittest.expectAsync(((api.ListReportsRe
sponse response) { |
1300 checkListReportsResponse(response); | 1309 checkListReportsResponse(response); |
1301 }))); | 1310 }))); |
1302 }); | 1311 }); |
1303 | 1312 |
1304 }); | 1313 }); |
1305 | 1314 |
1306 | 1315 |
1307 unittest.group("resource-RubiconResourceApi", () { | 1316 unittest.group("resource-SdfResourceApi", () { |
1308 unittest.test("method--notifyproposalchange", () { | 1317 unittest.test("method--download", () { |
1309 | 1318 |
1310 var mock = new HttpServerMock(); | 1319 var mock = new HttpServerMock(); |
1311 api.RubiconResourceApi res = new api.DoubleclickbidmanagerApi(mock).rubico
n; | 1320 api.SdfResourceApi res = new api.DoubleclickbidmanagerApi(mock).sdf; |
1312 var arg_request = buildNotifyProposalChangeRequest(); | 1321 var arg_request = buildDownloadRequest(); |
1313 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1322 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
1314 var obj = new api.NotifyProposalChangeRequest.fromJson(json); | 1323 var obj = new api.DownloadRequest.fromJson(json); |
1315 checkNotifyProposalChangeRequest(obj); | 1324 checkDownloadRequest(obj); |
1316 | 1325 |
1317 var path = (req.url).path; | 1326 var path = (req.url).path; |
1318 var pathOffset = 0; | 1327 var pathOffset = 0; |
1319 var index; | 1328 var index; |
1320 var subPart; | 1329 var subPart; |
1321 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1330 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
1322 pathOffset += 1; | 1331 pathOffset += 1; |
1323 unittest.expect(path.substring(pathOffset, pathOffset + 25), unittest.eq
uals("doubleclickbidmanager/v1/")); | 1332 unittest.expect(path.substring(pathOffset, pathOffset + 25), unittest.eq
uals("doubleclickbidmanager/v1/")); |
1324 pathOffset += 25; | 1333 pathOffset += 25; |
1325 unittest.expect(path.substring(pathOffset, pathOffset + 28), unittest.eq
uals("rubicon/notifyproposalchange")); | 1334 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("sdf/download")); |
1326 pathOffset += 28; | 1335 pathOffset += 12; |
1327 | 1336 |
1328 var query = (req.url).query; | 1337 var query = (req.url).query; |
1329 var queryOffset = 0; | 1338 var queryOffset = 0; |
1330 var queryMap = {}; | 1339 var queryMap = {}; |
1331 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 1340 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
1332 parseBool(n) { | 1341 parseBool(n) { |
1333 if (n == "true") return true; | 1342 if (n == "true") return true; |
1334 if (n == "false") return false; | 1343 if (n == "false") return false; |
1335 if (n == null) return null; | 1344 if (n == null) return null; |
1336 throw new core.ArgumentError("Invalid boolean: $n"); | 1345 throw new core.ArgumentError("Invalid boolean: $n"); |
1337 } | 1346 } |
1338 if (query.length > 0) { | 1347 if (query.length > 0) { |
1339 for (var part in query.split("&")) { | 1348 for (var part in query.split("&")) { |
1340 var keyvalue = part.split("="); | 1349 var keyvalue = part.split("="); |
1341 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 1350 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
1342 } | 1351 } |
1343 } | 1352 } |
1344 | 1353 |
1345 | 1354 |
1346 var h = { | 1355 var h = { |
1347 "content-type" : "application/json; charset=utf-8", | 1356 "content-type" : "application/json; charset=utf-8", |
1348 }; | 1357 }; |
1349 var resp = ""; | 1358 var resp = convert.JSON.encode(buildDownloadResponse()); |
1350 return new async.Future.value(stringResponse(200, h, resp)); | 1359 return new async.Future.value(stringResponse(200, h, resp)); |
1351 }), true); | 1360 }), true); |
1352 res.notifyproposalchange(arg_request).then(unittest.expectAsync((_) {})); | 1361 res.download(arg_request).then(unittest.expectAsync(((api.DownloadResponse
response) { |
| 1362 checkDownloadResponse(response); |
| 1363 }))); |
1353 }); | 1364 }); |
1354 | 1365 |
1355 }); | 1366 }); |
1356 | 1367 |
1357 | 1368 |
1358 } | 1369 } |
1359 | 1370 |
OLD | NEW |