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...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 } | 44 } |
45 } | 45 } |
46 } | 46 } |
47 | 47 |
48 http.StreamedResponse stringResponse( | 48 http.StreamedResponse stringResponse( |
49 core.int status, core.Map headers, core.String body) { | 49 core.int status, core.Map headers, core.String body) { |
50 var stream = new async.Stream.fromIterable([convert.UTF8.encode(body)]); | 50 var stream = new async.Stream.fromIterable([convert.UTF8.encode(body)]); |
51 return new http.StreamedResponse(stream, status, headers: headers); | 51 return new http.StreamedResponse(stream, status, headers: headers); |
52 } | 52 } |
53 | 53 |
54 buildUnnamed1148() { | 54 buildUnnamed1157() { |
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 checkUnnamed1148(core.List<api.Feature> o) { | 61 checkUnnamed1157(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 = buildUnnamed1148(); | 72 o.features = buildUnnamed1157(); |
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 checkUnnamed1148(o.features); | 83 checkUnnamed1157(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 buildUnnamed1149() { | 90 buildUnnamed1158() { |
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 checkUnnamed1149(core.List<api.FaceAnnotation> o) { | 97 checkUnnamed1158(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 buildUnnamed1150() { | 103 buildUnnamed1159() { |
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 checkUnnamed1150(core.List<api.EntityAnnotation> o) { | 110 checkUnnamed1159(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 buildUnnamed1151() { | 116 buildUnnamed1160() { |
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 checkUnnamed1151(core.List<api.EntityAnnotation> o) { | 123 checkUnnamed1160(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 buildUnnamed1152() { | 129 buildUnnamed1161() { |
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 checkUnnamed1152(core.List<api.EntityAnnotation> o) { | 136 checkUnnamed1161(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 buildUnnamed1153() { | 142 buildUnnamed1162() { |
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 checkUnnamed1153(core.List<api.EntityAnnotation> o) { | 149 checkUnnamed1162(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.error = buildStatus(); | 160 o.error = buildStatus(); |
161 o.faceAnnotations = buildUnnamed1149(); | 161 o.faceAnnotations = buildUnnamed1158(); |
162 o.imagePropertiesAnnotation = buildImageProperties(); | 162 o.imagePropertiesAnnotation = buildImageProperties(); |
163 o.labelAnnotations = buildUnnamed1150(); | 163 o.labelAnnotations = buildUnnamed1159(); |
164 o.landmarkAnnotations = buildUnnamed1151(); | 164 o.landmarkAnnotations = buildUnnamed1160(); |
165 o.logoAnnotations = buildUnnamed1152(); | 165 o.logoAnnotations = buildUnnamed1161(); |
166 o.safeSearchAnnotation = buildSafeSearchAnnotation(); | 166 o.safeSearchAnnotation = buildSafeSearchAnnotation(); |
167 o.textAnnotations = buildUnnamed1153(); | 167 o.textAnnotations = buildUnnamed1162(); |
168 } | 168 } |
169 buildCounterAnnotateImageResponse--; | 169 buildCounterAnnotateImageResponse--; |
170 return o; | 170 return o; |
171 } | 171 } |
172 | 172 |
173 checkAnnotateImageResponse(api.AnnotateImageResponse o) { | 173 checkAnnotateImageResponse(api.AnnotateImageResponse o) { |
174 buildCounterAnnotateImageResponse++; | 174 buildCounterAnnotateImageResponse++; |
175 if (buildCounterAnnotateImageResponse < 3) { | 175 if (buildCounterAnnotateImageResponse < 3) { |
176 checkStatus(o.error); | 176 checkStatus(o.error); |
177 checkUnnamed1149(o.faceAnnotations); | 177 checkUnnamed1158(o.faceAnnotations); |
178 checkImageProperties(o.imagePropertiesAnnotation); | 178 checkImageProperties(o.imagePropertiesAnnotation); |
179 checkUnnamed1150(o.labelAnnotations); | 179 checkUnnamed1159(o.labelAnnotations); |
180 checkUnnamed1151(o.landmarkAnnotations); | 180 checkUnnamed1160(o.landmarkAnnotations); |
181 checkUnnamed1152(o.logoAnnotations); | 181 checkUnnamed1161(o.logoAnnotations); |
182 checkSafeSearchAnnotation(o.safeSearchAnnotation); | 182 checkSafeSearchAnnotation(o.safeSearchAnnotation); |
183 checkUnnamed1153(o.textAnnotations); | 183 checkUnnamed1162(o.textAnnotations); |
184 } | 184 } |
185 buildCounterAnnotateImageResponse--; | 185 buildCounterAnnotateImageResponse--; |
186 } | 186 } |
187 | 187 |
188 buildUnnamed1154() { | 188 buildUnnamed1163() { |
189 var o = new core.List<api.AnnotateImageRequest>(); | 189 var o = new core.List<api.AnnotateImageRequest>(); |
190 o.add(buildAnnotateImageRequest()); | 190 o.add(buildAnnotateImageRequest()); |
191 o.add(buildAnnotateImageRequest()); | 191 o.add(buildAnnotateImageRequest()); |
192 return o; | 192 return o; |
193 } | 193 } |
194 | 194 |
195 checkUnnamed1154(core.List<api.AnnotateImageRequest> o) { | 195 checkUnnamed1163(core.List<api.AnnotateImageRequest> o) { |
196 unittest.expect(o, unittest.hasLength(2)); | 196 unittest.expect(o, unittest.hasLength(2)); |
197 checkAnnotateImageRequest(o[0]); | 197 checkAnnotateImageRequest(o[0]); |
198 checkAnnotateImageRequest(o[1]); | 198 checkAnnotateImageRequest(o[1]); |
199 } | 199 } |
200 | 200 |
201 core.int buildCounterBatchAnnotateImagesRequest = 0; | 201 core.int buildCounterBatchAnnotateImagesRequest = 0; |
202 buildBatchAnnotateImagesRequest() { | 202 buildBatchAnnotateImagesRequest() { |
203 var o = new api.BatchAnnotateImagesRequest(); | 203 var o = new api.BatchAnnotateImagesRequest(); |
204 buildCounterBatchAnnotateImagesRequest++; | 204 buildCounterBatchAnnotateImagesRequest++; |
205 if (buildCounterBatchAnnotateImagesRequest < 3) { | 205 if (buildCounterBatchAnnotateImagesRequest < 3) { |
206 o.requests = buildUnnamed1154(); | 206 o.requests = buildUnnamed1163(); |
207 } | 207 } |
208 buildCounterBatchAnnotateImagesRequest--; | 208 buildCounterBatchAnnotateImagesRequest--; |
209 return o; | 209 return o; |
210 } | 210 } |
211 | 211 |
212 checkBatchAnnotateImagesRequest(api.BatchAnnotateImagesRequest o) { | 212 checkBatchAnnotateImagesRequest(api.BatchAnnotateImagesRequest o) { |
213 buildCounterBatchAnnotateImagesRequest++; | 213 buildCounterBatchAnnotateImagesRequest++; |
214 if (buildCounterBatchAnnotateImagesRequest < 3) { | 214 if (buildCounterBatchAnnotateImagesRequest < 3) { |
215 checkUnnamed1154(o.requests); | 215 checkUnnamed1163(o.requests); |
216 } | 216 } |
217 buildCounterBatchAnnotateImagesRequest--; | 217 buildCounterBatchAnnotateImagesRequest--; |
218 } | 218 } |
219 | 219 |
220 buildUnnamed1155() { | 220 buildUnnamed1164() { |
221 var o = new core.List<api.AnnotateImageResponse>(); | 221 var o = new core.List<api.AnnotateImageResponse>(); |
222 o.add(buildAnnotateImageResponse()); | 222 o.add(buildAnnotateImageResponse()); |
223 o.add(buildAnnotateImageResponse()); | 223 o.add(buildAnnotateImageResponse()); |
224 return o; | 224 return o; |
225 } | 225 } |
226 | 226 |
227 checkUnnamed1155(core.List<api.AnnotateImageResponse> o) { | 227 checkUnnamed1164(core.List<api.AnnotateImageResponse> o) { |
228 unittest.expect(o, unittest.hasLength(2)); | 228 unittest.expect(o, unittest.hasLength(2)); |
229 checkAnnotateImageResponse(o[0]); | 229 checkAnnotateImageResponse(o[0]); |
230 checkAnnotateImageResponse(o[1]); | 230 checkAnnotateImageResponse(o[1]); |
231 } | 231 } |
232 | 232 |
233 core.int buildCounterBatchAnnotateImagesResponse = 0; | 233 core.int buildCounterBatchAnnotateImagesResponse = 0; |
234 buildBatchAnnotateImagesResponse() { | 234 buildBatchAnnotateImagesResponse() { |
235 var o = new api.BatchAnnotateImagesResponse(); | 235 var o = new api.BatchAnnotateImagesResponse(); |
236 buildCounterBatchAnnotateImagesResponse++; | 236 buildCounterBatchAnnotateImagesResponse++; |
237 if (buildCounterBatchAnnotateImagesResponse < 3) { | 237 if (buildCounterBatchAnnotateImagesResponse < 3) { |
238 o.responses = buildUnnamed1155(); | 238 o.responses = buildUnnamed1164(); |
239 } | 239 } |
240 buildCounterBatchAnnotateImagesResponse--; | 240 buildCounterBatchAnnotateImagesResponse--; |
241 return o; | 241 return o; |
242 } | 242 } |
243 | 243 |
244 checkBatchAnnotateImagesResponse(api.BatchAnnotateImagesResponse o) { | 244 checkBatchAnnotateImagesResponse(api.BatchAnnotateImagesResponse o) { |
245 buildCounterBatchAnnotateImagesResponse++; | 245 buildCounterBatchAnnotateImagesResponse++; |
246 if (buildCounterBatchAnnotateImagesResponse < 3) { | 246 if (buildCounterBatchAnnotateImagesResponse < 3) { |
247 checkUnnamed1155(o.responses); | 247 checkUnnamed1164(o.responses); |
248 } | 248 } |
249 buildCounterBatchAnnotateImagesResponse--; | 249 buildCounterBatchAnnotateImagesResponse--; |
250 } | 250 } |
251 | 251 |
252 buildUnnamed1156() { | 252 buildUnnamed1165() { |
253 var o = new core.List<api.Vertex>(); | 253 var o = new core.List<api.Vertex>(); |
254 o.add(buildVertex()); | 254 o.add(buildVertex()); |
255 o.add(buildVertex()); | 255 o.add(buildVertex()); |
256 return o; | 256 return o; |
257 } | 257 } |
258 | 258 |
259 checkUnnamed1156(core.List<api.Vertex> o) { | 259 checkUnnamed1165(core.List<api.Vertex> o) { |
260 unittest.expect(o, unittest.hasLength(2)); | 260 unittest.expect(o, unittest.hasLength(2)); |
261 checkVertex(o[0]); | 261 checkVertex(o[0]); |
262 checkVertex(o[1]); | 262 checkVertex(o[1]); |
263 } | 263 } |
264 | 264 |
265 core.int buildCounterBoundingPoly = 0; | 265 core.int buildCounterBoundingPoly = 0; |
266 buildBoundingPoly() { | 266 buildBoundingPoly() { |
267 var o = new api.BoundingPoly(); | 267 var o = new api.BoundingPoly(); |
268 buildCounterBoundingPoly++; | 268 buildCounterBoundingPoly++; |
269 if (buildCounterBoundingPoly < 3) { | 269 if (buildCounterBoundingPoly < 3) { |
270 o.vertices = buildUnnamed1156(); | 270 o.vertices = buildUnnamed1165(); |
271 } | 271 } |
272 buildCounterBoundingPoly--; | 272 buildCounterBoundingPoly--; |
273 return o; | 273 return o; |
274 } | 274 } |
275 | 275 |
276 checkBoundingPoly(api.BoundingPoly o) { | 276 checkBoundingPoly(api.BoundingPoly o) { |
277 buildCounterBoundingPoly++; | 277 buildCounterBoundingPoly++; |
278 if (buildCounterBoundingPoly < 3) { | 278 if (buildCounterBoundingPoly < 3) { |
279 checkUnnamed1156(o.vertices); | 279 checkUnnamed1165(o.vertices); |
280 } | 280 } |
281 buildCounterBoundingPoly--; | 281 buildCounterBoundingPoly--; |
282 } | 282 } |
283 | 283 |
284 core.int buildCounterColor = 0; | 284 core.int buildCounterColor = 0; |
285 buildColor() { | 285 buildColor() { |
286 var o = new api.Color(); | 286 var o = new api.Color(); |
287 buildCounterColor++; | 287 buildCounterColor++; |
288 if (buildCounterColor < 3) { | 288 if (buildCounterColor < 3) { |
289 o.alpha = 42.0; | 289 o.alpha = 42.0; |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
322 checkColorInfo(api.ColorInfo o) { | 322 checkColorInfo(api.ColorInfo o) { |
323 buildCounterColorInfo++; | 323 buildCounterColorInfo++; |
324 if (buildCounterColorInfo < 3) { | 324 if (buildCounterColorInfo < 3) { |
325 checkColor(o.color); | 325 checkColor(o.color); |
326 unittest.expect(o.pixelFraction, unittest.equals(42.0)); | 326 unittest.expect(o.pixelFraction, unittest.equals(42.0)); |
327 unittest.expect(o.score, unittest.equals(42.0)); | 327 unittest.expect(o.score, unittest.equals(42.0)); |
328 } | 328 } |
329 buildCounterColorInfo--; | 329 buildCounterColorInfo--; |
330 } | 330 } |
331 | 331 |
332 buildUnnamed1157() { | 332 buildUnnamed1166() { |
333 var o = new core.List<api.ColorInfo>(); | 333 var o = new core.List<api.ColorInfo>(); |
334 o.add(buildColorInfo()); | 334 o.add(buildColorInfo()); |
335 o.add(buildColorInfo()); | 335 o.add(buildColorInfo()); |
336 return o; | 336 return o; |
337 } | 337 } |
338 | 338 |
339 checkUnnamed1157(core.List<api.ColorInfo> o) { | 339 checkUnnamed1166(core.List<api.ColorInfo> o) { |
340 unittest.expect(o, unittest.hasLength(2)); | 340 unittest.expect(o, unittest.hasLength(2)); |
341 checkColorInfo(o[0]); | 341 checkColorInfo(o[0]); |
342 checkColorInfo(o[1]); | 342 checkColorInfo(o[1]); |
343 } | 343 } |
344 | 344 |
345 core.int buildCounterDominantColorsAnnotation = 0; | 345 core.int buildCounterDominantColorsAnnotation = 0; |
346 buildDominantColorsAnnotation() { | 346 buildDominantColorsAnnotation() { |
347 var o = new api.DominantColorsAnnotation(); | 347 var o = new api.DominantColorsAnnotation(); |
348 buildCounterDominantColorsAnnotation++; | 348 buildCounterDominantColorsAnnotation++; |
349 if (buildCounterDominantColorsAnnotation < 3) { | 349 if (buildCounterDominantColorsAnnotation < 3) { |
350 o.colors = buildUnnamed1157(); | 350 o.colors = buildUnnamed1166(); |
351 } | 351 } |
352 buildCounterDominantColorsAnnotation--; | 352 buildCounterDominantColorsAnnotation--; |
353 return o; | 353 return o; |
354 } | 354 } |
355 | 355 |
356 checkDominantColorsAnnotation(api.DominantColorsAnnotation o) { | 356 checkDominantColorsAnnotation(api.DominantColorsAnnotation o) { |
357 buildCounterDominantColorsAnnotation++; | 357 buildCounterDominantColorsAnnotation++; |
358 if (buildCounterDominantColorsAnnotation < 3) { | 358 if (buildCounterDominantColorsAnnotation < 3) { |
359 checkUnnamed1157(o.colors); | 359 checkUnnamed1166(o.colors); |
360 } | 360 } |
361 buildCounterDominantColorsAnnotation--; | 361 buildCounterDominantColorsAnnotation--; |
362 } | 362 } |
363 | 363 |
364 buildUnnamed1158() { | 364 buildUnnamed1167() { |
365 var o = new core.List<api.LocationInfo>(); | 365 var o = new core.List<api.LocationInfo>(); |
366 o.add(buildLocationInfo()); | 366 o.add(buildLocationInfo()); |
367 o.add(buildLocationInfo()); | 367 o.add(buildLocationInfo()); |
368 return o; | 368 return o; |
369 } | 369 } |
370 | 370 |
371 checkUnnamed1158(core.List<api.LocationInfo> o) { | 371 checkUnnamed1167(core.List<api.LocationInfo> o) { |
372 unittest.expect(o, unittest.hasLength(2)); | 372 unittest.expect(o, unittest.hasLength(2)); |
373 checkLocationInfo(o[0]); | 373 checkLocationInfo(o[0]); |
374 checkLocationInfo(o[1]); | 374 checkLocationInfo(o[1]); |
375 } | 375 } |
376 | 376 |
377 buildUnnamed1159() { | 377 buildUnnamed1168() { |
378 var o = new core.List<api.Property>(); | 378 var o = new core.List<api.Property>(); |
379 o.add(buildProperty()); | 379 o.add(buildProperty()); |
380 o.add(buildProperty()); | 380 o.add(buildProperty()); |
381 return o; | 381 return o; |
382 } | 382 } |
383 | 383 |
384 checkUnnamed1159(core.List<api.Property> o) { | 384 checkUnnamed1168(core.List<api.Property> o) { |
385 unittest.expect(o, unittest.hasLength(2)); | 385 unittest.expect(o, unittest.hasLength(2)); |
386 checkProperty(o[0]); | 386 checkProperty(o[0]); |
387 checkProperty(o[1]); | 387 checkProperty(o[1]); |
388 } | 388 } |
389 | 389 |
390 core.int buildCounterEntityAnnotation = 0; | 390 core.int buildCounterEntityAnnotation = 0; |
391 buildEntityAnnotation() { | 391 buildEntityAnnotation() { |
392 var o = new api.EntityAnnotation(); | 392 var o = new api.EntityAnnotation(); |
393 buildCounterEntityAnnotation++; | 393 buildCounterEntityAnnotation++; |
394 if (buildCounterEntityAnnotation < 3) { | 394 if (buildCounterEntityAnnotation < 3) { |
395 o.boundingPoly = buildBoundingPoly(); | 395 o.boundingPoly = buildBoundingPoly(); |
396 o.confidence = 42.0; | 396 o.confidence = 42.0; |
397 o.description = "foo"; | 397 o.description = "foo"; |
398 o.locale = "foo"; | 398 o.locale = "foo"; |
399 o.locations = buildUnnamed1158(); | 399 o.locations = buildUnnamed1167(); |
400 o.mid = "foo"; | 400 o.mid = "foo"; |
401 o.properties = buildUnnamed1159(); | 401 o.properties = buildUnnamed1168(); |
402 o.score = 42.0; | 402 o.score = 42.0; |
403 o.topicality = 42.0; | 403 o.topicality = 42.0; |
404 } | 404 } |
405 buildCounterEntityAnnotation--; | 405 buildCounterEntityAnnotation--; |
406 return o; | 406 return o; |
407 } | 407 } |
408 | 408 |
409 checkEntityAnnotation(api.EntityAnnotation o) { | 409 checkEntityAnnotation(api.EntityAnnotation o) { |
410 buildCounterEntityAnnotation++; | 410 buildCounterEntityAnnotation++; |
411 if (buildCounterEntityAnnotation < 3) { | 411 if (buildCounterEntityAnnotation < 3) { |
412 checkBoundingPoly(o.boundingPoly); | 412 checkBoundingPoly(o.boundingPoly); |
413 unittest.expect(o.confidence, unittest.equals(42.0)); | 413 unittest.expect(o.confidence, unittest.equals(42.0)); |
414 unittest.expect(o.description, unittest.equals('foo')); | 414 unittest.expect(o.description, unittest.equals('foo')); |
415 unittest.expect(o.locale, unittest.equals('foo')); | 415 unittest.expect(o.locale, unittest.equals('foo')); |
416 checkUnnamed1158(o.locations); | 416 checkUnnamed1167(o.locations); |
417 unittest.expect(o.mid, unittest.equals('foo')); | 417 unittest.expect(o.mid, unittest.equals('foo')); |
418 checkUnnamed1159(o.properties); | 418 checkUnnamed1168(o.properties); |
419 unittest.expect(o.score, unittest.equals(42.0)); | 419 unittest.expect(o.score, unittest.equals(42.0)); |
420 unittest.expect(o.topicality, unittest.equals(42.0)); | 420 unittest.expect(o.topicality, unittest.equals(42.0)); |
421 } | 421 } |
422 buildCounterEntityAnnotation--; | 422 buildCounterEntityAnnotation--; |
423 } | 423 } |
424 | 424 |
425 buildUnnamed1160() { | 425 buildUnnamed1169() { |
426 var o = new core.List<api.Landmark>(); | 426 var o = new core.List<api.Landmark>(); |
427 o.add(buildLandmark()); | 427 o.add(buildLandmark()); |
428 o.add(buildLandmark()); | 428 o.add(buildLandmark()); |
429 return o; | 429 return o; |
430 } | 430 } |
431 | 431 |
432 checkUnnamed1160(core.List<api.Landmark> o) { | 432 checkUnnamed1169(core.List<api.Landmark> o) { |
433 unittest.expect(o, unittest.hasLength(2)); | 433 unittest.expect(o, unittest.hasLength(2)); |
434 checkLandmark(o[0]); | 434 checkLandmark(o[0]); |
435 checkLandmark(o[1]); | 435 checkLandmark(o[1]); |
436 } | 436 } |
437 | 437 |
438 core.int buildCounterFaceAnnotation = 0; | 438 core.int buildCounterFaceAnnotation = 0; |
439 buildFaceAnnotation() { | 439 buildFaceAnnotation() { |
440 var o = new api.FaceAnnotation(); | 440 var o = new api.FaceAnnotation(); |
441 buildCounterFaceAnnotation++; | 441 buildCounterFaceAnnotation++; |
442 if (buildCounterFaceAnnotation < 3) { | 442 if (buildCounterFaceAnnotation < 3) { |
443 o.angerLikelihood = "foo"; | 443 o.angerLikelihood = "foo"; |
444 o.blurredLikelihood = "foo"; | 444 o.blurredLikelihood = "foo"; |
445 o.boundingPoly = buildBoundingPoly(); | 445 o.boundingPoly = buildBoundingPoly(); |
446 o.detectionConfidence = 42.0; | 446 o.detectionConfidence = 42.0; |
447 o.fdBoundingPoly = buildBoundingPoly(); | 447 o.fdBoundingPoly = buildBoundingPoly(); |
448 o.headwearLikelihood = "foo"; | 448 o.headwearLikelihood = "foo"; |
449 o.joyLikelihood = "foo"; | 449 o.joyLikelihood = "foo"; |
450 o.landmarkingConfidence = 42.0; | 450 o.landmarkingConfidence = 42.0; |
451 o.landmarks = buildUnnamed1160(); | 451 o.landmarks = buildUnnamed1169(); |
452 o.panAngle = 42.0; | 452 o.panAngle = 42.0; |
453 o.rollAngle = 42.0; | 453 o.rollAngle = 42.0; |
454 o.sorrowLikelihood = "foo"; | 454 o.sorrowLikelihood = "foo"; |
455 o.surpriseLikelihood = "foo"; | 455 o.surpriseLikelihood = "foo"; |
456 o.tiltAngle = 42.0; | 456 o.tiltAngle = 42.0; |
457 o.underExposedLikelihood = "foo"; | 457 o.underExposedLikelihood = "foo"; |
458 } | 458 } |
459 buildCounterFaceAnnotation--; | 459 buildCounterFaceAnnotation--; |
460 return o; | 460 return o; |
461 } | 461 } |
462 | 462 |
463 checkFaceAnnotation(api.FaceAnnotation o) { | 463 checkFaceAnnotation(api.FaceAnnotation o) { |
464 buildCounterFaceAnnotation++; | 464 buildCounterFaceAnnotation++; |
465 if (buildCounterFaceAnnotation < 3) { | 465 if (buildCounterFaceAnnotation < 3) { |
466 unittest.expect(o.angerLikelihood, unittest.equals('foo')); | 466 unittest.expect(o.angerLikelihood, unittest.equals('foo')); |
467 unittest.expect(o.blurredLikelihood, unittest.equals('foo')); | 467 unittest.expect(o.blurredLikelihood, unittest.equals('foo')); |
468 checkBoundingPoly(o.boundingPoly); | 468 checkBoundingPoly(o.boundingPoly); |
469 unittest.expect(o.detectionConfidence, unittest.equals(42.0)); | 469 unittest.expect(o.detectionConfidence, unittest.equals(42.0)); |
470 checkBoundingPoly(o.fdBoundingPoly); | 470 checkBoundingPoly(o.fdBoundingPoly); |
471 unittest.expect(o.headwearLikelihood, unittest.equals('foo')); | 471 unittest.expect(o.headwearLikelihood, unittest.equals('foo')); |
472 unittest.expect(o.joyLikelihood, unittest.equals('foo')); | 472 unittest.expect(o.joyLikelihood, unittest.equals('foo')); |
473 unittest.expect(o.landmarkingConfidence, unittest.equals(42.0)); | 473 unittest.expect(o.landmarkingConfidence, unittest.equals(42.0)); |
474 checkUnnamed1160(o.landmarks); | 474 checkUnnamed1169(o.landmarks); |
475 unittest.expect(o.panAngle, unittest.equals(42.0)); | 475 unittest.expect(o.panAngle, unittest.equals(42.0)); |
476 unittest.expect(o.rollAngle, unittest.equals(42.0)); | 476 unittest.expect(o.rollAngle, unittest.equals(42.0)); |
477 unittest.expect(o.sorrowLikelihood, unittest.equals('foo')); | 477 unittest.expect(o.sorrowLikelihood, unittest.equals('foo')); |
478 unittest.expect(o.surpriseLikelihood, unittest.equals('foo')); | 478 unittest.expect(o.surpriseLikelihood, unittest.equals('foo')); |
479 unittest.expect(o.tiltAngle, unittest.equals(42.0)); | 479 unittest.expect(o.tiltAngle, unittest.equals(42.0)); |
480 unittest.expect(o.underExposedLikelihood, unittest.equals('foo')); | 480 unittest.expect(o.underExposedLikelihood, unittest.equals('foo')); |
481 } | 481 } |
482 buildCounterFaceAnnotation--; | 482 buildCounterFaceAnnotation--; |
483 } | 483 } |
484 | 484 |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
517 | 517 |
518 checkImage(api.Image o) { | 518 checkImage(api.Image o) { |
519 buildCounterImage++; | 519 buildCounterImage++; |
520 if (buildCounterImage < 3) { | 520 if (buildCounterImage < 3) { |
521 unittest.expect(o.content, unittest.equals('foo')); | 521 unittest.expect(o.content, unittest.equals('foo')); |
522 checkImageSource(o.source); | 522 checkImageSource(o.source); |
523 } | 523 } |
524 buildCounterImage--; | 524 buildCounterImage--; |
525 } | 525 } |
526 | 526 |
527 buildUnnamed1161() { | 527 buildUnnamed1170() { |
528 var o = new core.List<core.String>(); | 528 var o = new core.List<core.String>(); |
529 o.add("foo"); | 529 o.add("foo"); |
530 o.add("foo"); | 530 o.add("foo"); |
531 return o; | 531 return o; |
532 } | 532 } |
533 | 533 |
534 checkUnnamed1161(core.List<core.String> o) { | 534 checkUnnamed1170(core.List<core.String> o) { |
535 unittest.expect(o, unittest.hasLength(2)); | 535 unittest.expect(o, unittest.hasLength(2)); |
536 unittest.expect(o[0], unittest.equals('foo')); | 536 unittest.expect(o[0], unittest.equals('foo')); |
537 unittest.expect(o[1], unittest.equals('foo')); | 537 unittest.expect(o[1], unittest.equals('foo')); |
538 } | 538 } |
539 | 539 |
540 core.int buildCounterImageContext = 0; | 540 core.int buildCounterImageContext = 0; |
541 buildImageContext() { | 541 buildImageContext() { |
542 var o = new api.ImageContext(); | 542 var o = new api.ImageContext(); |
543 buildCounterImageContext++; | 543 buildCounterImageContext++; |
544 if (buildCounterImageContext < 3) { | 544 if (buildCounterImageContext < 3) { |
545 o.languageHints = buildUnnamed1161(); | 545 o.languageHints = buildUnnamed1170(); |
546 o.latLongRect = buildLatLongRect(); | 546 o.latLongRect = buildLatLongRect(); |
547 } | 547 } |
548 buildCounterImageContext--; | 548 buildCounterImageContext--; |
549 return o; | 549 return o; |
550 } | 550 } |
551 | 551 |
552 checkImageContext(api.ImageContext o) { | 552 checkImageContext(api.ImageContext o) { |
553 buildCounterImageContext++; | 553 buildCounterImageContext++; |
554 if (buildCounterImageContext < 3) { | 554 if (buildCounterImageContext < 3) { |
555 checkUnnamed1161(o.languageHints); | 555 checkUnnamed1170(o.languageHints); |
556 checkLatLongRect(o.latLongRect); | 556 checkLatLongRect(o.latLongRect); |
557 } | 557 } |
558 buildCounterImageContext--; | 558 buildCounterImageContext--; |
559 } | 559 } |
560 | 560 |
561 core.int buildCounterImageProperties = 0; | 561 core.int buildCounterImageProperties = 0; |
562 buildImageProperties() { | 562 buildImageProperties() { |
563 var o = new api.ImageProperties(); | 563 var o = new api.ImageProperties(); |
564 buildCounterImageProperties++; | 564 buildCounterImageProperties++; |
565 if (buildCounterImageProperties < 3) { | 565 if (buildCounterImageProperties < 3) { |
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
740 buildCounterSafeSearchAnnotation++; | 740 buildCounterSafeSearchAnnotation++; |
741 if (buildCounterSafeSearchAnnotation < 3) { | 741 if (buildCounterSafeSearchAnnotation < 3) { |
742 unittest.expect(o.adult, unittest.equals('foo')); | 742 unittest.expect(o.adult, unittest.equals('foo')); |
743 unittest.expect(o.medical, unittest.equals('foo')); | 743 unittest.expect(o.medical, unittest.equals('foo')); |
744 unittest.expect(o.spoof, unittest.equals('foo')); | 744 unittest.expect(o.spoof, unittest.equals('foo')); |
745 unittest.expect(o.violence, unittest.equals('foo')); | 745 unittest.expect(o.violence, unittest.equals('foo')); |
746 } | 746 } |
747 buildCounterSafeSearchAnnotation--; | 747 buildCounterSafeSearchAnnotation--; |
748 } | 748 } |
749 | 749 |
750 buildUnnamed1162() { | 750 buildUnnamed1171() { |
751 var o = new core.Map<core.String, core.Object>(); | 751 var o = new core.Map<core.String, core.Object>(); |
752 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 752 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; |
753 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 753 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; |
754 return o; | 754 return o; |
755 } | 755 } |
756 | 756 |
757 checkUnnamed1162(core.Map<core.String, core.Object> o) { | 757 checkUnnamed1171(core.Map<core.String, core.Object> o) { |
758 unittest.expect(o, unittest.hasLength(2)); | 758 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')); | 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')); |
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')); | 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')); |
761 } | 761 } |
762 | 762 |
763 buildUnnamed1163() { | 763 buildUnnamed1172() { |
764 var o = new core.List<core.Map<core.String, core.Object>>(); | 764 var o = new core.List<core.Map<core.String, core.Object>>(); |
765 o.add(buildUnnamed1162()); | 765 o.add(buildUnnamed1171()); |
766 o.add(buildUnnamed1162()); | 766 o.add(buildUnnamed1171()); |
767 return o; | 767 return o; |
768 } | 768 } |
769 | 769 |
770 checkUnnamed1163(core.List<core.Map<core.String, core.Object>> o) { | 770 checkUnnamed1172(core.List<core.Map<core.String, core.Object>> o) { |
771 unittest.expect(o, unittest.hasLength(2)); | 771 unittest.expect(o, unittest.hasLength(2)); |
772 checkUnnamed1162(o[0]); | 772 checkUnnamed1171(o[0]); |
773 checkUnnamed1162(o[1]); | 773 checkUnnamed1171(o[1]); |
774 } | 774 } |
775 | 775 |
776 core.int buildCounterStatus = 0; | 776 core.int buildCounterStatus = 0; |
777 buildStatus() { | 777 buildStatus() { |
778 var o = new api.Status(); | 778 var o = new api.Status(); |
779 buildCounterStatus++; | 779 buildCounterStatus++; |
780 if (buildCounterStatus < 3) { | 780 if (buildCounterStatus < 3) { |
781 o.code = 42; | 781 o.code = 42; |
782 o.details = buildUnnamed1163(); | 782 o.details = buildUnnamed1172(); |
783 o.message = "foo"; | 783 o.message = "foo"; |
784 } | 784 } |
785 buildCounterStatus--; | 785 buildCounterStatus--; |
786 return o; | 786 return o; |
787 } | 787 } |
788 | 788 |
789 checkStatus(api.Status o) { | 789 checkStatus(api.Status o) { |
790 buildCounterStatus++; | 790 buildCounterStatus++; |
791 if (buildCounterStatus < 3) { | 791 if (buildCounterStatus < 3) { |
792 unittest.expect(o.code, unittest.equals(42)); | 792 unittest.expect(o.code, unittest.equals(42)); |
793 checkUnnamed1163(o.details); | 793 checkUnnamed1172(o.details); |
794 unittest.expect(o.message, unittest.equals('foo')); | 794 unittest.expect(o.message, unittest.equals('foo')); |
795 } | 795 } |
796 buildCounterStatus--; | 796 buildCounterStatus--; |
797 } | 797 } |
798 | 798 |
799 core.int buildCounterVertex = 0; | 799 core.int buildCounterVertex = 0; |
800 buildVertex() { | 800 buildVertex() { |
801 var o = new api.Vertex(); | 801 var o = new api.Vertex(); |
802 buildCounterVertex++; | 802 buildCounterVertex++; |
803 if (buildCounterVertex < 3) { | 803 if (buildCounterVertex < 3) { |
(...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1081 res.annotate(arg_request).then(unittest.expectAsync(((api.BatchAnnotateIma
gesResponse response) { | 1081 res.annotate(arg_request).then(unittest.expectAsync(((api.BatchAnnotateIma
gesResponse response) { |
1082 checkBatchAnnotateImagesResponse(response); | 1082 checkBatchAnnotateImagesResponse(response); |
1083 }))); | 1083 }))); |
1084 }); | 1084 }); |
1085 | 1085 |
1086 }); | 1086 }); |
1087 | 1087 |
1088 | 1088 |
1089 } | 1089 } |
1090 | 1090 |
OLD | NEW |