OLD | NEW |
1 library googleapis.cloudbilling.v1.test; | 1 library googleapis.cloudbilling.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 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
67 checkBillingAccount(api.BillingAccount o) { | 67 checkBillingAccount(api.BillingAccount o) { |
68 buildCounterBillingAccount++; | 68 buildCounterBillingAccount++; |
69 if (buildCounterBillingAccount < 3) { | 69 if (buildCounterBillingAccount < 3) { |
70 unittest.expect(o.displayName, unittest.equals('foo')); | 70 unittest.expect(o.displayName, unittest.equals('foo')); |
71 unittest.expect(o.name, unittest.equals('foo')); | 71 unittest.expect(o.name, unittest.equals('foo')); |
72 unittest.expect(o.open, unittest.isTrue); | 72 unittest.expect(o.open, unittest.isTrue); |
73 } | 73 } |
74 buildCounterBillingAccount--; | 74 buildCounterBillingAccount--; |
75 } | 75 } |
76 | 76 |
77 buildUnnamed105() { | 77 buildUnnamed68() { |
78 var o = new core.List<api.BillingAccount>(); | 78 var o = new core.List<api.BillingAccount>(); |
79 o.add(buildBillingAccount()); | 79 o.add(buildBillingAccount()); |
80 o.add(buildBillingAccount()); | 80 o.add(buildBillingAccount()); |
81 return o; | 81 return o; |
82 } | 82 } |
83 | 83 |
84 checkUnnamed105(core.List<api.BillingAccount> o) { | 84 checkUnnamed68(core.List<api.BillingAccount> o) { |
85 unittest.expect(o, unittest.hasLength(2)); | 85 unittest.expect(o, unittest.hasLength(2)); |
86 checkBillingAccount(o[0]); | 86 checkBillingAccount(o[0]); |
87 checkBillingAccount(o[1]); | 87 checkBillingAccount(o[1]); |
88 } | 88 } |
89 | 89 |
90 core.int buildCounterListBillingAccountsResponse = 0; | 90 core.int buildCounterListBillingAccountsResponse = 0; |
91 buildListBillingAccountsResponse() { | 91 buildListBillingAccountsResponse() { |
92 var o = new api.ListBillingAccountsResponse(); | 92 var o = new api.ListBillingAccountsResponse(); |
93 buildCounterListBillingAccountsResponse++; | 93 buildCounterListBillingAccountsResponse++; |
94 if (buildCounterListBillingAccountsResponse < 3) { | 94 if (buildCounterListBillingAccountsResponse < 3) { |
95 o.billingAccounts = buildUnnamed105(); | 95 o.billingAccounts = buildUnnamed68(); |
96 o.nextPageToken = "foo"; | 96 o.nextPageToken = "foo"; |
97 } | 97 } |
98 buildCounterListBillingAccountsResponse--; | 98 buildCounterListBillingAccountsResponse--; |
99 return o; | 99 return o; |
100 } | 100 } |
101 | 101 |
102 checkListBillingAccountsResponse(api.ListBillingAccountsResponse o) { | 102 checkListBillingAccountsResponse(api.ListBillingAccountsResponse o) { |
103 buildCounterListBillingAccountsResponse++; | 103 buildCounterListBillingAccountsResponse++; |
104 if (buildCounterListBillingAccountsResponse < 3) { | 104 if (buildCounterListBillingAccountsResponse < 3) { |
105 checkUnnamed105(o.billingAccounts); | 105 checkUnnamed68(o.billingAccounts); |
106 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 106 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
107 } | 107 } |
108 buildCounterListBillingAccountsResponse--; | 108 buildCounterListBillingAccountsResponse--; |
109 } | 109 } |
110 | 110 |
111 buildUnnamed106() { | 111 buildUnnamed69() { |
112 var o = new core.List<api.ProjectBillingInfo>(); | 112 var o = new core.List<api.ProjectBillingInfo>(); |
113 o.add(buildProjectBillingInfo()); | 113 o.add(buildProjectBillingInfo()); |
114 o.add(buildProjectBillingInfo()); | 114 o.add(buildProjectBillingInfo()); |
115 return o; | 115 return o; |
116 } | 116 } |
117 | 117 |
118 checkUnnamed106(core.List<api.ProjectBillingInfo> o) { | 118 checkUnnamed69(core.List<api.ProjectBillingInfo> o) { |
119 unittest.expect(o, unittest.hasLength(2)); | 119 unittest.expect(o, unittest.hasLength(2)); |
120 checkProjectBillingInfo(o[0]); | 120 checkProjectBillingInfo(o[0]); |
121 checkProjectBillingInfo(o[1]); | 121 checkProjectBillingInfo(o[1]); |
122 } | 122 } |
123 | 123 |
124 core.int buildCounterListProjectBillingInfoResponse = 0; | 124 core.int buildCounterListProjectBillingInfoResponse = 0; |
125 buildListProjectBillingInfoResponse() { | 125 buildListProjectBillingInfoResponse() { |
126 var o = new api.ListProjectBillingInfoResponse(); | 126 var o = new api.ListProjectBillingInfoResponse(); |
127 buildCounterListProjectBillingInfoResponse++; | 127 buildCounterListProjectBillingInfoResponse++; |
128 if (buildCounterListProjectBillingInfoResponse < 3) { | 128 if (buildCounterListProjectBillingInfoResponse < 3) { |
129 o.nextPageToken = "foo"; | 129 o.nextPageToken = "foo"; |
130 o.projectBillingInfo = buildUnnamed106(); | 130 o.projectBillingInfo = buildUnnamed69(); |
131 } | 131 } |
132 buildCounterListProjectBillingInfoResponse--; | 132 buildCounterListProjectBillingInfoResponse--; |
133 return o; | 133 return o; |
134 } | 134 } |
135 | 135 |
136 checkListProjectBillingInfoResponse(api.ListProjectBillingInfoResponse o) { | 136 checkListProjectBillingInfoResponse(api.ListProjectBillingInfoResponse o) { |
137 buildCounterListProjectBillingInfoResponse++; | 137 buildCounterListProjectBillingInfoResponse++; |
138 if (buildCounterListProjectBillingInfoResponse < 3) { | 138 if (buildCounterListProjectBillingInfoResponse < 3) { |
139 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 139 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
140 checkUnnamed106(o.projectBillingInfo); | 140 checkUnnamed69(o.projectBillingInfo); |
141 } | 141 } |
142 buildCounterListProjectBillingInfoResponse--; | 142 buildCounterListProjectBillingInfoResponse--; |
143 } | 143 } |
144 | 144 |
145 core.int buildCounterProjectBillingInfo = 0; | 145 core.int buildCounterProjectBillingInfo = 0; |
146 buildProjectBillingInfo() { | 146 buildProjectBillingInfo() { |
147 var o = new api.ProjectBillingInfo(); | 147 var o = new api.ProjectBillingInfo(); |
148 buildCounterProjectBillingInfo++; | 148 buildCounterProjectBillingInfo++; |
149 if (buildCounterProjectBillingInfo < 3) { | 149 if (buildCounterProjectBillingInfo < 3) { |
150 o.billingAccountName = "foo"; | 150 o.billingAccountName = "foo"; |
(...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
447 res.updateBillingInfo(arg_request, arg_name).then(unittest.expectAsync1(((
api.ProjectBillingInfo response) { | 447 res.updateBillingInfo(arg_request, arg_name).then(unittest.expectAsync1(((
api.ProjectBillingInfo response) { |
448 checkProjectBillingInfo(response); | 448 checkProjectBillingInfo(response); |
449 }))); | 449 }))); |
450 }); | 450 }); |
451 | 451 |
452 }); | 452 }); |
453 | 453 |
454 | 454 |
455 } | 455 } |
456 | 456 |
OLD | NEW |