OLD | NEW |
1 library googleapis_beta.language.v1beta2.test; | 1 library googleapis_beta.language.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:test/test.dart' as unittest; | 10 import 'package:test/test.dart' as unittest; |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
65 | 65 |
66 checkAnalyzeEntitiesRequest(api.AnalyzeEntitiesRequest o) { | 66 checkAnalyzeEntitiesRequest(api.AnalyzeEntitiesRequest o) { |
67 buildCounterAnalyzeEntitiesRequest++; | 67 buildCounterAnalyzeEntitiesRequest++; |
68 if (buildCounterAnalyzeEntitiesRequest < 3) { | 68 if (buildCounterAnalyzeEntitiesRequest < 3) { |
69 checkDocument(o.document); | 69 checkDocument(o.document); |
70 unittest.expect(o.encodingType, unittest.equals('foo')); | 70 unittest.expect(o.encodingType, unittest.equals('foo')); |
71 } | 71 } |
72 buildCounterAnalyzeEntitiesRequest--; | 72 buildCounterAnalyzeEntitiesRequest--; |
73 } | 73 } |
74 | 74 |
75 buildUnnamed3340() { | 75 buildUnnamed3372() { |
76 var o = new core.List<api.Entity>(); | 76 var o = new core.List<api.Entity>(); |
77 o.add(buildEntity()); | 77 o.add(buildEntity()); |
78 o.add(buildEntity()); | 78 o.add(buildEntity()); |
79 return o; | 79 return o; |
80 } | 80 } |
81 | 81 |
82 checkUnnamed3340(core.List<api.Entity> o) { | 82 checkUnnamed3372(core.List<api.Entity> o) { |
83 unittest.expect(o, unittest.hasLength(2)); | 83 unittest.expect(o, unittest.hasLength(2)); |
84 checkEntity(o[0]); | 84 checkEntity(o[0]); |
85 checkEntity(o[1]); | 85 checkEntity(o[1]); |
86 } | 86 } |
87 | 87 |
88 core.int buildCounterAnalyzeEntitiesResponse = 0; | 88 core.int buildCounterAnalyzeEntitiesResponse = 0; |
89 buildAnalyzeEntitiesResponse() { | 89 buildAnalyzeEntitiesResponse() { |
90 var o = new api.AnalyzeEntitiesResponse(); | 90 var o = new api.AnalyzeEntitiesResponse(); |
91 buildCounterAnalyzeEntitiesResponse++; | 91 buildCounterAnalyzeEntitiesResponse++; |
92 if (buildCounterAnalyzeEntitiesResponse < 3) { | 92 if (buildCounterAnalyzeEntitiesResponse < 3) { |
93 o.entities = buildUnnamed3340(); | 93 o.entities = buildUnnamed3372(); |
94 o.language = "foo"; | 94 o.language = "foo"; |
95 } | 95 } |
96 buildCounterAnalyzeEntitiesResponse--; | 96 buildCounterAnalyzeEntitiesResponse--; |
97 return o; | 97 return o; |
98 } | 98 } |
99 | 99 |
100 checkAnalyzeEntitiesResponse(api.AnalyzeEntitiesResponse o) { | 100 checkAnalyzeEntitiesResponse(api.AnalyzeEntitiesResponse o) { |
101 buildCounterAnalyzeEntitiesResponse++; | 101 buildCounterAnalyzeEntitiesResponse++; |
102 if (buildCounterAnalyzeEntitiesResponse < 3) { | 102 if (buildCounterAnalyzeEntitiesResponse < 3) { |
103 checkUnnamed3340(o.entities); | 103 checkUnnamed3372(o.entities); |
104 unittest.expect(o.language, unittest.equals('foo')); | 104 unittest.expect(o.language, unittest.equals('foo')); |
105 } | 105 } |
106 buildCounterAnalyzeEntitiesResponse--; | 106 buildCounterAnalyzeEntitiesResponse--; |
107 } | 107 } |
108 | 108 |
109 core.int buildCounterAnalyzeEntitySentimentRequest = 0; | 109 core.int buildCounterAnalyzeEntitySentimentRequest = 0; |
110 buildAnalyzeEntitySentimentRequest() { | 110 buildAnalyzeEntitySentimentRequest() { |
111 var o = new api.AnalyzeEntitySentimentRequest(); | 111 var o = new api.AnalyzeEntitySentimentRequest(); |
112 buildCounterAnalyzeEntitySentimentRequest++; | 112 buildCounterAnalyzeEntitySentimentRequest++; |
113 if (buildCounterAnalyzeEntitySentimentRequest < 3) { | 113 if (buildCounterAnalyzeEntitySentimentRequest < 3) { |
114 o.document = buildDocument(); | 114 o.document = buildDocument(); |
115 o.encodingType = "foo"; | 115 o.encodingType = "foo"; |
116 } | 116 } |
117 buildCounterAnalyzeEntitySentimentRequest--; | 117 buildCounterAnalyzeEntitySentimentRequest--; |
118 return o; | 118 return o; |
119 } | 119 } |
120 | 120 |
121 checkAnalyzeEntitySentimentRequest(api.AnalyzeEntitySentimentRequest o) { | 121 checkAnalyzeEntitySentimentRequest(api.AnalyzeEntitySentimentRequest o) { |
122 buildCounterAnalyzeEntitySentimentRequest++; | 122 buildCounterAnalyzeEntitySentimentRequest++; |
123 if (buildCounterAnalyzeEntitySentimentRequest < 3) { | 123 if (buildCounterAnalyzeEntitySentimentRequest < 3) { |
124 checkDocument(o.document); | 124 checkDocument(o.document); |
125 unittest.expect(o.encodingType, unittest.equals('foo')); | 125 unittest.expect(o.encodingType, unittest.equals('foo')); |
126 } | 126 } |
127 buildCounterAnalyzeEntitySentimentRequest--; | 127 buildCounterAnalyzeEntitySentimentRequest--; |
128 } | 128 } |
129 | 129 |
130 buildUnnamed3341() { | 130 buildUnnamed3373() { |
131 var o = new core.List<api.Entity>(); | 131 var o = new core.List<api.Entity>(); |
132 o.add(buildEntity()); | 132 o.add(buildEntity()); |
133 o.add(buildEntity()); | 133 o.add(buildEntity()); |
134 return o; | 134 return o; |
135 } | 135 } |
136 | 136 |
137 checkUnnamed3341(core.List<api.Entity> o) { | 137 checkUnnamed3373(core.List<api.Entity> o) { |
138 unittest.expect(o, unittest.hasLength(2)); | 138 unittest.expect(o, unittest.hasLength(2)); |
139 checkEntity(o[0]); | 139 checkEntity(o[0]); |
140 checkEntity(o[1]); | 140 checkEntity(o[1]); |
141 } | 141 } |
142 | 142 |
143 core.int buildCounterAnalyzeEntitySentimentResponse = 0; | 143 core.int buildCounterAnalyzeEntitySentimentResponse = 0; |
144 buildAnalyzeEntitySentimentResponse() { | 144 buildAnalyzeEntitySentimentResponse() { |
145 var o = new api.AnalyzeEntitySentimentResponse(); | 145 var o = new api.AnalyzeEntitySentimentResponse(); |
146 buildCounterAnalyzeEntitySentimentResponse++; | 146 buildCounterAnalyzeEntitySentimentResponse++; |
147 if (buildCounterAnalyzeEntitySentimentResponse < 3) { | 147 if (buildCounterAnalyzeEntitySentimentResponse < 3) { |
148 o.entities = buildUnnamed3341(); | 148 o.entities = buildUnnamed3373(); |
149 o.language = "foo"; | 149 o.language = "foo"; |
150 } | 150 } |
151 buildCounterAnalyzeEntitySentimentResponse--; | 151 buildCounterAnalyzeEntitySentimentResponse--; |
152 return o; | 152 return o; |
153 } | 153 } |
154 | 154 |
155 checkAnalyzeEntitySentimentResponse(api.AnalyzeEntitySentimentResponse o) { | 155 checkAnalyzeEntitySentimentResponse(api.AnalyzeEntitySentimentResponse o) { |
156 buildCounterAnalyzeEntitySentimentResponse++; | 156 buildCounterAnalyzeEntitySentimentResponse++; |
157 if (buildCounterAnalyzeEntitySentimentResponse < 3) { | 157 if (buildCounterAnalyzeEntitySentimentResponse < 3) { |
158 checkUnnamed3341(o.entities); | 158 checkUnnamed3373(o.entities); |
159 unittest.expect(o.language, unittest.equals('foo')); | 159 unittest.expect(o.language, unittest.equals('foo')); |
160 } | 160 } |
161 buildCounterAnalyzeEntitySentimentResponse--; | 161 buildCounterAnalyzeEntitySentimentResponse--; |
162 } | 162 } |
163 | 163 |
164 core.int buildCounterAnalyzeSentimentRequest = 0; | 164 core.int buildCounterAnalyzeSentimentRequest = 0; |
165 buildAnalyzeSentimentRequest() { | 165 buildAnalyzeSentimentRequest() { |
166 var o = new api.AnalyzeSentimentRequest(); | 166 var o = new api.AnalyzeSentimentRequest(); |
167 buildCounterAnalyzeSentimentRequest++; | 167 buildCounterAnalyzeSentimentRequest++; |
168 if (buildCounterAnalyzeSentimentRequest < 3) { | 168 if (buildCounterAnalyzeSentimentRequest < 3) { |
169 o.document = buildDocument(); | 169 o.document = buildDocument(); |
170 o.encodingType = "foo"; | 170 o.encodingType = "foo"; |
171 } | 171 } |
172 buildCounterAnalyzeSentimentRequest--; | 172 buildCounterAnalyzeSentimentRequest--; |
173 return o; | 173 return o; |
174 } | 174 } |
175 | 175 |
176 checkAnalyzeSentimentRequest(api.AnalyzeSentimentRequest o) { | 176 checkAnalyzeSentimentRequest(api.AnalyzeSentimentRequest o) { |
177 buildCounterAnalyzeSentimentRequest++; | 177 buildCounterAnalyzeSentimentRequest++; |
178 if (buildCounterAnalyzeSentimentRequest < 3) { | 178 if (buildCounterAnalyzeSentimentRequest < 3) { |
179 checkDocument(o.document); | 179 checkDocument(o.document); |
180 unittest.expect(o.encodingType, unittest.equals('foo')); | 180 unittest.expect(o.encodingType, unittest.equals('foo')); |
181 } | 181 } |
182 buildCounterAnalyzeSentimentRequest--; | 182 buildCounterAnalyzeSentimentRequest--; |
183 } | 183 } |
184 | 184 |
185 buildUnnamed3342() { | 185 buildUnnamed3374() { |
186 var o = new core.List<api.Sentence>(); | 186 var o = new core.List<api.Sentence>(); |
187 o.add(buildSentence()); | 187 o.add(buildSentence()); |
188 o.add(buildSentence()); | 188 o.add(buildSentence()); |
189 return o; | 189 return o; |
190 } | 190 } |
191 | 191 |
192 checkUnnamed3342(core.List<api.Sentence> o) { | 192 checkUnnamed3374(core.List<api.Sentence> o) { |
193 unittest.expect(o, unittest.hasLength(2)); | 193 unittest.expect(o, unittest.hasLength(2)); |
194 checkSentence(o[0]); | 194 checkSentence(o[0]); |
195 checkSentence(o[1]); | 195 checkSentence(o[1]); |
196 } | 196 } |
197 | 197 |
198 core.int buildCounterAnalyzeSentimentResponse = 0; | 198 core.int buildCounterAnalyzeSentimentResponse = 0; |
199 buildAnalyzeSentimentResponse() { | 199 buildAnalyzeSentimentResponse() { |
200 var o = new api.AnalyzeSentimentResponse(); | 200 var o = new api.AnalyzeSentimentResponse(); |
201 buildCounterAnalyzeSentimentResponse++; | 201 buildCounterAnalyzeSentimentResponse++; |
202 if (buildCounterAnalyzeSentimentResponse < 3) { | 202 if (buildCounterAnalyzeSentimentResponse < 3) { |
203 o.documentSentiment = buildSentiment(); | 203 o.documentSentiment = buildSentiment(); |
204 o.language = "foo"; | 204 o.language = "foo"; |
205 o.sentences = buildUnnamed3342(); | 205 o.sentences = buildUnnamed3374(); |
206 } | 206 } |
207 buildCounterAnalyzeSentimentResponse--; | 207 buildCounterAnalyzeSentimentResponse--; |
208 return o; | 208 return o; |
209 } | 209 } |
210 | 210 |
211 checkAnalyzeSentimentResponse(api.AnalyzeSentimentResponse o) { | 211 checkAnalyzeSentimentResponse(api.AnalyzeSentimentResponse o) { |
212 buildCounterAnalyzeSentimentResponse++; | 212 buildCounterAnalyzeSentimentResponse++; |
213 if (buildCounterAnalyzeSentimentResponse < 3) { | 213 if (buildCounterAnalyzeSentimentResponse < 3) { |
214 checkSentiment(o.documentSentiment); | 214 checkSentiment(o.documentSentiment); |
215 unittest.expect(o.language, unittest.equals('foo')); | 215 unittest.expect(o.language, unittest.equals('foo')); |
216 checkUnnamed3342(o.sentences); | 216 checkUnnamed3374(o.sentences); |
217 } | 217 } |
218 buildCounterAnalyzeSentimentResponse--; | 218 buildCounterAnalyzeSentimentResponse--; |
219 } | 219 } |
220 | 220 |
221 core.int buildCounterAnalyzeSyntaxRequest = 0; | 221 core.int buildCounterAnalyzeSyntaxRequest = 0; |
222 buildAnalyzeSyntaxRequest() { | 222 buildAnalyzeSyntaxRequest() { |
223 var o = new api.AnalyzeSyntaxRequest(); | 223 var o = new api.AnalyzeSyntaxRequest(); |
224 buildCounterAnalyzeSyntaxRequest++; | 224 buildCounterAnalyzeSyntaxRequest++; |
225 if (buildCounterAnalyzeSyntaxRequest < 3) { | 225 if (buildCounterAnalyzeSyntaxRequest < 3) { |
226 o.document = buildDocument(); | 226 o.document = buildDocument(); |
227 o.encodingType = "foo"; | 227 o.encodingType = "foo"; |
228 } | 228 } |
229 buildCounterAnalyzeSyntaxRequest--; | 229 buildCounterAnalyzeSyntaxRequest--; |
230 return o; | 230 return o; |
231 } | 231 } |
232 | 232 |
233 checkAnalyzeSyntaxRequest(api.AnalyzeSyntaxRequest o) { | 233 checkAnalyzeSyntaxRequest(api.AnalyzeSyntaxRequest o) { |
234 buildCounterAnalyzeSyntaxRequest++; | 234 buildCounterAnalyzeSyntaxRequest++; |
235 if (buildCounterAnalyzeSyntaxRequest < 3) { | 235 if (buildCounterAnalyzeSyntaxRequest < 3) { |
236 checkDocument(o.document); | 236 checkDocument(o.document); |
237 unittest.expect(o.encodingType, unittest.equals('foo')); | 237 unittest.expect(o.encodingType, unittest.equals('foo')); |
238 } | 238 } |
239 buildCounterAnalyzeSyntaxRequest--; | 239 buildCounterAnalyzeSyntaxRequest--; |
240 } | 240 } |
241 | 241 |
242 buildUnnamed3343() { | 242 buildUnnamed3375() { |
243 var o = new core.List<api.Sentence>(); | 243 var o = new core.List<api.Sentence>(); |
244 o.add(buildSentence()); | 244 o.add(buildSentence()); |
245 o.add(buildSentence()); | 245 o.add(buildSentence()); |
246 return o; | 246 return o; |
247 } | 247 } |
248 | 248 |
249 checkUnnamed3343(core.List<api.Sentence> o) { | 249 checkUnnamed3375(core.List<api.Sentence> o) { |
250 unittest.expect(o, unittest.hasLength(2)); | 250 unittest.expect(o, unittest.hasLength(2)); |
251 checkSentence(o[0]); | 251 checkSentence(o[0]); |
252 checkSentence(o[1]); | 252 checkSentence(o[1]); |
253 } | 253 } |
254 | 254 |
255 buildUnnamed3344() { | 255 buildUnnamed3376() { |
256 var o = new core.List<api.Token>(); | 256 var o = new core.List<api.Token>(); |
257 o.add(buildToken()); | 257 o.add(buildToken()); |
258 o.add(buildToken()); | 258 o.add(buildToken()); |
259 return o; | 259 return o; |
260 } | 260 } |
261 | 261 |
262 checkUnnamed3344(core.List<api.Token> o) { | 262 checkUnnamed3376(core.List<api.Token> o) { |
263 unittest.expect(o, unittest.hasLength(2)); | 263 unittest.expect(o, unittest.hasLength(2)); |
264 checkToken(o[0]); | 264 checkToken(o[0]); |
265 checkToken(o[1]); | 265 checkToken(o[1]); |
266 } | 266 } |
267 | 267 |
268 core.int buildCounterAnalyzeSyntaxResponse = 0; | 268 core.int buildCounterAnalyzeSyntaxResponse = 0; |
269 buildAnalyzeSyntaxResponse() { | 269 buildAnalyzeSyntaxResponse() { |
270 var o = new api.AnalyzeSyntaxResponse(); | 270 var o = new api.AnalyzeSyntaxResponse(); |
271 buildCounterAnalyzeSyntaxResponse++; | 271 buildCounterAnalyzeSyntaxResponse++; |
272 if (buildCounterAnalyzeSyntaxResponse < 3) { | 272 if (buildCounterAnalyzeSyntaxResponse < 3) { |
273 o.language = "foo"; | 273 o.language = "foo"; |
274 o.sentences = buildUnnamed3343(); | 274 o.sentences = buildUnnamed3375(); |
275 o.tokens = buildUnnamed3344(); | 275 o.tokens = buildUnnamed3376(); |
276 } | 276 } |
277 buildCounterAnalyzeSyntaxResponse--; | 277 buildCounterAnalyzeSyntaxResponse--; |
278 return o; | 278 return o; |
279 } | 279 } |
280 | 280 |
281 checkAnalyzeSyntaxResponse(api.AnalyzeSyntaxResponse o) { | 281 checkAnalyzeSyntaxResponse(api.AnalyzeSyntaxResponse o) { |
282 buildCounterAnalyzeSyntaxResponse++; | 282 buildCounterAnalyzeSyntaxResponse++; |
283 if (buildCounterAnalyzeSyntaxResponse < 3) { | 283 if (buildCounterAnalyzeSyntaxResponse < 3) { |
284 unittest.expect(o.language, unittest.equals('foo')); | 284 unittest.expect(o.language, unittest.equals('foo')); |
285 checkUnnamed3343(o.sentences); | 285 checkUnnamed3375(o.sentences); |
286 checkUnnamed3344(o.tokens); | 286 checkUnnamed3376(o.tokens); |
287 } | 287 } |
288 buildCounterAnalyzeSyntaxResponse--; | 288 buildCounterAnalyzeSyntaxResponse--; |
289 } | 289 } |
290 | 290 |
291 core.int buildCounterAnnotateTextRequest = 0; | 291 core.int buildCounterAnnotateTextRequest = 0; |
292 buildAnnotateTextRequest() { | 292 buildAnnotateTextRequest() { |
293 var o = new api.AnnotateTextRequest(); | 293 var o = new api.AnnotateTextRequest(); |
294 buildCounterAnnotateTextRequest++; | 294 buildCounterAnnotateTextRequest++; |
295 if (buildCounterAnnotateTextRequest < 3) { | 295 if (buildCounterAnnotateTextRequest < 3) { |
296 o.document = buildDocument(); | 296 o.document = buildDocument(); |
297 o.encodingType = "foo"; | 297 o.encodingType = "foo"; |
298 o.features = buildFeatures(); | 298 o.features = buildFeatures(); |
299 } | 299 } |
300 buildCounterAnnotateTextRequest--; | 300 buildCounterAnnotateTextRequest--; |
301 return o; | 301 return o; |
302 } | 302 } |
303 | 303 |
304 checkAnnotateTextRequest(api.AnnotateTextRequest o) { | 304 checkAnnotateTextRequest(api.AnnotateTextRequest o) { |
305 buildCounterAnnotateTextRequest++; | 305 buildCounterAnnotateTextRequest++; |
306 if (buildCounterAnnotateTextRequest < 3) { | 306 if (buildCounterAnnotateTextRequest < 3) { |
307 checkDocument(o.document); | 307 checkDocument(o.document); |
308 unittest.expect(o.encodingType, unittest.equals('foo')); | 308 unittest.expect(o.encodingType, unittest.equals('foo')); |
309 checkFeatures(o.features); | 309 checkFeatures(o.features); |
310 } | 310 } |
311 buildCounterAnnotateTextRequest--; | 311 buildCounterAnnotateTextRequest--; |
312 } | 312 } |
313 | 313 |
314 buildUnnamed3345() { | 314 buildUnnamed3377() { |
315 var o = new core.List<api.Entity>(); | 315 var o = new core.List<api.Entity>(); |
316 o.add(buildEntity()); | 316 o.add(buildEntity()); |
317 o.add(buildEntity()); | 317 o.add(buildEntity()); |
318 return o; | 318 return o; |
319 } | 319 } |
320 | 320 |
321 checkUnnamed3345(core.List<api.Entity> o) { | 321 checkUnnamed3377(core.List<api.Entity> o) { |
322 unittest.expect(o, unittest.hasLength(2)); | 322 unittest.expect(o, unittest.hasLength(2)); |
323 checkEntity(o[0]); | 323 checkEntity(o[0]); |
324 checkEntity(o[1]); | 324 checkEntity(o[1]); |
325 } | 325 } |
326 | 326 |
327 buildUnnamed3346() { | 327 buildUnnamed3378() { |
328 var o = new core.List<api.Sentence>(); | 328 var o = new core.List<api.Sentence>(); |
329 o.add(buildSentence()); | 329 o.add(buildSentence()); |
330 o.add(buildSentence()); | 330 o.add(buildSentence()); |
331 return o; | 331 return o; |
332 } | 332 } |
333 | 333 |
334 checkUnnamed3346(core.List<api.Sentence> o) { | 334 checkUnnamed3378(core.List<api.Sentence> o) { |
335 unittest.expect(o, unittest.hasLength(2)); | 335 unittest.expect(o, unittest.hasLength(2)); |
336 checkSentence(o[0]); | 336 checkSentence(o[0]); |
337 checkSentence(o[1]); | 337 checkSentence(o[1]); |
338 } | 338 } |
339 | 339 |
340 buildUnnamed3347() { | 340 buildUnnamed3379() { |
341 var o = new core.List<api.Token>(); | 341 var o = new core.List<api.Token>(); |
342 o.add(buildToken()); | 342 o.add(buildToken()); |
343 o.add(buildToken()); | 343 o.add(buildToken()); |
344 return o; | 344 return o; |
345 } | 345 } |
346 | 346 |
347 checkUnnamed3347(core.List<api.Token> o) { | 347 checkUnnamed3379(core.List<api.Token> o) { |
348 unittest.expect(o, unittest.hasLength(2)); | 348 unittest.expect(o, unittest.hasLength(2)); |
349 checkToken(o[0]); | 349 checkToken(o[0]); |
350 checkToken(o[1]); | 350 checkToken(o[1]); |
351 } | 351 } |
352 | 352 |
353 core.int buildCounterAnnotateTextResponse = 0; | 353 core.int buildCounterAnnotateTextResponse = 0; |
354 buildAnnotateTextResponse() { | 354 buildAnnotateTextResponse() { |
355 var o = new api.AnnotateTextResponse(); | 355 var o = new api.AnnotateTextResponse(); |
356 buildCounterAnnotateTextResponse++; | 356 buildCounterAnnotateTextResponse++; |
357 if (buildCounterAnnotateTextResponse < 3) { | 357 if (buildCounterAnnotateTextResponse < 3) { |
358 o.documentSentiment = buildSentiment(); | 358 o.documentSentiment = buildSentiment(); |
359 o.entities = buildUnnamed3345(); | 359 o.entities = buildUnnamed3377(); |
360 o.language = "foo"; | 360 o.language = "foo"; |
361 o.sentences = buildUnnamed3346(); | 361 o.sentences = buildUnnamed3378(); |
362 o.tokens = buildUnnamed3347(); | 362 o.tokens = buildUnnamed3379(); |
363 } | 363 } |
364 buildCounterAnnotateTextResponse--; | 364 buildCounterAnnotateTextResponse--; |
365 return o; | 365 return o; |
366 } | 366 } |
367 | 367 |
368 checkAnnotateTextResponse(api.AnnotateTextResponse o) { | 368 checkAnnotateTextResponse(api.AnnotateTextResponse o) { |
369 buildCounterAnnotateTextResponse++; | 369 buildCounterAnnotateTextResponse++; |
370 if (buildCounterAnnotateTextResponse < 3) { | 370 if (buildCounterAnnotateTextResponse < 3) { |
371 checkSentiment(o.documentSentiment); | 371 checkSentiment(o.documentSentiment); |
372 checkUnnamed3345(o.entities); | 372 checkUnnamed3377(o.entities); |
373 unittest.expect(o.language, unittest.equals('foo')); | 373 unittest.expect(o.language, unittest.equals('foo')); |
374 checkUnnamed3346(o.sentences); | 374 checkUnnamed3378(o.sentences); |
375 checkUnnamed3347(o.tokens); | 375 checkUnnamed3379(o.tokens); |
376 } | 376 } |
377 buildCounterAnnotateTextResponse--; | 377 buildCounterAnnotateTextResponse--; |
378 } | 378 } |
379 | 379 |
380 core.int buildCounterDependencyEdge = 0; | 380 core.int buildCounterDependencyEdge = 0; |
381 buildDependencyEdge() { | 381 buildDependencyEdge() { |
382 var o = new api.DependencyEdge(); | 382 var o = new api.DependencyEdge(); |
383 buildCounterDependencyEdge++; | 383 buildCounterDependencyEdge++; |
384 if (buildCounterDependencyEdge < 3) { | 384 if (buildCounterDependencyEdge < 3) { |
385 o.headTokenIndex = 42; | 385 o.headTokenIndex = 42; |
(...skipping 30 matching lines...) Expand all Loading... |
416 buildCounterDocument++; | 416 buildCounterDocument++; |
417 if (buildCounterDocument < 3) { | 417 if (buildCounterDocument < 3) { |
418 unittest.expect(o.content, unittest.equals('foo')); | 418 unittest.expect(o.content, unittest.equals('foo')); |
419 unittest.expect(o.gcsContentUri, unittest.equals('foo')); | 419 unittest.expect(o.gcsContentUri, unittest.equals('foo')); |
420 unittest.expect(o.language, unittest.equals('foo')); | 420 unittest.expect(o.language, unittest.equals('foo')); |
421 unittest.expect(o.type, unittest.equals('foo')); | 421 unittest.expect(o.type, unittest.equals('foo')); |
422 } | 422 } |
423 buildCounterDocument--; | 423 buildCounterDocument--; |
424 } | 424 } |
425 | 425 |
426 buildUnnamed3348() { | 426 buildUnnamed3380() { |
427 var o = new core.List<api.EntityMention>(); | 427 var o = new core.List<api.EntityMention>(); |
428 o.add(buildEntityMention()); | 428 o.add(buildEntityMention()); |
429 o.add(buildEntityMention()); | 429 o.add(buildEntityMention()); |
430 return o; | 430 return o; |
431 } | 431 } |
432 | 432 |
433 checkUnnamed3348(core.List<api.EntityMention> o) { | 433 checkUnnamed3380(core.List<api.EntityMention> o) { |
434 unittest.expect(o, unittest.hasLength(2)); | 434 unittest.expect(o, unittest.hasLength(2)); |
435 checkEntityMention(o[0]); | 435 checkEntityMention(o[0]); |
436 checkEntityMention(o[1]); | 436 checkEntityMention(o[1]); |
437 } | 437 } |
438 | 438 |
439 buildUnnamed3349() { | 439 buildUnnamed3381() { |
440 var o = new core.Map<core.String, core.String>(); | 440 var o = new core.Map<core.String, core.String>(); |
441 o["x"] = "foo"; | 441 o["x"] = "foo"; |
442 o["y"] = "foo"; | 442 o["y"] = "foo"; |
443 return o; | 443 return o; |
444 } | 444 } |
445 | 445 |
446 checkUnnamed3349(core.Map<core.String, core.String> o) { | 446 checkUnnamed3381(core.Map<core.String, core.String> o) { |
447 unittest.expect(o, unittest.hasLength(2)); | 447 unittest.expect(o, unittest.hasLength(2)); |
448 unittest.expect(o["x"], unittest.equals('foo')); | 448 unittest.expect(o["x"], unittest.equals('foo')); |
449 unittest.expect(o["y"], unittest.equals('foo')); | 449 unittest.expect(o["y"], unittest.equals('foo')); |
450 } | 450 } |
451 | 451 |
452 core.int buildCounterEntity = 0; | 452 core.int buildCounterEntity = 0; |
453 buildEntity() { | 453 buildEntity() { |
454 var o = new api.Entity(); | 454 var o = new api.Entity(); |
455 buildCounterEntity++; | 455 buildCounterEntity++; |
456 if (buildCounterEntity < 3) { | 456 if (buildCounterEntity < 3) { |
457 o.mentions = buildUnnamed3348(); | 457 o.mentions = buildUnnamed3380(); |
458 o.metadata = buildUnnamed3349(); | 458 o.metadata = buildUnnamed3381(); |
459 o.name = "foo"; | 459 o.name = "foo"; |
460 o.salience = 42.0; | 460 o.salience = 42.0; |
461 o.sentiment = buildSentiment(); | 461 o.sentiment = buildSentiment(); |
462 o.type = "foo"; | 462 o.type = "foo"; |
463 } | 463 } |
464 buildCounterEntity--; | 464 buildCounterEntity--; |
465 return o; | 465 return o; |
466 } | 466 } |
467 | 467 |
468 checkEntity(api.Entity o) { | 468 checkEntity(api.Entity o) { |
469 buildCounterEntity++; | 469 buildCounterEntity++; |
470 if (buildCounterEntity < 3) { | 470 if (buildCounterEntity < 3) { |
471 checkUnnamed3348(o.mentions); | 471 checkUnnamed3380(o.mentions); |
472 checkUnnamed3349(o.metadata); | 472 checkUnnamed3381(o.metadata); |
473 unittest.expect(o.name, unittest.equals('foo')); | 473 unittest.expect(o.name, unittest.equals('foo')); |
474 unittest.expect(o.salience, unittest.equals(42.0)); | 474 unittest.expect(o.salience, unittest.equals(42.0)); |
475 checkSentiment(o.sentiment); | 475 checkSentiment(o.sentiment); |
476 unittest.expect(o.type, unittest.equals('foo')); | 476 unittest.expect(o.type, unittest.equals('foo')); |
477 } | 477 } |
478 buildCounterEntity--; | 478 buildCounterEntity--; |
479 } | 479 } |
480 | 480 |
481 core.int buildCounterEntityMention = 0; | 481 core.int buildCounterEntityMention = 0; |
482 buildEntityMention() { | 482 buildEntityMention() { |
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
602 | 602 |
603 checkSentiment(api.Sentiment o) { | 603 checkSentiment(api.Sentiment o) { |
604 buildCounterSentiment++; | 604 buildCounterSentiment++; |
605 if (buildCounterSentiment < 3) { | 605 if (buildCounterSentiment < 3) { |
606 unittest.expect(o.magnitude, unittest.equals(42.0)); | 606 unittest.expect(o.magnitude, unittest.equals(42.0)); |
607 unittest.expect(o.score, unittest.equals(42.0)); | 607 unittest.expect(o.score, unittest.equals(42.0)); |
608 } | 608 } |
609 buildCounterSentiment--; | 609 buildCounterSentiment--; |
610 } | 610 } |
611 | 611 |
612 buildUnnamed3350() { | 612 buildUnnamed3382() { |
613 var o = new core.Map<core.String, core.Object>(); | 613 var o = new core.Map<core.String, core.Object>(); |
614 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 614 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; |
615 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 615 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; |
616 return o; | 616 return o; |
617 } | 617 } |
618 | 618 |
619 checkUnnamed3350(core.Map<core.String, core.Object> o) { | 619 checkUnnamed3382(core.Map<core.String, core.Object> o) { |
620 unittest.expect(o, unittest.hasLength(2)); | 620 unittest.expect(o, unittest.hasLength(2)); |
621 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')); | 621 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')); |
622 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')); | 622 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')); |
623 } | 623 } |
624 | 624 |
625 buildUnnamed3351() { | 625 buildUnnamed3383() { |
626 var o = new core.List<core.Map<core.String, core.Object>>(); | 626 var o = new core.List<core.Map<core.String, core.Object>>(); |
627 o.add(buildUnnamed3350()); | 627 o.add(buildUnnamed3382()); |
628 o.add(buildUnnamed3350()); | 628 o.add(buildUnnamed3382()); |
629 return o; | 629 return o; |
630 } | 630 } |
631 | 631 |
632 checkUnnamed3351(core.List<core.Map<core.String, core.Object>> o) { | 632 checkUnnamed3383(core.List<core.Map<core.String, core.Object>> o) { |
633 unittest.expect(o, unittest.hasLength(2)); | 633 unittest.expect(o, unittest.hasLength(2)); |
634 checkUnnamed3350(o[0]); | 634 checkUnnamed3382(o[0]); |
635 checkUnnamed3350(o[1]); | 635 checkUnnamed3382(o[1]); |
636 } | 636 } |
637 | 637 |
638 core.int buildCounterStatus = 0; | 638 core.int buildCounterStatus = 0; |
639 buildStatus() { | 639 buildStatus() { |
640 var o = new api.Status(); | 640 var o = new api.Status(); |
641 buildCounterStatus++; | 641 buildCounterStatus++; |
642 if (buildCounterStatus < 3) { | 642 if (buildCounterStatus < 3) { |
643 o.code = 42; | 643 o.code = 42; |
644 o.details = buildUnnamed3351(); | 644 o.details = buildUnnamed3383(); |
645 o.message = "foo"; | 645 o.message = "foo"; |
646 } | 646 } |
647 buildCounterStatus--; | 647 buildCounterStatus--; |
648 return o; | 648 return o; |
649 } | 649 } |
650 | 650 |
651 checkStatus(api.Status o) { | 651 checkStatus(api.Status o) { |
652 buildCounterStatus++; | 652 buildCounterStatus++; |
653 if (buildCounterStatus < 3) { | 653 if (buildCounterStatus < 3) { |
654 unittest.expect(o.code, unittest.equals(42)); | 654 unittest.expect(o.code, unittest.equals(42)); |
655 checkUnnamed3351(o.details); | 655 checkUnnamed3383(o.details); |
656 unittest.expect(o.message, unittest.equals('foo')); | 656 unittest.expect(o.message, unittest.equals('foo')); |
657 } | 657 } |
658 buildCounterStatus--; | 658 buildCounterStatus--; |
659 } | 659 } |
660 | 660 |
661 core.int buildCounterTextSpan = 0; | 661 core.int buildCounterTextSpan = 0; |
662 buildTextSpan() { | 662 buildTextSpan() { |
663 var o = new api.TextSpan(); | 663 var o = new api.TextSpan(); |
664 buildCounterTextSpan++; | 664 buildCounterTextSpan++; |
665 if (buildCounterTextSpan < 3) { | 665 if (buildCounterTextSpan < 3) { |
(...skipping 463 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1129 res.annotateText(arg_request).then(unittest.expectAsync1(((api.AnnotateTex
tResponse response) { | 1129 res.annotateText(arg_request).then(unittest.expectAsync1(((api.AnnotateTex
tResponse response) { |
1130 checkAnnotateTextResponse(response); | 1130 checkAnnotateTextResponse(response); |
1131 }))); | 1131 }))); |
1132 }); | 1132 }); |
1133 | 1133 |
1134 }); | 1134 }); |
1135 | 1135 |
1136 | 1136 |
1137 } | 1137 } |
1138 | 1138 |
OLD | NEW |