OLD | NEW |
1 library googleapis_beta.autoscaler.v1beta2.test; | 1 library googleapis_beta.autoscaler.v1beta2.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; |
11 import 'package:googleapis_beta/common/common.dart' as common; | 11 import 'package:googleapis_beta/common/common.dart' as common; |
12 import 'package:googleapis_beta/src/common_internal.dart' as common_internal; | 12 import 'package:googleapis_beta/src/common_internal.dart' as common_internal; |
13 import '../common/common_internal_test.dart' as common_test; | 13 import '../common/common_internal_test.dart' as common_test; |
14 | 14 |
15 import 'package:googleapis_beta/autoscaler/v1beta2.dart' as api; | 15 import 'package:googleapis_beta/autoscaler/v1beta2.dart' as api; |
16 | 16 |
17 | 17 |
18 | 18 |
19 core.int buildCounterAutoscaler = 0; | 19 core.int buildCounterAutoscaler = 0; |
20 buildAutoscaler() { | 20 buildAutoscaler() { |
21 var o = new api.Autoscaler(); | 21 var o = new api.Autoscaler(); |
22 buildCounterAutoscaler++; | 22 buildCounterAutoscaler++; |
23 if (buildCounterAutoscaler < 3) { | 23 if (buildCounterAutoscaler < 3) { |
24 o.autoscalingPolicy = buildAutoscalingPolicy(); | 24 o.autoscalingPolicy = buildAutoscalingPolicy(); |
25 o.creationTimestamp = "foo"; | 25 o.creationTimestamp = "foo"; |
26 o.description = "foo"; | 26 o.description = "foo"; |
27 o.id = "foo"; | 27 o.id = "foo"; |
| 28 o.kind = "foo"; |
28 o.name = "foo"; | 29 o.name = "foo"; |
29 o.selfLink = "foo"; | 30 o.selfLink = "foo"; |
30 o.target = "foo"; | 31 o.target = "foo"; |
31 } | 32 } |
32 buildCounterAutoscaler--; | 33 buildCounterAutoscaler--; |
33 return o; | 34 return o; |
34 } | 35 } |
35 | 36 |
36 checkAutoscaler(api.Autoscaler o) { | 37 checkAutoscaler(api.Autoscaler o) { |
37 buildCounterAutoscaler++; | 38 buildCounterAutoscaler++; |
38 if (buildCounterAutoscaler < 3) { | 39 if (buildCounterAutoscaler < 3) { |
39 checkAutoscalingPolicy(o.autoscalingPolicy); | 40 checkAutoscalingPolicy(o.autoscalingPolicy); |
40 unittest.expect(o.creationTimestamp, unittest.equals('foo')); | 41 unittest.expect(o.creationTimestamp, unittest.equals('foo')); |
41 unittest.expect(o.description, unittest.equals('foo')); | 42 unittest.expect(o.description, unittest.equals('foo')); |
42 unittest.expect(o.id, unittest.equals('foo')); | 43 unittest.expect(o.id, unittest.equals('foo')); |
| 44 unittest.expect(o.kind, unittest.equals('foo')); |
43 unittest.expect(o.name, unittest.equals('foo')); | 45 unittest.expect(o.name, unittest.equals('foo')); |
44 unittest.expect(o.selfLink, unittest.equals('foo')); | 46 unittest.expect(o.selfLink, unittest.equals('foo')); |
45 unittest.expect(o.target, unittest.equals('foo')); | 47 unittest.expect(o.target, unittest.equals('foo')); |
46 } | 48 } |
47 buildCounterAutoscaler--; | 49 buildCounterAutoscaler--; |
48 } | 50 } |
49 | 51 |
50 buildUnnamed1116() { | 52 buildUnnamed1144() { |
51 var o = new core.List<api.Autoscaler>(); | 53 var o = new core.List<api.Autoscaler>(); |
52 o.add(buildAutoscaler()); | 54 o.add(buildAutoscaler()); |
53 o.add(buildAutoscaler()); | 55 o.add(buildAutoscaler()); |
54 return o; | 56 return o; |
55 } | 57 } |
56 | 58 |
57 checkUnnamed1116(core.List<api.Autoscaler> o) { | 59 checkUnnamed1144(core.List<api.Autoscaler> o) { |
58 unittest.expect(o, unittest.hasLength(2)); | 60 unittest.expect(o, unittest.hasLength(2)); |
59 checkAutoscaler(o[0]); | 61 checkAutoscaler(o[0]); |
60 checkAutoscaler(o[1]); | 62 checkAutoscaler(o[1]); |
61 } | 63 } |
62 | 64 |
63 core.int buildCounterAutoscalerListResponse = 0; | 65 core.int buildCounterAutoscalerListResponse = 0; |
64 buildAutoscalerListResponse() { | 66 buildAutoscalerListResponse() { |
65 var o = new api.AutoscalerListResponse(); | 67 var o = new api.AutoscalerListResponse(); |
66 buildCounterAutoscalerListResponse++; | 68 buildCounterAutoscalerListResponse++; |
67 if (buildCounterAutoscalerListResponse < 3) { | 69 if (buildCounterAutoscalerListResponse < 3) { |
68 o.items = buildUnnamed1116(); | 70 o.items = buildUnnamed1144(); |
| 71 o.kind = "foo"; |
69 o.nextPageToken = "foo"; | 72 o.nextPageToken = "foo"; |
70 } | 73 } |
71 buildCounterAutoscalerListResponse--; | 74 buildCounterAutoscalerListResponse--; |
72 return o; | 75 return o; |
73 } | 76 } |
74 | 77 |
75 checkAutoscalerListResponse(api.AutoscalerListResponse o) { | 78 checkAutoscalerListResponse(api.AutoscalerListResponse o) { |
76 buildCounterAutoscalerListResponse++; | 79 buildCounterAutoscalerListResponse++; |
77 if (buildCounterAutoscalerListResponse < 3) { | 80 if (buildCounterAutoscalerListResponse < 3) { |
78 checkUnnamed1116(o.items); | 81 checkUnnamed1144(o.items); |
| 82 unittest.expect(o.kind, unittest.equals('foo')); |
79 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 83 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
80 } | 84 } |
81 buildCounterAutoscalerListResponse--; | 85 buildCounterAutoscalerListResponse--; |
82 } | 86 } |
83 | 87 |
84 buildUnnamed1117() { | 88 buildUnnamed1145() { |
85 var o = new core.List<api.AutoscalingPolicyCustomMetricUtilization>(); | 89 var o = new core.List<api.AutoscalingPolicyCustomMetricUtilization>(); |
86 o.add(buildAutoscalingPolicyCustomMetricUtilization()); | 90 o.add(buildAutoscalingPolicyCustomMetricUtilization()); |
87 o.add(buildAutoscalingPolicyCustomMetricUtilization()); | 91 o.add(buildAutoscalingPolicyCustomMetricUtilization()); |
88 return o; | 92 return o; |
89 } | 93 } |
90 | 94 |
91 checkUnnamed1117(core.List<api.AutoscalingPolicyCustomMetricUtilization> o) { | 95 checkUnnamed1145(core.List<api.AutoscalingPolicyCustomMetricUtilization> o) { |
92 unittest.expect(o, unittest.hasLength(2)); | 96 unittest.expect(o, unittest.hasLength(2)); |
93 checkAutoscalingPolicyCustomMetricUtilization(o[0]); | 97 checkAutoscalingPolicyCustomMetricUtilization(o[0]); |
94 checkAutoscalingPolicyCustomMetricUtilization(o[1]); | 98 checkAutoscalingPolicyCustomMetricUtilization(o[1]); |
95 } | 99 } |
96 | 100 |
97 core.int buildCounterAutoscalingPolicy = 0; | 101 core.int buildCounterAutoscalingPolicy = 0; |
98 buildAutoscalingPolicy() { | 102 buildAutoscalingPolicy() { |
99 var o = new api.AutoscalingPolicy(); | 103 var o = new api.AutoscalingPolicy(); |
100 buildCounterAutoscalingPolicy++; | 104 buildCounterAutoscalingPolicy++; |
101 if (buildCounterAutoscalingPolicy < 3) { | 105 if (buildCounterAutoscalingPolicy < 3) { |
102 o.coolDownPeriodSec = 42; | 106 o.coolDownPeriodSec = 42; |
103 o.cpuUtilization = buildAutoscalingPolicyCpuUtilization(); | 107 o.cpuUtilization = buildAutoscalingPolicyCpuUtilization(); |
104 o.customMetricUtilizations = buildUnnamed1117(); | 108 o.customMetricUtilizations = buildUnnamed1145(); |
105 o.loadBalancingUtilization = buildAutoscalingPolicyLoadBalancingUtilization(
); | 109 o.loadBalancingUtilization = buildAutoscalingPolicyLoadBalancingUtilization(
); |
106 o.maxNumReplicas = 42; | 110 o.maxNumReplicas = 42; |
107 o.minNumReplicas = 42; | 111 o.minNumReplicas = 42; |
108 } | 112 } |
109 buildCounterAutoscalingPolicy--; | 113 buildCounterAutoscalingPolicy--; |
110 return o; | 114 return o; |
111 } | 115 } |
112 | 116 |
113 checkAutoscalingPolicy(api.AutoscalingPolicy o) { | 117 checkAutoscalingPolicy(api.AutoscalingPolicy o) { |
114 buildCounterAutoscalingPolicy++; | 118 buildCounterAutoscalingPolicy++; |
115 if (buildCounterAutoscalingPolicy < 3) { | 119 if (buildCounterAutoscalingPolicy < 3) { |
116 unittest.expect(o.coolDownPeriodSec, unittest.equals(42)); | 120 unittest.expect(o.coolDownPeriodSec, unittest.equals(42)); |
117 checkAutoscalingPolicyCpuUtilization(o.cpuUtilization); | 121 checkAutoscalingPolicyCpuUtilization(o.cpuUtilization); |
118 checkUnnamed1117(o.customMetricUtilizations); | 122 checkUnnamed1145(o.customMetricUtilizations); |
119 checkAutoscalingPolicyLoadBalancingUtilization(o.loadBalancingUtilization); | 123 checkAutoscalingPolicyLoadBalancingUtilization(o.loadBalancingUtilization); |
120 unittest.expect(o.maxNumReplicas, unittest.equals(42)); | 124 unittest.expect(o.maxNumReplicas, unittest.equals(42)); |
121 unittest.expect(o.minNumReplicas, unittest.equals(42)); | 125 unittest.expect(o.minNumReplicas, unittest.equals(42)); |
122 } | 126 } |
123 buildCounterAutoscalingPolicy--; | 127 buildCounterAutoscalingPolicy--; |
124 } | 128 } |
125 | 129 |
126 core.int buildCounterAutoscalingPolicyCpuUtilization = 0; | 130 core.int buildCounterAutoscalingPolicyCpuUtilization = 0; |
127 buildAutoscalingPolicyCpuUtilization() { | 131 buildAutoscalingPolicyCpuUtilization() { |
128 var o = new api.AutoscalingPolicyCpuUtilization(); | 132 var o = new api.AutoscalingPolicyCpuUtilization(); |
(...skipping 13 matching lines...) Expand all Loading... |
142 buildCounterAutoscalingPolicyCpuUtilization--; | 146 buildCounterAutoscalingPolicyCpuUtilization--; |
143 } | 147 } |
144 | 148 |
145 core.int buildCounterAutoscalingPolicyCustomMetricUtilization = 0; | 149 core.int buildCounterAutoscalingPolicyCustomMetricUtilization = 0; |
146 buildAutoscalingPolicyCustomMetricUtilization() { | 150 buildAutoscalingPolicyCustomMetricUtilization() { |
147 var o = new api.AutoscalingPolicyCustomMetricUtilization(); | 151 var o = new api.AutoscalingPolicyCustomMetricUtilization(); |
148 buildCounterAutoscalingPolicyCustomMetricUtilization++; | 152 buildCounterAutoscalingPolicyCustomMetricUtilization++; |
149 if (buildCounterAutoscalingPolicyCustomMetricUtilization < 3) { | 153 if (buildCounterAutoscalingPolicyCustomMetricUtilization < 3) { |
150 o.metric = "foo"; | 154 o.metric = "foo"; |
151 o.utilizationTarget = 42.0; | 155 o.utilizationTarget = 42.0; |
| 156 o.utilizationTargetType = "foo"; |
152 } | 157 } |
153 buildCounterAutoscalingPolicyCustomMetricUtilization--; | 158 buildCounterAutoscalingPolicyCustomMetricUtilization--; |
154 return o; | 159 return o; |
155 } | 160 } |
156 | 161 |
157 checkAutoscalingPolicyCustomMetricUtilization(api.AutoscalingPolicyCustomMetricU
tilization o) { | 162 checkAutoscalingPolicyCustomMetricUtilization(api.AutoscalingPolicyCustomMetricU
tilization o) { |
158 buildCounterAutoscalingPolicyCustomMetricUtilization++; | 163 buildCounterAutoscalingPolicyCustomMetricUtilization++; |
159 if (buildCounterAutoscalingPolicyCustomMetricUtilization < 3) { | 164 if (buildCounterAutoscalingPolicyCustomMetricUtilization < 3) { |
160 unittest.expect(o.metric, unittest.equals('foo')); | 165 unittest.expect(o.metric, unittest.equals('foo')); |
161 unittest.expect(o.utilizationTarget, unittest.equals(42.0)); | 166 unittest.expect(o.utilizationTarget, unittest.equals(42.0)); |
| 167 unittest.expect(o.utilizationTargetType, unittest.equals('foo')); |
162 } | 168 } |
163 buildCounterAutoscalingPolicyCustomMetricUtilization--; | 169 buildCounterAutoscalingPolicyCustomMetricUtilization--; |
164 } | 170 } |
165 | 171 |
166 core.int buildCounterAutoscalingPolicyLoadBalancingUtilization = 0; | 172 core.int buildCounterAutoscalingPolicyLoadBalancingUtilization = 0; |
167 buildAutoscalingPolicyLoadBalancingUtilization() { | 173 buildAutoscalingPolicyLoadBalancingUtilization() { |
168 var o = new api.AutoscalingPolicyLoadBalancingUtilization(); | 174 var o = new api.AutoscalingPolicyLoadBalancingUtilization(); |
169 buildCounterAutoscalingPolicyLoadBalancingUtilization++; | 175 buildCounterAutoscalingPolicyLoadBalancingUtilization++; |
170 if (buildCounterAutoscalingPolicyLoadBalancingUtilization < 3) { | 176 if (buildCounterAutoscalingPolicyLoadBalancingUtilization < 3) { |
171 o.utilizationTarget = 42.0; | 177 o.utilizationTarget = 42.0; |
(...skipping 26 matching lines...) Expand all Loading... |
198 checkOperationErrorErrors(api.OperationErrorErrors o) { | 204 checkOperationErrorErrors(api.OperationErrorErrors o) { |
199 buildCounterOperationErrorErrors++; | 205 buildCounterOperationErrorErrors++; |
200 if (buildCounterOperationErrorErrors < 3) { | 206 if (buildCounterOperationErrorErrors < 3) { |
201 unittest.expect(o.code, unittest.equals('foo')); | 207 unittest.expect(o.code, unittest.equals('foo')); |
202 unittest.expect(o.location, unittest.equals('foo')); | 208 unittest.expect(o.location, unittest.equals('foo')); |
203 unittest.expect(o.message, unittest.equals('foo')); | 209 unittest.expect(o.message, unittest.equals('foo')); |
204 } | 210 } |
205 buildCounterOperationErrorErrors--; | 211 buildCounterOperationErrorErrors--; |
206 } | 212 } |
207 | 213 |
208 buildUnnamed1118() { | 214 buildUnnamed1146() { |
209 var o = new core.List<api.OperationErrorErrors>(); | 215 var o = new core.List<api.OperationErrorErrors>(); |
210 o.add(buildOperationErrorErrors()); | 216 o.add(buildOperationErrorErrors()); |
211 o.add(buildOperationErrorErrors()); | 217 o.add(buildOperationErrorErrors()); |
212 return o; | 218 return o; |
213 } | 219 } |
214 | 220 |
215 checkUnnamed1118(core.List<api.OperationErrorErrors> o) { | 221 checkUnnamed1146(core.List<api.OperationErrorErrors> o) { |
216 unittest.expect(o, unittest.hasLength(2)); | 222 unittest.expect(o, unittest.hasLength(2)); |
217 checkOperationErrorErrors(o[0]); | 223 checkOperationErrorErrors(o[0]); |
218 checkOperationErrorErrors(o[1]); | 224 checkOperationErrorErrors(o[1]); |
219 } | 225 } |
220 | 226 |
221 core.int buildCounterOperationError = 0; | 227 core.int buildCounterOperationError = 0; |
222 buildOperationError() { | 228 buildOperationError() { |
223 var o = new api.OperationError(); | 229 var o = new api.OperationError(); |
224 buildCounterOperationError++; | 230 buildCounterOperationError++; |
225 if (buildCounterOperationError < 3) { | 231 if (buildCounterOperationError < 3) { |
226 o.errors = buildUnnamed1118(); | 232 o.errors = buildUnnamed1146(); |
227 } | 233 } |
228 buildCounterOperationError--; | 234 buildCounterOperationError--; |
229 return o; | 235 return o; |
230 } | 236 } |
231 | 237 |
232 checkOperationError(api.OperationError o) { | 238 checkOperationError(api.OperationError o) { |
233 buildCounterOperationError++; | 239 buildCounterOperationError++; |
234 if (buildCounterOperationError < 3) { | 240 if (buildCounterOperationError < 3) { |
235 checkUnnamed1118(o.errors); | 241 checkUnnamed1146(o.errors); |
236 } | 242 } |
237 buildCounterOperationError--; | 243 buildCounterOperationError--; |
238 } | 244 } |
239 | 245 |
240 core.int buildCounterOperationWarningsData = 0; | 246 core.int buildCounterOperationWarningsData = 0; |
241 buildOperationWarningsData() { | 247 buildOperationWarningsData() { |
242 var o = new api.OperationWarningsData(); | 248 var o = new api.OperationWarningsData(); |
243 buildCounterOperationWarningsData++; | 249 buildCounterOperationWarningsData++; |
244 if (buildCounterOperationWarningsData < 3) { | 250 if (buildCounterOperationWarningsData < 3) { |
245 o.key = "foo"; | 251 o.key = "foo"; |
246 o.value = "foo"; | 252 o.value = "foo"; |
247 } | 253 } |
248 buildCounterOperationWarningsData--; | 254 buildCounterOperationWarningsData--; |
249 return o; | 255 return o; |
250 } | 256 } |
251 | 257 |
252 checkOperationWarningsData(api.OperationWarningsData o) { | 258 checkOperationWarningsData(api.OperationWarningsData o) { |
253 buildCounterOperationWarningsData++; | 259 buildCounterOperationWarningsData++; |
254 if (buildCounterOperationWarningsData < 3) { | 260 if (buildCounterOperationWarningsData < 3) { |
255 unittest.expect(o.key, unittest.equals('foo')); | 261 unittest.expect(o.key, unittest.equals('foo')); |
256 unittest.expect(o.value, unittest.equals('foo')); | 262 unittest.expect(o.value, unittest.equals('foo')); |
257 } | 263 } |
258 buildCounterOperationWarningsData--; | 264 buildCounterOperationWarningsData--; |
259 } | 265 } |
260 | 266 |
261 buildUnnamed1119() { | 267 buildUnnamed1147() { |
262 var o = new core.List<api.OperationWarningsData>(); | 268 var o = new core.List<api.OperationWarningsData>(); |
263 o.add(buildOperationWarningsData()); | 269 o.add(buildOperationWarningsData()); |
264 o.add(buildOperationWarningsData()); | 270 o.add(buildOperationWarningsData()); |
265 return o; | 271 return o; |
266 } | 272 } |
267 | 273 |
268 checkUnnamed1119(core.List<api.OperationWarningsData> o) { | 274 checkUnnamed1147(core.List<api.OperationWarningsData> o) { |
269 unittest.expect(o, unittest.hasLength(2)); | 275 unittest.expect(o, unittest.hasLength(2)); |
270 checkOperationWarningsData(o[0]); | 276 checkOperationWarningsData(o[0]); |
271 checkOperationWarningsData(o[1]); | 277 checkOperationWarningsData(o[1]); |
272 } | 278 } |
273 | 279 |
274 core.int buildCounterOperationWarnings = 0; | 280 core.int buildCounterOperationWarnings = 0; |
275 buildOperationWarnings() { | 281 buildOperationWarnings() { |
276 var o = new api.OperationWarnings(); | 282 var o = new api.OperationWarnings(); |
277 buildCounterOperationWarnings++; | 283 buildCounterOperationWarnings++; |
278 if (buildCounterOperationWarnings < 3) { | 284 if (buildCounterOperationWarnings < 3) { |
279 o.code = "foo"; | 285 o.code = "foo"; |
280 o.data = buildUnnamed1119(); | 286 o.data = buildUnnamed1147(); |
281 o.message = "foo"; | 287 o.message = "foo"; |
282 } | 288 } |
283 buildCounterOperationWarnings--; | 289 buildCounterOperationWarnings--; |
284 return o; | 290 return o; |
285 } | 291 } |
286 | 292 |
287 checkOperationWarnings(api.OperationWarnings o) { | 293 checkOperationWarnings(api.OperationWarnings o) { |
288 buildCounterOperationWarnings++; | 294 buildCounterOperationWarnings++; |
289 if (buildCounterOperationWarnings < 3) { | 295 if (buildCounterOperationWarnings < 3) { |
290 unittest.expect(o.code, unittest.equals('foo')); | 296 unittest.expect(o.code, unittest.equals('foo')); |
291 checkUnnamed1119(o.data); | 297 checkUnnamed1147(o.data); |
292 unittest.expect(o.message, unittest.equals('foo')); | 298 unittest.expect(o.message, unittest.equals('foo')); |
293 } | 299 } |
294 buildCounterOperationWarnings--; | 300 buildCounterOperationWarnings--; |
295 } | 301 } |
296 | 302 |
297 buildUnnamed1120() { | 303 buildUnnamed1148() { |
298 var o = new core.List<api.OperationWarnings>(); | 304 var o = new core.List<api.OperationWarnings>(); |
299 o.add(buildOperationWarnings()); | 305 o.add(buildOperationWarnings()); |
300 o.add(buildOperationWarnings()); | 306 o.add(buildOperationWarnings()); |
301 return o; | 307 return o; |
302 } | 308 } |
303 | 309 |
304 checkUnnamed1120(core.List<api.OperationWarnings> o) { | 310 checkUnnamed1148(core.List<api.OperationWarnings> o) { |
305 unittest.expect(o, unittest.hasLength(2)); | 311 unittest.expect(o, unittest.hasLength(2)); |
306 checkOperationWarnings(o[0]); | 312 checkOperationWarnings(o[0]); |
307 checkOperationWarnings(o[1]); | 313 checkOperationWarnings(o[1]); |
308 } | 314 } |
309 | 315 |
310 core.int buildCounterOperation = 0; | 316 core.int buildCounterOperation = 0; |
311 buildOperation() { | 317 buildOperation() { |
312 var o = new api.Operation(); | 318 var o = new api.Operation(); |
313 buildCounterOperation++; | 319 buildCounterOperation++; |
314 if (buildCounterOperation < 3) { | 320 if (buildCounterOperation < 3) { |
(...skipping 10 matching lines...) Expand all Loading... |
325 o.operationType = "foo"; | 331 o.operationType = "foo"; |
326 o.progress = 42; | 332 o.progress = 42; |
327 o.region = "foo"; | 333 o.region = "foo"; |
328 o.selfLink = "foo"; | 334 o.selfLink = "foo"; |
329 o.startTime = "foo"; | 335 o.startTime = "foo"; |
330 o.status = "foo"; | 336 o.status = "foo"; |
331 o.statusMessage = "foo"; | 337 o.statusMessage = "foo"; |
332 o.targetId = "foo"; | 338 o.targetId = "foo"; |
333 o.targetLink = "foo"; | 339 o.targetLink = "foo"; |
334 o.user = "foo"; | 340 o.user = "foo"; |
335 o.warnings = buildUnnamed1120(); | 341 o.warnings = buildUnnamed1148(); |
336 o.zone = "foo"; | 342 o.zone = "foo"; |
337 } | 343 } |
338 buildCounterOperation--; | 344 buildCounterOperation--; |
339 return o; | 345 return o; |
340 } | 346 } |
341 | 347 |
342 checkOperation(api.Operation o) { | 348 checkOperation(api.Operation o) { |
343 buildCounterOperation++; | 349 buildCounterOperation++; |
344 if (buildCounterOperation < 3) { | 350 if (buildCounterOperation < 3) { |
345 unittest.expect(o.clientOperationId, unittest.equals('foo')); | 351 unittest.expect(o.clientOperationId, unittest.equals('foo')); |
346 unittest.expect(o.creationTimestamp, unittest.equals('foo')); | 352 unittest.expect(o.creationTimestamp, unittest.equals('foo')); |
347 unittest.expect(o.endTime, unittest.equals('foo')); | 353 unittest.expect(o.endTime, unittest.equals('foo')); |
348 checkOperationError(o.error); | 354 checkOperationError(o.error); |
349 unittest.expect(o.httpErrorMessage, unittest.equals('foo')); | 355 unittest.expect(o.httpErrorMessage, unittest.equals('foo')); |
350 unittest.expect(o.httpErrorStatusCode, unittest.equals(42)); | 356 unittest.expect(o.httpErrorStatusCode, unittest.equals(42)); |
351 unittest.expect(o.id, unittest.equals('foo')); | 357 unittest.expect(o.id, unittest.equals('foo')); |
352 unittest.expect(o.insertTime, unittest.equals('foo')); | 358 unittest.expect(o.insertTime, unittest.equals('foo')); |
353 unittest.expect(o.kind, unittest.equals('foo')); | 359 unittest.expect(o.kind, unittest.equals('foo')); |
354 unittest.expect(o.name, unittest.equals('foo')); | 360 unittest.expect(o.name, unittest.equals('foo')); |
355 unittest.expect(o.operationType, unittest.equals('foo')); | 361 unittest.expect(o.operationType, unittest.equals('foo')); |
356 unittest.expect(o.progress, unittest.equals(42)); | 362 unittest.expect(o.progress, unittest.equals(42)); |
357 unittest.expect(o.region, unittest.equals('foo')); | 363 unittest.expect(o.region, unittest.equals('foo')); |
358 unittest.expect(o.selfLink, unittest.equals('foo')); | 364 unittest.expect(o.selfLink, unittest.equals('foo')); |
359 unittest.expect(o.startTime, unittest.equals('foo')); | 365 unittest.expect(o.startTime, unittest.equals('foo')); |
360 unittest.expect(o.status, unittest.equals('foo')); | 366 unittest.expect(o.status, unittest.equals('foo')); |
361 unittest.expect(o.statusMessage, unittest.equals('foo')); | 367 unittest.expect(o.statusMessage, unittest.equals('foo')); |
362 unittest.expect(o.targetId, unittest.equals('foo')); | 368 unittest.expect(o.targetId, unittest.equals('foo')); |
363 unittest.expect(o.targetLink, unittest.equals('foo')); | 369 unittest.expect(o.targetLink, unittest.equals('foo')); |
364 unittest.expect(o.user, unittest.equals('foo')); | 370 unittest.expect(o.user, unittest.equals('foo')); |
365 checkUnnamed1120(o.warnings); | 371 checkUnnamed1148(o.warnings); |
366 unittest.expect(o.zone, unittest.equals('foo')); | 372 unittest.expect(o.zone, unittest.equals('foo')); |
367 } | 373 } |
368 buildCounterOperation--; | 374 buildCounterOperation--; |
369 } | 375 } |
370 | 376 |
371 buildUnnamed1121() { | 377 buildUnnamed1149() { |
372 var o = new core.List<api.Operation>(); | 378 var o = new core.List<api.Operation>(); |
373 o.add(buildOperation()); | 379 o.add(buildOperation()); |
374 o.add(buildOperation()); | 380 o.add(buildOperation()); |
375 return o; | 381 return o; |
376 } | 382 } |
377 | 383 |
378 checkUnnamed1121(core.List<api.Operation> o) { | 384 checkUnnamed1149(core.List<api.Operation> o) { |
379 unittest.expect(o, unittest.hasLength(2)); | 385 unittest.expect(o, unittest.hasLength(2)); |
380 checkOperation(o[0]); | 386 checkOperation(o[0]); |
381 checkOperation(o[1]); | 387 checkOperation(o[1]); |
382 } | 388 } |
383 | 389 |
384 core.int buildCounterOperationList = 0; | 390 core.int buildCounterOperationList = 0; |
385 buildOperationList() { | 391 buildOperationList() { |
386 var o = new api.OperationList(); | 392 var o = new api.OperationList(); |
387 buildCounterOperationList++; | 393 buildCounterOperationList++; |
388 if (buildCounterOperationList < 3) { | 394 if (buildCounterOperationList < 3) { |
389 o.id = "foo"; | 395 o.id = "foo"; |
390 o.items = buildUnnamed1121(); | 396 o.items = buildUnnamed1149(); |
391 o.kind = "foo"; | 397 o.kind = "foo"; |
392 o.nextPageToken = "foo"; | 398 o.nextPageToken = "foo"; |
393 o.selfLink = "foo"; | 399 o.selfLink = "foo"; |
394 } | 400 } |
395 buildCounterOperationList--; | 401 buildCounterOperationList--; |
396 return o; | 402 return o; |
397 } | 403 } |
398 | 404 |
399 checkOperationList(api.OperationList o) { | 405 checkOperationList(api.OperationList o) { |
400 buildCounterOperationList++; | 406 buildCounterOperationList++; |
401 if (buildCounterOperationList < 3) { | 407 if (buildCounterOperationList < 3) { |
402 unittest.expect(o.id, unittest.equals('foo')); | 408 unittest.expect(o.id, unittest.equals('foo')); |
403 checkUnnamed1121(o.items); | 409 checkUnnamed1149(o.items); |
404 unittest.expect(o.kind, unittest.equals('foo')); | 410 unittest.expect(o.kind, unittest.equals('foo')); |
405 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 411 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
406 unittest.expect(o.selfLink, unittest.equals('foo')); | 412 unittest.expect(o.selfLink, unittest.equals('foo')); |
407 } | 413 } |
408 buildCounterOperationList--; | 414 buildCounterOperationList--; |
409 } | 415 } |
410 | 416 |
411 | 417 |
412 main() { | 418 main() { |
413 unittest.group("obj-schema-Autoscaler", () { | 419 unittest.group("obj-schema-Autoscaler", () { |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
524 var mock = new common_test.HttpServerMock(); | 530 var mock = new common_test.HttpServerMock(); |
525 api.AutoscalersResourceApi res = new api.AutoscalerApi(mock).autoscalers; | 531 api.AutoscalersResourceApi res = new api.AutoscalerApi(mock).autoscalers; |
526 var arg_project = "foo"; | 532 var arg_project = "foo"; |
527 var arg_zone = "foo"; | 533 var arg_zone = "foo"; |
528 var arg_autoscaler = "foo"; | 534 var arg_autoscaler = "foo"; |
529 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 535 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
530 var path = (req.url).path; | 536 var path = (req.url).path; |
531 var pathOffset = 0; | 537 var pathOffset = 0; |
532 var index; | 538 var index; |
533 var subPart; | 539 var subPart; |
534 unittest.expect(path.substring(pathOffset, pathOffset + 20), unittest.eq
uals("/autoscaler/v1beta2/")); | 540 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
535 pathOffset += 20; | 541 pathOffset += 1; |
| 542 unittest.expect(path.substring(pathOffset, pathOffset + 19), unittest.eq
uals("autoscaler/v1beta2/")); |
| 543 pathOffset += 19; |
536 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("projects/")); | 544 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("projects/")); |
537 pathOffset += 9; | 545 pathOffset += 9; |
538 index = path.indexOf("/zones/", pathOffset); | 546 index = path.indexOf("/zones/", pathOffset); |
539 unittest.expect(index >= 0, unittest.isTrue); | 547 unittest.expect(index >= 0, unittest.isTrue); |
540 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 548 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); |
541 pathOffset = index; | 549 pathOffset = index; |
542 unittest.expect(subPart, unittest.equals("$arg_project")); | 550 unittest.expect(subPart, unittest.equals("$arg_project")); |
543 unittest.expect(path.substring(pathOffset, pathOffset + 7), unittest.equ
als("/zones/")); | 551 unittest.expect(path.substring(pathOffset, pathOffset + 7), unittest.equ
als("/zones/")); |
544 pathOffset += 7; | 552 pathOffset += 7; |
545 index = path.indexOf("/autoscalers/", pathOffset); | 553 index = path.indexOf("/autoscalers/", pathOffset); |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
587 var mock = new common_test.HttpServerMock(); | 595 var mock = new common_test.HttpServerMock(); |
588 api.AutoscalersResourceApi res = new api.AutoscalerApi(mock).autoscalers; | 596 api.AutoscalersResourceApi res = new api.AutoscalerApi(mock).autoscalers; |
589 var arg_project = "foo"; | 597 var arg_project = "foo"; |
590 var arg_zone = "foo"; | 598 var arg_zone = "foo"; |
591 var arg_autoscaler = "foo"; | 599 var arg_autoscaler = "foo"; |
592 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 600 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
593 var path = (req.url).path; | 601 var path = (req.url).path; |
594 var pathOffset = 0; | 602 var pathOffset = 0; |
595 var index; | 603 var index; |
596 var subPart; | 604 var subPart; |
597 unittest.expect(path.substring(pathOffset, pathOffset + 20), unittest.eq
uals("/autoscaler/v1beta2/")); | 605 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
598 pathOffset += 20; | 606 pathOffset += 1; |
| 607 unittest.expect(path.substring(pathOffset, pathOffset + 19), unittest.eq
uals("autoscaler/v1beta2/")); |
| 608 pathOffset += 19; |
599 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("projects/")); | 609 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("projects/")); |
600 pathOffset += 9; | 610 pathOffset += 9; |
601 index = path.indexOf("/zones/", pathOffset); | 611 index = path.indexOf("/zones/", pathOffset); |
602 unittest.expect(index >= 0, unittest.isTrue); | 612 unittest.expect(index >= 0, unittest.isTrue); |
603 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 613 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); |
604 pathOffset = index; | 614 pathOffset = index; |
605 unittest.expect(subPart, unittest.equals("$arg_project")); | 615 unittest.expect(subPart, unittest.equals("$arg_project")); |
606 unittest.expect(path.substring(pathOffset, pathOffset + 7), unittest.equ
als("/zones/")); | 616 unittest.expect(path.substring(pathOffset, pathOffset + 7), unittest.equ
als("/zones/")); |
607 pathOffset += 7; | 617 pathOffset += 7; |
608 index = path.indexOf("/autoscalers/", pathOffset); | 618 index = path.indexOf("/autoscalers/", pathOffset); |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
653 var arg_project = "foo"; | 663 var arg_project = "foo"; |
654 var arg_zone = "foo"; | 664 var arg_zone = "foo"; |
655 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 665 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
656 var obj = new api.Autoscaler.fromJson(json); | 666 var obj = new api.Autoscaler.fromJson(json); |
657 checkAutoscaler(obj); | 667 checkAutoscaler(obj); |
658 | 668 |
659 var path = (req.url).path; | 669 var path = (req.url).path; |
660 var pathOffset = 0; | 670 var pathOffset = 0; |
661 var index; | 671 var index; |
662 var subPart; | 672 var subPart; |
663 unittest.expect(path.substring(pathOffset, pathOffset + 20), unittest.eq
uals("/autoscaler/v1beta2/")); | 673 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
664 pathOffset += 20; | 674 pathOffset += 1; |
| 675 unittest.expect(path.substring(pathOffset, pathOffset + 19), unittest.eq
uals("autoscaler/v1beta2/")); |
| 676 pathOffset += 19; |
665 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("projects/")); | 677 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("projects/")); |
666 pathOffset += 9; | 678 pathOffset += 9; |
667 index = path.indexOf("/zones/", pathOffset); | 679 index = path.indexOf("/zones/", pathOffset); |
668 unittest.expect(index >= 0, unittest.isTrue); | 680 unittest.expect(index >= 0, unittest.isTrue); |
669 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 681 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); |
670 pathOffset = index; | 682 pathOffset = index; |
671 unittest.expect(subPart, unittest.equals("$arg_project")); | 683 unittest.expect(subPart, unittest.equals("$arg_project")); |
672 unittest.expect(path.substring(pathOffset, pathOffset + 7), unittest.equ
als("/zones/")); | 684 unittest.expect(path.substring(pathOffset, pathOffset + 7), unittest.equ
als("/zones/")); |
673 pathOffset += 7; | 685 pathOffset += 7; |
674 index = path.indexOf("/autoscalers", pathOffset); | 686 index = path.indexOf("/autoscalers", pathOffset); |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
715 var arg_project = "foo"; | 727 var arg_project = "foo"; |
716 var arg_zone = "foo"; | 728 var arg_zone = "foo"; |
717 var arg_filter = "foo"; | 729 var arg_filter = "foo"; |
718 var arg_maxResults = 42; | 730 var arg_maxResults = 42; |
719 var arg_pageToken = "foo"; | 731 var arg_pageToken = "foo"; |
720 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 732 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
721 var path = (req.url).path; | 733 var path = (req.url).path; |
722 var pathOffset = 0; | 734 var pathOffset = 0; |
723 var index; | 735 var index; |
724 var subPart; | 736 var subPart; |
725 unittest.expect(path.substring(pathOffset, pathOffset + 20), unittest.eq
uals("/autoscaler/v1beta2/")); | 737 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
726 pathOffset += 20; | 738 pathOffset += 1; |
| 739 unittest.expect(path.substring(pathOffset, pathOffset + 19), unittest.eq
uals("autoscaler/v1beta2/")); |
| 740 pathOffset += 19; |
727 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("projects/")); | 741 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("projects/")); |
728 pathOffset += 9; | 742 pathOffset += 9; |
729 index = path.indexOf("/zones/", pathOffset); | 743 index = path.indexOf("/zones/", pathOffset); |
730 unittest.expect(index >= 0, unittest.isTrue); | 744 unittest.expect(index >= 0, unittest.isTrue); |
731 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 745 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); |
732 pathOffset = index; | 746 pathOffset = index; |
733 unittest.expect(subPart, unittest.equals("$arg_project")); | 747 unittest.expect(subPart, unittest.equals("$arg_project")); |
734 unittest.expect(path.substring(pathOffset, pathOffset + 7), unittest.equ
als("/zones/")); | 748 unittest.expect(path.substring(pathOffset, pathOffset + 7), unittest.equ
als("/zones/")); |
735 pathOffset += 7; | 749 pathOffset += 7; |
736 index = path.indexOf("/autoscalers", pathOffset); | 750 index = path.indexOf("/autoscalers", pathOffset); |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
782 var arg_zone = "foo"; | 796 var arg_zone = "foo"; |
783 var arg_autoscaler = "foo"; | 797 var arg_autoscaler = "foo"; |
784 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 798 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
785 var obj = new api.Autoscaler.fromJson(json); | 799 var obj = new api.Autoscaler.fromJson(json); |
786 checkAutoscaler(obj); | 800 checkAutoscaler(obj); |
787 | 801 |
788 var path = (req.url).path; | 802 var path = (req.url).path; |
789 var pathOffset = 0; | 803 var pathOffset = 0; |
790 var index; | 804 var index; |
791 var subPart; | 805 var subPart; |
792 unittest.expect(path.substring(pathOffset, pathOffset + 20), unittest.eq
uals("/autoscaler/v1beta2/")); | 806 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
793 pathOffset += 20; | 807 pathOffset += 1; |
| 808 unittest.expect(path.substring(pathOffset, pathOffset + 19), unittest.eq
uals("autoscaler/v1beta2/")); |
| 809 pathOffset += 19; |
794 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("projects/")); | 810 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("projects/")); |
795 pathOffset += 9; | 811 pathOffset += 9; |
796 index = path.indexOf("/zones/", pathOffset); | 812 index = path.indexOf("/zones/", pathOffset); |
797 unittest.expect(index >= 0, unittest.isTrue); | 813 unittest.expect(index >= 0, unittest.isTrue); |
798 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 814 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); |
799 pathOffset = index; | 815 pathOffset = index; |
800 unittest.expect(subPart, unittest.equals("$arg_project")); | 816 unittest.expect(subPart, unittest.equals("$arg_project")); |
801 unittest.expect(path.substring(pathOffset, pathOffset + 7), unittest.equ
als("/zones/")); | 817 unittest.expect(path.substring(pathOffset, pathOffset + 7), unittest.equ
als("/zones/")); |
802 pathOffset += 7; | 818 pathOffset += 7; |
803 index = path.indexOf("/autoscalers/", pathOffset); | 819 index = path.indexOf("/autoscalers/", pathOffset); |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
849 var arg_zone = "foo"; | 865 var arg_zone = "foo"; |
850 var arg_autoscaler = "foo"; | 866 var arg_autoscaler = "foo"; |
851 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 867 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
852 var obj = new api.Autoscaler.fromJson(json); | 868 var obj = new api.Autoscaler.fromJson(json); |
853 checkAutoscaler(obj); | 869 checkAutoscaler(obj); |
854 | 870 |
855 var path = (req.url).path; | 871 var path = (req.url).path; |
856 var pathOffset = 0; | 872 var pathOffset = 0; |
857 var index; | 873 var index; |
858 var subPart; | 874 var subPart; |
859 unittest.expect(path.substring(pathOffset, pathOffset + 20), unittest.eq
uals("/autoscaler/v1beta2/")); | 875 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
860 pathOffset += 20; | 876 pathOffset += 1; |
| 877 unittest.expect(path.substring(pathOffset, pathOffset + 19), unittest.eq
uals("autoscaler/v1beta2/")); |
| 878 pathOffset += 19; |
861 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("projects/")); | 879 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("projects/")); |
862 pathOffset += 9; | 880 pathOffset += 9; |
863 index = path.indexOf("/zones/", pathOffset); | 881 index = path.indexOf("/zones/", pathOffset); |
864 unittest.expect(index >= 0, unittest.isTrue); | 882 unittest.expect(index >= 0, unittest.isTrue); |
865 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 883 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); |
866 pathOffset = index; | 884 pathOffset = index; |
867 unittest.expect(subPart, unittest.equals("$arg_project")); | 885 unittest.expect(subPart, unittest.equals("$arg_project")); |
868 unittest.expect(path.substring(pathOffset, pathOffset + 7), unittest.equ
als("/zones/")); | 886 unittest.expect(path.substring(pathOffset, pathOffset + 7), unittest.equ
als("/zones/")); |
869 pathOffset += 7; | 887 pathOffset += 7; |
870 index = path.indexOf("/autoscalers/", pathOffset); | 888 index = path.indexOf("/autoscalers/", pathOffset); |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
916 var mock = new common_test.HttpServerMock(); | 934 var mock = new common_test.HttpServerMock(); |
917 api.ZoneOperationsResourceApi res = new api.AutoscalerApi(mock).zoneOperat
ions; | 935 api.ZoneOperationsResourceApi res = new api.AutoscalerApi(mock).zoneOperat
ions; |
918 var arg_project = "foo"; | 936 var arg_project = "foo"; |
919 var arg_zone = "foo"; | 937 var arg_zone = "foo"; |
920 var arg_operation = "foo"; | 938 var arg_operation = "foo"; |
921 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 939 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
922 var path = (req.url).path; | 940 var path = (req.url).path; |
923 var pathOffset = 0; | 941 var pathOffset = 0; |
924 var index; | 942 var index; |
925 var subPart; | 943 var subPart; |
926 unittest.expect(path.substring(pathOffset, pathOffset + 20), unittest.eq
uals("/autoscaler/v1beta2/")); | 944 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
927 pathOffset += 20; | 945 pathOffset += 1; |
928 index = path.indexOf("/zones/", pathOffset); | |
929 unittest.expect(index >= 0, unittest.isTrue); | |
930 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
931 pathOffset = index; | |
932 unittest.expect(subPart, unittest.equals("$arg_project")); | |
933 unittest.expect(path.substring(pathOffset, pathOffset + 7), unittest.equ
als("/zones/")); | |
934 pathOffset += 7; | |
935 index = path.indexOf("/operations/", pathOffset); | |
936 unittest.expect(index >= 0, unittest.isTrue); | |
937 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
938 pathOffset = index; | |
939 unittest.expect(subPart, unittest.equals("$arg_zone")); | |
940 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("/operations/")); | |
941 pathOffset += 12; | |
942 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
943 pathOffset = path.length; | |
944 unittest.expect(subPart, unittest.equals("$arg_operation")); | |
945 | 946 |
946 var query = (req.url).query; | 947 var query = (req.url).query; |
947 var queryOffset = 0; | 948 var queryOffset = 0; |
948 var queryMap = {}; | 949 var queryMap = {}; |
949 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 950 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
950 parseBool(n) { | 951 parseBool(n) { |
951 if (n == "true") return true; | 952 if (n == "true") return true; |
952 if (n == "false") return false; | 953 if (n == "false") return false; |
953 if (n == null) return null; | 954 if (n == null) return null; |
954 throw new core.ArgumentError("Invalid boolean: $n"); | 955 throw new core.ArgumentError("Invalid boolean: $n"); |
(...skipping 20 matching lines...) Expand all Loading... |
975 var mock = new common_test.HttpServerMock(); | 976 var mock = new common_test.HttpServerMock(); |
976 api.ZoneOperationsResourceApi res = new api.AutoscalerApi(mock).zoneOperat
ions; | 977 api.ZoneOperationsResourceApi res = new api.AutoscalerApi(mock).zoneOperat
ions; |
977 var arg_project = "foo"; | 978 var arg_project = "foo"; |
978 var arg_zone = "foo"; | 979 var arg_zone = "foo"; |
979 var arg_operation = "foo"; | 980 var arg_operation = "foo"; |
980 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 981 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
981 var path = (req.url).path; | 982 var path = (req.url).path; |
982 var pathOffset = 0; | 983 var pathOffset = 0; |
983 var index; | 984 var index; |
984 var subPart; | 985 var subPart; |
985 unittest.expect(path.substring(pathOffset, pathOffset + 20), unittest.eq
uals("/autoscaler/v1beta2/")); | 986 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
986 pathOffset += 20; | 987 pathOffset += 1; |
987 index = path.indexOf("/zones/", pathOffset); | |
988 unittest.expect(index >= 0, unittest.isTrue); | |
989 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
990 pathOffset = index; | |
991 unittest.expect(subPart, unittest.equals("$arg_project")); | |
992 unittest.expect(path.substring(pathOffset, pathOffset + 7), unittest.equ
als("/zones/")); | |
993 pathOffset += 7; | |
994 index = path.indexOf("/operations/", pathOffset); | |
995 unittest.expect(index >= 0, unittest.isTrue); | |
996 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
997 pathOffset = index; | |
998 unittest.expect(subPart, unittest.equals("$arg_zone")); | |
999 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("/operations/")); | |
1000 pathOffset += 12; | |
1001 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
1002 pathOffset = path.length; | |
1003 unittest.expect(subPart, unittest.equals("$arg_operation")); | |
1004 | 988 |
1005 var query = (req.url).query; | 989 var query = (req.url).query; |
1006 var queryOffset = 0; | 990 var queryOffset = 0; |
1007 var queryMap = {}; | 991 var queryMap = {}; |
1008 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 992 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
1009 parseBool(n) { | 993 parseBool(n) { |
1010 if (n == "true") return true; | 994 if (n == "true") return true; |
1011 if (n == "false") return false; | 995 if (n == "false") return false; |
1012 if (n == null) return null; | 996 if (n == null) return null; |
1013 throw new core.ArgumentError("Invalid boolean: $n"); | 997 throw new core.ArgumentError("Invalid boolean: $n"); |
(...skipping 24 matching lines...) Expand all Loading... |
1038 var arg_project = "foo"; | 1022 var arg_project = "foo"; |
1039 var arg_zone = "foo"; | 1023 var arg_zone = "foo"; |
1040 var arg_filter = "foo"; | 1024 var arg_filter = "foo"; |
1041 var arg_maxResults = 42; | 1025 var arg_maxResults = 42; |
1042 var arg_pageToken = "foo"; | 1026 var arg_pageToken = "foo"; |
1043 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1027 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
1044 var path = (req.url).path; | 1028 var path = (req.url).path; |
1045 var pathOffset = 0; | 1029 var pathOffset = 0; |
1046 var index; | 1030 var index; |
1047 var subPart; | 1031 var subPart; |
1048 unittest.expect(path.substring(pathOffset, pathOffset + 20), unittest.eq
uals("/autoscaler/v1beta2/")); | 1032 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
1049 pathOffset += 20; | 1033 pathOffset += 1; |
1050 index = path.indexOf("/zones/", pathOffset); | |
1051 unittest.expect(index >= 0, unittest.isTrue); | |
1052 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
1053 pathOffset = index; | |
1054 unittest.expect(subPart, unittest.equals("$arg_project")); | |
1055 unittest.expect(path.substring(pathOffset, pathOffset + 7), unittest.equ
als("/zones/")); | |
1056 pathOffset += 7; | |
1057 index = path.indexOf("/operations", pathOffset); | |
1058 unittest.expect(index >= 0, unittest.isTrue); | |
1059 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
1060 pathOffset = index; | |
1061 unittest.expect(subPart, unittest.equals("$arg_zone")); | |
1062 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("/operations")); | |
1063 pathOffset += 11; | |
1064 | 1034 |
1065 var query = (req.url).query; | 1035 var query = (req.url).query; |
1066 var queryOffset = 0; | 1036 var queryOffset = 0; |
1067 var queryMap = {}; | 1037 var queryMap = {}; |
1068 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 1038 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
1069 parseBool(n) { | 1039 parseBool(n) { |
1070 if (n == "true") return true; | 1040 if (n == "true") return true; |
1071 if (n == "false") return false; | 1041 if (n == "false") return false; |
1072 if (n == null) return null; | 1042 if (n == null) return null; |
1073 throw new core.ArgumentError("Invalid boolean: $n"); | 1043 throw new core.ArgumentError("Invalid boolean: $n"); |
(...skipping 18 matching lines...) Expand all Loading... |
1092 res.list(arg_project, arg_zone, filter: arg_filter, maxResults: arg_maxRes
ults, pageToken: arg_pageToken).then(unittest.expectAsync(((api.OperationList re
sponse) { | 1062 res.list(arg_project, arg_zone, filter: arg_filter, maxResults: arg_maxRes
ults, pageToken: arg_pageToken).then(unittest.expectAsync(((api.OperationList re
sponse) { |
1093 checkOperationList(response); | 1063 checkOperationList(response); |
1094 }))); | 1064 }))); |
1095 }); | 1065 }); |
1096 | 1066 |
1097 }); | 1067 }); |
1098 | 1068 |
1099 | 1069 |
1100 } | 1070 } |
1101 | 1071 |
OLD | NEW |