| OLD | NEW |
| 1 library googleapis_beta.language.v1beta1.test; | 1 library googleapis_beta.language.v1beta1.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 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 65 | 65 |
| 66 checkAnalyzeEntitiesRequest(api.AnalyzeEntitiesRequest o) { | 66 checkAnalyzeEntitiesRequest(api.AnalyzeEntitiesRequest o) { |
| 67 buildCounterAnalyzeEntitiesRequest++; | 67 buildCounterAnalyzeEntitiesRequest++; |
| 68 if (buildCounterAnalyzeEntitiesRequest < 3) { | 68 if (buildCounterAnalyzeEntitiesRequest < 3) { |
| 69 checkDocument(o.document); | 69 checkDocument(o.document); |
| 70 unittest.expect(o.encodingType, unittest.equals('foo')); | 70 unittest.expect(o.encodingType, unittest.equals('foo')); |
| 71 } | 71 } |
| 72 buildCounterAnalyzeEntitiesRequest--; | 72 buildCounterAnalyzeEntitiesRequest--; |
| 73 } | 73 } |
| 74 | 74 |
| 75 buildUnnamed3169() { | 75 buildUnnamed3259() { |
| 76 var o = new core.List<api.Entity>(); | 76 var o = new core.List<api.Entity>(); |
| 77 o.add(buildEntity()); | 77 o.add(buildEntity()); |
| 78 o.add(buildEntity()); | 78 o.add(buildEntity()); |
| 79 return o; | 79 return o; |
| 80 } | 80 } |
| 81 | 81 |
| 82 checkUnnamed3169(core.List<api.Entity> o) { | 82 checkUnnamed3259(core.List<api.Entity> o) { |
| 83 unittest.expect(o, unittest.hasLength(2)); | 83 unittest.expect(o, unittest.hasLength(2)); |
| 84 checkEntity(o[0]); | 84 checkEntity(o[0]); |
| 85 checkEntity(o[1]); | 85 checkEntity(o[1]); |
| 86 } | 86 } |
| 87 | 87 |
| 88 core.int buildCounterAnalyzeEntitiesResponse = 0; | 88 core.int buildCounterAnalyzeEntitiesResponse = 0; |
| 89 buildAnalyzeEntitiesResponse() { | 89 buildAnalyzeEntitiesResponse() { |
| 90 var o = new api.AnalyzeEntitiesResponse(); | 90 var o = new api.AnalyzeEntitiesResponse(); |
| 91 buildCounterAnalyzeEntitiesResponse++; | 91 buildCounterAnalyzeEntitiesResponse++; |
| 92 if (buildCounterAnalyzeEntitiesResponse < 3) { | 92 if (buildCounterAnalyzeEntitiesResponse < 3) { |
| 93 o.entities = buildUnnamed3169(); | 93 o.entities = buildUnnamed3259(); |
| 94 o.language = "foo"; | 94 o.language = "foo"; |
| 95 } | 95 } |
| 96 buildCounterAnalyzeEntitiesResponse--; | 96 buildCounterAnalyzeEntitiesResponse--; |
| 97 return o; | 97 return o; |
| 98 } | 98 } |
| 99 | 99 |
| 100 checkAnalyzeEntitiesResponse(api.AnalyzeEntitiesResponse o) { | 100 checkAnalyzeEntitiesResponse(api.AnalyzeEntitiesResponse o) { |
| 101 buildCounterAnalyzeEntitiesResponse++; | 101 buildCounterAnalyzeEntitiesResponse++; |
| 102 if (buildCounterAnalyzeEntitiesResponse < 3) { | 102 if (buildCounterAnalyzeEntitiesResponse < 3) { |
| 103 checkUnnamed3169(o.entities); | 103 checkUnnamed3259(o.entities); |
| 104 unittest.expect(o.language, unittest.equals('foo')); | 104 unittest.expect(o.language, unittest.equals('foo')); |
| 105 } | 105 } |
| 106 buildCounterAnalyzeEntitiesResponse--; | 106 buildCounterAnalyzeEntitiesResponse--; |
| 107 } | 107 } |
| 108 | 108 |
| 109 core.int buildCounterAnalyzeSentimentRequest = 0; | 109 core.int buildCounterAnalyzeSentimentRequest = 0; |
| 110 buildAnalyzeSentimentRequest() { | 110 buildAnalyzeSentimentRequest() { |
| 111 var o = new api.AnalyzeSentimentRequest(); | 111 var o = new api.AnalyzeSentimentRequest(); |
| 112 buildCounterAnalyzeSentimentRequest++; | 112 buildCounterAnalyzeSentimentRequest++; |
| 113 if (buildCounterAnalyzeSentimentRequest < 3) { | 113 if (buildCounterAnalyzeSentimentRequest < 3) { |
| 114 o.document = buildDocument(); | 114 o.document = buildDocument(); |
| 115 o.encodingType = "foo"; | 115 o.encodingType = "foo"; |
| 116 } | 116 } |
| 117 buildCounterAnalyzeSentimentRequest--; | 117 buildCounterAnalyzeSentimentRequest--; |
| 118 return o; | 118 return o; |
| 119 } | 119 } |
| 120 | 120 |
| 121 checkAnalyzeSentimentRequest(api.AnalyzeSentimentRequest o) { | 121 checkAnalyzeSentimentRequest(api.AnalyzeSentimentRequest o) { |
| 122 buildCounterAnalyzeSentimentRequest++; | 122 buildCounterAnalyzeSentimentRequest++; |
| 123 if (buildCounterAnalyzeSentimentRequest < 3) { | 123 if (buildCounterAnalyzeSentimentRequest < 3) { |
| 124 checkDocument(o.document); | 124 checkDocument(o.document); |
| 125 unittest.expect(o.encodingType, unittest.equals('foo')); | 125 unittest.expect(o.encodingType, unittest.equals('foo')); |
| 126 } | 126 } |
| 127 buildCounterAnalyzeSentimentRequest--; | 127 buildCounterAnalyzeSentimentRequest--; |
| 128 } | 128 } |
| 129 | 129 |
| 130 buildUnnamed3170() { | 130 buildUnnamed3260() { |
| 131 var o = new core.List<api.Sentence>(); | 131 var o = new core.List<api.Sentence>(); |
| 132 o.add(buildSentence()); | 132 o.add(buildSentence()); |
| 133 o.add(buildSentence()); | 133 o.add(buildSentence()); |
| 134 return o; | 134 return o; |
| 135 } | 135 } |
| 136 | 136 |
| 137 checkUnnamed3170(core.List<api.Sentence> o) { | 137 checkUnnamed3260(core.List<api.Sentence> o) { |
| 138 unittest.expect(o, unittest.hasLength(2)); | 138 unittest.expect(o, unittest.hasLength(2)); |
| 139 checkSentence(o[0]); | 139 checkSentence(o[0]); |
| 140 checkSentence(o[1]); | 140 checkSentence(o[1]); |
| 141 } | 141 } |
| 142 | 142 |
| 143 core.int buildCounterAnalyzeSentimentResponse = 0; | 143 core.int buildCounterAnalyzeSentimentResponse = 0; |
| 144 buildAnalyzeSentimentResponse() { | 144 buildAnalyzeSentimentResponse() { |
| 145 var o = new api.AnalyzeSentimentResponse(); | 145 var o = new api.AnalyzeSentimentResponse(); |
| 146 buildCounterAnalyzeSentimentResponse++; | 146 buildCounterAnalyzeSentimentResponse++; |
| 147 if (buildCounterAnalyzeSentimentResponse < 3) { | 147 if (buildCounterAnalyzeSentimentResponse < 3) { |
| 148 o.documentSentiment = buildSentiment(); | 148 o.documentSentiment = buildSentiment(); |
| 149 o.language = "foo"; | 149 o.language = "foo"; |
| 150 o.sentences = buildUnnamed3170(); | 150 o.sentences = buildUnnamed3260(); |
| 151 } | 151 } |
| 152 buildCounterAnalyzeSentimentResponse--; | 152 buildCounterAnalyzeSentimentResponse--; |
| 153 return o; | 153 return o; |
| 154 } | 154 } |
| 155 | 155 |
| 156 checkAnalyzeSentimentResponse(api.AnalyzeSentimentResponse o) { | 156 checkAnalyzeSentimentResponse(api.AnalyzeSentimentResponse o) { |
| 157 buildCounterAnalyzeSentimentResponse++; | 157 buildCounterAnalyzeSentimentResponse++; |
| 158 if (buildCounterAnalyzeSentimentResponse < 3) { | 158 if (buildCounterAnalyzeSentimentResponse < 3) { |
| 159 checkSentiment(o.documentSentiment); | 159 checkSentiment(o.documentSentiment); |
| 160 unittest.expect(o.language, unittest.equals('foo')); | 160 unittest.expect(o.language, unittest.equals('foo')); |
| 161 checkUnnamed3170(o.sentences); | 161 checkUnnamed3260(o.sentences); |
| 162 } | 162 } |
| 163 buildCounterAnalyzeSentimentResponse--; | 163 buildCounterAnalyzeSentimentResponse--; |
| 164 } | 164 } |
| 165 | 165 |
| 166 core.int buildCounterAnalyzeSyntaxRequest = 0; | 166 core.int buildCounterAnalyzeSyntaxRequest = 0; |
| 167 buildAnalyzeSyntaxRequest() { | 167 buildAnalyzeSyntaxRequest() { |
| 168 var o = new api.AnalyzeSyntaxRequest(); | 168 var o = new api.AnalyzeSyntaxRequest(); |
| 169 buildCounterAnalyzeSyntaxRequest++; | 169 buildCounterAnalyzeSyntaxRequest++; |
| 170 if (buildCounterAnalyzeSyntaxRequest < 3) { | 170 if (buildCounterAnalyzeSyntaxRequest < 3) { |
| 171 o.document = buildDocument(); | 171 o.document = buildDocument(); |
| 172 o.encodingType = "foo"; | 172 o.encodingType = "foo"; |
| 173 } | 173 } |
| 174 buildCounterAnalyzeSyntaxRequest--; | 174 buildCounterAnalyzeSyntaxRequest--; |
| 175 return o; | 175 return o; |
| 176 } | 176 } |
| 177 | 177 |
| 178 checkAnalyzeSyntaxRequest(api.AnalyzeSyntaxRequest o) { | 178 checkAnalyzeSyntaxRequest(api.AnalyzeSyntaxRequest o) { |
| 179 buildCounterAnalyzeSyntaxRequest++; | 179 buildCounterAnalyzeSyntaxRequest++; |
| 180 if (buildCounterAnalyzeSyntaxRequest < 3) { | 180 if (buildCounterAnalyzeSyntaxRequest < 3) { |
| 181 checkDocument(o.document); | 181 checkDocument(o.document); |
| 182 unittest.expect(o.encodingType, unittest.equals('foo')); | 182 unittest.expect(o.encodingType, unittest.equals('foo')); |
| 183 } | 183 } |
| 184 buildCounterAnalyzeSyntaxRequest--; | 184 buildCounterAnalyzeSyntaxRequest--; |
| 185 } | 185 } |
| 186 | 186 |
| 187 buildUnnamed3171() { | 187 buildUnnamed3261() { |
| 188 var o = new core.List<api.Sentence>(); | 188 var o = new core.List<api.Sentence>(); |
| 189 o.add(buildSentence()); | 189 o.add(buildSentence()); |
| 190 o.add(buildSentence()); | 190 o.add(buildSentence()); |
| 191 return o; | 191 return o; |
| 192 } | 192 } |
| 193 | 193 |
| 194 checkUnnamed3171(core.List<api.Sentence> o) { | 194 checkUnnamed3261(core.List<api.Sentence> o) { |
| 195 unittest.expect(o, unittest.hasLength(2)); | 195 unittest.expect(o, unittest.hasLength(2)); |
| 196 checkSentence(o[0]); | 196 checkSentence(o[0]); |
| 197 checkSentence(o[1]); | 197 checkSentence(o[1]); |
| 198 } | 198 } |
| 199 | 199 |
| 200 buildUnnamed3172() { | 200 buildUnnamed3262() { |
| 201 var o = new core.List<api.Token>(); | 201 var o = new core.List<api.Token>(); |
| 202 o.add(buildToken()); | 202 o.add(buildToken()); |
| 203 o.add(buildToken()); | 203 o.add(buildToken()); |
| 204 return o; | 204 return o; |
| 205 } | 205 } |
| 206 | 206 |
| 207 checkUnnamed3172(core.List<api.Token> o) { | 207 checkUnnamed3262(core.List<api.Token> o) { |
| 208 unittest.expect(o, unittest.hasLength(2)); | 208 unittest.expect(o, unittest.hasLength(2)); |
| 209 checkToken(o[0]); | 209 checkToken(o[0]); |
| 210 checkToken(o[1]); | 210 checkToken(o[1]); |
| 211 } | 211 } |
| 212 | 212 |
| 213 core.int buildCounterAnalyzeSyntaxResponse = 0; | 213 core.int buildCounterAnalyzeSyntaxResponse = 0; |
| 214 buildAnalyzeSyntaxResponse() { | 214 buildAnalyzeSyntaxResponse() { |
| 215 var o = new api.AnalyzeSyntaxResponse(); | 215 var o = new api.AnalyzeSyntaxResponse(); |
| 216 buildCounterAnalyzeSyntaxResponse++; | 216 buildCounterAnalyzeSyntaxResponse++; |
| 217 if (buildCounterAnalyzeSyntaxResponse < 3) { | 217 if (buildCounterAnalyzeSyntaxResponse < 3) { |
| 218 o.language = "foo"; | 218 o.language = "foo"; |
| 219 o.sentences = buildUnnamed3171(); | 219 o.sentences = buildUnnamed3261(); |
| 220 o.tokens = buildUnnamed3172(); | 220 o.tokens = buildUnnamed3262(); |
| 221 } | 221 } |
| 222 buildCounterAnalyzeSyntaxResponse--; | 222 buildCounterAnalyzeSyntaxResponse--; |
| 223 return o; | 223 return o; |
| 224 } | 224 } |
| 225 | 225 |
| 226 checkAnalyzeSyntaxResponse(api.AnalyzeSyntaxResponse o) { | 226 checkAnalyzeSyntaxResponse(api.AnalyzeSyntaxResponse o) { |
| 227 buildCounterAnalyzeSyntaxResponse++; | 227 buildCounterAnalyzeSyntaxResponse++; |
| 228 if (buildCounterAnalyzeSyntaxResponse < 3) { | 228 if (buildCounterAnalyzeSyntaxResponse < 3) { |
| 229 unittest.expect(o.language, unittest.equals('foo')); | 229 unittest.expect(o.language, unittest.equals('foo')); |
| 230 checkUnnamed3171(o.sentences); | 230 checkUnnamed3261(o.sentences); |
| 231 checkUnnamed3172(o.tokens); | 231 checkUnnamed3262(o.tokens); |
| 232 } | 232 } |
| 233 buildCounterAnalyzeSyntaxResponse--; | 233 buildCounterAnalyzeSyntaxResponse--; |
| 234 } | 234 } |
| 235 | 235 |
| 236 core.int buildCounterAnnotateTextRequest = 0; | 236 core.int buildCounterAnnotateTextRequest = 0; |
| 237 buildAnnotateTextRequest() { | 237 buildAnnotateTextRequest() { |
| 238 var o = new api.AnnotateTextRequest(); | 238 var o = new api.AnnotateTextRequest(); |
| 239 buildCounterAnnotateTextRequest++; | 239 buildCounterAnnotateTextRequest++; |
| 240 if (buildCounterAnnotateTextRequest < 3) { | 240 if (buildCounterAnnotateTextRequest < 3) { |
| 241 o.document = buildDocument(); | 241 o.document = buildDocument(); |
| 242 o.encodingType = "foo"; | 242 o.encodingType = "foo"; |
| 243 o.features = buildFeatures(); | 243 o.features = buildFeatures(); |
| 244 } | 244 } |
| 245 buildCounterAnnotateTextRequest--; | 245 buildCounterAnnotateTextRequest--; |
| 246 return o; | 246 return o; |
| 247 } | 247 } |
| 248 | 248 |
| 249 checkAnnotateTextRequest(api.AnnotateTextRequest o) { | 249 checkAnnotateTextRequest(api.AnnotateTextRequest o) { |
| 250 buildCounterAnnotateTextRequest++; | 250 buildCounterAnnotateTextRequest++; |
| 251 if (buildCounterAnnotateTextRequest < 3) { | 251 if (buildCounterAnnotateTextRequest < 3) { |
| 252 checkDocument(o.document); | 252 checkDocument(o.document); |
| 253 unittest.expect(o.encodingType, unittest.equals('foo')); | 253 unittest.expect(o.encodingType, unittest.equals('foo')); |
| 254 checkFeatures(o.features); | 254 checkFeatures(o.features); |
| 255 } | 255 } |
| 256 buildCounterAnnotateTextRequest--; | 256 buildCounterAnnotateTextRequest--; |
| 257 } | 257 } |
| 258 | 258 |
| 259 buildUnnamed3173() { | 259 buildUnnamed3263() { |
| 260 var o = new core.List<api.Entity>(); | 260 var o = new core.List<api.Entity>(); |
| 261 o.add(buildEntity()); | 261 o.add(buildEntity()); |
| 262 o.add(buildEntity()); | 262 o.add(buildEntity()); |
| 263 return o; | 263 return o; |
| 264 } | 264 } |
| 265 | 265 |
| 266 checkUnnamed3173(core.List<api.Entity> o) { | 266 checkUnnamed3263(core.List<api.Entity> o) { |
| 267 unittest.expect(o, unittest.hasLength(2)); | 267 unittest.expect(o, unittest.hasLength(2)); |
| 268 checkEntity(o[0]); | 268 checkEntity(o[0]); |
| 269 checkEntity(o[1]); | 269 checkEntity(o[1]); |
| 270 } | 270 } |
| 271 | 271 |
| 272 buildUnnamed3174() { | 272 buildUnnamed3264() { |
| 273 var o = new core.List<api.Sentence>(); | 273 var o = new core.List<api.Sentence>(); |
| 274 o.add(buildSentence()); | 274 o.add(buildSentence()); |
| 275 o.add(buildSentence()); | 275 o.add(buildSentence()); |
| 276 return o; | 276 return o; |
| 277 } | 277 } |
| 278 | 278 |
| 279 checkUnnamed3174(core.List<api.Sentence> o) { | 279 checkUnnamed3264(core.List<api.Sentence> o) { |
| 280 unittest.expect(o, unittest.hasLength(2)); | 280 unittest.expect(o, unittest.hasLength(2)); |
| 281 checkSentence(o[0]); | 281 checkSentence(o[0]); |
| 282 checkSentence(o[1]); | 282 checkSentence(o[1]); |
| 283 } | 283 } |
| 284 | 284 |
| 285 buildUnnamed3175() { | 285 buildUnnamed3265() { |
| 286 var o = new core.List<api.Token>(); | 286 var o = new core.List<api.Token>(); |
| 287 o.add(buildToken()); | 287 o.add(buildToken()); |
| 288 o.add(buildToken()); | 288 o.add(buildToken()); |
| 289 return o; | 289 return o; |
| 290 } | 290 } |
| 291 | 291 |
| 292 checkUnnamed3175(core.List<api.Token> o) { | 292 checkUnnamed3265(core.List<api.Token> o) { |
| 293 unittest.expect(o, unittest.hasLength(2)); | 293 unittest.expect(o, unittest.hasLength(2)); |
| 294 checkToken(o[0]); | 294 checkToken(o[0]); |
| 295 checkToken(o[1]); | 295 checkToken(o[1]); |
| 296 } | 296 } |
| 297 | 297 |
| 298 core.int buildCounterAnnotateTextResponse = 0; | 298 core.int buildCounterAnnotateTextResponse = 0; |
| 299 buildAnnotateTextResponse() { | 299 buildAnnotateTextResponse() { |
| 300 var o = new api.AnnotateTextResponse(); | 300 var o = new api.AnnotateTextResponse(); |
| 301 buildCounterAnnotateTextResponse++; | 301 buildCounterAnnotateTextResponse++; |
| 302 if (buildCounterAnnotateTextResponse < 3) { | 302 if (buildCounterAnnotateTextResponse < 3) { |
| 303 o.documentSentiment = buildSentiment(); | 303 o.documentSentiment = buildSentiment(); |
| 304 o.entities = buildUnnamed3173(); | 304 o.entities = buildUnnamed3263(); |
| 305 o.language = "foo"; | 305 o.language = "foo"; |
| 306 o.sentences = buildUnnamed3174(); | 306 o.sentences = buildUnnamed3264(); |
| 307 o.tokens = buildUnnamed3175(); | 307 o.tokens = buildUnnamed3265(); |
| 308 } | 308 } |
| 309 buildCounterAnnotateTextResponse--; | 309 buildCounterAnnotateTextResponse--; |
| 310 return o; | 310 return o; |
| 311 } | 311 } |
| 312 | 312 |
| 313 checkAnnotateTextResponse(api.AnnotateTextResponse o) { | 313 checkAnnotateTextResponse(api.AnnotateTextResponse o) { |
| 314 buildCounterAnnotateTextResponse++; | 314 buildCounterAnnotateTextResponse++; |
| 315 if (buildCounterAnnotateTextResponse < 3) { | 315 if (buildCounterAnnotateTextResponse < 3) { |
| 316 checkSentiment(o.documentSentiment); | 316 checkSentiment(o.documentSentiment); |
| 317 checkUnnamed3173(o.entities); | 317 checkUnnamed3263(o.entities); |
| 318 unittest.expect(o.language, unittest.equals('foo')); | 318 unittest.expect(o.language, unittest.equals('foo')); |
| 319 checkUnnamed3174(o.sentences); | 319 checkUnnamed3264(o.sentences); |
| 320 checkUnnamed3175(o.tokens); | 320 checkUnnamed3265(o.tokens); |
| 321 } | 321 } |
| 322 buildCounterAnnotateTextResponse--; | 322 buildCounterAnnotateTextResponse--; |
| 323 } | 323 } |
| 324 | 324 |
| 325 core.int buildCounterDependencyEdge = 0; | 325 core.int buildCounterDependencyEdge = 0; |
| 326 buildDependencyEdge() { | 326 buildDependencyEdge() { |
| 327 var o = new api.DependencyEdge(); | 327 var o = new api.DependencyEdge(); |
| 328 buildCounterDependencyEdge++; | 328 buildCounterDependencyEdge++; |
| 329 if (buildCounterDependencyEdge < 3) { | 329 if (buildCounterDependencyEdge < 3) { |
| 330 o.headTokenIndex = 42; | 330 o.headTokenIndex = 42; |
| (...skipping 30 matching lines...) Expand all Loading... |
| 361 buildCounterDocument++; | 361 buildCounterDocument++; |
| 362 if (buildCounterDocument < 3) { | 362 if (buildCounterDocument < 3) { |
| 363 unittest.expect(o.content, unittest.equals('foo')); | 363 unittest.expect(o.content, unittest.equals('foo')); |
| 364 unittest.expect(o.gcsContentUri, unittest.equals('foo')); | 364 unittest.expect(o.gcsContentUri, unittest.equals('foo')); |
| 365 unittest.expect(o.language, unittest.equals('foo')); | 365 unittest.expect(o.language, unittest.equals('foo')); |
| 366 unittest.expect(o.type, unittest.equals('foo')); | 366 unittest.expect(o.type, unittest.equals('foo')); |
| 367 } | 367 } |
| 368 buildCounterDocument--; | 368 buildCounterDocument--; |
| 369 } | 369 } |
| 370 | 370 |
| 371 buildUnnamed3176() { | 371 buildUnnamed3266() { |
| 372 var o = new core.List<api.EntityMention>(); | 372 var o = new core.List<api.EntityMention>(); |
| 373 o.add(buildEntityMention()); | 373 o.add(buildEntityMention()); |
| 374 o.add(buildEntityMention()); | 374 o.add(buildEntityMention()); |
| 375 return o; | 375 return o; |
| 376 } | 376 } |
| 377 | 377 |
| 378 checkUnnamed3176(core.List<api.EntityMention> o) { | 378 checkUnnamed3266(core.List<api.EntityMention> o) { |
| 379 unittest.expect(o, unittest.hasLength(2)); | 379 unittest.expect(o, unittest.hasLength(2)); |
| 380 checkEntityMention(o[0]); | 380 checkEntityMention(o[0]); |
| 381 checkEntityMention(o[1]); | 381 checkEntityMention(o[1]); |
| 382 } | 382 } |
| 383 | 383 |
| 384 buildUnnamed3177() { | 384 buildUnnamed3267() { |
| 385 var o = new core.Map<core.String, core.String>(); | 385 var o = new core.Map<core.String, core.String>(); |
| 386 o["x"] = "foo"; | 386 o["x"] = "foo"; |
| 387 o["y"] = "foo"; | 387 o["y"] = "foo"; |
| 388 return o; | 388 return o; |
| 389 } | 389 } |
| 390 | 390 |
| 391 checkUnnamed3177(core.Map<core.String, core.String> o) { | 391 checkUnnamed3267(core.Map<core.String, core.String> o) { |
| 392 unittest.expect(o, unittest.hasLength(2)); | 392 unittest.expect(o, unittest.hasLength(2)); |
| 393 unittest.expect(o["x"], unittest.equals('foo')); | 393 unittest.expect(o["x"], unittest.equals('foo')); |
| 394 unittest.expect(o["y"], unittest.equals('foo')); | 394 unittest.expect(o["y"], unittest.equals('foo')); |
| 395 } | 395 } |
| 396 | 396 |
| 397 core.int buildCounterEntity = 0; | 397 core.int buildCounterEntity = 0; |
| 398 buildEntity() { | 398 buildEntity() { |
| 399 var o = new api.Entity(); | 399 var o = new api.Entity(); |
| 400 buildCounterEntity++; | 400 buildCounterEntity++; |
| 401 if (buildCounterEntity < 3) { | 401 if (buildCounterEntity < 3) { |
| 402 o.mentions = buildUnnamed3176(); | 402 o.mentions = buildUnnamed3266(); |
| 403 o.metadata = buildUnnamed3177(); | 403 o.metadata = buildUnnamed3267(); |
| 404 o.name = "foo"; | 404 o.name = "foo"; |
| 405 o.salience = 42.0; | 405 o.salience = 42.0; |
| 406 o.type = "foo"; | 406 o.type = "foo"; |
| 407 } | 407 } |
| 408 buildCounterEntity--; | 408 buildCounterEntity--; |
| 409 return o; | 409 return o; |
| 410 } | 410 } |
| 411 | 411 |
| 412 checkEntity(api.Entity o) { | 412 checkEntity(api.Entity o) { |
| 413 buildCounterEntity++; | 413 buildCounterEntity++; |
| 414 if (buildCounterEntity < 3) { | 414 if (buildCounterEntity < 3) { |
| 415 checkUnnamed3176(o.mentions); | 415 checkUnnamed3266(o.mentions); |
| 416 checkUnnamed3177(o.metadata); | 416 checkUnnamed3267(o.metadata); |
| 417 unittest.expect(o.name, unittest.equals('foo')); | 417 unittest.expect(o.name, unittest.equals('foo')); |
| 418 unittest.expect(o.salience, unittest.equals(42.0)); | 418 unittest.expect(o.salience, unittest.equals(42.0)); |
| 419 unittest.expect(o.type, unittest.equals('foo')); | 419 unittest.expect(o.type, unittest.equals('foo')); |
| 420 } | 420 } |
| 421 buildCounterEntity--; | 421 buildCounterEntity--; |
| 422 } | 422 } |
| 423 | 423 |
| 424 core.int buildCounterEntityMention = 0; | 424 core.int buildCounterEntityMention = 0; |
| 425 buildEntityMention() { | 425 buildEntityMention() { |
| 426 var o = new api.EntityMention(); | 426 var o = new api.EntityMention(); |
| (...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 543 checkSentiment(api.Sentiment o) { | 543 checkSentiment(api.Sentiment o) { |
| 544 buildCounterSentiment++; | 544 buildCounterSentiment++; |
| 545 if (buildCounterSentiment < 3) { | 545 if (buildCounterSentiment < 3) { |
| 546 unittest.expect(o.magnitude, unittest.equals(42.0)); | 546 unittest.expect(o.magnitude, unittest.equals(42.0)); |
| 547 unittest.expect(o.polarity, unittest.equals(42.0)); | 547 unittest.expect(o.polarity, unittest.equals(42.0)); |
| 548 unittest.expect(o.score, unittest.equals(42.0)); | 548 unittest.expect(o.score, unittest.equals(42.0)); |
| 549 } | 549 } |
| 550 buildCounterSentiment--; | 550 buildCounterSentiment--; |
| 551 } | 551 } |
| 552 | 552 |
| 553 buildUnnamed3178() { | 553 buildUnnamed3268() { |
| 554 var o = new core.Map<core.String, core.Object>(); | 554 var o = new core.Map<core.String, core.Object>(); |
| 555 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 555 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; |
| 556 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 556 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; |
| 557 return o; | 557 return o; |
| 558 } | 558 } |
| 559 | 559 |
| 560 checkUnnamed3178(core.Map<core.String, core.Object> o) { | 560 checkUnnamed3268(core.Map<core.String, core.Object> o) { |
| 561 unittest.expect(o, unittest.hasLength(2)); | 561 unittest.expect(o, unittest.hasLength(2)); |
| 562 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')); | 562 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')); |
| 563 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')); | 563 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')); |
| 564 } | 564 } |
| 565 | 565 |
| 566 buildUnnamed3179() { | 566 buildUnnamed3269() { |
| 567 var o = new core.List<core.Map<core.String, core.Object>>(); | 567 var o = new core.List<core.Map<core.String, core.Object>>(); |
| 568 o.add(buildUnnamed3178()); | 568 o.add(buildUnnamed3268()); |
| 569 o.add(buildUnnamed3178()); | 569 o.add(buildUnnamed3268()); |
| 570 return o; | 570 return o; |
| 571 } | 571 } |
| 572 | 572 |
| 573 checkUnnamed3179(core.List<core.Map<core.String, core.Object>> o) { | 573 checkUnnamed3269(core.List<core.Map<core.String, core.Object>> o) { |
| 574 unittest.expect(o, unittest.hasLength(2)); | 574 unittest.expect(o, unittest.hasLength(2)); |
| 575 checkUnnamed3178(o[0]); | 575 checkUnnamed3268(o[0]); |
| 576 checkUnnamed3178(o[1]); | 576 checkUnnamed3268(o[1]); |
| 577 } | 577 } |
| 578 | 578 |
| 579 core.int buildCounterStatus = 0; | 579 core.int buildCounterStatus = 0; |
| 580 buildStatus() { | 580 buildStatus() { |
| 581 var o = new api.Status(); | 581 var o = new api.Status(); |
| 582 buildCounterStatus++; | 582 buildCounterStatus++; |
| 583 if (buildCounterStatus < 3) { | 583 if (buildCounterStatus < 3) { |
| 584 o.code = 42; | 584 o.code = 42; |
| 585 o.details = buildUnnamed3179(); | 585 o.details = buildUnnamed3269(); |
| 586 o.message = "foo"; | 586 o.message = "foo"; |
| 587 } | 587 } |
| 588 buildCounterStatus--; | 588 buildCounterStatus--; |
| 589 return o; | 589 return o; |
| 590 } | 590 } |
| 591 | 591 |
| 592 checkStatus(api.Status o) { | 592 checkStatus(api.Status o) { |
| 593 buildCounterStatus++; | 593 buildCounterStatus++; |
| 594 if (buildCounterStatus < 3) { | 594 if (buildCounterStatus < 3) { |
| 595 unittest.expect(o.code, unittest.equals(42)); | 595 unittest.expect(o.code, unittest.equals(42)); |
| 596 checkUnnamed3179(o.details); | 596 checkUnnamed3269(o.details); |
| 597 unittest.expect(o.message, unittest.equals('foo')); | 597 unittest.expect(o.message, unittest.equals('foo')); |
| 598 } | 598 } |
| 599 buildCounterStatus--; | 599 buildCounterStatus--; |
| 600 } | 600 } |
| 601 | 601 |
| 602 core.int buildCounterTextSpan = 0; | 602 core.int buildCounterTextSpan = 0; |
| 603 buildTextSpan() { | 603 buildTextSpan() { |
| 604 var o = new api.TextSpan(); | 604 var o = new api.TextSpan(); |
| 605 buildCounterTextSpan++; | 605 buildCounterTextSpan++; |
| 606 if (buildCounterTextSpan < 3) { | 606 if (buildCounterTextSpan < 3) { |
| (...skipping 398 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1005 res.annotateText(arg_request).then(unittest.expectAsync(((api.AnnotateText
Response response) { | 1005 res.annotateText(arg_request).then(unittest.expectAsync(((api.AnnotateText
Response response) { |
| 1006 checkAnnotateTextResponse(response); | 1006 checkAnnotateTextResponse(response); |
| 1007 }))); | 1007 }))); |
| 1008 }); | 1008 }); |
| 1009 | 1009 |
| 1010 }); | 1010 }); |
| 1011 | 1011 |
| 1012 | 1012 |
| 1013 } | 1013 } |
| 1014 | 1014 |
| OLD | NEW |