OLD | NEW |
1 library googleapis.cloudresourcemanager.v1.test; | 1 library googleapis.cloudresourcemanager.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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 } | 44 } |
45 } | 45 } |
46 } | 46 } |
47 | 47 |
48 http.StreamedResponse stringResponse( | 48 http.StreamedResponse stringResponse( |
49 core.int status, core.Map headers, core.String body) { | 49 core.int status, core.Map headers, core.String body) { |
50 var stream = new async.Stream.fromIterable([convert.UTF8.encode(body)]); | 50 var stream = new async.Stream.fromIterable([convert.UTF8.encode(body)]); |
51 return new http.StreamedResponse(stream, status, headers: headers); | 51 return new http.StreamedResponse(stream, status, headers: headers); |
52 } | 52 } |
53 | 53 |
54 buildUnnamed661() { | 54 buildUnnamed2023() { |
55 var o = new core.List<core.String>(); | 55 var o = new core.List<core.String>(); |
56 o.add("foo"); | 56 o.add("foo"); |
57 o.add("foo"); | 57 o.add("foo"); |
58 return o; | 58 return o; |
59 } | 59 } |
60 | 60 |
61 checkUnnamed661(core.List<core.String> o) { | 61 checkUnnamed2023(core.List<core.String> o) { |
62 unittest.expect(o, unittest.hasLength(2)); | 62 unittest.expect(o, unittest.hasLength(2)); |
63 unittest.expect(o[0], unittest.equals('foo')); | 63 unittest.expect(o[0], unittest.equals('foo')); |
64 unittest.expect(o[1], unittest.equals('foo')); | 64 unittest.expect(o[1], unittest.equals('foo')); |
65 } | 65 } |
66 | 66 |
67 core.int buildCounterBinding = 0; | 67 core.int buildCounterBinding = 0; |
68 buildBinding() { | 68 buildBinding() { |
69 var o = new api.Binding(); | 69 var o = new api.Binding(); |
70 buildCounterBinding++; | 70 buildCounterBinding++; |
71 if (buildCounterBinding < 3) { | 71 if (buildCounterBinding < 3) { |
72 o.members = buildUnnamed661(); | 72 o.members = buildUnnamed2023(); |
73 o.role = "foo"; | 73 o.role = "foo"; |
74 } | 74 } |
75 buildCounterBinding--; | 75 buildCounterBinding--; |
76 return o; | 76 return o; |
77 } | 77 } |
78 | 78 |
79 checkBinding(api.Binding o) { | 79 checkBinding(api.Binding o) { |
80 buildCounterBinding++; | 80 buildCounterBinding++; |
81 if (buildCounterBinding < 3) { | 81 if (buildCounterBinding < 3) { |
82 checkUnnamed661(o.members); | 82 checkUnnamed2023(o.members); |
83 unittest.expect(o.role, unittest.equals('foo')); | 83 unittest.expect(o.role, unittest.equals('foo')); |
84 } | 84 } |
85 buildCounterBinding--; | 85 buildCounterBinding--; |
86 } | 86 } |
87 | 87 |
88 core.int buildCounterEmpty = 0; | 88 core.int buildCounterEmpty = 0; |
89 buildEmpty() { | 89 buildEmpty() { |
90 var o = new api.Empty(); | 90 var o = new api.Empty(); |
91 buildCounterEmpty++; | 91 buildCounterEmpty++; |
92 if (buildCounterEmpty < 3) { | 92 if (buildCounterEmpty < 3) { |
(...skipping 19 matching lines...) Expand all Loading... |
112 return o; | 112 return o; |
113 } | 113 } |
114 | 114 |
115 checkGetIamPolicyRequest(api.GetIamPolicyRequest o) { | 115 checkGetIamPolicyRequest(api.GetIamPolicyRequest o) { |
116 buildCounterGetIamPolicyRequest++; | 116 buildCounterGetIamPolicyRequest++; |
117 if (buildCounterGetIamPolicyRequest < 3) { | 117 if (buildCounterGetIamPolicyRequest < 3) { |
118 } | 118 } |
119 buildCounterGetIamPolicyRequest--; | 119 buildCounterGetIamPolicyRequest--; |
120 } | 120 } |
121 | 121 |
122 buildUnnamed662() { | 122 buildUnnamed2024() { |
123 var o = new core.List<api.Project>(); | 123 var o = new core.List<api.Project>(); |
124 o.add(buildProject()); | 124 o.add(buildProject()); |
125 o.add(buildProject()); | 125 o.add(buildProject()); |
126 return o; | 126 return o; |
127 } | 127 } |
128 | 128 |
129 checkUnnamed662(core.List<api.Project> o) { | 129 checkUnnamed2024(core.List<api.Project> o) { |
130 unittest.expect(o, unittest.hasLength(2)); | 130 unittest.expect(o, unittest.hasLength(2)); |
131 checkProject(o[0]); | 131 checkProject(o[0]); |
132 checkProject(o[1]); | 132 checkProject(o[1]); |
133 } | 133 } |
134 | 134 |
135 core.int buildCounterListProjectsResponse = 0; | 135 core.int buildCounterListProjectsResponse = 0; |
136 buildListProjectsResponse() { | 136 buildListProjectsResponse() { |
137 var o = new api.ListProjectsResponse(); | 137 var o = new api.ListProjectsResponse(); |
138 buildCounterListProjectsResponse++; | 138 buildCounterListProjectsResponse++; |
139 if (buildCounterListProjectsResponse < 3) { | 139 if (buildCounterListProjectsResponse < 3) { |
140 o.nextPageToken = "foo"; | 140 o.nextPageToken = "foo"; |
141 o.projects = buildUnnamed662(); | 141 o.projects = buildUnnamed2024(); |
142 } | 142 } |
143 buildCounterListProjectsResponse--; | 143 buildCounterListProjectsResponse--; |
144 return o; | 144 return o; |
145 } | 145 } |
146 | 146 |
147 checkListProjectsResponse(api.ListProjectsResponse o) { | 147 checkListProjectsResponse(api.ListProjectsResponse o) { |
148 buildCounterListProjectsResponse++; | 148 buildCounterListProjectsResponse++; |
149 if (buildCounterListProjectsResponse < 3) { | 149 if (buildCounterListProjectsResponse < 3) { |
150 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 150 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
151 checkUnnamed662(o.projects); | 151 checkUnnamed2024(o.projects); |
152 } | 152 } |
153 buildCounterListProjectsResponse--; | 153 buildCounterListProjectsResponse--; |
154 } | 154 } |
155 | 155 |
156 buildUnnamed663() { | 156 buildUnnamed2025() { |
157 var o = new core.List<api.Binding>(); | 157 var o = new core.List<api.Binding>(); |
158 o.add(buildBinding()); | 158 o.add(buildBinding()); |
159 o.add(buildBinding()); | 159 o.add(buildBinding()); |
160 return o; | 160 return o; |
161 } | 161 } |
162 | 162 |
163 checkUnnamed663(core.List<api.Binding> o) { | 163 checkUnnamed2025(core.List<api.Binding> o) { |
164 unittest.expect(o, unittest.hasLength(2)); | 164 unittest.expect(o, unittest.hasLength(2)); |
165 checkBinding(o[0]); | 165 checkBinding(o[0]); |
166 checkBinding(o[1]); | 166 checkBinding(o[1]); |
167 } | 167 } |
168 | 168 |
169 core.int buildCounterPolicy = 0; | 169 core.int buildCounterPolicy = 0; |
170 buildPolicy() { | 170 buildPolicy() { |
171 var o = new api.Policy(); | 171 var o = new api.Policy(); |
172 buildCounterPolicy++; | 172 buildCounterPolicy++; |
173 if (buildCounterPolicy < 3) { | 173 if (buildCounterPolicy < 3) { |
174 o.bindings = buildUnnamed663(); | 174 o.bindings = buildUnnamed2025(); |
175 o.etag = "foo"; | 175 o.etag = "foo"; |
176 o.version = 42; | 176 o.version = 42; |
177 } | 177 } |
178 buildCounterPolicy--; | 178 buildCounterPolicy--; |
179 return o; | 179 return o; |
180 } | 180 } |
181 | 181 |
182 checkPolicy(api.Policy o) { | 182 checkPolicy(api.Policy o) { |
183 buildCounterPolicy++; | 183 buildCounterPolicy++; |
184 if (buildCounterPolicy < 3) { | 184 if (buildCounterPolicy < 3) { |
185 checkUnnamed663(o.bindings); | 185 checkUnnamed2025(o.bindings); |
186 unittest.expect(o.etag, unittest.equals('foo')); | 186 unittest.expect(o.etag, unittest.equals('foo')); |
187 unittest.expect(o.version, unittest.equals(42)); | 187 unittest.expect(o.version, unittest.equals(42)); |
188 } | 188 } |
189 buildCounterPolicy--; | 189 buildCounterPolicy--; |
190 } | 190 } |
191 | 191 |
192 buildUnnamed664() { | 192 buildUnnamed2026() { |
193 var o = new core.Map<core.String, core.String>(); | 193 var o = new core.Map<core.String, core.String>(); |
194 o["x"] = "foo"; | 194 o["x"] = "foo"; |
195 o["y"] = "foo"; | 195 o["y"] = "foo"; |
196 return o; | 196 return o; |
197 } | 197 } |
198 | 198 |
199 checkUnnamed664(core.Map<core.String, core.String> o) { | 199 checkUnnamed2026(core.Map<core.String, core.String> o) { |
200 unittest.expect(o, unittest.hasLength(2)); | 200 unittest.expect(o, unittest.hasLength(2)); |
201 unittest.expect(o["x"], unittest.equals('foo')); | 201 unittest.expect(o["x"], unittest.equals('foo')); |
202 unittest.expect(o["y"], unittest.equals('foo')); | 202 unittest.expect(o["y"], unittest.equals('foo')); |
203 } | 203 } |
204 | 204 |
205 core.int buildCounterProject = 0; | 205 core.int buildCounterProject = 0; |
206 buildProject() { | 206 buildProject() { |
207 var o = new api.Project(); | 207 var o = new api.Project(); |
208 buildCounterProject++; | 208 buildCounterProject++; |
209 if (buildCounterProject < 3) { | 209 if (buildCounterProject < 3) { |
210 o.createTime = "foo"; | 210 o.createTime = "foo"; |
211 o.labels = buildUnnamed664(); | 211 o.labels = buildUnnamed2026(); |
212 o.lifecycleState = "foo"; | 212 o.lifecycleState = "foo"; |
213 o.name = "foo"; | 213 o.name = "foo"; |
214 o.parent = buildResourceId(); | 214 o.parent = buildResourceId(); |
215 o.projectId = "foo"; | 215 o.projectId = "foo"; |
216 o.projectNumber = "foo"; | 216 o.projectNumber = "foo"; |
217 } | 217 } |
218 buildCounterProject--; | 218 buildCounterProject--; |
219 return o; | 219 return o; |
220 } | 220 } |
221 | 221 |
222 checkProject(api.Project o) { | 222 checkProject(api.Project o) { |
223 buildCounterProject++; | 223 buildCounterProject++; |
224 if (buildCounterProject < 3) { | 224 if (buildCounterProject < 3) { |
225 unittest.expect(o.createTime, unittest.equals('foo')); | 225 unittest.expect(o.createTime, unittest.equals('foo')); |
226 checkUnnamed664(o.labels); | 226 checkUnnamed2026(o.labels); |
227 unittest.expect(o.lifecycleState, unittest.equals('foo')); | 227 unittest.expect(o.lifecycleState, unittest.equals('foo')); |
228 unittest.expect(o.name, unittest.equals('foo')); | 228 unittest.expect(o.name, unittest.equals('foo')); |
229 checkResourceId(o.parent); | 229 checkResourceId(o.parent); |
230 unittest.expect(o.projectId, unittest.equals('foo')); | 230 unittest.expect(o.projectId, unittest.equals('foo')); |
231 unittest.expect(o.projectNumber, unittest.equals('foo')); | 231 unittest.expect(o.projectNumber, unittest.equals('foo')); |
232 } | 232 } |
233 buildCounterProject--; | 233 buildCounterProject--; |
234 } | 234 } |
235 | 235 |
236 core.int buildCounterResourceId = 0; | 236 core.int buildCounterResourceId = 0; |
(...skipping 29 matching lines...) Expand all Loading... |
266 } | 266 } |
267 | 267 |
268 checkSetIamPolicyRequest(api.SetIamPolicyRequest o) { | 268 checkSetIamPolicyRequest(api.SetIamPolicyRequest o) { |
269 buildCounterSetIamPolicyRequest++; | 269 buildCounterSetIamPolicyRequest++; |
270 if (buildCounterSetIamPolicyRequest < 3) { | 270 if (buildCounterSetIamPolicyRequest < 3) { |
271 checkPolicy(o.policy); | 271 checkPolicy(o.policy); |
272 } | 272 } |
273 buildCounterSetIamPolicyRequest--; | 273 buildCounterSetIamPolicyRequest--; |
274 } | 274 } |
275 | 275 |
276 buildUnnamed665() { | 276 buildUnnamed2027() { |
277 var o = new core.List<core.String>(); | 277 var o = new core.List<core.String>(); |
278 o.add("foo"); | 278 o.add("foo"); |
279 o.add("foo"); | 279 o.add("foo"); |
280 return o; | 280 return o; |
281 } | 281 } |
282 | 282 |
283 checkUnnamed665(core.List<core.String> o) { | 283 checkUnnamed2027(core.List<core.String> o) { |
284 unittest.expect(o, unittest.hasLength(2)); | 284 unittest.expect(o, unittest.hasLength(2)); |
285 unittest.expect(o[0], unittest.equals('foo')); | 285 unittest.expect(o[0], unittest.equals('foo')); |
286 unittest.expect(o[1], unittest.equals('foo')); | 286 unittest.expect(o[1], unittest.equals('foo')); |
287 } | 287 } |
288 | 288 |
289 core.int buildCounterTestIamPermissionsRequest = 0; | 289 core.int buildCounterTestIamPermissionsRequest = 0; |
290 buildTestIamPermissionsRequest() { | 290 buildTestIamPermissionsRequest() { |
291 var o = new api.TestIamPermissionsRequest(); | 291 var o = new api.TestIamPermissionsRequest(); |
292 buildCounterTestIamPermissionsRequest++; | 292 buildCounterTestIamPermissionsRequest++; |
293 if (buildCounterTestIamPermissionsRequest < 3) { | 293 if (buildCounterTestIamPermissionsRequest < 3) { |
294 o.permissions = buildUnnamed665(); | 294 o.permissions = buildUnnamed2027(); |
295 } | 295 } |
296 buildCounterTestIamPermissionsRequest--; | 296 buildCounterTestIamPermissionsRequest--; |
297 return o; | 297 return o; |
298 } | 298 } |
299 | 299 |
300 checkTestIamPermissionsRequest(api.TestIamPermissionsRequest o) { | 300 checkTestIamPermissionsRequest(api.TestIamPermissionsRequest o) { |
301 buildCounterTestIamPermissionsRequest++; | 301 buildCounterTestIamPermissionsRequest++; |
302 if (buildCounterTestIamPermissionsRequest < 3) { | 302 if (buildCounterTestIamPermissionsRequest < 3) { |
303 checkUnnamed665(o.permissions); | 303 checkUnnamed2027(o.permissions); |
304 } | 304 } |
305 buildCounterTestIamPermissionsRequest--; | 305 buildCounterTestIamPermissionsRequest--; |
306 } | 306 } |
307 | 307 |
308 buildUnnamed666() { | 308 buildUnnamed2028() { |
309 var o = new core.List<core.String>(); | 309 var o = new core.List<core.String>(); |
310 o.add("foo"); | 310 o.add("foo"); |
311 o.add("foo"); | 311 o.add("foo"); |
312 return o; | 312 return o; |
313 } | 313 } |
314 | 314 |
315 checkUnnamed666(core.List<core.String> o) { | 315 checkUnnamed2028(core.List<core.String> o) { |
316 unittest.expect(o, unittest.hasLength(2)); | 316 unittest.expect(o, unittest.hasLength(2)); |
317 unittest.expect(o[0], unittest.equals('foo')); | 317 unittest.expect(o[0], unittest.equals('foo')); |
318 unittest.expect(o[1], unittest.equals('foo')); | 318 unittest.expect(o[1], unittest.equals('foo')); |
319 } | 319 } |
320 | 320 |
321 core.int buildCounterTestIamPermissionsResponse = 0; | 321 core.int buildCounterTestIamPermissionsResponse = 0; |
322 buildTestIamPermissionsResponse() { | 322 buildTestIamPermissionsResponse() { |
323 var o = new api.TestIamPermissionsResponse(); | 323 var o = new api.TestIamPermissionsResponse(); |
324 buildCounterTestIamPermissionsResponse++; | 324 buildCounterTestIamPermissionsResponse++; |
325 if (buildCounterTestIamPermissionsResponse < 3) { | 325 if (buildCounterTestIamPermissionsResponse < 3) { |
326 o.permissions = buildUnnamed666(); | 326 o.permissions = buildUnnamed2028(); |
327 } | 327 } |
328 buildCounterTestIamPermissionsResponse--; | 328 buildCounterTestIamPermissionsResponse--; |
329 return o; | 329 return o; |
330 } | 330 } |
331 | 331 |
332 checkTestIamPermissionsResponse(api.TestIamPermissionsResponse o) { | 332 checkTestIamPermissionsResponse(api.TestIamPermissionsResponse o) { |
333 buildCounterTestIamPermissionsResponse++; | 333 buildCounterTestIamPermissionsResponse++; |
334 if (buildCounterTestIamPermissionsResponse < 3) { | 334 if (buildCounterTestIamPermissionsResponse < 3) { |
335 checkUnnamed666(o.permissions); | 335 checkUnnamed2028(o.permissions); |
336 } | 336 } |
337 buildCounterTestIamPermissionsResponse--; | 337 buildCounterTestIamPermissionsResponse--; |
338 } | 338 } |
339 | 339 |
340 core.int buildCounterUndeleteProjectRequest = 0; | 340 core.int buildCounterUndeleteProjectRequest = 0; |
341 buildUndeleteProjectRequest() { | 341 buildUndeleteProjectRequest() { |
342 var o = new api.UndeleteProjectRequest(); | 342 var o = new api.UndeleteProjectRequest(); |
343 buildCounterUndeleteProjectRequest++; | 343 buildCounterUndeleteProjectRequest++; |
344 if (buildCounterUndeleteProjectRequest < 3) { | 344 if (buildCounterUndeleteProjectRequest < 3) { |
345 } | 345 } |
(...skipping 522 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
868 res.update(arg_request, arg_projectId).then(unittest.expectAsync(((api.Pro
ject response) { | 868 res.update(arg_request, arg_projectId).then(unittest.expectAsync(((api.Pro
ject response) { |
869 checkProject(response); | 869 checkProject(response); |
870 }))); | 870 }))); |
871 }); | 871 }); |
872 | 872 |
873 }); | 873 }); |
874 | 874 |
875 | 875 |
876 } | 876 } |
877 | 877 |
OLD | NEW |