OLD | NEW |
1 library googleapis.vision.v1.test; | 1 library googleapis.vision.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...) 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 buildUnnamed1157() { | 54 buildUnnamed1177() { |
55 var o = new core.List<api.Feature>(); | 55 var o = new core.List<api.Feature>(); |
56 o.add(buildFeature()); | 56 o.add(buildFeature()); |
57 o.add(buildFeature()); | 57 o.add(buildFeature()); |
58 return o; | 58 return o; |
59 } | 59 } |
60 | 60 |
61 checkUnnamed1157(core.List<api.Feature> o) { | 61 checkUnnamed1177(core.List<api.Feature> o) { |
62 unittest.expect(o, unittest.hasLength(2)); | 62 unittest.expect(o, unittest.hasLength(2)); |
63 checkFeature(o[0]); | 63 checkFeature(o[0]); |
64 checkFeature(o[1]); | 64 checkFeature(o[1]); |
65 } | 65 } |
66 | 66 |
67 core.int buildCounterAnnotateImageRequest = 0; | 67 core.int buildCounterAnnotateImageRequest = 0; |
68 buildAnnotateImageRequest() { | 68 buildAnnotateImageRequest() { |
69 var o = new api.AnnotateImageRequest(); | 69 var o = new api.AnnotateImageRequest(); |
70 buildCounterAnnotateImageRequest++; | 70 buildCounterAnnotateImageRequest++; |
71 if (buildCounterAnnotateImageRequest < 3) { | 71 if (buildCounterAnnotateImageRequest < 3) { |
72 o.features = buildUnnamed1157(); | 72 o.features = buildUnnamed1177(); |
73 o.image = buildImage(); | 73 o.image = buildImage(); |
74 o.imageContext = buildImageContext(); | 74 o.imageContext = buildImageContext(); |
75 } | 75 } |
76 buildCounterAnnotateImageRequest--; | 76 buildCounterAnnotateImageRequest--; |
77 return o; | 77 return o; |
78 } | 78 } |
79 | 79 |
80 checkAnnotateImageRequest(api.AnnotateImageRequest o) { | 80 checkAnnotateImageRequest(api.AnnotateImageRequest o) { |
81 buildCounterAnnotateImageRequest++; | 81 buildCounterAnnotateImageRequest++; |
82 if (buildCounterAnnotateImageRequest < 3) { | 82 if (buildCounterAnnotateImageRequest < 3) { |
83 checkUnnamed1157(o.features); | 83 checkUnnamed1177(o.features); |
84 checkImage(o.image); | 84 checkImage(o.image); |
85 checkImageContext(o.imageContext); | 85 checkImageContext(o.imageContext); |
86 } | 86 } |
87 buildCounterAnnotateImageRequest--; | 87 buildCounterAnnotateImageRequest--; |
88 } | 88 } |
89 | 89 |
90 buildUnnamed1158() { | 90 buildUnnamed1178() { |
91 var o = new core.List<api.FaceAnnotation>(); | 91 var o = new core.List<api.FaceAnnotation>(); |
92 o.add(buildFaceAnnotation()); | 92 o.add(buildFaceAnnotation()); |
93 o.add(buildFaceAnnotation()); | 93 o.add(buildFaceAnnotation()); |
94 return o; | 94 return o; |
95 } | 95 } |
96 | 96 |
97 checkUnnamed1158(core.List<api.FaceAnnotation> o) { | 97 checkUnnamed1178(core.List<api.FaceAnnotation> o) { |
98 unittest.expect(o, unittest.hasLength(2)); | 98 unittest.expect(o, unittest.hasLength(2)); |
99 checkFaceAnnotation(o[0]); | 99 checkFaceAnnotation(o[0]); |
100 checkFaceAnnotation(o[1]); | 100 checkFaceAnnotation(o[1]); |
101 } | 101 } |
102 | 102 |
103 buildUnnamed1159() { | 103 buildUnnamed1179() { |
104 var o = new core.List<api.EntityAnnotation>(); | 104 var o = new core.List<api.EntityAnnotation>(); |
105 o.add(buildEntityAnnotation()); | 105 o.add(buildEntityAnnotation()); |
106 o.add(buildEntityAnnotation()); | 106 o.add(buildEntityAnnotation()); |
107 return o; | 107 return o; |
108 } | 108 } |
109 | 109 |
110 checkUnnamed1159(core.List<api.EntityAnnotation> o) { | 110 checkUnnamed1179(core.List<api.EntityAnnotation> o) { |
111 unittest.expect(o, unittest.hasLength(2)); | 111 unittest.expect(o, unittest.hasLength(2)); |
112 checkEntityAnnotation(o[0]); | 112 checkEntityAnnotation(o[0]); |
113 checkEntityAnnotation(o[1]); | 113 checkEntityAnnotation(o[1]); |
114 } | 114 } |
115 | 115 |
116 buildUnnamed1160() { | 116 buildUnnamed1180() { |
117 var o = new core.List<api.EntityAnnotation>(); | 117 var o = new core.List<api.EntityAnnotation>(); |
118 o.add(buildEntityAnnotation()); | 118 o.add(buildEntityAnnotation()); |
119 o.add(buildEntityAnnotation()); | 119 o.add(buildEntityAnnotation()); |
120 return o; | 120 return o; |
121 } | 121 } |
122 | 122 |
123 checkUnnamed1160(core.List<api.EntityAnnotation> o) { | 123 checkUnnamed1180(core.List<api.EntityAnnotation> o) { |
124 unittest.expect(o, unittest.hasLength(2)); | 124 unittest.expect(o, unittest.hasLength(2)); |
125 checkEntityAnnotation(o[0]); | 125 checkEntityAnnotation(o[0]); |
126 checkEntityAnnotation(o[1]); | 126 checkEntityAnnotation(o[1]); |
127 } | 127 } |
128 | 128 |
129 buildUnnamed1161() { | 129 buildUnnamed1181() { |
130 var o = new core.List<api.EntityAnnotation>(); | 130 var o = new core.List<api.EntityAnnotation>(); |
131 o.add(buildEntityAnnotation()); | 131 o.add(buildEntityAnnotation()); |
132 o.add(buildEntityAnnotation()); | 132 o.add(buildEntityAnnotation()); |
133 return o; | 133 return o; |
134 } | 134 } |
135 | 135 |
136 checkUnnamed1161(core.List<api.EntityAnnotation> o) { | 136 checkUnnamed1181(core.List<api.EntityAnnotation> o) { |
137 unittest.expect(o, unittest.hasLength(2)); | 137 unittest.expect(o, unittest.hasLength(2)); |
138 checkEntityAnnotation(o[0]); | 138 checkEntityAnnotation(o[0]); |
139 checkEntityAnnotation(o[1]); | 139 checkEntityAnnotation(o[1]); |
140 } | 140 } |
141 | 141 |
142 buildUnnamed1162() { | 142 buildUnnamed1182() { |
143 var o = new core.List<api.EntityAnnotation>(); | 143 var o = new core.List<api.EntityAnnotation>(); |
144 o.add(buildEntityAnnotation()); | 144 o.add(buildEntityAnnotation()); |
145 o.add(buildEntityAnnotation()); | 145 o.add(buildEntityAnnotation()); |
146 return o; | 146 return o; |
147 } | 147 } |
148 | 148 |
149 checkUnnamed1162(core.List<api.EntityAnnotation> o) { | 149 checkUnnamed1182(core.List<api.EntityAnnotation> o) { |
150 unittest.expect(o, unittest.hasLength(2)); | 150 unittest.expect(o, unittest.hasLength(2)); |
151 checkEntityAnnotation(o[0]); | 151 checkEntityAnnotation(o[0]); |
152 checkEntityAnnotation(o[1]); | 152 checkEntityAnnotation(o[1]); |
153 } | 153 } |
154 | 154 |
155 core.int buildCounterAnnotateImageResponse = 0; | 155 core.int buildCounterAnnotateImageResponse = 0; |
156 buildAnnotateImageResponse() { | 156 buildAnnotateImageResponse() { |
157 var o = new api.AnnotateImageResponse(); | 157 var o = new api.AnnotateImageResponse(); |
158 buildCounterAnnotateImageResponse++; | 158 buildCounterAnnotateImageResponse++; |
159 if (buildCounterAnnotateImageResponse < 3) { | 159 if (buildCounterAnnotateImageResponse < 3) { |
| 160 o.cropHintsAnnotation = buildCropHintsAnnotation(); |
160 o.error = buildStatus(); | 161 o.error = buildStatus(); |
161 o.faceAnnotations = buildUnnamed1158(); | 162 o.faceAnnotations = buildUnnamed1178(); |
| 163 o.fullTextAnnotation = buildTextAnnotation(); |
162 o.imagePropertiesAnnotation = buildImageProperties(); | 164 o.imagePropertiesAnnotation = buildImageProperties(); |
163 o.labelAnnotations = buildUnnamed1159(); | 165 o.labelAnnotations = buildUnnamed1179(); |
164 o.landmarkAnnotations = buildUnnamed1160(); | 166 o.landmarkAnnotations = buildUnnamed1180(); |
165 o.logoAnnotations = buildUnnamed1161(); | 167 o.logoAnnotations = buildUnnamed1181(); |
166 o.safeSearchAnnotation = buildSafeSearchAnnotation(); | 168 o.safeSearchAnnotation = buildSafeSearchAnnotation(); |
167 o.textAnnotations = buildUnnamed1162(); | 169 o.textAnnotations = buildUnnamed1182(); |
| 170 o.webDetection = buildWebDetection(); |
168 } | 171 } |
169 buildCounterAnnotateImageResponse--; | 172 buildCounterAnnotateImageResponse--; |
170 return o; | 173 return o; |
171 } | 174 } |
172 | 175 |
173 checkAnnotateImageResponse(api.AnnotateImageResponse o) { | 176 checkAnnotateImageResponse(api.AnnotateImageResponse o) { |
174 buildCounterAnnotateImageResponse++; | 177 buildCounterAnnotateImageResponse++; |
175 if (buildCounterAnnotateImageResponse < 3) { | 178 if (buildCounterAnnotateImageResponse < 3) { |
| 179 checkCropHintsAnnotation(o.cropHintsAnnotation); |
176 checkStatus(o.error); | 180 checkStatus(o.error); |
177 checkUnnamed1158(o.faceAnnotations); | 181 checkUnnamed1178(o.faceAnnotations); |
| 182 checkTextAnnotation(o.fullTextAnnotation); |
178 checkImageProperties(o.imagePropertiesAnnotation); | 183 checkImageProperties(o.imagePropertiesAnnotation); |
179 checkUnnamed1159(o.labelAnnotations); | 184 checkUnnamed1179(o.labelAnnotations); |
180 checkUnnamed1160(o.landmarkAnnotations); | 185 checkUnnamed1180(o.landmarkAnnotations); |
181 checkUnnamed1161(o.logoAnnotations); | 186 checkUnnamed1181(o.logoAnnotations); |
182 checkSafeSearchAnnotation(o.safeSearchAnnotation); | 187 checkSafeSearchAnnotation(o.safeSearchAnnotation); |
183 checkUnnamed1162(o.textAnnotations); | 188 checkUnnamed1182(o.textAnnotations); |
| 189 checkWebDetection(o.webDetection); |
184 } | 190 } |
185 buildCounterAnnotateImageResponse--; | 191 buildCounterAnnotateImageResponse--; |
186 } | 192 } |
187 | 193 |
188 buildUnnamed1163() { | 194 buildUnnamed1183() { |
189 var o = new core.List<api.AnnotateImageRequest>(); | 195 var o = new core.List<api.AnnotateImageRequest>(); |
190 o.add(buildAnnotateImageRequest()); | 196 o.add(buildAnnotateImageRequest()); |
191 o.add(buildAnnotateImageRequest()); | 197 o.add(buildAnnotateImageRequest()); |
192 return o; | 198 return o; |
193 } | 199 } |
194 | 200 |
195 checkUnnamed1163(core.List<api.AnnotateImageRequest> o) { | 201 checkUnnamed1183(core.List<api.AnnotateImageRequest> o) { |
196 unittest.expect(o, unittest.hasLength(2)); | 202 unittest.expect(o, unittest.hasLength(2)); |
197 checkAnnotateImageRequest(o[0]); | 203 checkAnnotateImageRequest(o[0]); |
198 checkAnnotateImageRequest(o[1]); | 204 checkAnnotateImageRequest(o[1]); |
199 } | 205 } |
200 | 206 |
201 core.int buildCounterBatchAnnotateImagesRequest = 0; | 207 core.int buildCounterBatchAnnotateImagesRequest = 0; |
202 buildBatchAnnotateImagesRequest() { | 208 buildBatchAnnotateImagesRequest() { |
203 var o = new api.BatchAnnotateImagesRequest(); | 209 var o = new api.BatchAnnotateImagesRequest(); |
204 buildCounterBatchAnnotateImagesRequest++; | 210 buildCounterBatchAnnotateImagesRequest++; |
205 if (buildCounterBatchAnnotateImagesRequest < 3) { | 211 if (buildCounterBatchAnnotateImagesRequest < 3) { |
206 o.requests = buildUnnamed1163(); | 212 o.requests = buildUnnamed1183(); |
207 } | 213 } |
208 buildCounterBatchAnnotateImagesRequest--; | 214 buildCounterBatchAnnotateImagesRequest--; |
209 return o; | 215 return o; |
210 } | 216 } |
211 | 217 |
212 checkBatchAnnotateImagesRequest(api.BatchAnnotateImagesRequest o) { | 218 checkBatchAnnotateImagesRequest(api.BatchAnnotateImagesRequest o) { |
213 buildCounterBatchAnnotateImagesRequest++; | 219 buildCounterBatchAnnotateImagesRequest++; |
214 if (buildCounterBatchAnnotateImagesRequest < 3) { | 220 if (buildCounterBatchAnnotateImagesRequest < 3) { |
215 checkUnnamed1163(o.requests); | 221 checkUnnamed1183(o.requests); |
216 } | 222 } |
217 buildCounterBatchAnnotateImagesRequest--; | 223 buildCounterBatchAnnotateImagesRequest--; |
218 } | 224 } |
219 | 225 |
220 buildUnnamed1164() { | 226 buildUnnamed1184() { |
221 var o = new core.List<api.AnnotateImageResponse>(); | 227 var o = new core.List<api.AnnotateImageResponse>(); |
222 o.add(buildAnnotateImageResponse()); | 228 o.add(buildAnnotateImageResponse()); |
223 o.add(buildAnnotateImageResponse()); | 229 o.add(buildAnnotateImageResponse()); |
224 return o; | 230 return o; |
225 } | 231 } |
226 | 232 |
227 checkUnnamed1164(core.List<api.AnnotateImageResponse> o) { | 233 checkUnnamed1184(core.List<api.AnnotateImageResponse> o) { |
228 unittest.expect(o, unittest.hasLength(2)); | 234 unittest.expect(o, unittest.hasLength(2)); |
229 checkAnnotateImageResponse(o[0]); | 235 checkAnnotateImageResponse(o[0]); |
230 checkAnnotateImageResponse(o[1]); | 236 checkAnnotateImageResponse(o[1]); |
231 } | 237 } |
232 | 238 |
233 core.int buildCounterBatchAnnotateImagesResponse = 0; | 239 core.int buildCounterBatchAnnotateImagesResponse = 0; |
234 buildBatchAnnotateImagesResponse() { | 240 buildBatchAnnotateImagesResponse() { |
235 var o = new api.BatchAnnotateImagesResponse(); | 241 var o = new api.BatchAnnotateImagesResponse(); |
236 buildCounterBatchAnnotateImagesResponse++; | 242 buildCounterBatchAnnotateImagesResponse++; |
237 if (buildCounterBatchAnnotateImagesResponse < 3) { | 243 if (buildCounterBatchAnnotateImagesResponse < 3) { |
238 o.responses = buildUnnamed1164(); | 244 o.responses = buildUnnamed1184(); |
239 } | 245 } |
240 buildCounterBatchAnnotateImagesResponse--; | 246 buildCounterBatchAnnotateImagesResponse--; |
241 return o; | 247 return o; |
242 } | 248 } |
243 | 249 |
244 checkBatchAnnotateImagesResponse(api.BatchAnnotateImagesResponse o) { | 250 checkBatchAnnotateImagesResponse(api.BatchAnnotateImagesResponse o) { |
245 buildCounterBatchAnnotateImagesResponse++; | 251 buildCounterBatchAnnotateImagesResponse++; |
246 if (buildCounterBatchAnnotateImagesResponse < 3) { | 252 if (buildCounterBatchAnnotateImagesResponse < 3) { |
247 checkUnnamed1164(o.responses); | 253 checkUnnamed1184(o.responses); |
248 } | 254 } |
249 buildCounterBatchAnnotateImagesResponse--; | 255 buildCounterBatchAnnotateImagesResponse--; |
250 } | 256 } |
251 | 257 |
252 buildUnnamed1165() { | 258 buildUnnamed1185() { |
| 259 var o = new core.List<api.Paragraph>(); |
| 260 o.add(buildParagraph()); |
| 261 o.add(buildParagraph()); |
| 262 return o; |
| 263 } |
| 264 |
| 265 checkUnnamed1185(core.List<api.Paragraph> o) { |
| 266 unittest.expect(o, unittest.hasLength(2)); |
| 267 checkParagraph(o[0]); |
| 268 checkParagraph(o[1]); |
| 269 } |
| 270 |
| 271 core.int buildCounterBlock = 0; |
| 272 buildBlock() { |
| 273 var o = new api.Block(); |
| 274 buildCounterBlock++; |
| 275 if (buildCounterBlock < 3) { |
| 276 o.blockType = "foo"; |
| 277 o.boundingBox = buildBoundingPoly(); |
| 278 o.paragraphs = buildUnnamed1185(); |
| 279 o.property = buildTextProperty(); |
| 280 } |
| 281 buildCounterBlock--; |
| 282 return o; |
| 283 } |
| 284 |
| 285 checkBlock(api.Block o) { |
| 286 buildCounterBlock++; |
| 287 if (buildCounterBlock < 3) { |
| 288 unittest.expect(o.blockType, unittest.equals('foo')); |
| 289 checkBoundingPoly(o.boundingBox); |
| 290 checkUnnamed1185(o.paragraphs); |
| 291 checkTextProperty(o.property); |
| 292 } |
| 293 buildCounterBlock--; |
| 294 } |
| 295 |
| 296 buildUnnamed1186() { |
253 var o = new core.List<api.Vertex>(); | 297 var o = new core.List<api.Vertex>(); |
254 o.add(buildVertex()); | 298 o.add(buildVertex()); |
255 o.add(buildVertex()); | 299 o.add(buildVertex()); |
256 return o; | 300 return o; |
257 } | 301 } |
258 | 302 |
259 checkUnnamed1165(core.List<api.Vertex> o) { | 303 checkUnnamed1186(core.List<api.Vertex> o) { |
260 unittest.expect(o, unittest.hasLength(2)); | 304 unittest.expect(o, unittest.hasLength(2)); |
261 checkVertex(o[0]); | 305 checkVertex(o[0]); |
262 checkVertex(o[1]); | 306 checkVertex(o[1]); |
263 } | 307 } |
264 | 308 |
265 core.int buildCounterBoundingPoly = 0; | 309 core.int buildCounterBoundingPoly = 0; |
266 buildBoundingPoly() { | 310 buildBoundingPoly() { |
267 var o = new api.BoundingPoly(); | 311 var o = new api.BoundingPoly(); |
268 buildCounterBoundingPoly++; | 312 buildCounterBoundingPoly++; |
269 if (buildCounterBoundingPoly < 3) { | 313 if (buildCounterBoundingPoly < 3) { |
270 o.vertices = buildUnnamed1165(); | 314 o.vertices = buildUnnamed1186(); |
271 } | 315 } |
272 buildCounterBoundingPoly--; | 316 buildCounterBoundingPoly--; |
273 return o; | 317 return o; |
274 } | 318 } |
275 | 319 |
276 checkBoundingPoly(api.BoundingPoly o) { | 320 checkBoundingPoly(api.BoundingPoly o) { |
277 buildCounterBoundingPoly++; | 321 buildCounterBoundingPoly++; |
278 if (buildCounterBoundingPoly < 3) { | 322 if (buildCounterBoundingPoly < 3) { |
279 checkUnnamed1165(o.vertices); | 323 checkUnnamed1186(o.vertices); |
280 } | 324 } |
281 buildCounterBoundingPoly--; | 325 buildCounterBoundingPoly--; |
282 } | 326 } |
283 | 327 |
284 core.int buildCounterColor = 0; | 328 core.int buildCounterColor = 0; |
285 buildColor() { | 329 buildColor() { |
286 var o = new api.Color(); | 330 var o = new api.Color(); |
287 buildCounterColor++; | 331 buildCounterColor++; |
288 if (buildCounterColor < 3) { | 332 if (buildCounterColor < 3) { |
289 o.alpha = 42.0; | 333 o.alpha = 42.0; |
(...skipping 32 matching lines...) Loading... |
322 checkColorInfo(api.ColorInfo o) { | 366 checkColorInfo(api.ColorInfo o) { |
323 buildCounterColorInfo++; | 367 buildCounterColorInfo++; |
324 if (buildCounterColorInfo < 3) { | 368 if (buildCounterColorInfo < 3) { |
325 checkColor(o.color); | 369 checkColor(o.color); |
326 unittest.expect(o.pixelFraction, unittest.equals(42.0)); | 370 unittest.expect(o.pixelFraction, unittest.equals(42.0)); |
327 unittest.expect(o.score, unittest.equals(42.0)); | 371 unittest.expect(o.score, unittest.equals(42.0)); |
328 } | 372 } |
329 buildCounterColorInfo--; | 373 buildCounterColorInfo--; |
330 } | 374 } |
331 | 375 |
332 buildUnnamed1166() { | 376 core.int buildCounterCropHint = 0; |
| 377 buildCropHint() { |
| 378 var o = new api.CropHint(); |
| 379 buildCounterCropHint++; |
| 380 if (buildCounterCropHint < 3) { |
| 381 o.boundingPoly = buildBoundingPoly(); |
| 382 o.confidence = 42.0; |
| 383 o.importanceFraction = 42.0; |
| 384 } |
| 385 buildCounterCropHint--; |
| 386 return o; |
| 387 } |
| 388 |
| 389 checkCropHint(api.CropHint o) { |
| 390 buildCounterCropHint++; |
| 391 if (buildCounterCropHint < 3) { |
| 392 checkBoundingPoly(o.boundingPoly); |
| 393 unittest.expect(o.confidence, unittest.equals(42.0)); |
| 394 unittest.expect(o.importanceFraction, unittest.equals(42.0)); |
| 395 } |
| 396 buildCounterCropHint--; |
| 397 } |
| 398 |
| 399 buildUnnamed1187() { |
| 400 var o = new core.List<api.CropHint>(); |
| 401 o.add(buildCropHint()); |
| 402 o.add(buildCropHint()); |
| 403 return o; |
| 404 } |
| 405 |
| 406 checkUnnamed1187(core.List<api.CropHint> o) { |
| 407 unittest.expect(o, unittest.hasLength(2)); |
| 408 checkCropHint(o[0]); |
| 409 checkCropHint(o[1]); |
| 410 } |
| 411 |
| 412 core.int buildCounterCropHintsAnnotation = 0; |
| 413 buildCropHintsAnnotation() { |
| 414 var o = new api.CropHintsAnnotation(); |
| 415 buildCounterCropHintsAnnotation++; |
| 416 if (buildCounterCropHintsAnnotation < 3) { |
| 417 o.cropHints = buildUnnamed1187(); |
| 418 } |
| 419 buildCounterCropHintsAnnotation--; |
| 420 return o; |
| 421 } |
| 422 |
| 423 checkCropHintsAnnotation(api.CropHintsAnnotation o) { |
| 424 buildCounterCropHintsAnnotation++; |
| 425 if (buildCounterCropHintsAnnotation < 3) { |
| 426 checkUnnamed1187(o.cropHints); |
| 427 } |
| 428 buildCounterCropHintsAnnotation--; |
| 429 } |
| 430 |
| 431 buildUnnamed1188() { |
| 432 var o = new core.List<core.double>(); |
| 433 o.add(42.0); |
| 434 o.add(42.0); |
| 435 return o; |
| 436 } |
| 437 |
| 438 checkUnnamed1188(core.List<core.double> o) { |
| 439 unittest.expect(o, unittest.hasLength(2)); |
| 440 unittest.expect(o[0], unittest.equals(42.0)); |
| 441 unittest.expect(o[1], unittest.equals(42.0)); |
| 442 } |
| 443 |
| 444 core.int buildCounterCropHintsParams = 0; |
| 445 buildCropHintsParams() { |
| 446 var o = new api.CropHintsParams(); |
| 447 buildCounterCropHintsParams++; |
| 448 if (buildCounterCropHintsParams < 3) { |
| 449 o.aspectRatios = buildUnnamed1188(); |
| 450 } |
| 451 buildCounterCropHintsParams--; |
| 452 return o; |
| 453 } |
| 454 |
| 455 checkCropHintsParams(api.CropHintsParams o) { |
| 456 buildCounterCropHintsParams++; |
| 457 if (buildCounterCropHintsParams < 3) { |
| 458 checkUnnamed1188(o.aspectRatios); |
| 459 } |
| 460 buildCounterCropHintsParams--; |
| 461 } |
| 462 |
| 463 core.int buildCounterDetectedBreak = 0; |
| 464 buildDetectedBreak() { |
| 465 var o = new api.DetectedBreak(); |
| 466 buildCounterDetectedBreak++; |
| 467 if (buildCounterDetectedBreak < 3) { |
| 468 o.isPrefix = true; |
| 469 o.type = "foo"; |
| 470 } |
| 471 buildCounterDetectedBreak--; |
| 472 return o; |
| 473 } |
| 474 |
| 475 checkDetectedBreak(api.DetectedBreak o) { |
| 476 buildCounterDetectedBreak++; |
| 477 if (buildCounterDetectedBreak < 3) { |
| 478 unittest.expect(o.isPrefix, unittest.isTrue); |
| 479 unittest.expect(o.type, unittest.equals('foo')); |
| 480 } |
| 481 buildCounterDetectedBreak--; |
| 482 } |
| 483 |
| 484 core.int buildCounterDetectedLanguage = 0; |
| 485 buildDetectedLanguage() { |
| 486 var o = new api.DetectedLanguage(); |
| 487 buildCounterDetectedLanguage++; |
| 488 if (buildCounterDetectedLanguage < 3) { |
| 489 o.confidence = 42.0; |
| 490 o.languageCode = "foo"; |
| 491 } |
| 492 buildCounterDetectedLanguage--; |
| 493 return o; |
| 494 } |
| 495 |
| 496 checkDetectedLanguage(api.DetectedLanguage o) { |
| 497 buildCounterDetectedLanguage++; |
| 498 if (buildCounterDetectedLanguage < 3) { |
| 499 unittest.expect(o.confidence, unittest.equals(42.0)); |
| 500 unittest.expect(o.languageCode, unittest.equals('foo')); |
| 501 } |
| 502 buildCounterDetectedLanguage--; |
| 503 } |
| 504 |
| 505 buildUnnamed1189() { |
333 var o = new core.List<api.ColorInfo>(); | 506 var o = new core.List<api.ColorInfo>(); |
334 o.add(buildColorInfo()); | 507 o.add(buildColorInfo()); |
335 o.add(buildColorInfo()); | 508 o.add(buildColorInfo()); |
336 return o; | 509 return o; |
337 } | 510 } |
338 | 511 |
339 checkUnnamed1166(core.List<api.ColorInfo> o) { | 512 checkUnnamed1189(core.List<api.ColorInfo> o) { |
340 unittest.expect(o, unittest.hasLength(2)); | 513 unittest.expect(o, unittest.hasLength(2)); |
341 checkColorInfo(o[0]); | 514 checkColorInfo(o[0]); |
342 checkColorInfo(o[1]); | 515 checkColorInfo(o[1]); |
343 } | 516 } |
344 | 517 |
345 core.int buildCounterDominantColorsAnnotation = 0; | 518 core.int buildCounterDominantColorsAnnotation = 0; |
346 buildDominantColorsAnnotation() { | 519 buildDominantColorsAnnotation() { |
347 var o = new api.DominantColorsAnnotation(); | 520 var o = new api.DominantColorsAnnotation(); |
348 buildCounterDominantColorsAnnotation++; | 521 buildCounterDominantColorsAnnotation++; |
349 if (buildCounterDominantColorsAnnotation < 3) { | 522 if (buildCounterDominantColorsAnnotation < 3) { |
350 o.colors = buildUnnamed1166(); | 523 o.colors = buildUnnamed1189(); |
351 } | 524 } |
352 buildCounterDominantColorsAnnotation--; | 525 buildCounterDominantColorsAnnotation--; |
353 return o; | 526 return o; |
354 } | 527 } |
355 | 528 |
356 checkDominantColorsAnnotation(api.DominantColorsAnnotation o) { | 529 checkDominantColorsAnnotation(api.DominantColorsAnnotation o) { |
357 buildCounterDominantColorsAnnotation++; | 530 buildCounterDominantColorsAnnotation++; |
358 if (buildCounterDominantColorsAnnotation < 3) { | 531 if (buildCounterDominantColorsAnnotation < 3) { |
359 checkUnnamed1166(o.colors); | 532 checkUnnamed1189(o.colors); |
360 } | 533 } |
361 buildCounterDominantColorsAnnotation--; | 534 buildCounterDominantColorsAnnotation--; |
362 } | 535 } |
363 | 536 |
364 buildUnnamed1167() { | 537 buildUnnamed1190() { |
365 var o = new core.List<api.LocationInfo>(); | 538 var o = new core.List<api.LocationInfo>(); |
366 o.add(buildLocationInfo()); | 539 o.add(buildLocationInfo()); |
367 o.add(buildLocationInfo()); | 540 o.add(buildLocationInfo()); |
368 return o; | 541 return o; |
369 } | 542 } |
370 | 543 |
371 checkUnnamed1167(core.List<api.LocationInfo> o) { | 544 checkUnnamed1190(core.List<api.LocationInfo> o) { |
372 unittest.expect(o, unittest.hasLength(2)); | 545 unittest.expect(o, unittest.hasLength(2)); |
373 checkLocationInfo(o[0]); | 546 checkLocationInfo(o[0]); |
374 checkLocationInfo(o[1]); | 547 checkLocationInfo(o[1]); |
375 } | 548 } |
376 | 549 |
377 buildUnnamed1168() { | 550 buildUnnamed1191() { |
378 var o = new core.List<api.Property>(); | 551 var o = new core.List<api.Property>(); |
379 o.add(buildProperty()); | 552 o.add(buildProperty()); |
380 o.add(buildProperty()); | 553 o.add(buildProperty()); |
381 return o; | 554 return o; |
382 } | 555 } |
383 | 556 |
384 checkUnnamed1168(core.List<api.Property> o) { | 557 checkUnnamed1191(core.List<api.Property> o) { |
385 unittest.expect(o, unittest.hasLength(2)); | 558 unittest.expect(o, unittest.hasLength(2)); |
386 checkProperty(o[0]); | 559 checkProperty(o[0]); |
387 checkProperty(o[1]); | 560 checkProperty(o[1]); |
388 } | 561 } |
389 | 562 |
390 core.int buildCounterEntityAnnotation = 0; | 563 core.int buildCounterEntityAnnotation = 0; |
391 buildEntityAnnotation() { | 564 buildEntityAnnotation() { |
392 var o = new api.EntityAnnotation(); | 565 var o = new api.EntityAnnotation(); |
393 buildCounterEntityAnnotation++; | 566 buildCounterEntityAnnotation++; |
394 if (buildCounterEntityAnnotation < 3) { | 567 if (buildCounterEntityAnnotation < 3) { |
395 o.boundingPoly = buildBoundingPoly(); | 568 o.boundingPoly = buildBoundingPoly(); |
396 o.confidence = 42.0; | 569 o.confidence = 42.0; |
397 o.description = "foo"; | 570 o.description = "foo"; |
398 o.locale = "foo"; | 571 o.locale = "foo"; |
399 o.locations = buildUnnamed1167(); | 572 o.locations = buildUnnamed1190(); |
400 o.mid = "foo"; | 573 o.mid = "foo"; |
401 o.properties = buildUnnamed1168(); | 574 o.properties = buildUnnamed1191(); |
402 o.score = 42.0; | 575 o.score = 42.0; |
403 o.topicality = 42.0; | 576 o.topicality = 42.0; |
404 } | 577 } |
405 buildCounterEntityAnnotation--; | 578 buildCounterEntityAnnotation--; |
406 return o; | 579 return o; |
407 } | 580 } |
408 | 581 |
409 checkEntityAnnotation(api.EntityAnnotation o) { | 582 checkEntityAnnotation(api.EntityAnnotation o) { |
410 buildCounterEntityAnnotation++; | 583 buildCounterEntityAnnotation++; |
411 if (buildCounterEntityAnnotation < 3) { | 584 if (buildCounterEntityAnnotation < 3) { |
412 checkBoundingPoly(o.boundingPoly); | 585 checkBoundingPoly(o.boundingPoly); |
413 unittest.expect(o.confidence, unittest.equals(42.0)); | 586 unittest.expect(o.confidence, unittest.equals(42.0)); |
414 unittest.expect(o.description, unittest.equals('foo')); | 587 unittest.expect(o.description, unittest.equals('foo')); |
415 unittest.expect(o.locale, unittest.equals('foo')); | 588 unittest.expect(o.locale, unittest.equals('foo')); |
416 checkUnnamed1167(o.locations); | 589 checkUnnamed1190(o.locations); |
417 unittest.expect(o.mid, unittest.equals('foo')); | 590 unittest.expect(o.mid, unittest.equals('foo')); |
418 checkUnnamed1168(o.properties); | 591 checkUnnamed1191(o.properties); |
419 unittest.expect(o.score, unittest.equals(42.0)); | 592 unittest.expect(o.score, unittest.equals(42.0)); |
420 unittest.expect(o.topicality, unittest.equals(42.0)); | 593 unittest.expect(o.topicality, unittest.equals(42.0)); |
421 } | 594 } |
422 buildCounterEntityAnnotation--; | 595 buildCounterEntityAnnotation--; |
423 } | 596 } |
424 | 597 |
425 buildUnnamed1169() { | 598 buildUnnamed1192() { |
426 var o = new core.List<api.Landmark>(); | 599 var o = new core.List<api.Landmark>(); |
427 o.add(buildLandmark()); | 600 o.add(buildLandmark()); |
428 o.add(buildLandmark()); | 601 o.add(buildLandmark()); |
429 return o; | 602 return o; |
430 } | 603 } |
431 | 604 |
432 checkUnnamed1169(core.List<api.Landmark> o) { | 605 checkUnnamed1192(core.List<api.Landmark> o) { |
433 unittest.expect(o, unittest.hasLength(2)); | 606 unittest.expect(o, unittest.hasLength(2)); |
434 checkLandmark(o[0]); | 607 checkLandmark(o[0]); |
435 checkLandmark(o[1]); | 608 checkLandmark(o[1]); |
436 } | 609 } |
437 | 610 |
438 core.int buildCounterFaceAnnotation = 0; | 611 core.int buildCounterFaceAnnotation = 0; |
439 buildFaceAnnotation() { | 612 buildFaceAnnotation() { |
440 var o = new api.FaceAnnotation(); | 613 var o = new api.FaceAnnotation(); |
441 buildCounterFaceAnnotation++; | 614 buildCounterFaceAnnotation++; |
442 if (buildCounterFaceAnnotation < 3) { | 615 if (buildCounterFaceAnnotation < 3) { |
443 o.angerLikelihood = "foo"; | 616 o.angerLikelihood = "foo"; |
444 o.blurredLikelihood = "foo"; | 617 o.blurredLikelihood = "foo"; |
445 o.boundingPoly = buildBoundingPoly(); | 618 o.boundingPoly = buildBoundingPoly(); |
446 o.detectionConfidence = 42.0; | 619 o.detectionConfidence = 42.0; |
447 o.fdBoundingPoly = buildBoundingPoly(); | 620 o.fdBoundingPoly = buildBoundingPoly(); |
448 o.headwearLikelihood = "foo"; | 621 o.headwearLikelihood = "foo"; |
449 o.joyLikelihood = "foo"; | 622 o.joyLikelihood = "foo"; |
450 o.landmarkingConfidence = 42.0; | 623 o.landmarkingConfidence = 42.0; |
451 o.landmarks = buildUnnamed1169(); | 624 o.landmarks = buildUnnamed1192(); |
452 o.panAngle = 42.0; | 625 o.panAngle = 42.0; |
453 o.rollAngle = 42.0; | 626 o.rollAngle = 42.0; |
454 o.sorrowLikelihood = "foo"; | 627 o.sorrowLikelihood = "foo"; |
455 o.surpriseLikelihood = "foo"; | 628 o.surpriseLikelihood = "foo"; |
456 o.tiltAngle = 42.0; | 629 o.tiltAngle = 42.0; |
457 o.underExposedLikelihood = "foo"; | 630 o.underExposedLikelihood = "foo"; |
458 } | 631 } |
459 buildCounterFaceAnnotation--; | 632 buildCounterFaceAnnotation--; |
460 return o; | 633 return o; |
461 } | 634 } |
462 | 635 |
463 checkFaceAnnotation(api.FaceAnnotation o) { | 636 checkFaceAnnotation(api.FaceAnnotation o) { |
464 buildCounterFaceAnnotation++; | 637 buildCounterFaceAnnotation++; |
465 if (buildCounterFaceAnnotation < 3) { | 638 if (buildCounterFaceAnnotation < 3) { |
466 unittest.expect(o.angerLikelihood, unittest.equals('foo')); | 639 unittest.expect(o.angerLikelihood, unittest.equals('foo')); |
467 unittest.expect(o.blurredLikelihood, unittest.equals('foo')); | 640 unittest.expect(o.blurredLikelihood, unittest.equals('foo')); |
468 checkBoundingPoly(o.boundingPoly); | 641 checkBoundingPoly(o.boundingPoly); |
469 unittest.expect(o.detectionConfidence, unittest.equals(42.0)); | 642 unittest.expect(o.detectionConfidence, unittest.equals(42.0)); |
470 checkBoundingPoly(o.fdBoundingPoly); | 643 checkBoundingPoly(o.fdBoundingPoly); |
471 unittest.expect(o.headwearLikelihood, unittest.equals('foo')); | 644 unittest.expect(o.headwearLikelihood, unittest.equals('foo')); |
472 unittest.expect(o.joyLikelihood, unittest.equals('foo')); | 645 unittest.expect(o.joyLikelihood, unittest.equals('foo')); |
473 unittest.expect(o.landmarkingConfidence, unittest.equals(42.0)); | 646 unittest.expect(o.landmarkingConfidence, unittest.equals(42.0)); |
474 checkUnnamed1169(o.landmarks); | 647 checkUnnamed1192(o.landmarks); |
475 unittest.expect(o.panAngle, unittest.equals(42.0)); | 648 unittest.expect(o.panAngle, unittest.equals(42.0)); |
476 unittest.expect(o.rollAngle, unittest.equals(42.0)); | 649 unittest.expect(o.rollAngle, unittest.equals(42.0)); |
477 unittest.expect(o.sorrowLikelihood, unittest.equals('foo')); | 650 unittest.expect(o.sorrowLikelihood, unittest.equals('foo')); |
478 unittest.expect(o.surpriseLikelihood, unittest.equals('foo')); | 651 unittest.expect(o.surpriseLikelihood, unittest.equals('foo')); |
479 unittest.expect(o.tiltAngle, unittest.equals(42.0)); | 652 unittest.expect(o.tiltAngle, unittest.equals(42.0)); |
480 unittest.expect(o.underExposedLikelihood, unittest.equals('foo')); | 653 unittest.expect(o.underExposedLikelihood, unittest.equals('foo')); |
481 } | 654 } |
482 buildCounterFaceAnnotation--; | 655 buildCounterFaceAnnotation--; |
483 } | 656 } |
484 | 657 |
(...skipping 32 matching lines...) Loading... |
517 | 690 |
518 checkImage(api.Image o) { | 691 checkImage(api.Image o) { |
519 buildCounterImage++; | 692 buildCounterImage++; |
520 if (buildCounterImage < 3) { | 693 if (buildCounterImage < 3) { |
521 unittest.expect(o.content, unittest.equals('foo')); | 694 unittest.expect(o.content, unittest.equals('foo')); |
522 checkImageSource(o.source); | 695 checkImageSource(o.source); |
523 } | 696 } |
524 buildCounterImage--; | 697 buildCounterImage--; |
525 } | 698 } |
526 | 699 |
527 buildUnnamed1170() { | 700 buildUnnamed1193() { |
528 var o = new core.List<core.String>(); | 701 var o = new core.List<core.String>(); |
529 o.add("foo"); | 702 o.add("foo"); |
530 o.add("foo"); | 703 o.add("foo"); |
531 return o; | 704 return o; |
532 } | 705 } |
533 | 706 |
534 checkUnnamed1170(core.List<core.String> o) { | 707 checkUnnamed1193(core.List<core.String> o) { |
535 unittest.expect(o, unittest.hasLength(2)); | 708 unittest.expect(o, unittest.hasLength(2)); |
536 unittest.expect(o[0], unittest.equals('foo')); | 709 unittest.expect(o[0], unittest.equals('foo')); |
537 unittest.expect(o[1], unittest.equals('foo')); | 710 unittest.expect(o[1], unittest.equals('foo')); |
538 } | 711 } |
539 | 712 |
540 core.int buildCounterImageContext = 0; | 713 core.int buildCounterImageContext = 0; |
541 buildImageContext() { | 714 buildImageContext() { |
542 var o = new api.ImageContext(); | 715 var o = new api.ImageContext(); |
543 buildCounterImageContext++; | 716 buildCounterImageContext++; |
544 if (buildCounterImageContext < 3) { | 717 if (buildCounterImageContext < 3) { |
545 o.languageHints = buildUnnamed1170(); | 718 o.cropHintsParams = buildCropHintsParams(); |
| 719 o.languageHints = buildUnnamed1193(); |
546 o.latLongRect = buildLatLongRect(); | 720 o.latLongRect = buildLatLongRect(); |
547 } | 721 } |
548 buildCounterImageContext--; | 722 buildCounterImageContext--; |
549 return o; | 723 return o; |
550 } | 724 } |
551 | 725 |
552 checkImageContext(api.ImageContext o) { | 726 checkImageContext(api.ImageContext o) { |
553 buildCounterImageContext++; | 727 buildCounterImageContext++; |
554 if (buildCounterImageContext < 3) { | 728 if (buildCounterImageContext < 3) { |
555 checkUnnamed1170(o.languageHints); | 729 checkCropHintsParams(o.cropHintsParams); |
| 730 checkUnnamed1193(o.languageHints); |
556 checkLatLongRect(o.latLongRect); | 731 checkLatLongRect(o.latLongRect); |
557 } | 732 } |
558 buildCounterImageContext--; | 733 buildCounterImageContext--; |
559 } | 734 } |
560 | 735 |
561 core.int buildCounterImageProperties = 0; | 736 core.int buildCounterImageProperties = 0; |
562 buildImageProperties() { | 737 buildImageProperties() { |
563 var o = new api.ImageProperties(); | 738 var o = new api.ImageProperties(); |
564 buildCounterImageProperties++; | 739 buildCounterImageProperties++; |
565 if (buildCounterImageProperties < 3) { | 740 if (buildCounterImageProperties < 3) { |
(...skipping 10 matching lines...) Loading... |
576 } | 751 } |
577 buildCounterImageProperties--; | 752 buildCounterImageProperties--; |
578 } | 753 } |
579 | 754 |
580 core.int buildCounterImageSource = 0; | 755 core.int buildCounterImageSource = 0; |
581 buildImageSource() { | 756 buildImageSource() { |
582 var o = new api.ImageSource(); | 757 var o = new api.ImageSource(); |
583 buildCounterImageSource++; | 758 buildCounterImageSource++; |
584 if (buildCounterImageSource < 3) { | 759 if (buildCounterImageSource < 3) { |
585 o.gcsImageUri = "foo"; | 760 o.gcsImageUri = "foo"; |
| 761 o.imageUri = "foo"; |
586 } | 762 } |
587 buildCounterImageSource--; | 763 buildCounterImageSource--; |
588 return o; | 764 return o; |
589 } | 765 } |
590 | 766 |
591 checkImageSource(api.ImageSource o) { | 767 checkImageSource(api.ImageSource o) { |
592 buildCounterImageSource++; | 768 buildCounterImageSource++; |
593 if (buildCounterImageSource < 3) { | 769 if (buildCounterImageSource < 3) { |
594 unittest.expect(o.gcsImageUri, unittest.equals('foo')); | 770 unittest.expect(o.gcsImageUri, unittest.equals('foo')); |
| 771 unittest.expect(o.imageUri, unittest.equals('foo')); |
595 } | 772 } |
596 buildCounterImageSource--; | 773 buildCounterImageSource--; |
597 } | 774 } |
598 | 775 |
599 core.int buildCounterLandmark = 0; | 776 core.int buildCounterLandmark = 0; |
600 buildLandmark() { | 777 buildLandmark() { |
601 var o = new api.Landmark(); | 778 var o = new api.Landmark(); |
602 buildCounterLandmark++; | 779 buildCounterLandmark++; |
603 if (buildCounterLandmark < 3) { | 780 if (buildCounterLandmark < 3) { |
604 o.position = buildPosition(); | 781 o.position = buildPosition(); |
(...skipping 66 matching lines...) Loading... |
671 } | 848 } |
672 | 849 |
673 checkLocationInfo(api.LocationInfo o) { | 850 checkLocationInfo(api.LocationInfo o) { |
674 buildCounterLocationInfo++; | 851 buildCounterLocationInfo++; |
675 if (buildCounterLocationInfo < 3) { | 852 if (buildCounterLocationInfo < 3) { |
676 checkLatLng(o.latLng); | 853 checkLatLng(o.latLng); |
677 } | 854 } |
678 buildCounterLocationInfo--; | 855 buildCounterLocationInfo--; |
679 } | 856 } |
680 | 857 |
| 858 buildUnnamed1194() { |
| 859 var o = new core.List<api.Block>(); |
| 860 o.add(buildBlock()); |
| 861 o.add(buildBlock()); |
| 862 return o; |
| 863 } |
| 864 |
| 865 checkUnnamed1194(core.List<api.Block> o) { |
| 866 unittest.expect(o, unittest.hasLength(2)); |
| 867 checkBlock(o[0]); |
| 868 checkBlock(o[1]); |
| 869 } |
| 870 |
| 871 core.int buildCounterPage = 0; |
| 872 buildPage() { |
| 873 var o = new api.Page(); |
| 874 buildCounterPage++; |
| 875 if (buildCounterPage < 3) { |
| 876 o.blocks = buildUnnamed1194(); |
| 877 o.height = 42; |
| 878 o.property = buildTextProperty(); |
| 879 o.width = 42; |
| 880 } |
| 881 buildCounterPage--; |
| 882 return o; |
| 883 } |
| 884 |
| 885 checkPage(api.Page o) { |
| 886 buildCounterPage++; |
| 887 if (buildCounterPage < 3) { |
| 888 checkUnnamed1194(o.blocks); |
| 889 unittest.expect(o.height, unittest.equals(42)); |
| 890 checkTextProperty(o.property); |
| 891 unittest.expect(o.width, unittest.equals(42)); |
| 892 } |
| 893 buildCounterPage--; |
| 894 } |
| 895 |
| 896 buildUnnamed1195() { |
| 897 var o = new core.List<api.Word>(); |
| 898 o.add(buildWord()); |
| 899 o.add(buildWord()); |
| 900 return o; |
| 901 } |
| 902 |
| 903 checkUnnamed1195(core.List<api.Word> o) { |
| 904 unittest.expect(o, unittest.hasLength(2)); |
| 905 checkWord(o[0]); |
| 906 checkWord(o[1]); |
| 907 } |
| 908 |
| 909 core.int buildCounterParagraph = 0; |
| 910 buildParagraph() { |
| 911 var o = new api.Paragraph(); |
| 912 buildCounterParagraph++; |
| 913 if (buildCounterParagraph < 3) { |
| 914 o.boundingBox = buildBoundingPoly(); |
| 915 o.property = buildTextProperty(); |
| 916 o.words = buildUnnamed1195(); |
| 917 } |
| 918 buildCounterParagraph--; |
| 919 return o; |
| 920 } |
| 921 |
| 922 checkParagraph(api.Paragraph o) { |
| 923 buildCounterParagraph++; |
| 924 if (buildCounterParagraph < 3) { |
| 925 checkBoundingPoly(o.boundingBox); |
| 926 checkTextProperty(o.property); |
| 927 checkUnnamed1195(o.words); |
| 928 } |
| 929 buildCounterParagraph--; |
| 930 } |
| 931 |
681 core.int buildCounterPosition = 0; | 932 core.int buildCounterPosition = 0; |
682 buildPosition() { | 933 buildPosition() { |
683 var o = new api.Position(); | 934 var o = new api.Position(); |
684 buildCounterPosition++; | 935 buildCounterPosition++; |
685 if (buildCounterPosition < 3) { | 936 if (buildCounterPosition < 3) { |
686 o.x = 42.0; | 937 o.x = 42.0; |
687 o.y = 42.0; | 938 o.y = 42.0; |
688 o.z = 42.0; | 939 o.z = 42.0; |
689 } | 940 } |
690 buildCounterPosition--; | 941 buildCounterPosition--; |
691 return o; | 942 return o; |
692 } | 943 } |
693 | 944 |
694 checkPosition(api.Position o) { | 945 checkPosition(api.Position o) { |
695 buildCounterPosition++; | 946 buildCounterPosition++; |
696 if (buildCounterPosition < 3) { | 947 if (buildCounterPosition < 3) { |
697 unittest.expect(o.x, unittest.equals(42.0)); | 948 unittest.expect(o.x, unittest.equals(42.0)); |
698 unittest.expect(o.y, unittest.equals(42.0)); | 949 unittest.expect(o.y, unittest.equals(42.0)); |
699 unittest.expect(o.z, unittest.equals(42.0)); | 950 unittest.expect(o.z, unittest.equals(42.0)); |
700 } | 951 } |
701 buildCounterPosition--; | 952 buildCounterPosition--; |
702 } | 953 } |
703 | 954 |
704 core.int buildCounterProperty = 0; | 955 core.int buildCounterProperty = 0; |
705 buildProperty() { | 956 buildProperty() { |
706 var o = new api.Property(); | 957 var o = new api.Property(); |
707 buildCounterProperty++; | 958 buildCounterProperty++; |
708 if (buildCounterProperty < 3) { | 959 if (buildCounterProperty < 3) { |
709 o.name = "foo"; | 960 o.name = "foo"; |
| 961 o.uint64Value = "foo"; |
710 o.value = "foo"; | 962 o.value = "foo"; |
711 } | 963 } |
712 buildCounterProperty--; | 964 buildCounterProperty--; |
713 return o; | 965 return o; |
714 } | 966 } |
715 | 967 |
716 checkProperty(api.Property o) { | 968 checkProperty(api.Property o) { |
717 buildCounterProperty++; | 969 buildCounterProperty++; |
718 if (buildCounterProperty < 3) { | 970 if (buildCounterProperty < 3) { |
719 unittest.expect(o.name, unittest.equals('foo')); | 971 unittest.expect(o.name, unittest.equals('foo')); |
| 972 unittest.expect(o.uint64Value, unittest.equals('foo')); |
720 unittest.expect(o.value, unittest.equals('foo')); | 973 unittest.expect(o.value, unittest.equals('foo')); |
721 } | 974 } |
722 buildCounterProperty--; | 975 buildCounterProperty--; |
723 } | 976 } |
724 | 977 |
725 core.int buildCounterSafeSearchAnnotation = 0; | 978 core.int buildCounterSafeSearchAnnotation = 0; |
726 buildSafeSearchAnnotation() { | 979 buildSafeSearchAnnotation() { |
727 var o = new api.SafeSearchAnnotation(); | 980 var o = new api.SafeSearchAnnotation(); |
728 buildCounterSafeSearchAnnotation++; | 981 buildCounterSafeSearchAnnotation++; |
729 if (buildCounterSafeSearchAnnotation < 3) { | 982 if (buildCounterSafeSearchAnnotation < 3) { |
(...skipping 10 matching lines...) Loading... |
740 buildCounterSafeSearchAnnotation++; | 993 buildCounterSafeSearchAnnotation++; |
741 if (buildCounterSafeSearchAnnotation < 3) { | 994 if (buildCounterSafeSearchAnnotation < 3) { |
742 unittest.expect(o.adult, unittest.equals('foo')); | 995 unittest.expect(o.adult, unittest.equals('foo')); |
743 unittest.expect(o.medical, unittest.equals('foo')); | 996 unittest.expect(o.medical, unittest.equals('foo')); |
744 unittest.expect(o.spoof, unittest.equals('foo')); | 997 unittest.expect(o.spoof, unittest.equals('foo')); |
745 unittest.expect(o.violence, unittest.equals('foo')); | 998 unittest.expect(o.violence, unittest.equals('foo')); |
746 } | 999 } |
747 buildCounterSafeSearchAnnotation--; | 1000 buildCounterSafeSearchAnnotation--; |
748 } | 1001 } |
749 | 1002 |
750 buildUnnamed1171() { | 1003 buildUnnamed1196() { |
751 var o = new core.Map<core.String, core.Object>(); | 1004 var o = new core.Map<core.String, core.Object>(); |
752 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 1005 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; |
753 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 1006 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; |
754 return o; | 1007 return o; |
755 } | 1008 } |
756 | 1009 |
757 checkUnnamed1171(core.Map<core.String, core.Object> o) { | 1010 checkUnnamed1196(core.Map<core.String, core.Object> o) { |
758 unittest.expect(o, unittest.hasLength(2)); | 1011 unittest.expect(o, unittest.hasLength(2)); |
759 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')); | 1012 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')); |
760 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')); | 1013 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')); |
761 } | 1014 } |
762 | 1015 |
763 buildUnnamed1172() { | 1016 buildUnnamed1197() { |
764 var o = new core.List<core.Map<core.String, core.Object>>(); | 1017 var o = new core.List<core.Map<core.String, core.Object>>(); |
765 o.add(buildUnnamed1171()); | 1018 o.add(buildUnnamed1196()); |
766 o.add(buildUnnamed1171()); | 1019 o.add(buildUnnamed1196()); |
767 return o; | 1020 return o; |
768 } | 1021 } |
769 | 1022 |
770 checkUnnamed1172(core.List<core.Map<core.String, core.Object>> o) { | 1023 checkUnnamed1197(core.List<core.Map<core.String, core.Object>> o) { |
771 unittest.expect(o, unittest.hasLength(2)); | 1024 unittest.expect(o, unittest.hasLength(2)); |
772 checkUnnamed1171(o[0]); | 1025 checkUnnamed1196(o[0]); |
773 checkUnnamed1171(o[1]); | 1026 checkUnnamed1196(o[1]); |
774 } | 1027 } |
775 | 1028 |
776 core.int buildCounterStatus = 0; | 1029 core.int buildCounterStatus = 0; |
777 buildStatus() { | 1030 buildStatus() { |
778 var o = new api.Status(); | 1031 var o = new api.Status(); |
779 buildCounterStatus++; | 1032 buildCounterStatus++; |
780 if (buildCounterStatus < 3) { | 1033 if (buildCounterStatus < 3) { |
781 o.code = 42; | 1034 o.code = 42; |
782 o.details = buildUnnamed1172(); | 1035 o.details = buildUnnamed1197(); |
783 o.message = "foo"; | 1036 o.message = "foo"; |
784 } | 1037 } |
785 buildCounterStatus--; | 1038 buildCounterStatus--; |
786 return o; | 1039 return o; |
787 } | 1040 } |
788 | 1041 |
789 checkStatus(api.Status o) { | 1042 checkStatus(api.Status o) { |
790 buildCounterStatus++; | 1043 buildCounterStatus++; |
791 if (buildCounterStatus < 3) { | 1044 if (buildCounterStatus < 3) { |
792 unittest.expect(o.code, unittest.equals(42)); | 1045 unittest.expect(o.code, unittest.equals(42)); |
793 checkUnnamed1172(o.details); | 1046 checkUnnamed1197(o.details); |
794 unittest.expect(o.message, unittest.equals('foo')); | 1047 unittest.expect(o.message, unittest.equals('foo')); |
795 } | 1048 } |
796 buildCounterStatus--; | 1049 buildCounterStatus--; |
797 } | 1050 } |
798 | 1051 |
| 1052 core.int buildCounterSymbol = 0; |
| 1053 buildSymbol() { |
| 1054 var o = new api.Symbol(); |
| 1055 buildCounterSymbol++; |
| 1056 if (buildCounterSymbol < 3) { |
| 1057 o.boundingBox = buildBoundingPoly(); |
| 1058 o.property = buildTextProperty(); |
| 1059 o.text = "foo"; |
| 1060 } |
| 1061 buildCounterSymbol--; |
| 1062 return o; |
| 1063 } |
| 1064 |
| 1065 checkSymbol(api.Symbol o) { |
| 1066 buildCounterSymbol++; |
| 1067 if (buildCounterSymbol < 3) { |
| 1068 checkBoundingPoly(o.boundingBox); |
| 1069 checkTextProperty(o.property); |
| 1070 unittest.expect(o.text, unittest.equals('foo')); |
| 1071 } |
| 1072 buildCounterSymbol--; |
| 1073 } |
| 1074 |
| 1075 buildUnnamed1198() { |
| 1076 var o = new core.List<api.Page>(); |
| 1077 o.add(buildPage()); |
| 1078 o.add(buildPage()); |
| 1079 return o; |
| 1080 } |
| 1081 |
| 1082 checkUnnamed1198(core.List<api.Page> o) { |
| 1083 unittest.expect(o, unittest.hasLength(2)); |
| 1084 checkPage(o[0]); |
| 1085 checkPage(o[1]); |
| 1086 } |
| 1087 |
| 1088 core.int buildCounterTextAnnotation = 0; |
| 1089 buildTextAnnotation() { |
| 1090 var o = new api.TextAnnotation(); |
| 1091 buildCounterTextAnnotation++; |
| 1092 if (buildCounterTextAnnotation < 3) { |
| 1093 o.pages = buildUnnamed1198(); |
| 1094 o.text = "foo"; |
| 1095 } |
| 1096 buildCounterTextAnnotation--; |
| 1097 return o; |
| 1098 } |
| 1099 |
| 1100 checkTextAnnotation(api.TextAnnotation o) { |
| 1101 buildCounterTextAnnotation++; |
| 1102 if (buildCounterTextAnnotation < 3) { |
| 1103 checkUnnamed1198(o.pages); |
| 1104 unittest.expect(o.text, unittest.equals('foo')); |
| 1105 } |
| 1106 buildCounterTextAnnotation--; |
| 1107 } |
| 1108 |
| 1109 buildUnnamed1199() { |
| 1110 var o = new core.List<api.DetectedLanguage>(); |
| 1111 o.add(buildDetectedLanguage()); |
| 1112 o.add(buildDetectedLanguage()); |
| 1113 return o; |
| 1114 } |
| 1115 |
| 1116 checkUnnamed1199(core.List<api.DetectedLanguage> o) { |
| 1117 unittest.expect(o, unittest.hasLength(2)); |
| 1118 checkDetectedLanguage(o[0]); |
| 1119 checkDetectedLanguage(o[1]); |
| 1120 } |
| 1121 |
| 1122 core.int buildCounterTextProperty = 0; |
| 1123 buildTextProperty() { |
| 1124 var o = new api.TextProperty(); |
| 1125 buildCounterTextProperty++; |
| 1126 if (buildCounterTextProperty < 3) { |
| 1127 o.detectedBreak = buildDetectedBreak(); |
| 1128 o.detectedLanguages = buildUnnamed1199(); |
| 1129 } |
| 1130 buildCounterTextProperty--; |
| 1131 return o; |
| 1132 } |
| 1133 |
| 1134 checkTextProperty(api.TextProperty o) { |
| 1135 buildCounterTextProperty++; |
| 1136 if (buildCounterTextProperty < 3) { |
| 1137 checkDetectedBreak(o.detectedBreak); |
| 1138 checkUnnamed1199(o.detectedLanguages); |
| 1139 } |
| 1140 buildCounterTextProperty--; |
| 1141 } |
| 1142 |
799 core.int buildCounterVertex = 0; | 1143 core.int buildCounterVertex = 0; |
800 buildVertex() { | 1144 buildVertex() { |
801 var o = new api.Vertex(); | 1145 var o = new api.Vertex(); |
802 buildCounterVertex++; | 1146 buildCounterVertex++; |
803 if (buildCounterVertex < 3) { | 1147 if (buildCounterVertex < 3) { |
804 o.x = 42; | 1148 o.x = 42; |
805 o.y = 42; | 1149 o.y = 42; |
806 } | 1150 } |
807 buildCounterVertex--; | 1151 buildCounterVertex--; |
808 return o; | 1152 return o; |
809 } | 1153 } |
810 | 1154 |
811 checkVertex(api.Vertex o) { | 1155 checkVertex(api.Vertex o) { |
812 buildCounterVertex++; | 1156 buildCounterVertex++; |
813 if (buildCounterVertex < 3) { | 1157 if (buildCounterVertex < 3) { |
814 unittest.expect(o.x, unittest.equals(42)); | 1158 unittest.expect(o.x, unittest.equals(42)); |
815 unittest.expect(o.y, unittest.equals(42)); | 1159 unittest.expect(o.y, unittest.equals(42)); |
816 } | 1160 } |
817 buildCounterVertex--; | 1161 buildCounterVertex--; |
818 } | 1162 } |
819 | 1163 |
| 1164 buildUnnamed1200() { |
| 1165 var o = new core.List<api.WebImage>(); |
| 1166 o.add(buildWebImage()); |
| 1167 o.add(buildWebImage()); |
| 1168 return o; |
| 1169 } |
| 1170 |
| 1171 checkUnnamed1200(core.List<api.WebImage> o) { |
| 1172 unittest.expect(o, unittest.hasLength(2)); |
| 1173 checkWebImage(o[0]); |
| 1174 checkWebImage(o[1]); |
| 1175 } |
| 1176 |
| 1177 buildUnnamed1201() { |
| 1178 var o = new core.List<api.WebPage>(); |
| 1179 o.add(buildWebPage()); |
| 1180 o.add(buildWebPage()); |
| 1181 return o; |
| 1182 } |
| 1183 |
| 1184 checkUnnamed1201(core.List<api.WebPage> o) { |
| 1185 unittest.expect(o, unittest.hasLength(2)); |
| 1186 checkWebPage(o[0]); |
| 1187 checkWebPage(o[1]); |
| 1188 } |
| 1189 |
| 1190 buildUnnamed1202() { |
| 1191 var o = new core.List<api.WebImage>(); |
| 1192 o.add(buildWebImage()); |
| 1193 o.add(buildWebImage()); |
| 1194 return o; |
| 1195 } |
| 1196 |
| 1197 checkUnnamed1202(core.List<api.WebImage> o) { |
| 1198 unittest.expect(o, unittest.hasLength(2)); |
| 1199 checkWebImage(o[0]); |
| 1200 checkWebImage(o[1]); |
| 1201 } |
| 1202 |
| 1203 buildUnnamed1203() { |
| 1204 var o = new core.List<api.WebEntity>(); |
| 1205 o.add(buildWebEntity()); |
| 1206 o.add(buildWebEntity()); |
| 1207 return o; |
| 1208 } |
| 1209 |
| 1210 checkUnnamed1203(core.List<api.WebEntity> o) { |
| 1211 unittest.expect(o, unittest.hasLength(2)); |
| 1212 checkWebEntity(o[0]); |
| 1213 checkWebEntity(o[1]); |
| 1214 } |
| 1215 |
| 1216 core.int buildCounterWebDetection = 0; |
| 1217 buildWebDetection() { |
| 1218 var o = new api.WebDetection(); |
| 1219 buildCounterWebDetection++; |
| 1220 if (buildCounterWebDetection < 3) { |
| 1221 o.fullMatchingImages = buildUnnamed1200(); |
| 1222 o.pagesWithMatchingImages = buildUnnamed1201(); |
| 1223 o.partialMatchingImages = buildUnnamed1202(); |
| 1224 o.webEntities = buildUnnamed1203(); |
| 1225 } |
| 1226 buildCounterWebDetection--; |
| 1227 return o; |
| 1228 } |
| 1229 |
| 1230 checkWebDetection(api.WebDetection o) { |
| 1231 buildCounterWebDetection++; |
| 1232 if (buildCounterWebDetection < 3) { |
| 1233 checkUnnamed1200(o.fullMatchingImages); |
| 1234 checkUnnamed1201(o.pagesWithMatchingImages); |
| 1235 checkUnnamed1202(o.partialMatchingImages); |
| 1236 checkUnnamed1203(o.webEntities); |
| 1237 } |
| 1238 buildCounterWebDetection--; |
| 1239 } |
| 1240 |
| 1241 core.int buildCounterWebEntity = 0; |
| 1242 buildWebEntity() { |
| 1243 var o = new api.WebEntity(); |
| 1244 buildCounterWebEntity++; |
| 1245 if (buildCounterWebEntity < 3) { |
| 1246 o.description = "foo"; |
| 1247 o.entityId = "foo"; |
| 1248 o.score = 42.0; |
| 1249 } |
| 1250 buildCounterWebEntity--; |
| 1251 return o; |
| 1252 } |
| 1253 |
| 1254 checkWebEntity(api.WebEntity o) { |
| 1255 buildCounterWebEntity++; |
| 1256 if (buildCounterWebEntity < 3) { |
| 1257 unittest.expect(o.description, unittest.equals('foo')); |
| 1258 unittest.expect(o.entityId, unittest.equals('foo')); |
| 1259 unittest.expect(o.score, unittest.equals(42.0)); |
| 1260 } |
| 1261 buildCounterWebEntity--; |
| 1262 } |
| 1263 |
| 1264 core.int buildCounterWebImage = 0; |
| 1265 buildWebImage() { |
| 1266 var o = new api.WebImage(); |
| 1267 buildCounterWebImage++; |
| 1268 if (buildCounterWebImage < 3) { |
| 1269 o.score = 42.0; |
| 1270 o.url = "foo"; |
| 1271 } |
| 1272 buildCounterWebImage--; |
| 1273 return o; |
| 1274 } |
| 1275 |
| 1276 checkWebImage(api.WebImage o) { |
| 1277 buildCounterWebImage++; |
| 1278 if (buildCounterWebImage < 3) { |
| 1279 unittest.expect(o.score, unittest.equals(42.0)); |
| 1280 unittest.expect(o.url, unittest.equals('foo')); |
| 1281 } |
| 1282 buildCounterWebImage--; |
| 1283 } |
| 1284 |
| 1285 core.int buildCounterWebPage = 0; |
| 1286 buildWebPage() { |
| 1287 var o = new api.WebPage(); |
| 1288 buildCounterWebPage++; |
| 1289 if (buildCounterWebPage < 3) { |
| 1290 o.score = 42.0; |
| 1291 o.url = "foo"; |
| 1292 } |
| 1293 buildCounterWebPage--; |
| 1294 return o; |
| 1295 } |
| 1296 |
| 1297 checkWebPage(api.WebPage o) { |
| 1298 buildCounterWebPage++; |
| 1299 if (buildCounterWebPage < 3) { |
| 1300 unittest.expect(o.score, unittest.equals(42.0)); |
| 1301 unittest.expect(o.url, unittest.equals('foo')); |
| 1302 } |
| 1303 buildCounterWebPage--; |
| 1304 } |
| 1305 |
| 1306 buildUnnamed1204() { |
| 1307 var o = new core.List<api.Symbol>(); |
| 1308 o.add(buildSymbol()); |
| 1309 o.add(buildSymbol()); |
| 1310 return o; |
| 1311 } |
| 1312 |
| 1313 checkUnnamed1204(core.List<api.Symbol> o) { |
| 1314 unittest.expect(o, unittest.hasLength(2)); |
| 1315 checkSymbol(o[0]); |
| 1316 checkSymbol(o[1]); |
| 1317 } |
| 1318 |
| 1319 core.int buildCounterWord = 0; |
| 1320 buildWord() { |
| 1321 var o = new api.Word(); |
| 1322 buildCounterWord++; |
| 1323 if (buildCounterWord < 3) { |
| 1324 o.boundingBox = buildBoundingPoly(); |
| 1325 o.property = buildTextProperty(); |
| 1326 o.symbols = buildUnnamed1204(); |
| 1327 } |
| 1328 buildCounterWord--; |
| 1329 return o; |
| 1330 } |
| 1331 |
| 1332 checkWord(api.Word o) { |
| 1333 buildCounterWord++; |
| 1334 if (buildCounterWord < 3) { |
| 1335 checkBoundingPoly(o.boundingBox); |
| 1336 checkTextProperty(o.property); |
| 1337 checkUnnamed1204(o.symbols); |
| 1338 } |
| 1339 buildCounterWord--; |
| 1340 } |
| 1341 |
820 | 1342 |
821 main() { | 1343 main() { |
822 unittest.group("obj-schema-AnnotateImageRequest", () { | 1344 unittest.group("obj-schema-AnnotateImageRequest", () { |
823 unittest.test("to-json--from-json", () { | 1345 unittest.test("to-json--from-json", () { |
824 var o = buildAnnotateImageRequest(); | 1346 var o = buildAnnotateImageRequest(); |
825 var od = new api.AnnotateImageRequest.fromJson(o.toJson()); | 1347 var od = new api.AnnotateImageRequest.fromJson(o.toJson()); |
826 checkAnnotateImageRequest(od); | 1348 checkAnnotateImageRequest(od); |
827 }); | 1349 }); |
828 }); | 1350 }); |
829 | 1351 |
(...skipping 18 matching lines...) Loading... |
848 | 1370 |
849 unittest.group("obj-schema-BatchAnnotateImagesResponse", () { | 1371 unittest.group("obj-schema-BatchAnnotateImagesResponse", () { |
850 unittest.test("to-json--from-json", () { | 1372 unittest.test("to-json--from-json", () { |
851 var o = buildBatchAnnotateImagesResponse(); | 1373 var o = buildBatchAnnotateImagesResponse(); |
852 var od = new api.BatchAnnotateImagesResponse.fromJson(o.toJson()); | 1374 var od = new api.BatchAnnotateImagesResponse.fromJson(o.toJson()); |
853 checkBatchAnnotateImagesResponse(od); | 1375 checkBatchAnnotateImagesResponse(od); |
854 }); | 1376 }); |
855 }); | 1377 }); |
856 | 1378 |
857 | 1379 |
| 1380 unittest.group("obj-schema-Block", () { |
| 1381 unittest.test("to-json--from-json", () { |
| 1382 var o = buildBlock(); |
| 1383 var od = new api.Block.fromJson(o.toJson()); |
| 1384 checkBlock(od); |
| 1385 }); |
| 1386 }); |
| 1387 |
| 1388 |
858 unittest.group("obj-schema-BoundingPoly", () { | 1389 unittest.group("obj-schema-BoundingPoly", () { |
859 unittest.test("to-json--from-json", () { | 1390 unittest.test("to-json--from-json", () { |
860 var o = buildBoundingPoly(); | 1391 var o = buildBoundingPoly(); |
861 var od = new api.BoundingPoly.fromJson(o.toJson()); | 1392 var od = new api.BoundingPoly.fromJson(o.toJson()); |
862 checkBoundingPoly(od); | 1393 checkBoundingPoly(od); |
863 }); | 1394 }); |
864 }); | 1395 }); |
865 | 1396 |
866 | 1397 |
867 unittest.group("obj-schema-Color", () { | 1398 unittest.group("obj-schema-Color", () { |
868 unittest.test("to-json--from-json", () { | 1399 unittest.test("to-json--from-json", () { |
869 var o = buildColor(); | 1400 var o = buildColor(); |
870 var od = new api.Color.fromJson(o.toJson()); | 1401 var od = new api.Color.fromJson(o.toJson()); |
871 checkColor(od); | 1402 checkColor(od); |
872 }); | 1403 }); |
873 }); | 1404 }); |
874 | 1405 |
875 | 1406 |
876 unittest.group("obj-schema-ColorInfo", () { | 1407 unittest.group("obj-schema-ColorInfo", () { |
877 unittest.test("to-json--from-json", () { | 1408 unittest.test("to-json--from-json", () { |
878 var o = buildColorInfo(); | 1409 var o = buildColorInfo(); |
879 var od = new api.ColorInfo.fromJson(o.toJson()); | 1410 var od = new api.ColorInfo.fromJson(o.toJson()); |
880 checkColorInfo(od); | 1411 checkColorInfo(od); |
881 }); | 1412 }); |
882 }); | 1413 }); |
883 | 1414 |
884 | 1415 |
| 1416 unittest.group("obj-schema-CropHint", () { |
| 1417 unittest.test("to-json--from-json", () { |
| 1418 var o = buildCropHint(); |
| 1419 var od = new api.CropHint.fromJson(o.toJson()); |
| 1420 checkCropHint(od); |
| 1421 }); |
| 1422 }); |
| 1423 |
| 1424 |
| 1425 unittest.group("obj-schema-CropHintsAnnotation", () { |
| 1426 unittest.test("to-json--from-json", () { |
| 1427 var o = buildCropHintsAnnotation(); |
| 1428 var od = new api.CropHintsAnnotation.fromJson(o.toJson()); |
| 1429 checkCropHintsAnnotation(od); |
| 1430 }); |
| 1431 }); |
| 1432 |
| 1433 |
| 1434 unittest.group("obj-schema-CropHintsParams", () { |
| 1435 unittest.test("to-json--from-json", () { |
| 1436 var o = buildCropHintsParams(); |
| 1437 var od = new api.CropHintsParams.fromJson(o.toJson()); |
| 1438 checkCropHintsParams(od); |
| 1439 }); |
| 1440 }); |
| 1441 |
| 1442 |
| 1443 unittest.group("obj-schema-DetectedBreak", () { |
| 1444 unittest.test("to-json--from-json", () { |
| 1445 var o = buildDetectedBreak(); |
| 1446 var od = new api.DetectedBreak.fromJson(o.toJson()); |
| 1447 checkDetectedBreak(od); |
| 1448 }); |
| 1449 }); |
| 1450 |
| 1451 |
| 1452 unittest.group("obj-schema-DetectedLanguage", () { |
| 1453 unittest.test("to-json--from-json", () { |
| 1454 var o = buildDetectedLanguage(); |
| 1455 var od = new api.DetectedLanguage.fromJson(o.toJson()); |
| 1456 checkDetectedLanguage(od); |
| 1457 }); |
| 1458 }); |
| 1459 |
| 1460 |
885 unittest.group("obj-schema-DominantColorsAnnotation", () { | 1461 unittest.group("obj-schema-DominantColorsAnnotation", () { |
886 unittest.test("to-json--from-json", () { | 1462 unittest.test("to-json--from-json", () { |
887 var o = buildDominantColorsAnnotation(); | 1463 var o = buildDominantColorsAnnotation(); |
888 var od = new api.DominantColorsAnnotation.fromJson(o.toJson()); | 1464 var od = new api.DominantColorsAnnotation.fromJson(o.toJson()); |
889 checkDominantColorsAnnotation(od); | 1465 checkDominantColorsAnnotation(od); |
890 }); | 1466 }); |
891 }); | 1467 }); |
892 | 1468 |
893 | 1469 |
894 unittest.group("obj-schema-EntityAnnotation", () { | 1470 unittest.group("obj-schema-EntityAnnotation", () { |
(...skipping 88 matching lines...) Loading... |
983 | 1559 |
984 unittest.group("obj-schema-LocationInfo", () { | 1560 unittest.group("obj-schema-LocationInfo", () { |
985 unittest.test("to-json--from-json", () { | 1561 unittest.test("to-json--from-json", () { |
986 var o = buildLocationInfo(); | 1562 var o = buildLocationInfo(); |
987 var od = new api.LocationInfo.fromJson(o.toJson()); | 1563 var od = new api.LocationInfo.fromJson(o.toJson()); |
988 checkLocationInfo(od); | 1564 checkLocationInfo(od); |
989 }); | 1565 }); |
990 }); | 1566 }); |
991 | 1567 |
992 | 1568 |
| 1569 unittest.group("obj-schema-Page", () { |
| 1570 unittest.test("to-json--from-json", () { |
| 1571 var o = buildPage(); |
| 1572 var od = new api.Page.fromJson(o.toJson()); |
| 1573 checkPage(od); |
| 1574 }); |
| 1575 }); |
| 1576 |
| 1577 |
| 1578 unittest.group("obj-schema-Paragraph", () { |
| 1579 unittest.test("to-json--from-json", () { |
| 1580 var o = buildParagraph(); |
| 1581 var od = new api.Paragraph.fromJson(o.toJson()); |
| 1582 checkParagraph(od); |
| 1583 }); |
| 1584 }); |
| 1585 |
| 1586 |
993 unittest.group("obj-schema-Position", () { | 1587 unittest.group("obj-schema-Position", () { |
994 unittest.test("to-json--from-json", () { | 1588 unittest.test("to-json--from-json", () { |
995 var o = buildPosition(); | 1589 var o = buildPosition(); |
996 var od = new api.Position.fromJson(o.toJson()); | 1590 var od = new api.Position.fromJson(o.toJson()); |
997 checkPosition(od); | 1591 checkPosition(od); |
998 }); | 1592 }); |
999 }); | 1593 }); |
1000 | 1594 |
1001 | 1595 |
1002 unittest.group("obj-schema-Property", () { | 1596 unittest.group("obj-schema-Property", () { |
(...skipping 16 matching lines...) Loading... |
1019 | 1613 |
1020 unittest.group("obj-schema-Status", () { | 1614 unittest.group("obj-schema-Status", () { |
1021 unittest.test("to-json--from-json", () { | 1615 unittest.test("to-json--from-json", () { |
1022 var o = buildStatus(); | 1616 var o = buildStatus(); |
1023 var od = new api.Status.fromJson(o.toJson()); | 1617 var od = new api.Status.fromJson(o.toJson()); |
1024 checkStatus(od); | 1618 checkStatus(od); |
1025 }); | 1619 }); |
1026 }); | 1620 }); |
1027 | 1621 |
1028 | 1622 |
| 1623 unittest.group("obj-schema-Symbol", () { |
| 1624 unittest.test("to-json--from-json", () { |
| 1625 var o = buildSymbol(); |
| 1626 var od = new api.Symbol.fromJson(o.toJson()); |
| 1627 checkSymbol(od); |
| 1628 }); |
| 1629 }); |
| 1630 |
| 1631 |
| 1632 unittest.group("obj-schema-TextAnnotation", () { |
| 1633 unittest.test("to-json--from-json", () { |
| 1634 var o = buildTextAnnotation(); |
| 1635 var od = new api.TextAnnotation.fromJson(o.toJson()); |
| 1636 checkTextAnnotation(od); |
| 1637 }); |
| 1638 }); |
| 1639 |
| 1640 |
| 1641 unittest.group("obj-schema-TextProperty", () { |
| 1642 unittest.test("to-json--from-json", () { |
| 1643 var o = buildTextProperty(); |
| 1644 var od = new api.TextProperty.fromJson(o.toJson()); |
| 1645 checkTextProperty(od); |
| 1646 }); |
| 1647 }); |
| 1648 |
| 1649 |
1029 unittest.group("obj-schema-Vertex", () { | 1650 unittest.group("obj-schema-Vertex", () { |
1030 unittest.test("to-json--from-json", () { | 1651 unittest.test("to-json--from-json", () { |
1031 var o = buildVertex(); | 1652 var o = buildVertex(); |
1032 var od = new api.Vertex.fromJson(o.toJson()); | 1653 var od = new api.Vertex.fromJson(o.toJson()); |
1033 checkVertex(od); | 1654 checkVertex(od); |
1034 }); | 1655 }); |
1035 }); | 1656 }); |
1036 | 1657 |
1037 | 1658 |
| 1659 unittest.group("obj-schema-WebDetection", () { |
| 1660 unittest.test("to-json--from-json", () { |
| 1661 var o = buildWebDetection(); |
| 1662 var od = new api.WebDetection.fromJson(o.toJson()); |
| 1663 checkWebDetection(od); |
| 1664 }); |
| 1665 }); |
| 1666 |
| 1667 |
| 1668 unittest.group("obj-schema-WebEntity", () { |
| 1669 unittest.test("to-json--from-json", () { |
| 1670 var o = buildWebEntity(); |
| 1671 var od = new api.WebEntity.fromJson(o.toJson()); |
| 1672 checkWebEntity(od); |
| 1673 }); |
| 1674 }); |
| 1675 |
| 1676 |
| 1677 unittest.group("obj-schema-WebImage", () { |
| 1678 unittest.test("to-json--from-json", () { |
| 1679 var o = buildWebImage(); |
| 1680 var od = new api.WebImage.fromJson(o.toJson()); |
| 1681 checkWebImage(od); |
| 1682 }); |
| 1683 }); |
| 1684 |
| 1685 |
| 1686 unittest.group("obj-schema-WebPage", () { |
| 1687 unittest.test("to-json--from-json", () { |
| 1688 var o = buildWebPage(); |
| 1689 var od = new api.WebPage.fromJson(o.toJson()); |
| 1690 checkWebPage(od); |
| 1691 }); |
| 1692 }); |
| 1693 |
| 1694 |
| 1695 unittest.group("obj-schema-Word", () { |
| 1696 unittest.test("to-json--from-json", () { |
| 1697 var o = buildWord(); |
| 1698 var od = new api.Word.fromJson(o.toJson()); |
| 1699 checkWord(od); |
| 1700 }); |
| 1701 }); |
| 1702 |
| 1703 |
1038 unittest.group("resource-ImagesResourceApi", () { | 1704 unittest.group("resource-ImagesResourceApi", () { |
1039 unittest.test("method--annotate", () { | 1705 unittest.test("method--annotate", () { |
1040 | 1706 |
1041 var mock = new HttpServerMock(); | 1707 var mock = new HttpServerMock(); |
1042 api.ImagesResourceApi res = new api.VisionApi(mock).images; | 1708 api.ImagesResourceApi res = new api.VisionApi(mock).images; |
1043 var arg_request = buildBatchAnnotateImagesRequest(); | 1709 var arg_request = buildBatchAnnotateImagesRequest(); |
1044 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1710 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
1045 var obj = new api.BatchAnnotateImagesRequest.fromJson(json); | 1711 var obj = new api.BatchAnnotateImagesRequest.fromJson(json); |
1046 checkBatchAnnotateImagesRequest(obj); | 1712 checkBatchAnnotateImagesRequest(obj); |
1047 | 1713 |
(...skipping 33 matching lines...) Loading... |
1081 res.annotate(arg_request).then(unittest.expectAsync(((api.BatchAnnotateIma
gesResponse response) { | 1747 res.annotate(arg_request).then(unittest.expectAsync(((api.BatchAnnotateIma
gesResponse response) { |
1082 checkBatchAnnotateImagesResponse(response); | 1748 checkBatchAnnotateImagesResponse(response); |
1083 }))); | 1749 }))); |
1084 }); | 1750 }); |
1085 | 1751 |
1086 }); | 1752 }); |
1087 | 1753 |
1088 | 1754 |
1089 } | 1755 } |
1090 | 1756 |
OLD | NEW |