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 buildUnnamed1052() { | 19 buildUnnamed1080() { |
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 checkUnnamed1052(core.List<api.ResourceRecordSet> o) { | 26 checkUnnamed1080(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 buildUnnamed1053() { | 32 buildUnnamed1081() { |
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 checkUnnamed1053(core.List<api.ResourceRecordSet> o) { | 39 checkUnnamed1081(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 = buildUnnamed1052(); | 50 o.additions = buildUnnamed1080(); |
51 o.deletions = buildUnnamed1053(); | 51 o.deletions = buildUnnamed1081(); |
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 checkUnnamed1052(o.additions); | 64 checkUnnamed1080(o.additions); |
65 checkUnnamed1053(o.deletions); | 65 checkUnnamed1081(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 buildUnnamed1054() { | 74 buildUnnamed1082() { |
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 checkUnnamed1054(core.List<api.Change> o) { | 81 checkUnnamed1082(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 = buildUnnamed1054(); | 92 o.changes = buildUnnamed1082(); |
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 checkUnnamed1054(o.changes); | 103 checkUnnamed1082(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 buildUnnamed1055() { | 110 buildUnnamed1083() { |
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 checkUnnamed1055(core.List<core.String> o) { | 117 checkUnnamed1083(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 = buildUnnamed1055(); | 134 o.nameServers = buildUnnamed1083(); |
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 checkUnnamed1055(o.nameServers); | 149 checkUnnamed1083(o.nameServers); |
150 } | 150 } |
151 buildCounterManagedZone--; | 151 buildCounterManagedZone--; |
152 } | 152 } |
153 | 153 |
154 buildUnnamed1056() { | 154 buildUnnamed1084() { |
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 checkUnnamed1056(core.List<api.ManagedZone> o) { | 161 checkUnnamed1084(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 = buildUnnamed1056(); | 173 o.managedZones = buildUnnamed1084(); |
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 checkUnnamed1056(o.managedZones); | 184 checkUnnamed1084(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 buildUnnamed1057() { | 246 buildUnnamed1085() { |
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 checkUnnamed1057(core.List<core.String> o) { | 253 checkUnnamed1085(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 = buildUnnamed1057(); | 266 o.rrdatas = buildUnnamed1085(); |
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 checkUnnamed1057(o.rrdatas); | 279 checkUnnamed1085(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 buildUnnamed1058() { | 286 buildUnnamed1086() { |
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 checkUnnamed1058(core.List<api.ResourceRecordSet> o) { | 293 checkUnnamed1086(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 = buildUnnamed1058(); | 306 o.rrsets = buildUnnamed1086(); |
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 checkUnnamed1058(o.rrsets); | 317 checkUnnamed1086(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 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
402 var arg_project = "foo"; | 402 var arg_project = "foo"; |
403 var arg_managedZone = "foo"; | 403 var arg_managedZone = "foo"; |
404 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 404 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
405 var obj = new api.Change.fromJson(json); | 405 var obj = new api.Change.fromJson(json); |
406 checkChange(obj); | 406 checkChange(obj); |
407 | 407 |
408 var path = (req.url).path; | 408 var path = (req.url).path; |
409 var pathOffset = 0; | 409 var pathOffset = 0; |
410 var index; | 410 var index; |
411 var subPart; | 411 var subPart; |
412 unittest.expect(path.substring(pathOffset, pathOffset + 22), unittest.eq
uals("/dns/v1beta1/projects/")); | 412 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
413 pathOffset += 22; | 413 pathOffset += 1; |
414 index = path.indexOf("/managedZones/", pathOffset); | |
415 unittest.expect(index >= 0, unittest.isTrue); | |
416 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
417 pathOffset = index; | |
418 unittest.expect(subPart, unittest.equals("$arg_project")); | |
419 unittest.expect(path.substring(pathOffset, pathOffset + 14), unittest.eq
uals("/managedZones/")); | |
420 pathOffset += 14; | |
421 index = path.indexOf("/changes", pathOffset); | |
422 unittest.expect(index >= 0, unittest.isTrue); | |
423 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
424 pathOffset = index; | |
425 unittest.expect(subPart, unittest.equals("$arg_managedZone")); | |
426 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("/changes")); | |
427 pathOffset += 8; | |
428 | 414 |
429 var query = (req.url).query; | 415 var query = (req.url).query; |
430 var queryOffset = 0; | 416 var queryOffset = 0; |
431 var queryMap = {}; | 417 var queryMap = {}; |
432 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 418 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
433 parseBool(n) { | 419 parseBool(n) { |
434 if (n == "true") return true; | 420 if (n == "true") return true; |
435 if (n == "false") return false; | 421 if (n == "false") return false; |
436 if (n == null) return null; | 422 if (n == null) return null; |
437 throw new core.ArgumentError("Invalid boolean: $n"); | 423 throw new core.ArgumentError("Invalid boolean: $n"); |
(...skipping 22 matching lines...) Expand all Loading... |
460 var mock = new common_test.HttpServerMock(); | 446 var mock = new common_test.HttpServerMock(); |
461 api.ChangesResourceApi res = new api.DnsApi(mock).changes; | 447 api.ChangesResourceApi res = new api.DnsApi(mock).changes; |
462 var arg_project = "foo"; | 448 var arg_project = "foo"; |
463 var arg_managedZone = "foo"; | 449 var arg_managedZone = "foo"; |
464 var arg_changeId = "foo"; | 450 var arg_changeId = "foo"; |
465 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 451 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
466 var path = (req.url).path; | 452 var path = (req.url).path; |
467 var pathOffset = 0; | 453 var pathOffset = 0; |
468 var index; | 454 var index; |
469 var subPart; | 455 var subPart; |
470 unittest.expect(path.substring(pathOffset, pathOffset + 22), unittest.eq
uals("/dns/v1beta1/projects/")); | 456 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
471 pathOffset += 22; | 457 pathOffset += 1; |
472 index = path.indexOf("/managedZones/", pathOffset); | |
473 unittest.expect(index >= 0, unittest.isTrue); | |
474 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
475 pathOffset = index; | |
476 unittest.expect(subPart, unittest.equals("$arg_project")); | |
477 unittest.expect(path.substring(pathOffset, pathOffset + 14), unittest.eq
uals("/managedZones/")); | |
478 pathOffset += 14; | |
479 index = path.indexOf("/changes/", pathOffset); | |
480 unittest.expect(index >= 0, unittest.isTrue); | |
481 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
482 pathOffset = index; | |
483 unittest.expect(subPart, unittest.equals("$arg_managedZone")); | |
484 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("/changes/")); | |
485 pathOffset += 9; | |
486 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
487 pathOffset = path.length; | |
488 unittest.expect(subPart, unittest.equals("$arg_changeId")); | |
489 | 458 |
490 var query = (req.url).query; | 459 var query = (req.url).query; |
491 var queryOffset = 0; | 460 var queryOffset = 0; |
492 var queryMap = {}; | 461 var queryMap = {}; |
493 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 462 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
494 parseBool(n) { | 463 parseBool(n) { |
495 if (n == "true") return true; | 464 if (n == "true") return true; |
496 if (n == "false") return false; | 465 if (n == "false") return false; |
497 if (n == null) return null; | 466 if (n == null) return null; |
498 throw new core.ArgumentError("Invalid boolean: $n"); | 467 throw new core.ArgumentError("Invalid boolean: $n"); |
(...skipping 25 matching lines...) Expand all Loading... |
524 var arg_managedZone = "foo"; | 493 var arg_managedZone = "foo"; |
525 var arg_maxResults = 42; | 494 var arg_maxResults = 42; |
526 var arg_pageToken = "foo"; | 495 var arg_pageToken = "foo"; |
527 var arg_sortBy = "foo"; | 496 var arg_sortBy = "foo"; |
528 var arg_sortOrder = "foo"; | 497 var arg_sortOrder = "foo"; |
529 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 498 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
530 var path = (req.url).path; | 499 var path = (req.url).path; |
531 var pathOffset = 0; | 500 var pathOffset = 0; |
532 var index; | 501 var index; |
533 var subPart; | 502 var subPart; |
534 unittest.expect(path.substring(pathOffset, pathOffset + 22), unittest.eq
uals("/dns/v1beta1/projects/")); | 503 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
535 pathOffset += 22; | 504 pathOffset += 1; |
536 index = path.indexOf("/managedZones/", pathOffset); | |
537 unittest.expect(index >= 0, unittest.isTrue); | |
538 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
539 pathOffset = index; | |
540 unittest.expect(subPart, unittest.equals("$arg_project")); | |
541 unittest.expect(path.substring(pathOffset, pathOffset + 14), unittest.eq
uals("/managedZones/")); | |
542 pathOffset += 14; | |
543 index = path.indexOf("/changes", pathOffset); | |
544 unittest.expect(index >= 0, unittest.isTrue); | |
545 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
546 pathOffset = index; | |
547 unittest.expect(subPart, unittest.equals("$arg_managedZone")); | |
548 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("/changes")); | |
549 pathOffset += 8; | |
550 | 505 |
551 var query = (req.url).query; | 506 var query = (req.url).query; |
552 var queryOffset = 0; | 507 var queryOffset = 0; |
553 var queryMap = {}; | 508 var queryMap = {}; |
554 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 509 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
555 parseBool(n) { | 510 parseBool(n) { |
556 if (n == "true") return true; | 511 if (n == "true") return true; |
557 if (n == "false") return false; | 512 if (n == "false") return false; |
558 if (n == null) return null; | 513 if (n == null) return null; |
559 throw new core.ArgumentError("Invalid boolean: $n"); | 514 throw new core.ArgumentError("Invalid boolean: $n"); |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
592 var arg_request = buildManagedZone(); | 547 var arg_request = buildManagedZone(); |
593 var arg_project = "foo"; | 548 var arg_project = "foo"; |
594 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 549 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
595 var obj = new api.ManagedZone.fromJson(json); | 550 var obj = new api.ManagedZone.fromJson(json); |
596 checkManagedZone(obj); | 551 checkManagedZone(obj); |
597 | 552 |
598 var path = (req.url).path; | 553 var path = (req.url).path; |
599 var pathOffset = 0; | 554 var pathOffset = 0; |
600 var index; | 555 var index; |
601 var subPart; | 556 var subPart; |
602 unittest.expect(path.substring(pathOffset, pathOffset + 22), unittest.eq
uals("/dns/v1beta1/projects/")); | 557 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
603 pathOffset += 22; | 558 pathOffset += 1; |
604 index = path.indexOf("/managedZones", pathOffset); | |
605 unittest.expect(index >= 0, unittest.isTrue); | |
606 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
607 pathOffset = index; | |
608 unittest.expect(subPart, unittest.equals("$arg_project")); | |
609 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("/managedZones")); | |
610 pathOffset += 13; | |
611 | 559 |
612 var query = (req.url).query; | 560 var query = (req.url).query; |
613 var queryOffset = 0; | 561 var queryOffset = 0; |
614 var queryMap = {}; | 562 var queryMap = {}; |
615 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 563 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
616 parseBool(n) { | 564 parseBool(n) { |
617 if (n == "true") return true; | 565 if (n == "true") return true; |
618 if (n == "false") return false; | 566 if (n == "false") return false; |
619 if (n == null) return null; | 567 if (n == null) return null; |
620 throw new core.ArgumentError("Invalid boolean: $n"); | 568 throw new core.ArgumentError("Invalid boolean: $n"); |
(...skipping 21 matching lines...) Expand all Loading... |
642 | 590 |
643 var mock = new common_test.HttpServerMock(); | 591 var mock = new common_test.HttpServerMock(); |
644 api.ManagedZonesResourceApi res = new api.DnsApi(mock).managedZones; | 592 api.ManagedZonesResourceApi res = new api.DnsApi(mock).managedZones; |
645 var arg_project = "foo"; | 593 var arg_project = "foo"; |
646 var arg_managedZone = "foo"; | 594 var arg_managedZone = "foo"; |
647 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 595 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
648 var path = (req.url).path; | 596 var path = (req.url).path; |
649 var pathOffset = 0; | 597 var pathOffset = 0; |
650 var index; | 598 var index; |
651 var subPart; | 599 var subPart; |
652 unittest.expect(path.substring(pathOffset, pathOffset + 22), unittest.eq
uals("/dns/v1beta1/projects/")); | 600 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
653 pathOffset += 22; | 601 pathOffset += 1; |
654 index = path.indexOf("/managedZones/", pathOffset); | |
655 unittest.expect(index >= 0, unittest.isTrue); | |
656 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
657 pathOffset = index; | |
658 unittest.expect(subPart, unittest.equals("$arg_project")); | |
659 unittest.expect(path.substring(pathOffset, pathOffset + 14), unittest.eq
uals("/managedZones/")); | |
660 pathOffset += 14; | |
661 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
662 pathOffset = path.length; | |
663 unittest.expect(subPart, unittest.equals("$arg_managedZone")); | |
664 | 602 |
665 var query = (req.url).query; | 603 var query = (req.url).query; |
666 var queryOffset = 0; | 604 var queryOffset = 0; |
667 var queryMap = {}; | 605 var queryMap = {}; |
668 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 606 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
669 parseBool(n) { | 607 parseBool(n) { |
670 if (n == "true") return true; | 608 if (n == "true") return true; |
671 if (n == "false") return false; | 609 if (n == "false") return false; |
672 if (n == null) return null; | 610 if (n == null) return null; |
673 throw new core.ArgumentError("Invalid boolean: $n"); | 611 throw new core.ArgumentError("Invalid boolean: $n"); |
(...skipping 19 matching lines...) Expand all Loading... |
693 | 631 |
694 var mock = new common_test.HttpServerMock(); | 632 var mock = new common_test.HttpServerMock(); |
695 api.ManagedZonesResourceApi res = new api.DnsApi(mock).managedZones; | 633 api.ManagedZonesResourceApi res = new api.DnsApi(mock).managedZones; |
696 var arg_project = "foo"; | 634 var arg_project = "foo"; |
697 var arg_managedZone = "foo"; | 635 var arg_managedZone = "foo"; |
698 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 636 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
699 var path = (req.url).path; | 637 var path = (req.url).path; |
700 var pathOffset = 0; | 638 var pathOffset = 0; |
701 var index; | 639 var index; |
702 var subPart; | 640 var subPart; |
703 unittest.expect(path.substring(pathOffset, pathOffset + 22), unittest.eq
uals("/dns/v1beta1/projects/")); | 641 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
704 pathOffset += 22; | 642 pathOffset += 1; |
705 index = path.indexOf("/managedZones/", pathOffset); | |
706 unittest.expect(index >= 0, unittest.isTrue); | |
707 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
708 pathOffset = index; | |
709 unittest.expect(subPart, unittest.equals("$arg_project")); | |
710 unittest.expect(path.substring(pathOffset, pathOffset + 14), unittest.eq
uals("/managedZones/")); | |
711 pathOffset += 14; | |
712 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
713 pathOffset = path.length; | |
714 unittest.expect(subPart, unittest.equals("$arg_managedZone")); | |
715 | 643 |
716 var query = (req.url).query; | 644 var query = (req.url).query; |
717 var queryOffset = 0; | 645 var queryOffset = 0; |
718 var queryMap = {}; | 646 var queryMap = {}; |
719 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 647 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
720 parseBool(n) { | 648 parseBool(n) { |
721 if (n == "true") return true; | 649 if (n == "true") return true; |
722 if (n == "false") return false; | 650 if (n == "false") return false; |
723 if (n == null) return null; | 651 if (n == null) return null; |
724 throw new core.ArgumentError("Invalid boolean: $n"); | 652 throw new core.ArgumentError("Invalid boolean: $n"); |
(...skipping 22 matching lines...) Expand all Loading... |
747 var mock = new common_test.HttpServerMock(); | 675 var mock = new common_test.HttpServerMock(); |
748 api.ManagedZonesResourceApi res = new api.DnsApi(mock).managedZones; | 676 api.ManagedZonesResourceApi res = new api.DnsApi(mock).managedZones; |
749 var arg_project = "foo"; | 677 var arg_project = "foo"; |
750 var arg_maxResults = 42; | 678 var arg_maxResults = 42; |
751 var arg_pageToken = "foo"; | 679 var arg_pageToken = "foo"; |
752 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 680 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
753 var path = (req.url).path; | 681 var path = (req.url).path; |
754 var pathOffset = 0; | 682 var pathOffset = 0; |
755 var index; | 683 var index; |
756 var subPart; | 684 var subPart; |
757 unittest.expect(path.substring(pathOffset, pathOffset + 22), unittest.eq
uals("/dns/v1beta1/projects/")); | 685 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
758 pathOffset += 22; | 686 pathOffset += 1; |
759 index = path.indexOf("/managedZones", pathOffset); | |
760 unittest.expect(index >= 0, unittest.isTrue); | |
761 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
762 pathOffset = index; | |
763 unittest.expect(subPart, unittest.equals("$arg_project")); | |
764 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("/managedZones")); | |
765 pathOffset += 13; | |
766 | 687 |
767 var query = (req.url).query; | 688 var query = (req.url).query; |
768 var queryOffset = 0; | 689 var queryOffset = 0; |
769 var queryMap = {}; | 690 var queryMap = {}; |
770 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 691 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
771 parseBool(n) { | 692 parseBool(n) { |
772 if (n == "true") return true; | 693 if (n == "true") return true; |
773 if (n == "false") return false; | 694 if (n == "false") return false; |
774 if (n == null) return null; | 695 if (n == null) return null; |
775 throw new core.ArgumentError("Invalid boolean: $n"); | 696 throw new core.ArgumentError("Invalid boolean: $n"); |
(...skipping 26 matching lines...) Expand all Loading... |
802 unittest.test("method--get", () { | 723 unittest.test("method--get", () { |
803 | 724 |
804 var mock = new common_test.HttpServerMock(); | 725 var mock = new common_test.HttpServerMock(); |
805 api.ProjectsResourceApi res = new api.DnsApi(mock).projects; | 726 api.ProjectsResourceApi res = new api.DnsApi(mock).projects; |
806 var arg_project = "foo"; | 727 var arg_project = "foo"; |
807 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 728 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
808 var path = (req.url).path; | 729 var path = (req.url).path; |
809 var pathOffset = 0; | 730 var pathOffset = 0; |
810 var index; | 731 var index; |
811 var subPart; | 732 var subPart; |
812 unittest.expect(path.substring(pathOffset, pathOffset + 22), unittest.eq
uals("/dns/v1beta1/projects/")); | 733 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
813 pathOffset += 22; | 734 pathOffset += 1; |
814 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
815 pathOffset = path.length; | |
816 unittest.expect(subPart, unittest.equals("$arg_project")); | |
817 | 735 |
818 var query = (req.url).query; | 736 var query = (req.url).query; |
819 var queryOffset = 0; | 737 var queryOffset = 0; |
820 var queryMap = {}; | 738 var queryMap = {}; |
821 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 739 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
822 parseBool(n) { | 740 parseBool(n) { |
823 if (n == "true") return true; | 741 if (n == "true") return true; |
824 if (n == "false") return false; | 742 if (n == "false") return false; |
825 if (n == null) return null; | 743 if (n == null) return null; |
826 throw new core.ArgumentError("Invalid boolean: $n"); | 744 throw new core.ArgumentError("Invalid boolean: $n"); |
(...skipping 29 matching lines...) Expand all Loading... |
856 var arg_managedZone = "foo"; | 774 var arg_managedZone = "foo"; |
857 var arg_maxResults = 42; | 775 var arg_maxResults = 42; |
858 var arg_name = "foo"; | 776 var arg_name = "foo"; |
859 var arg_pageToken = "foo"; | 777 var arg_pageToken = "foo"; |
860 var arg_type = "foo"; | 778 var arg_type = "foo"; |
861 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 779 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
862 var path = (req.url).path; | 780 var path = (req.url).path; |
863 var pathOffset = 0; | 781 var pathOffset = 0; |
864 var index; | 782 var index; |
865 var subPart; | 783 var subPart; |
866 unittest.expect(path.substring(pathOffset, pathOffset + 22), unittest.eq
uals("/dns/v1beta1/projects/")); | 784 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
867 pathOffset += 22; | 785 pathOffset += 1; |
868 index = path.indexOf("/managedZones/", pathOffset); | |
869 unittest.expect(index >= 0, unittest.isTrue); | |
870 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
871 pathOffset = index; | |
872 unittest.expect(subPart, unittest.equals("$arg_project")); | |
873 unittest.expect(path.substring(pathOffset, pathOffset + 14), unittest.eq
uals("/managedZones/")); | |
874 pathOffset += 14; | |
875 index = path.indexOf("/rrsets", pathOffset); | |
876 unittest.expect(index >= 0, unittest.isTrue); | |
877 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
878 pathOffset = index; | |
879 unittest.expect(subPart, unittest.equals("$arg_managedZone")); | |
880 unittest.expect(path.substring(pathOffset, pathOffset + 7), unittest.equ
als("/rrsets")); | |
881 pathOffset += 7; | |
882 | 786 |
883 var query = (req.url).query; | 787 var query = (req.url).query; |
884 var queryOffset = 0; | 788 var queryOffset = 0; |
885 var queryMap = {}; | 789 var queryMap = {}; |
886 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 790 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
887 parseBool(n) { | 791 parseBool(n) { |
888 if (n == "true") return true; | 792 if (n == "true") return true; |
889 if (n == "false") return false; | 793 if (n == "false") return false; |
890 if (n == null) return null; | 794 if (n == null) return null; |
891 throw new core.ArgumentError("Invalid boolean: $n"); | 795 throw new core.ArgumentError("Invalid boolean: $n"); |
(...skipping 19 matching lines...) Expand all Loading... |
911 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) { |
912 checkResourceRecordSetsListResponse(response); | 816 checkResourceRecordSetsListResponse(response); |
913 }))); | 817 }))); |
914 }); | 818 }); |
915 | 819 |
916 }); | 820 }); |
917 | 821 |
918 | 822 |
919 } | 823 } |
920 | 824 |
OLD | NEW |