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 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
231 checkSubscriptionPlan(api.SubscriptionPlan o) { | 231 checkSubscriptionPlan(api.SubscriptionPlan o) { |
232 buildCounterSubscriptionPlan++; | 232 buildCounterSubscriptionPlan++; |
233 if (buildCounterSubscriptionPlan < 3) { | 233 if (buildCounterSubscriptionPlan < 3) { |
234 checkSubscriptionPlanCommitmentInterval(o.commitmentInterval); | 234 checkSubscriptionPlanCommitmentInterval(o.commitmentInterval); |
235 unittest.expect(o.isCommitmentPlan, unittest.isTrue); | 235 unittest.expect(o.isCommitmentPlan, unittest.isTrue); |
236 unittest.expect(o.planName, unittest.equals('foo')); | 236 unittest.expect(o.planName, unittest.equals('foo')); |
237 } | 237 } |
238 buildCounterSubscriptionPlan--; | 238 buildCounterSubscriptionPlan--; |
239 } | 239 } |
240 | 240 |
241 buildUnnamed2162() { | 241 buildUnnamed2256() { |
242 var o = new core.List<core.String>(); | 242 var o = new core.List<core.String>(); |
243 o.add("foo"); | 243 o.add("foo"); |
244 o.add("foo"); | 244 o.add("foo"); |
245 return o; | 245 return o; |
246 } | 246 } |
247 | 247 |
248 checkUnnamed2162(core.List<core.String> o) { | 248 checkUnnamed2256(core.List<core.String> o) { |
249 unittest.expect(o, unittest.hasLength(2)); | 249 unittest.expect(o, unittest.hasLength(2)); |
250 unittest.expect(o[0], unittest.equals('foo')); | 250 unittest.expect(o[0], unittest.equals('foo')); |
251 unittest.expect(o[1], unittest.equals('foo')); | 251 unittest.expect(o[1], unittest.equals('foo')); |
252 } | 252 } |
253 | 253 |
254 core.int buildCounterSubscriptionTransferInfo = 0; | 254 core.int buildCounterSubscriptionTransferInfo = 0; |
255 buildSubscriptionTransferInfo() { | 255 buildSubscriptionTransferInfo() { |
256 var o = new api.SubscriptionTransferInfo(); | 256 var o = new api.SubscriptionTransferInfo(); |
257 buildCounterSubscriptionTransferInfo++; | 257 buildCounterSubscriptionTransferInfo++; |
258 if (buildCounterSubscriptionTransferInfo < 3) { | 258 if (buildCounterSubscriptionTransferInfo < 3) { |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
305 o.dealCode = "foo"; | 305 o.dealCode = "foo"; |
306 o.kind = "foo"; | 306 o.kind = "foo"; |
307 o.plan = buildSubscriptionPlan(); | 307 o.plan = buildSubscriptionPlan(); |
308 o.purchaseOrderId = "foo"; | 308 o.purchaseOrderId = "foo"; |
309 o.renewalSettings = buildRenewalSettings(); | 309 o.renewalSettings = buildRenewalSettings(); |
310 o.resourceUiUrl = "foo"; | 310 o.resourceUiUrl = "foo"; |
311 o.seats = buildSeats(); | 311 o.seats = buildSeats(); |
312 o.skuId = "foo"; | 312 o.skuId = "foo"; |
313 o.status = "foo"; | 313 o.status = "foo"; |
314 o.subscriptionId = "foo"; | 314 o.subscriptionId = "foo"; |
315 o.suspensionReasons = buildUnnamed2162(); | 315 o.suspensionReasons = buildUnnamed2256(); |
316 o.transferInfo = buildSubscriptionTransferInfo(); | 316 o.transferInfo = buildSubscriptionTransferInfo(); |
317 o.trialSettings = buildSubscriptionTrialSettings(); | 317 o.trialSettings = buildSubscriptionTrialSettings(); |
318 } | 318 } |
319 buildCounterSubscription--; | 319 buildCounterSubscription--; |
320 return o; | 320 return o; |
321 } | 321 } |
322 | 322 |
323 checkSubscription(api.Subscription o) { | 323 checkSubscription(api.Subscription o) { |
324 buildCounterSubscription++; | 324 buildCounterSubscription++; |
325 if (buildCounterSubscription < 3) { | 325 if (buildCounterSubscription < 3) { |
326 unittest.expect(o.billingMethod, unittest.equals('foo')); | 326 unittest.expect(o.billingMethod, unittest.equals('foo')); |
327 unittest.expect(o.creationTime, unittest.equals('foo')); | 327 unittest.expect(o.creationTime, unittest.equals('foo')); |
328 unittest.expect(o.customerDomain, unittest.equals('foo')); | 328 unittest.expect(o.customerDomain, unittest.equals('foo')); |
329 unittest.expect(o.customerId, unittest.equals('foo')); | 329 unittest.expect(o.customerId, unittest.equals('foo')); |
330 unittest.expect(o.dealCode, unittest.equals('foo')); | 330 unittest.expect(o.dealCode, unittest.equals('foo')); |
331 unittest.expect(o.kind, unittest.equals('foo')); | 331 unittest.expect(o.kind, unittest.equals('foo')); |
332 checkSubscriptionPlan(o.plan); | 332 checkSubscriptionPlan(o.plan); |
333 unittest.expect(o.purchaseOrderId, unittest.equals('foo')); | 333 unittest.expect(o.purchaseOrderId, unittest.equals('foo')); |
334 checkRenewalSettings(o.renewalSettings); | 334 checkRenewalSettings(o.renewalSettings); |
335 unittest.expect(o.resourceUiUrl, unittest.equals('foo')); | 335 unittest.expect(o.resourceUiUrl, unittest.equals('foo')); |
336 checkSeats(o.seats); | 336 checkSeats(o.seats); |
337 unittest.expect(o.skuId, unittest.equals('foo')); | 337 unittest.expect(o.skuId, unittest.equals('foo')); |
338 unittest.expect(o.status, unittest.equals('foo')); | 338 unittest.expect(o.status, unittest.equals('foo')); |
339 unittest.expect(o.subscriptionId, unittest.equals('foo')); | 339 unittest.expect(o.subscriptionId, unittest.equals('foo')); |
340 checkUnnamed2162(o.suspensionReasons); | 340 checkUnnamed2256(o.suspensionReasons); |
341 checkSubscriptionTransferInfo(o.transferInfo); | 341 checkSubscriptionTransferInfo(o.transferInfo); |
342 checkSubscriptionTrialSettings(o.trialSettings); | 342 checkSubscriptionTrialSettings(o.trialSettings); |
343 } | 343 } |
344 buildCounterSubscription--; | 344 buildCounterSubscription--; |
345 } | 345 } |
346 | 346 |
347 buildUnnamed2163() { | 347 buildUnnamed2257() { |
348 var o = new core.List<api.Subscription>(); | 348 var o = new core.List<api.Subscription>(); |
349 o.add(buildSubscription()); | 349 o.add(buildSubscription()); |
350 o.add(buildSubscription()); | 350 o.add(buildSubscription()); |
351 return o; | 351 return o; |
352 } | 352 } |
353 | 353 |
354 checkUnnamed2163(core.List<api.Subscription> o) { | 354 checkUnnamed2257(core.List<api.Subscription> o) { |
355 unittest.expect(o, unittest.hasLength(2)); | 355 unittest.expect(o, unittest.hasLength(2)); |
356 checkSubscription(o[0]); | 356 checkSubscription(o[0]); |
357 checkSubscription(o[1]); | 357 checkSubscription(o[1]); |
358 } | 358 } |
359 | 359 |
360 core.int buildCounterSubscriptions = 0; | 360 core.int buildCounterSubscriptions = 0; |
361 buildSubscriptions() { | 361 buildSubscriptions() { |
362 var o = new api.Subscriptions(); | 362 var o = new api.Subscriptions(); |
363 buildCounterSubscriptions++; | 363 buildCounterSubscriptions++; |
364 if (buildCounterSubscriptions < 3) { | 364 if (buildCounterSubscriptions < 3) { |
365 o.kind = "foo"; | 365 o.kind = "foo"; |
366 o.nextPageToken = "foo"; | 366 o.nextPageToken = "foo"; |
367 o.subscriptions = buildUnnamed2163(); | 367 o.subscriptions = buildUnnamed2257(); |
368 } | 368 } |
369 buildCounterSubscriptions--; | 369 buildCounterSubscriptions--; |
370 return o; | 370 return o; |
371 } | 371 } |
372 | 372 |
373 checkSubscriptions(api.Subscriptions o) { | 373 checkSubscriptions(api.Subscriptions o) { |
374 buildCounterSubscriptions++; | 374 buildCounterSubscriptions++; |
375 if (buildCounterSubscriptions < 3) { | 375 if (buildCounterSubscriptions < 3) { |
376 unittest.expect(o.kind, unittest.equals('foo')); | 376 unittest.expect(o.kind, unittest.equals('foo')); |
377 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 377 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
378 checkUnnamed2163(o.subscriptions); | 378 checkUnnamed2257(o.subscriptions); |
379 } | 379 } |
380 buildCounterSubscriptions--; | 380 buildCounterSubscriptions--; |
381 } | 381 } |
382 | 382 |
383 | 383 |
384 main() { | 384 main() { |
385 unittest.group("obj-schema-Address", () { | 385 unittest.group("obj-schema-Address", () { |
386 unittest.test("to-json--from-json", () { | 386 unittest.test("to-json--from-json", () { |
387 var o = buildAddress(); | 387 var o = buildAddress(); |
388 var od = new api.Address.fromJson(o.toJson()); | 388 var od = new api.Address.fromJson(o.toJson()); |
(...skipping 907 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1296 res.suspend(arg_customerId, arg_subscriptionId).then(unittest.expectAsync(
((api.Subscription response) { | 1296 res.suspend(arg_customerId, arg_subscriptionId).then(unittest.expectAsync(
((api.Subscription response) { |
1297 checkSubscription(response); | 1297 checkSubscription(response); |
1298 }))); | 1298 }))); |
1299 }); | 1299 }); |
1300 | 1300 |
1301 }); | 1301 }); |
1302 | 1302 |
1303 | 1303 |
1304 } | 1304 } |
1305 | 1305 |
OLD | NEW |