OLD | NEW |
1 library googleapis.runtimeconfig.v1.test; | 1 library googleapis.runtimeconfig.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:test/test.dart' as unittest; |
11 | 11 |
12 import 'package:googleapis/runtimeconfig/v1.dart' as api; | 12 import 'package:googleapis/runtimeconfig/v1.dart' as api; |
13 | 13 |
14 class HttpServerMock extends http.BaseClient { | 14 class HttpServerMock extends http.BaseClient { |
15 core.Function _callback; | 15 core.Function _callback; |
16 core.bool _expectJson; | 16 core.bool _expectJson; |
17 | 17 |
18 void register(core.Function callback, core.bool expectJson) { | 18 void register(core.Function callback, core.bool expectJson) { |
19 _callback = callback; | 19 _callback = callback; |
20 _expectJson = expectJson; | 20 _expectJson = expectJson; |
(...skipping 18 matching lines...) Expand all Loading... |
39 } else { | 39 } else { |
40 return stream.toBytes().then((data) { | 40 return stream.toBytes().then((data) { |
41 return _callback(request, data); | 41 return _callback(request, data); |
42 }); | 42 }); |
43 } | 43 } |
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<core.String, core.String> headers, core.String bod
y) { |
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 core.int buildCounterCancelOperationRequest = 0; | 54 core.int buildCounterCancelOperationRequest = 0; |
55 buildCancelOperationRequest() { | 55 buildCancelOperationRequest() { |
56 var o = new api.CancelOperationRequest(); | 56 var o = new api.CancelOperationRequest(); |
57 buildCounterCancelOperationRequest++; | 57 buildCounterCancelOperationRequest++; |
58 if (buildCounterCancelOperationRequest < 3) { | 58 if (buildCounterCancelOperationRequest < 3) { |
59 } | 59 } |
(...skipping 18 matching lines...) Expand all Loading... |
78 return o; | 78 return o; |
79 } | 79 } |
80 | 80 |
81 checkEmpty(api.Empty o) { | 81 checkEmpty(api.Empty o) { |
82 buildCounterEmpty++; | 82 buildCounterEmpty++; |
83 if (buildCounterEmpty < 3) { | 83 if (buildCounterEmpty < 3) { |
84 } | 84 } |
85 buildCounterEmpty--; | 85 buildCounterEmpty--; |
86 } | 86 } |
87 | 87 |
88 buildUnnamed1798() { | 88 buildUnnamed1808() { |
89 var o = new core.List<api.Operation>(); | 89 var o = new core.List<api.Operation>(); |
90 o.add(buildOperation()); | 90 o.add(buildOperation()); |
91 o.add(buildOperation()); | 91 o.add(buildOperation()); |
92 return o; | 92 return o; |
93 } | 93 } |
94 | 94 |
95 checkUnnamed1798(core.List<api.Operation> o) { | 95 checkUnnamed1808(core.List<api.Operation> o) { |
96 unittest.expect(o, unittest.hasLength(2)); | 96 unittest.expect(o, unittest.hasLength(2)); |
97 checkOperation(o[0]); | 97 checkOperation(o[0]); |
98 checkOperation(o[1]); | 98 checkOperation(o[1]); |
99 } | 99 } |
100 | 100 |
101 core.int buildCounterListOperationsResponse = 0; | 101 core.int buildCounterListOperationsResponse = 0; |
102 buildListOperationsResponse() { | 102 buildListOperationsResponse() { |
103 var o = new api.ListOperationsResponse(); | 103 var o = new api.ListOperationsResponse(); |
104 buildCounterListOperationsResponse++; | 104 buildCounterListOperationsResponse++; |
105 if (buildCounterListOperationsResponse < 3) { | 105 if (buildCounterListOperationsResponse < 3) { |
106 o.nextPageToken = "foo"; | 106 o.nextPageToken = "foo"; |
107 o.operations = buildUnnamed1798(); | 107 o.operations = buildUnnamed1808(); |
108 } | 108 } |
109 buildCounterListOperationsResponse--; | 109 buildCounterListOperationsResponse--; |
110 return o; | 110 return o; |
111 } | 111 } |
112 | 112 |
113 checkListOperationsResponse(api.ListOperationsResponse o) { | 113 checkListOperationsResponse(api.ListOperationsResponse o) { |
114 buildCounterListOperationsResponse++; | 114 buildCounterListOperationsResponse++; |
115 if (buildCounterListOperationsResponse < 3) { | 115 if (buildCounterListOperationsResponse < 3) { |
116 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 116 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
117 checkUnnamed1798(o.operations); | 117 checkUnnamed1808(o.operations); |
118 } | 118 } |
119 buildCounterListOperationsResponse--; | 119 buildCounterListOperationsResponse--; |
120 } | 120 } |
121 | 121 |
122 buildUnnamed1799() { | 122 buildUnnamed1809() { |
123 var o = new core.Map<core.String, core.Object>(); | 123 var o = new core.Map<core.String, core.Object>(); |
124 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 124 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; |
125 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 125 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; |
126 return o; | 126 return o; |
127 } | 127 } |
128 | 128 |
129 checkUnnamed1799(core.Map<core.String, core.Object> o) { | 129 checkUnnamed1809(core.Map<core.String, core.Object> o) { |
130 unittest.expect(o, unittest.hasLength(2)); | 130 unittest.expect(o, unittest.hasLength(2)); |
131 var casted1 = (o["x"]) as core.Map; unittest.expect(casted1, unittest.hasLengt
h(3)); unittest.expect(casted1["list"], unittest.equals([1, 2, 3])); unittest.ex
pect(casted1["bool"], unittest.equals(true)); unittest.expect(casted1["string"],
unittest.equals('foo')); | 131 var casted1 = (o["x"]) as core.Map; unittest.expect(casted1, unittest.hasLengt
h(3)); unittest.expect(casted1["list"], unittest.equals([1, 2, 3])); unittest.ex
pect(casted1["bool"], unittest.equals(true)); unittest.expect(casted1["string"],
unittest.equals('foo')); |
132 var casted2 = (o["y"]) as core.Map; unittest.expect(casted2, unittest.hasLengt
h(3)); unittest.expect(casted2["list"], unittest.equals([1, 2, 3])); unittest.ex
pect(casted2["bool"], unittest.equals(true)); unittest.expect(casted2["string"],
unittest.equals('foo')); | 132 var casted2 = (o["y"]) as core.Map; unittest.expect(casted2, unittest.hasLengt
h(3)); unittest.expect(casted2["list"], unittest.equals([1, 2, 3])); unittest.ex
pect(casted2["bool"], unittest.equals(true)); unittest.expect(casted2["string"],
unittest.equals('foo')); |
133 } | 133 } |
134 | 134 |
135 buildUnnamed1800() { | 135 buildUnnamed1810() { |
136 var o = new core.Map<core.String, core.Object>(); | 136 var o = new core.Map<core.String, core.Object>(); |
137 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 137 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; |
138 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 138 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; |
139 return o; | 139 return o; |
140 } | 140 } |
141 | 141 |
142 checkUnnamed1800(core.Map<core.String, core.Object> o) { | 142 checkUnnamed1810(core.Map<core.String, core.Object> o) { |
143 unittest.expect(o, unittest.hasLength(2)); | 143 unittest.expect(o, unittest.hasLength(2)); |
144 var casted3 = (o["x"]) as core.Map; unittest.expect(casted3, unittest.hasLengt
h(3)); unittest.expect(casted3["list"], unittest.equals([1, 2, 3])); unittest.ex
pect(casted3["bool"], unittest.equals(true)); unittest.expect(casted3["string"],
unittest.equals('foo')); | 144 var casted3 = (o["x"]) as core.Map; unittest.expect(casted3, unittest.hasLengt
h(3)); unittest.expect(casted3["list"], unittest.equals([1, 2, 3])); unittest.ex
pect(casted3["bool"], unittest.equals(true)); unittest.expect(casted3["string"],
unittest.equals('foo')); |
145 var casted4 = (o["y"]) as core.Map; unittest.expect(casted4, unittest.hasLengt
h(3)); unittest.expect(casted4["list"], unittest.equals([1, 2, 3])); unittest.ex
pect(casted4["bool"], unittest.equals(true)); unittest.expect(casted4["string"],
unittest.equals('foo')); | 145 var casted4 = (o["y"]) as core.Map; unittest.expect(casted4, unittest.hasLengt
h(3)); unittest.expect(casted4["list"], unittest.equals([1, 2, 3])); unittest.ex
pect(casted4["bool"], unittest.equals(true)); unittest.expect(casted4["string"],
unittest.equals('foo')); |
146 } | 146 } |
147 | 147 |
148 core.int buildCounterOperation = 0; | 148 core.int buildCounterOperation = 0; |
149 buildOperation() { | 149 buildOperation() { |
150 var o = new api.Operation(); | 150 var o = new api.Operation(); |
151 buildCounterOperation++; | 151 buildCounterOperation++; |
152 if (buildCounterOperation < 3) { | 152 if (buildCounterOperation < 3) { |
153 o.done = true; | 153 o.done = true; |
154 o.error = buildStatus(); | 154 o.error = buildStatus(); |
155 o.metadata = buildUnnamed1799(); | 155 o.metadata = buildUnnamed1809(); |
156 o.name = "foo"; | 156 o.name = "foo"; |
157 o.response = buildUnnamed1800(); | 157 o.response = buildUnnamed1810(); |
158 } | 158 } |
159 buildCounterOperation--; | 159 buildCounterOperation--; |
160 return o; | 160 return o; |
161 } | 161 } |
162 | 162 |
163 checkOperation(api.Operation o) { | 163 checkOperation(api.Operation o) { |
164 buildCounterOperation++; | 164 buildCounterOperation++; |
165 if (buildCounterOperation < 3) { | 165 if (buildCounterOperation < 3) { |
166 unittest.expect(o.done, unittest.isTrue); | 166 unittest.expect(o.done, unittest.isTrue); |
167 checkStatus(o.error); | 167 checkStatus(o.error); |
168 checkUnnamed1799(o.metadata); | 168 checkUnnamed1809(o.metadata); |
169 unittest.expect(o.name, unittest.equals('foo')); | 169 unittest.expect(o.name, unittest.equals('foo')); |
170 checkUnnamed1800(o.response); | 170 checkUnnamed1810(o.response); |
171 } | 171 } |
172 buildCounterOperation--; | 172 buildCounterOperation--; |
173 } | 173 } |
174 | 174 |
175 buildUnnamed1801() { | 175 buildUnnamed1811() { |
176 var o = new core.Map<core.String, core.Object>(); | 176 var o = new core.Map<core.String, core.Object>(); |
177 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 177 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; |
178 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 178 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; |
179 return o; | 179 return o; |
180 } | 180 } |
181 | 181 |
182 checkUnnamed1801(core.Map<core.String, core.Object> o) { | 182 checkUnnamed1811(core.Map<core.String, core.Object> o) { |
183 unittest.expect(o, unittest.hasLength(2)); | 183 unittest.expect(o, unittest.hasLength(2)); |
184 var casted5 = (o["x"]) as core.Map; unittest.expect(casted5, unittest.hasLengt
h(3)); unittest.expect(casted5["list"], unittest.equals([1, 2, 3])); unittest.ex
pect(casted5["bool"], unittest.equals(true)); unittest.expect(casted5["string"],
unittest.equals('foo')); | 184 var casted5 = (o["x"]) as core.Map; unittest.expect(casted5, unittest.hasLengt
h(3)); unittest.expect(casted5["list"], unittest.equals([1, 2, 3])); unittest.ex
pect(casted5["bool"], unittest.equals(true)); unittest.expect(casted5["string"],
unittest.equals('foo')); |
185 var casted6 = (o["y"]) as core.Map; unittest.expect(casted6, unittest.hasLengt
h(3)); unittest.expect(casted6["list"], unittest.equals([1, 2, 3])); unittest.ex
pect(casted6["bool"], unittest.equals(true)); unittest.expect(casted6["string"],
unittest.equals('foo')); | 185 var casted6 = (o["y"]) as core.Map; unittest.expect(casted6, unittest.hasLengt
h(3)); unittest.expect(casted6["list"], unittest.equals([1, 2, 3])); unittest.ex
pect(casted6["bool"], unittest.equals(true)); unittest.expect(casted6["string"],
unittest.equals('foo')); |
186 } | 186 } |
187 | 187 |
188 buildUnnamed1802() { | 188 buildUnnamed1812() { |
189 var o = new core.List<core.Map<core.String, core.Object>>(); | 189 var o = new core.List<core.Map<core.String, core.Object>>(); |
190 o.add(buildUnnamed1801()); | 190 o.add(buildUnnamed1811()); |
191 o.add(buildUnnamed1801()); | 191 o.add(buildUnnamed1811()); |
192 return o; | 192 return o; |
193 } | 193 } |
194 | 194 |
195 checkUnnamed1802(core.List<core.Map<core.String, core.Object>> o) { | 195 checkUnnamed1812(core.List<core.Map<core.String, core.Object>> o) { |
196 unittest.expect(o, unittest.hasLength(2)); | 196 unittest.expect(o, unittest.hasLength(2)); |
197 checkUnnamed1801(o[0]); | 197 checkUnnamed1811(o[0]); |
198 checkUnnamed1801(o[1]); | 198 checkUnnamed1811(o[1]); |
199 } | 199 } |
200 | 200 |
201 core.int buildCounterStatus = 0; | 201 core.int buildCounterStatus = 0; |
202 buildStatus() { | 202 buildStatus() { |
203 var o = new api.Status(); | 203 var o = new api.Status(); |
204 buildCounterStatus++; | 204 buildCounterStatus++; |
205 if (buildCounterStatus < 3) { | 205 if (buildCounterStatus < 3) { |
206 o.code = 42; | 206 o.code = 42; |
207 o.details = buildUnnamed1802(); | 207 o.details = buildUnnamed1812(); |
208 o.message = "foo"; | 208 o.message = "foo"; |
209 } | 209 } |
210 buildCounterStatus--; | 210 buildCounterStatus--; |
211 return o; | 211 return o; |
212 } | 212 } |
213 | 213 |
214 checkStatus(api.Status o) { | 214 checkStatus(api.Status o) { |
215 buildCounterStatus++; | 215 buildCounterStatus++; |
216 if (buildCounterStatus < 3) { | 216 if (buildCounterStatus < 3) { |
217 unittest.expect(o.code, unittest.equals(42)); | 217 unittest.expect(o.code, unittest.equals(42)); |
218 checkUnnamed1802(o.details); | 218 checkUnnamed1812(o.details); |
219 unittest.expect(o.message, unittest.equals('foo')); | 219 unittest.expect(o.message, unittest.equals('foo')); |
220 } | 220 } |
221 buildCounterStatus--; | 221 buildCounterStatus--; |
222 } | 222 } |
223 | 223 |
224 | 224 |
225 main() { | 225 main() { |
226 unittest.group("obj-schema-CancelOperationRequest", () { | 226 unittest.group("obj-schema-CancelOperationRequest", () { |
227 unittest.test("to-json--from-json", () { | 227 unittest.test("to-json--from-json", () { |
228 var o = buildCancelOperationRequest(); | 228 var o = buildCancelOperationRequest(); |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
268 }); | 268 }); |
269 | 269 |
270 | 270 |
271 unittest.group("resource-OperationsResourceApi", () { | 271 unittest.group("resource-OperationsResourceApi", () { |
272 unittest.test("method--cancel", () { | 272 unittest.test("method--cancel", () { |
273 | 273 |
274 var mock = new HttpServerMock(); | 274 var mock = new HttpServerMock(); |
275 api.OperationsResourceApi res = new api.RuntimeconfigApi(mock).operations; | 275 api.OperationsResourceApi res = new api.RuntimeconfigApi(mock).operations; |
276 var arg_request = buildCancelOperationRequest(); | 276 var arg_request = buildCancelOperationRequest(); |
277 var arg_name = "foo"; | 277 var arg_name = "foo"; |
278 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 278 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
279 var obj = new api.CancelOperationRequest.fromJson(json); | 279 var obj = new api.CancelOperationRequest.fromJson(json); |
280 checkCancelOperationRequest(obj); | 280 checkCancelOperationRequest(obj); |
281 | 281 |
282 var path = (req.url).path; | 282 var path = (req.url).path; |
283 var pathOffset = 0; | 283 var pathOffset = 0; |
284 var index; | 284 var index; |
285 var subPart; | 285 var subPart; |
286 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 286 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
287 pathOffset += 1; | 287 pathOffset += 1; |
288 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); | 288 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); |
(...skipping 17 matching lines...) Expand all Loading... |
306 } | 306 } |
307 } | 307 } |
308 | 308 |
309 | 309 |
310 var h = { | 310 var h = { |
311 "content-type" : "application/json; charset=utf-8", | 311 "content-type" : "application/json; charset=utf-8", |
312 }; | 312 }; |
313 var resp = convert.JSON.encode(buildEmpty()); | 313 var resp = convert.JSON.encode(buildEmpty()); |
314 return new async.Future.value(stringResponse(200, h, resp)); | 314 return new async.Future.value(stringResponse(200, h, resp)); |
315 }), true); | 315 }), true); |
316 res.cancel(arg_request, arg_name).then(unittest.expectAsync(((api.Empty re
sponse) { | 316 res.cancel(arg_request, arg_name).then(unittest.expectAsync1(((api.Empty r
esponse) { |
317 checkEmpty(response); | 317 checkEmpty(response); |
318 }))); | 318 }))); |
319 }); | 319 }); |
320 | 320 |
321 unittest.test("method--delete", () { | 321 unittest.test("method--delete", () { |
322 | 322 |
323 var mock = new HttpServerMock(); | 323 var mock = new HttpServerMock(); |
324 api.OperationsResourceApi res = new api.RuntimeconfigApi(mock).operations; | 324 api.OperationsResourceApi res = new api.RuntimeconfigApi(mock).operations; |
325 var arg_name = "foo"; | 325 var arg_name = "foo"; |
326 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 326 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
327 var path = (req.url).path; | 327 var path = (req.url).path; |
328 var pathOffset = 0; | 328 var pathOffset = 0; |
329 var index; | 329 var index; |
330 var subPart; | 330 var subPart; |
331 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 331 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
332 pathOffset += 1; | 332 pathOffset += 1; |
333 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); | 333 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); |
334 pathOffset += 3; | 334 pathOffset += 3; |
335 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; | 335 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; |
336 | 336 |
(...skipping 14 matching lines...) Expand all Loading... |
351 } | 351 } |
352 } | 352 } |
353 | 353 |
354 | 354 |
355 var h = { | 355 var h = { |
356 "content-type" : "application/json; charset=utf-8", | 356 "content-type" : "application/json; charset=utf-8", |
357 }; | 357 }; |
358 var resp = convert.JSON.encode(buildEmpty()); | 358 var resp = convert.JSON.encode(buildEmpty()); |
359 return new async.Future.value(stringResponse(200, h, resp)); | 359 return new async.Future.value(stringResponse(200, h, resp)); |
360 }), true); | 360 }), true); |
361 res.delete(arg_name).then(unittest.expectAsync(((api.Empty response) { | 361 res.delete(arg_name).then(unittest.expectAsync1(((api.Empty response) { |
362 checkEmpty(response); | 362 checkEmpty(response); |
363 }))); | 363 }))); |
364 }); | 364 }); |
365 | 365 |
366 unittest.test("method--list", () { | 366 unittest.test("method--list", () { |
367 | 367 |
368 var mock = new HttpServerMock(); | 368 var mock = new HttpServerMock(); |
369 api.OperationsResourceApi res = new api.RuntimeconfigApi(mock).operations; | 369 api.OperationsResourceApi res = new api.RuntimeconfigApi(mock).operations; |
370 var arg_name = "foo"; | 370 var arg_name = "foo"; |
371 var arg_filter = "foo"; | 371 var arg_filter = "foo"; |
372 var arg_pageToken = "foo"; | 372 var arg_pageToken = "foo"; |
373 var arg_pageSize = 42; | 373 var arg_pageSize = 42; |
374 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 374 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
375 var path = (req.url).path; | 375 var path = (req.url).path; |
376 var pathOffset = 0; | 376 var pathOffset = 0; |
377 var index; | 377 var index; |
378 var subPart; | 378 var subPart; |
379 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 379 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
380 pathOffset += 1; | 380 pathOffset += 1; |
381 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); | 381 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); |
382 pathOffset += 3; | 382 pathOffset += 3; |
383 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; | 383 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; |
384 | 384 |
(...skipping 17 matching lines...) Expand all Loading... |
402 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | 402 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); |
403 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ
als(arg_pageSize)); | 403 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ
als(arg_pageSize)); |
404 | 404 |
405 | 405 |
406 var h = { | 406 var h = { |
407 "content-type" : "application/json; charset=utf-8", | 407 "content-type" : "application/json; charset=utf-8", |
408 }; | 408 }; |
409 var resp = convert.JSON.encode(buildListOperationsResponse()); | 409 var resp = convert.JSON.encode(buildListOperationsResponse()); |
410 return new async.Future.value(stringResponse(200, h, resp)); | 410 return new async.Future.value(stringResponse(200, h, resp)); |
411 }), true); | 411 }), true); |
412 res.list(arg_name, filter: arg_filter, pageToken: arg_pageToken, pageSize:
arg_pageSize).then(unittest.expectAsync(((api.ListOperationsResponse response)
{ | 412 res.list(arg_name, filter: arg_filter, pageToken: arg_pageToken, pageSize:
arg_pageSize).then(unittest.expectAsync1(((api.ListOperationsResponse response)
{ |
413 checkListOperationsResponse(response); | 413 checkListOperationsResponse(response); |
414 }))); | 414 }))); |
415 }); | 415 }); |
416 | 416 |
417 }); | 417 }); |
418 | 418 |
419 | 419 |
420 } | 420 } |
421 | 421 |
OLD | NEW |