OLD | NEW |
1 library googleapis.urlshortener.v1.test; | 1 library googleapis.urlshortener.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; | 11 import 'package:googleapis/common/common.dart' as common; |
12 import 'package:googleapis/src/common_internal.dart' as common_internal; | 12 import 'package:googleapis/src/common_internal.dart' as common_internal; |
13 import '../common/common_internal_test.dart' as common_test; | 13 import '../common/common_internal_test.dart' as common_test; |
14 | 14 |
15 import 'package:googleapis/urlshortener/v1.dart' as api; | 15 import 'package:googleapis/urlshortener/v1.dart' as api; |
16 | 16 |
17 | 17 |
18 | 18 |
19 buildUnnamed0() { | 19 buildUnnamed447() { |
20 var o = new core.List<api.StringCount>(); | 20 var o = new core.List<api.StringCount>(); |
21 o.add(buildStringCount()); | 21 o.add(buildStringCount()); |
22 o.add(buildStringCount()); | 22 o.add(buildStringCount()); |
23 return o; | 23 return o; |
24 } | 24 } |
25 | 25 |
26 checkUnnamed0(core.List<api.StringCount> o) { | 26 checkUnnamed447(core.List<api.StringCount> o) { |
27 unittest.expect(o, unittest.hasLength(2)); | 27 unittest.expect(o, unittest.hasLength(2)); |
28 checkStringCount(o[0]); | 28 checkStringCount(o[0]); |
29 checkStringCount(o[1]); | 29 checkStringCount(o[1]); |
30 } | 30 } |
31 | 31 |
32 buildUnnamed1() { | 32 buildUnnamed448() { |
33 var o = new core.List<api.StringCount>(); | 33 var o = new core.List<api.StringCount>(); |
34 o.add(buildStringCount()); | 34 o.add(buildStringCount()); |
35 o.add(buildStringCount()); | 35 o.add(buildStringCount()); |
36 return o; | 36 return o; |
37 } | 37 } |
38 | 38 |
39 checkUnnamed1(core.List<api.StringCount> o) { | 39 checkUnnamed448(core.List<api.StringCount> o) { |
40 unittest.expect(o, unittest.hasLength(2)); | 40 unittest.expect(o, unittest.hasLength(2)); |
41 checkStringCount(o[0]); | 41 checkStringCount(o[0]); |
42 checkStringCount(o[1]); | 42 checkStringCount(o[1]); |
43 } | 43 } |
44 | 44 |
45 buildUnnamed2() { | 45 buildUnnamed449() { |
46 var o = new core.List<api.StringCount>(); | 46 var o = new core.List<api.StringCount>(); |
47 o.add(buildStringCount()); | 47 o.add(buildStringCount()); |
48 o.add(buildStringCount()); | 48 o.add(buildStringCount()); |
49 return o; | 49 return o; |
50 } | 50 } |
51 | 51 |
52 checkUnnamed2(core.List<api.StringCount> o) { | 52 checkUnnamed449(core.List<api.StringCount> o) { |
53 unittest.expect(o, unittest.hasLength(2)); | 53 unittest.expect(o, unittest.hasLength(2)); |
54 checkStringCount(o[0]); | 54 checkStringCount(o[0]); |
55 checkStringCount(o[1]); | 55 checkStringCount(o[1]); |
56 } | 56 } |
57 | 57 |
58 buildUnnamed3() { | 58 buildUnnamed450() { |
59 var o = new core.List<api.StringCount>(); | 59 var o = new core.List<api.StringCount>(); |
60 o.add(buildStringCount()); | 60 o.add(buildStringCount()); |
61 o.add(buildStringCount()); | 61 o.add(buildStringCount()); |
62 return o; | 62 return o; |
63 } | 63 } |
64 | 64 |
65 checkUnnamed3(core.List<api.StringCount> o) { | 65 checkUnnamed450(core.List<api.StringCount> o) { |
66 unittest.expect(o, unittest.hasLength(2)); | 66 unittest.expect(o, unittest.hasLength(2)); |
67 checkStringCount(o[0]); | 67 checkStringCount(o[0]); |
68 checkStringCount(o[1]); | 68 checkStringCount(o[1]); |
69 } | 69 } |
70 | 70 |
71 core.int buildCounterAnalyticsSnapshot = 0; | 71 core.int buildCounterAnalyticsSnapshot = 0; |
72 buildAnalyticsSnapshot() { | 72 buildAnalyticsSnapshot() { |
73 var o = new api.AnalyticsSnapshot(); | 73 var o = new api.AnalyticsSnapshot(); |
74 buildCounterAnalyticsSnapshot++; | 74 buildCounterAnalyticsSnapshot++; |
75 if (buildCounterAnalyticsSnapshot < 3) { | 75 if (buildCounterAnalyticsSnapshot < 3) { |
76 o.browsers = buildUnnamed0(); | 76 o.browsers = buildUnnamed447(); |
77 o.countries = buildUnnamed1(); | 77 o.countries = buildUnnamed448(); |
78 o.longUrlClicks = "foo"; | 78 o.longUrlClicks = "foo"; |
79 o.platforms = buildUnnamed2(); | 79 o.platforms = buildUnnamed449(); |
80 o.referrers = buildUnnamed3(); | 80 o.referrers = buildUnnamed450(); |
81 o.shortUrlClicks = "foo"; | 81 o.shortUrlClicks = "foo"; |
82 } | 82 } |
83 buildCounterAnalyticsSnapshot--; | 83 buildCounterAnalyticsSnapshot--; |
84 return o; | 84 return o; |
85 } | 85 } |
86 | 86 |
87 checkAnalyticsSnapshot(api.AnalyticsSnapshot o) { | 87 checkAnalyticsSnapshot(api.AnalyticsSnapshot o) { |
88 buildCounterAnalyticsSnapshot++; | 88 buildCounterAnalyticsSnapshot++; |
89 if (buildCounterAnalyticsSnapshot < 3) { | 89 if (buildCounterAnalyticsSnapshot < 3) { |
90 checkUnnamed0(o.browsers); | 90 checkUnnamed447(o.browsers); |
91 checkUnnamed1(o.countries); | 91 checkUnnamed448(o.countries); |
92 unittest.expect(o.longUrlClicks, unittest.equals('foo')); | 92 unittest.expect(o.longUrlClicks, unittest.equals('foo')); |
93 checkUnnamed2(o.platforms); | 93 checkUnnamed449(o.platforms); |
94 checkUnnamed3(o.referrers); | 94 checkUnnamed450(o.referrers); |
95 unittest.expect(o.shortUrlClicks, unittest.equals('foo')); | 95 unittest.expect(o.shortUrlClicks, unittest.equals('foo')); |
96 } | 96 } |
97 buildCounterAnalyticsSnapshot--; | 97 buildCounterAnalyticsSnapshot--; |
98 } | 98 } |
99 | 99 |
100 core.int buildCounterAnalyticsSummary = 0; | 100 core.int buildCounterAnalyticsSummary = 0; |
101 buildAnalyticsSummary() { | 101 buildAnalyticsSummary() { |
102 var o = new api.AnalyticsSummary(); | 102 var o = new api.AnalyticsSummary(); |
103 buildCounterAnalyticsSummary++; | 103 buildCounterAnalyticsSummary++; |
104 if (buildCounterAnalyticsSummary < 3) { | 104 if (buildCounterAnalyticsSummary < 3) { |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
167 checkAnalyticsSummary(o.analytics); | 167 checkAnalyticsSummary(o.analytics); |
168 unittest.expect(o.created, unittest.equals('foo')); | 168 unittest.expect(o.created, unittest.equals('foo')); |
169 unittest.expect(o.id, unittest.equals('foo')); | 169 unittest.expect(o.id, unittest.equals('foo')); |
170 unittest.expect(o.kind, unittest.equals('foo')); | 170 unittest.expect(o.kind, unittest.equals('foo')); |
171 unittest.expect(o.longUrl, unittest.equals('foo')); | 171 unittest.expect(o.longUrl, unittest.equals('foo')); |
172 unittest.expect(o.status, unittest.equals('foo')); | 172 unittest.expect(o.status, unittest.equals('foo')); |
173 } | 173 } |
174 buildCounterUrl--; | 174 buildCounterUrl--; |
175 } | 175 } |
176 | 176 |
177 buildUnnamed4() { | 177 buildUnnamed451() { |
178 var o = new core.List<api.Url>(); | 178 var o = new core.List<api.Url>(); |
179 o.add(buildUrl()); | 179 o.add(buildUrl()); |
180 o.add(buildUrl()); | 180 o.add(buildUrl()); |
181 return o; | 181 return o; |
182 } | 182 } |
183 | 183 |
184 checkUnnamed4(core.List<api.Url> o) { | 184 checkUnnamed451(core.List<api.Url> o) { |
185 unittest.expect(o, unittest.hasLength(2)); | 185 unittest.expect(o, unittest.hasLength(2)); |
186 checkUrl(o[0]); | 186 checkUrl(o[0]); |
187 checkUrl(o[1]); | 187 checkUrl(o[1]); |
188 } | 188 } |
189 | 189 |
190 core.int buildCounterUrlHistory = 0; | 190 core.int buildCounterUrlHistory = 0; |
191 buildUrlHistory() { | 191 buildUrlHistory() { |
192 var o = new api.UrlHistory(); | 192 var o = new api.UrlHistory(); |
193 buildCounterUrlHistory++; | 193 buildCounterUrlHistory++; |
194 if (buildCounterUrlHistory < 3) { | 194 if (buildCounterUrlHistory < 3) { |
195 o.items = buildUnnamed4(); | 195 o.items = buildUnnamed451(); |
196 o.itemsPerPage = 42; | 196 o.itemsPerPage = 42; |
197 o.kind = "foo"; | 197 o.kind = "foo"; |
198 o.nextPageToken = "foo"; | 198 o.nextPageToken = "foo"; |
199 o.totalItems = 42; | 199 o.totalItems = 42; |
200 } | 200 } |
201 buildCounterUrlHistory--; | 201 buildCounterUrlHistory--; |
202 return o; | 202 return o; |
203 } | 203 } |
204 | 204 |
205 checkUrlHistory(api.UrlHistory o) { | 205 checkUrlHistory(api.UrlHistory o) { |
206 buildCounterUrlHistory++; | 206 buildCounterUrlHistory++; |
207 if (buildCounterUrlHistory < 3) { | 207 if (buildCounterUrlHistory < 3) { |
208 checkUnnamed4(o.items); | 208 checkUnnamed451(o.items); |
209 unittest.expect(o.itemsPerPage, unittest.equals(42)); | 209 unittest.expect(o.itemsPerPage, unittest.equals(42)); |
210 unittest.expect(o.kind, unittest.equals('foo')); | 210 unittest.expect(o.kind, unittest.equals('foo')); |
211 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 211 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
212 unittest.expect(o.totalItems, unittest.equals(42)); | 212 unittest.expect(o.totalItems, unittest.equals(42)); |
213 } | 213 } |
214 buildCounterUrlHistory--; | 214 buildCounterUrlHistory--; |
215 } | 215 } |
216 | 216 |
217 | 217 |
218 main() { | 218 main() { |
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
407 res.list(projection: arg_projection, start_token: arg_start_token).then(un
ittest.expectAsync(((api.UrlHistory response) { | 407 res.list(projection: arg_projection, start_token: arg_start_token).then(un
ittest.expectAsync(((api.UrlHistory response) { |
408 checkUrlHistory(response); | 408 checkUrlHistory(response); |
409 }))); | 409 }))); |
410 }); | 410 }); |
411 | 411 |
412 }); | 412 }); |
413 | 413 |
414 | 414 |
415 } | 415 } |
416 | 416 |
OLD | NEW |