OLD | NEW |
1 library googleapis.cloudfunctions.v1.test; | 1 library googleapis.cloudfunctions.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 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<core.String, core.String> headers, core.String bod
y) { | 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 buildUnnamed141() { | 54 buildUnnamed146() { |
55 var o = new core.List<api.Location>(); | 55 var o = new core.List<api.Location>(); |
56 o.add(buildLocation()); | 56 o.add(buildLocation()); |
57 o.add(buildLocation()); | 57 o.add(buildLocation()); |
58 return o; | 58 return o; |
59 } | 59 } |
60 | 60 |
61 checkUnnamed141(core.List<api.Location> o) { | 61 checkUnnamed146(core.List<api.Location> o) { |
62 unittest.expect(o, unittest.hasLength(2)); | 62 unittest.expect(o, unittest.hasLength(2)); |
63 checkLocation(o[0]); | 63 checkLocation(o[0]); |
64 checkLocation(o[1]); | 64 checkLocation(o[1]); |
65 } | 65 } |
66 | 66 |
67 core.int buildCounterListLocationsResponse = 0; | 67 core.int buildCounterListLocationsResponse = 0; |
68 buildListLocationsResponse() { | 68 buildListLocationsResponse() { |
69 var o = new api.ListLocationsResponse(); | 69 var o = new api.ListLocationsResponse(); |
70 buildCounterListLocationsResponse++; | 70 buildCounterListLocationsResponse++; |
71 if (buildCounterListLocationsResponse < 3) { | 71 if (buildCounterListLocationsResponse < 3) { |
72 o.locations = buildUnnamed141(); | 72 o.locations = buildUnnamed146(); |
73 o.nextPageToken = "foo"; | 73 o.nextPageToken = "foo"; |
74 } | 74 } |
75 buildCounterListLocationsResponse--; | 75 buildCounterListLocationsResponse--; |
76 return o; | 76 return o; |
77 } | 77 } |
78 | 78 |
79 checkListLocationsResponse(api.ListLocationsResponse o) { | 79 checkListLocationsResponse(api.ListLocationsResponse o) { |
80 buildCounterListLocationsResponse++; | 80 buildCounterListLocationsResponse++; |
81 if (buildCounterListLocationsResponse < 3) { | 81 if (buildCounterListLocationsResponse < 3) { |
82 checkUnnamed141(o.locations); | 82 checkUnnamed146(o.locations); |
83 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 83 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
84 } | 84 } |
85 buildCounterListLocationsResponse--; | 85 buildCounterListLocationsResponse--; |
86 } | 86 } |
87 | 87 |
88 buildUnnamed142() { | 88 buildUnnamed147() { |
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 checkUnnamed142(core.List<api.Operation> o) { | 95 checkUnnamed147(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 = buildUnnamed142(); | 107 o.operations = buildUnnamed147(); |
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 checkUnnamed142(o.operations); | 117 checkUnnamed147(o.operations); |
118 } | 118 } |
119 buildCounterListOperationsResponse--; | 119 buildCounterListOperationsResponse--; |
120 } | 120 } |
121 | 121 |
122 buildUnnamed143() { | 122 buildUnnamed148() { |
123 var o = new core.Map<core.String, core.String>(); | 123 var o = new core.Map<core.String, core.String>(); |
124 o["x"] = "foo"; | 124 o["x"] = "foo"; |
125 o["y"] = "foo"; | 125 o["y"] = "foo"; |
126 return o; | 126 return o; |
127 } | 127 } |
128 | 128 |
129 checkUnnamed143(core.Map<core.String, core.String> o) { | 129 checkUnnamed148(core.Map<core.String, core.String> o) { |
130 unittest.expect(o, unittest.hasLength(2)); | 130 unittest.expect(o, unittest.hasLength(2)); |
131 unittest.expect(o["x"], unittest.equals('foo')); | 131 unittest.expect(o["x"], unittest.equals('foo')); |
132 unittest.expect(o["y"], unittest.equals('foo')); | 132 unittest.expect(o["y"], unittest.equals('foo')); |
133 } | 133 } |
134 | 134 |
135 buildUnnamed144() { | 135 buildUnnamed149() { |
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 checkUnnamed144(core.Map<core.String, core.Object> o) { | 142 checkUnnamed149(core.Map<core.String, core.Object> o) { |
143 unittest.expect(o, unittest.hasLength(2)); | 143 unittest.expect(o, unittest.hasLength(2)); |
144 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')); | 144 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')); |
145 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')); | 145 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')); |
146 } | 146 } |
147 | 147 |
148 core.int buildCounterLocation = 0; | 148 core.int buildCounterLocation = 0; |
149 buildLocation() { | 149 buildLocation() { |
150 var o = new api.Location(); | 150 var o = new api.Location(); |
151 buildCounterLocation++; | 151 buildCounterLocation++; |
152 if (buildCounterLocation < 3) { | 152 if (buildCounterLocation < 3) { |
153 o.labels = buildUnnamed143(); | 153 o.labels = buildUnnamed148(); |
154 o.locationId = "foo"; | 154 o.locationId = "foo"; |
155 o.metadata = buildUnnamed144(); | 155 o.metadata = buildUnnamed149(); |
156 o.name = "foo"; | 156 o.name = "foo"; |
157 } | 157 } |
158 buildCounterLocation--; | 158 buildCounterLocation--; |
159 return o; | 159 return o; |
160 } | 160 } |
161 | 161 |
162 checkLocation(api.Location o) { | 162 checkLocation(api.Location o) { |
163 buildCounterLocation++; | 163 buildCounterLocation++; |
164 if (buildCounterLocation < 3) { | 164 if (buildCounterLocation < 3) { |
165 checkUnnamed143(o.labels); | 165 checkUnnamed148(o.labels); |
166 unittest.expect(o.locationId, unittest.equals('foo')); | 166 unittest.expect(o.locationId, unittest.equals('foo')); |
167 checkUnnamed144(o.metadata); | 167 checkUnnamed149(o.metadata); |
168 unittest.expect(o.name, unittest.equals('foo')); | 168 unittest.expect(o.name, unittest.equals('foo')); |
169 } | 169 } |
170 buildCounterLocation--; | 170 buildCounterLocation--; |
171 } | 171 } |
172 | 172 |
173 buildUnnamed145() { | 173 buildUnnamed150() { |
174 var o = new core.Map<core.String, core.Object>(); | 174 var o = new core.Map<core.String, core.Object>(); |
175 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 175 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; |
176 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 176 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; |
177 return o; | 177 return o; |
178 } | 178 } |
179 | 179 |
180 checkUnnamed145(core.Map<core.String, core.Object> o) { | 180 checkUnnamed150(core.Map<core.String, core.Object> o) { |
181 unittest.expect(o, unittest.hasLength(2)); | 181 unittest.expect(o, unittest.hasLength(2)); |
182 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')); | 182 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')); |
183 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')); | 183 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')); |
184 } | 184 } |
185 | 185 |
186 buildUnnamed146() { | 186 buildUnnamed151() { |
187 var o = new core.Map<core.String, core.Object>(); | 187 var o = new core.Map<core.String, core.Object>(); |
188 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 188 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; |
189 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 189 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; |
190 return o; | 190 return o; |
191 } | 191 } |
192 | 192 |
193 checkUnnamed146(core.Map<core.String, core.Object> o) { | 193 checkUnnamed151(core.Map<core.String, core.Object> o) { |
194 unittest.expect(o, unittest.hasLength(2)); | 194 unittest.expect(o, unittest.hasLength(2)); |
195 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')); | 195 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')); |
196 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')); | 196 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')); |
197 } | 197 } |
198 | 198 |
199 core.int buildCounterOperation = 0; | 199 core.int buildCounterOperation = 0; |
200 buildOperation() { | 200 buildOperation() { |
201 var o = new api.Operation(); | 201 var o = new api.Operation(); |
202 buildCounterOperation++; | 202 buildCounterOperation++; |
203 if (buildCounterOperation < 3) { | 203 if (buildCounterOperation < 3) { |
204 o.done = true; | 204 o.done = true; |
205 o.error = buildStatus(); | 205 o.error = buildStatus(); |
206 o.metadata = buildUnnamed145(); | 206 o.metadata = buildUnnamed150(); |
207 o.name = "foo"; | 207 o.name = "foo"; |
208 o.response = buildUnnamed146(); | 208 o.response = buildUnnamed151(); |
209 } | 209 } |
210 buildCounterOperation--; | 210 buildCounterOperation--; |
211 return o; | 211 return o; |
212 } | 212 } |
213 | 213 |
214 checkOperation(api.Operation o) { | 214 checkOperation(api.Operation o) { |
215 buildCounterOperation++; | 215 buildCounterOperation++; |
216 if (buildCounterOperation < 3) { | 216 if (buildCounterOperation < 3) { |
217 unittest.expect(o.done, unittest.isTrue); | 217 unittest.expect(o.done, unittest.isTrue); |
218 checkStatus(o.error); | 218 checkStatus(o.error); |
219 checkUnnamed145(o.metadata); | 219 checkUnnamed150(o.metadata); |
220 unittest.expect(o.name, unittest.equals('foo')); | 220 unittest.expect(o.name, unittest.equals('foo')); |
221 checkUnnamed146(o.response); | 221 checkUnnamed151(o.response); |
222 } | 222 } |
223 buildCounterOperation--; | 223 buildCounterOperation--; |
224 } | 224 } |
225 | 225 |
226 buildUnnamed147() { | 226 buildUnnamed152() { |
227 var o = new core.Map<core.String, core.Object>(); | 227 var o = new core.Map<core.String, core.Object>(); |
228 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 228 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; |
229 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 229 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; |
230 return o; | 230 return o; |
231 } | 231 } |
232 | 232 |
233 checkUnnamed147(core.Map<core.String, core.Object> o) { | 233 checkUnnamed152(core.Map<core.String, core.Object> o) { |
234 unittest.expect(o, unittest.hasLength(2)); | 234 unittest.expect(o, unittest.hasLength(2)); |
235 var casted7 = (o["x"]) as core.Map; unittest.expect(casted7, unittest.hasLengt
h(3)); unittest.expect(casted7["list"], unittest.equals([1, 2, 3])); unittest.ex
pect(casted7["bool"], unittest.equals(true)); unittest.expect(casted7["string"],
unittest.equals('foo')); | 235 var casted7 = (o["x"]) as core.Map; unittest.expect(casted7, unittest.hasLengt
h(3)); unittest.expect(casted7["list"], unittest.equals([1, 2, 3])); unittest.ex
pect(casted7["bool"], unittest.equals(true)); unittest.expect(casted7["string"],
unittest.equals('foo')); |
236 var casted8 = (o["y"]) as core.Map; unittest.expect(casted8, unittest.hasLengt
h(3)); unittest.expect(casted8["list"], unittest.equals([1, 2, 3])); unittest.ex
pect(casted8["bool"], unittest.equals(true)); unittest.expect(casted8["string"],
unittest.equals('foo')); | 236 var casted8 = (o["y"]) as core.Map; unittest.expect(casted8, unittest.hasLengt
h(3)); unittest.expect(casted8["list"], unittest.equals([1, 2, 3])); unittest.ex
pect(casted8["bool"], unittest.equals(true)); unittest.expect(casted8["string"],
unittest.equals('foo')); |
237 } | 237 } |
238 | 238 |
239 core.int buildCounterOperationMetadataV1Beta2 = 0; | 239 core.int buildCounterOperationMetadataV1Beta2 = 0; |
240 buildOperationMetadataV1Beta2() { | 240 buildOperationMetadataV1Beta2() { |
241 var o = new api.OperationMetadataV1Beta2(); | 241 var o = new api.OperationMetadataV1Beta2(); |
242 buildCounterOperationMetadataV1Beta2++; | 242 buildCounterOperationMetadataV1Beta2++; |
243 if (buildCounterOperationMetadataV1Beta2 < 3) { | 243 if (buildCounterOperationMetadataV1Beta2 < 3) { |
244 o.request = buildUnnamed147(); | 244 o.request = buildUnnamed152(); |
245 o.target = "foo"; | 245 o.target = "foo"; |
246 o.type = "foo"; | 246 o.type = "foo"; |
247 } | 247 } |
248 buildCounterOperationMetadataV1Beta2--; | 248 buildCounterOperationMetadataV1Beta2--; |
249 return o; | 249 return o; |
250 } | 250 } |
251 | 251 |
252 checkOperationMetadataV1Beta2(api.OperationMetadataV1Beta2 o) { | 252 checkOperationMetadataV1Beta2(api.OperationMetadataV1Beta2 o) { |
253 buildCounterOperationMetadataV1Beta2++; | 253 buildCounterOperationMetadataV1Beta2++; |
254 if (buildCounterOperationMetadataV1Beta2 < 3) { | 254 if (buildCounterOperationMetadataV1Beta2 < 3) { |
255 checkUnnamed147(o.request); | 255 checkUnnamed152(o.request); |
256 unittest.expect(o.target, unittest.equals('foo')); | 256 unittest.expect(o.target, unittest.equals('foo')); |
257 unittest.expect(o.type, unittest.equals('foo')); | 257 unittest.expect(o.type, unittest.equals('foo')); |
258 } | 258 } |
259 buildCounterOperationMetadataV1Beta2--; | 259 buildCounterOperationMetadataV1Beta2--; |
260 } | 260 } |
261 | 261 |
262 buildUnnamed148() { | 262 buildUnnamed153() { |
263 var o = new core.Map<core.String, core.Object>(); | 263 var o = new core.Map<core.String, core.Object>(); |
264 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 264 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; |
265 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 265 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; |
266 return o; | 266 return o; |
267 } | 267 } |
268 | 268 |
269 checkUnnamed148(core.Map<core.String, core.Object> o) { | 269 checkUnnamed153(core.Map<core.String, core.Object> o) { |
270 unittest.expect(o, unittest.hasLength(2)); | 270 unittest.expect(o, unittest.hasLength(2)); |
271 var casted9 = (o["x"]) as core.Map; unittest.expect(casted9, unittest.hasLengt
h(3)); unittest.expect(casted9["list"], unittest.equals([1, 2, 3])); unittest.ex
pect(casted9["bool"], unittest.equals(true)); unittest.expect(casted9["string"],
unittest.equals('foo')); | 271 var casted9 = (o["x"]) as core.Map; unittest.expect(casted9, unittest.hasLengt
h(3)); unittest.expect(casted9["list"], unittest.equals([1, 2, 3])); unittest.ex
pect(casted9["bool"], unittest.equals(true)); unittest.expect(casted9["string"],
unittest.equals('foo')); |
272 var casted10 = (o["y"]) as core.Map; unittest.expect(casted10, unittest.hasLen
gth(3)); unittest.expect(casted10["list"], unittest.equals([1, 2, 3])); unittest
.expect(casted10["bool"], unittest.equals(true)); unittest.expect(casted10["stri
ng"], unittest.equals('foo')); | 272 var casted10 = (o["y"]) as core.Map; unittest.expect(casted10, unittest.hasLen
gth(3)); unittest.expect(casted10["list"], unittest.equals([1, 2, 3])); unittest
.expect(casted10["bool"], unittest.equals(true)); unittest.expect(casted10["stri
ng"], unittest.equals('foo')); |
273 } | 273 } |
274 | 274 |
275 buildUnnamed149() { | 275 buildUnnamed154() { |
276 var o = new core.List<core.Map<core.String, core.Object>>(); | 276 var o = new core.List<core.Map<core.String, core.Object>>(); |
277 o.add(buildUnnamed148()); | 277 o.add(buildUnnamed153()); |
278 o.add(buildUnnamed148()); | 278 o.add(buildUnnamed153()); |
279 return o; | 279 return o; |
280 } | 280 } |
281 | 281 |
282 checkUnnamed149(core.List<core.Map<core.String, core.Object>> o) { | 282 checkUnnamed154(core.List<core.Map<core.String, core.Object>> o) { |
283 unittest.expect(o, unittest.hasLength(2)); | 283 unittest.expect(o, unittest.hasLength(2)); |
284 checkUnnamed148(o[0]); | 284 checkUnnamed153(o[0]); |
285 checkUnnamed148(o[1]); | 285 checkUnnamed153(o[1]); |
286 } | 286 } |
287 | 287 |
288 core.int buildCounterStatus = 0; | 288 core.int buildCounterStatus = 0; |
289 buildStatus() { | 289 buildStatus() { |
290 var o = new api.Status(); | 290 var o = new api.Status(); |
291 buildCounterStatus++; | 291 buildCounterStatus++; |
292 if (buildCounterStatus < 3) { | 292 if (buildCounterStatus < 3) { |
293 o.code = 42; | 293 o.code = 42; |
294 o.details = buildUnnamed149(); | 294 o.details = buildUnnamed154(); |
295 o.message = "foo"; | 295 o.message = "foo"; |
296 } | 296 } |
297 buildCounterStatus--; | 297 buildCounterStatus--; |
298 return o; | 298 return o; |
299 } | 299 } |
300 | 300 |
301 checkStatus(api.Status o) { | 301 checkStatus(api.Status o) { |
302 buildCounterStatus++; | 302 buildCounterStatus++; |
303 if (buildCounterStatus < 3) { | 303 if (buildCounterStatus < 3) { |
304 unittest.expect(o.code, unittest.equals(42)); | 304 unittest.expect(o.code, unittest.equals(42)); |
305 checkUnnamed149(o.details); | 305 checkUnnamed154(o.details); |
306 unittest.expect(o.message, unittest.equals('foo')); | 306 unittest.expect(o.message, unittest.equals('foo')); |
307 } | 307 } |
308 buildCounterStatus--; | 308 buildCounterStatus--; |
309 } | 309 } |
310 | 310 |
311 | 311 |
312 main() { | 312 main() { |
313 unittest.group("obj-schema-ListLocationsResponse", () { | 313 unittest.group("obj-schema-ListLocationsResponse", () { |
314 unittest.test("to-json--from-json", () { | 314 unittest.test("to-json--from-json", () { |
315 var o = buildListLocationsResponse(); | 315 var o = buildListLocationsResponse(); |
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
514 res.list(arg_name, filter: arg_filter, pageToken: arg_pageToken, pageSize:
arg_pageSize).then(unittest.expectAsync1(((api.ListLocationsResponse response)
{ | 514 res.list(arg_name, filter: arg_filter, pageToken: arg_pageToken, pageSize:
arg_pageSize).then(unittest.expectAsync1(((api.ListLocationsResponse response)
{ |
515 checkListLocationsResponse(response); | 515 checkListLocationsResponse(response); |
516 }))); | 516 }))); |
517 }); | 517 }); |
518 | 518 |
519 }); | 519 }); |
520 | 520 |
521 | 521 |
522 } | 522 } |
523 | 523 |
OLD | NEW |