OLD | NEW |
1 library googleapis.manufacturers.v1.test; | 1 library googleapis.manufacturers.v1.test; |
2 | 2 |
3 import "dart:core" as core; | 3 import "dart:core" as core; |
4 import "dart:collection" as collection; | 4 import "dart:collection" as collection; |
5 import "dart:async" as async; | 5 import "dart:async" as async; |
6 import "dart:convert" as convert; | 6 import "dart:convert" as convert; |
7 | 7 |
8 import 'package:http/http.dart' as http; | 8 import 'package:http/http.dart' as http; |
9 import 'package:http/testing.dart' as http_testing; | 9 import 'package:http/testing.dart' as http_testing; |
10 import 'package:unittest/unittest.dart' as unittest; | 10 import 'package:unittest/unittest.dart' as unittest; |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 } | 44 } |
45 } | 45 } |
46 } | 46 } |
47 | 47 |
48 http.StreamedResponse stringResponse( | 48 http.StreamedResponse stringResponse( |
49 core.int status, core.Map headers, core.String body) { | 49 core.int status, core.Map headers, core.String body) { |
50 var stream = new async.Stream.fromIterable([convert.UTF8.encode(body)]); | 50 var stream = new async.Stream.fromIterable([convert.UTF8.encode(body)]); |
51 return new http.StreamedResponse(stream, status, headers: headers); | 51 return new http.StreamedResponse(stream, status, headers: headers); |
52 } | 52 } |
53 | 53 |
54 buildUnnamed1341() { | 54 buildUnnamed1394() { |
| 55 var o = new core.List<api.Image>(); |
| 56 o.add(buildImage()); |
| 57 o.add(buildImage()); |
| 58 return o; |
| 59 } |
| 60 |
| 61 checkUnnamed1394(core.List<api.Image> o) { |
| 62 unittest.expect(o, unittest.hasLength(2)); |
| 63 checkImage(o[0]); |
| 64 checkImage(o[1]); |
| 65 } |
| 66 |
| 67 buildUnnamed1395() { |
| 68 var o = new core.List<api.FeatureDescription>(); |
| 69 o.add(buildFeatureDescription()); |
| 70 o.add(buildFeatureDescription()); |
| 71 return o; |
| 72 } |
| 73 |
| 74 checkUnnamed1395(core.List<api.FeatureDescription> o) { |
| 75 unittest.expect(o, unittest.hasLength(2)); |
| 76 checkFeatureDescription(o[0]); |
| 77 checkFeatureDescription(o[1]); |
| 78 } |
| 79 |
| 80 buildUnnamed1396() { |
55 var o = new core.List<core.String>(); | 81 var o = new core.List<core.String>(); |
56 o.add("foo"); | 82 o.add("foo"); |
57 o.add("foo"); | 83 o.add("foo"); |
58 return o; | 84 return o; |
59 } | 85 } |
60 | 86 |
61 checkUnnamed1341(core.List<core.String> o) { | 87 checkUnnamed1396(core.List<core.String> o) { |
62 unittest.expect(o, unittest.hasLength(2)); | 88 unittest.expect(o, unittest.hasLength(2)); |
63 unittest.expect(o[0], unittest.equals('foo')); | 89 unittest.expect(o[0], unittest.equals('foo')); |
64 unittest.expect(o[1], unittest.equals('foo')); | 90 unittest.expect(o[1], unittest.equals('foo')); |
65 } | 91 } |
66 | 92 |
67 buildUnnamed1342() { | 93 buildUnnamed1397() { |
| 94 var o = new core.List<api.ProductDetail>(); |
| 95 o.add(buildProductDetail()); |
| 96 o.add(buildProductDetail()); |
| 97 return o; |
| 98 } |
| 99 |
| 100 checkUnnamed1397(core.List<api.ProductDetail> o) { |
| 101 unittest.expect(o, unittest.hasLength(2)); |
| 102 checkProductDetail(o[0]); |
| 103 checkProductDetail(o[1]); |
| 104 } |
| 105 |
| 106 buildUnnamed1398() { |
68 var o = new core.List<core.String>(); | 107 var o = new core.List<core.String>(); |
69 o.add("foo"); | 108 o.add("foo"); |
70 o.add("foo"); | 109 o.add("foo"); |
71 return o; | 110 return o; |
72 } | 111 } |
73 | 112 |
74 checkUnnamed1342(core.List<core.String> o) { | 113 checkUnnamed1398(core.List<core.String> o) { |
75 unittest.expect(o, unittest.hasLength(2)); | 114 unittest.expect(o, unittest.hasLength(2)); |
76 unittest.expect(o[0], unittest.equals('foo')); | 115 unittest.expect(o[0], unittest.equals('foo')); |
77 unittest.expect(o[1], unittest.equals('foo')); | 116 unittest.expect(o[1], unittest.equals('foo')); |
| 117 } |
| 118 |
| 119 buildUnnamed1399() { |
| 120 var o = new core.List<core.String>(); |
| 121 o.add("foo"); |
| 122 o.add("foo"); |
| 123 return o; |
| 124 } |
| 125 |
| 126 checkUnnamed1399(core.List<core.String> o) { |
| 127 unittest.expect(o, unittest.hasLength(2)); |
| 128 unittest.expect(o[0], unittest.equals('foo')); |
| 129 unittest.expect(o[1], unittest.equals('foo')); |
78 } | 130 } |
79 | 131 |
80 core.int buildCounterAttributes = 0; | 132 core.int buildCounterAttributes = 0; |
81 buildAttributes() { | 133 buildAttributes() { |
82 var o = new api.Attributes(); | 134 var o = new api.Attributes(); |
83 buildCounterAttributes++; | 135 buildCounterAttributes++; |
84 if (buildCounterAttributes < 3) { | 136 if (buildCounterAttributes < 3) { |
| 137 o.additionalImageLink = buildUnnamed1394(); |
| 138 o.ageGroup = "foo"; |
85 o.brand = "foo"; | 139 o.brand = "foo"; |
86 o.gtin = buildUnnamed1341(); | 140 o.capacity = buildCapacity(); |
| 141 o.color = "foo"; |
| 142 o.count = buildCount(); |
| 143 o.description = "foo"; |
| 144 o.disclosureDate = "foo"; |
| 145 o.featureDescription = buildUnnamed1395(); |
| 146 o.flavor = "foo"; |
| 147 o.format = "foo"; |
| 148 o.gender = "foo"; |
| 149 o.gtin = buildUnnamed1396(); |
| 150 o.imageLink = buildImage(); |
| 151 o.itemGroupId = "foo"; |
| 152 o.material = "foo"; |
87 o.mpn = "foo"; | 153 o.mpn = "foo"; |
| 154 o.pattern = "foo"; |
| 155 o.productDetail = buildUnnamed1397(); |
88 o.productLine = "foo"; | 156 o.productLine = "foo"; |
89 o.productName = "foo"; | 157 o.productName = "foo"; |
90 o.productPageUrl = "foo"; | 158 o.productPageUrl = "foo"; |
91 o.productType = buildUnnamed1342(); | 159 o.productType = buildUnnamed1398(); |
| 160 o.releaseDate = "foo"; |
| 161 o.scent = "foo"; |
| 162 o.size = "foo"; |
| 163 o.sizeSystem = "foo"; |
| 164 o.sizeType = "foo"; |
| 165 o.suggestedRetailPrice = buildPrice(); |
| 166 o.theme = "foo"; |
92 o.title = "foo"; | 167 o.title = "foo"; |
| 168 o.videoLink = buildUnnamed1399(); |
93 } | 169 } |
94 buildCounterAttributes--; | 170 buildCounterAttributes--; |
95 return o; | 171 return o; |
96 } | 172 } |
97 | 173 |
98 checkAttributes(api.Attributes o) { | 174 checkAttributes(api.Attributes o) { |
99 buildCounterAttributes++; | 175 buildCounterAttributes++; |
100 if (buildCounterAttributes < 3) { | 176 if (buildCounterAttributes < 3) { |
| 177 checkUnnamed1394(o.additionalImageLink); |
| 178 unittest.expect(o.ageGroup, unittest.equals('foo')); |
101 unittest.expect(o.brand, unittest.equals('foo')); | 179 unittest.expect(o.brand, unittest.equals('foo')); |
102 checkUnnamed1341(o.gtin); | 180 checkCapacity(o.capacity); |
| 181 unittest.expect(o.color, unittest.equals('foo')); |
| 182 checkCount(o.count); |
| 183 unittest.expect(o.description, unittest.equals('foo')); |
| 184 unittest.expect(o.disclosureDate, unittest.equals('foo')); |
| 185 checkUnnamed1395(o.featureDescription); |
| 186 unittest.expect(o.flavor, unittest.equals('foo')); |
| 187 unittest.expect(o.format, unittest.equals('foo')); |
| 188 unittest.expect(o.gender, unittest.equals('foo')); |
| 189 checkUnnamed1396(o.gtin); |
| 190 checkImage(o.imageLink); |
| 191 unittest.expect(o.itemGroupId, unittest.equals('foo')); |
| 192 unittest.expect(o.material, unittest.equals('foo')); |
103 unittest.expect(o.mpn, unittest.equals('foo')); | 193 unittest.expect(o.mpn, unittest.equals('foo')); |
| 194 unittest.expect(o.pattern, unittest.equals('foo')); |
| 195 checkUnnamed1397(o.productDetail); |
104 unittest.expect(o.productLine, unittest.equals('foo')); | 196 unittest.expect(o.productLine, unittest.equals('foo')); |
105 unittest.expect(o.productName, unittest.equals('foo')); | 197 unittest.expect(o.productName, unittest.equals('foo')); |
106 unittest.expect(o.productPageUrl, unittest.equals('foo')); | 198 unittest.expect(o.productPageUrl, unittest.equals('foo')); |
107 checkUnnamed1342(o.productType); | 199 checkUnnamed1398(o.productType); |
| 200 unittest.expect(o.releaseDate, unittest.equals('foo')); |
| 201 unittest.expect(o.scent, unittest.equals('foo')); |
| 202 unittest.expect(o.size, unittest.equals('foo')); |
| 203 unittest.expect(o.sizeSystem, unittest.equals('foo')); |
| 204 unittest.expect(o.sizeType, unittest.equals('foo')); |
| 205 checkPrice(o.suggestedRetailPrice); |
| 206 unittest.expect(o.theme, unittest.equals('foo')); |
108 unittest.expect(o.title, unittest.equals('foo')); | 207 unittest.expect(o.title, unittest.equals('foo')); |
| 208 checkUnnamed1399(o.videoLink); |
109 } | 209 } |
110 buildCounterAttributes--; | 210 buildCounterAttributes--; |
111 } | 211 } |
112 | 212 |
| 213 core.int buildCounterCapacity = 0; |
| 214 buildCapacity() { |
| 215 var o = new api.Capacity(); |
| 216 buildCounterCapacity++; |
| 217 if (buildCounterCapacity < 3) { |
| 218 o.unit = "foo"; |
| 219 o.value = "foo"; |
| 220 } |
| 221 buildCounterCapacity--; |
| 222 return o; |
| 223 } |
| 224 |
| 225 checkCapacity(api.Capacity o) { |
| 226 buildCounterCapacity++; |
| 227 if (buildCounterCapacity < 3) { |
| 228 unittest.expect(o.unit, unittest.equals('foo')); |
| 229 unittest.expect(o.value, unittest.equals('foo')); |
| 230 } |
| 231 buildCounterCapacity--; |
| 232 } |
| 233 |
| 234 core.int buildCounterCount = 0; |
| 235 buildCount() { |
| 236 var o = new api.Count(); |
| 237 buildCounterCount++; |
| 238 if (buildCounterCount < 3) { |
| 239 o.unit = "foo"; |
| 240 o.value = "foo"; |
| 241 } |
| 242 buildCounterCount--; |
| 243 return o; |
| 244 } |
| 245 |
| 246 checkCount(api.Count o) { |
| 247 buildCounterCount++; |
| 248 if (buildCounterCount < 3) { |
| 249 unittest.expect(o.unit, unittest.equals('foo')); |
| 250 unittest.expect(o.value, unittest.equals('foo')); |
| 251 } |
| 252 buildCounterCount--; |
| 253 } |
| 254 |
| 255 core.int buildCounterFeatureDescription = 0; |
| 256 buildFeatureDescription() { |
| 257 var o = new api.FeatureDescription(); |
| 258 buildCounterFeatureDescription++; |
| 259 if (buildCounterFeatureDescription < 3) { |
| 260 o.headline = "foo"; |
| 261 o.image = buildImage(); |
| 262 o.text = "foo"; |
| 263 } |
| 264 buildCounterFeatureDescription--; |
| 265 return o; |
| 266 } |
| 267 |
| 268 checkFeatureDescription(api.FeatureDescription o) { |
| 269 buildCounterFeatureDescription++; |
| 270 if (buildCounterFeatureDescription < 3) { |
| 271 unittest.expect(o.headline, unittest.equals('foo')); |
| 272 checkImage(o.image); |
| 273 unittest.expect(o.text, unittest.equals('foo')); |
| 274 } |
| 275 buildCounterFeatureDescription--; |
| 276 } |
| 277 |
| 278 core.int buildCounterImage = 0; |
| 279 buildImage() { |
| 280 var o = new api.Image(); |
| 281 buildCounterImage++; |
| 282 if (buildCounterImage < 3) { |
| 283 o.imageUrl = "foo"; |
| 284 o.status = "foo"; |
| 285 o.type = "foo"; |
| 286 } |
| 287 buildCounterImage--; |
| 288 return o; |
| 289 } |
| 290 |
| 291 checkImage(api.Image o) { |
| 292 buildCounterImage++; |
| 293 if (buildCounterImage < 3) { |
| 294 unittest.expect(o.imageUrl, unittest.equals('foo')); |
| 295 unittest.expect(o.status, unittest.equals('foo')); |
| 296 unittest.expect(o.type, unittest.equals('foo')); |
| 297 } |
| 298 buildCounterImage--; |
| 299 } |
| 300 |
113 core.int buildCounterIssue = 0; | 301 core.int buildCounterIssue = 0; |
114 buildIssue() { | 302 buildIssue() { |
115 var o = new api.Issue(); | 303 var o = new api.Issue(); |
116 buildCounterIssue++; | 304 buildCounterIssue++; |
117 if (buildCounterIssue < 3) { | 305 if (buildCounterIssue < 3) { |
118 o.attribute = "foo"; | 306 o.attribute = "foo"; |
119 o.description = "foo"; | 307 o.description = "foo"; |
120 o.severity = "foo"; | 308 o.severity = "foo"; |
| 309 o.timestamp = "foo"; |
121 o.type = "foo"; | 310 o.type = "foo"; |
122 } | 311 } |
123 buildCounterIssue--; | 312 buildCounterIssue--; |
124 return o; | 313 return o; |
125 } | 314 } |
126 | 315 |
127 checkIssue(api.Issue o) { | 316 checkIssue(api.Issue o) { |
128 buildCounterIssue++; | 317 buildCounterIssue++; |
129 if (buildCounterIssue < 3) { | 318 if (buildCounterIssue < 3) { |
130 unittest.expect(o.attribute, unittest.equals('foo')); | 319 unittest.expect(o.attribute, unittest.equals('foo')); |
131 unittest.expect(o.description, unittest.equals('foo')); | 320 unittest.expect(o.description, unittest.equals('foo')); |
132 unittest.expect(o.severity, unittest.equals('foo')); | 321 unittest.expect(o.severity, unittest.equals('foo')); |
| 322 unittest.expect(o.timestamp, unittest.equals('foo')); |
133 unittest.expect(o.type, unittest.equals('foo')); | 323 unittest.expect(o.type, unittest.equals('foo')); |
134 } | 324 } |
135 buildCounterIssue--; | 325 buildCounterIssue--; |
136 } | 326 } |
137 | 327 |
138 buildUnnamed1343() { | 328 buildUnnamed1400() { |
139 var o = new core.List<api.Product>(); | 329 var o = new core.List<api.Product>(); |
140 o.add(buildProduct()); | 330 o.add(buildProduct()); |
141 o.add(buildProduct()); | 331 o.add(buildProduct()); |
142 return o; | 332 return o; |
143 } | 333 } |
144 | 334 |
145 checkUnnamed1343(core.List<api.Product> o) { | 335 checkUnnamed1400(core.List<api.Product> o) { |
146 unittest.expect(o, unittest.hasLength(2)); | 336 unittest.expect(o, unittest.hasLength(2)); |
147 checkProduct(o[0]); | 337 checkProduct(o[0]); |
148 checkProduct(o[1]); | 338 checkProduct(o[1]); |
149 } | 339 } |
150 | 340 |
151 core.int buildCounterListProductsResponse = 0; | 341 core.int buildCounterListProductsResponse = 0; |
152 buildListProductsResponse() { | 342 buildListProductsResponse() { |
153 var o = new api.ListProductsResponse(); | 343 var o = new api.ListProductsResponse(); |
154 buildCounterListProductsResponse++; | 344 buildCounterListProductsResponse++; |
155 if (buildCounterListProductsResponse < 3) { | 345 if (buildCounterListProductsResponse < 3) { |
156 o.nextPageToken = "foo"; | 346 o.nextPageToken = "foo"; |
157 o.products = buildUnnamed1343(); | 347 o.products = buildUnnamed1400(); |
158 } | 348 } |
159 buildCounterListProductsResponse--; | 349 buildCounterListProductsResponse--; |
160 return o; | 350 return o; |
161 } | 351 } |
162 | 352 |
163 checkListProductsResponse(api.ListProductsResponse o) { | 353 checkListProductsResponse(api.ListProductsResponse o) { |
164 buildCounterListProductsResponse++; | 354 buildCounterListProductsResponse++; |
165 if (buildCounterListProductsResponse < 3) { | 355 if (buildCounterListProductsResponse < 3) { |
166 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 356 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
167 checkUnnamed1343(o.products); | 357 checkUnnamed1400(o.products); |
168 } | 358 } |
169 buildCounterListProductsResponse--; | 359 buildCounterListProductsResponse--; |
170 } | 360 } |
171 | 361 |
172 buildUnnamed1344() { | 362 core.int buildCounterPrice = 0; |
| 363 buildPrice() { |
| 364 var o = new api.Price(); |
| 365 buildCounterPrice++; |
| 366 if (buildCounterPrice < 3) { |
| 367 o.amount = "foo"; |
| 368 o.currency = "foo"; |
| 369 } |
| 370 buildCounterPrice--; |
| 371 return o; |
| 372 } |
| 373 |
| 374 checkPrice(api.Price o) { |
| 375 buildCounterPrice++; |
| 376 if (buildCounterPrice < 3) { |
| 377 unittest.expect(o.amount, unittest.equals('foo')); |
| 378 unittest.expect(o.currency, unittest.equals('foo')); |
| 379 } |
| 380 buildCounterPrice--; |
| 381 } |
| 382 |
| 383 buildUnnamed1401() { |
173 var o = new core.List<api.Issue>(); | 384 var o = new core.List<api.Issue>(); |
174 o.add(buildIssue()); | 385 o.add(buildIssue()); |
175 o.add(buildIssue()); | 386 o.add(buildIssue()); |
176 return o; | 387 return o; |
177 } | 388 } |
178 | 389 |
179 checkUnnamed1344(core.List<api.Issue> o) { | 390 checkUnnamed1401(core.List<api.Issue> o) { |
180 unittest.expect(o, unittest.hasLength(2)); | 391 unittest.expect(o, unittest.hasLength(2)); |
181 checkIssue(o[0]); | 392 checkIssue(o[0]); |
182 checkIssue(o[1]); | 393 checkIssue(o[1]); |
183 } | 394 } |
184 | 395 |
185 buildUnnamed1345() { | 396 buildUnnamed1402() { |
186 var o = new core.List<core.String>(); | 397 var o = new core.List<core.String>(); |
187 o.add("foo"); | 398 o.add("foo"); |
188 o.add("foo"); | 399 o.add("foo"); |
189 return o; | 400 return o; |
190 } | 401 } |
191 | 402 |
192 checkUnnamed1345(core.List<core.String> o) { | 403 checkUnnamed1402(core.List<core.String> o) { |
193 unittest.expect(o, unittest.hasLength(2)); | 404 unittest.expect(o, unittest.hasLength(2)); |
194 unittest.expect(o[0], unittest.equals('foo')); | 405 unittest.expect(o[0], unittest.equals('foo')); |
195 unittest.expect(o[1], unittest.equals('foo')); | 406 unittest.expect(o[1], unittest.equals('foo')); |
196 } | 407 } |
197 | 408 |
198 core.int buildCounterProduct = 0; | 409 core.int buildCounterProduct = 0; |
199 buildProduct() { | 410 buildProduct() { |
200 var o = new api.Product(); | 411 var o = new api.Product(); |
201 buildCounterProduct++; | 412 buildCounterProduct++; |
202 if (buildCounterProduct < 3) { | 413 if (buildCounterProduct < 3) { |
203 o.contentLanguage = "foo"; | 414 o.contentLanguage = "foo"; |
204 o.finalAttributes = buildAttributes(); | 415 o.finalAttributes = buildAttributes(); |
205 o.issues = buildUnnamed1344(); | 416 o.issues = buildUnnamed1401(); |
206 o.manuallyDeletedAttributes = buildUnnamed1345(); | 417 o.manuallyDeletedAttributes = buildUnnamed1402(); |
207 o.manuallyProvidedAttributes = buildAttributes(); | 418 o.manuallyProvidedAttributes = buildAttributes(); |
208 o.name = "foo"; | 419 o.name = "foo"; |
209 o.parent = "foo"; | 420 o.parent = "foo"; |
210 o.productId = "foo"; | 421 o.productId = "foo"; |
211 o.targetCountry = "foo"; | 422 o.targetCountry = "foo"; |
212 o.uploadedAttributes = buildAttributes(); | 423 o.uploadedAttributes = buildAttributes(); |
213 } | 424 } |
214 buildCounterProduct--; | 425 buildCounterProduct--; |
215 return o; | 426 return o; |
216 } | 427 } |
217 | 428 |
218 checkProduct(api.Product o) { | 429 checkProduct(api.Product o) { |
219 buildCounterProduct++; | 430 buildCounterProduct++; |
220 if (buildCounterProduct < 3) { | 431 if (buildCounterProduct < 3) { |
221 unittest.expect(o.contentLanguage, unittest.equals('foo')); | 432 unittest.expect(o.contentLanguage, unittest.equals('foo')); |
222 checkAttributes(o.finalAttributes); | 433 checkAttributes(o.finalAttributes); |
223 checkUnnamed1344(o.issues); | 434 checkUnnamed1401(o.issues); |
224 checkUnnamed1345(o.manuallyDeletedAttributes); | 435 checkUnnamed1402(o.manuallyDeletedAttributes); |
225 checkAttributes(o.manuallyProvidedAttributes); | 436 checkAttributes(o.manuallyProvidedAttributes); |
226 unittest.expect(o.name, unittest.equals('foo')); | 437 unittest.expect(o.name, unittest.equals('foo')); |
227 unittest.expect(o.parent, unittest.equals('foo')); | 438 unittest.expect(o.parent, unittest.equals('foo')); |
228 unittest.expect(o.productId, unittest.equals('foo')); | 439 unittest.expect(o.productId, unittest.equals('foo')); |
229 unittest.expect(o.targetCountry, unittest.equals('foo')); | 440 unittest.expect(o.targetCountry, unittest.equals('foo')); |
230 checkAttributes(o.uploadedAttributes); | 441 checkAttributes(o.uploadedAttributes); |
231 } | 442 } |
232 buildCounterProduct--; | 443 buildCounterProduct--; |
233 } | 444 } |
234 | 445 |
| 446 core.int buildCounterProductDetail = 0; |
| 447 buildProductDetail() { |
| 448 var o = new api.ProductDetail(); |
| 449 buildCounterProductDetail++; |
| 450 if (buildCounterProductDetail < 3) { |
| 451 o.attributeName = "foo"; |
| 452 o.attributeValue = "foo"; |
| 453 o.sectionName = "foo"; |
| 454 } |
| 455 buildCounterProductDetail--; |
| 456 return o; |
| 457 } |
| 458 |
| 459 checkProductDetail(api.ProductDetail o) { |
| 460 buildCounterProductDetail++; |
| 461 if (buildCounterProductDetail < 3) { |
| 462 unittest.expect(o.attributeName, unittest.equals('foo')); |
| 463 unittest.expect(o.attributeValue, unittest.equals('foo')); |
| 464 unittest.expect(o.sectionName, unittest.equals('foo')); |
| 465 } |
| 466 buildCounterProductDetail--; |
| 467 } |
| 468 |
235 | 469 |
236 main() { | 470 main() { |
237 unittest.group("obj-schema-Attributes", () { | 471 unittest.group("obj-schema-Attributes", () { |
238 unittest.test("to-json--from-json", () { | 472 unittest.test("to-json--from-json", () { |
239 var o = buildAttributes(); | 473 var o = buildAttributes(); |
240 var od = new api.Attributes.fromJson(o.toJson()); | 474 var od = new api.Attributes.fromJson(o.toJson()); |
241 checkAttributes(od); | 475 checkAttributes(od); |
242 }); | 476 }); |
243 }); | 477 }); |
244 | 478 |
245 | 479 |
| 480 unittest.group("obj-schema-Capacity", () { |
| 481 unittest.test("to-json--from-json", () { |
| 482 var o = buildCapacity(); |
| 483 var od = new api.Capacity.fromJson(o.toJson()); |
| 484 checkCapacity(od); |
| 485 }); |
| 486 }); |
| 487 |
| 488 |
| 489 unittest.group("obj-schema-Count", () { |
| 490 unittest.test("to-json--from-json", () { |
| 491 var o = buildCount(); |
| 492 var od = new api.Count.fromJson(o.toJson()); |
| 493 checkCount(od); |
| 494 }); |
| 495 }); |
| 496 |
| 497 |
| 498 unittest.group("obj-schema-FeatureDescription", () { |
| 499 unittest.test("to-json--from-json", () { |
| 500 var o = buildFeatureDescription(); |
| 501 var od = new api.FeatureDescription.fromJson(o.toJson()); |
| 502 checkFeatureDescription(od); |
| 503 }); |
| 504 }); |
| 505 |
| 506 |
| 507 unittest.group("obj-schema-Image", () { |
| 508 unittest.test("to-json--from-json", () { |
| 509 var o = buildImage(); |
| 510 var od = new api.Image.fromJson(o.toJson()); |
| 511 checkImage(od); |
| 512 }); |
| 513 }); |
| 514 |
| 515 |
246 unittest.group("obj-schema-Issue", () { | 516 unittest.group("obj-schema-Issue", () { |
247 unittest.test("to-json--from-json", () { | 517 unittest.test("to-json--from-json", () { |
248 var o = buildIssue(); | 518 var o = buildIssue(); |
249 var od = new api.Issue.fromJson(o.toJson()); | 519 var od = new api.Issue.fromJson(o.toJson()); |
250 checkIssue(od); | 520 checkIssue(od); |
251 }); | 521 }); |
252 }); | 522 }); |
253 | 523 |
254 | 524 |
255 unittest.group("obj-schema-ListProductsResponse", () { | 525 unittest.group("obj-schema-ListProductsResponse", () { |
256 unittest.test("to-json--from-json", () { | 526 unittest.test("to-json--from-json", () { |
257 var o = buildListProductsResponse(); | 527 var o = buildListProductsResponse(); |
258 var od = new api.ListProductsResponse.fromJson(o.toJson()); | 528 var od = new api.ListProductsResponse.fromJson(o.toJson()); |
259 checkListProductsResponse(od); | 529 checkListProductsResponse(od); |
260 }); | 530 }); |
261 }); | 531 }); |
262 | 532 |
263 | 533 |
| 534 unittest.group("obj-schema-Price", () { |
| 535 unittest.test("to-json--from-json", () { |
| 536 var o = buildPrice(); |
| 537 var od = new api.Price.fromJson(o.toJson()); |
| 538 checkPrice(od); |
| 539 }); |
| 540 }); |
| 541 |
| 542 |
264 unittest.group("obj-schema-Product", () { | 543 unittest.group("obj-schema-Product", () { |
265 unittest.test("to-json--from-json", () { | 544 unittest.test("to-json--from-json", () { |
266 var o = buildProduct(); | 545 var o = buildProduct(); |
267 var od = new api.Product.fromJson(o.toJson()); | 546 var od = new api.Product.fromJson(o.toJson()); |
268 checkProduct(od); | 547 checkProduct(od); |
269 }); | 548 }); |
270 }); | 549 }); |
271 | 550 |
272 | 551 |
| 552 unittest.group("obj-schema-ProductDetail", () { |
| 553 unittest.test("to-json--from-json", () { |
| 554 var o = buildProductDetail(); |
| 555 var od = new api.ProductDetail.fromJson(o.toJson()); |
| 556 checkProductDetail(od); |
| 557 }); |
| 558 }); |
| 559 |
| 560 |
273 unittest.group("resource-AccountsProductsResourceApi", () { | 561 unittest.group("resource-AccountsProductsResourceApi", () { |
274 unittest.test("method--get", () { | 562 unittest.test("method--get", () { |
275 | 563 |
276 var mock = new HttpServerMock(); | 564 var mock = new HttpServerMock(); |
277 api.AccountsProductsResourceApi res = new api.ManufacturersApi(mock).accou
nts.products; | 565 api.AccountsProductsResourceApi res = new api.ManufacturersApi(mock).accou
nts.products; |
278 var arg_parent = "foo"; | 566 var arg_parent = "foo"; |
279 var arg_name = "foo"; | 567 var arg_name = "foo"; |
280 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 568 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
281 var path = (req.url).path; | 569 var path = (req.url).path; |
282 var pathOffset = 0; | 570 var pathOffset = 0; |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
364 res.list(arg_parent, pageToken: arg_pageToken, pageSize: arg_pageSize).the
n(unittest.expectAsync(((api.ListProductsResponse response) { | 652 res.list(arg_parent, pageToken: arg_pageToken, pageSize: arg_pageSize).the
n(unittest.expectAsync(((api.ListProductsResponse response) { |
365 checkListProductsResponse(response); | 653 checkListProductsResponse(response); |
366 }))); | 654 }))); |
367 }); | 655 }); |
368 | 656 |
369 }); | 657 }); |
370 | 658 |
371 | 659 |
372 } | 660 } |
373 | 661 |
OLD | NEW |