OLD | NEW |
1 library googleapis.reseller.v1.test; | 1 library googleapis.reseller.v1.test; |
2 | 2 |
3 import "dart:core" as core; | 3 import "dart:core" as core; |
4 import "dart:collection" as collection; | 4 import "dart:collection" as collection; |
5 import "dart:async" as async; | 5 import "dart:async" as async; |
6 import "dart:convert" as convert; | 6 import "dart:convert" as convert; |
7 | 7 |
8 import 'package:http/http.dart' as http; | 8 import 'package:http/http.dart' as http; |
9 import 'package:http/testing.dart' as http_testing; | 9 import 'package:http/testing.dart' as http_testing; |
10 import 'package:unittest/unittest.dart' as unittest; | 10 import 'package:unittest/unittest.dart' as unittest; |
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
162 | 162 |
163 checkRenewalSettings(api.RenewalSettings o) { | 163 checkRenewalSettings(api.RenewalSettings o) { |
164 buildCounterRenewalSettings++; | 164 buildCounterRenewalSettings++; |
165 if (buildCounterRenewalSettings < 3) { | 165 if (buildCounterRenewalSettings < 3) { |
166 unittest.expect(o.kind, unittest.equals('foo')); | 166 unittest.expect(o.kind, unittest.equals('foo')); |
167 unittest.expect(o.renewalType, unittest.equals('foo')); | 167 unittest.expect(o.renewalType, unittest.equals('foo')); |
168 } | 168 } |
169 buildCounterRenewalSettings--; | 169 buildCounterRenewalSettings--; |
170 } | 170 } |
171 | 171 |
172 buildUnnamed2079() { | 172 buildUnnamed2184() { |
173 var o = new core.List<core.String>(); | 173 var o = new core.List<core.String>(); |
174 o.add("foo"); | 174 o.add("foo"); |
175 o.add("foo"); | 175 o.add("foo"); |
176 return o; | 176 return o; |
177 } | 177 } |
178 | 178 |
179 checkUnnamed2079(core.List<core.String> o) { | 179 checkUnnamed2184(core.List<core.String> o) { |
180 unittest.expect(o, unittest.hasLength(2)); | 180 unittest.expect(o, unittest.hasLength(2)); |
181 unittest.expect(o[0], unittest.equals('foo')); | 181 unittest.expect(o[0], unittest.equals('foo')); |
182 unittest.expect(o[1], unittest.equals('foo')); | 182 unittest.expect(o[1], unittest.equals('foo')); |
183 } | 183 } |
184 | 184 |
185 core.int buildCounterResellernotifyGetwatchdetailsResponse = 0; | 185 core.int buildCounterResellernotifyGetwatchdetailsResponse = 0; |
186 buildResellernotifyGetwatchdetailsResponse() { | 186 buildResellernotifyGetwatchdetailsResponse() { |
187 var o = new api.ResellernotifyGetwatchdetailsResponse(); | 187 var o = new api.ResellernotifyGetwatchdetailsResponse(); |
188 buildCounterResellernotifyGetwatchdetailsResponse++; | 188 buildCounterResellernotifyGetwatchdetailsResponse++; |
189 if (buildCounterResellernotifyGetwatchdetailsResponse < 3) { | 189 if (buildCounterResellernotifyGetwatchdetailsResponse < 3) { |
190 o.serviceAccountEmailAddresses = buildUnnamed2079(); | 190 o.serviceAccountEmailAddresses = buildUnnamed2184(); |
191 o.topicName = "foo"; | 191 o.topicName = "foo"; |
192 } | 192 } |
193 buildCounterResellernotifyGetwatchdetailsResponse--; | 193 buildCounterResellernotifyGetwatchdetailsResponse--; |
194 return o; | 194 return o; |
195 } | 195 } |
196 | 196 |
197 checkResellernotifyGetwatchdetailsResponse(api.ResellernotifyGetwatchdetailsResp
onse o) { | 197 checkResellernotifyGetwatchdetailsResponse(api.ResellernotifyGetwatchdetailsResp
onse o) { |
198 buildCounterResellernotifyGetwatchdetailsResponse++; | 198 buildCounterResellernotifyGetwatchdetailsResponse++; |
199 if (buildCounterResellernotifyGetwatchdetailsResponse < 3) { | 199 if (buildCounterResellernotifyGetwatchdetailsResponse < 3) { |
200 checkUnnamed2079(o.serviceAccountEmailAddresses); | 200 checkUnnamed2184(o.serviceAccountEmailAddresses); |
201 unittest.expect(o.topicName, unittest.equals('foo')); | 201 unittest.expect(o.topicName, unittest.equals('foo')); |
202 } | 202 } |
203 buildCounterResellernotifyGetwatchdetailsResponse--; | 203 buildCounterResellernotifyGetwatchdetailsResponse--; |
204 } | 204 } |
205 | 205 |
206 core.int buildCounterResellernotifyResource = 0; | 206 core.int buildCounterResellernotifyResource = 0; |
207 buildResellernotifyResource() { | 207 buildResellernotifyResource() { |
208 var o = new api.ResellernotifyResource(); | 208 var o = new api.ResellernotifyResource(); |
209 buildCounterResellernotifyResource++; | 209 buildCounterResellernotifyResource++; |
210 if (buildCounterResellernotifyResource < 3) { | 210 if (buildCounterResellernotifyResource < 3) { |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
284 checkSubscriptionPlan(api.SubscriptionPlan o) { | 284 checkSubscriptionPlan(api.SubscriptionPlan o) { |
285 buildCounterSubscriptionPlan++; | 285 buildCounterSubscriptionPlan++; |
286 if (buildCounterSubscriptionPlan < 3) { | 286 if (buildCounterSubscriptionPlan < 3) { |
287 checkSubscriptionPlanCommitmentInterval(o.commitmentInterval); | 287 checkSubscriptionPlanCommitmentInterval(o.commitmentInterval); |
288 unittest.expect(o.isCommitmentPlan, unittest.isTrue); | 288 unittest.expect(o.isCommitmentPlan, unittest.isTrue); |
289 unittest.expect(o.planName, unittest.equals('foo')); | 289 unittest.expect(o.planName, unittest.equals('foo')); |
290 } | 290 } |
291 buildCounterSubscriptionPlan--; | 291 buildCounterSubscriptionPlan--; |
292 } | 292 } |
293 | 293 |
294 buildUnnamed2080() { | 294 buildUnnamed2185() { |
295 var o = new core.List<core.String>(); | 295 var o = new core.List<core.String>(); |
296 o.add("foo"); | 296 o.add("foo"); |
297 o.add("foo"); | 297 o.add("foo"); |
298 return o; | 298 return o; |
299 } | 299 } |
300 | 300 |
301 checkUnnamed2080(core.List<core.String> o) { | 301 checkUnnamed2185(core.List<core.String> o) { |
302 unittest.expect(o, unittest.hasLength(2)); | 302 unittest.expect(o, unittest.hasLength(2)); |
303 unittest.expect(o[0], unittest.equals('foo')); | 303 unittest.expect(o[0], unittest.equals('foo')); |
304 unittest.expect(o[1], unittest.equals('foo')); | 304 unittest.expect(o[1], unittest.equals('foo')); |
305 } | 305 } |
306 | 306 |
307 core.int buildCounterSubscriptionTransferInfo = 0; | 307 core.int buildCounterSubscriptionTransferInfo = 0; |
308 buildSubscriptionTransferInfo() { | 308 buildSubscriptionTransferInfo() { |
309 var o = new api.SubscriptionTransferInfo(); | 309 var o = new api.SubscriptionTransferInfo(); |
310 buildCounterSubscriptionTransferInfo++; | 310 buildCounterSubscriptionTransferInfo++; |
311 if (buildCounterSubscriptionTransferInfo < 3) { | 311 if (buildCounterSubscriptionTransferInfo < 3) { |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
356 o.customerDomain = "foo"; | 356 o.customerDomain = "foo"; |
357 o.customerId = "foo"; | 357 o.customerId = "foo"; |
358 o.dealCode = "foo"; | 358 o.dealCode = "foo"; |
359 o.kind = "foo"; | 359 o.kind = "foo"; |
360 o.plan = buildSubscriptionPlan(); | 360 o.plan = buildSubscriptionPlan(); |
361 o.purchaseOrderId = "foo"; | 361 o.purchaseOrderId = "foo"; |
362 o.renewalSettings = buildRenewalSettings(); | 362 o.renewalSettings = buildRenewalSettings(); |
363 o.resourceUiUrl = "foo"; | 363 o.resourceUiUrl = "foo"; |
364 o.seats = buildSeats(); | 364 o.seats = buildSeats(); |
365 o.skuId = "foo"; | 365 o.skuId = "foo"; |
| 366 o.skuName = "foo"; |
366 o.status = "foo"; | 367 o.status = "foo"; |
367 o.subscriptionId = "foo"; | 368 o.subscriptionId = "foo"; |
368 o.suspensionReasons = buildUnnamed2080(); | 369 o.suspensionReasons = buildUnnamed2185(); |
369 o.transferInfo = buildSubscriptionTransferInfo(); | 370 o.transferInfo = buildSubscriptionTransferInfo(); |
370 o.trialSettings = buildSubscriptionTrialSettings(); | 371 o.trialSettings = buildSubscriptionTrialSettings(); |
371 } | 372 } |
372 buildCounterSubscription--; | 373 buildCounterSubscription--; |
373 return o; | 374 return o; |
374 } | 375 } |
375 | 376 |
376 checkSubscription(api.Subscription o) { | 377 checkSubscription(api.Subscription o) { |
377 buildCounterSubscription++; | 378 buildCounterSubscription++; |
378 if (buildCounterSubscription < 3) { | 379 if (buildCounterSubscription < 3) { |
379 unittest.expect(o.billingMethod, unittest.equals('foo')); | 380 unittest.expect(o.billingMethod, unittest.equals('foo')); |
380 unittest.expect(o.creationTime, unittest.equals('foo')); | 381 unittest.expect(o.creationTime, unittest.equals('foo')); |
381 unittest.expect(o.customerDomain, unittest.equals('foo')); | 382 unittest.expect(o.customerDomain, unittest.equals('foo')); |
382 unittest.expect(o.customerId, unittest.equals('foo')); | 383 unittest.expect(o.customerId, unittest.equals('foo')); |
383 unittest.expect(o.dealCode, unittest.equals('foo')); | 384 unittest.expect(o.dealCode, unittest.equals('foo')); |
384 unittest.expect(o.kind, unittest.equals('foo')); | 385 unittest.expect(o.kind, unittest.equals('foo')); |
385 checkSubscriptionPlan(o.plan); | 386 checkSubscriptionPlan(o.plan); |
386 unittest.expect(o.purchaseOrderId, unittest.equals('foo')); | 387 unittest.expect(o.purchaseOrderId, unittest.equals('foo')); |
387 checkRenewalSettings(o.renewalSettings); | 388 checkRenewalSettings(o.renewalSettings); |
388 unittest.expect(o.resourceUiUrl, unittest.equals('foo')); | 389 unittest.expect(o.resourceUiUrl, unittest.equals('foo')); |
389 checkSeats(o.seats); | 390 checkSeats(o.seats); |
390 unittest.expect(o.skuId, unittest.equals('foo')); | 391 unittest.expect(o.skuId, unittest.equals('foo')); |
| 392 unittest.expect(o.skuName, unittest.equals('foo')); |
391 unittest.expect(o.status, unittest.equals('foo')); | 393 unittest.expect(o.status, unittest.equals('foo')); |
392 unittest.expect(o.subscriptionId, unittest.equals('foo')); | 394 unittest.expect(o.subscriptionId, unittest.equals('foo')); |
393 checkUnnamed2080(o.suspensionReasons); | 395 checkUnnamed2185(o.suspensionReasons); |
394 checkSubscriptionTransferInfo(o.transferInfo); | 396 checkSubscriptionTransferInfo(o.transferInfo); |
395 checkSubscriptionTrialSettings(o.trialSettings); | 397 checkSubscriptionTrialSettings(o.trialSettings); |
396 } | 398 } |
397 buildCounterSubscription--; | 399 buildCounterSubscription--; |
398 } | 400 } |
399 | 401 |
400 buildUnnamed2081() { | 402 buildUnnamed2186() { |
401 var o = new core.List<api.Subscription>(); | 403 var o = new core.List<api.Subscription>(); |
402 o.add(buildSubscription()); | 404 o.add(buildSubscription()); |
403 o.add(buildSubscription()); | 405 o.add(buildSubscription()); |
404 return o; | 406 return o; |
405 } | 407 } |
406 | 408 |
407 checkUnnamed2081(core.List<api.Subscription> o) { | 409 checkUnnamed2186(core.List<api.Subscription> o) { |
408 unittest.expect(o, unittest.hasLength(2)); | 410 unittest.expect(o, unittest.hasLength(2)); |
409 checkSubscription(o[0]); | 411 checkSubscription(o[0]); |
410 checkSubscription(o[1]); | 412 checkSubscription(o[1]); |
411 } | 413 } |
412 | 414 |
413 core.int buildCounterSubscriptions = 0; | 415 core.int buildCounterSubscriptions = 0; |
414 buildSubscriptions() { | 416 buildSubscriptions() { |
415 var o = new api.Subscriptions(); | 417 var o = new api.Subscriptions(); |
416 buildCounterSubscriptions++; | 418 buildCounterSubscriptions++; |
417 if (buildCounterSubscriptions < 3) { | 419 if (buildCounterSubscriptions < 3) { |
418 o.kind = "foo"; | 420 o.kind = "foo"; |
419 o.nextPageToken = "foo"; | 421 o.nextPageToken = "foo"; |
420 o.subscriptions = buildUnnamed2081(); | 422 o.subscriptions = buildUnnamed2186(); |
421 } | 423 } |
422 buildCounterSubscriptions--; | 424 buildCounterSubscriptions--; |
423 return o; | 425 return o; |
424 } | 426 } |
425 | 427 |
426 checkSubscriptions(api.Subscriptions o) { | 428 checkSubscriptions(api.Subscriptions o) { |
427 buildCounterSubscriptions++; | 429 buildCounterSubscriptions++; |
428 if (buildCounterSubscriptions < 3) { | 430 if (buildCounterSubscriptions < 3) { |
429 unittest.expect(o.kind, unittest.equals('foo')); | 431 unittest.expect(o.kind, unittest.equals('foo')); |
430 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 432 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
431 checkUnnamed2081(o.subscriptions); | 433 checkUnnamed2186(o.subscriptions); |
432 } | 434 } |
433 buildCounterSubscriptions--; | 435 buildCounterSubscriptions--; |
434 } | 436 } |
435 | 437 |
436 | 438 |
437 main() { | 439 main() { |
438 unittest.group("obj-schema-Address", () { | 440 unittest.group("obj-schema-Address", () { |
439 unittest.test("to-json--from-json", () { | 441 unittest.test("to-json--from-json", () { |
440 var o = buildAddress(); | 442 var o = buildAddress(); |
441 var od = new api.Address.fromJson(o.toJson()); | 443 var od = new api.Address.fromJson(o.toJson()); |
(...skipping 1068 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1510 res.suspend(arg_customerId, arg_subscriptionId).then(unittest.expectAsync(
((api.Subscription response) { | 1512 res.suspend(arg_customerId, arg_subscriptionId).then(unittest.expectAsync(
((api.Subscription response) { |
1511 checkSubscription(response); | 1513 checkSubscription(response); |
1512 }))); | 1514 }))); |
1513 }); | 1515 }); |
1514 | 1516 |
1515 }); | 1517 }); |
1516 | 1518 |
1517 | 1519 |
1518 } | 1520 } |
1519 | 1521 |
OLD | NEW |