OLD | NEW |
1 library googleapis.androidmanagement.v1.test; | 1 library googleapis.androidmanagement.v1.test; |
2 | 2 |
3 import "dart:core" as core; | 3 import "dart:core" as core; |
4 import "dart:collection" as collection; | |
5 import "dart:async" as async; | 4 import "dart:async" as async; |
6 import "dart:convert" as convert; | 5 import "dart:convert" as convert; |
7 | 6 |
8 import 'package:http/http.dart' as http; | 7 import 'package:http/http.dart' as http; |
9 import 'package:http/testing.dart' as http_testing; | |
10 import 'package:test/test.dart' as unittest; | 8 import 'package:test/test.dart' as unittest; |
11 | 9 |
12 import 'package:googleapis/androidmanagement/v1.dart' as api; | 10 import 'package:googleapis/androidmanagement/v1.dart' as api; |
13 | 11 |
14 class HttpServerMock extends http.BaseClient { | 12 class HttpServerMock extends http.BaseClient { |
15 core.Function _callback; | 13 core.Function _callback; |
16 core.bool _expectJson; | 14 core.bool _expectJson; |
17 | 15 |
18 void register(core.Function callback, core.bool expectJson) { | 16 void register(core.Function callback, core.bool expectJson) { |
19 _callback = callback; | 17 _callback = callback; |
20 _expectJson = expectJson; | 18 _expectJson = expectJson; |
21 } | 19 } |
22 | 20 |
23 async.Future<http.StreamedResponse> send(http.BaseRequest request) { | 21 async.Future<http.StreamedResponse> send(http.BaseRequest request) { |
24 if (_expectJson) { | 22 if (_expectJson) { |
25 return request.finalize() | 23 return request |
| 24 .finalize() |
26 .transform(convert.UTF8.decoder) | 25 .transform(convert.UTF8.decoder) |
27 .join('') | 26 .join('') |
28 .then((core.String jsonString) { | 27 .then((core.String jsonString) { |
29 if (jsonString.isEmpty) { | 28 if (jsonString.isEmpty) { |
30 return _callback(request, null); | 29 return _callback(request, null); |
31 } else { | 30 } else { |
32 return _callback(request, convert.JSON.decode(jsonString)); | 31 return _callback(request, convert.JSON.decode(jsonString)); |
33 } | 32 } |
34 }); | 33 }); |
35 } else { | 34 } else { |
36 var stream = request.finalize(); | 35 var stream = request.finalize(); |
37 if (stream == null) { | 36 if (stream == null) { |
38 return _callback(request, []); | 37 return _callback(request, []); |
39 } else { | 38 } else { |
40 return stream.toBytes().then((data) { | 39 return stream.toBytes().then((data) { |
41 return _callback(request, data); | 40 return _callback(request, data); |
42 }); | 41 }); |
43 } | 42 } |
44 } | 43 } |
45 } | 44 } |
46 } | 45 } |
47 | 46 |
48 http.StreamedResponse stringResponse( | 47 http.StreamedResponse stringResponse(core.int status, |
49 core.int status, core.Map<core.String, core.String> headers, core.String bod
y) { | 48 core.Map<core.String, core.String> headers, core.String body) { |
50 var stream = new async.Stream.fromIterable([convert.UTF8.encode(body)]); | 49 var stream = new async.Stream.fromIterable([convert.UTF8.encode(body)]); |
51 return new http.StreamedResponse(stream, status, headers: headers); | 50 return new http.StreamedResponse(stream, status, headers: headers); |
52 } | 51 } |
53 | 52 |
54 core.int buildCounterApiLevelCondition = 0; | 53 core.int buildCounterApiLevelCondition = 0; |
55 buildApiLevelCondition() { | 54 buildApiLevelCondition() { |
56 var o = new api.ApiLevelCondition(); | 55 var o = new api.ApiLevelCondition(); |
57 buildCounterApiLevelCondition++; | 56 buildCounterApiLevelCondition++; |
58 if (buildCounterApiLevelCondition < 3) { | 57 if (buildCounterApiLevelCondition < 3) { |
59 o.minApiLevel = 42; | 58 o.minApiLevel = 42; |
60 } | 59 } |
61 buildCounterApiLevelCondition--; | 60 buildCounterApiLevelCondition--; |
62 return o; | 61 return o; |
63 } | 62 } |
64 | 63 |
65 checkApiLevelCondition(api.ApiLevelCondition o) { | 64 checkApiLevelCondition(api.ApiLevelCondition o) { |
66 buildCounterApiLevelCondition++; | 65 buildCounterApiLevelCondition++; |
67 if (buildCounterApiLevelCondition < 3) { | 66 if (buildCounterApiLevelCondition < 3) { |
68 unittest.expect(o.minApiLevel, unittest.equals(42)); | 67 unittest.expect(o.minApiLevel, unittest.equals(42)); |
69 } | 68 } |
70 buildCounterApiLevelCondition--; | 69 buildCounterApiLevelCondition--; |
71 } | 70 } |
72 | 71 |
73 buildUnnamed1559() { | 72 buildUnnamed1554() { |
74 var o = new core.List<api.ManagedProperty>(); | 73 var o = new core.List<api.ManagedProperty>(); |
75 o.add(buildManagedProperty()); | 74 o.add(buildManagedProperty()); |
76 o.add(buildManagedProperty()); | 75 o.add(buildManagedProperty()); |
77 return o; | 76 return o; |
78 } | 77 } |
79 | 78 |
80 checkUnnamed1559(core.List<api.ManagedProperty> o) { | 79 checkUnnamed1554(core.List<api.ManagedProperty> o) { |
81 unittest.expect(o, unittest.hasLength(2)); | 80 unittest.expect(o, unittest.hasLength(2)); |
82 checkManagedProperty(o[0]); | 81 checkManagedProperty(o[0]); |
83 checkManagedProperty(o[1]); | 82 checkManagedProperty(o[1]); |
84 } | 83 } |
85 | 84 |
86 buildUnnamed1560() { | 85 buildUnnamed1555() { |
87 var o = new core.List<api.ApplicationPermission>(); | 86 var o = new core.List<api.ApplicationPermission>(); |
88 o.add(buildApplicationPermission()); | 87 o.add(buildApplicationPermission()); |
89 o.add(buildApplicationPermission()); | 88 o.add(buildApplicationPermission()); |
90 return o; | 89 return o; |
91 } | 90 } |
92 | 91 |
93 checkUnnamed1560(core.List<api.ApplicationPermission> o) { | 92 checkUnnamed1555(core.List<api.ApplicationPermission> o) { |
94 unittest.expect(o, unittest.hasLength(2)); | 93 unittest.expect(o, unittest.hasLength(2)); |
95 checkApplicationPermission(o[0]); | 94 checkApplicationPermission(o[0]); |
96 checkApplicationPermission(o[1]); | 95 checkApplicationPermission(o[1]); |
97 } | 96 } |
98 | 97 |
99 core.int buildCounterApplication = 0; | 98 core.int buildCounterApplication = 0; |
100 buildApplication() { | 99 buildApplication() { |
101 var o = new api.Application(); | 100 var o = new api.Application(); |
102 buildCounterApplication++; | 101 buildCounterApplication++; |
103 if (buildCounterApplication < 3) { | 102 if (buildCounterApplication < 3) { |
104 o.managedProperties = buildUnnamed1559(); | 103 o.managedProperties = buildUnnamed1554(); |
105 o.name = "foo"; | 104 o.name = "foo"; |
106 o.permissions = buildUnnamed1560(); | 105 o.permissions = buildUnnamed1555(); |
107 o.title = "foo"; | 106 o.title = "foo"; |
108 } | 107 } |
109 buildCounterApplication--; | 108 buildCounterApplication--; |
110 return o; | 109 return o; |
111 } | 110 } |
112 | 111 |
113 checkApplication(api.Application o) { | 112 checkApplication(api.Application o) { |
114 buildCounterApplication++; | 113 buildCounterApplication++; |
115 if (buildCounterApplication < 3) { | 114 if (buildCounterApplication < 3) { |
116 checkUnnamed1559(o.managedProperties); | 115 checkUnnamed1554(o.managedProperties); |
117 unittest.expect(o.name, unittest.equals('foo')); | 116 unittest.expect(o.name, unittest.equals('foo')); |
118 checkUnnamed1560(o.permissions); | 117 checkUnnamed1555(o.permissions); |
119 unittest.expect(o.title, unittest.equals('foo')); | 118 unittest.expect(o.title, unittest.equals('foo')); |
120 } | 119 } |
121 buildCounterApplication--; | 120 buildCounterApplication--; |
122 } | 121 } |
123 | 122 |
124 core.int buildCounterApplicationPermission = 0; | 123 core.int buildCounterApplicationPermission = 0; |
125 buildApplicationPermission() { | 124 buildApplicationPermission() { |
126 var o = new api.ApplicationPermission(); | 125 var o = new api.ApplicationPermission(); |
127 buildCounterApplicationPermission++; | 126 buildCounterApplicationPermission++; |
128 if (buildCounterApplicationPermission < 3) { | 127 if (buildCounterApplicationPermission < 3) { |
129 o.description = "foo"; | 128 o.description = "foo"; |
130 o.name = "foo"; | 129 o.name = "foo"; |
131 o.permissionId = "foo"; | 130 o.permissionId = "foo"; |
132 } | 131 } |
133 buildCounterApplicationPermission--; | 132 buildCounterApplicationPermission--; |
134 return o; | 133 return o; |
135 } | 134 } |
136 | 135 |
137 checkApplicationPermission(api.ApplicationPermission o) { | 136 checkApplicationPermission(api.ApplicationPermission o) { |
138 buildCounterApplicationPermission++; | 137 buildCounterApplicationPermission++; |
139 if (buildCounterApplicationPermission < 3) { | 138 if (buildCounterApplicationPermission < 3) { |
140 unittest.expect(o.description, unittest.equals('foo')); | 139 unittest.expect(o.description, unittest.equals('foo')); |
141 unittest.expect(o.name, unittest.equals('foo')); | 140 unittest.expect(o.name, unittest.equals('foo')); |
142 unittest.expect(o.permissionId, unittest.equals('foo')); | 141 unittest.expect(o.permissionId, unittest.equals('foo')); |
143 } | 142 } |
144 buildCounterApplicationPermission--; | 143 buildCounterApplicationPermission--; |
145 } | 144 } |
146 | 145 |
147 buildUnnamed1561() { | 146 buildUnnamed1556() { |
148 var o = new core.Map<core.String, core.Object>(); | 147 var o = new core.Map<core.String, core.Object>(); |
149 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 148 o["x"] = { |
150 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 149 'list': [1, 2, 3], |
| 150 'bool': true, |
| 151 'string': 'foo' |
| 152 }; |
| 153 o["y"] = { |
| 154 'list': [1, 2, 3], |
| 155 'bool': true, |
| 156 'string': 'foo' |
| 157 }; |
151 return o; | 158 return o; |
152 } | 159 } |
153 | 160 |
154 checkUnnamed1561(core.Map<core.String, core.Object> o) { | 161 checkUnnamed1556(core.Map<core.String, core.Object> o) { |
155 unittest.expect(o, unittest.hasLength(2)); | 162 unittest.expect(o, unittest.hasLength(2)); |
156 var casted1 = (o["x"]) as core.Map; unittest.expect(casted1, unittest.hasLengt
h(3)); unittest.expect(casted1["list"], unittest.equals([1, 2, 3])); unittest.ex
pect(casted1["bool"], unittest.equals(true)); unittest.expect(casted1["string"],
unittest.equals('foo')); | 163 var casted1 = (o["x"]) as core.Map; |
157 var casted2 = (o["y"]) as core.Map; unittest.expect(casted2, unittest.hasLengt
h(3)); unittest.expect(casted2["list"], unittest.equals([1, 2, 3])); unittest.ex
pect(casted2["bool"], unittest.equals(true)); unittest.expect(casted2["string"],
unittest.equals('foo')); | 164 unittest.expect(casted1, unittest.hasLength(3)); |
| 165 unittest.expect(casted1["list"], unittest.equals([1, 2, 3])); |
| 166 unittest.expect(casted1["bool"], unittest.equals(true)); |
| 167 unittest.expect(casted1["string"], unittest.equals('foo')); |
| 168 var casted2 = (o["y"]) as core.Map; |
| 169 unittest.expect(casted2, unittest.hasLength(3)); |
| 170 unittest.expect(casted2["list"], unittest.equals([1, 2, 3])); |
| 171 unittest.expect(casted2["bool"], unittest.equals(true)); |
| 172 unittest.expect(casted2["string"], unittest.equals('foo')); |
158 } | 173 } |
159 | 174 |
160 buildUnnamed1562() { | 175 buildUnnamed1557() { |
161 var o = new core.List<api.PermissionGrant>(); | 176 var o = new core.List<api.PermissionGrant>(); |
162 o.add(buildPermissionGrant()); | 177 o.add(buildPermissionGrant()); |
163 o.add(buildPermissionGrant()); | 178 o.add(buildPermissionGrant()); |
164 return o; | 179 return o; |
165 } | 180 } |
166 | 181 |
167 checkUnnamed1562(core.List<api.PermissionGrant> o) { | 182 checkUnnamed1557(core.List<api.PermissionGrant> o) { |
168 unittest.expect(o, unittest.hasLength(2)); | 183 unittest.expect(o, unittest.hasLength(2)); |
169 checkPermissionGrant(o[0]); | 184 checkPermissionGrant(o[0]); |
170 checkPermissionGrant(o[1]); | 185 checkPermissionGrant(o[1]); |
171 } | 186 } |
172 | 187 |
173 core.int buildCounterApplicationPolicy = 0; | 188 core.int buildCounterApplicationPolicy = 0; |
174 buildApplicationPolicy() { | 189 buildApplicationPolicy() { |
175 var o = new api.ApplicationPolicy(); | 190 var o = new api.ApplicationPolicy(); |
176 buildCounterApplicationPolicy++; | 191 buildCounterApplicationPolicy++; |
177 if (buildCounterApplicationPolicy < 3) { | 192 if (buildCounterApplicationPolicy < 3) { |
178 o.defaultPermissionPolicy = "foo"; | 193 o.defaultPermissionPolicy = "foo"; |
179 o.installType = "foo"; | 194 o.installType = "foo"; |
180 o.lockTaskAllowed = true; | 195 o.lockTaskAllowed = true; |
181 o.managedConfiguration = buildUnnamed1561(); | 196 o.managedConfiguration = buildUnnamed1556(); |
182 o.packageName = "foo"; | 197 o.packageName = "foo"; |
183 o.permissionGrants = buildUnnamed1562(); | 198 o.permissionGrants = buildUnnamed1557(); |
184 } | 199 } |
185 buildCounterApplicationPolicy--; | 200 buildCounterApplicationPolicy--; |
186 return o; | 201 return o; |
187 } | 202 } |
188 | 203 |
189 checkApplicationPolicy(api.ApplicationPolicy o) { | 204 checkApplicationPolicy(api.ApplicationPolicy o) { |
190 buildCounterApplicationPolicy++; | 205 buildCounterApplicationPolicy++; |
191 if (buildCounterApplicationPolicy < 3) { | 206 if (buildCounterApplicationPolicy < 3) { |
192 unittest.expect(o.defaultPermissionPolicy, unittest.equals('foo')); | 207 unittest.expect(o.defaultPermissionPolicy, unittest.equals('foo')); |
193 unittest.expect(o.installType, unittest.equals('foo')); | 208 unittest.expect(o.installType, unittest.equals('foo')); |
194 unittest.expect(o.lockTaskAllowed, unittest.isTrue); | 209 unittest.expect(o.lockTaskAllowed, unittest.isTrue); |
195 checkUnnamed1561(o.managedConfiguration); | 210 checkUnnamed1556(o.managedConfiguration); |
196 unittest.expect(o.packageName, unittest.equals('foo')); | 211 unittest.expect(o.packageName, unittest.equals('foo')); |
197 checkUnnamed1562(o.permissionGrants); | 212 checkUnnamed1557(o.permissionGrants); |
198 } | 213 } |
199 buildCounterApplicationPolicy--; | 214 buildCounterApplicationPolicy--; |
200 } | 215 } |
201 | 216 |
202 buildUnnamed1563() { | 217 buildUnnamed1558() { |
203 var o = new core.List<core.String>(); | 218 var o = new core.List<core.String>(); |
204 o.add("foo"); | 219 o.add("foo"); |
205 o.add("foo"); | 220 o.add("foo"); |
206 return o; | 221 return o; |
207 } | 222 } |
208 | 223 |
209 checkUnnamed1563(core.List<core.String> o) { | 224 checkUnnamed1558(core.List<core.String> o) { |
210 unittest.expect(o, unittest.hasLength(2)); | 225 unittest.expect(o, unittest.hasLength(2)); |
211 unittest.expect(o[0], unittest.equals('foo')); | 226 unittest.expect(o[0], unittest.equals('foo')); |
212 unittest.expect(o[1], unittest.equals('foo')); | 227 unittest.expect(o[1], unittest.equals('foo')); |
213 } | 228 } |
214 | 229 |
215 core.int buildCounterCommand = 0; | 230 core.int buildCounterCommand = 0; |
216 buildCommand() { | 231 buildCommand() { |
217 var o = new api.Command(); | 232 var o = new api.Command(); |
218 buildCounterCommand++; | 233 buildCounterCommand++; |
219 if (buildCounterCommand < 3) { | 234 if (buildCounterCommand < 3) { |
220 o.createTime = "foo"; | 235 o.createTime = "foo"; |
221 o.duration = "foo"; | 236 o.duration = "foo"; |
222 o.newPassword = "foo"; | 237 o.newPassword = "foo"; |
223 o.resetPasswordFlags = buildUnnamed1563(); | 238 o.resetPasswordFlags = buildUnnamed1558(); |
224 o.type = "foo"; | 239 o.type = "foo"; |
225 } | 240 } |
226 buildCounterCommand--; | 241 buildCounterCommand--; |
227 return o; | 242 return o; |
228 } | 243 } |
229 | 244 |
230 checkCommand(api.Command o) { | 245 checkCommand(api.Command o) { |
231 buildCounterCommand++; | 246 buildCounterCommand++; |
232 if (buildCounterCommand < 3) { | 247 if (buildCounterCommand < 3) { |
233 unittest.expect(o.createTime, unittest.equals('foo')); | 248 unittest.expect(o.createTime, unittest.equals('foo')); |
234 unittest.expect(o.duration, unittest.equals('foo')); | 249 unittest.expect(o.duration, unittest.equals('foo')); |
235 unittest.expect(o.newPassword, unittest.equals('foo')); | 250 unittest.expect(o.newPassword, unittest.equals('foo')); |
236 checkUnnamed1563(o.resetPasswordFlags); | 251 checkUnnamed1558(o.resetPasswordFlags); |
237 unittest.expect(o.type, unittest.equals('foo')); | 252 unittest.expect(o.type, unittest.equals('foo')); |
238 } | 253 } |
239 buildCounterCommand--; | 254 buildCounterCommand--; |
240 } | 255 } |
241 | 256 |
242 core.int buildCounterComplianceRule = 0; | 257 core.int buildCounterComplianceRule = 0; |
243 buildComplianceRule() { | 258 buildComplianceRule() { |
244 var o = new api.ComplianceRule(); | 259 var o = new api.ComplianceRule(); |
245 buildCounterComplianceRule++; | 260 buildCounterComplianceRule++; |
246 if (buildCounterComplianceRule < 3) { | 261 if (buildCounterComplianceRule < 3) { |
247 o.apiLevelCondition = buildApiLevelCondition(); | 262 o.apiLevelCondition = buildApiLevelCondition(); |
248 o.disableApps = true; | 263 o.disableApps = true; |
249 o.nonComplianceDetailCondition = buildNonComplianceDetailCondition(); | 264 o.nonComplianceDetailCondition = buildNonComplianceDetailCondition(); |
250 } | 265 } |
251 buildCounterComplianceRule--; | 266 buildCounterComplianceRule--; |
252 return o; | 267 return o; |
253 } | 268 } |
254 | 269 |
255 checkComplianceRule(api.ComplianceRule o) { | 270 checkComplianceRule(api.ComplianceRule o) { |
256 buildCounterComplianceRule++; | 271 buildCounterComplianceRule++; |
257 if (buildCounterComplianceRule < 3) { | 272 if (buildCounterComplianceRule < 3) { |
258 checkApiLevelCondition(o.apiLevelCondition); | 273 checkApiLevelCondition(o.apiLevelCondition); |
259 unittest.expect(o.disableApps, unittest.isTrue); | 274 unittest.expect(o.disableApps, unittest.isTrue); |
260 checkNonComplianceDetailCondition(o.nonComplianceDetailCondition); | 275 checkNonComplianceDetailCondition(o.nonComplianceDetailCondition); |
261 } | 276 } |
262 buildCounterComplianceRule--; | 277 buildCounterComplianceRule--; |
263 } | 278 } |
264 | 279 |
265 buildUnnamed1564() { | 280 buildUnnamed1559() { |
266 var o = new core.List<api.Display>(); | 281 var o = new core.List<api.Display>(); |
267 o.add(buildDisplay()); | 282 o.add(buildDisplay()); |
268 o.add(buildDisplay()); | 283 o.add(buildDisplay()); |
269 return o; | 284 return o; |
270 } | 285 } |
271 | 286 |
272 checkUnnamed1564(core.List<api.Display> o) { | 287 checkUnnamed1559(core.List<api.Display> o) { |
273 unittest.expect(o, unittest.hasLength(2)); | 288 unittest.expect(o, unittest.hasLength(2)); |
274 checkDisplay(o[0]); | 289 checkDisplay(o[0]); |
275 checkDisplay(o[1]); | 290 checkDisplay(o[1]); |
276 } | 291 } |
277 | 292 |
278 buildUnnamed1565() { | 293 buildUnnamed1560() { |
279 var o = new core.List<api.HardwareStatus>(); | 294 var o = new core.List<api.HardwareStatus>(); |
280 o.add(buildHardwareStatus()); | 295 o.add(buildHardwareStatus()); |
281 o.add(buildHardwareStatus()); | 296 o.add(buildHardwareStatus()); |
282 return o; | 297 return o; |
283 } | 298 } |
284 | 299 |
285 checkUnnamed1565(core.List<api.HardwareStatus> o) { | 300 checkUnnamed1560(core.List<api.HardwareStatus> o) { |
286 unittest.expect(o, unittest.hasLength(2)); | 301 unittest.expect(o, unittest.hasLength(2)); |
287 checkHardwareStatus(o[0]); | 302 checkHardwareStatus(o[0]); |
288 checkHardwareStatus(o[1]); | 303 checkHardwareStatus(o[1]); |
289 } | 304 } |
290 | 305 |
291 buildUnnamed1566() { | 306 buildUnnamed1561() { |
292 var o = new core.List<api.MemoryEvent>(); | 307 var o = new core.List<api.MemoryEvent>(); |
293 o.add(buildMemoryEvent()); | 308 o.add(buildMemoryEvent()); |
294 o.add(buildMemoryEvent()); | 309 o.add(buildMemoryEvent()); |
295 return o; | 310 return o; |
296 } | 311 } |
297 | 312 |
298 checkUnnamed1566(core.List<api.MemoryEvent> o) { | 313 checkUnnamed1561(core.List<api.MemoryEvent> o) { |
299 unittest.expect(o, unittest.hasLength(2)); | 314 unittest.expect(o, unittest.hasLength(2)); |
300 checkMemoryEvent(o[0]); | 315 checkMemoryEvent(o[0]); |
301 checkMemoryEvent(o[1]); | 316 checkMemoryEvent(o[1]); |
302 } | 317 } |
303 | 318 |
304 buildUnnamed1567() { | 319 buildUnnamed1562() { |
305 var o = new core.List<api.NonComplianceDetail>(); | 320 var o = new core.List<api.NonComplianceDetail>(); |
306 o.add(buildNonComplianceDetail()); | 321 o.add(buildNonComplianceDetail()); |
307 o.add(buildNonComplianceDetail()); | 322 o.add(buildNonComplianceDetail()); |
308 return o; | 323 return o; |
309 } | 324 } |
310 | 325 |
311 checkUnnamed1567(core.List<api.NonComplianceDetail> o) { | 326 checkUnnamed1562(core.List<api.NonComplianceDetail> o) { |
312 unittest.expect(o, unittest.hasLength(2)); | 327 unittest.expect(o, unittest.hasLength(2)); |
313 checkNonComplianceDetail(o[0]); | 328 checkNonComplianceDetail(o[0]); |
314 checkNonComplianceDetail(o[1]); | 329 checkNonComplianceDetail(o[1]); |
315 } | 330 } |
316 | 331 |
317 buildUnnamed1568() { | 332 buildUnnamed1563() { |
318 var o = new core.List<api.PowerManagementEvent>(); | 333 var o = new core.List<api.PowerManagementEvent>(); |
319 o.add(buildPowerManagementEvent()); | 334 o.add(buildPowerManagementEvent()); |
320 o.add(buildPowerManagementEvent()); | 335 o.add(buildPowerManagementEvent()); |
321 return o; | 336 return o; |
322 } | 337 } |
323 | 338 |
324 checkUnnamed1568(core.List<api.PowerManagementEvent> o) { | 339 checkUnnamed1563(core.List<api.PowerManagementEvent> o) { |
325 unittest.expect(o, unittest.hasLength(2)); | 340 unittest.expect(o, unittest.hasLength(2)); |
326 checkPowerManagementEvent(o[0]); | 341 checkPowerManagementEvent(o[0]); |
327 checkPowerManagementEvent(o[1]); | 342 checkPowerManagementEvent(o[1]); |
328 } | 343 } |
329 | 344 |
330 buildUnnamed1569() { | 345 buildUnnamed1564() { |
331 var o = new core.List<core.String>(); | 346 var o = new core.List<core.String>(); |
332 o.add("foo"); | 347 o.add("foo"); |
333 o.add("foo"); | 348 o.add("foo"); |
334 return o; | 349 return o; |
335 } | 350 } |
336 | 351 |
337 checkUnnamed1569(core.List<core.String> o) { | 352 checkUnnamed1564(core.List<core.String> o) { |
338 unittest.expect(o, unittest.hasLength(2)); | 353 unittest.expect(o, unittest.hasLength(2)); |
339 unittest.expect(o[0], unittest.equals('foo')); | 354 unittest.expect(o[0], unittest.equals('foo')); |
340 unittest.expect(o[1], unittest.equals('foo')); | 355 unittest.expect(o[1], unittest.equals('foo')); |
341 } | 356 } |
342 | 357 |
343 core.int buildCounterDevice = 0; | 358 core.int buildCounterDevice = 0; |
344 buildDevice() { | 359 buildDevice() { |
345 var o = new api.Device(); | 360 var o = new api.Device(); |
346 buildCounterDevice++; | 361 buildCounterDevice++; |
347 if (buildCounterDevice < 3) { | 362 if (buildCounterDevice < 3) { |
348 o.apiLevel = 42; | 363 o.apiLevel = 42; |
349 o.appliedPolicyName = "foo"; | 364 o.appliedPolicyName = "foo"; |
350 o.appliedPolicyVersion = "foo"; | 365 o.appliedPolicyVersion = "foo"; |
351 o.appliedState = "foo"; | 366 o.appliedState = "foo"; |
352 o.disabledReason = buildUserFacingMessage(); | 367 o.disabledReason = buildUserFacingMessage(); |
353 o.displays = buildUnnamed1564(); | 368 o.displays = buildUnnamed1559(); |
354 o.enrollmentTime = "foo"; | 369 o.enrollmentTime = "foo"; |
355 o.enrollmentTokenData = "foo"; | 370 o.enrollmentTokenData = "foo"; |
356 o.enrollmentTokenName = "foo"; | 371 o.enrollmentTokenName = "foo"; |
357 o.hardwareInfo = buildHardwareInfo(); | 372 o.hardwareInfo = buildHardwareInfo(); |
358 o.hardwareStatusSamples = buildUnnamed1565(); | 373 o.hardwareStatusSamples = buildUnnamed1560(); |
359 o.lastPolicyComplianceReportTime = "foo"; | 374 o.lastPolicyComplianceReportTime = "foo"; |
360 o.lastPolicySyncTime = "foo"; | 375 o.lastPolicySyncTime = "foo"; |
361 o.lastStatusReportTime = "foo"; | 376 o.lastStatusReportTime = "foo"; |
362 o.memoryEvents = buildUnnamed1566(); | 377 o.memoryEvents = buildUnnamed1561(); |
363 o.memoryInfo = buildMemoryInfo(); | 378 o.memoryInfo = buildMemoryInfo(); |
364 o.name = "foo"; | 379 o.name = "foo"; |
365 o.networkInfo = buildNetworkInfo(); | 380 o.networkInfo = buildNetworkInfo(); |
366 o.nonComplianceDetails = buildUnnamed1567(); | 381 o.nonComplianceDetails = buildUnnamed1562(); |
367 o.policyCompliant = true; | 382 o.policyCompliant = true; |
368 o.policyName = "foo"; | 383 o.policyName = "foo"; |
369 o.powerManagementEvents = buildUnnamed1568(); | 384 o.powerManagementEvents = buildUnnamed1563(); |
370 o.previousDeviceNames = buildUnnamed1569(); | 385 o.previousDeviceNames = buildUnnamed1564(); |
371 o.softwareInfo = buildSoftwareInfo(); | 386 o.softwareInfo = buildSoftwareInfo(); |
372 o.state = "foo"; | 387 o.state = "foo"; |
373 o.userName = "foo"; | 388 o.userName = "foo"; |
374 } | 389 } |
375 buildCounterDevice--; | 390 buildCounterDevice--; |
376 return o; | 391 return o; |
377 } | 392 } |
378 | 393 |
379 checkDevice(api.Device o) { | 394 checkDevice(api.Device o) { |
380 buildCounterDevice++; | 395 buildCounterDevice++; |
381 if (buildCounterDevice < 3) { | 396 if (buildCounterDevice < 3) { |
382 unittest.expect(o.apiLevel, unittest.equals(42)); | 397 unittest.expect(o.apiLevel, unittest.equals(42)); |
383 unittest.expect(o.appliedPolicyName, unittest.equals('foo')); | 398 unittest.expect(o.appliedPolicyName, unittest.equals('foo')); |
384 unittest.expect(o.appliedPolicyVersion, unittest.equals('foo')); | 399 unittest.expect(o.appliedPolicyVersion, unittest.equals('foo')); |
385 unittest.expect(o.appliedState, unittest.equals('foo')); | 400 unittest.expect(o.appliedState, unittest.equals('foo')); |
386 checkUserFacingMessage(o.disabledReason); | 401 checkUserFacingMessage(o.disabledReason); |
387 checkUnnamed1564(o.displays); | 402 checkUnnamed1559(o.displays); |
388 unittest.expect(o.enrollmentTime, unittest.equals('foo')); | 403 unittest.expect(o.enrollmentTime, unittest.equals('foo')); |
389 unittest.expect(o.enrollmentTokenData, unittest.equals('foo')); | 404 unittest.expect(o.enrollmentTokenData, unittest.equals('foo')); |
390 unittest.expect(o.enrollmentTokenName, unittest.equals('foo')); | 405 unittest.expect(o.enrollmentTokenName, unittest.equals('foo')); |
391 checkHardwareInfo(o.hardwareInfo); | 406 checkHardwareInfo(o.hardwareInfo); |
392 checkUnnamed1565(o.hardwareStatusSamples); | 407 checkUnnamed1560(o.hardwareStatusSamples); |
393 unittest.expect(o.lastPolicyComplianceReportTime, unittest.equals('foo')); | 408 unittest.expect(o.lastPolicyComplianceReportTime, unittest.equals('foo')); |
394 unittest.expect(o.lastPolicySyncTime, unittest.equals('foo')); | 409 unittest.expect(o.lastPolicySyncTime, unittest.equals('foo')); |
395 unittest.expect(o.lastStatusReportTime, unittest.equals('foo')); | 410 unittest.expect(o.lastStatusReportTime, unittest.equals('foo')); |
396 checkUnnamed1566(o.memoryEvents); | 411 checkUnnamed1561(o.memoryEvents); |
397 checkMemoryInfo(o.memoryInfo); | 412 checkMemoryInfo(o.memoryInfo); |
398 unittest.expect(o.name, unittest.equals('foo')); | 413 unittest.expect(o.name, unittest.equals('foo')); |
399 checkNetworkInfo(o.networkInfo); | 414 checkNetworkInfo(o.networkInfo); |
400 checkUnnamed1567(o.nonComplianceDetails); | 415 checkUnnamed1562(o.nonComplianceDetails); |
401 unittest.expect(o.policyCompliant, unittest.isTrue); | 416 unittest.expect(o.policyCompliant, unittest.isTrue); |
402 unittest.expect(o.policyName, unittest.equals('foo')); | 417 unittest.expect(o.policyName, unittest.equals('foo')); |
403 checkUnnamed1568(o.powerManagementEvents); | 418 checkUnnamed1563(o.powerManagementEvents); |
404 checkUnnamed1569(o.previousDeviceNames); | 419 checkUnnamed1564(o.previousDeviceNames); |
405 checkSoftwareInfo(o.softwareInfo); | 420 checkSoftwareInfo(o.softwareInfo); |
406 unittest.expect(o.state, unittest.equals('foo')); | 421 unittest.expect(o.state, unittest.equals('foo')); |
407 unittest.expect(o.userName, unittest.equals('foo')); | 422 unittest.expect(o.userName, unittest.equals('foo')); |
408 } | 423 } |
409 buildCounterDevice--; | 424 buildCounterDevice--; |
410 } | 425 } |
411 | 426 |
412 core.int buildCounterDisplay = 0; | 427 core.int buildCounterDisplay = 0; |
413 buildDisplay() { | 428 buildDisplay() { |
414 var o = new api.Display(); | 429 var o = new api.Display(); |
(...skipping 22 matching lines...) Expand all Loading... |
437 unittest.expect(o.state, unittest.equals('foo')); | 452 unittest.expect(o.state, unittest.equals('foo')); |
438 unittest.expect(o.width, unittest.equals(42)); | 453 unittest.expect(o.width, unittest.equals(42)); |
439 } | 454 } |
440 buildCounterDisplay--; | 455 buildCounterDisplay--; |
441 } | 456 } |
442 | 457 |
443 core.int buildCounterEmpty = 0; | 458 core.int buildCounterEmpty = 0; |
444 buildEmpty() { | 459 buildEmpty() { |
445 var o = new api.Empty(); | 460 var o = new api.Empty(); |
446 buildCounterEmpty++; | 461 buildCounterEmpty++; |
447 if (buildCounterEmpty < 3) { | 462 if (buildCounterEmpty < 3) {} |
448 } | |
449 buildCounterEmpty--; | 463 buildCounterEmpty--; |
450 return o; | 464 return o; |
451 } | 465 } |
452 | 466 |
453 checkEmpty(api.Empty o) { | 467 checkEmpty(api.Empty o) { |
454 buildCounterEmpty++; | 468 buildCounterEmpty++; |
455 if (buildCounterEmpty < 3) { | 469 if (buildCounterEmpty < 3) {} |
456 } | |
457 buildCounterEmpty--; | 470 buildCounterEmpty--; |
458 } | 471 } |
459 | 472 |
460 core.int buildCounterEnrollmentToken = 0; | 473 core.int buildCounterEnrollmentToken = 0; |
461 buildEnrollmentToken() { | 474 buildEnrollmentToken() { |
462 var o = new api.EnrollmentToken(); | 475 var o = new api.EnrollmentToken(); |
463 buildCounterEnrollmentToken++; | 476 buildCounterEnrollmentToken++; |
464 if (buildCounterEnrollmentToken < 3) { | 477 if (buildCounterEnrollmentToken < 3) { |
465 o.additionalData = "foo"; | 478 o.additionalData = "foo"; |
466 o.duration = "foo"; | 479 o.duration = "foo"; |
(...skipping 14 matching lines...) Expand all Loading... |
481 unittest.expect(o.duration, unittest.equals('foo')); | 494 unittest.expect(o.duration, unittest.equals('foo')); |
482 unittest.expect(o.expirationTimestamp, unittest.equals('foo')); | 495 unittest.expect(o.expirationTimestamp, unittest.equals('foo')); |
483 unittest.expect(o.name, unittest.equals('foo')); | 496 unittest.expect(o.name, unittest.equals('foo')); |
484 unittest.expect(o.policyName, unittest.equals('foo')); | 497 unittest.expect(o.policyName, unittest.equals('foo')); |
485 unittest.expect(o.qrCode, unittest.equals('foo')); | 498 unittest.expect(o.qrCode, unittest.equals('foo')); |
486 unittest.expect(o.value, unittest.equals('foo')); | 499 unittest.expect(o.value, unittest.equals('foo')); |
487 } | 500 } |
488 buildCounterEnrollmentToken--; | 501 buildCounterEnrollmentToken--; |
489 } | 502 } |
490 | 503 |
491 buildUnnamed1570() { | 504 buildUnnamed1565() { |
492 var o = new core.List<core.String>(); | 505 var o = new core.List<core.String>(); |
493 o.add("foo"); | 506 o.add("foo"); |
494 o.add("foo"); | 507 o.add("foo"); |
495 return o; | 508 return o; |
496 } | 509 } |
497 | 510 |
498 checkUnnamed1570(core.List<core.String> o) { | 511 checkUnnamed1565(core.List<core.String> o) { |
499 unittest.expect(o, unittest.hasLength(2)); | 512 unittest.expect(o, unittest.hasLength(2)); |
500 unittest.expect(o[0], unittest.equals('foo')); | 513 unittest.expect(o[0], unittest.equals('foo')); |
501 unittest.expect(o[1], unittest.equals('foo')); | 514 unittest.expect(o[1], unittest.equals('foo')); |
502 } | 515 } |
503 | 516 |
504 core.int buildCounterEnterprise = 0; | 517 core.int buildCounterEnterprise = 0; |
505 buildEnterprise() { | 518 buildEnterprise() { |
506 var o = new api.Enterprise(); | 519 var o = new api.Enterprise(); |
507 buildCounterEnterprise++; | 520 buildCounterEnterprise++; |
508 if (buildCounterEnterprise < 3) { | 521 if (buildCounterEnterprise < 3) { |
509 o.appAutoApprovalEnabled = true; | 522 o.appAutoApprovalEnabled = true; |
510 o.enabledNotificationTypes = buildUnnamed1570(); | 523 o.enabledNotificationTypes = buildUnnamed1565(); |
511 o.enterpriseDisplayName = "foo"; | 524 o.enterpriseDisplayName = "foo"; |
512 o.logo = buildExternalData(); | 525 o.logo = buildExternalData(); |
513 o.name = "foo"; | 526 o.name = "foo"; |
514 o.primaryColor = 42; | 527 o.primaryColor = 42; |
515 o.pubsubTopic = "foo"; | 528 o.pubsubTopic = "foo"; |
516 } | 529 } |
517 buildCounterEnterprise--; | 530 buildCounterEnterprise--; |
518 return o; | 531 return o; |
519 } | 532 } |
520 | 533 |
521 checkEnterprise(api.Enterprise o) { | 534 checkEnterprise(api.Enterprise o) { |
522 buildCounterEnterprise++; | 535 buildCounterEnterprise++; |
523 if (buildCounterEnterprise < 3) { | 536 if (buildCounterEnterprise < 3) { |
524 unittest.expect(o.appAutoApprovalEnabled, unittest.isTrue); | 537 unittest.expect(o.appAutoApprovalEnabled, unittest.isTrue); |
525 checkUnnamed1570(o.enabledNotificationTypes); | 538 checkUnnamed1565(o.enabledNotificationTypes); |
526 unittest.expect(o.enterpriseDisplayName, unittest.equals('foo')); | 539 unittest.expect(o.enterpriseDisplayName, unittest.equals('foo')); |
527 checkExternalData(o.logo); | 540 checkExternalData(o.logo); |
528 unittest.expect(o.name, unittest.equals('foo')); | 541 unittest.expect(o.name, unittest.equals('foo')); |
529 unittest.expect(o.primaryColor, unittest.equals(42)); | 542 unittest.expect(o.primaryColor, unittest.equals(42)); |
530 unittest.expect(o.pubsubTopic, unittest.equals('foo')); | 543 unittest.expect(o.pubsubTopic, unittest.equals('foo')); |
531 } | 544 } |
532 buildCounterEnterprise--; | 545 buildCounterEnterprise--; |
533 } | 546 } |
534 | 547 |
535 core.int buildCounterExternalData = 0; | 548 core.int buildCounterExternalData = 0; |
(...skipping 10 matching lines...) Expand all Loading... |
546 | 559 |
547 checkExternalData(api.ExternalData o) { | 560 checkExternalData(api.ExternalData o) { |
548 buildCounterExternalData++; | 561 buildCounterExternalData++; |
549 if (buildCounterExternalData < 3) { | 562 if (buildCounterExternalData < 3) { |
550 unittest.expect(o.sha256Hash, unittest.equals('foo')); | 563 unittest.expect(o.sha256Hash, unittest.equals('foo')); |
551 unittest.expect(o.url, unittest.equals('foo')); | 564 unittest.expect(o.url, unittest.equals('foo')); |
552 } | 565 } |
553 buildCounterExternalData--; | 566 buildCounterExternalData--; |
554 } | 567 } |
555 | 568 |
| 569 buildUnnamed1566() { |
| 570 var o = new core.List<core.double>(); |
| 571 o.add(42.0); |
| 572 o.add(42.0); |
| 573 return o; |
| 574 } |
| 575 |
| 576 checkUnnamed1566(core.List<core.double> o) { |
| 577 unittest.expect(o, unittest.hasLength(2)); |
| 578 unittest.expect(o[0], unittest.equals(42.0)); |
| 579 unittest.expect(o[1], unittest.equals(42.0)); |
| 580 } |
| 581 |
| 582 buildUnnamed1567() { |
| 583 var o = new core.List<core.double>(); |
| 584 o.add(42.0); |
| 585 o.add(42.0); |
| 586 return o; |
| 587 } |
| 588 |
| 589 checkUnnamed1567(core.List<core.double> o) { |
| 590 unittest.expect(o, unittest.hasLength(2)); |
| 591 unittest.expect(o[0], unittest.equals(42.0)); |
| 592 unittest.expect(o[1], unittest.equals(42.0)); |
| 593 } |
| 594 |
| 595 buildUnnamed1568() { |
| 596 var o = new core.List<core.double>(); |
| 597 o.add(42.0); |
| 598 o.add(42.0); |
| 599 return o; |
| 600 } |
| 601 |
| 602 checkUnnamed1568(core.List<core.double> o) { |
| 603 unittest.expect(o, unittest.hasLength(2)); |
| 604 unittest.expect(o[0], unittest.equals(42.0)); |
| 605 unittest.expect(o[1], unittest.equals(42.0)); |
| 606 } |
| 607 |
| 608 buildUnnamed1569() { |
| 609 var o = new core.List<core.double>(); |
| 610 o.add(42.0); |
| 611 o.add(42.0); |
| 612 return o; |
| 613 } |
| 614 |
| 615 checkUnnamed1569(core.List<core.double> o) { |
| 616 unittest.expect(o, unittest.hasLength(2)); |
| 617 unittest.expect(o[0], unittest.equals(42.0)); |
| 618 unittest.expect(o[1], unittest.equals(42.0)); |
| 619 } |
| 620 |
| 621 buildUnnamed1570() { |
| 622 var o = new core.List<core.double>(); |
| 623 o.add(42.0); |
| 624 o.add(42.0); |
| 625 return o; |
| 626 } |
| 627 |
| 628 checkUnnamed1570(core.List<core.double> o) { |
| 629 unittest.expect(o, unittest.hasLength(2)); |
| 630 unittest.expect(o[0], unittest.equals(42.0)); |
| 631 unittest.expect(o[1], unittest.equals(42.0)); |
| 632 } |
| 633 |
556 buildUnnamed1571() { | 634 buildUnnamed1571() { |
557 var o = new core.List<core.double>(); | 635 var o = new core.List<core.double>(); |
558 o.add(42.0); | 636 o.add(42.0); |
559 o.add(42.0); | 637 o.add(42.0); |
560 return o; | 638 return o; |
561 } | 639 } |
562 | 640 |
563 checkUnnamed1571(core.List<core.double> o) { | 641 checkUnnamed1571(core.List<core.double> o) { |
564 unittest.expect(o, unittest.hasLength(2)); | 642 unittest.expect(o, unittest.hasLength(2)); |
565 unittest.expect(o[0], unittest.equals(42.0)); | 643 unittest.expect(o[0], unittest.equals(42.0)); |
(...skipping 17 matching lines...) Expand all Loading... |
583 var o = new core.List<core.double>(); | 661 var o = new core.List<core.double>(); |
584 o.add(42.0); | 662 o.add(42.0); |
585 o.add(42.0); | 663 o.add(42.0); |
586 return o; | 664 return o; |
587 } | 665 } |
588 | 666 |
589 checkUnnamed1573(core.List<core.double> o) { | 667 checkUnnamed1573(core.List<core.double> o) { |
590 unittest.expect(o, unittest.hasLength(2)); | 668 unittest.expect(o, unittest.hasLength(2)); |
591 unittest.expect(o[0], unittest.equals(42.0)); | 669 unittest.expect(o[0], unittest.equals(42.0)); |
592 unittest.expect(o[1], unittest.equals(42.0)); | 670 unittest.expect(o[1], unittest.equals(42.0)); |
593 } | |
594 | |
595 buildUnnamed1574() { | |
596 var o = new core.List<core.double>(); | |
597 o.add(42.0); | |
598 o.add(42.0); | |
599 return o; | |
600 } | |
601 | |
602 checkUnnamed1574(core.List<core.double> o) { | |
603 unittest.expect(o, unittest.hasLength(2)); | |
604 unittest.expect(o[0], unittest.equals(42.0)); | |
605 unittest.expect(o[1], unittest.equals(42.0)); | |
606 } | |
607 | |
608 buildUnnamed1575() { | |
609 var o = new core.List<core.double>(); | |
610 o.add(42.0); | |
611 o.add(42.0); | |
612 return o; | |
613 } | |
614 | |
615 checkUnnamed1575(core.List<core.double> o) { | |
616 unittest.expect(o, unittest.hasLength(2)); | |
617 unittest.expect(o[0], unittest.equals(42.0)); | |
618 unittest.expect(o[1], unittest.equals(42.0)); | |
619 } | |
620 | |
621 buildUnnamed1576() { | |
622 var o = new core.List<core.double>(); | |
623 o.add(42.0); | |
624 o.add(42.0); | |
625 return o; | |
626 } | |
627 | |
628 checkUnnamed1576(core.List<core.double> o) { | |
629 unittest.expect(o, unittest.hasLength(2)); | |
630 unittest.expect(o[0], unittest.equals(42.0)); | |
631 unittest.expect(o[1], unittest.equals(42.0)); | |
632 } | |
633 | |
634 buildUnnamed1577() { | |
635 var o = new core.List<core.double>(); | |
636 o.add(42.0); | |
637 o.add(42.0); | |
638 return o; | |
639 } | |
640 | |
641 checkUnnamed1577(core.List<core.double> o) { | |
642 unittest.expect(o, unittest.hasLength(2)); | |
643 unittest.expect(o[0], unittest.equals(42.0)); | |
644 unittest.expect(o[1], unittest.equals(42.0)); | |
645 } | |
646 | |
647 buildUnnamed1578() { | |
648 var o = new core.List<core.double>(); | |
649 o.add(42.0); | |
650 o.add(42.0); | |
651 return o; | |
652 } | |
653 | |
654 checkUnnamed1578(core.List<core.double> o) { | |
655 unittest.expect(o, unittest.hasLength(2)); | |
656 unittest.expect(o[0], unittest.equals(42.0)); | |
657 unittest.expect(o[1], unittest.equals(42.0)); | |
658 } | 671 } |
659 | 672 |
660 core.int buildCounterHardwareInfo = 0; | 673 core.int buildCounterHardwareInfo = 0; |
661 buildHardwareInfo() { | 674 buildHardwareInfo() { |
662 var o = new api.HardwareInfo(); | 675 var o = new api.HardwareInfo(); |
663 buildCounterHardwareInfo++; | 676 buildCounterHardwareInfo++; |
664 if (buildCounterHardwareInfo < 3) { | 677 if (buildCounterHardwareInfo < 3) { |
665 o.batteryShutdownTemperatures = buildUnnamed1571(); | 678 o.batteryShutdownTemperatures = buildUnnamed1566(); |
666 o.batteryThrottlingTemperatures = buildUnnamed1572(); | 679 o.batteryThrottlingTemperatures = buildUnnamed1567(); |
667 o.brand = "foo"; | 680 o.brand = "foo"; |
668 o.cpuShutdownTemperatures = buildUnnamed1573(); | 681 o.cpuShutdownTemperatures = buildUnnamed1568(); |
669 o.cpuThrottlingTemperatures = buildUnnamed1574(); | 682 o.cpuThrottlingTemperatures = buildUnnamed1569(); |
670 o.deviceBasebandVersion = "foo"; | 683 o.deviceBasebandVersion = "foo"; |
671 o.gpuShutdownTemperatures = buildUnnamed1575(); | 684 o.gpuShutdownTemperatures = buildUnnamed1570(); |
672 o.gpuThrottlingTemperatures = buildUnnamed1576(); | 685 o.gpuThrottlingTemperatures = buildUnnamed1571(); |
673 o.hardware = "foo"; | 686 o.hardware = "foo"; |
674 o.manufacturer = "foo"; | 687 o.manufacturer = "foo"; |
675 o.model = "foo"; | 688 o.model = "foo"; |
676 o.serialNumber = "foo"; | 689 o.serialNumber = "foo"; |
677 o.skinShutdownTemperatures = buildUnnamed1577(); | 690 o.skinShutdownTemperatures = buildUnnamed1572(); |
678 o.skinThrottlingTemperatures = buildUnnamed1578(); | 691 o.skinThrottlingTemperatures = buildUnnamed1573(); |
679 } | 692 } |
680 buildCounterHardwareInfo--; | 693 buildCounterHardwareInfo--; |
681 return o; | 694 return o; |
682 } | 695 } |
683 | 696 |
684 checkHardwareInfo(api.HardwareInfo o) { | 697 checkHardwareInfo(api.HardwareInfo o) { |
685 buildCounterHardwareInfo++; | 698 buildCounterHardwareInfo++; |
686 if (buildCounterHardwareInfo < 3) { | 699 if (buildCounterHardwareInfo < 3) { |
687 checkUnnamed1571(o.batteryShutdownTemperatures); | 700 checkUnnamed1566(o.batteryShutdownTemperatures); |
688 checkUnnamed1572(o.batteryThrottlingTemperatures); | 701 checkUnnamed1567(o.batteryThrottlingTemperatures); |
689 unittest.expect(o.brand, unittest.equals('foo')); | 702 unittest.expect(o.brand, unittest.equals('foo')); |
690 checkUnnamed1573(o.cpuShutdownTemperatures); | 703 checkUnnamed1568(o.cpuShutdownTemperatures); |
691 checkUnnamed1574(o.cpuThrottlingTemperatures); | 704 checkUnnamed1569(o.cpuThrottlingTemperatures); |
692 unittest.expect(o.deviceBasebandVersion, unittest.equals('foo')); | 705 unittest.expect(o.deviceBasebandVersion, unittest.equals('foo')); |
693 checkUnnamed1575(o.gpuShutdownTemperatures); | 706 checkUnnamed1570(o.gpuShutdownTemperatures); |
694 checkUnnamed1576(o.gpuThrottlingTemperatures); | 707 checkUnnamed1571(o.gpuThrottlingTemperatures); |
695 unittest.expect(o.hardware, unittest.equals('foo')); | 708 unittest.expect(o.hardware, unittest.equals('foo')); |
696 unittest.expect(o.manufacturer, unittest.equals('foo')); | 709 unittest.expect(o.manufacturer, unittest.equals('foo')); |
697 unittest.expect(o.model, unittest.equals('foo')); | 710 unittest.expect(o.model, unittest.equals('foo')); |
698 unittest.expect(o.serialNumber, unittest.equals('foo')); | 711 unittest.expect(o.serialNumber, unittest.equals('foo')); |
699 checkUnnamed1577(o.skinShutdownTemperatures); | 712 checkUnnamed1572(o.skinShutdownTemperatures); |
700 checkUnnamed1578(o.skinThrottlingTemperatures); | 713 checkUnnamed1573(o.skinThrottlingTemperatures); |
701 } | 714 } |
702 buildCounterHardwareInfo--; | 715 buildCounterHardwareInfo--; |
703 } | 716 } |
704 | 717 |
| 718 buildUnnamed1574() { |
| 719 var o = new core.List<core.double>(); |
| 720 o.add(42.0); |
| 721 o.add(42.0); |
| 722 return o; |
| 723 } |
| 724 |
| 725 checkUnnamed1574(core.List<core.double> o) { |
| 726 unittest.expect(o, unittest.hasLength(2)); |
| 727 unittest.expect(o[0], unittest.equals(42.0)); |
| 728 unittest.expect(o[1], unittest.equals(42.0)); |
| 729 } |
| 730 |
| 731 buildUnnamed1575() { |
| 732 var o = new core.List<core.double>(); |
| 733 o.add(42.0); |
| 734 o.add(42.0); |
| 735 return o; |
| 736 } |
| 737 |
| 738 checkUnnamed1575(core.List<core.double> o) { |
| 739 unittest.expect(o, unittest.hasLength(2)); |
| 740 unittest.expect(o[0], unittest.equals(42.0)); |
| 741 unittest.expect(o[1], unittest.equals(42.0)); |
| 742 } |
| 743 |
| 744 buildUnnamed1576() { |
| 745 var o = new core.List<core.double>(); |
| 746 o.add(42.0); |
| 747 o.add(42.0); |
| 748 return o; |
| 749 } |
| 750 |
| 751 checkUnnamed1576(core.List<core.double> o) { |
| 752 unittest.expect(o, unittest.hasLength(2)); |
| 753 unittest.expect(o[0], unittest.equals(42.0)); |
| 754 unittest.expect(o[1], unittest.equals(42.0)); |
| 755 } |
| 756 |
| 757 buildUnnamed1577() { |
| 758 var o = new core.List<core.double>(); |
| 759 o.add(42.0); |
| 760 o.add(42.0); |
| 761 return o; |
| 762 } |
| 763 |
| 764 checkUnnamed1577(core.List<core.double> o) { |
| 765 unittest.expect(o, unittest.hasLength(2)); |
| 766 unittest.expect(o[0], unittest.equals(42.0)); |
| 767 unittest.expect(o[1], unittest.equals(42.0)); |
| 768 } |
| 769 |
| 770 buildUnnamed1578() { |
| 771 var o = new core.List<core.double>(); |
| 772 o.add(42.0); |
| 773 o.add(42.0); |
| 774 return o; |
| 775 } |
| 776 |
| 777 checkUnnamed1578(core.List<core.double> o) { |
| 778 unittest.expect(o, unittest.hasLength(2)); |
| 779 unittest.expect(o[0], unittest.equals(42.0)); |
| 780 unittest.expect(o[1], unittest.equals(42.0)); |
| 781 } |
| 782 |
705 buildUnnamed1579() { | 783 buildUnnamed1579() { |
706 var o = new core.List<core.double>(); | 784 var o = new core.List<core.double>(); |
707 o.add(42.0); | 785 o.add(42.0); |
708 o.add(42.0); | 786 o.add(42.0); |
709 return o; | 787 return o; |
710 } | 788 } |
711 | 789 |
712 checkUnnamed1579(core.List<core.double> o) { | 790 checkUnnamed1579(core.List<core.double> o) { |
713 unittest.expect(o, unittest.hasLength(2)); | 791 unittest.expect(o, unittest.hasLength(2)); |
714 unittest.expect(o[0], unittest.equals(42.0)); | 792 unittest.expect(o[0], unittest.equals(42.0)); |
715 unittest.expect(o[1], unittest.equals(42.0)); | 793 unittest.expect(o[1], unittest.equals(42.0)); |
716 } | |
717 | |
718 buildUnnamed1580() { | |
719 var o = new core.List<core.double>(); | |
720 o.add(42.0); | |
721 o.add(42.0); | |
722 return o; | |
723 } | |
724 | |
725 checkUnnamed1580(core.List<core.double> o) { | |
726 unittest.expect(o, unittest.hasLength(2)); | |
727 unittest.expect(o[0], unittest.equals(42.0)); | |
728 unittest.expect(o[1], unittest.equals(42.0)); | |
729 } | |
730 | |
731 buildUnnamed1581() { | |
732 var o = new core.List<core.double>(); | |
733 o.add(42.0); | |
734 o.add(42.0); | |
735 return o; | |
736 } | |
737 | |
738 checkUnnamed1581(core.List<core.double> o) { | |
739 unittest.expect(o, unittest.hasLength(2)); | |
740 unittest.expect(o[0], unittest.equals(42.0)); | |
741 unittest.expect(o[1], unittest.equals(42.0)); | |
742 } | |
743 | |
744 buildUnnamed1582() { | |
745 var o = new core.List<core.double>(); | |
746 o.add(42.0); | |
747 o.add(42.0); | |
748 return o; | |
749 } | |
750 | |
751 checkUnnamed1582(core.List<core.double> o) { | |
752 unittest.expect(o, unittest.hasLength(2)); | |
753 unittest.expect(o[0], unittest.equals(42.0)); | |
754 unittest.expect(o[1], unittest.equals(42.0)); | |
755 } | |
756 | |
757 buildUnnamed1583() { | |
758 var o = new core.List<core.double>(); | |
759 o.add(42.0); | |
760 o.add(42.0); | |
761 return o; | |
762 } | |
763 | |
764 checkUnnamed1583(core.List<core.double> o) { | |
765 unittest.expect(o, unittest.hasLength(2)); | |
766 unittest.expect(o[0], unittest.equals(42.0)); | |
767 unittest.expect(o[1], unittest.equals(42.0)); | |
768 } | |
769 | |
770 buildUnnamed1584() { | |
771 var o = new core.List<core.double>(); | |
772 o.add(42.0); | |
773 o.add(42.0); | |
774 return o; | |
775 } | |
776 | |
777 checkUnnamed1584(core.List<core.double> o) { | |
778 unittest.expect(o, unittest.hasLength(2)); | |
779 unittest.expect(o[0], unittest.equals(42.0)); | |
780 unittest.expect(o[1], unittest.equals(42.0)); | |
781 } | 794 } |
782 | 795 |
783 core.int buildCounterHardwareStatus = 0; | 796 core.int buildCounterHardwareStatus = 0; |
784 buildHardwareStatus() { | 797 buildHardwareStatus() { |
785 var o = new api.HardwareStatus(); | 798 var o = new api.HardwareStatus(); |
786 buildCounterHardwareStatus++; | 799 buildCounterHardwareStatus++; |
787 if (buildCounterHardwareStatus < 3) { | 800 if (buildCounterHardwareStatus < 3) { |
788 o.batteryTemperatures = buildUnnamed1579(); | 801 o.batteryTemperatures = buildUnnamed1574(); |
789 o.cpuTemperatures = buildUnnamed1580(); | 802 o.cpuTemperatures = buildUnnamed1575(); |
790 o.cpuUsages = buildUnnamed1581(); | 803 o.cpuUsages = buildUnnamed1576(); |
791 o.createTime = "foo"; | 804 o.createTime = "foo"; |
792 o.fanSpeeds = buildUnnamed1582(); | 805 o.fanSpeeds = buildUnnamed1577(); |
793 o.gpuTemperatures = buildUnnamed1583(); | 806 o.gpuTemperatures = buildUnnamed1578(); |
794 o.skinTemperatures = buildUnnamed1584(); | 807 o.skinTemperatures = buildUnnamed1579(); |
795 } | 808 } |
796 buildCounterHardwareStatus--; | 809 buildCounterHardwareStatus--; |
797 return o; | 810 return o; |
798 } | 811 } |
799 | 812 |
800 checkHardwareStatus(api.HardwareStatus o) { | 813 checkHardwareStatus(api.HardwareStatus o) { |
801 buildCounterHardwareStatus++; | 814 buildCounterHardwareStatus++; |
802 if (buildCounterHardwareStatus < 3) { | 815 if (buildCounterHardwareStatus < 3) { |
803 checkUnnamed1579(o.batteryTemperatures); | 816 checkUnnamed1574(o.batteryTemperatures); |
804 checkUnnamed1580(o.cpuTemperatures); | 817 checkUnnamed1575(o.cpuTemperatures); |
805 checkUnnamed1581(o.cpuUsages); | 818 checkUnnamed1576(o.cpuUsages); |
806 unittest.expect(o.createTime, unittest.equals('foo')); | 819 unittest.expect(o.createTime, unittest.equals('foo')); |
807 checkUnnamed1582(o.fanSpeeds); | 820 checkUnnamed1577(o.fanSpeeds); |
808 checkUnnamed1583(o.gpuTemperatures); | 821 checkUnnamed1578(o.gpuTemperatures); |
809 checkUnnamed1584(o.skinTemperatures); | 822 checkUnnamed1579(o.skinTemperatures); |
810 } | 823 } |
811 buildCounterHardwareStatus--; | 824 buildCounterHardwareStatus--; |
812 } | 825 } |
813 | 826 |
814 buildUnnamed1585() { | 827 buildUnnamed1580() { |
815 var o = new core.List<api.Device>(); | 828 var o = new core.List<api.Device>(); |
816 o.add(buildDevice()); | 829 o.add(buildDevice()); |
817 o.add(buildDevice()); | 830 o.add(buildDevice()); |
818 return o; | 831 return o; |
819 } | 832 } |
820 | 833 |
821 checkUnnamed1585(core.List<api.Device> o) { | 834 checkUnnamed1580(core.List<api.Device> o) { |
822 unittest.expect(o, unittest.hasLength(2)); | 835 unittest.expect(o, unittest.hasLength(2)); |
823 checkDevice(o[0]); | 836 checkDevice(o[0]); |
824 checkDevice(o[1]); | 837 checkDevice(o[1]); |
825 } | 838 } |
826 | 839 |
827 core.int buildCounterListDevicesResponse = 0; | 840 core.int buildCounterListDevicesResponse = 0; |
828 buildListDevicesResponse() { | 841 buildListDevicesResponse() { |
829 var o = new api.ListDevicesResponse(); | 842 var o = new api.ListDevicesResponse(); |
830 buildCounterListDevicesResponse++; | 843 buildCounterListDevicesResponse++; |
831 if (buildCounterListDevicesResponse < 3) { | 844 if (buildCounterListDevicesResponse < 3) { |
832 o.devices = buildUnnamed1585(); | 845 o.devices = buildUnnamed1580(); |
833 o.nextPageToken = "foo"; | 846 o.nextPageToken = "foo"; |
834 } | 847 } |
835 buildCounterListDevicesResponse--; | 848 buildCounterListDevicesResponse--; |
836 return o; | 849 return o; |
837 } | 850 } |
838 | 851 |
839 checkListDevicesResponse(api.ListDevicesResponse o) { | 852 checkListDevicesResponse(api.ListDevicesResponse o) { |
840 buildCounterListDevicesResponse++; | 853 buildCounterListDevicesResponse++; |
841 if (buildCounterListDevicesResponse < 3) { | 854 if (buildCounterListDevicesResponse < 3) { |
842 checkUnnamed1585(o.devices); | 855 checkUnnamed1580(o.devices); |
843 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 856 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
844 } | 857 } |
845 buildCounterListDevicesResponse--; | 858 buildCounterListDevicesResponse--; |
846 } | 859 } |
847 | 860 |
848 buildUnnamed1586() { | 861 buildUnnamed1581() { |
849 var o = new core.List<api.Operation>(); | 862 var o = new core.List<api.Operation>(); |
850 o.add(buildOperation()); | 863 o.add(buildOperation()); |
851 o.add(buildOperation()); | 864 o.add(buildOperation()); |
852 return o; | 865 return o; |
853 } | 866 } |
854 | 867 |
855 checkUnnamed1586(core.List<api.Operation> o) { | 868 checkUnnamed1581(core.List<api.Operation> o) { |
856 unittest.expect(o, unittest.hasLength(2)); | 869 unittest.expect(o, unittest.hasLength(2)); |
857 checkOperation(o[0]); | 870 checkOperation(o[0]); |
858 checkOperation(o[1]); | 871 checkOperation(o[1]); |
859 } | 872 } |
860 | 873 |
861 core.int buildCounterListOperationsResponse = 0; | 874 core.int buildCounterListOperationsResponse = 0; |
862 buildListOperationsResponse() { | 875 buildListOperationsResponse() { |
863 var o = new api.ListOperationsResponse(); | 876 var o = new api.ListOperationsResponse(); |
864 buildCounterListOperationsResponse++; | 877 buildCounterListOperationsResponse++; |
865 if (buildCounterListOperationsResponse < 3) { | 878 if (buildCounterListOperationsResponse < 3) { |
866 o.nextPageToken = "foo"; | 879 o.nextPageToken = "foo"; |
867 o.operations = buildUnnamed1586(); | 880 o.operations = buildUnnamed1581(); |
868 } | 881 } |
869 buildCounterListOperationsResponse--; | 882 buildCounterListOperationsResponse--; |
870 return o; | 883 return o; |
871 } | 884 } |
872 | 885 |
873 checkListOperationsResponse(api.ListOperationsResponse o) { | 886 checkListOperationsResponse(api.ListOperationsResponse o) { |
874 buildCounterListOperationsResponse++; | 887 buildCounterListOperationsResponse++; |
875 if (buildCounterListOperationsResponse < 3) { | 888 if (buildCounterListOperationsResponse < 3) { |
876 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 889 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
877 checkUnnamed1586(o.operations); | 890 checkUnnamed1581(o.operations); |
878 } | 891 } |
879 buildCounterListOperationsResponse--; | 892 buildCounterListOperationsResponse--; |
880 } | 893 } |
881 | 894 |
882 buildUnnamed1587() { | 895 buildUnnamed1582() { |
883 var o = new core.List<api.Policy>(); | 896 var o = new core.List<api.Policy>(); |
884 o.add(buildPolicy()); | 897 o.add(buildPolicy()); |
885 o.add(buildPolicy()); | 898 o.add(buildPolicy()); |
886 return o; | 899 return o; |
887 } | 900 } |
888 | 901 |
889 checkUnnamed1587(core.List<api.Policy> o) { | 902 checkUnnamed1582(core.List<api.Policy> o) { |
890 unittest.expect(o, unittest.hasLength(2)); | 903 unittest.expect(o, unittest.hasLength(2)); |
891 checkPolicy(o[0]); | 904 checkPolicy(o[0]); |
892 checkPolicy(o[1]); | 905 checkPolicy(o[1]); |
893 } | 906 } |
894 | 907 |
895 core.int buildCounterListPoliciesResponse = 0; | 908 core.int buildCounterListPoliciesResponse = 0; |
896 buildListPoliciesResponse() { | 909 buildListPoliciesResponse() { |
897 var o = new api.ListPoliciesResponse(); | 910 var o = new api.ListPoliciesResponse(); |
898 buildCounterListPoliciesResponse++; | 911 buildCounterListPoliciesResponse++; |
899 if (buildCounterListPoliciesResponse < 3) { | 912 if (buildCounterListPoliciesResponse < 3) { |
900 o.nextPageToken = "foo"; | 913 o.nextPageToken = "foo"; |
901 o.policies = buildUnnamed1587(); | 914 o.policies = buildUnnamed1582(); |
902 } | 915 } |
903 buildCounterListPoliciesResponse--; | 916 buildCounterListPoliciesResponse--; |
904 return o; | 917 return o; |
905 } | 918 } |
906 | 919 |
907 checkListPoliciesResponse(api.ListPoliciesResponse o) { | 920 checkListPoliciesResponse(api.ListPoliciesResponse o) { |
908 buildCounterListPoliciesResponse++; | 921 buildCounterListPoliciesResponse++; |
909 if (buildCounterListPoliciesResponse < 3) { | 922 if (buildCounterListPoliciesResponse < 3) { |
910 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 923 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
911 checkUnnamed1587(o.policies); | 924 checkUnnamed1582(o.policies); |
912 } | 925 } |
913 buildCounterListPoliciesResponse--; | 926 buildCounterListPoliciesResponse--; |
914 } | 927 } |
915 | 928 |
916 buildUnnamed1588() { | 929 buildUnnamed1583() { |
917 var o = new core.List<api.ManagedPropertyEntry>(); | 930 var o = new core.List<api.ManagedPropertyEntry>(); |
918 o.add(buildManagedPropertyEntry()); | 931 o.add(buildManagedPropertyEntry()); |
919 o.add(buildManagedPropertyEntry()); | 932 o.add(buildManagedPropertyEntry()); |
920 return o; | 933 return o; |
921 } | 934 } |
922 | 935 |
923 checkUnnamed1588(core.List<api.ManagedPropertyEntry> o) { | 936 checkUnnamed1583(core.List<api.ManagedPropertyEntry> o) { |
924 unittest.expect(o, unittest.hasLength(2)); | 937 unittest.expect(o, unittest.hasLength(2)); |
925 checkManagedPropertyEntry(o[0]); | 938 checkManagedPropertyEntry(o[0]); |
926 checkManagedPropertyEntry(o[1]); | 939 checkManagedPropertyEntry(o[1]); |
927 } | 940 } |
928 | 941 |
929 buildUnnamed1589() { | 942 buildUnnamed1584() { |
930 var o = new core.List<api.ManagedProperty>(); | 943 var o = new core.List<api.ManagedProperty>(); |
931 o.add(buildManagedProperty()); | 944 o.add(buildManagedProperty()); |
932 o.add(buildManagedProperty()); | 945 o.add(buildManagedProperty()); |
933 return o; | 946 return o; |
934 } | 947 } |
935 | 948 |
936 checkUnnamed1589(core.List<api.ManagedProperty> o) { | 949 checkUnnamed1584(core.List<api.ManagedProperty> o) { |
937 unittest.expect(o, unittest.hasLength(2)); | 950 unittest.expect(o, unittest.hasLength(2)); |
938 checkManagedProperty(o[0]); | 951 checkManagedProperty(o[0]); |
939 checkManagedProperty(o[1]); | 952 checkManagedProperty(o[1]); |
940 } | 953 } |
941 | 954 |
942 core.int buildCounterManagedProperty = 0; | 955 core.int buildCounterManagedProperty = 0; |
943 buildManagedProperty() { | 956 buildManagedProperty() { |
944 var o = new api.ManagedProperty(); | 957 var o = new api.ManagedProperty(); |
945 buildCounterManagedProperty++; | 958 buildCounterManagedProperty++; |
946 if (buildCounterManagedProperty < 3) { | 959 if (buildCounterManagedProperty < 3) { |
947 o.defaultValue = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 960 o.defaultValue = { |
| 961 'list': [1, 2, 3], |
| 962 'bool': true, |
| 963 'string': 'foo' |
| 964 }; |
948 o.description = "foo"; | 965 o.description = "foo"; |
949 o.entries = buildUnnamed1588(); | 966 o.entries = buildUnnamed1583(); |
950 o.key = "foo"; | 967 o.key = "foo"; |
951 o.nestedProperties = buildUnnamed1589(); | 968 o.nestedProperties = buildUnnamed1584(); |
952 o.title = "foo"; | 969 o.title = "foo"; |
953 o.type = "foo"; | 970 o.type = "foo"; |
954 } | 971 } |
955 buildCounterManagedProperty--; | 972 buildCounterManagedProperty--; |
956 return o; | 973 return o; |
957 } | 974 } |
958 | 975 |
959 checkManagedProperty(api.ManagedProperty o) { | 976 checkManagedProperty(api.ManagedProperty o) { |
960 buildCounterManagedProperty++; | 977 buildCounterManagedProperty++; |
961 if (buildCounterManagedProperty < 3) { | 978 if (buildCounterManagedProperty < 3) { |
962 var casted3 = (o.defaultValue) as core.Map; unittest.expect(casted3, unittes
t.hasLength(3)); unittest.expect(casted3["list"], unittest.equals([1, 2, 3])); u
nittest.expect(casted3["bool"], unittest.equals(true)); unittest.expect(casted3[
"string"], unittest.equals('foo')); | 979 var casted3 = (o.defaultValue) as core.Map; |
| 980 unittest.expect(casted3, unittest.hasLength(3)); |
| 981 unittest.expect(casted3["list"], unittest.equals([1, 2, 3])); |
| 982 unittest.expect(casted3["bool"], unittest.equals(true)); |
| 983 unittest.expect(casted3["string"], unittest.equals('foo')); |
963 unittest.expect(o.description, unittest.equals('foo')); | 984 unittest.expect(o.description, unittest.equals('foo')); |
964 checkUnnamed1588(o.entries); | 985 checkUnnamed1583(o.entries); |
965 unittest.expect(o.key, unittest.equals('foo')); | 986 unittest.expect(o.key, unittest.equals('foo')); |
966 checkUnnamed1589(o.nestedProperties); | 987 checkUnnamed1584(o.nestedProperties); |
967 unittest.expect(o.title, unittest.equals('foo')); | 988 unittest.expect(o.title, unittest.equals('foo')); |
968 unittest.expect(o.type, unittest.equals('foo')); | 989 unittest.expect(o.type, unittest.equals('foo')); |
969 } | 990 } |
970 buildCounterManagedProperty--; | 991 buildCounterManagedProperty--; |
971 } | 992 } |
972 | 993 |
973 core.int buildCounterManagedPropertyEntry = 0; | 994 core.int buildCounterManagedPropertyEntry = 0; |
974 buildManagedPropertyEntry() { | 995 buildManagedPropertyEntry() { |
975 var o = new api.ManagedPropertyEntry(); | 996 var o = new api.ManagedPropertyEntry(); |
976 buildCounterManagedPropertyEntry++; | 997 buildCounterManagedPropertyEntry++; |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1056 unittest.expect(o.wifiMacAddress, unittest.equals('foo')); | 1077 unittest.expect(o.wifiMacAddress, unittest.equals('foo')); |
1057 } | 1078 } |
1058 buildCounterNetworkInfo--; | 1079 buildCounterNetworkInfo--; |
1059 } | 1080 } |
1060 | 1081 |
1061 core.int buildCounterNonComplianceDetail = 0; | 1082 core.int buildCounterNonComplianceDetail = 0; |
1062 buildNonComplianceDetail() { | 1083 buildNonComplianceDetail() { |
1063 var o = new api.NonComplianceDetail(); | 1084 var o = new api.NonComplianceDetail(); |
1064 buildCounterNonComplianceDetail++; | 1085 buildCounterNonComplianceDetail++; |
1065 if (buildCounterNonComplianceDetail < 3) { | 1086 if (buildCounterNonComplianceDetail < 3) { |
1066 o.currentValue = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 1087 o.currentValue = { |
| 1088 'list': [1, 2, 3], |
| 1089 'bool': true, |
| 1090 'string': 'foo' |
| 1091 }; |
1067 o.fieldPath = "foo"; | 1092 o.fieldPath = "foo"; |
1068 o.installationFailureReason = "foo"; | 1093 o.installationFailureReason = "foo"; |
1069 o.nonComplianceReason = "foo"; | 1094 o.nonComplianceReason = "foo"; |
1070 o.packageName = "foo"; | 1095 o.packageName = "foo"; |
1071 o.settingName = "foo"; | 1096 o.settingName = "foo"; |
1072 } | 1097 } |
1073 buildCounterNonComplianceDetail--; | 1098 buildCounterNonComplianceDetail--; |
1074 return o; | 1099 return o; |
1075 } | 1100 } |
1076 | 1101 |
1077 checkNonComplianceDetail(api.NonComplianceDetail o) { | 1102 checkNonComplianceDetail(api.NonComplianceDetail o) { |
1078 buildCounterNonComplianceDetail++; | 1103 buildCounterNonComplianceDetail++; |
1079 if (buildCounterNonComplianceDetail < 3) { | 1104 if (buildCounterNonComplianceDetail < 3) { |
1080 var casted4 = (o.currentValue) as core.Map; unittest.expect(casted4, unittes
t.hasLength(3)); unittest.expect(casted4["list"], unittest.equals([1, 2, 3])); u
nittest.expect(casted4["bool"], unittest.equals(true)); unittest.expect(casted4[
"string"], unittest.equals('foo')); | 1105 var casted4 = (o.currentValue) as core.Map; |
| 1106 unittest.expect(casted4, unittest.hasLength(3)); |
| 1107 unittest.expect(casted4["list"], unittest.equals([1, 2, 3])); |
| 1108 unittest.expect(casted4["bool"], unittest.equals(true)); |
| 1109 unittest.expect(casted4["string"], unittest.equals('foo')); |
1081 unittest.expect(o.fieldPath, unittest.equals('foo')); | 1110 unittest.expect(o.fieldPath, unittest.equals('foo')); |
1082 unittest.expect(o.installationFailureReason, unittest.equals('foo')); | 1111 unittest.expect(o.installationFailureReason, unittest.equals('foo')); |
1083 unittest.expect(o.nonComplianceReason, unittest.equals('foo')); | 1112 unittest.expect(o.nonComplianceReason, unittest.equals('foo')); |
1084 unittest.expect(o.packageName, unittest.equals('foo')); | 1113 unittest.expect(o.packageName, unittest.equals('foo')); |
1085 unittest.expect(o.settingName, unittest.equals('foo')); | 1114 unittest.expect(o.settingName, unittest.equals('foo')); |
1086 } | 1115 } |
1087 buildCounterNonComplianceDetail--; | 1116 buildCounterNonComplianceDetail--; |
1088 } | 1117 } |
1089 | 1118 |
1090 core.int buildCounterNonComplianceDetailCondition = 0; | 1119 core.int buildCounterNonComplianceDetailCondition = 0; |
(...skipping 12 matching lines...) Expand all Loading... |
1103 checkNonComplianceDetailCondition(api.NonComplianceDetailCondition o) { | 1132 checkNonComplianceDetailCondition(api.NonComplianceDetailCondition o) { |
1104 buildCounterNonComplianceDetailCondition++; | 1133 buildCounterNonComplianceDetailCondition++; |
1105 if (buildCounterNonComplianceDetailCondition < 3) { | 1134 if (buildCounterNonComplianceDetailCondition < 3) { |
1106 unittest.expect(o.nonComplianceReason, unittest.equals('foo')); | 1135 unittest.expect(o.nonComplianceReason, unittest.equals('foo')); |
1107 unittest.expect(o.packageName, unittest.equals('foo')); | 1136 unittest.expect(o.packageName, unittest.equals('foo')); |
1108 unittest.expect(o.settingName, unittest.equals('foo')); | 1137 unittest.expect(o.settingName, unittest.equals('foo')); |
1109 } | 1138 } |
1110 buildCounterNonComplianceDetailCondition--; | 1139 buildCounterNonComplianceDetailCondition--; |
1111 } | 1140 } |
1112 | 1141 |
1113 buildUnnamed1590() { | 1142 buildUnnamed1585() { |
1114 var o = new core.Map<core.String, core.Object>(); | 1143 var o = new core.Map<core.String, core.Object>(); |
1115 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 1144 o["x"] = { |
1116 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 1145 'list': [1, 2, 3], |
| 1146 'bool': true, |
| 1147 'string': 'foo' |
| 1148 }; |
| 1149 o["y"] = { |
| 1150 'list': [1, 2, 3], |
| 1151 'bool': true, |
| 1152 'string': 'foo' |
| 1153 }; |
1117 return o; | 1154 return o; |
1118 } | 1155 } |
1119 | 1156 |
1120 checkUnnamed1590(core.Map<core.String, core.Object> o) { | 1157 checkUnnamed1585(core.Map<core.String, core.Object> o) { |
1121 unittest.expect(o, unittest.hasLength(2)); | 1158 unittest.expect(o, unittest.hasLength(2)); |
1122 var casted5 = (o["x"]) as core.Map; unittest.expect(casted5, unittest.hasLengt
h(3)); unittest.expect(casted5["list"], unittest.equals([1, 2, 3])); unittest.ex
pect(casted5["bool"], unittest.equals(true)); unittest.expect(casted5["string"],
unittest.equals('foo')); | 1159 var casted5 = (o["x"]) as core.Map; |
1123 var casted6 = (o["y"]) as core.Map; unittest.expect(casted6, unittest.hasLengt
h(3)); unittest.expect(casted6["list"], unittest.equals([1, 2, 3])); unittest.ex
pect(casted6["bool"], unittest.equals(true)); unittest.expect(casted6["string"],
unittest.equals('foo')); | 1160 unittest.expect(casted5, unittest.hasLength(3)); |
| 1161 unittest.expect(casted5["list"], unittest.equals([1, 2, 3])); |
| 1162 unittest.expect(casted5["bool"], unittest.equals(true)); |
| 1163 unittest.expect(casted5["string"], unittest.equals('foo')); |
| 1164 var casted6 = (o["y"]) as core.Map; |
| 1165 unittest.expect(casted6, unittest.hasLength(3)); |
| 1166 unittest.expect(casted6["list"], unittest.equals([1, 2, 3])); |
| 1167 unittest.expect(casted6["bool"], unittest.equals(true)); |
| 1168 unittest.expect(casted6["string"], unittest.equals('foo')); |
1124 } | 1169 } |
1125 | 1170 |
1126 buildUnnamed1591() { | 1171 buildUnnamed1586() { |
1127 var o = new core.Map<core.String, core.Object>(); | 1172 var o = new core.Map<core.String, core.Object>(); |
1128 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 1173 o["x"] = { |
1129 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 1174 'list': [1, 2, 3], |
| 1175 'bool': true, |
| 1176 'string': 'foo' |
| 1177 }; |
| 1178 o["y"] = { |
| 1179 'list': [1, 2, 3], |
| 1180 'bool': true, |
| 1181 'string': 'foo' |
| 1182 }; |
1130 return o; | 1183 return o; |
1131 } | 1184 } |
1132 | 1185 |
1133 checkUnnamed1591(core.Map<core.String, core.Object> o) { | 1186 checkUnnamed1586(core.Map<core.String, core.Object> o) { |
1134 unittest.expect(o, unittest.hasLength(2)); | 1187 unittest.expect(o, unittest.hasLength(2)); |
1135 var casted7 = (o["x"]) as core.Map; unittest.expect(casted7, unittest.hasLengt
h(3)); unittest.expect(casted7["list"], unittest.equals([1, 2, 3])); unittest.ex
pect(casted7["bool"], unittest.equals(true)); unittest.expect(casted7["string"],
unittest.equals('foo')); | 1188 var casted7 = (o["x"]) as core.Map; |
1136 var casted8 = (o["y"]) as core.Map; unittest.expect(casted8, unittest.hasLengt
h(3)); unittest.expect(casted8["list"], unittest.equals([1, 2, 3])); unittest.ex
pect(casted8["bool"], unittest.equals(true)); unittest.expect(casted8["string"],
unittest.equals('foo')); | 1189 unittest.expect(casted7, unittest.hasLength(3)); |
| 1190 unittest.expect(casted7["list"], unittest.equals([1, 2, 3])); |
| 1191 unittest.expect(casted7["bool"], unittest.equals(true)); |
| 1192 unittest.expect(casted7["string"], unittest.equals('foo')); |
| 1193 var casted8 = (o["y"]) as core.Map; |
| 1194 unittest.expect(casted8, unittest.hasLength(3)); |
| 1195 unittest.expect(casted8["list"], unittest.equals([1, 2, 3])); |
| 1196 unittest.expect(casted8["bool"], unittest.equals(true)); |
| 1197 unittest.expect(casted8["string"], unittest.equals('foo')); |
1137 } | 1198 } |
1138 | 1199 |
1139 core.int buildCounterOperation = 0; | 1200 core.int buildCounterOperation = 0; |
1140 buildOperation() { | 1201 buildOperation() { |
1141 var o = new api.Operation(); | 1202 var o = new api.Operation(); |
1142 buildCounterOperation++; | 1203 buildCounterOperation++; |
1143 if (buildCounterOperation < 3) { | 1204 if (buildCounterOperation < 3) { |
1144 o.done = true; | 1205 o.done = true; |
1145 o.error = buildStatus(); | 1206 o.error = buildStatus(); |
1146 o.metadata = buildUnnamed1590(); | 1207 o.metadata = buildUnnamed1585(); |
1147 o.name = "foo"; | 1208 o.name = "foo"; |
1148 o.response = buildUnnamed1591(); | 1209 o.response = buildUnnamed1586(); |
1149 } | 1210 } |
1150 buildCounterOperation--; | 1211 buildCounterOperation--; |
1151 return o; | 1212 return o; |
1152 } | 1213 } |
1153 | 1214 |
1154 checkOperation(api.Operation o) { | 1215 checkOperation(api.Operation o) { |
1155 buildCounterOperation++; | 1216 buildCounterOperation++; |
1156 if (buildCounterOperation < 3) { | 1217 if (buildCounterOperation < 3) { |
1157 unittest.expect(o.done, unittest.isTrue); | 1218 unittest.expect(o.done, unittest.isTrue); |
1158 checkStatus(o.error); | 1219 checkStatus(o.error); |
1159 checkUnnamed1590(o.metadata); | 1220 checkUnnamed1585(o.metadata); |
1160 unittest.expect(o.name, unittest.equals('foo')); | 1221 unittest.expect(o.name, unittest.equals('foo')); |
1161 checkUnnamed1591(o.response); | 1222 checkUnnamed1586(o.response); |
1162 } | 1223 } |
1163 buildCounterOperation--; | 1224 buildCounterOperation--; |
1164 } | 1225 } |
1165 | 1226 |
1166 core.int buildCounterPasswordRequirements = 0; | 1227 core.int buildCounterPasswordRequirements = 0; |
1167 buildPasswordRequirements() { | 1228 buildPasswordRequirements() { |
1168 var o = new api.PasswordRequirements(); | 1229 var o = new api.PasswordRequirements(); |
1169 buildCounterPasswordRequirements++; | 1230 buildCounterPasswordRequirements++; |
1170 if (buildCounterPasswordRequirements < 3) { | 1231 if (buildCounterPasswordRequirements < 3) { |
1171 o.maximumFailedPasswordsForWipe = 42; | 1232 o.maximumFailedPasswordsForWipe = 42; |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1216 | 1277 |
1217 checkPermissionGrant(api.PermissionGrant o) { | 1278 checkPermissionGrant(api.PermissionGrant o) { |
1218 buildCounterPermissionGrant++; | 1279 buildCounterPermissionGrant++; |
1219 if (buildCounterPermissionGrant < 3) { | 1280 if (buildCounterPermissionGrant < 3) { |
1220 unittest.expect(o.permission, unittest.equals('foo')); | 1281 unittest.expect(o.permission, unittest.equals('foo')); |
1221 unittest.expect(o.policy, unittest.equals('foo')); | 1282 unittest.expect(o.policy, unittest.equals('foo')); |
1222 } | 1283 } |
1223 buildCounterPermissionGrant--; | 1284 buildCounterPermissionGrant--; |
1224 } | 1285 } |
1225 | 1286 |
1226 buildUnnamed1592() { | 1287 buildUnnamed1587() { |
1227 var o = new core.List<core.String>(); | 1288 var o = new core.List<core.String>(); |
1228 o.add("foo"); | 1289 o.add("foo"); |
1229 o.add("foo"); | 1290 o.add("foo"); |
1230 return o; | 1291 return o; |
1231 } | 1292 } |
1232 | 1293 |
1233 checkUnnamed1592(core.List<core.String> o) { | 1294 checkUnnamed1587(core.List<core.String> o) { |
1234 unittest.expect(o, unittest.hasLength(2)); | 1295 unittest.expect(o, unittest.hasLength(2)); |
1235 unittest.expect(o[0], unittest.equals('foo')); | 1296 unittest.expect(o[0], unittest.equals('foo')); |
1236 unittest.expect(o[1], unittest.equals('foo')); | 1297 unittest.expect(o[1], unittest.equals('foo')); |
1237 } | 1298 } |
1238 | 1299 |
1239 buildUnnamed1593() { | 1300 buildUnnamed1588() { |
1240 var o = new core.List<core.String>(); | 1301 var o = new core.List<core.String>(); |
1241 o.add("foo"); | 1302 o.add("foo"); |
1242 o.add("foo"); | 1303 o.add("foo"); |
1243 return o; | 1304 return o; |
1244 } | 1305 } |
1245 | 1306 |
1246 checkUnnamed1593(core.List<core.String> o) { | 1307 checkUnnamed1588(core.List<core.String> o) { |
1247 unittest.expect(o, unittest.hasLength(2)); | 1308 unittest.expect(o, unittest.hasLength(2)); |
1248 unittest.expect(o[0], unittest.equals('foo')); | 1309 unittest.expect(o[0], unittest.equals('foo')); |
1249 unittest.expect(o[1], unittest.equals('foo')); | 1310 unittest.expect(o[1], unittest.equals('foo')); |
1250 } | 1311 } |
1251 | 1312 |
1252 core.int buildCounterPersistentPreferredActivity = 0; | 1313 core.int buildCounterPersistentPreferredActivity = 0; |
1253 buildPersistentPreferredActivity() { | 1314 buildPersistentPreferredActivity() { |
1254 var o = new api.PersistentPreferredActivity(); | 1315 var o = new api.PersistentPreferredActivity(); |
1255 buildCounterPersistentPreferredActivity++; | 1316 buildCounterPersistentPreferredActivity++; |
1256 if (buildCounterPersistentPreferredActivity < 3) { | 1317 if (buildCounterPersistentPreferredActivity < 3) { |
1257 o.actions = buildUnnamed1592(); | 1318 o.actions = buildUnnamed1587(); |
1258 o.categories = buildUnnamed1593(); | 1319 o.categories = buildUnnamed1588(); |
1259 o.receiverActivity = "foo"; | 1320 o.receiverActivity = "foo"; |
1260 } | 1321 } |
1261 buildCounterPersistentPreferredActivity--; | 1322 buildCounterPersistentPreferredActivity--; |
1262 return o; | 1323 return o; |
1263 } | 1324 } |
1264 | 1325 |
1265 checkPersistentPreferredActivity(api.PersistentPreferredActivity o) { | 1326 checkPersistentPreferredActivity(api.PersistentPreferredActivity o) { |
1266 buildCounterPersistentPreferredActivity++; | 1327 buildCounterPersistentPreferredActivity++; |
1267 if (buildCounterPersistentPreferredActivity < 3) { | 1328 if (buildCounterPersistentPreferredActivity < 3) { |
1268 checkUnnamed1592(o.actions); | 1329 checkUnnamed1587(o.actions); |
1269 checkUnnamed1593(o.categories); | 1330 checkUnnamed1588(o.categories); |
1270 unittest.expect(o.receiverActivity, unittest.equals('foo')); | 1331 unittest.expect(o.receiverActivity, unittest.equals('foo')); |
1271 } | 1332 } |
1272 buildCounterPersistentPreferredActivity--; | 1333 buildCounterPersistentPreferredActivity--; |
1273 } | 1334 } |
1274 | 1335 |
1275 buildUnnamed1594() { | 1336 buildUnnamed1589() { |
1276 var o = new core.List<api.ApplicationPolicy>(); | 1337 var o = new core.List<api.ApplicationPolicy>(); |
1277 o.add(buildApplicationPolicy()); | 1338 o.add(buildApplicationPolicy()); |
1278 o.add(buildApplicationPolicy()); | 1339 o.add(buildApplicationPolicy()); |
1279 return o; | 1340 return o; |
1280 } | 1341 } |
1281 | 1342 |
1282 checkUnnamed1594(core.List<api.ApplicationPolicy> o) { | 1343 checkUnnamed1589(core.List<api.ApplicationPolicy> o) { |
1283 unittest.expect(o, unittest.hasLength(2)); | 1344 unittest.expect(o, unittest.hasLength(2)); |
1284 checkApplicationPolicy(o[0]); | 1345 checkApplicationPolicy(o[0]); |
1285 checkApplicationPolicy(o[1]); | 1346 checkApplicationPolicy(o[1]); |
1286 } | 1347 } |
1287 | 1348 |
1288 buildUnnamed1595() { | 1349 buildUnnamed1590() { |
1289 var o = new core.List<api.ComplianceRule>(); | 1350 var o = new core.List<api.ComplianceRule>(); |
1290 o.add(buildComplianceRule()); | 1351 o.add(buildComplianceRule()); |
1291 o.add(buildComplianceRule()); | 1352 o.add(buildComplianceRule()); |
1292 return o; | 1353 return o; |
1293 } | 1354 } |
1294 | 1355 |
1295 checkUnnamed1595(core.List<api.ComplianceRule> o) { | 1356 checkUnnamed1590(core.List<api.ComplianceRule> o) { |
1296 unittest.expect(o, unittest.hasLength(2)); | 1357 unittest.expect(o, unittest.hasLength(2)); |
1297 checkComplianceRule(o[0]); | 1358 checkComplianceRule(o[0]); |
1298 checkComplianceRule(o[1]); | 1359 checkComplianceRule(o[1]); |
1299 } | 1360 } |
1300 | 1361 |
1301 buildUnnamed1596() { | 1362 buildUnnamed1591() { |
1302 var o = new core.List<core.String>(); | 1363 var o = new core.List<core.String>(); |
1303 o.add("foo"); | 1364 o.add("foo"); |
1304 o.add("foo"); | 1365 o.add("foo"); |
1305 return o; | 1366 return o; |
1306 } | 1367 } |
1307 | 1368 |
1308 checkUnnamed1596(core.List<core.String> o) { | 1369 checkUnnamed1591(core.List<core.String> o) { |
1309 unittest.expect(o, unittest.hasLength(2)); | 1370 unittest.expect(o, unittest.hasLength(2)); |
1310 unittest.expect(o[0], unittest.equals('foo')); | 1371 unittest.expect(o[0], unittest.equals('foo')); |
1311 unittest.expect(o[1], unittest.equals('foo')); | 1372 unittest.expect(o[1], unittest.equals('foo')); |
1312 } | 1373 } |
1313 | 1374 |
1314 buildUnnamed1597() { | 1375 buildUnnamed1592() { |
1315 var o = new core.Map<core.String, core.Object>(); | 1376 var o = new core.Map<core.String, core.Object>(); |
1316 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 1377 o["x"] = { |
1317 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 1378 'list': [1, 2, 3], |
| 1379 'bool': true, |
| 1380 'string': 'foo' |
| 1381 }; |
| 1382 o["y"] = { |
| 1383 'list': [1, 2, 3], |
| 1384 'bool': true, |
| 1385 'string': 'foo' |
| 1386 }; |
1318 return o; | 1387 return o; |
1319 } | 1388 } |
1320 | 1389 |
1321 checkUnnamed1597(core.Map<core.String, core.Object> o) { | 1390 checkUnnamed1592(core.Map<core.String, core.Object> o) { |
1322 unittest.expect(o, unittest.hasLength(2)); | 1391 unittest.expect(o, unittest.hasLength(2)); |
1323 var casted9 = (o["x"]) as core.Map; unittest.expect(casted9, unittest.hasLengt
h(3)); unittest.expect(casted9["list"], unittest.equals([1, 2, 3])); unittest.ex
pect(casted9["bool"], unittest.equals(true)); unittest.expect(casted9["string"],
unittest.equals('foo')); | 1392 var casted9 = (o["x"]) as core.Map; |
1324 var casted10 = (o["y"]) as core.Map; unittest.expect(casted10, unittest.hasLen
gth(3)); unittest.expect(casted10["list"], unittest.equals([1, 2, 3])); unittest
.expect(casted10["bool"], unittest.equals(true)); unittest.expect(casted10["stri
ng"], unittest.equals('foo')); | 1393 unittest.expect(casted9, unittest.hasLength(3)); |
| 1394 unittest.expect(casted9["list"], unittest.equals([1, 2, 3])); |
| 1395 unittest.expect(casted9["bool"], unittest.equals(true)); |
| 1396 unittest.expect(casted9["string"], unittest.equals('foo')); |
| 1397 var casted10 = (o["y"]) as core.Map; |
| 1398 unittest.expect(casted10, unittest.hasLength(3)); |
| 1399 unittest.expect(casted10["list"], unittest.equals([1, 2, 3])); |
| 1400 unittest.expect(casted10["bool"], unittest.equals(true)); |
| 1401 unittest.expect(casted10["string"], unittest.equals('foo')); |
1325 } | 1402 } |
1326 | 1403 |
1327 buildUnnamed1598() { | 1404 buildUnnamed1593() { |
1328 var o = new core.List<api.PersistentPreferredActivity>(); | 1405 var o = new core.List<api.PersistentPreferredActivity>(); |
1329 o.add(buildPersistentPreferredActivity()); | 1406 o.add(buildPersistentPreferredActivity()); |
1330 o.add(buildPersistentPreferredActivity()); | 1407 o.add(buildPersistentPreferredActivity()); |
1331 return o; | 1408 return o; |
1332 } | 1409 } |
1333 | 1410 |
1334 checkUnnamed1598(core.List<api.PersistentPreferredActivity> o) { | 1411 checkUnnamed1593(core.List<api.PersistentPreferredActivity> o) { |
1335 unittest.expect(o, unittest.hasLength(2)); | 1412 unittest.expect(o, unittest.hasLength(2)); |
1336 checkPersistentPreferredActivity(o[0]); | 1413 checkPersistentPreferredActivity(o[0]); |
1337 checkPersistentPreferredActivity(o[1]); | 1414 checkPersistentPreferredActivity(o[1]); |
1338 } | 1415 } |
1339 | 1416 |
1340 buildUnnamed1599() { | 1417 buildUnnamed1594() { |
1341 var o = new core.List<core.String>(); | 1418 var o = new core.List<core.String>(); |
1342 o.add("foo"); | 1419 o.add("foo"); |
1343 o.add("foo"); | 1420 o.add("foo"); |
1344 return o; | 1421 return o; |
1345 } | 1422 } |
1346 | 1423 |
1347 checkUnnamed1599(core.List<core.String> o) { | 1424 checkUnnamed1594(core.List<core.String> o) { |
1348 unittest.expect(o, unittest.hasLength(2)); | 1425 unittest.expect(o, unittest.hasLength(2)); |
1349 unittest.expect(o[0], unittest.equals('foo')); | 1426 unittest.expect(o[0], unittest.equals('foo')); |
1350 unittest.expect(o[1], unittest.equals('foo')); | 1427 unittest.expect(o[1], unittest.equals('foo')); |
1351 } | 1428 } |
1352 | 1429 |
1353 core.int buildCounterPolicy = 0; | 1430 core.int buildCounterPolicy = 0; |
1354 buildPolicy() { | 1431 buildPolicy() { |
1355 var o = new api.Policy(); | 1432 var o = new api.Policy(); |
1356 buildCounterPolicy++; | 1433 buildCounterPolicy++; |
1357 if (buildCounterPolicy < 3) { | 1434 if (buildCounterPolicy < 3) { |
1358 o.addUserDisabled = true; | 1435 o.addUserDisabled = true; |
1359 o.adjustVolumeDisabled = true; | 1436 o.adjustVolumeDisabled = true; |
1360 o.applications = buildUnnamed1594(); | 1437 o.applications = buildUnnamed1589(); |
1361 o.blockApplicationsEnabled = true; | 1438 o.blockApplicationsEnabled = true; |
1362 o.cameraDisabled = true; | 1439 o.cameraDisabled = true; |
1363 o.complianceRules = buildUnnamed1595(); | 1440 o.complianceRules = buildUnnamed1590(); |
1364 o.debuggingFeaturesAllowed = true; | 1441 o.debuggingFeaturesAllowed = true; |
1365 o.defaultPermissionPolicy = "foo"; | 1442 o.defaultPermissionPolicy = "foo"; |
1366 o.factoryResetDisabled = true; | 1443 o.factoryResetDisabled = true; |
1367 o.frpAdminEmails = buildUnnamed1596(); | 1444 o.frpAdminEmails = buildUnnamed1591(); |
1368 o.funDisabled = true; | 1445 o.funDisabled = true; |
1369 o.installUnknownSourcesAllowed = true; | 1446 o.installUnknownSourcesAllowed = true; |
1370 o.keyguardDisabled = true; | 1447 o.keyguardDisabled = true; |
1371 o.maximumTimeToLock = "foo"; | 1448 o.maximumTimeToLock = "foo"; |
1372 o.modifyAccountsDisabled = true; | 1449 o.modifyAccountsDisabled = true; |
1373 o.name = "foo"; | 1450 o.name = "foo"; |
1374 o.networkEscapeHatchEnabled = true; | 1451 o.networkEscapeHatchEnabled = true; |
1375 o.openNetworkConfiguration = buildUnnamed1597(); | 1452 o.openNetworkConfiguration = buildUnnamed1592(); |
1376 o.passwordRequirements = buildPasswordRequirements(); | 1453 o.passwordRequirements = buildPasswordRequirements(); |
1377 o.persistentPreferredActivities = buildUnnamed1598(); | 1454 o.persistentPreferredActivities = buildUnnamed1593(); |
1378 o.removeUserDisabled = true; | 1455 o.removeUserDisabled = true; |
1379 o.safeBootDisabled = true; | 1456 o.safeBootDisabled = true; |
1380 o.screenCaptureDisabled = true; | 1457 o.screenCaptureDisabled = true; |
1381 o.statusBarDisabled = true; | 1458 o.statusBarDisabled = true; |
1382 o.statusReportingSettings = buildStatusReportingSettings(); | 1459 o.statusReportingSettings = buildStatusReportingSettings(); |
1383 o.stayOnPluggedModes = buildUnnamed1599(); | 1460 o.stayOnPluggedModes = buildUnnamed1594(); |
1384 o.systemUpdate = buildSystemUpdate(); | 1461 o.systemUpdate = buildSystemUpdate(); |
1385 o.unmuteMicrophoneDisabled = true; | 1462 o.unmuteMicrophoneDisabled = true; |
1386 o.version = "foo"; | 1463 o.version = "foo"; |
| 1464 o.wifiConfigDisabled = true; |
| 1465 o.wifiConfigsLockdownEnabled = true; |
1387 } | 1466 } |
1388 buildCounterPolicy--; | 1467 buildCounterPolicy--; |
1389 return o; | 1468 return o; |
1390 } | 1469 } |
1391 | 1470 |
1392 checkPolicy(api.Policy o) { | 1471 checkPolicy(api.Policy o) { |
1393 buildCounterPolicy++; | 1472 buildCounterPolicy++; |
1394 if (buildCounterPolicy < 3) { | 1473 if (buildCounterPolicy < 3) { |
1395 unittest.expect(o.addUserDisabled, unittest.isTrue); | 1474 unittest.expect(o.addUserDisabled, unittest.isTrue); |
1396 unittest.expect(o.adjustVolumeDisabled, unittest.isTrue); | 1475 unittest.expect(o.adjustVolumeDisabled, unittest.isTrue); |
1397 checkUnnamed1594(o.applications); | 1476 checkUnnamed1589(o.applications); |
1398 unittest.expect(o.blockApplicationsEnabled, unittest.isTrue); | 1477 unittest.expect(o.blockApplicationsEnabled, unittest.isTrue); |
1399 unittest.expect(o.cameraDisabled, unittest.isTrue); | 1478 unittest.expect(o.cameraDisabled, unittest.isTrue); |
1400 checkUnnamed1595(o.complianceRules); | 1479 checkUnnamed1590(o.complianceRules); |
1401 unittest.expect(o.debuggingFeaturesAllowed, unittest.isTrue); | 1480 unittest.expect(o.debuggingFeaturesAllowed, unittest.isTrue); |
1402 unittest.expect(o.defaultPermissionPolicy, unittest.equals('foo')); | 1481 unittest.expect(o.defaultPermissionPolicy, unittest.equals('foo')); |
1403 unittest.expect(o.factoryResetDisabled, unittest.isTrue); | 1482 unittest.expect(o.factoryResetDisabled, unittest.isTrue); |
1404 checkUnnamed1596(o.frpAdminEmails); | 1483 checkUnnamed1591(o.frpAdminEmails); |
1405 unittest.expect(o.funDisabled, unittest.isTrue); | 1484 unittest.expect(o.funDisabled, unittest.isTrue); |
1406 unittest.expect(o.installUnknownSourcesAllowed, unittest.isTrue); | 1485 unittest.expect(o.installUnknownSourcesAllowed, unittest.isTrue); |
1407 unittest.expect(o.keyguardDisabled, unittest.isTrue); | 1486 unittest.expect(o.keyguardDisabled, unittest.isTrue); |
1408 unittest.expect(o.maximumTimeToLock, unittest.equals('foo')); | 1487 unittest.expect(o.maximumTimeToLock, unittest.equals('foo')); |
1409 unittest.expect(o.modifyAccountsDisabled, unittest.isTrue); | 1488 unittest.expect(o.modifyAccountsDisabled, unittest.isTrue); |
1410 unittest.expect(o.name, unittest.equals('foo')); | 1489 unittest.expect(o.name, unittest.equals('foo')); |
1411 unittest.expect(o.networkEscapeHatchEnabled, unittest.isTrue); | 1490 unittest.expect(o.networkEscapeHatchEnabled, unittest.isTrue); |
1412 checkUnnamed1597(o.openNetworkConfiguration); | 1491 checkUnnamed1592(o.openNetworkConfiguration); |
1413 checkPasswordRequirements(o.passwordRequirements); | 1492 checkPasswordRequirements(o.passwordRequirements); |
1414 checkUnnamed1598(o.persistentPreferredActivities); | 1493 checkUnnamed1593(o.persistentPreferredActivities); |
1415 unittest.expect(o.removeUserDisabled, unittest.isTrue); | 1494 unittest.expect(o.removeUserDisabled, unittest.isTrue); |
1416 unittest.expect(o.safeBootDisabled, unittest.isTrue); | 1495 unittest.expect(o.safeBootDisabled, unittest.isTrue); |
1417 unittest.expect(o.screenCaptureDisabled, unittest.isTrue); | 1496 unittest.expect(o.screenCaptureDisabled, unittest.isTrue); |
1418 unittest.expect(o.statusBarDisabled, unittest.isTrue); | 1497 unittest.expect(o.statusBarDisabled, unittest.isTrue); |
1419 checkStatusReportingSettings(o.statusReportingSettings); | 1498 checkStatusReportingSettings(o.statusReportingSettings); |
1420 checkUnnamed1599(o.stayOnPluggedModes); | 1499 checkUnnamed1594(o.stayOnPluggedModes); |
1421 checkSystemUpdate(o.systemUpdate); | 1500 checkSystemUpdate(o.systemUpdate); |
1422 unittest.expect(o.unmuteMicrophoneDisabled, unittest.isTrue); | 1501 unittest.expect(o.unmuteMicrophoneDisabled, unittest.isTrue); |
1423 unittest.expect(o.version, unittest.equals('foo')); | 1502 unittest.expect(o.version, unittest.equals('foo')); |
| 1503 unittest.expect(o.wifiConfigDisabled, unittest.isTrue); |
| 1504 unittest.expect(o.wifiConfigsLockdownEnabled, unittest.isTrue); |
1424 } | 1505 } |
1425 buildCounterPolicy--; | 1506 buildCounterPolicy--; |
1426 } | 1507 } |
1427 | 1508 |
1428 core.int buildCounterPowerManagementEvent = 0; | 1509 core.int buildCounterPowerManagementEvent = 0; |
1429 buildPowerManagementEvent() { | 1510 buildPowerManagementEvent() { |
1430 var o = new api.PowerManagementEvent(); | 1511 var o = new api.PowerManagementEvent(); |
1431 buildCounterPowerManagementEvent++; | 1512 buildCounterPowerManagementEvent++; |
1432 if (buildCounterPowerManagementEvent < 3) { | 1513 if (buildCounterPowerManagementEvent < 3) { |
1433 o.batteryLevel = 42.0; | 1514 o.batteryLevel = 42.0; |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1491 unittest.expect(o.androidBuildNumber, unittest.equals('foo')); | 1572 unittest.expect(o.androidBuildNumber, unittest.equals('foo')); |
1492 unittest.expect(o.androidBuildTime, unittest.equals('foo')); | 1573 unittest.expect(o.androidBuildTime, unittest.equals('foo')); |
1493 unittest.expect(o.androidVersion, unittest.equals('foo')); | 1574 unittest.expect(o.androidVersion, unittest.equals('foo')); |
1494 unittest.expect(o.bootloaderVersion, unittest.equals('foo')); | 1575 unittest.expect(o.bootloaderVersion, unittest.equals('foo')); |
1495 unittest.expect(o.deviceKernelVersion, unittest.equals('foo')); | 1576 unittest.expect(o.deviceKernelVersion, unittest.equals('foo')); |
1496 unittest.expect(o.securityPatchLevel, unittest.equals('foo')); | 1577 unittest.expect(o.securityPatchLevel, unittest.equals('foo')); |
1497 } | 1578 } |
1498 buildCounterSoftwareInfo--; | 1579 buildCounterSoftwareInfo--; |
1499 } | 1580 } |
1500 | 1581 |
1501 buildUnnamed1600() { | 1582 buildUnnamed1595() { |
1502 var o = new core.Map<core.String, core.Object>(); | 1583 var o = new core.Map<core.String, core.Object>(); |
1503 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 1584 o["x"] = { |
1504 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 1585 'list': [1, 2, 3], |
| 1586 'bool': true, |
| 1587 'string': 'foo' |
| 1588 }; |
| 1589 o["y"] = { |
| 1590 'list': [1, 2, 3], |
| 1591 'bool': true, |
| 1592 'string': 'foo' |
| 1593 }; |
1505 return o; | 1594 return o; |
1506 } | 1595 } |
1507 | 1596 |
1508 checkUnnamed1600(core.Map<core.String, core.Object> o) { | 1597 checkUnnamed1595(core.Map<core.String, core.Object> o) { |
1509 unittest.expect(o, unittest.hasLength(2)); | 1598 unittest.expect(o, unittest.hasLength(2)); |
1510 var casted11 = (o["x"]) as core.Map; unittest.expect(casted11, unittest.hasLen
gth(3)); unittest.expect(casted11["list"], unittest.equals([1, 2, 3])); unittest
.expect(casted11["bool"], unittest.equals(true)); unittest.expect(casted11["stri
ng"], unittest.equals('foo')); | 1599 var casted11 = (o["x"]) as core.Map; |
1511 var casted12 = (o["y"]) as core.Map; unittest.expect(casted12, unittest.hasLen
gth(3)); unittest.expect(casted12["list"], unittest.equals([1, 2, 3])); unittest
.expect(casted12["bool"], unittest.equals(true)); unittest.expect(casted12["stri
ng"], unittest.equals('foo')); | 1600 unittest.expect(casted11, unittest.hasLength(3)); |
| 1601 unittest.expect(casted11["list"], unittest.equals([1, 2, 3])); |
| 1602 unittest.expect(casted11["bool"], unittest.equals(true)); |
| 1603 unittest.expect(casted11["string"], unittest.equals('foo')); |
| 1604 var casted12 = (o["y"]) as core.Map; |
| 1605 unittest.expect(casted12, unittest.hasLength(3)); |
| 1606 unittest.expect(casted12["list"], unittest.equals([1, 2, 3])); |
| 1607 unittest.expect(casted12["bool"], unittest.equals(true)); |
| 1608 unittest.expect(casted12["string"], unittest.equals('foo')); |
1512 } | 1609 } |
1513 | 1610 |
1514 buildUnnamed1601() { | 1611 buildUnnamed1596() { |
1515 var o = new core.List<core.Map<core.String, core.Object>>(); | 1612 var o = new core.List<core.Map<core.String, core.Object>>(); |
1516 o.add(buildUnnamed1600()); | 1613 o.add(buildUnnamed1595()); |
1517 o.add(buildUnnamed1600()); | 1614 o.add(buildUnnamed1595()); |
1518 return o; | 1615 return o; |
1519 } | 1616 } |
1520 | 1617 |
1521 checkUnnamed1601(core.List<core.Map<core.String, core.Object>> o) { | 1618 checkUnnamed1596(core.List<core.Map<core.String, core.Object>> o) { |
1522 unittest.expect(o, unittest.hasLength(2)); | 1619 unittest.expect(o, unittest.hasLength(2)); |
1523 checkUnnamed1600(o[0]); | 1620 checkUnnamed1595(o[0]); |
1524 checkUnnamed1600(o[1]); | 1621 checkUnnamed1595(o[1]); |
1525 } | 1622 } |
1526 | 1623 |
1527 core.int buildCounterStatus = 0; | 1624 core.int buildCounterStatus = 0; |
1528 buildStatus() { | 1625 buildStatus() { |
1529 var o = new api.Status(); | 1626 var o = new api.Status(); |
1530 buildCounterStatus++; | 1627 buildCounterStatus++; |
1531 if (buildCounterStatus < 3) { | 1628 if (buildCounterStatus < 3) { |
1532 o.code = 42; | 1629 o.code = 42; |
1533 o.details = buildUnnamed1601(); | 1630 o.details = buildUnnamed1596(); |
1534 o.message = "foo"; | 1631 o.message = "foo"; |
1535 } | 1632 } |
1536 buildCounterStatus--; | 1633 buildCounterStatus--; |
1537 return o; | 1634 return o; |
1538 } | 1635 } |
1539 | 1636 |
1540 checkStatus(api.Status o) { | 1637 checkStatus(api.Status o) { |
1541 buildCounterStatus++; | 1638 buildCounterStatus++; |
1542 if (buildCounterStatus < 3) { | 1639 if (buildCounterStatus < 3) { |
1543 unittest.expect(o.code, unittest.equals(42)); | 1640 unittest.expect(o.code, unittest.equals(42)); |
1544 checkUnnamed1601(o.details); | 1641 checkUnnamed1596(o.details); |
1545 unittest.expect(o.message, unittest.equals('foo')); | 1642 unittest.expect(o.message, unittest.equals('foo')); |
1546 } | 1643 } |
1547 buildCounterStatus--; | 1644 buildCounterStatus--; |
1548 } | 1645 } |
1549 | 1646 |
1550 core.int buildCounterStatusReportingSettings = 0; | 1647 core.int buildCounterStatusReportingSettings = 0; |
1551 buildStatusReportingSettings() { | 1648 buildStatusReportingSettings() { |
1552 var o = new api.StatusReportingSettings(); | 1649 var o = new api.StatusReportingSettings(); |
1553 buildCounterStatusReportingSettings++; | 1650 buildCounterStatusReportingSettings++; |
1554 if (buildCounterStatusReportingSettings < 3) { | 1651 if (buildCounterStatusReportingSettings < 3) { |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1592 checkSystemUpdate(api.SystemUpdate o) { | 1689 checkSystemUpdate(api.SystemUpdate o) { |
1593 buildCounterSystemUpdate++; | 1690 buildCounterSystemUpdate++; |
1594 if (buildCounterSystemUpdate < 3) { | 1691 if (buildCounterSystemUpdate < 3) { |
1595 unittest.expect(o.endMinutes, unittest.equals(42)); | 1692 unittest.expect(o.endMinutes, unittest.equals(42)); |
1596 unittest.expect(o.startMinutes, unittest.equals(42)); | 1693 unittest.expect(o.startMinutes, unittest.equals(42)); |
1597 unittest.expect(o.type, unittest.equals('foo')); | 1694 unittest.expect(o.type, unittest.equals('foo')); |
1598 } | 1695 } |
1599 buildCounterSystemUpdate--; | 1696 buildCounterSystemUpdate--; |
1600 } | 1697 } |
1601 | 1698 |
1602 buildUnnamed1602() { | 1699 buildUnnamed1597() { |
1603 var o = new core.Map<core.String, core.String>(); | 1700 var o = new core.Map<core.String, core.String>(); |
1604 o["x"] = "foo"; | 1701 o["x"] = "foo"; |
1605 o["y"] = "foo"; | 1702 o["y"] = "foo"; |
1606 return o; | 1703 return o; |
1607 } | 1704 } |
1608 | 1705 |
1609 checkUnnamed1602(core.Map<core.String, core.String> o) { | 1706 checkUnnamed1597(core.Map<core.String, core.String> o) { |
1610 unittest.expect(o, unittest.hasLength(2)); | 1707 unittest.expect(o, unittest.hasLength(2)); |
1611 unittest.expect(o["x"], unittest.equals('foo')); | 1708 unittest.expect(o["x"], unittest.equals('foo')); |
1612 unittest.expect(o["y"], unittest.equals('foo')); | 1709 unittest.expect(o["y"], unittest.equals('foo')); |
1613 } | 1710 } |
1614 | 1711 |
1615 core.int buildCounterUserFacingMessage = 0; | 1712 core.int buildCounterUserFacingMessage = 0; |
1616 buildUserFacingMessage() { | 1713 buildUserFacingMessage() { |
1617 var o = new api.UserFacingMessage(); | 1714 var o = new api.UserFacingMessage(); |
1618 buildCounterUserFacingMessage++; | 1715 buildCounterUserFacingMessage++; |
1619 if (buildCounterUserFacingMessage < 3) { | 1716 if (buildCounterUserFacingMessage < 3) { |
1620 o.defaultMessage = "foo"; | 1717 o.defaultMessage = "foo"; |
1621 o.localizedMessages = buildUnnamed1602(); | 1718 o.localizedMessages = buildUnnamed1597(); |
1622 } | 1719 } |
1623 buildCounterUserFacingMessage--; | 1720 buildCounterUserFacingMessage--; |
1624 return o; | 1721 return o; |
1625 } | 1722 } |
1626 | 1723 |
1627 checkUserFacingMessage(api.UserFacingMessage o) { | 1724 checkUserFacingMessage(api.UserFacingMessage o) { |
1628 buildCounterUserFacingMessage++; | 1725 buildCounterUserFacingMessage++; |
1629 if (buildCounterUserFacingMessage < 3) { | 1726 if (buildCounterUserFacingMessage < 3) { |
1630 unittest.expect(o.defaultMessage, unittest.equals('foo')); | 1727 unittest.expect(o.defaultMessage, unittest.equals('foo')); |
1631 checkUnnamed1602(o.localizedMessages); | 1728 checkUnnamed1597(o.localizedMessages); |
1632 } | 1729 } |
1633 buildCounterUserFacingMessage--; | 1730 buildCounterUserFacingMessage--; |
1634 } | 1731 } |
1635 | 1732 |
1636 buildUnnamed1603() { | 1733 buildUnnamed1598() { |
1637 var o = new core.List<core.String>(); | 1734 var o = new core.List<core.String>(); |
1638 o.add("foo"); | 1735 o.add("foo"); |
1639 o.add("foo"); | 1736 o.add("foo"); |
1640 return o; | 1737 return o; |
1641 } | 1738 } |
1642 | 1739 |
1643 checkUnnamed1603(core.List<core.String> o) { | 1740 checkUnnamed1598(core.List<core.String> o) { |
1644 unittest.expect(o, unittest.hasLength(2)); | 1741 unittest.expect(o, unittest.hasLength(2)); |
1645 unittest.expect(o[0], unittest.equals('foo')); | 1742 unittest.expect(o[0], unittest.equals('foo')); |
1646 unittest.expect(o[1], unittest.equals('foo')); | 1743 unittest.expect(o[1], unittest.equals('foo')); |
1647 } | 1744 } |
1648 | 1745 |
1649 core.int buildCounterWebToken = 0; | 1746 core.int buildCounterWebToken = 0; |
1650 buildWebToken() { | 1747 buildWebToken() { |
1651 var o = new api.WebToken(); | 1748 var o = new api.WebToken(); |
1652 buildCounterWebToken++; | 1749 buildCounterWebToken++; |
1653 if (buildCounterWebToken < 3) { | 1750 if (buildCounterWebToken < 3) { |
1654 o.name = "foo"; | 1751 o.name = "foo"; |
1655 o.parentFrameUrl = "foo"; | 1752 o.parentFrameUrl = "foo"; |
1656 o.permissions = buildUnnamed1603(); | 1753 o.permissions = buildUnnamed1598(); |
1657 o.value = "foo"; | 1754 o.value = "foo"; |
1658 } | 1755 } |
1659 buildCounterWebToken--; | 1756 buildCounterWebToken--; |
1660 return o; | 1757 return o; |
1661 } | 1758 } |
1662 | 1759 |
1663 checkWebToken(api.WebToken o) { | 1760 checkWebToken(api.WebToken o) { |
1664 buildCounterWebToken++; | 1761 buildCounterWebToken++; |
1665 if (buildCounterWebToken < 3) { | 1762 if (buildCounterWebToken < 3) { |
1666 unittest.expect(o.name, unittest.equals('foo')); | 1763 unittest.expect(o.name, unittest.equals('foo')); |
1667 unittest.expect(o.parentFrameUrl, unittest.equals('foo')); | 1764 unittest.expect(o.parentFrameUrl, unittest.equals('foo')); |
1668 checkUnnamed1603(o.permissions); | 1765 checkUnnamed1598(o.permissions); |
1669 unittest.expect(o.value, unittest.equals('foo')); | 1766 unittest.expect(o.value, unittest.equals('foo')); |
1670 } | 1767 } |
1671 buildCounterWebToken--; | 1768 buildCounterWebToken--; |
1672 } | 1769 } |
1673 | 1770 |
1674 | |
1675 main() { | 1771 main() { |
1676 unittest.group("obj-schema-ApiLevelCondition", () { | 1772 unittest.group("obj-schema-ApiLevelCondition", () { |
1677 unittest.test("to-json--from-json", () { | 1773 unittest.test("to-json--from-json", () { |
1678 var o = buildApiLevelCondition(); | 1774 var o = buildApiLevelCondition(); |
1679 var od = new api.ApiLevelCondition.fromJson(o.toJson()); | 1775 var od = new api.ApiLevelCondition.fromJson(o.toJson()); |
1680 checkApiLevelCondition(od); | 1776 checkApiLevelCondition(od); |
1681 }); | 1777 }); |
1682 }); | 1778 }); |
1683 | 1779 |
1684 | |
1685 unittest.group("obj-schema-Application", () { | 1780 unittest.group("obj-schema-Application", () { |
1686 unittest.test("to-json--from-json", () { | 1781 unittest.test("to-json--from-json", () { |
1687 var o = buildApplication(); | 1782 var o = buildApplication(); |
1688 var od = new api.Application.fromJson(o.toJson()); | 1783 var od = new api.Application.fromJson(o.toJson()); |
1689 checkApplication(od); | 1784 checkApplication(od); |
1690 }); | 1785 }); |
1691 }); | 1786 }); |
1692 | 1787 |
1693 | |
1694 unittest.group("obj-schema-ApplicationPermission", () { | 1788 unittest.group("obj-schema-ApplicationPermission", () { |
1695 unittest.test("to-json--from-json", () { | 1789 unittest.test("to-json--from-json", () { |
1696 var o = buildApplicationPermission(); | 1790 var o = buildApplicationPermission(); |
1697 var od = new api.ApplicationPermission.fromJson(o.toJson()); | 1791 var od = new api.ApplicationPermission.fromJson(o.toJson()); |
1698 checkApplicationPermission(od); | 1792 checkApplicationPermission(od); |
1699 }); | 1793 }); |
1700 }); | 1794 }); |
1701 | 1795 |
1702 | |
1703 unittest.group("obj-schema-ApplicationPolicy", () { | 1796 unittest.group("obj-schema-ApplicationPolicy", () { |
1704 unittest.test("to-json--from-json", () { | 1797 unittest.test("to-json--from-json", () { |
1705 var o = buildApplicationPolicy(); | 1798 var o = buildApplicationPolicy(); |
1706 var od = new api.ApplicationPolicy.fromJson(o.toJson()); | 1799 var od = new api.ApplicationPolicy.fromJson(o.toJson()); |
1707 checkApplicationPolicy(od); | 1800 checkApplicationPolicy(od); |
1708 }); | 1801 }); |
1709 }); | 1802 }); |
1710 | 1803 |
1711 | |
1712 unittest.group("obj-schema-Command", () { | 1804 unittest.group("obj-schema-Command", () { |
1713 unittest.test("to-json--from-json", () { | 1805 unittest.test("to-json--from-json", () { |
1714 var o = buildCommand(); | 1806 var o = buildCommand(); |
1715 var od = new api.Command.fromJson(o.toJson()); | 1807 var od = new api.Command.fromJson(o.toJson()); |
1716 checkCommand(od); | 1808 checkCommand(od); |
1717 }); | 1809 }); |
1718 }); | 1810 }); |
1719 | 1811 |
1720 | |
1721 unittest.group("obj-schema-ComplianceRule", () { | 1812 unittest.group("obj-schema-ComplianceRule", () { |
1722 unittest.test("to-json--from-json", () { | 1813 unittest.test("to-json--from-json", () { |
1723 var o = buildComplianceRule(); | 1814 var o = buildComplianceRule(); |
1724 var od = new api.ComplianceRule.fromJson(o.toJson()); | 1815 var od = new api.ComplianceRule.fromJson(o.toJson()); |
1725 checkComplianceRule(od); | 1816 checkComplianceRule(od); |
1726 }); | 1817 }); |
1727 }); | 1818 }); |
1728 | 1819 |
1729 | |
1730 unittest.group("obj-schema-Device", () { | 1820 unittest.group("obj-schema-Device", () { |
1731 unittest.test("to-json--from-json", () { | 1821 unittest.test("to-json--from-json", () { |
1732 var o = buildDevice(); | 1822 var o = buildDevice(); |
1733 var od = new api.Device.fromJson(o.toJson()); | 1823 var od = new api.Device.fromJson(o.toJson()); |
1734 checkDevice(od); | 1824 checkDevice(od); |
1735 }); | 1825 }); |
1736 }); | 1826 }); |
1737 | 1827 |
1738 | |
1739 unittest.group("obj-schema-Display", () { | 1828 unittest.group("obj-schema-Display", () { |
1740 unittest.test("to-json--from-json", () { | 1829 unittest.test("to-json--from-json", () { |
1741 var o = buildDisplay(); | 1830 var o = buildDisplay(); |
1742 var od = new api.Display.fromJson(o.toJson()); | 1831 var od = new api.Display.fromJson(o.toJson()); |
1743 checkDisplay(od); | 1832 checkDisplay(od); |
1744 }); | 1833 }); |
1745 }); | 1834 }); |
1746 | 1835 |
1747 | |
1748 unittest.group("obj-schema-Empty", () { | 1836 unittest.group("obj-schema-Empty", () { |
1749 unittest.test("to-json--from-json", () { | 1837 unittest.test("to-json--from-json", () { |
1750 var o = buildEmpty(); | 1838 var o = buildEmpty(); |
1751 var od = new api.Empty.fromJson(o.toJson()); | 1839 var od = new api.Empty.fromJson(o.toJson()); |
1752 checkEmpty(od); | 1840 checkEmpty(od); |
1753 }); | 1841 }); |
1754 }); | 1842 }); |
1755 | 1843 |
1756 | |
1757 unittest.group("obj-schema-EnrollmentToken", () { | 1844 unittest.group("obj-schema-EnrollmentToken", () { |
1758 unittest.test("to-json--from-json", () { | 1845 unittest.test("to-json--from-json", () { |
1759 var o = buildEnrollmentToken(); | 1846 var o = buildEnrollmentToken(); |
1760 var od = new api.EnrollmentToken.fromJson(o.toJson()); | 1847 var od = new api.EnrollmentToken.fromJson(o.toJson()); |
1761 checkEnrollmentToken(od); | 1848 checkEnrollmentToken(od); |
1762 }); | 1849 }); |
1763 }); | 1850 }); |
1764 | 1851 |
1765 | |
1766 unittest.group("obj-schema-Enterprise", () { | 1852 unittest.group("obj-schema-Enterprise", () { |
1767 unittest.test("to-json--from-json", () { | 1853 unittest.test("to-json--from-json", () { |
1768 var o = buildEnterprise(); | 1854 var o = buildEnterprise(); |
1769 var od = new api.Enterprise.fromJson(o.toJson()); | 1855 var od = new api.Enterprise.fromJson(o.toJson()); |
1770 checkEnterprise(od); | 1856 checkEnterprise(od); |
1771 }); | 1857 }); |
1772 }); | 1858 }); |
1773 | 1859 |
1774 | |
1775 unittest.group("obj-schema-ExternalData", () { | 1860 unittest.group("obj-schema-ExternalData", () { |
1776 unittest.test("to-json--from-json", () { | 1861 unittest.test("to-json--from-json", () { |
1777 var o = buildExternalData(); | 1862 var o = buildExternalData(); |
1778 var od = new api.ExternalData.fromJson(o.toJson()); | 1863 var od = new api.ExternalData.fromJson(o.toJson()); |
1779 checkExternalData(od); | 1864 checkExternalData(od); |
1780 }); | 1865 }); |
1781 }); | 1866 }); |
1782 | 1867 |
1783 | |
1784 unittest.group("obj-schema-HardwareInfo", () { | 1868 unittest.group("obj-schema-HardwareInfo", () { |
1785 unittest.test("to-json--from-json", () { | 1869 unittest.test("to-json--from-json", () { |
1786 var o = buildHardwareInfo(); | 1870 var o = buildHardwareInfo(); |
1787 var od = new api.HardwareInfo.fromJson(o.toJson()); | 1871 var od = new api.HardwareInfo.fromJson(o.toJson()); |
1788 checkHardwareInfo(od); | 1872 checkHardwareInfo(od); |
1789 }); | 1873 }); |
1790 }); | 1874 }); |
1791 | 1875 |
1792 | |
1793 unittest.group("obj-schema-HardwareStatus", () { | 1876 unittest.group("obj-schema-HardwareStatus", () { |
1794 unittest.test("to-json--from-json", () { | 1877 unittest.test("to-json--from-json", () { |
1795 var o = buildHardwareStatus(); | 1878 var o = buildHardwareStatus(); |
1796 var od = new api.HardwareStatus.fromJson(o.toJson()); | 1879 var od = new api.HardwareStatus.fromJson(o.toJson()); |
1797 checkHardwareStatus(od); | 1880 checkHardwareStatus(od); |
1798 }); | 1881 }); |
1799 }); | 1882 }); |
1800 | 1883 |
1801 | |
1802 unittest.group("obj-schema-ListDevicesResponse", () { | 1884 unittest.group("obj-schema-ListDevicesResponse", () { |
1803 unittest.test("to-json--from-json", () { | 1885 unittest.test("to-json--from-json", () { |
1804 var o = buildListDevicesResponse(); | 1886 var o = buildListDevicesResponse(); |
1805 var od = new api.ListDevicesResponse.fromJson(o.toJson()); | 1887 var od = new api.ListDevicesResponse.fromJson(o.toJson()); |
1806 checkListDevicesResponse(od); | 1888 checkListDevicesResponse(od); |
1807 }); | 1889 }); |
1808 }); | 1890 }); |
1809 | 1891 |
1810 | |
1811 unittest.group("obj-schema-ListOperationsResponse", () { | 1892 unittest.group("obj-schema-ListOperationsResponse", () { |
1812 unittest.test("to-json--from-json", () { | 1893 unittest.test("to-json--from-json", () { |
1813 var o = buildListOperationsResponse(); | 1894 var o = buildListOperationsResponse(); |
1814 var od = new api.ListOperationsResponse.fromJson(o.toJson()); | 1895 var od = new api.ListOperationsResponse.fromJson(o.toJson()); |
1815 checkListOperationsResponse(od); | 1896 checkListOperationsResponse(od); |
1816 }); | 1897 }); |
1817 }); | 1898 }); |
1818 | 1899 |
1819 | |
1820 unittest.group("obj-schema-ListPoliciesResponse", () { | 1900 unittest.group("obj-schema-ListPoliciesResponse", () { |
1821 unittest.test("to-json--from-json", () { | 1901 unittest.test("to-json--from-json", () { |
1822 var o = buildListPoliciesResponse(); | 1902 var o = buildListPoliciesResponse(); |
1823 var od = new api.ListPoliciesResponse.fromJson(o.toJson()); | 1903 var od = new api.ListPoliciesResponse.fromJson(o.toJson()); |
1824 checkListPoliciesResponse(od); | 1904 checkListPoliciesResponse(od); |
1825 }); | 1905 }); |
1826 }); | 1906 }); |
1827 | 1907 |
1828 | |
1829 unittest.group("obj-schema-ManagedProperty", () { | 1908 unittest.group("obj-schema-ManagedProperty", () { |
1830 unittest.test("to-json--from-json", () { | 1909 unittest.test("to-json--from-json", () { |
1831 var o = buildManagedProperty(); | 1910 var o = buildManagedProperty(); |
1832 var od = new api.ManagedProperty.fromJson(o.toJson()); | 1911 var od = new api.ManagedProperty.fromJson(o.toJson()); |
1833 checkManagedProperty(od); | 1912 checkManagedProperty(od); |
1834 }); | 1913 }); |
1835 }); | 1914 }); |
1836 | 1915 |
1837 | |
1838 unittest.group("obj-schema-ManagedPropertyEntry", () { | 1916 unittest.group("obj-schema-ManagedPropertyEntry", () { |
1839 unittest.test("to-json--from-json", () { | 1917 unittest.test("to-json--from-json", () { |
1840 var o = buildManagedPropertyEntry(); | 1918 var o = buildManagedPropertyEntry(); |
1841 var od = new api.ManagedPropertyEntry.fromJson(o.toJson()); | 1919 var od = new api.ManagedPropertyEntry.fromJson(o.toJson()); |
1842 checkManagedPropertyEntry(od); | 1920 checkManagedPropertyEntry(od); |
1843 }); | 1921 }); |
1844 }); | 1922 }); |
1845 | 1923 |
1846 | |
1847 unittest.group("obj-schema-MemoryEvent", () { | 1924 unittest.group("obj-schema-MemoryEvent", () { |
1848 unittest.test("to-json--from-json", () { | 1925 unittest.test("to-json--from-json", () { |
1849 var o = buildMemoryEvent(); | 1926 var o = buildMemoryEvent(); |
1850 var od = new api.MemoryEvent.fromJson(o.toJson()); | 1927 var od = new api.MemoryEvent.fromJson(o.toJson()); |
1851 checkMemoryEvent(od); | 1928 checkMemoryEvent(od); |
1852 }); | 1929 }); |
1853 }); | 1930 }); |
1854 | 1931 |
1855 | |
1856 unittest.group("obj-schema-MemoryInfo", () { | 1932 unittest.group("obj-schema-MemoryInfo", () { |
1857 unittest.test("to-json--from-json", () { | 1933 unittest.test("to-json--from-json", () { |
1858 var o = buildMemoryInfo(); | 1934 var o = buildMemoryInfo(); |
1859 var od = new api.MemoryInfo.fromJson(o.toJson()); | 1935 var od = new api.MemoryInfo.fromJson(o.toJson()); |
1860 checkMemoryInfo(od); | 1936 checkMemoryInfo(od); |
1861 }); | 1937 }); |
1862 }); | 1938 }); |
1863 | 1939 |
1864 | |
1865 unittest.group("obj-schema-NetworkInfo", () { | 1940 unittest.group("obj-schema-NetworkInfo", () { |
1866 unittest.test("to-json--from-json", () { | 1941 unittest.test("to-json--from-json", () { |
1867 var o = buildNetworkInfo(); | 1942 var o = buildNetworkInfo(); |
1868 var od = new api.NetworkInfo.fromJson(o.toJson()); | 1943 var od = new api.NetworkInfo.fromJson(o.toJson()); |
1869 checkNetworkInfo(od); | 1944 checkNetworkInfo(od); |
1870 }); | 1945 }); |
1871 }); | 1946 }); |
1872 | 1947 |
1873 | |
1874 unittest.group("obj-schema-NonComplianceDetail", () { | 1948 unittest.group("obj-schema-NonComplianceDetail", () { |
1875 unittest.test("to-json--from-json", () { | 1949 unittest.test("to-json--from-json", () { |
1876 var o = buildNonComplianceDetail(); | 1950 var o = buildNonComplianceDetail(); |
1877 var od = new api.NonComplianceDetail.fromJson(o.toJson()); | 1951 var od = new api.NonComplianceDetail.fromJson(o.toJson()); |
1878 checkNonComplianceDetail(od); | 1952 checkNonComplianceDetail(od); |
1879 }); | 1953 }); |
1880 }); | 1954 }); |
1881 | 1955 |
1882 | |
1883 unittest.group("obj-schema-NonComplianceDetailCondition", () { | 1956 unittest.group("obj-schema-NonComplianceDetailCondition", () { |
1884 unittest.test("to-json--from-json", () { | 1957 unittest.test("to-json--from-json", () { |
1885 var o = buildNonComplianceDetailCondition(); | 1958 var o = buildNonComplianceDetailCondition(); |
1886 var od = new api.NonComplianceDetailCondition.fromJson(o.toJson()); | 1959 var od = new api.NonComplianceDetailCondition.fromJson(o.toJson()); |
1887 checkNonComplianceDetailCondition(od); | 1960 checkNonComplianceDetailCondition(od); |
1888 }); | 1961 }); |
1889 }); | 1962 }); |
1890 | 1963 |
1891 | |
1892 unittest.group("obj-schema-Operation", () { | 1964 unittest.group("obj-schema-Operation", () { |
1893 unittest.test("to-json--from-json", () { | 1965 unittest.test("to-json--from-json", () { |
1894 var o = buildOperation(); | 1966 var o = buildOperation(); |
1895 var od = new api.Operation.fromJson(o.toJson()); | 1967 var od = new api.Operation.fromJson(o.toJson()); |
1896 checkOperation(od); | 1968 checkOperation(od); |
1897 }); | 1969 }); |
1898 }); | 1970 }); |
1899 | 1971 |
1900 | |
1901 unittest.group("obj-schema-PasswordRequirements", () { | 1972 unittest.group("obj-schema-PasswordRequirements", () { |
1902 unittest.test("to-json--from-json", () { | 1973 unittest.test("to-json--from-json", () { |
1903 var o = buildPasswordRequirements(); | 1974 var o = buildPasswordRequirements(); |
1904 var od = new api.PasswordRequirements.fromJson(o.toJson()); | 1975 var od = new api.PasswordRequirements.fromJson(o.toJson()); |
1905 checkPasswordRequirements(od); | 1976 checkPasswordRequirements(od); |
1906 }); | 1977 }); |
1907 }); | 1978 }); |
1908 | 1979 |
1909 | |
1910 unittest.group("obj-schema-PermissionGrant", () { | 1980 unittest.group("obj-schema-PermissionGrant", () { |
1911 unittest.test("to-json--from-json", () { | 1981 unittest.test("to-json--from-json", () { |
1912 var o = buildPermissionGrant(); | 1982 var o = buildPermissionGrant(); |
1913 var od = new api.PermissionGrant.fromJson(o.toJson()); | 1983 var od = new api.PermissionGrant.fromJson(o.toJson()); |
1914 checkPermissionGrant(od); | 1984 checkPermissionGrant(od); |
1915 }); | 1985 }); |
1916 }); | 1986 }); |
1917 | 1987 |
1918 | |
1919 unittest.group("obj-schema-PersistentPreferredActivity", () { | 1988 unittest.group("obj-schema-PersistentPreferredActivity", () { |
1920 unittest.test("to-json--from-json", () { | 1989 unittest.test("to-json--from-json", () { |
1921 var o = buildPersistentPreferredActivity(); | 1990 var o = buildPersistentPreferredActivity(); |
1922 var od = new api.PersistentPreferredActivity.fromJson(o.toJson()); | 1991 var od = new api.PersistentPreferredActivity.fromJson(o.toJson()); |
1923 checkPersistentPreferredActivity(od); | 1992 checkPersistentPreferredActivity(od); |
1924 }); | 1993 }); |
1925 }); | 1994 }); |
1926 | 1995 |
1927 | |
1928 unittest.group("obj-schema-Policy", () { | 1996 unittest.group("obj-schema-Policy", () { |
1929 unittest.test("to-json--from-json", () { | 1997 unittest.test("to-json--from-json", () { |
1930 var o = buildPolicy(); | 1998 var o = buildPolicy(); |
1931 var od = new api.Policy.fromJson(o.toJson()); | 1999 var od = new api.Policy.fromJson(o.toJson()); |
1932 checkPolicy(od); | 2000 checkPolicy(od); |
1933 }); | 2001 }); |
1934 }); | 2002 }); |
1935 | 2003 |
1936 | |
1937 unittest.group("obj-schema-PowerManagementEvent", () { | 2004 unittest.group("obj-schema-PowerManagementEvent", () { |
1938 unittest.test("to-json--from-json", () { | 2005 unittest.test("to-json--from-json", () { |
1939 var o = buildPowerManagementEvent(); | 2006 var o = buildPowerManagementEvent(); |
1940 var od = new api.PowerManagementEvent.fromJson(o.toJson()); | 2007 var od = new api.PowerManagementEvent.fromJson(o.toJson()); |
1941 checkPowerManagementEvent(od); | 2008 checkPowerManagementEvent(od); |
1942 }); | 2009 }); |
1943 }); | 2010 }); |
1944 | 2011 |
1945 | |
1946 unittest.group("obj-schema-SignupUrl", () { | 2012 unittest.group("obj-schema-SignupUrl", () { |
1947 unittest.test("to-json--from-json", () { | 2013 unittest.test("to-json--from-json", () { |
1948 var o = buildSignupUrl(); | 2014 var o = buildSignupUrl(); |
1949 var od = new api.SignupUrl.fromJson(o.toJson()); | 2015 var od = new api.SignupUrl.fromJson(o.toJson()); |
1950 checkSignupUrl(od); | 2016 checkSignupUrl(od); |
1951 }); | 2017 }); |
1952 }); | 2018 }); |
1953 | 2019 |
1954 | |
1955 unittest.group("obj-schema-SoftwareInfo", () { | 2020 unittest.group("obj-schema-SoftwareInfo", () { |
1956 unittest.test("to-json--from-json", () { | 2021 unittest.test("to-json--from-json", () { |
1957 var o = buildSoftwareInfo(); | 2022 var o = buildSoftwareInfo(); |
1958 var od = new api.SoftwareInfo.fromJson(o.toJson()); | 2023 var od = new api.SoftwareInfo.fromJson(o.toJson()); |
1959 checkSoftwareInfo(od); | 2024 checkSoftwareInfo(od); |
1960 }); | 2025 }); |
1961 }); | 2026 }); |
1962 | 2027 |
1963 | |
1964 unittest.group("obj-schema-Status", () { | 2028 unittest.group("obj-schema-Status", () { |
1965 unittest.test("to-json--from-json", () { | 2029 unittest.test("to-json--from-json", () { |
1966 var o = buildStatus(); | 2030 var o = buildStatus(); |
1967 var od = new api.Status.fromJson(o.toJson()); | 2031 var od = new api.Status.fromJson(o.toJson()); |
1968 checkStatus(od); | 2032 checkStatus(od); |
1969 }); | 2033 }); |
1970 }); | 2034 }); |
1971 | 2035 |
1972 | |
1973 unittest.group("obj-schema-StatusReportingSettings", () { | 2036 unittest.group("obj-schema-StatusReportingSettings", () { |
1974 unittest.test("to-json--from-json", () { | 2037 unittest.test("to-json--from-json", () { |
1975 var o = buildStatusReportingSettings(); | 2038 var o = buildStatusReportingSettings(); |
1976 var od = new api.StatusReportingSettings.fromJson(o.toJson()); | 2039 var od = new api.StatusReportingSettings.fromJson(o.toJson()); |
1977 checkStatusReportingSettings(od); | 2040 checkStatusReportingSettings(od); |
1978 }); | 2041 }); |
1979 }); | 2042 }); |
1980 | 2043 |
1981 | |
1982 unittest.group("obj-schema-SystemUpdate", () { | 2044 unittest.group("obj-schema-SystemUpdate", () { |
1983 unittest.test("to-json--from-json", () { | 2045 unittest.test("to-json--from-json", () { |
1984 var o = buildSystemUpdate(); | 2046 var o = buildSystemUpdate(); |
1985 var od = new api.SystemUpdate.fromJson(o.toJson()); | 2047 var od = new api.SystemUpdate.fromJson(o.toJson()); |
1986 checkSystemUpdate(od); | 2048 checkSystemUpdate(od); |
1987 }); | 2049 }); |
1988 }); | 2050 }); |
1989 | 2051 |
1990 | |
1991 unittest.group("obj-schema-UserFacingMessage", () { | 2052 unittest.group("obj-schema-UserFacingMessage", () { |
1992 unittest.test("to-json--from-json", () { | 2053 unittest.test("to-json--from-json", () { |
1993 var o = buildUserFacingMessage(); | 2054 var o = buildUserFacingMessage(); |
1994 var od = new api.UserFacingMessage.fromJson(o.toJson()); | 2055 var od = new api.UserFacingMessage.fromJson(o.toJson()); |
1995 checkUserFacingMessage(od); | 2056 checkUserFacingMessage(od); |
1996 }); | 2057 }); |
1997 }); | 2058 }); |
1998 | 2059 |
1999 | |
2000 unittest.group("obj-schema-WebToken", () { | 2060 unittest.group("obj-schema-WebToken", () { |
2001 unittest.test("to-json--from-json", () { | 2061 unittest.test("to-json--from-json", () { |
2002 var o = buildWebToken(); | 2062 var o = buildWebToken(); |
2003 var od = new api.WebToken.fromJson(o.toJson()); | 2063 var od = new api.WebToken.fromJson(o.toJson()); |
2004 checkWebToken(od); | 2064 checkWebToken(od); |
2005 }); | 2065 }); |
2006 }); | 2066 }); |
2007 | 2067 |
2008 | |
2009 unittest.group("resource-EnterprisesResourceApi", () { | 2068 unittest.group("resource-EnterprisesResourceApi", () { |
2010 unittest.test("method--create", () { | 2069 unittest.test("method--create", () { |
2011 | |
2012 var mock = new HttpServerMock(); | 2070 var mock = new HttpServerMock(); |
2013 api.EnterprisesResourceApi res = new api.AndroidmanagementApi(mock).enterp
rises; | 2071 api.EnterprisesResourceApi res = |
| 2072 new api.AndroidmanagementApi(mock).enterprises; |
2014 var arg_request = buildEnterprise(); | 2073 var arg_request = buildEnterprise(); |
2015 var arg_signupUrlName = "foo"; | 2074 var arg_signupUrlName = "foo"; |
2016 var arg_enterpriseToken = "foo"; | 2075 var arg_enterpriseToken = "foo"; |
2017 var arg_projectId = "foo"; | 2076 var arg_projectId = "foo"; |
2018 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 2077 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
2019 var obj = new api.Enterprise.fromJson(json); | 2078 var obj = new api.Enterprise.fromJson(json); |
2020 checkEnterprise(obj); | 2079 checkEnterprise(obj); |
2021 | 2080 |
2022 var path = (req.url).path; | 2081 var path = (req.url).path; |
2023 var pathOffset = 0; | 2082 var pathOffset = 0; |
2024 var index; | 2083 var index; |
2025 var subPart; | 2084 var subPart; |
2026 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2085 unittest.expect( |
| 2086 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
2027 pathOffset += 1; | 2087 pathOffset += 1; |
2028 unittest.expect(path.substring(pathOffset, pathOffset + 14), unittest.eq
uals("v1/enterprises")); | 2088 unittest.expect(path.substring(pathOffset, pathOffset + 14), |
| 2089 unittest.equals("v1/enterprises")); |
2029 pathOffset += 14; | 2090 pathOffset += 14; |
2030 | 2091 |
2031 var query = (req.url).query; | 2092 var query = (req.url).query; |
2032 var queryOffset = 0; | 2093 var queryOffset = 0; |
2033 var queryMap = {}; | 2094 var queryMap = {}; |
2034 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 2095 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
2035 parseBool(n) { | 2096 parseBool(n) { |
2036 if (n == "true") return true; | 2097 if (n == "true") return true; |
2037 if (n == "false") return false; | 2098 if (n == "false") return false; |
2038 if (n == null) return null; | 2099 if (n == null) return null; |
2039 throw new core.ArgumentError("Invalid boolean: $n"); | 2100 throw new core.ArgumentError("Invalid boolean: $n"); |
2040 } | 2101 } |
| 2102 |
2041 if (query.length > 0) { | 2103 if (query.length > 0) { |
2042 for (var part in query.split("&")) { | 2104 for (var part in query.split("&")) { |
2043 var keyvalue = part.split("="); | 2105 var keyvalue = part.split("="); |
2044 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 2106 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 2107 core.Uri.decodeQueryComponent(keyvalue[1])); |
2045 } | 2108 } |
2046 } | 2109 } |
2047 unittest.expect(queryMap["signupUrlName"].first, unittest.equals(arg_sig
nupUrlName)); | 2110 unittest.expect(queryMap["signupUrlName"].first, |
2048 unittest.expect(queryMap["enterpriseToken"].first, unittest.equals(arg_e
nterpriseToken)); | 2111 unittest.equals(arg_signupUrlName)); |
2049 unittest.expect(queryMap["projectId"].first, unittest.equals(arg_project
Id)); | 2112 unittest.expect(queryMap["enterpriseToken"].first, |
2050 | 2113 unittest.equals(arg_enterpriseToken)); |
| 2114 unittest.expect( |
| 2115 queryMap["projectId"].first, unittest.equals(arg_projectId)); |
2051 | 2116 |
2052 var h = { | 2117 var h = { |
2053 "content-type" : "application/json; charset=utf-8", | 2118 "content-type": "application/json; charset=utf-8", |
2054 }; | 2119 }; |
2055 var resp = convert.JSON.encode(buildEnterprise()); | 2120 var resp = convert.JSON.encode(buildEnterprise()); |
2056 return new async.Future.value(stringResponse(200, h, resp)); | 2121 return new async.Future.value(stringResponse(200, h, resp)); |
2057 }), true); | 2122 }), true); |
2058 res.create(arg_request, signupUrlName: arg_signupUrlName, enterpriseToken:
arg_enterpriseToken, projectId: arg_projectId).then(unittest.expectAsync1(((api
.Enterprise response) { | 2123 res |
| 2124 .create(arg_request, |
| 2125 signupUrlName: arg_signupUrlName, |
| 2126 enterpriseToken: arg_enterpriseToken, |
| 2127 projectId: arg_projectId) |
| 2128 .then(unittest.expectAsync1(((api.Enterprise response) { |
2059 checkEnterprise(response); | 2129 checkEnterprise(response); |
2060 }))); | 2130 }))); |
2061 }); | 2131 }); |
2062 | 2132 |
2063 unittest.test("method--get", () { | 2133 unittest.test("method--get", () { |
2064 | |
2065 var mock = new HttpServerMock(); | 2134 var mock = new HttpServerMock(); |
2066 api.EnterprisesResourceApi res = new api.AndroidmanagementApi(mock).enterp
rises; | 2135 api.EnterprisesResourceApi res = |
| 2136 new api.AndroidmanagementApi(mock).enterprises; |
2067 var arg_name = "foo"; | 2137 var arg_name = "foo"; |
2068 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 2138 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
2069 var path = (req.url).path; | 2139 var path = (req.url).path; |
2070 var pathOffset = 0; | 2140 var pathOffset = 0; |
2071 var index; | 2141 var index; |
2072 var subPart; | 2142 var subPart; |
2073 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2143 unittest.expect( |
| 2144 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
2074 pathOffset += 1; | 2145 pathOffset += 1; |
2075 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); | 2146 unittest.expect( |
| 2147 path.substring(pathOffset, pathOffset + 3), unittest.equals("v1/")); |
2076 pathOffset += 3; | 2148 pathOffset += 3; |
2077 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; | 2149 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; |
2078 | 2150 |
2079 var query = (req.url).query; | 2151 var query = (req.url).query; |
2080 var queryOffset = 0; | 2152 var queryOffset = 0; |
2081 var queryMap = {}; | 2153 var queryMap = {}; |
2082 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 2154 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
2083 parseBool(n) { | 2155 parseBool(n) { |
2084 if (n == "true") return true; | 2156 if (n == "true") return true; |
2085 if (n == "false") return false; | 2157 if (n == "false") return false; |
2086 if (n == null) return null; | 2158 if (n == null) return null; |
2087 throw new core.ArgumentError("Invalid boolean: $n"); | 2159 throw new core.ArgumentError("Invalid boolean: $n"); |
2088 } | 2160 } |
| 2161 |
2089 if (query.length > 0) { | 2162 if (query.length > 0) { |
2090 for (var part in query.split("&")) { | 2163 for (var part in query.split("&")) { |
2091 var keyvalue = part.split("="); | 2164 var keyvalue = part.split("="); |
2092 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 2165 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 2166 core.Uri.decodeQueryComponent(keyvalue[1])); |
2093 } | 2167 } |
2094 } | 2168 } |
2095 | 2169 |
2096 | |
2097 var h = { | 2170 var h = { |
2098 "content-type" : "application/json; charset=utf-8", | 2171 "content-type": "application/json; charset=utf-8", |
2099 }; | 2172 }; |
2100 var resp = convert.JSON.encode(buildEnterprise()); | 2173 var resp = convert.JSON.encode(buildEnterprise()); |
2101 return new async.Future.value(stringResponse(200, h, resp)); | 2174 return new async.Future.value(stringResponse(200, h, resp)); |
2102 }), true); | 2175 }), true); |
2103 res.get(arg_name).then(unittest.expectAsync1(((api.Enterprise response) { | 2176 res.get(arg_name).then(unittest.expectAsync1(((api.Enterprise response) { |
2104 checkEnterprise(response); | 2177 checkEnterprise(response); |
2105 }))); | 2178 }))); |
2106 }); | 2179 }); |
2107 | 2180 |
2108 unittest.test("method--patch", () { | 2181 unittest.test("method--patch", () { |
2109 | |
2110 var mock = new HttpServerMock(); | 2182 var mock = new HttpServerMock(); |
2111 api.EnterprisesResourceApi res = new api.AndroidmanagementApi(mock).enterp
rises; | 2183 api.EnterprisesResourceApi res = |
| 2184 new api.AndroidmanagementApi(mock).enterprises; |
2112 var arg_request = buildEnterprise(); | 2185 var arg_request = buildEnterprise(); |
2113 var arg_name = "foo"; | 2186 var arg_name = "foo"; |
2114 var arg_updateMask = "foo"; | 2187 var arg_updateMask = "foo"; |
2115 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 2188 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
2116 var obj = new api.Enterprise.fromJson(json); | 2189 var obj = new api.Enterprise.fromJson(json); |
2117 checkEnterprise(obj); | 2190 checkEnterprise(obj); |
2118 | 2191 |
2119 var path = (req.url).path; | 2192 var path = (req.url).path; |
2120 var pathOffset = 0; | 2193 var pathOffset = 0; |
2121 var index; | 2194 var index; |
2122 var subPart; | 2195 var subPart; |
2123 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2196 unittest.expect( |
| 2197 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
2124 pathOffset += 1; | 2198 pathOffset += 1; |
2125 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); | 2199 unittest.expect( |
| 2200 path.substring(pathOffset, pathOffset + 3), unittest.equals("v1/")); |
2126 pathOffset += 3; | 2201 pathOffset += 3; |
2127 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; | 2202 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; |
2128 | 2203 |
2129 var query = (req.url).query; | 2204 var query = (req.url).query; |
2130 var queryOffset = 0; | 2205 var queryOffset = 0; |
2131 var queryMap = {}; | 2206 var queryMap = {}; |
2132 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 2207 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
2133 parseBool(n) { | 2208 parseBool(n) { |
2134 if (n == "true") return true; | 2209 if (n == "true") return true; |
2135 if (n == "false") return false; | 2210 if (n == "false") return false; |
2136 if (n == null) return null; | 2211 if (n == null) return null; |
2137 throw new core.ArgumentError("Invalid boolean: $n"); | 2212 throw new core.ArgumentError("Invalid boolean: $n"); |
2138 } | 2213 } |
| 2214 |
2139 if (query.length > 0) { | 2215 if (query.length > 0) { |
2140 for (var part in query.split("&")) { | 2216 for (var part in query.split("&")) { |
2141 var keyvalue = part.split("="); | 2217 var keyvalue = part.split("="); |
2142 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 2218 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 2219 core.Uri.decodeQueryComponent(keyvalue[1])); |
2143 } | 2220 } |
2144 } | 2221 } |
2145 unittest.expect(queryMap["updateMask"].first, unittest.equals(arg_update
Mask)); | 2222 unittest.expect( |
2146 | 2223 queryMap["updateMask"].first, unittest.equals(arg_updateMask)); |
2147 | 2224 |
2148 var h = { | 2225 var h = { |
2149 "content-type" : "application/json; charset=utf-8", | 2226 "content-type": "application/json; charset=utf-8", |
2150 }; | 2227 }; |
2151 var resp = convert.JSON.encode(buildEnterprise()); | 2228 var resp = convert.JSON.encode(buildEnterprise()); |
2152 return new async.Future.value(stringResponse(200, h, resp)); | 2229 return new async.Future.value(stringResponse(200, h, resp)); |
2153 }), true); | 2230 }), true); |
2154 res.patch(arg_request, arg_name, updateMask: arg_updateMask).then(unittest
.expectAsync1(((api.Enterprise response) { | 2231 res |
| 2232 .patch(arg_request, arg_name, updateMask: arg_updateMask) |
| 2233 .then(unittest.expectAsync1(((api.Enterprise response) { |
2155 checkEnterprise(response); | 2234 checkEnterprise(response); |
2156 }))); | 2235 }))); |
2157 }); | 2236 }); |
2158 | |
2159 }); | 2237 }); |
2160 | 2238 |
2161 | |
2162 unittest.group("resource-EnterprisesApplicationsResourceApi", () { | 2239 unittest.group("resource-EnterprisesApplicationsResourceApi", () { |
2163 unittest.test("method--get", () { | 2240 unittest.test("method--get", () { |
2164 | |
2165 var mock = new HttpServerMock(); | 2241 var mock = new HttpServerMock(); |
2166 api.EnterprisesApplicationsResourceApi res = new api.AndroidmanagementApi(
mock).enterprises.applications; | 2242 api.EnterprisesApplicationsResourceApi res = |
| 2243 new api.AndroidmanagementApi(mock).enterprises.applications; |
2167 var arg_name = "foo"; | 2244 var arg_name = "foo"; |
2168 var arg_languageCode = "foo"; | 2245 var arg_languageCode = "foo"; |
2169 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 2246 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
2170 var path = (req.url).path; | 2247 var path = (req.url).path; |
2171 var pathOffset = 0; | 2248 var pathOffset = 0; |
2172 var index; | 2249 var index; |
2173 var subPart; | 2250 var subPart; |
2174 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2251 unittest.expect( |
| 2252 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
2175 pathOffset += 1; | 2253 pathOffset += 1; |
2176 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); | 2254 unittest.expect( |
| 2255 path.substring(pathOffset, pathOffset + 3), unittest.equals("v1/")); |
2177 pathOffset += 3; | 2256 pathOffset += 3; |
2178 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; | 2257 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; |
2179 | 2258 |
2180 var query = (req.url).query; | 2259 var query = (req.url).query; |
2181 var queryOffset = 0; | 2260 var queryOffset = 0; |
2182 var queryMap = {}; | 2261 var queryMap = {}; |
2183 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 2262 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
2184 parseBool(n) { | 2263 parseBool(n) { |
2185 if (n == "true") return true; | 2264 if (n == "true") return true; |
2186 if (n == "false") return false; | 2265 if (n == "false") return false; |
2187 if (n == null) return null; | 2266 if (n == null) return null; |
2188 throw new core.ArgumentError("Invalid boolean: $n"); | 2267 throw new core.ArgumentError("Invalid boolean: $n"); |
2189 } | 2268 } |
| 2269 |
2190 if (query.length > 0) { | 2270 if (query.length > 0) { |
2191 for (var part in query.split("&")) { | 2271 for (var part in query.split("&")) { |
2192 var keyvalue = part.split("="); | 2272 var keyvalue = part.split("="); |
2193 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 2273 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 2274 core.Uri.decodeQueryComponent(keyvalue[1])); |
2194 } | 2275 } |
2195 } | 2276 } |
2196 unittest.expect(queryMap["languageCode"].first, unittest.equals(arg_lang
uageCode)); | 2277 unittest.expect( |
2197 | 2278 queryMap["languageCode"].first, unittest.equals(arg_languageCode)); |
2198 | 2279 |
2199 var h = { | 2280 var h = { |
2200 "content-type" : "application/json; charset=utf-8", | 2281 "content-type": "application/json; charset=utf-8", |
2201 }; | 2282 }; |
2202 var resp = convert.JSON.encode(buildApplication()); | 2283 var resp = convert.JSON.encode(buildApplication()); |
2203 return new async.Future.value(stringResponse(200, h, resp)); | 2284 return new async.Future.value(stringResponse(200, h, resp)); |
2204 }), true); | 2285 }), true); |
2205 res.get(arg_name, languageCode: arg_languageCode).then(unittest.expectAsyn
c1(((api.Application response) { | 2286 res |
| 2287 .get(arg_name, languageCode: arg_languageCode) |
| 2288 .then(unittest.expectAsync1(((api.Application response) { |
2206 checkApplication(response); | 2289 checkApplication(response); |
2207 }))); | 2290 }))); |
2208 }); | 2291 }); |
2209 | |
2210 }); | 2292 }); |
2211 | 2293 |
2212 | |
2213 unittest.group("resource-EnterprisesDevicesResourceApi", () { | 2294 unittest.group("resource-EnterprisesDevicesResourceApi", () { |
2214 unittest.test("method--delete", () { | 2295 unittest.test("method--delete", () { |
2215 | |
2216 var mock = new HttpServerMock(); | 2296 var mock = new HttpServerMock(); |
2217 api.EnterprisesDevicesResourceApi res = new api.AndroidmanagementApi(mock)
.enterprises.devices; | 2297 api.EnterprisesDevicesResourceApi res = |
| 2298 new api.AndroidmanagementApi(mock).enterprises.devices; |
2218 var arg_name = "foo"; | 2299 var arg_name = "foo"; |
2219 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 2300 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
2220 var path = (req.url).path; | 2301 var path = (req.url).path; |
2221 var pathOffset = 0; | 2302 var pathOffset = 0; |
2222 var index; | 2303 var index; |
2223 var subPart; | 2304 var subPart; |
2224 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2305 unittest.expect( |
| 2306 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
2225 pathOffset += 1; | 2307 pathOffset += 1; |
2226 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); | 2308 unittest.expect( |
| 2309 path.substring(pathOffset, pathOffset + 3), unittest.equals("v1/")); |
2227 pathOffset += 3; | 2310 pathOffset += 3; |
2228 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; | 2311 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; |
2229 | 2312 |
2230 var query = (req.url).query; | 2313 var query = (req.url).query; |
2231 var queryOffset = 0; | 2314 var queryOffset = 0; |
2232 var queryMap = {}; | 2315 var queryMap = {}; |
2233 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 2316 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
2234 parseBool(n) { | 2317 parseBool(n) { |
2235 if (n == "true") return true; | 2318 if (n == "true") return true; |
2236 if (n == "false") return false; | 2319 if (n == "false") return false; |
2237 if (n == null) return null; | 2320 if (n == null) return null; |
2238 throw new core.ArgumentError("Invalid boolean: $n"); | 2321 throw new core.ArgumentError("Invalid boolean: $n"); |
2239 } | 2322 } |
| 2323 |
2240 if (query.length > 0) { | 2324 if (query.length > 0) { |
2241 for (var part in query.split("&")) { | 2325 for (var part in query.split("&")) { |
2242 var keyvalue = part.split("="); | 2326 var keyvalue = part.split("="); |
2243 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 2327 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 2328 core.Uri.decodeQueryComponent(keyvalue[1])); |
2244 } | 2329 } |
2245 } | 2330 } |
2246 | 2331 |
2247 | |
2248 var h = { | 2332 var h = { |
2249 "content-type" : "application/json; charset=utf-8", | 2333 "content-type": "application/json; charset=utf-8", |
2250 }; | 2334 }; |
2251 var resp = convert.JSON.encode(buildEmpty()); | 2335 var resp = convert.JSON.encode(buildEmpty()); |
2252 return new async.Future.value(stringResponse(200, h, resp)); | 2336 return new async.Future.value(stringResponse(200, h, resp)); |
2253 }), true); | 2337 }), true); |
2254 res.delete(arg_name).then(unittest.expectAsync1(((api.Empty response) { | 2338 res.delete(arg_name).then(unittest.expectAsync1(((api.Empty response) { |
2255 checkEmpty(response); | 2339 checkEmpty(response); |
2256 }))); | 2340 }))); |
2257 }); | 2341 }); |
2258 | 2342 |
2259 unittest.test("method--get", () { | 2343 unittest.test("method--get", () { |
2260 | |
2261 var mock = new HttpServerMock(); | 2344 var mock = new HttpServerMock(); |
2262 api.EnterprisesDevicesResourceApi res = new api.AndroidmanagementApi(mock)
.enterprises.devices; | 2345 api.EnterprisesDevicesResourceApi res = |
| 2346 new api.AndroidmanagementApi(mock).enterprises.devices; |
2263 var arg_name = "foo"; | 2347 var arg_name = "foo"; |
2264 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 2348 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
2265 var path = (req.url).path; | 2349 var path = (req.url).path; |
2266 var pathOffset = 0; | 2350 var pathOffset = 0; |
2267 var index; | 2351 var index; |
2268 var subPart; | 2352 var subPart; |
2269 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2353 unittest.expect( |
| 2354 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
2270 pathOffset += 1; | 2355 pathOffset += 1; |
2271 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); | 2356 unittest.expect( |
| 2357 path.substring(pathOffset, pathOffset + 3), unittest.equals("v1/")); |
2272 pathOffset += 3; | 2358 pathOffset += 3; |
2273 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; | 2359 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; |
2274 | 2360 |
2275 var query = (req.url).query; | 2361 var query = (req.url).query; |
2276 var queryOffset = 0; | 2362 var queryOffset = 0; |
2277 var queryMap = {}; | 2363 var queryMap = {}; |
2278 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 2364 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
2279 parseBool(n) { | 2365 parseBool(n) { |
2280 if (n == "true") return true; | 2366 if (n == "true") return true; |
2281 if (n == "false") return false; | 2367 if (n == "false") return false; |
2282 if (n == null) return null; | 2368 if (n == null) return null; |
2283 throw new core.ArgumentError("Invalid boolean: $n"); | 2369 throw new core.ArgumentError("Invalid boolean: $n"); |
2284 } | 2370 } |
| 2371 |
2285 if (query.length > 0) { | 2372 if (query.length > 0) { |
2286 for (var part in query.split("&")) { | 2373 for (var part in query.split("&")) { |
2287 var keyvalue = part.split("="); | 2374 var keyvalue = part.split("="); |
2288 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 2375 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 2376 core.Uri.decodeQueryComponent(keyvalue[1])); |
2289 } | 2377 } |
2290 } | 2378 } |
2291 | 2379 |
2292 | |
2293 var h = { | 2380 var h = { |
2294 "content-type" : "application/json; charset=utf-8", | 2381 "content-type": "application/json; charset=utf-8", |
2295 }; | 2382 }; |
2296 var resp = convert.JSON.encode(buildDevice()); | 2383 var resp = convert.JSON.encode(buildDevice()); |
2297 return new async.Future.value(stringResponse(200, h, resp)); | 2384 return new async.Future.value(stringResponse(200, h, resp)); |
2298 }), true); | 2385 }), true); |
2299 res.get(arg_name).then(unittest.expectAsync1(((api.Device response) { | 2386 res.get(arg_name).then(unittest.expectAsync1(((api.Device response) { |
2300 checkDevice(response); | 2387 checkDevice(response); |
2301 }))); | 2388 }))); |
2302 }); | 2389 }); |
2303 | 2390 |
2304 unittest.test("method--issueCommand", () { | 2391 unittest.test("method--issueCommand", () { |
2305 | |
2306 var mock = new HttpServerMock(); | 2392 var mock = new HttpServerMock(); |
2307 api.EnterprisesDevicesResourceApi res = new api.AndroidmanagementApi(mock)
.enterprises.devices; | 2393 api.EnterprisesDevicesResourceApi res = |
| 2394 new api.AndroidmanagementApi(mock).enterprises.devices; |
2308 var arg_request = buildCommand(); | 2395 var arg_request = buildCommand(); |
2309 var arg_name = "foo"; | 2396 var arg_name = "foo"; |
2310 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 2397 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
2311 var obj = new api.Command.fromJson(json); | 2398 var obj = new api.Command.fromJson(json); |
2312 checkCommand(obj); | 2399 checkCommand(obj); |
2313 | 2400 |
2314 var path = (req.url).path; | 2401 var path = (req.url).path; |
2315 var pathOffset = 0; | 2402 var pathOffset = 0; |
2316 var index; | 2403 var index; |
2317 var subPart; | 2404 var subPart; |
2318 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2405 unittest.expect( |
| 2406 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
2319 pathOffset += 1; | 2407 pathOffset += 1; |
2320 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); | 2408 unittest.expect( |
| 2409 path.substring(pathOffset, pathOffset + 3), unittest.equals("v1/")); |
2321 pathOffset += 3; | 2410 pathOffset += 3; |
2322 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; | 2411 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; |
2323 | 2412 |
2324 var query = (req.url).query; | 2413 var query = (req.url).query; |
2325 var queryOffset = 0; | 2414 var queryOffset = 0; |
2326 var queryMap = {}; | 2415 var queryMap = {}; |
2327 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 2416 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
2328 parseBool(n) { | 2417 parseBool(n) { |
2329 if (n == "true") return true; | 2418 if (n == "true") return true; |
2330 if (n == "false") return false; | 2419 if (n == "false") return false; |
2331 if (n == null) return null; | 2420 if (n == null) return null; |
2332 throw new core.ArgumentError("Invalid boolean: $n"); | 2421 throw new core.ArgumentError("Invalid boolean: $n"); |
2333 } | 2422 } |
| 2423 |
2334 if (query.length > 0) { | 2424 if (query.length > 0) { |
2335 for (var part in query.split("&")) { | 2425 for (var part in query.split("&")) { |
2336 var keyvalue = part.split("="); | 2426 var keyvalue = part.split("="); |
2337 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 2427 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 2428 core.Uri.decodeQueryComponent(keyvalue[1])); |
2338 } | 2429 } |
2339 } | 2430 } |
2340 | 2431 |
2341 | |
2342 var h = { | 2432 var h = { |
2343 "content-type" : "application/json; charset=utf-8", | 2433 "content-type": "application/json; charset=utf-8", |
2344 }; | 2434 }; |
2345 var resp = convert.JSON.encode(buildOperation()); | 2435 var resp = convert.JSON.encode(buildOperation()); |
2346 return new async.Future.value(stringResponse(200, h, resp)); | 2436 return new async.Future.value(stringResponse(200, h, resp)); |
2347 }), true); | 2437 }), true); |
2348 res.issueCommand(arg_request, arg_name).then(unittest.expectAsync1(((api.O
peration response) { | 2438 res |
| 2439 .issueCommand(arg_request, arg_name) |
| 2440 .then(unittest.expectAsync1(((api.Operation response) { |
2349 checkOperation(response); | 2441 checkOperation(response); |
2350 }))); | 2442 }))); |
2351 }); | 2443 }); |
2352 | 2444 |
2353 unittest.test("method--list", () { | 2445 unittest.test("method--list", () { |
2354 | |
2355 var mock = new HttpServerMock(); | 2446 var mock = new HttpServerMock(); |
2356 api.EnterprisesDevicesResourceApi res = new api.AndroidmanagementApi(mock)
.enterprises.devices; | 2447 api.EnterprisesDevicesResourceApi res = |
| 2448 new api.AndroidmanagementApi(mock).enterprises.devices; |
2357 var arg_parent = "foo"; | 2449 var arg_parent = "foo"; |
2358 var arg_pageSize = 42; | 2450 var arg_pageSize = 42; |
2359 var arg_pageToken = "foo"; | 2451 var arg_pageToken = "foo"; |
2360 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 2452 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
2361 var path = (req.url).path; | 2453 var path = (req.url).path; |
2362 var pathOffset = 0; | 2454 var pathOffset = 0; |
2363 var index; | 2455 var index; |
2364 var subPart; | 2456 var subPart; |
2365 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2457 unittest.expect( |
| 2458 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
2366 pathOffset += 1; | 2459 pathOffset += 1; |
2367 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); | 2460 unittest.expect( |
| 2461 path.substring(pathOffset, pathOffset + 3), unittest.equals("v1/")); |
2368 pathOffset += 3; | 2462 pathOffset += 3; |
2369 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; | 2463 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; |
2370 | 2464 |
2371 var query = (req.url).query; | 2465 var query = (req.url).query; |
2372 var queryOffset = 0; | 2466 var queryOffset = 0; |
2373 var queryMap = {}; | 2467 var queryMap = {}; |
2374 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 2468 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
2375 parseBool(n) { | 2469 parseBool(n) { |
2376 if (n == "true") return true; | 2470 if (n == "true") return true; |
2377 if (n == "false") return false; | 2471 if (n == "false") return false; |
2378 if (n == null) return null; | 2472 if (n == null) return null; |
2379 throw new core.ArgumentError("Invalid boolean: $n"); | 2473 throw new core.ArgumentError("Invalid boolean: $n"); |
2380 } | 2474 } |
| 2475 |
2381 if (query.length > 0) { | 2476 if (query.length > 0) { |
2382 for (var part in query.split("&")) { | 2477 for (var part in query.split("&")) { |
2383 var keyvalue = part.split("="); | 2478 var keyvalue = part.split("="); |
2384 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 2479 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 2480 core.Uri.decodeQueryComponent(keyvalue[1])); |
2385 } | 2481 } |
2386 } | 2482 } |
2387 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ
als(arg_pageSize)); | 2483 unittest.expect(core.int.parse(queryMap["pageSize"].first), |
2388 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | 2484 unittest.equals(arg_pageSize)); |
2389 | 2485 unittest.expect( |
| 2486 queryMap["pageToken"].first, unittest.equals(arg_pageToken)); |
2390 | 2487 |
2391 var h = { | 2488 var h = { |
2392 "content-type" : "application/json; charset=utf-8", | 2489 "content-type": "application/json; charset=utf-8", |
2393 }; | 2490 }; |
2394 var resp = convert.JSON.encode(buildListDevicesResponse()); | 2491 var resp = convert.JSON.encode(buildListDevicesResponse()); |
2395 return new async.Future.value(stringResponse(200, h, resp)); | 2492 return new async.Future.value(stringResponse(200, h, resp)); |
2396 }), true); | 2493 }), true); |
2397 res.list(arg_parent, pageSize: arg_pageSize, pageToken: arg_pageToken).the
n(unittest.expectAsync1(((api.ListDevicesResponse response) { | 2494 res |
| 2495 .list(arg_parent, pageSize: arg_pageSize, pageToken: arg_pageToken) |
| 2496 .then(unittest.expectAsync1(((api.ListDevicesResponse response) { |
2398 checkListDevicesResponse(response); | 2497 checkListDevicesResponse(response); |
2399 }))); | 2498 }))); |
2400 }); | 2499 }); |
2401 | 2500 |
2402 unittest.test("method--patch", () { | 2501 unittest.test("method--patch", () { |
2403 | |
2404 var mock = new HttpServerMock(); | 2502 var mock = new HttpServerMock(); |
2405 api.EnterprisesDevicesResourceApi res = new api.AndroidmanagementApi(mock)
.enterprises.devices; | 2503 api.EnterprisesDevicesResourceApi res = |
| 2504 new api.AndroidmanagementApi(mock).enterprises.devices; |
2406 var arg_request = buildDevice(); | 2505 var arg_request = buildDevice(); |
2407 var arg_name = "foo"; | 2506 var arg_name = "foo"; |
2408 var arg_updateMask = "foo"; | 2507 var arg_updateMask = "foo"; |
2409 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 2508 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
2410 var obj = new api.Device.fromJson(json); | 2509 var obj = new api.Device.fromJson(json); |
2411 checkDevice(obj); | 2510 checkDevice(obj); |
2412 | 2511 |
2413 var path = (req.url).path; | 2512 var path = (req.url).path; |
2414 var pathOffset = 0; | 2513 var pathOffset = 0; |
2415 var index; | 2514 var index; |
2416 var subPart; | 2515 var subPart; |
2417 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2516 unittest.expect( |
| 2517 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
2418 pathOffset += 1; | 2518 pathOffset += 1; |
2419 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); | 2519 unittest.expect( |
| 2520 path.substring(pathOffset, pathOffset + 3), unittest.equals("v1/")); |
2420 pathOffset += 3; | 2521 pathOffset += 3; |
2421 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; | 2522 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; |
2422 | 2523 |
2423 var query = (req.url).query; | 2524 var query = (req.url).query; |
2424 var queryOffset = 0; | 2525 var queryOffset = 0; |
2425 var queryMap = {}; | 2526 var queryMap = {}; |
2426 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 2527 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
2427 parseBool(n) { | 2528 parseBool(n) { |
2428 if (n == "true") return true; | 2529 if (n == "true") return true; |
2429 if (n == "false") return false; | 2530 if (n == "false") return false; |
2430 if (n == null) return null; | 2531 if (n == null) return null; |
2431 throw new core.ArgumentError("Invalid boolean: $n"); | 2532 throw new core.ArgumentError("Invalid boolean: $n"); |
2432 } | 2533 } |
| 2534 |
2433 if (query.length > 0) { | 2535 if (query.length > 0) { |
2434 for (var part in query.split("&")) { | 2536 for (var part in query.split("&")) { |
2435 var keyvalue = part.split("="); | 2537 var keyvalue = part.split("="); |
2436 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 2538 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 2539 core.Uri.decodeQueryComponent(keyvalue[1])); |
2437 } | 2540 } |
2438 } | 2541 } |
2439 unittest.expect(queryMap["updateMask"].first, unittest.equals(arg_update
Mask)); | 2542 unittest.expect( |
2440 | 2543 queryMap["updateMask"].first, unittest.equals(arg_updateMask)); |
2441 | 2544 |
2442 var h = { | 2545 var h = { |
2443 "content-type" : "application/json; charset=utf-8", | 2546 "content-type": "application/json; charset=utf-8", |
2444 }; | 2547 }; |
2445 var resp = convert.JSON.encode(buildDevice()); | 2548 var resp = convert.JSON.encode(buildDevice()); |
2446 return new async.Future.value(stringResponse(200, h, resp)); | 2549 return new async.Future.value(stringResponse(200, h, resp)); |
2447 }), true); | 2550 }), true); |
2448 res.patch(arg_request, arg_name, updateMask: arg_updateMask).then(unittest
.expectAsync1(((api.Device response) { | 2551 res |
| 2552 .patch(arg_request, arg_name, updateMask: arg_updateMask) |
| 2553 .then(unittest.expectAsync1(((api.Device response) { |
2449 checkDevice(response); | 2554 checkDevice(response); |
2450 }))); | 2555 }))); |
2451 }); | 2556 }); |
2452 | |
2453 }); | 2557 }); |
2454 | 2558 |
2455 | |
2456 unittest.group("resource-EnterprisesDevicesOperationsResourceApi", () { | 2559 unittest.group("resource-EnterprisesDevicesOperationsResourceApi", () { |
2457 unittest.test("method--cancel", () { | 2560 unittest.test("method--cancel", () { |
2458 | |
2459 var mock = new HttpServerMock(); | 2561 var mock = new HttpServerMock(); |
2460 api.EnterprisesDevicesOperationsResourceApi res = new api.Androidmanagemen
tApi(mock).enterprises.devices.operations; | 2562 api.EnterprisesDevicesOperationsResourceApi res = |
| 2563 new api.AndroidmanagementApi(mock).enterprises.devices.operations; |
2461 var arg_name = "foo"; | 2564 var arg_name = "foo"; |
2462 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 2565 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
2463 var path = (req.url).path; | 2566 var path = (req.url).path; |
2464 var pathOffset = 0; | 2567 var pathOffset = 0; |
2465 var index; | 2568 var index; |
2466 var subPart; | 2569 var subPart; |
2467 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2570 unittest.expect( |
| 2571 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
2468 pathOffset += 1; | 2572 pathOffset += 1; |
2469 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); | 2573 unittest.expect( |
| 2574 path.substring(pathOffset, pathOffset + 3), unittest.equals("v1/")); |
2470 pathOffset += 3; | 2575 pathOffset += 3; |
2471 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; | 2576 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; |
2472 | 2577 |
2473 var query = (req.url).query; | 2578 var query = (req.url).query; |
2474 var queryOffset = 0; | 2579 var queryOffset = 0; |
2475 var queryMap = {}; | 2580 var queryMap = {}; |
2476 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 2581 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
2477 parseBool(n) { | 2582 parseBool(n) { |
2478 if (n == "true") return true; | 2583 if (n == "true") return true; |
2479 if (n == "false") return false; | 2584 if (n == "false") return false; |
2480 if (n == null) return null; | 2585 if (n == null) return null; |
2481 throw new core.ArgumentError("Invalid boolean: $n"); | 2586 throw new core.ArgumentError("Invalid boolean: $n"); |
2482 } | 2587 } |
| 2588 |
2483 if (query.length > 0) { | 2589 if (query.length > 0) { |
2484 for (var part in query.split("&")) { | 2590 for (var part in query.split("&")) { |
2485 var keyvalue = part.split("="); | 2591 var keyvalue = part.split("="); |
2486 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 2592 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 2593 core.Uri.decodeQueryComponent(keyvalue[1])); |
2487 } | 2594 } |
2488 } | 2595 } |
2489 | 2596 |
2490 | |
2491 var h = { | 2597 var h = { |
2492 "content-type" : "application/json; charset=utf-8", | 2598 "content-type": "application/json; charset=utf-8", |
2493 }; | 2599 }; |
2494 var resp = convert.JSON.encode(buildEmpty()); | 2600 var resp = convert.JSON.encode(buildEmpty()); |
2495 return new async.Future.value(stringResponse(200, h, resp)); | 2601 return new async.Future.value(stringResponse(200, h, resp)); |
2496 }), true); | 2602 }), true); |
2497 res.cancel(arg_name).then(unittest.expectAsync1(((api.Empty response) { | 2603 res.cancel(arg_name).then(unittest.expectAsync1(((api.Empty response) { |
2498 checkEmpty(response); | 2604 checkEmpty(response); |
2499 }))); | 2605 }))); |
2500 }); | 2606 }); |
2501 | 2607 |
2502 unittest.test("method--delete", () { | 2608 unittest.test("method--delete", () { |
2503 | |
2504 var mock = new HttpServerMock(); | 2609 var mock = new HttpServerMock(); |
2505 api.EnterprisesDevicesOperationsResourceApi res = new api.Androidmanagemen
tApi(mock).enterprises.devices.operations; | 2610 api.EnterprisesDevicesOperationsResourceApi res = |
| 2611 new api.AndroidmanagementApi(mock).enterprises.devices.operations; |
2506 var arg_name = "foo"; | 2612 var arg_name = "foo"; |
2507 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 2613 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
2508 var path = (req.url).path; | 2614 var path = (req.url).path; |
2509 var pathOffset = 0; | 2615 var pathOffset = 0; |
2510 var index; | 2616 var index; |
2511 var subPart; | 2617 var subPart; |
2512 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2618 unittest.expect( |
| 2619 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
2513 pathOffset += 1; | 2620 pathOffset += 1; |
2514 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); | 2621 unittest.expect( |
| 2622 path.substring(pathOffset, pathOffset + 3), unittest.equals("v1/")); |
2515 pathOffset += 3; | 2623 pathOffset += 3; |
2516 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; | 2624 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; |
2517 | 2625 |
2518 var query = (req.url).query; | 2626 var query = (req.url).query; |
2519 var queryOffset = 0; | 2627 var queryOffset = 0; |
2520 var queryMap = {}; | 2628 var queryMap = {}; |
2521 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 2629 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
2522 parseBool(n) { | 2630 parseBool(n) { |
2523 if (n == "true") return true; | 2631 if (n == "true") return true; |
2524 if (n == "false") return false; | 2632 if (n == "false") return false; |
2525 if (n == null) return null; | 2633 if (n == null) return null; |
2526 throw new core.ArgumentError("Invalid boolean: $n"); | 2634 throw new core.ArgumentError("Invalid boolean: $n"); |
2527 } | 2635 } |
| 2636 |
2528 if (query.length > 0) { | 2637 if (query.length > 0) { |
2529 for (var part in query.split("&")) { | 2638 for (var part in query.split("&")) { |
2530 var keyvalue = part.split("="); | 2639 var keyvalue = part.split("="); |
2531 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 2640 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 2641 core.Uri.decodeQueryComponent(keyvalue[1])); |
2532 } | 2642 } |
2533 } | 2643 } |
2534 | 2644 |
2535 | |
2536 var h = { | 2645 var h = { |
2537 "content-type" : "application/json; charset=utf-8", | 2646 "content-type": "application/json; charset=utf-8", |
2538 }; | 2647 }; |
2539 var resp = convert.JSON.encode(buildEmpty()); | 2648 var resp = convert.JSON.encode(buildEmpty()); |
2540 return new async.Future.value(stringResponse(200, h, resp)); | 2649 return new async.Future.value(stringResponse(200, h, resp)); |
2541 }), true); | 2650 }), true); |
2542 res.delete(arg_name).then(unittest.expectAsync1(((api.Empty response) { | 2651 res.delete(arg_name).then(unittest.expectAsync1(((api.Empty response) { |
2543 checkEmpty(response); | 2652 checkEmpty(response); |
2544 }))); | 2653 }))); |
2545 }); | 2654 }); |
2546 | 2655 |
2547 unittest.test("method--get", () { | 2656 unittest.test("method--get", () { |
2548 | |
2549 var mock = new HttpServerMock(); | 2657 var mock = new HttpServerMock(); |
2550 api.EnterprisesDevicesOperationsResourceApi res = new api.Androidmanagemen
tApi(mock).enterprises.devices.operations; | 2658 api.EnterprisesDevicesOperationsResourceApi res = |
| 2659 new api.AndroidmanagementApi(mock).enterprises.devices.operations; |
2551 var arg_name = "foo"; | 2660 var arg_name = "foo"; |
2552 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 2661 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
2553 var path = (req.url).path; | 2662 var path = (req.url).path; |
2554 var pathOffset = 0; | 2663 var pathOffset = 0; |
2555 var index; | 2664 var index; |
2556 var subPart; | 2665 var subPart; |
2557 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2666 unittest.expect( |
| 2667 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
2558 pathOffset += 1; | 2668 pathOffset += 1; |
2559 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); | 2669 unittest.expect( |
| 2670 path.substring(pathOffset, pathOffset + 3), unittest.equals("v1/")); |
2560 pathOffset += 3; | 2671 pathOffset += 3; |
2561 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; | 2672 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; |
2562 | 2673 |
2563 var query = (req.url).query; | 2674 var query = (req.url).query; |
2564 var queryOffset = 0; | 2675 var queryOffset = 0; |
2565 var queryMap = {}; | 2676 var queryMap = {}; |
2566 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 2677 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
2567 parseBool(n) { | 2678 parseBool(n) { |
2568 if (n == "true") return true; | 2679 if (n == "true") return true; |
2569 if (n == "false") return false; | 2680 if (n == "false") return false; |
2570 if (n == null) return null; | 2681 if (n == null) return null; |
2571 throw new core.ArgumentError("Invalid boolean: $n"); | 2682 throw new core.ArgumentError("Invalid boolean: $n"); |
2572 } | 2683 } |
| 2684 |
2573 if (query.length > 0) { | 2685 if (query.length > 0) { |
2574 for (var part in query.split("&")) { | 2686 for (var part in query.split("&")) { |
2575 var keyvalue = part.split("="); | 2687 var keyvalue = part.split("="); |
2576 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 2688 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 2689 core.Uri.decodeQueryComponent(keyvalue[1])); |
2577 } | 2690 } |
2578 } | 2691 } |
2579 | 2692 |
2580 | |
2581 var h = { | 2693 var h = { |
2582 "content-type" : "application/json; charset=utf-8", | 2694 "content-type": "application/json; charset=utf-8", |
2583 }; | 2695 }; |
2584 var resp = convert.JSON.encode(buildOperation()); | 2696 var resp = convert.JSON.encode(buildOperation()); |
2585 return new async.Future.value(stringResponse(200, h, resp)); | 2697 return new async.Future.value(stringResponse(200, h, resp)); |
2586 }), true); | 2698 }), true); |
2587 res.get(arg_name).then(unittest.expectAsync1(((api.Operation response) { | 2699 res.get(arg_name).then(unittest.expectAsync1(((api.Operation response) { |
2588 checkOperation(response); | 2700 checkOperation(response); |
2589 }))); | 2701 }))); |
2590 }); | 2702 }); |
2591 | 2703 |
2592 unittest.test("method--list", () { | 2704 unittest.test("method--list", () { |
2593 | |
2594 var mock = new HttpServerMock(); | 2705 var mock = new HttpServerMock(); |
2595 api.EnterprisesDevicesOperationsResourceApi res = new api.Androidmanagemen
tApi(mock).enterprises.devices.operations; | 2706 api.EnterprisesDevicesOperationsResourceApi res = |
| 2707 new api.AndroidmanagementApi(mock).enterprises.devices.operations; |
2596 var arg_name = "foo"; | 2708 var arg_name = "foo"; |
2597 var arg_pageSize = 42; | 2709 var arg_pageSize = 42; |
2598 var arg_filter = "foo"; | 2710 var arg_filter = "foo"; |
2599 var arg_pageToken = "foo"; | 2711 var arg_pageToken = "foo"; |
2600 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 2712 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
2601 var path = (req.url).path; | 2713 var path = (req.url).path; |
2602 var pathOffset = 0; | 2714 var pathOffset = 0; |
2603 var index; | 2715 var index; |
2604 var subPart; | 2716 var subPart; |
2605 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2717 unittest.expect( |
| 2718 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
2606 pathOffset += 1; | 2719 pathOffset += 1; |
2607 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); | 2720 unittest.expect( |
| 2721 path.substring(pathOffset, pathOffset + 3), unittest.equals("v1/")); |
2608 pathOffset += 3; | 2722 pathOffset += 3; |
2609 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; | 2723 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; |
2610 | 2724 |
2611 var query = (req.url).query; | 2725 var query = (req.url).query; |
2612 var queryOffset = 0; | 2726 var queryOffset = 0; |
2613 var queryMap = {}; | 2727 var queryMap = {}; |
2614 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 2728 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
2615 parseBool(n) { | 2729 parseBool(n) { |
2616 if (n == "true") return true; | 2730 if (n == "true") return true; |
2617 if (n == "false") return false; | 2731 if (n == "false") return false; |
2618 if (n == null) return null; | 2732 if (n == null) return null; |
2619 throw new core.ArgumentError("Invalid boolean: $n"); | 2733 throw new core.ArgumentError("Invalid boolean: $n"); |
2620 } | 2734 } |
| 2735 |
2621 if (query.length > 0) { | 2736 if (query.length > 0) { |
2622 for (var part in query.split("&")) { | 2737 for (var part in query.split("&")) { |
2623 var keyvalue = part.split("="); | 2738 var keyvalue = part.split("="); |
2624 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 2739 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 2740 core.Uri.decodeQueryComponent(keyvalue[1])); |
2625 } | 2741 } |
2626 } | 2742 } |
2627 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ
als(arg_pageSize)); | 2743 unittest.expect(core.int.parse(queryMap["pageSize"].first), |
| 2744 unittest.equals(arg_pageSize)); |
2628 unittest.expect(queryMap["filter"].first, unittest.equals(arg_filter)); | 2745 unittest.expect(queryMap["filter"].first, unittest.equals(arg_filter)); |
2629 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | 2746 unittest.expect( |
2630 | 2747 queryMap["pageToken"].first, unittest.equals(arg_pageToken)); |
2631 | 2748 |
2632 var h = { | 2749 var h = { |
2633 "content-type" : "application/json; charset=utf-8", | 2750 "content-type": "application/json; charset=utf-8", |
2634 }; | 2751 }; |
2635 var resp = convert.JSON.encode(buildListOperationsResponse()); | 2752 var resp = convert.JSON.encode(buildListOperationsResponse()); |
2636 return new async.Future.value(stringResponse(200, h, resp)); | 2753 return new async.Future.value(stringResponse(200, h, resp)); |
2637 }), true); | 2754 }), true); |
2638 res.list(arg_name, pageSize: arg_pageSize, filter: arg_filter, pageToken:
arg_pageToken).then(unittest.expectAsync1(((api.ListOperationsResponse response)
{ | 2755 res |
| 2756 .list(arg_name, |
| 2757 pageSize: arg_pageSize, |
| 2758 filter: arg_filter, |
| 2759 pageToken: arg_pageToken) |
| 2760 .then(unittest.expectAsync1(((api.ListOperationsResponse response) { |
2639 checkListOperationsResponse(response); | 2761 checkListOperationsResponse(response); |
2640 }))); | 2762 }))); |
2641 }); | 2763 }); |
2642 | |
2643 }); | 2764 }); |
2644 | 2765 |
2645 | |
2646 unittest.group("resource-EnterprisesEnrollmentTokensResourceApi", () { | 2766 unittest.group("resource-EnterprisesEnrollmentTokensResourceApi", () { |
2647 unittest.test("method--create", () { | 2767 unittest.test("method--create", () { |
2648 | |
2649 var mock = new HttpServerMock(); | 2768 var mock = new HttpServerMock(); |
2650 api.EnterprisesEnrollmentTokensResourceApi res = new api.Androidmanagement
Api(mock).enterprises.enrollmentTokens; | 2769 api.EnterprisesEnrollmentTokensResourceApi res = |
| 2770 new api.AndroidmanagementApi(mock).enterprises.enrollmentTokens; |
2651 var arg_request = buildEnrollmentToken(); | 2771 var arg_request = buildEnrollmentToken(); |
2652 var arg_parent = "foo"; | 2772 var arg_parent = "foo"; |
2653 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 2773 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
2654 var obj = new api.EnrollmentToken.fromJson(json); | 2774 var obj = new api.EnrollmentToken.fromJson(json); |
2655 checkEnrollmentToken(obj); | 2775 checkEnrollmentToken(obj); |
2656 | 2776 |
2657 var path = (req.url).path; | 2777 var path = (req.url).path; |
2658 var pathOffset = 0; | 2778 var pathOffset = 0; |
2659 var index; | 2779 var index; |
2660 var subPart; | 2780 var subPart; |
2661 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2781 unittest.expect( |
| 2782 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
2662 pathOffset += 1; | 2783 pathOffset += 1; |
2663 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); | 2784 unittest.expect( |
| 2785 path.substring(pathOffset, pathOffset + 3), unittest.equals("v1/")); |
2664 pathOffset += 3; | 2786 pathOffset += 3; |
2665 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; | 2787 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; |
2666 | 2788 |
2667 var query = (req.url).query; | 2789 var query = (req.url).query; |
2668 var queryOffset = 0; | 2790 var queryOffset = 0; |
2669 var queryMap = {}; | 2791 var queryMap = {}; |
2670 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 2792 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
2671 parseBool(n) { | 2793 parseBool(n) { |
2672 if (n == "true") return true; | 2794 if (n == "true") return true; |
2673 if (n == "false") return false; | 2795 if (n == "false") return false; |
2674 if (n == null) return null; | 2796 if (n == null) return null; |
2675 throw new core.ArgumentError("Invalid boolean: $n"); | 2797 throw new core.ArgumentError("Invalid boolean: $n"); |
2676 } | 2798 } |
| 2799 |
2677 if (query.length > 0) { | 2800 if (query.length > 0) { |
2678 for (var part in query.split("&")) { | 2801 for (var part in query.split("&")) { |
2679 var keyvalue = part.split("="); | 2802 var keyvalue = part.split("="); |
2680 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 2803 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 2804 core.Uri.decodeQueryComponent(keyvalue[1])); |
2681 } | 2805 } |
2682 } | 2806 } |
2683 | 2807 |
2684 | |
2685 var h = { | 2808 var h = { |
2686 "content-type" : "application/json; charset=utf-8", | 2809 "content-type": "application/json; charset=utf-8", |
2687 }; | 2810 }; |
2688 var resp = convert.JSON.encode(buildEnrollmentToken()); | 2811 var resp = convert.JSON.encode(buildEnrollmentToken()); |
2689 return new async.Future.value(stringResponse(200, h, resp)); | 2812 return new async.Future.value(stringResponse(200, h, resp)); |
2690 }), true); | 2813 }), true); |
2691 res.create(arg_request, arg_parent).then(unittest.expectAsync1(((api.Enrol
lmentToken response) { | 2814 res |
| 2815 .create(arg_request, arg_parent) |
| 2816 .then(unittest.expectAsync1(((api.EnrollmentToken response) { |
2692 checkEnrollmentToken(response); | 2817 checkEnrollmentToken(response); |
2693 }))); | 2818 }))); |
2694 }); | 2819 }); |
2695 | 2820 |
2696 unittest.test("method--delete", () { | 2821 unittest.test("method--delete", () { |
2697 | |
2698 var mock = new HttpServerMock(); | 2822 var mock = new HttpServerMock(); |
2699 api.EnterprisesEnrollmentTokensResourceApi res = new api.Androidmanagement
Api(mock).enterprises.enrollmentTokens; | 2823 api.EnterprisesEnrollmentTokensResourceApi res = |
| 2824 new api.AndroidmanagementApi(mock).enterprises.enrollmentTokens; |
2700 var arg_name = "foo"; | 2825 var arg_name = "foo"; |
2701 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 2826 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
2702 var path = (req.url).path; | 2827 var path = (req.url).path; |
2703 var pathOffset = 0; | 2828 var pathOffset = 0; |
2704 var index; | 2829 var index; |
2705 var subPart; | 2830 var subPart; |
2706 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2831 unittest.expect( |
| 2832 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
2707 pathOffset += 1; | 2833 pathOffset += 1; |
2708 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); | 2834 unittest.expect( |
| 2835 path.substring(pathOffset, pathOffset + 3), unittest.equals("v1/")); |
2709 pathOffset += 3; | 2836 pathOffset += 3; |
2710 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; | 2837 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; |
2711 | 2838 |
2712 var query = (req.url).query; | 2839 var query = (req.url).query; |
2713 var queryOffset = 0; | 2840 var queryOffset = 0; |
2714 var queryMap = {}; | 2841 var queryMap = {}; |
2715 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 2842 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
2716 parseBool(n) { | 2843 parseBool(n) { |
2717 if (n == "true") return true; | 2844 if (n == "true") return true; |
2718 if (n == "false") return false; | 2845 if (n == "false") return false; |
2719 if (n == null) return null; | 2846 if (n == null) return null; |
2720 throw new core.ArgumentError("Invalid boolean: $n"); | 2847 throw new core.ArgumentError("Invalid boolean: $n"); |
2721 } | 2848 } |
| 2849 |
2722 if (query.length > 0) { | 2850 if (query.length > 0) { |
2723 for (var part in query.split("&")) { | 2851 for (var part in query.split("&")) { |
2724 var keyvalue = part.split("="); | 2852 var keyvalue = part.split("="); |
2725 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 2853 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 2854 core.Uri.decodeQueryComponent(keyvalue[1])); |
2726 } | 2855 } |
2727 } | 2856 } |
2728 | 2857 |
2729 | |
2730 var h = { | 2858 var h = { |
2731 "content-type" : "application/json; charset=utf-8", | 2859 "content-type": "application/json; charset=utf-8", |
2732 }; | 2860 }; |
2733 var resp = convert.JSON.encode(buildEmpty()); | 2861 var resp = convert.JSON.encode(buildEmpty()); |
2734 return new async.Future.value(stringResponse(200, h, resp)); | 2862 return new async.Future.value(stringResponse(200, h, resp)); |
2735 }), true); | 2863 }), true); |
2736 res.delete(arg_name).then(unittest.expectAsync1(((api.Empty response) { | 2864 res.delete(arg_name).then(unittest.expectAsync1(((api.Empty response) { |
2737 checkEmpty(response); | 2865 checkEmpty(response); |
2738 }))); | 2866 }))); |
2739 }); | 2867 }); |
2740 | |
2741 }); | 2868 }); |
2742 | 2869 |
2743 | |
2744 unittest.group("resource-EnterprisesPoliciesResourceApi", () { | 2870 unittest.group("resource-EnterprisesPoliciesResourceApi", () { |
2745 unittest.test("method--delete", () { | 2871 unittest.test("method--delete", () { |
2746 | |
2747 var mock = new HttpServerMock(); | 2872 var mock = new HttpServerMock(); |
2748 api.EnterprisesPoliciesResourceApi res = new api.AndroidmanagementApi(mock
).enterprises.policies; | 2873 api.EnterprisesPoliciesResourceApi res = |
| 2874 new api.AndroidmanagementApi(mock).enterprises.policies; |
2749 var arg_name = "foo"; | 2875 var arg_name = "foo"; |
2750 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 2876 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
2751 var path = (req.url).path; | 2877 var path = (req.url).path; |
2752 var pathOffset = 0; | 2878 var pathOffset = 0; |
2753 var index; | 2879 var index; |
2754 var subPart; | 2880 var subPart; |
2755 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2881 unittest.expect( |
| 2882 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
2756 pathOffset += 1; | 2883 pathOffset += 1; |
2757 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); | 2884 unittest.expect( |
| 2885 path.substring(pathOffset, pathOffset + 3), unittest.equals("v1/")); |
2758 pathOffset += 3; | 2886 pathOffset += 3; |
2759 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; | 2887 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; |
2760 | 2888 |
2761 var query = (req.url).query; | 2889 var query = (req.url).query; |
2762 var queryOffset = 0; | 2890 var queryOffset = 0; |
2763 var queryMap = {}; | 2891 var queryMap = {}; |
2764 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 2892 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
2765 parseBool(n) { | 2893 parseBool(n) { |
2766 if (n == "true") return true; | 2894 if (n == "true") return true; |
2767 if (n == "false") return false; | 2895 if (n == "false") return false; |
2768 if (n == null) return null; | 2896 if (n == null) return null; |
2769 throw new core.ArgumentError("Invalid boolean: $n"); | 2897 throw new core.ArgumentError("Invalid boolean: $n"); |
2770 } | 2898 } |
| 2899 |
2771 if (query.length > 0) { | 2900 if (query.length > 0) { |
2772 for (var part in query.split("&")) { | 2901 for (var part in query.split("&")) { |
2773 var keyvalue = part.split("="); | 2902 var keyvalue = part.split("="); |
2774 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 2903 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 2904 core.Uri.decodeQueryComponent(keyvalue[1])); |
2775 } | 2905 } |
2776 } | 2906 } |
2777 | 2907 |
2778 | |
2779 var h = { | 2908 var h = { |
2780 "content-type" : "application/json; charset=utf-8", | 2909 "content-type": "application/json; charset=utf-8", |
2781 }; | 2910 }; |
2782 var resp = convert.JSON.encode(buildEmpty()); | 2911 var resp = convert.JSON.encode(buildEmpty()); |
2783 return new async.Future.value(stringResponse(200, h, resp)); | 2912 return new async.Future.value(stringResponse(200, h, resp)); |
2784 }), true); | 2913 }), true); |
2785 res.delete(arg_name).then(unittest.expectAsync1(((api.Empty response) { | 2914 res.delete(arg_name).then(unittest.expectAsync1(((api.Empty response) { |
2786 checkEmpty(response); | 2915 checkEmpty(response); |
2787 }))); | 2916 }))); |
2788 }); | 2917 }); |
2789 | 2918 |
2790 unittest.test("method--get", () { | 2919 unittest.test("method--get", () { |
2791 | |
2792 var mock = new HttpServerMock(); | 2920 var mock = new HttpServerMock(); |
2793 api.EnterprisesPoliciesResourceApi res = new api.AndroidmanagementApi(mock
).enterprises.policies; | 2921 api.EnterprisesPoliciesResourceApi res = |
| 2922 new api.AndroidmanagementApi(mock).enterprises.policies; |
2794 var arg_name = "foo"; | 2923 var arg_name = "foo"; |
2795 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 2924 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
2796 var path = (req.url).path; | 2925 var path = (req.url).path; |
2797 var pathOffset = 0; | 2926 var pathOffset = 0; |
2798 var index; | 2927 var index; |
2799 var subPart; | 2928 var subPart; |
2800 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2929 unittest.expect( |
| 2930 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
2801 pathOffset += 1; | 2931 pathOffset += 1; |
2802 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); | 2932 unittest.expect( |
| 2933 path.substring(pathOffset, pathOffset + 3), unittest.equals("v1/")); |
2803 pathOffset += 3; | 2934 pathOffset += 3; |
2804 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; | 2935 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; |
2805 | 2936 |
2806 var query = (req.url).query; | 2937 var query = (req.url).query; |
2807 var queryOffset = 0; | 2938 var queryOffset = 0; |
2808 var queryMap = {}; | 2939 var queryMap = {}; |
2809 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 2940 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
2810 parseBool(n) { | 2941 parseBool(n) { |
2811 if (n == "true") return true; | 2942 if (n == "true") return true; |
2812 if (n == "false") return false; | 2943 if (n == "false") return false; |
2813 if (n == null) return null; | 2944 if (n == null) return null; |
2814 throw new core.ArgumentError("Invalid boolean: $n"); | 2945 throw new core.ArgumentError("Invalid boolean: $n"); |
2815 } | 2946 } |
| 2947 |
2816 if (query.length > 0) { | 2948 if (query.length > 0) { |
2817 for (var part in query.split("&")) { | 2949 for (var part in query.split("&")) { |
2818 var keyvalue = part.split("="); | 2950 var keyvalue = part.split("="); |
2819 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 2951 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 2952 core.Uri.decodeQueryComponent(keyvalue[1])); |
2820 } | 2953 } |
2821 } | 2954 } |
2822 | 2955 |
2823 | |
2824 var h = { | 2956 var h = { |
2825 "content-type" : "application/json; charset=utf-8", | 2957 "content-type": "application/json; charset=utf-8", |
2826 }; | 2958 }; |
2827 var resp = convert.JSON.encode(buildPolicy()); | 2959 var resp = convert.JSON.encode(buildPolicy()); |
2828 return new async.Future.value(stringResponse(200, h, resp)); | 2960 return new async.Future.value(stringResponse(200, h, resp)); |
2829 }), true); | 2961 }), true); |
2830 res.get(arg_name).then(unittest.expectAsync1(((api.Policy response) { | 2962 res.get(arg_name).then(unittest.expectAsync1(((api.Policy response) { |
2831 checkPolicy(response); | 2963 checkPolicy(response); |
2832 }))); | 2964 }))); |
2833 }); | 2965 }); |
2834 | 2966 |
2835 unittest.test("method--list", () { | 2967 unittest.test("method--list", () { |
2836 | |
2837 var mock = new HttpServerMock(); | 2968 var mock = new HttpServerMock(); |
2838 api.EnterprisesPoliciesResourceApi res = new api.AndroidmanagementApi(mock
).enterprises.policies; | 2969 api.EnterprisesPoliciesResourceApi res = |
| 2970 new api.AndroidmanagementApi(mock).enterprises.policies; |
2839 var arg_parent = "foo"; | 2971 var arg_parent = "foo"; |
2840 var arg_pageSize = 42; | 2972 var arg_pageSize = 42; |
2841 var arg_pageToken = "foo"; | 2973 var arg_pageToken = "foo"; |
2842 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 2974 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
2843 var path = (req.url).path; | 2975 var path = (req.url).path; |
2844 var pathOffset = 0; | 2976 var pathOffset = 0; |
2845 var index; | 2977 var index; |
2846 var subPart; | 2978 var subPart; |
2847 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2979 unittest.expect( |
| 2980 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
2848 pathOffset += 1; | 2981 pathOffset += 1; |
2849 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); | 2982 unittest.expect( |
| 2983 path.substring(pathOffset, pathOffset + 3), unittest.equals("v1/")); |
2850 pathOffset += 3; | 2984 pathOffset += 3; |
2851 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; | 2985 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; |
2852 | 2986 |
2853 var query = (req.url).query; | 2987 var query = (req.url).query; |
2854 var queryOffset = 0; | 2988 var queryOffset = 0; |
2855 var queryMap = {}; | 2989 var queryMap = {}; |
2856 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 2990 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
2857 parseBool(n) { | 2991 parseBool(n) { |
2858 if (n == "true") return true; | 2992 if (n == "true") return true; |
2859 if (n == "false") return false; | 2993 if (n == "false") return false; |
2860 if (n == null) return null; | 2994 if (n == null) return null; |
2861 throw new core.ArgumentError("Invalid boolean: $n"); | 2995 throw new core.ArgumentError("Invalid boolean: $n"); |
2862 } | 2996 } |
| 2997 |
2863 if (query.length > 0) { | 2998 if (query.length > 0) { |
2864 for (var part in query.split("&")) { | 2999 for (var part in query.split("&")) { |
2865 var keyvalue = part.split("="); | 3000 var keyvalue = part.split("="); |
2866 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 3001 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 3002 core.Uri.decodeQueryComponent(keyvalue[1])); |
2867 } | 3003 } |
2868 } | 3004 } |
2869 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ
als(arg_pageSize)); | 3005 unittest.expect(core.int.parse(queryMap["pageSize"].first), |
2870 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | 3006 unittest.equals(arg_pageSize)); |
2871 | 3007 unittest.expect( |
| 3008 queryMap["pageToken"].first, unittest.equals(arg_pageToken)); |
2872 | 3009 |
2873 var h = { | 3010 var h = { |
2874 "content-type" : "application/json; charset=utf-8", | 3011 "content-type": "application/json; charset=utf-8", |
2875 }; | 3012 }; |
2876 var resp = convert.JSON.encode(buildListPoliciesResponse()); | 3013 var resp = convert.JSON.encode(buildListPoliciesResponse()); |
2877 return new async.Future.value(stringResponse(200, h, resp)); | 3014 return new async.Future.value(stringResponse(200, h, resp)); |
2878 }), true); | 3015 }), true); |
2879 res.list(arg_parent, pageSize: arg_pageSize, pageToken: arg_pageToken).the
n(unittest.expectAsync1(((api.ListPoliciesResponse response) { | 3016 res |
| 3017 .list(arg_parent, pageSize: arg_pageSize, pageToken: arg_pageToken) |
| 3018 .then(unittest.expectAsync1(((api.ListPoliciesResponse response) { |
2880 checkListPoliciesResponse(response); | 3019 checkListPoliciesResponse(response); |
2881 }))); | 3020 }))); |
2882 }); | 3021 }); |
2883 | 3022 |
2884 unittest.test("method--patch", () { | 3023 unittest.test("method--patch", () { |
2885 | |
2886 var mock = new HttpServerMock(); | 3024 var mock = new HttpServerMock(); |
2887 api.EnterprisesPoliciesResourceApi res = new api.AndroidmanagementApi(mock
).enterprises.policies; | 3025 api.EnterprisesPoliciesResourceApi res = |
| 3026 new api.AndroidmanagementApi(mock).enterprises.policies; |
2888 var arg_request = buildPolicy(); | 3027 var arg_request = buildPolicy(); |
2889 var arg_name = "foo"; | 3028 var arg_name = "foo"; |
2890 var arg_updateMask = "foo"; | 3029 var arg_updateMask = "foo"; |
2891 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 3030 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
2892 var obj = new api.Policy.fromJson(json); | 3031 var obj = new api.Policy.fromJson(json); |
2893 checkPolicy(obj); | 3032 checkPolicy(obj); |
2894 | 3033 |
2895 var path = (req.url).path; | 3034 var path = (req.url).path; |
2896 var pathOffset = 0; | 3035 var pathOffset = 0; |
2897 var index; | 3036 var index; |
2898 var subPart; | 3037 var subPart; |
2899 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 3038 unittest.expect( |
| 3039 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
2900 pathOffset += 1; | 3040 pathOffset += 1; |
2901 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); | 3041 unittest.expect( |
| 3042 path.substring(pathOffset, pathOffset + 3), unittest.equals("v1/")); |
2902 pathOffset += 3; | 3043 pathOffset += 3; |
2903 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; | 3044 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; |
2904 | 3045 |
2905 var query = (req.url).query; | 3046 var query = (req.url).query; |
2906 var queryOffset = 0; | 3047 var queryOffset = 0; |
2907 var queryMap = {}; | 3048 var queryMap = {}; |
2908 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 3049 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
2909 parseBool(n) { | 3050 parseBool(n) { |
2910 if (n == "true") return true; | 3051 if (n == "true") return true; |
2911 if (n == "false") return false; | 3052 if (n == "false") return false; |
2912 if (n == null) return null; | 3053 if (n == null) return null; |
2913 throw new core.ArgumentError("Invalid boolean: $n"); | 3054 throw new core.ArgumentError("Invalid boolean: $n"); |
2914 } | 3055 } |
| 3056 |
2915 if (query.length > 0) { | 3057 if (query.length > 0) { |
2916 for (var part in query.split("&")) { | 3058 for (var part in query.split("&")) { |
2917 var keyvalue = part.split("="); | 3059 var keyvalue = part.split("="); |
2918 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 3060 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 3061 core.Uri.decodeQueryComponent(keyvalue[1])); |
2919 } | 3062 } |
2920 } | 3063 } |
2921 unittest.expect(queryMap["updateMask"].first, unittest.equals(arg_update
Mask)); | 3064 unittest.expect( |
2922 | 3065 queryMap["updateMask"].first, unittest.equals(arg_updateMask)); |
2923 | 3066 |
2924 var h = { | 3067 var h = { |
2925 "content-type" : "application/json; charset=utf-8", | 3068 "content-type": "application/json; charset=utf-8", |
2926 }; | 3069 }; |
2927 var resp = convert.JSON.encode(buildPolicy()); | 3070 var resp = convert.JSON.encode(buildPolicy()); |
2928 return new async.Future.value(stringResponse(200, h, resp)); | 3071 return new async.Future.value(stringResponse(200, h, resp)); |
2929 }), true); | 3072 }), true); |
2930 res.patch(arg_request, arg_name, updateMask: arg_updateMask).then(unittest
.expectAsync1(((api.Policy response) { | 3073 res |
| 3074 .patch(arg_request, arg_name, updateMask: arg_updateMask) |
| 3075 .then(unittest.expectAsync1(((api.Policy response) { |
2931 checkPolicy(response); | 3076 checkPolicy(response); |
2932 }))); | 3077 }))); |
2933 }); | 3078 }); |
2934 | |
2935 }); | 3079 }); |
2936 | 3080 |
2937 | |
2938 unittest.group("resource-EnterprisesWebTokensResourceApi", () { | 3081 unittest.group("resource-EnterprisesWebTokensResourceApi", () { |
2939 unittest.test("method--create", () { | 3082 unittest.test("method--create", () { |
2940 | |
2941 var mock = new HttpServerMock(); | 3083 var mock = new HttpServerMock(); |
2942 api.EnterprisesWebTokensResourceApi res = new api.AndroidmanagementApi(moc
k).enterprises.webTokens; | 3084 api.EnterprisesWebTokensResourceApi res = |
| 3085 new api.AndroidmanagementApi(mock).enterprises.webTokens; |
2943 var arg_request = buildWebToken(); | 3086 var arg_request = buildWebToken(); |
2944 var arg_parent = "foo"; | 3087 var arg_parent = "foo"; |
2945 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 3088 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
2946 var obj = new api.WebToken.fromJson(json); | 3089 var obj = new api.WebToken.fromJson(json); |
2947 checkWebToken(obj); | 3090 checkWebToken(obj); |
2948 | 3091 |
2949 var path = (req.url).path; | 3092 var path = (req.url).path; |
2950 var pathOffset = 0; | 3093 var pathOffset = 0; |
2951 var index; | 3094 var index; |
2952 var subPart; | 3095 var subPart; |
2953 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 3096 unittest.expect( |
| 3097 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
2954 pathOffset += 1; | 3098 pathOffset += 1; |
2955 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); | 3099 unittest.expect( |
| 3100 path.substring(pathOffset, pathOffset + 3), unittest.equals("v1/")); |
2956 pathOffset += 3; | 3101 pathOffset += 3; |
2957 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; | 3102 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; |
2958 | 3103 |
2959 var query = (req.url).query; | 3104 var query = (req.url).query; |
2960 var queryOffset = 0; | 3105 var queryOffset = 0; |
2961 var queryMap = {}; | 3106 var queryMap = {}; |
2962 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 3107 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
2963 parseBool(n) { | 3108 parseBool(n) { |
2964 if (n == "true") return true; | 3109 if (n == "true") return true; |
2965 if (n == "false") return false; | 3110 if (n == "false") return false; |
2966 if (n == null) return null; | 3111 if (n == null) return null; |
2967 throw new core.ArgumentError("Invalid boolean: $n"); | 3112 throw new core.ArgumentError("Invalid boolean: $n"); |
2968 } | 3113 } |
| 3114 |
2969 if (query.length > 0) { | 3115 if (query.length > 0) { |
2970 for (var part in query.split("&")) { | 3116 for (var part in query.split("&")) { |
2971 var keyvalue = part.split("="); | 3117 var keyvalue = part.split("="); |
2972 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 3118 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 3119 core.Uri.decodeQueryComponent(keyvalue[1])); |
2973 } | 3120 } |
2974 } | 3121 } |
2975 | 3122 |
2976 | |
2977 var h = { | 3123 var h = { |
2978 "content-type" : "application/json; charset=utf-8", | 3124 "content-type": "application/json; charset=utf-8", |
2979 }; | 3125 }; |
2980 var resp = convert.JSON.encode(buildWebToken()); | 3126 var resp = convert.JSON.encode(buildWebToken()); |
2981 return new async.Future.value(stringResponse(200, h, resp)); | 3127 return new async.Future.value(stringResponse(200, h, resp)); |
2982 }), true); | 3128 }), true); |
2983 res.create(arg_request, arg_parent).then(unittest.expectAsync1(((api.WebTo
ken response) { | 3129 res |
| 3130 .create(arg_request, arg_parent) |
| 3131 .then(unittest.expectAsync1(((api.WebToken response) { |
2984 checkWebToken(response); | 3132 checkWebToken(response); |
2985 }))); | 3133 }))); |
2986 }); | 3134 }); |
2987 | |
2988 }); | 3135 }); |
2989 | 3136 |
2990 | |
2991 unittest.group("resource-SignupUrlsResourceApi", () { | 3137 unittest.group("resource-SignupUrlsResourceApi", () { |
2992 unittest.test("method--create", () { | 3138 unittest.test("method--create", () { |
2993 | |
2994 var mock = new HttpServerMock(); | 3139 var mock = new HttpServerMock(); |
2995 api.SignupUrlsResourceApi res = new api.AndroidmanagementApi(mock).signupU
rls; | 3140 api.SignupUrlsResourceApi res = |
| 3141 new api.AndroidmanagementApi(mock).signupUrls; |
2996 var arg_callbackUrl = "foo"; | 3142 var arg_callbackUrl = "foo"; |
2997 var arg_projectId = "foo"; | 3143 var arg_projectId = "foo"; |
2998 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 3144 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
2999 var path = (req.url).path; | 3145 var path = (req.url).path; |
3000 var pathOffset = 0; | 3146 var pathOffset = 0; |
3001 var index; | 3147 var index; |
3002 var subPart; | 3148 var subPart; |
3003 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 3149 unittest.expect( |
| 3150 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
3004 pathOffset += 1; | 3151 pathOffset += 1; |
3005 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("v1/signupUrls")); | 3152 unittest.expect(path.substring(pathOffset, pathOffset + 13), |
| 3153 unittest.equals("v1/signupUrls")); |
3006 pathOffset += 13; | 3154 pathOffset += 13; |
3007 | 3155 |
3008 var query = (req.url).query; | 3156 var query = (req.url).query; |
3009 var queryOffset = 0; | 3157 var queryOffset = 0; |
3010 var queryMap = {}; | 3158 var queryMap = {}; |
3011 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 3159 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
3012 parseBool(n) { | 3160 parseBool(n) { |
3013 if (n == "true") return true; | 3161 if (n == "true") return true; |
3014 if (n == "false") return false; | 3162 if (n == "false") return false; |
3015 if (n == null) return null; | 3163 if (n == null) return null; |
3016 throw new core.ArgumentError("Invalid boolean: $n"); | 3164 throw new core.ArgumentError("Invalid boolean: $n"); |
3017 } | 3165 } |
| 3166 |
3018 if (query.length > 0) { | 3167 if (query.length > 0) { |
3019 for (var part in query.split("&")) { | 3168 for (var part in query.split("&")) { |
3020 var keyvalue = part.split("="); | 3169 var keyvalue = part.split("="); |
3021 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 3170 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 3171 core.Uri.decodeQueryComponent(keyvalue[1])); |
3022 } | 3172 } |
3023 } | 3173 } |
3024 unittest.expect(queryMap["callbackUrl"].first, unittest.equals(arg_callb
ackUrl)); | 3174 unittest.expect( |
3025 unittest.expect(queryMap["projectId"].first, unittest.equals(arg_project
Id)); | 3175 queryMap["callbackUrl"].first, unittest.equals(arg_callbackUrl)); |
3026 | 3176 unittest.expect( |
| 3177 queryMap["projectId"].first, unittest.equals(arg_projectId)); |
3027 | 3178 |
3028 var h = { | 3179 var h = { |
3029 "content-type" : "application/json; charset=utf-8", | 3180 "content-type": "application/json; charset=utf-8", |
3030 }; | 3181 }; |
3031 var resp = convert.JSON.encode(buildSignupUrl()); | 3182 var resp = convert.JSON.encode(buildSignupUrl()); |
3032 return new async.Future.value(stringResponse(200, h, resp)); | 3183 return new async.Future.value(stringResponse(200, h, resp)); |
3033 }), true); | 3184 }), true); |
3034 res.create(callbackUrl: arg_callbackUrl, projectId: arg_projectId).then(un
ittest.expectAsync1(((api.SignupUrl response) { | 3185 res |
| 3186 .create(callbackUrl: arg_callbackUrl, projectId: arg_projectId) |
| 3187 .then(unittest.expectAsync1(((api.SignupUrl response) { |
3035 checkSignupUrl(response); | 3188 checkSignupUrl(response); |
3036 }))); | 3189 }))); |
3037 }); | 3190 }); |
3038 | |
3039 }); | 3191 }); |
3040 | |
3041 | |
3042 } | 3192 } |
3043 | |
OLD | NEW |