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:test/test.dart' as unittest; | 10 import 'package:test/test.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 buildUnnamed2429() { | 172 buildUnnamed2450() { |
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 checkUnnamed2429(core.List<core.String> o) { | 179 checkUnnamed2450(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 = buildUnnamed2429(); | 190 o.serviceAccountEmailAddresses = buildUnnamed2450(); |
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 checkUnnamed2429(o.serviceAccountEmailAddresses); | 200 checkUnnamed2450(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 buildUnnamed2430() { | 294 buildUnnamed2451() { |
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 checkUnnamed2430(core.List<core.String> o) { | 301 checkUnnamed2451(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 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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.skuName = "foo"; |
367 o.status = "foo"; | 367 o.status = "foo"; |
368 o.subscriptionId = "foo"; | 368 o.subscriptionId = "foo"; |
369 o.suspensionReasons = buildUnnamed2430(); | 369 o.suspensionReasons = buildUnnamed2451(); |
370 o.transferInfo = buildSubscriptionTransferInfo(); | 370 o.transferInfo = buildSubscriptionTransferInfo(); |
371 o.trialSettings = buildSubscriptionTrialSettings(); | 371 o.trialSettings = buildSubscriptionTrialSettings(); |
372 } | 372 } |
373 buildCounterSubscription--; | 373 buildCounterSubscription--; |
374 return o; | 374 return o; |
375 } | 375 } |
376 | 376 |
377 checkSubscription(api.Subscription o) { | 377 checkSubscription(api.Subscription o) { |
378 buildCounterSubscription++; | 378 buildCounterSubscription++; |
379 if (buildCounterSubscription < 3) { | 379 if (buildCounterSubscription < 3) { |
380 unittest.expect(o.billingMethod, unittest.equals('foo')); | 380 unittest.expect(o.billingMethod, unittest.equals('foo')); |
381 unittest.expect(o.creationTime, unittest.equals('foo')); | 381 unittest.expect(o.creationTime, unittest.equals('foo')); |
382 unittest.expect(o.customerDomain, unittest.equals('foo')); | 382 unittest.expect(o.customerDomain, unittest.equals('foo')); |
383 unittest.expect(o.customerId, unittest.equals('foo')); | 383 unittest.expect(o.customerId, unittest.equals('foo')); |
384 unittest.expect(o.dealCode, unittest.equals('foo')); | 384 unittest.expect(o.dealCode, unittest.equals('foo')); |
385 unittest.expect(o.kind, unittest.equals('foo')); | 385 unittest.expect(o.kind, unittest.equals('foo')); |
386 checkSubscriptionPlan(o.plan); | 386 checkSubscriptionPlan(o.plan); |
387 unittest.expect(o.purchaseOrderId, unittest.equals('foo')); | 387 unittest.expect(o.purchaseOrderId, unittest.equals('foo')); |
388 checkRenewalSettings(o.renewalSettings); | 388 checkRenewalSettings(o.renewalSettings); |
389 unittest.expect(o.resourceUiUrl, unittest.equals('foo')); | 389 unittest.expect(o.resourceUiUrl, unittest.equals('foo')); |
390 checkSeats(o.seats); | 390 checkSeats(o.seats); |
391 unittest.expect(o.skuId, unittest.equals('foo')); | 391 unittest.expect(o.skuId, unittest.equals('foo')); |
392 unittest.expect(o.skuName, unittest.equals('foo')); | 392 unittest.expect(o.skuName, unittest.equals('foo')); |
393 unittest.expect(o.status, unittest.equals('foo')); | 393 unittest.expect(o.status, unittest.equals('foo')); |
394 unittest.expect(o.subscriptionId, unittest.equals('foo')); | 394 unittest.expect(o.subscriptionId, unittest.equals('foo')); |
395 checkUnnamed2430(o.suspensionReasons); | 395 checkUnnamed2451(o.suspensionReasons); |
396 checkSubscriptionTransferInfo(o.transferInfo); | 396 checkSubscriptionTransferInfo(o.transferInfo); |
397 checkSubscriptionTrialSettings(o.trialSettings); | 397 checkSubscriptionTrialSettings(o.trialSettings); |
398 } | 398 } |
399 buildCounterSubscription--; | 399 buildCounterSubscription--; |
400 } | 400 } |
401 | 401 |
402 buildUnnamed2431() { | 402 buildUnnamed2452() { |
403 var o = new core.List<api.Subscription>(); | 403 var o = new core.List<api.Subscription>(); |
404 o.add(buildSubscription()); | 404 o.add(buildSubscription()); |
405 o.add(buildSubscription()); | 405 o.add(buildSubscription()); |
406 return o; | 406 return o; |
407 } | 407 } |
408 | 408 |
409 checkUnnamed2431(core.List<api.Subscription> o) { | 409 checkUnnamed2452(core.List<api.Subscription> o) { |
410 unittest.expect(o, unittest.hasLength(2)); | 410 unittest.expect(o, unittest.hasLength(2)); |
411 checkSubscription(o[0]); | 411 checkSubscription(o[0]); |
412 checkSubscription(o[1]); | 412 checkSubscription(o[1]); |
413 } | 413 } |
414 | 414 |
415 core.int buildCounterSubscriptions = 0; | 415 core.int buildCounterSubscriptions = 0; |
416 buildSubscriptions() { | 416 buildSubscriptions() { |
417 var o = new api.Subscriptions(); | 417 var o = new api.Subscriptions(); |
418 buildCounterSubscriptions++; | 418 buildCounterSubscriptions++; |
419 if (buildCounterSubscriptions < 3) { | 419 if (buildCounterSubscriptions < 3) { |
420 o.kind = "foo"; | 420 o.kind = "foo"; |
421 o.nextPageToken = "foo"; | 421 o.nextPageToken = "foo"; |
422 o.subscriptions = buildUnnamed2431(); | 422 o.subscriptions = buildUnnamed2452(); |
423 } | 423 } |
424 buildCounterSubscriptions--; | 424 buildCounterSubscriptions--; |
425 return o; | 425 return o; |
426 } | 426 } |
427 | 427 |
428 checkSubscriptions(api.Subscriptions o) { | 428 checkSubscriptions(api.Subscriptions o) { |
429 buildCounterSubscriptions++; | 429 buildCounterSubscriptions++; |
430 if (buildCounterSubscriptions < 3) { | 430 if (buildCounterSubscriptions < 3) { |
431 unittest.expect(o.kind, unittest.equals('foo')); | 431 unittest.expect(o.kind, unittest.equals('foo')); |
432 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 432 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
433 checkUnnamed2431(o.subscriptions); | 433 checkUnnamed2452(o.subscriptions); |
434 } | 434 } |
435 buildCounterSubscriptions--; | 435 buildCounterSubscriptions--; |
436 } | 436 } |
437 | 437 |
438 | 438 |
439 main() { | 439 main() { |
440 unittest.group("obj-schema-Address", () { | 440 unittest.group("obj-schema-Address", () { |
441 unittest.test("to-json--from-json", () { | 441 unittest.test("to-json--from-json", () { |
442 var o = buildAddress(); | 442 var o = buildAddress(); |
443 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... |
1512 res.suspend(arg_customerId, arg_subscriptionId).then(unittest.expectAsync1
(((api.Subscription response) { | 1512 res.suspend(arg_customerId, arg_subscriptionId).then(unittest.expectAsync1
(((api.Subscription response) { |
1513 checkSubscription(response); | 1513 checkSubscription(response); |
1514 }))); | 1514 }))); |
1515 }); | 1515 }); |
1516 | 1516 |
1517 }); | 1517 }); |
1518 | 1518 |
1519 | 1519 |
1520 } | 1520 } |
1521 | 1521 |
OLD | NEW |