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 buildUnnamed1576() { | 54 buildUnnamed1341() { |
55 var o = new core.List<core.String>(); | 55 var o = new core.List<core.String>(); |
56 o.add("foo"); | 56 o.add("foo"); |
57 o.add("foo"); | 57 o.add("foo"); |
58 return o; | 58 return o; |
59 } | 59 } |
60 | 60 |
61 checkUnnamed1576(core.List<core.String> o) { | 61 checkUnnamed1341(core.List<core.String> o) { |
62 unittest.expect(o, unittest.hasLength(2)); | 62 unittest.expect(o, unittest.hasLength(2)); |
63 unittest.expect(o[0], unittest.equals('foo')); | 63 unittest.expect(o[0], unittest.equals('foo')); |
64 unittest.expect(o[1], unittest.equals('foo')); | 64 unittest.expect(o[1], unittest.equals('foo')); |
65 } | 65 } |
66 | 66 |
67 buildUnnamed1577() { | 67 buildUnnamed1342() { |
68 var o = new core.List<core.String>(); | 68 var o = new core.List<core.String>(); |
69 o.add("foo"); | 69 o.add("foo"); |
70 o.add("foo"); | 70 o.add("foo"); |
71 return o; | 71 return o; |
72 } | 72 } |
73 | 73 |
74 checkUnnamed1577(core.List<core.String> o) { | 74 checkUnnamed1342(core.List<core.String> o) { |
75 unittest.expect(o, unittest.hasLength(2)); | 75 unittest.expect(o, unittest.hasLength(2)); |
76 unittest.expect(o[0], unittest.equals('foo')); | 76 unittest.expect(o[0], unittest.equals('foo')); |
77 unittest.expect(o[1], unittest.equals('foo')); | 77 unittest.expect(o[1], unittest.equals('foo')); |
78 } | 78 } |
79 | 79 |
80 core.int buildCounterAttributes = 0; | 80 core.int buildCounterAttributes = 0; |
81 buildAttributes() { | 81 buildAttributes() { |
82 var o = new api.Attributes(); | 82 var o = new api.Attributes(); |
83 buildCounterAttributes++; | 83 buildCounterAttributes++; |
84 if (buildCounterAttributes < 3) { | 84 if (buildCounterAttributes < 3) { |
85 o.brand = "foo"; | 85 o.brand = "foo"; |
86 o.gtin = buildUnnamed1576(); | 86 o.gtin = buildUnnamed1341(); |
87 o.mpn = "foo"; | 87 o.mpn = "foo"; |
88 o.productLine = "foo"; | 88 o.productLine = "foo"; |
89 o.productName = "foo"; | 89 o.productName = "foo"; |
90 o.productPageUrl = "foo"; | 90 o.productPageUrl = "foo"; |
91 o.productType = buildUnnamed1577(); | 91 o.productType = buildUnnamed1342(); |
92 o.title = "foo"; | 92 o.title = "foo"; |
93 } | 93 } |
94 buildCounterAttributes--; | 94 buildCounterAttributes--; |
95 return o; | 95 return o; |
96 } | 96 } |
97 | 97 |
98 checkAttributes(api.Attributes o) { | 98 checkAttributes(api.Attributes o) { |
99 buildCounterAttributes++; | 99 buildCounterAttributes++; |
100 if (buildCounterAttributes < 3) { | 100 if (buildCounterAttributes < 3) { |
101 unittest.expect(o.brand, unittest.equals('foo')); | 101 unittest.expect(o.brand, unittest.equals('foo')); |
102 checkUnnamed1576(o.gtin); | 102 checkUnnamed1341(o.gtin); |
103 unittest.expect(o.mpn, unittest.equals('foo')); | 103 unittest.expect(o.mpn, unittest.equals('foo')); |
104 unittest.expect(o.productLine, unittest.equals('foo')); | 104 unittest.expect(o.productLine, unittest.equals('foo')); |
105 unittest.expect(o.productName, unittest.equals('foo')); | 105 unittest.expect(o.productName, unittest.equals('foo')); |
106 unittest.expect(o.productPageUrl, unittest.equals('foo')); | 106 unittest.expect(o.productPageUrl, unittest.equals('foo')); |
107 checkUnnamed1577(o.productType); | 107 checkUnnamed1342(o.productType); |
108 unittest.expect(o.title, unittest.equals('foo')); | 108 unittest.expect(o.title, unittest.equals('foo')); |
109 } | 109 } |
110 buildCounterAttributes--; | 110 buildCounterAttributes--; |
111 } | 111 } |
112 | 112 |
113 core.int buildCounterIssue = 0; | 113 core.int buildCounterIssue = 0; |
114 buildIssue() { | 114 buildIssue() { |
115 var o = new api.Issue(); | 115 var o = new api.Issue(); |
116 buildCounterIssue++; | 116 buildCounterIssue++; |
117 if (buildCounterIssue < 3) { | 117 if (buildCounterIssue < 3) { |
(...skipping 10 matching lines...) Expand all Loading... |
128 buildCounterIssue++; | 128 buildCounterIssue++; |
129 if (buildCounterIssue < 3) { | 129 if (buildCounterIssue < 3) { |
130 unittest.expect(o.attribute, unittest.equals('foo')); | 130 unittest.expect(o.attribute, unittest.equals('foo')); |
131 unittest.expect(o.description, unittest.equals('foo')); | 131 unittest.expect(o.description, unittest.equals('foo')); |
132 unittest.expect(o.severity, unittest.equals('foo')); | 132 unittest.expect(o.severity, unittest.equals('foo')); |
133 unittest.expect(o.type, unittest.equals('foo')); | 133 unittest.expect(o.type, unittest.equals('foo')); |
134 } | 134 } |
135 buildCounterIssue--; | 135 buildCounterIssue--; |
136 } | 136 } |
137 | 137 |
138 buildUnnamed1578() { | 138 buildUnnamed1343() { |
139 var o = new core.List<api.Product>(); | 139 var o = new core.List<api.Product>(); |
140 o.add(buildProduct()); | 140 o.add(buildProduct()); |
141 o.add(buildProduct()); | 141 o.add(buildProduct()); |
142 return o; | 142 return o; |
143 } | 143 } |
144 | 144 |
145 checkUnnamed1578(core.List<api.Product> o) { | 145 checkUnnamed1343(core.List<api.Product> o) { |
146 unittest.expect(o, unittest.hasLength(2)); | 146 unittest.expect(o, unittest.hasLength(2)); |
147 checkProduct(o[0]); | 147 checkProduct(o[0]); |
148 checkProduct(o[1]); | 148 checkProduct(o[1]); |
149 } | 149 } |
150 | 150 |
151 core.int buildCounterListProductsResponse = 0; | 151 core.int buildCounterListProductsResponse = 0; |
152 buildListProductsResponse() { | 152 buildListProductsResponse() { |
153 var o = new api.ListProductsResponse(); | 153 var o = new api.ListProductsResponse(); |
154 buildCounterListProductsResponse++; | 154 buildCounterListProductsResponse++; |
155 if (buildCounterListProductsResponse < 3) { | 155 if (buildCounterListProductsResponse < 3) { |
156 o.nextPageToken = "foo"; | 156 o.nextPageToken = "foo"; |
157 o.products = buildUnnamed1578(); | 157 o.products = buildUnnamed1343(); |
158 } | 158 } |
159 buildCounterListProductsResponse--; | 159 buildCounterListProductsResponse--; |
160 return o; | 160 return o; |
161 } | 161 } |
162 | 162 |
163 checkListProductsResponse(api.ListProductsResponse o) { | 163 checkListProductsResponse(api.ListProductsResponse o) { |
164 buildCounterListProductsResponse++; | 164 buildCounterListProductsResponse++; |
165 if (buildCounterListProductsResponse < 3) { | 165 if (buildCounterListProductsResponse < 3) { |
166 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 166 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
167 checkUnnamed1578(o.products); | 167 checkUnnamed1343(o.products); |
168 } | 168 } |
169 buildCounterListProductsResponse--; | 169 buildCounterListProductsResponse--; |
170 } | 170 } |
171 | 171 |
172 buildUnnamed1579() { | 172 buildUnnamed1344() { |
173 var o = new core.List<api.Issue>(); | 173 var o = new core.List<api.Issue>(); |
174 o.add(buildIssue()); | 174 o.add(buildIssue()); |
175 o.add(buildIssue()); | 175 o.add(buildIssue()); |
176 return o; | 176 return o; |
177 } | 177 } |
178 | 178 |
179 checkUnnamed1579(core.List<api.Issue> o) { | 179 checkUnnamed1344(core.List<api.Issue> o) { |
180 unittest.expect(o, unittest.hasLength(2)); | 180 unittest.expect(o, unittest.hasLength(2)); |
181 checkIssue(o[0]); | 181 checkIssue(o[0]); |
182 checkIssue(o[1]); | 182 checkIssue(o[1]); |
183 } | 183 } |
184 | 184 |
185 buildUnnamed1580() { | 185 buildUnnamed1345() { |
186 var o = new core.List<core.String>(); | 186 var o = new core.List<core.String>(); |
187 o.add("foo"); | 187 o.add("foo"); |
188 o.add("foo"); | 188 o.add("foo"); |
189 return o; | 189 return o; |
190 } | 190 } |
191 | 191 |
192 checkUnnamed1580(core.List<core.String> o) { | 192 checkUnnamed1345(core.List<core.String> o) { |
193 unittest.expect(o, unittest.hasLength(2)); | 193 unittest.expect(o, unittest.hasLength(2)); |
194 unittest.expect(o[0], unittest.equals('foo')); | 194 unittest.expect(o[0], unittest.equals('foo')); |
195 unittest.expect(o[1], unittest.equals('foo')); | 195 unittest.expect(o[1], unittest.equals('foo')); |
196 } | 196 } |
197 | 197 |
198 core.int buildCounterProduct = 0; | 198 core.int buildCounterProduct = 0; |
199 buildProduct() { | 199 buildProduct() { |
200 var o = new api.Product(); | 200 var o = new api.Product(); |
201 buildCounterProduct++; | 201 buildCounterProduct++; |
202 if (buildCounterProduct < 3) { | 202 if (buildCounterProduct < 3) { |
203 o.contentLanguage = "foo"; | 203 o.contentLanguage = "foo"; |
204 o.finalAttributes = buildAttributes(); | 204 o.finalAttributes = buildAttributes(); |
205 o.issues = buildUnnamed1579(); | 205 o.issues = buildUnnamed1344(); |
206 o.manuallyDeletedAttributes = buildUnnamed1580(); | 206 o.manuallyDeletedAttributes = buildUnnamed1345(); |
207 o.manuallyProvidedAttributes = buildAttributes(); | 207 o.manuallyProvidedAttributes = buildAttributes(); |
208 o.name = "foo"; | 208 o.name = "foo"; |
209 o.parent = "foo"; | 209 o.parent = "foo"; |
210 o.productId = "foo"; | 210 o.productId = "foo"; |
211 o.targetCountry = "foo"; | 211 o.targetCountry = "foo"; |
212 o.uploadedAttributes = buildAttributes(); | 212 o.uploadedAttributes = buildAttributes(); |
213 } | 213 } |
214 buildCounterProduct--; | 214 buildCounterProduct--; |
215 return o; | 215 return o; |
216 } | 216 } |
217 | 217 |
218 checkProduct(api.Product o) { | 218 checkProduct(api.Product o) { |
219 buildCounterProduct++; | 219 buildCounterProduct++; |
220 if (buildCounterProduct < 3) { | 220 if (buildCounterProduct < 3) { |
221 unittest.expect(o.contentLanguage, unittest.equals('foo')); | 221 unittest.expect(o.contentLanguage, unittest.equals('foo')); |
222 checkAttributes(o.finalAttributes); | 222 checkAttributes(o.finalAttributes); |
223 checkUnnamed1579(o.issues); | 223 checkUnnamed1344(o.issues); |
224 checkUnnamed1580(o.manuallyDeletedAttributes); | 224 checkUnnamed1345(o.manuallyDeletedAttributes); |
225 checkAttributes(o.manuallyProvidedAttributes); | 225 checkAttributes(o.manuallyProvidedAttributes); |
226 unittest.expect(o.name, unittest.equals('foo')); | 226 unittest.expect(o.name, unittest.equals('foo')); |
227 unittest.expect(o.parent, unittest.equals('foo')); | 227 unittest.expect(o.parent, unittest.equals('foo')); |
228 unittest.expect(o.productId, unittest.equals('foo')); | 228 unittest.expect(o.productId, unittest.equals('foo')); |
229 unittest.expect(o.targetCountry, unittest.equals('foo')); | 229 unittest.expect(o.targetCountry, unittest.equals('foo')); |
230 checkAttributes(o.uploadedAttributes); | 230 checkAttributes(o.uploadedAttributes); |
231 } | 231 } |
232 buildCounterProduct--; | 232 buildCounterProduct--; |
233 } | 233 } |
234 | 234 |
(...skipping 129 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) { | 364 res.list(arg_parent, pageToken: arg_pageToken, pageSize: arg_pageSize).the
n(unittest.expectAsync(((api.ListProductsResponse response) { |
365 checkListProductsResponse(response); | 365 checkListProductsResponse(response); |
366 }))); | 366 }))); |
367 }); | 367 }); |
368 | 368 |
369 }); | 369 }); |
370 | 370 |
371 | 371 |
372 } | 372 } |
373 | 373 |
OLD | NEW |