OLD | NEW |
1 library googleapis_beta.dns.v1beta1.test; | 1 library googleapis_beta.dns.v1beta1.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_beta/common/common.dart' as common; | 11 import 'package:googleapis_beta/common/common.dart' as common; |
12 import 'package:googleapis_beta/src/common_internal.dart' as common_internal; | 12 import 'package:googleapis_beta/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_beta/dns/v1beta1.dart' as api; | 15 import 'package:googleapis_beta/dns/v1beta1.dart' as api; |
16 | 16 |
17 | 17 |
18 | 18 |
19 buildUnnamed1280() { | 19 buildUnnamed1128() { |
20 var o = new core.List<api.ResourceRecordSet>(); | 20 var o = new core.List<api.ResourceRecordSet>(); |
21 o.add(buildResourceRecordSet()); | 21 o.add(buildResourceRecordSet()); |
22 o.add(buildResourceRecordSet()); | 22 o.add(buildResourceRecordSet()); |
23 return o; | 23 return o; |
24 } | 24 } |
25 | 25 |
26 checkUnnamed1280(core.List<api.ResourceRecordSet> o) { | 26 checkUnnamed1128(core.List<api.ResourceRecordSet> o) { |
27 unittest.expect(o, unittest.hasLength(2)); | 27 unittest.expect(o, unittest.hasLength(2)); |
28 checkResourceRecordSet(o[0]); | 28 checkResourceRecordSet(o[0]); |
29 checkResourceRecordSet(o[1]); | 29 checkResourceRecordSet(o[1]); |
30 } | 30 } |
31 | 31 |
32 buildUnnamed1281() { | 32 buildUnnamed1129() { |
33 var o = new core.List<api.ResourceRecordSet>(); | 33 var o = new core.List<api.ResourceRecordSet>(); |
34 o.add(buildResourceRecordSet()); | 34 o.add(buildResourceRecordSet()); |
35 o.add(buildResourceRecordSet()); | 35 o.add(buildResourceRecordSet()); |
36 return o; | 36 return o; |
37 } | 37 } |
38 | 38 |
39 checkUnnamed1281(core.List<api.ResourceRecordSet> o) { | 39 checkUnnamed1129(core.List<api.ResourceRecordSet> o) { |
40 unittest.expect(o, unittest.hasLength(2)); | 40 unittest.expect(o, unittest.hasLength(2)); |
41 checkResourceRecordSet(o[0]); | 41 checkResourceRecordSet(o[0]); |
42 checkResourceRecordSet(o[1]); | 42 checkResourceRecordSet(o[1]); |
43 } | 43 } |
44 | 44 |
45 core.int buildCounterChange = 0; | 45 core.int buildCounterChange = 0; |
46 buildChange() { | 46 buildChange() { |
47 var o = new api.Change(); | 47 var o = new api.Change(); |
48 buildCounterChange++; | 48 buildCounterChange++; |
49 if (buildCounterChange < 3) { | 49 if (buildCounterChange < 3) { |
50 o.additions = buildUnnamed1280(); | 50 o.additions = buildUnnamed1128(); |
51 o.deletions = buildUnnamed1281(); | 51 o.deletions = buildUnnamed1129(); |
52 o.id = "foo"; | 52 o.id = "foo"; |
53 o.kind = "foo"; | 53 o.kind = "foo"; |
54 o.startTime = "foo"; | 54 o.startTime = "foo"; |
55 o.status = "foo"; | 55 o.status = "foo"; |
56 } | 56 } |
57 buildCounterChange--; | 57 buildCounterChange--; |
58 return o; | 58 return o; |
59 } | 59 } |
60 | 60 |
61 checkChange(api.Change o) { | 61 checkChange(api.Change o) { |
62 buildCounterChange++; | 62 buildCounterChange++; |
63 if (buildCounterChange < 3) { | 63 if (buildCounterChange < 3) { |
64 checkUnnamed1280(o.additions); | 64 checkUnnamed1128(o.additions); |
65 checkUnnamed1281(o.deletions); | 65 checkUnnamed1129(o.deletions); |
66 unittest.expect(o.id, unittest.equals('foo')); | 66 unittest.expect(o.id, unittest.equals('foo')); |
67 unittest.expect(o.kind, unittest.equals('foo')); | 67 unittest.expect(o.kind, unittest.equals('foo')); |
68 unittest.expect(o.startTime, unittest.equals('foo')); | 68 unittest.expect(o.startTime, unittest.equals('foo')); |
69 unittest.expect(o.status, unittest.equals('foo')); | 69 unittest.expect(o.status, unittest.equals('foo')); |
70 } | 70 } |
71 buildCounterChange--; | 71 buildCounterChange--; |
72 } | 72 } |
73 | 73 |
74 buildUnnamed1282() { | 74 buildUnnamed1130() { |
75 var o = new core.List<api.Change>(); | 75 var o = new core.List<api.Change>(); |
76 o.add(buildChange()); | 76 o.add(buildChange()); |
77 o.add(buildChange()); | 77 o.add(buildChange()); |
78 return o; | 78 return o; |
79 } | 79 } |
80 | 80 |
81 checkUnnamed1282(core.List<api.Change> o) { | 81 checkUnnamed1130(core.List<api.Change> o) { |
82 unittest.expect(o, unittest.hasLength(2)); | 82 unittest.expect(o, unittest.hasLength(2)); |
83 checkChange(o[0]); | 83 checkChange(o[0]); |
84 checkChange(o[1]); | 84 checkChange(o[1]); |
85 } | 85 } |
86 | 86 |
87 core.int buildCounterChangesListResponse = 0; | 87 core.int buildCounterChangesListResponse = 0; |
88 buildChangesListResponse() { | 88 buildChangesListResponse() { |
89 var o = new api.ChangesListResponse(); | 89 var o = new api.ChangesListResponse(); |
90 buildCounterChangesListResponse++; | 90 buildCounterChangesListResponse++; |
91 if (buildCounterChangesListResponse < 3) { | 91 if (buildCounterChangesListResponse < 3) { |
92 o.changes = buildUnnamed1282(); | 92 o.changes = buildUnnamed1130(); |
93 o.kind = "foo"; | 93 o.kind = "foo"; |
94 o.nextPageToken = "foo"; | 94 o.nextPageToken = "foo"; |
95 } | 95 } |
96 buildCounterChangesListResponse--; | 96 buildCounterChangesListResponse--; |
97 return o; | 97 return o; |
98 } | 98 } |
99 | 99 |
100 checkChangesListResponse(api.ChangesListResponse o) { | 100 checkChangesListResponse(api.ChangesListResponse o) { |
101 buildCounterChangesListResponse++; | 101 buildCounterChangesListResponse++; |
102 if (buildCounterChangesListResponse < 3) { | 102 if (buildCounterChangesListResponse < 3) { |
103 checkUnnamed1282(o.changes); | 103 checkUnnamed1130(o.changes); |
104 unittest.expect(o.kind, unittest.equals('foo')); | 104 unittest.expect(o.kind, unittest.equals('foo')); |
105 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 105 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
106 } | 106 } |
107 buildCounterChangesListResponse--; | 107 buildCounterChangesListResponse--; |
108 } | 108 } |
109 | 109 |
110 buildUnnamed1283() { | 110 buildUnnamed1131() { |
111 var o = new core.List<core.String>(); | 111 var o = new core.List<core.String>(); |
112 o.add("foo"); | 112 o.add("foo"); |
113 o.add("foo"); | 113 o.add("foo"); |
114 return o; | 114 return o; |
115 } | 115 } |
116 | 116 |
117 checkUnnamed1283(core.List<core.String> o) { | 117 checkUnnamed1131(core.List<core.String> o) { |
118 unittest.expect(o, unittest.hasLength(2)); | 118 unittest.expect(o, unittest.hasLength(2)); |
119 unittest.expect(o[0], unittest.equals('foo')); | 119 unittest.expect(o[0], unittest.equals('foo')); |
120 unittest.expect(o[1], unittest.equals('foo')); | 120 unittest.expect(o[1], unittest.equals('foo')); |
121 } | 121 } |
122 | 122 |
123 core.int buildCounterManagedZone = 0; | 123 core.int buildCounterManagedZone = 0; |
124 buildManagedZone() { | 124 buildManagedZone() { |
125 var o = new api.ManagedZone(); | 125 var o = new api.ManagedZone(); |
126 buildCounterManagedZone++; | 126 buildCounterManagedZone++; |
127 if (buildCounterManagedZone < 3) { | 127 if (buildCounterManagedZone < 3) { |
128 o.creationTime = "foo"; | 128 o.creationTime = "foo"; |
129 o.description = "foo"; | 129 o.description = "foo"; |
130 o.dnsName = "foo"; | 130 o.dnsName = "foo"; |
131 o.id = "foo"; | 131 o.id = "foo"; |
132 o.kind = "foo"; | 132 o.kind = "foo"; |
133 o.name = "foo"; | 133 o.name = "foo"; |
134 o.nameServers = buildUnnamed1283(); | 134 o.nameServers = buildUnnamed1131(); |
135 } | 135 } |
136 buildCounterManagedZone--; | 136 buildCounterManagedZone--; |
137 return o; | 137 return o; |
138 } | 138 } |
139 | 139 |
140 checkManagedZone(api.ManagedZone o) { | 140 checkManagedZone(api.ManagedZone o) { |
141 buildCounterManagedZone++; | 141 buildCounterManagedZone++; |
142 if (buildCounterManagedZone < 3) { | 142 if (buildCounterManagedZone < 3) { |
143 unittest.expect(o.creationTime, unittest.equals('foo')); | 143 unittest.expect(o.creationTime, unittest.equals('foo')); |
144 unittest.expect(o.description, unittest.equals('foo')); | 144 unittest.expect(o.description, unittest.equals('foo')); |
145 unittest.expect(o.dnsName, unittest.equals('foo')); | 145 unittest.expect(o.dnsName, unittest.equals('foo')); |
146 unittest.expect(o.id, unittest.equals('foo')); | 146 unittest.expect(o.id, unittest.equals('foo')); |
147 unittest.expect(o.kind, unittest.equals('foo')); | 147 unittest.expect(o.kind, unittest.equals('foo')); |
148 unittest.expect(o.name, unittest.equals('foo')); | 148 unittest.expect(o.name, unittest.equals('foo')); |
149 checkUnnamed1283(o.nameServers); | 149 checkUnnamed1131(o.nameServers); |
150 } | 150 } |
151 buildCounterManagedZone--; | 151 buildCounterManagedZone--; |
152 } | 152 } |
153 | 153 |
154 buildUnnamed1284() { | 154 buildUnnamed1132() { |
155 var o = new core.List<api.ManagedZone>(); | 155 var o = new core.List<api.ManagedZone>(); |
156 o.add(buildManagedZone()); | 156 o.add(buildManagedZone()); |
157 o.add(buildManagedZone()); | 157 o.add(buildManagedZone()); |
158 return o; | 158 return o; |
159 } | 159 } |
160 | 160 |
161 checkUnnamed1284(core.List<api.ManagedZone> o) { | 161 checkUnnamed1132(core.List<api.ManagedZone> o) { |
162 unittest.expect(o, unittest.hasLength(2)); | 162 unittest.expect(o, unittest.hasLength(2)); |
163 checkManagedZone(o[0]); | 163 checkManagedZone(o[0]); |
164 checkManagedZone(o[1]); | 164 checkManagedZone(o[1]); |
165 } | 165 } |
166 | 166 |
167 core.int buildCounterManagedZonesListResponse = 0; | 167 core.int buildCounterManagedZonesListResponse = 0; |
168 buildManagedZonesListResponse() { | 168 buildManagedZonesListResponse() { |
169 var o = new api.ManagedZonesListResponse(); | 169 var o = new api.ManagedZonesListResponse(); |
170 buildCounterManagedZonesListResponse++; | 170 buildCounterManagedZonesListResponse++; |
171 if (buildCounterManagedZonesListResponse < 3) { | 171 if (buildCounterManagedZonesListResponse < 3) { |
172 o.kind = "foo"; | 172 o.kind = "foo"; |
173 o.managedZones = buildUnnamed1284(); | 173 o.managedZones = buildUnnamed1132(); |
174 o.nextPageToken = "foo"; | 174 o.nextPageToken = "foo"; |
175 } | 175 } |
176 buildCounterManagedZonesListResponse--; | 176 buildCounterManagedZonesListResponse--; |
177 return o; | 177 return o; |
178 } | 178 } |
179 | 179 |
180 checkManagedZonesListResponse(api.ManagedZonesListResponse o) { | 180 checkManagedZonesListResponse(api.ManagedZonesListResponse o) { |
181 buildCounterManagedZonesListResponse++; | 181 buildCounterManagedZonesListResponse++; |
182 if (buildCounterManagedZonesListResponse < 3) { | 182 if (buildCounterManagedZonesListResponse < 3) { |
183 unittest.expect(o.kind, unittest.equals('foo')); | 183 unittest.expect(o.kind, unittest.equals('foo')); |
184 checkUnnamed1284(o.managedZones); | 184 checkUnnamed1132(o.managedZones); |
185 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 185 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
186 } | 186 } |
187 buildCounterManagedZonesListResponse--; | 187 buildCounterManagedZonesListResponse--; |
188 } | 188 } |
189 | 189 |
190 core.int buildCounterProject = 0; | 190 core.int buildCounterProject = 0; |
191 buildProject() { | 191 buildProject() { |
192 var o = new api.Project(); | 192 var o = new api.Project(); |
193 buildCounterProject++; | 193 buildCounterProject++; |
194 if (buildCounterProject < 3) { | 194 if (buildCounterProject < 3) { |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
236 unittest.expect(o.managedZones, unittest.equals(42)); | 236 unittest.expect(o.managedZones, unittest.equals(42)); |
237 unittest.expect(o.resourceRecordsPerRrset, unittest.equals(42)); | 237 unittest.expect(o.resourceRecordsPerRrset, unittest.equals(42)); |
238 unittest.expect(o.rrsetAdditionsPerChange, unittest.equals(42)); | 238 unittest.expect(o.rrsetAdditionsPerChange, unittest.equals(42)); |
239 unittest.expect(o.rrsetDeletionsPerChange, unittest.equals(42)); | 239 unittest.expect(o.rrsetDeletionsPerChange, unittest.equals(42)); |
240 unittest.expect(o.rrsetsPerManagedZone, unittest.equals(42)); | 240 unittest.expect(o.rrsetsPerManagedZone, unittest.equals(42)); |
241 unittest.expect(o.totalRrdataSizePerChange, unittest.equals(42)); | 241 unittest.expect(o.totalRrdataSizePerChange, unittest.equals(42)); |
242 } | 242 } |
243 buildCounterQuota--; | 243 buildCounterQuota--; |
244 } | 244 } |
245 | 245 |
246 buildUnnamed1285() { | 246 buildUnnamed1133() { |
247 var o = new core.List<core.String>(); | 247 var o = new core.List<core.String>(); |
248 o.add("foo"); | 248 o.add("foo"); |
249 o.add("foo"); | 249 o.add("foo"); |
250 return o; | 250 return o; |
251 } | 251 } |
252 | 252 |
253 checkUnnamed1285(core.List<core.String> o) { | 253 checkUnnamed1133(core.List<core.String> o) { |
254 unittest.expect(o, unittest.hasLength(2)); | 254 unittest.expect(o, unittest.hasLength(2)); |
255 unittest.expect(o[0], unittest.equals('foo')); | 255 unittest.expect(o[0], unittest.equals('foo')); |
256 unittest.expect(o[1], unittest.equals('foo')); | 256 unittest.expect(o[1], unittest.equals('foo')); |
257 } | 257 } |
258 | 258 |
259 core.int buildCounterResourceRecordSet = 0; | 259 core.int buildCounterResourceRecordSet = 0; |
260 buildResourceRecordSet() { | 260 buildResourceRecordSet() { |
261 var o = new api.ResourceRecordSet(); | 261 var o = new api.ResourceRecordSet(); |
262 buildCounterResourceRecordSet++; | 262 buildCounterResourceRecordSet++; |
263 if (buildCounterResourceRecordSet < 3) { | 263 if (buildCounterResourceRecordSet < 3) { |
264 o.kind = "foo"; | 264 o.kind = "foo"; |
265 o.name = "foo"; | 265 o.name = "foo"; |
266 o.rrdatas = buildUnnamed1285(); | 266 o.rrdatas = buildUnnamed1133(); |
267 o.ttl = 42; | 267 o.ttl = 42; |
268 o.type = "foo"; | 268 o.type = "foo"; |
269 } | 269 } |
270 buildCounterResourceRecordSet--; | 270 buildCounterResourceRecordSet--; |
271 return o; | 271 return o; |
272 } | 272 } |
273 | 273 |
274 checkResourceRecordSet(api.ResourceRecordSet o) { | 274 checkResourceRecordSet(api.ResourceRecordSet o) { |
275 buildCounterResourceRecordSet++; | 275 buildCounterResourceRecordSet++; |
276 if (buildCounterResourceRecordSet < 3) { | 276 if (buildCounterResourceRecordSet < 3) { |
277 unittest.expect(o.kind, unittest.equals('foo')); | 277 unittest.expect(o.kind, unittest.equals('foo')); |
278 unittest.expect(o.name, unittest.equals('foo')); | 278 unittest.expect(o.name, unittest.equals('foo')); |
279 checkUnnamed1285(o.rrdatas); | 279 checkUnnamed1133(o.rrdatas); |
280 unittest.expect(o.ttl, unittest.equals(42)); | 280 unittest.expect(o.ttl, unittest.equals(42)); |
281 unittest.expect(o.type, unittest.equals('foo')); | 281 unittest.expect(o.type, unittest.equals('foo')); |
282 } | 282 } |
283 buildCounterResourceRecordSet--; | 283 buildCounterResourceRecordSet--; |
284 } | 284 } |
285 | 285 |
286 buildUnnamed1286() { | 286 buildUnnamed1134() { |
287 var o = new core.List<api.ResourceRecordSet>(); | 287 var o = new core.List<api.ResourceRecordSet>(); |
288 o.add(buildResourceRecordSet()); | 288 o.add(buildResourceRecordSet()); |
289 o.add(buildResourceRecordSet()); | 289 o.add(buildResourceRecordSet()); |
290 return o; | 290 return o; |
291 } | 291 } |
292 | 292 |
293 checkUnnamed1286(core.List<api.ResourceRecordSet> o) { | 293 checkUnnamed1134(core.List<api.ResourceRecordSet> o) { |
294 unittest.expect(o, unittest.hasLength(2)); | 294 unittest.expect(o, unittest.hasLength(2)); |
295 checkResourceRecordSet(o[0]); | 295 checkResourceRecordSet(o[0]); |
296 checkResourceRecordSet(o[1]); | 296 checkResourceRecordSet(o[1]); |
297 } | 297 } |
298 | 298 |
299 core.int buildCounterResourceRecordSetsListResponse = 0; | 299 core.int buildCounterResourceRecordSetsListResponse = 0; |
300 buildResourceRecordSetsListResponse() { | 300 buildResourceRecordSetsListResponse() { |
301 var o = new api.ResourceRecordSetsListResponse(); | 301 var o = new api.ResourceRecordSetsListResponse(); |
302 buildCounterResourceRecordSetsListResponse++; | 302 buildCounterResourceRecordSetsListResponse++; |
303 if (buildCounterResourceRecordSetsListResponse < 3) { | 303 if (buildCounterResourceRecordSetsListResponse < 3) { |
304 o.kind = "foo"; | 304 o.kind = "foo"; |
305 o.nextPageToken = "foo"; | 305 o.nextPageToken = "foo"; |
306 o.rrsets = buildUnnamed1286(); | 306 o.rrsets = buildUnnamed1134(); |
307 } | 307 } |
308 buildCounterResourceRecordSetsListResponse--; | 308 buildCounterResourceRecordSetsListResponse--; |
309 return o; | 309 return o; |
310 } | 310 } |
311 | 311 |
312 checkResourceRecordSetsListResponse(api.ResourceRecordSetsListResponse o) { | 312 checkResourceRecordSetsListResponse(api.ResourceRecordSetsListResponse o) { |
313 buildCounterResourceRecordSetsListResponse++; | 313 buildCounterResourceRecordSetsListResponse++; |
314 if (buildCounterResourceRecordSetsListResponse < 3) { | 314 if (buildCounterResourceRecordSetsListResponse < 3) { |
315 unittest.expect(o.kind, unittest.equals('foo')); | 315 unittest.expect(o.kind, unittest.equals('foo')); |
316 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 316 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
317 checkUnnamed1286(o.rrsets); | 317 checkUnnamed1134(o.rrsets); |
318 } | 318 } |
319 buildCounterResourceRecordSetsListResponse--; | 319 buildCounterResourceRecordSetsListResponse--; |
320 } | 320 } |
321 | 321 |
322 | 322 |
323 main() { | 323 main() { |
324 unittest.group("obj-schema-Change", () { | 324 unittest.group("obj-schema-Change", () { |
325 unittest.test("to-json--from-json", () { | 325 unittest.test("to-json--from-json", () { |
326 var o = buildChange(); | 326 var o = buildChange(); |
327 var od = new api.Change.fromJson(o.toJson()); | 327 var od = new api.Change.fromJson(o.toJson()); |
(...skipping 487 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
815 res.list(arg_project, arg_managedZone, maxResults: arg_maxResults, name: a
rg_name, pageToken: arg_pageToken, type: arg_type).then(unittest.expectAsync(((a
pi.ResourceRecordSetsListResponse response) { | 815 res.list(arg_project, arg_managedZone, maxResults: arg_maxResults, name: a
rg_name, pageToken: arg_pageToken, type: arg_type).then(unittest.expectAsync(((a
pi.ResourceRecordSetsListResponse response) { |
816 checkResourceRecordSetsListResponse(response); | 816 checkResourceRecordSetsListResponse(response); |
817 }))); | 817 }))); |
818 }); | 818 }); |
819 | 819 |
820 }); | 820 }); |
821 | 821 |
822 | 822 |
823 } | 823 } |
824 | 824 |
OLD | NEW |