| OLD | NEW |
| 1 library googleapis.prediction.v1_6.test; | 1 library googleapis.prediction.v1_6.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:test/test.dart' as unittest; |
| 11 | 11 |
| 12 import 'package:googleapis/prediction/v1_6.dart' as api; | 12 import 'package:googleapis/prediction/v1_6.dart' as api; |
| 13 | 13 |
| 14 class HttpServerMock extends http.BaseClient { | 14 class HttpServerMock extends http.BaseClient { |
| 15 core.Function _callback; | 15 core.Function _callback; |
| 16 core.bool _expectJson; | 16 core.bool _expectJson; |
| 17 | 17 |
| 18 void register(core.Function callback, core.bool expectJson) { | 18 void register(core.Function callback, core.bool expectJson) { |
| 19 _callback = callback; | 19 _callback = callback; |
| 20 _expectJson = expectJson; | 20 _expectJson = expectJson; |
| (...skipping 18 matching lines...) Expand all Loading... |
| 39 } else { | 39 } else { |
| 40 return stream.toBytes().then((data) { | 40 return stream.toBytes().then((data) { |
| 41 return _callback(request, data); | 41 return _callback(request, data); |
| 42 }); | 42 }); |
| 43 } | 43 } |
| 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<core.String, core.String> headers, core.String bod
y) { |
| 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 core.int buildCounterAnalyzeDataDescriptionFeaturesCategoricalValues = 0; | 54 core.int buildCounterAnalyzeDataDescriptionFeaturesCategoricalValues = 0; |
| 55 buildAnalyzeDataDescriptionFeaturesCategoricalValues() { | 55 buildAnalyzeDataDescriptionFeaturesCategoricalValues() { |
| 56 var o = new api.AnalyzeDataDescriptionFeaturesCategoricalValues(); | 56 var o = new api.AnalyzeDataDescriptionFeaturesCategoricalValues(); |
| 57 buildCounterAnalyzeDataDescriptionFeaturesCategoricalValues++; | 57 buildCounterAnalyzeDataDescriptionFeaturesCategoricalValues++; |
| 58 if (buildCounterAnalyzeDataDescriptionFeaturesCategoricalValues < 3) { | 58 if (buildCounterAnalyzeDataDescriptionFeaturesCategoricalValues < 3) { |
| 59 o.count = "foo"; | 59 o.count = "foo"; |
| 60 o.value = "foo"; | 60 o.value = "foo"; |
| 61 } | 61 } |
| 62 buildCounterAnalyzeDataDescriptionFeaturesCategoricalValues--; | 62 buildCounterAnalyzeDataDescriptionFeaturesCategoricalValues--; |
| 63 return o; | 63 return o; |
| 64 } | 64 } |
| 65 | 65 |
| 66 checkAnalyzeDataDescriptionFeaturesCategoricalValues(api.AnalyzeDataDescriptionF
eaturesCategoricalValues o) { | 66 checkAnalyzeDataDescriptionFeaturesCategoricalValues(api.AnalyzeDataDescriptionF
eaturesCategoricalValues o) { |
| 67 buildCounterAnalyzeDataDescriptionFeaturesCategoricalValues++; | 67 buildCounterAnalyzeDataDescriptionFeaturesCategoricalValues++; |
| 68 if (buildCounterAnalyzeDataDescriptionFeaturesCategoricalValues < 3) { | 68 if (buildCounterAnalyzeDataDescriptionFeaturesCategoricalValues < 3) { |
| 69 unittest.expect(o.count, unittest.equals('foo')); | 69 unittest.expect(o.count, unittest.equals('foo')); |
| 70 unittest.expect(o.value, unittest.equals('foo')); | 70 unittest.expect(o.value, unittest.equals('foo')); |
| 71 } | 71 } |
| 72 buildCounterAnalyzeDataDescriptionFeaturesCategoricalValues--; | 72 buildCounterAnalyzeDataDescriptionFeaturesCategoricalValues--; |
| 73 } | 73 } |
| 74 | 74 |
| 75 buildUnnamed1738() { | 75 buildUnnamed1748() { |
| 76 var o = new core.List<api.AnalyzeDataDescriptionFeaturesCategoricalValues>(); | 76 var o = new core.List<api.AnalyzeDataDescriptionFeaturesCategoricalValues>(); |
| 77 o.add(buildAnalyzeDataDescriptionFeaturesCategoricalValues()); | 77 o.add(buildAnalyzeDataDescriptionFeaturesCategoricalValues()); |
| 78 o.add(buildAnalyzeDataDescriptionFeaturesCategoricalValues()); | 78 o.add(buildAnalyzeDataDescriptionFeaturesCategoricalValues()); |
| 79 return o; | 79 return o; |
| 80 } | 80 } |
| 81 | 81 |
| 82 checkUnnamed1738(core.List<api.AnalyzeDataDescriptionFeaturesCategoricalValues>
o) { | 82 checkUnnamed1748(core.List<api.AnalyzeDataDescriptionFeaturesCategoricalValues>
o) { |
| 83 unittest.expect(o, unittest.hasLength(2)); | 83 unittest.expect(o, unittest.hasLength(2)); |
| 84 checkAnalyzeDataDescriptionFeaturesCategoricalValues(o[0]); | 84 checkAnalyzeDataDescriptionFeaturesCategoricalValues(o[0]); |
| 85 checkAnalyzeDataDescriptionFeaturesCategoricalValues(o[1]); | 85 checkAnalyzeDataDescriptionFeaturesCategoricalValues(o[1]); |
| 86 } | 86 } |
| 87 | 87 |
| 88 core.int buildCounterAnalyzeDataDescriptionFeaturesCategorical = 0; | 88 core.int buildCounterAnalyzeDataDescriptionFeaturesCategorical = 0; |
| 89 buildAnalyzeDataDescriptionFeaturesCategorical() { | 89 buildAnalyzeDataDescriptionFeaturesCategorical() { |
| 90 var o = new api.AnalyzeDataDescriptionFeaturesCategorical(); | 90 var o = new api.AnalyzeDataDescriptionFeaturesCategorical(); |
| 91 buildCounterAnalyzeDataDescriptionFeaturesCategorical++; | 91 buildCounterAnalyzeDataDescriptionFeaturesCategorical++; |
| 92 if (buildCounterAnalyzeDataDescriptionFeaturesCategorical < 3) { | 92 if (buildCounterAnalyzeDataDescriptionFeaturesCategorical < 3) { |
| 93 o.count = "foo"; | 93 o.count = "foo"; |
| 94 o.values = buildUnnamed1738(); | 94 o.values = buildUnnamed1748(); |
| 95 } | 95 } |
| 96 buildCounterAnalyzeDataDescriptionFeaturesCategorical--; | 96 buildCounterAnalyzeDataDescriptionFeaturesCategorical--; |
| 97 return o; | 97 return o; |
| 98 } | 98 } |
| 99 | 99 |
| 100 checkAnalyzeDataDescriptionFeaturesCategorical(api.AnalyzeDataDescriptionFeature
sCategorical o) { | 100 checkAnalyzeDataDescriptionFeaturesCategorical(api.AnalyzeDataDescriptionFeature
sCategorical o) { |
| 101 buildCounterAnalyzeDataDescriptionFeaturesCategorical++; | 101 buildCounterAnalyzeDataDescriptionFeaturesCategorical++; |
| 102 if (buildCounterAnalyzeDataDescriptionFeaturesCategorical < 3) { | 102 if (buildCounterAnalyzeDataDescriptionFeaturesCategorical < 3) { |
| 103 unittest.expect(o.count, unittest.equals('foo')); | 103 unittest.expect(o.count, unittest.equals('foo')); |
| 104 checkUnnamed1738(o.values); | 104 checkUnnamed1748(o.values); |
| 105 } | 105 } |
| 106 buildCounterAnalyzeDataDescriptionFeaturesCategorical--; | 106 buildCounterAnalyzeDataDescriptionFeaturesCategorical--; |
| 107 } | 107 } |
| 108 | 108 |
| 109 core.int buildCounterAnalyzeDataDescriptionFeaturesNumeric = 0; | 109 core.int buildCounterAnalyzeDataDescriptionFeaturesNumeric = 0; |
| 110 buildAnalyzeDataDescriptionFeaturesNumeric() { | 110 buildAnalyzeDataDescriptionFeaturesNumeric() { |
| 111 var o = new api.AnalyzeDataDescriptionFeaturesNumeric(); | 111 var o = new api.AnalyzeDataDescriptionFeaturesNumeric(); |
| 112 buildCounterAnalyzeDataDescriptionFeaturesNumeric++; | 112 buildCounterAnalyzeDataDescriptionFeaturesNumeric++; |
| 113 if (buildCounterAnalyzeDataDescriptionFeaturesNumeric < 3) { | 113 if (buildCounterAnalyzeDataDescriptionFeaturesNumeric < 3) { |
| 114 o.count = "foo"; | 114 o.count = "foo"; |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 166 buildCounterAnalyzeDataDescriptionFeatures++; | 166 buildCounterAnalyzeDataDescriptionFeatures++; |
| 167 if (buildCounterAnalyzeDataDescriptionFeatures < 3) { | 167 if (buildCounterAnalyzeDataDescriptionFeatures < 3) { |
| 168 checkAnalyzeDataDescriptionFeaturesCategorical(o.categorical); | 168 checkAnalyzeDataDescriptionFeaturesCategorical(o.categorical); |
| 169 unittest.expect(o.index, unittest.equals('foo')); | 169 unittest.expect(o.index, unittest.equals('foo')); |
| 170 checkAnalyzeDataDescriptionFeaturesNumeric(o.numeric); | 170 checkAnalyzeDataDescriptionFeaturesNumeric(o.numeric); |
| 171 checkAnalyzeDataDescriptionFeaturesText(o.text); | 171 checkAnalyzeDataDescriptionFeaturesText(o.text); |
| 172 } | 172 } |
| 173 buildCounterAnalyzeDataDescriptionFeatures--; | 173 buildCounterAnalyzeDataDescriptionFeatures--; |
| 174 } | 174 } |
| 175 | 175 |
| 176 buildUnnamed1739() { | 176 buildUnnamed1749() { |
| 177 var o = new core.List<api.AnalyzeDataDescriptionFeatures>(); | 177 var o = new core.List<api.AnalyzeDataDescriptionFeatures>(); |
| 178 o.add(buildAnalyzeDataDescriptionFeatures()); | 178 o.add(buildAnalyzeDataDescriptionFeatures()); |
| 179 o.add(buildAnalyzeDataDescriptionFeatures()); | 179 o.add(buildAnalyzeDataDescriptionFeatures()); |
| 180 return o; | 180 return o; |
| 181 } | 181 } |
| 182 | 182 |
| 183 checkUnnamed1739(core.List<api.AnalyzeDataDescriptionFeatures> o) { | 183 checkUnnamed1749(core.List<api.AnalyzeDataDescriptionFeatures> o) { |
| 184 unittest.expect(o, unittest.hasLength(2)); | 184 unittest.expect(o, unittest.hasLength(2)); |
| 185 checkAnalyzeDataDescriptionFeatures(o[0]); | 185 checkAnalyzeDataDescriptionFeatures(o[0]); |
| 186 checkAnalyzeDataDescriptionFeatures(o[1]); | 186 checkAnalyzeDataDescriptionFeatures(o[1]); |
| 187 } | 187 } |
| 188 | 188 |
| 189 core.int buildCounterAnalyzeDataDescriptionOutputFeatureNumeric = 0; | 189 core.int buildCounterAnalyzeDataDescriptionOutputFeatureNumeric = 0; |
| 190 buildAnalyzeDataDescriptionOutputFeatureNumeric() { | 190 buildAnalyzeDataDescriptionOutputFeatureNumeric() { |
| 191 var o = new api.AnalyzeDataDescriptionOutputFeatureNumeric(); | 191 var o = new api.AnalyzeDataDescriptionOutputFeatureNumeric(); |
| 192 buildCounterAnalyzeDataDescriptionOutputFeatureNumeric++; | 192 buildCounterAnalyzeDataDescriptionOutputFeatureNumeric++; |
| 193 if (buildCounterAnalyzeDataDescriptionOutputFeatureNumeric < 3) { | 193 if (buildCounterAnalyzeDataDescriptionOutputFeatureNumeric < 3) { |
| (...skipping 29 matching lines...) Expand all Loading... |
| 223 | 223 |
| 224 checkAnalyzeDataDescriptionOutputFeatureText(api.AnalyzeDataDescriptionOutputFea
tureText o) { | 224 checkAnalyzeDataDescriptionOutputFeatureText(api.AnalyzeDataDescriptionOutputFea
tureText o) { |
| 225 buildCounterAnalyzeDataDescriptionOutputFeatureText++; | 225 buildCounterAnalyzeDataDescriptionOutputFeatureText++; |
| 226 if (buildCounterAnalyzeDataDescriptionOutputFeatureText < 3) { | 226 if (buildCounterAnalyzeDataDescriptionOutputFeatureText < 3) { |
| 227 unittest.expect(o.count, unittest.equals('foo')); | 227 unittest.expect(o.count, unittest.equals('foo')); |
| 228 unittest.expect(o.value, unittest.equals('foo')); | 228 unittest.expect(o.value, unittest.equals('foo')); |
| 229 } | 229 } |
| 230 buildCounterAnalyzeDataDescriptionOutputFeatureText--; | 230 buildCounterAnalyzeDataDescriptionOutputFeatureText--; |
| 231 } | 231 } |
| 232 | 232 |
| 233 buildUnnamed1740() { | 233 buildUnnamed1750() { |
| 234 var o = new core.List<api.AnalyzeDataDescriptionOutputFeatureText>(); | 234 var o = new core.List<api.AnalyzeDataDescriptionOutputFeatureText>(); |
| 235 o.add(buildAnalyzeDataDescriptionOutputFeatureText()); | 235 o.add(buildAnalyzeDataDescriptionOutputFeatureText()); |
| 236 o.add(buildAnalyzeDataDescriptionOutputFeatureText()); | 236 o.add(buildAnalyzeDataDescriptionOutputFeatureText()); |
| 237 return o; | 237 return o; |
| 238 } | 238 } |
| 239 | 239 |
| 240 checkUnnamed1740(core.List<api.AnalyzeDataDescriptionOutputFeatureText> o) { | 240 checkUnnamed1750(core.List<api.AnalyzeDataDescriptionOutputFeatureText> o) { |
| 241 unittest.expect(o, unittest.hasLength(2)); | 241 unittest.expect(o, unittest.hasLength(2)); |
| 242 checkAnalyzeDataDescriptionOutputFeatureText(o[0]); | 242 checkAnalyzeDataDescriptionOutputFeatureText(o[0]); |
| 243 checkAnalyzeDataDescriptionOutputFeatureText(o[1]); | 243 checkAnalyzeDataDescriptionOutputFeatureText(o[1]); |
| 244 } | 244 } |
| 245 | 245 |
| 246 core.int buildCounterAnalyzeDataDescriptionOutputFeature = 0; | 246 core.int buildCounterAnalyzeDataDescriptionOutputFeature = 0; |
| 247 buildAnalyzeDataDescriptionOutputFeature() { | 247 buildAnalyzeDataDescriptionOutputFeature() { |
| 248 var o = new api.AnalyzeDataDescriptionOutputFeature(); | 248 var o = new api.AnalyzeDataDescriptionOutputFeature(); |
| 249 buildCounterAnalyzeDataDescriptionOutputFeature++; | 249 buildCounterAnalyzeDataDescriptionOutputFeature++; |
| 250 if (buildCounterAnalyzeDataDescriptionOutputFeature < 3) { | 250 if (buildCounterAnalyzeDataDescriptionOutputFeature < 3) { |
| 251 o.numeric = buildAnalyzeDataDescriptionOutputFeatureNumeric(); | 251 o.numeric = buildAnalyzeDataDescriptionOutputFeatureNumeric(); |
| 252 o.text = buildUnnamed1740(); | 252 o.text = buildUnnamed1750(); |
| 253 } | 253 } |
| 254 buildCounterAnalyzeDataDescriptionOutputFeature--; | 254 buildCounterAnalyzeDataDescriptionOutputFeature--; |
| 255 return o; | 255 return o; |
| 256 } | 256 } |
| 257 | 257 |
| 258 checkAnalyzeDataDescriptionOutputFeature(api.AnalyzeDataDescriptionOutputFeature
o) { | 258 checkAnalyzeDataDescriptionOutputFeature(api.AnalyzeDataDescriptionOutputFeature
o) { |
| 259 buildCounterAnalyzeDataDescriptionOutputFeature++; | 259 buildCounterAnalyzeDataDescriptionOutputFeature++; |
| 260 if (buildCounterAnalyzeDataDescriptionOutputFeature < 3) { | 260 if (buildCounterAnalyzeDataDescriptionOutputFeature < 3) { |
| 261 checkAnalyzeDataDescriptionOutputFeatureNumeric(o.numeric); | 261 checkAnalyzeDataDescriptionOutputFeatureNumeric(o.numeric); |
| 262 checkUnnamed1740(o.text); | 262 checkUnnamed1750(o.text); |
| 263 } | 263 } |
| 264 buildCounterAnalyzeDataDescriptionOutputFeature--; | 264 buildCounterAnalyzeDataDescriptionOutputFeature--; |
| 265 } | 265 } |
| 266 | 266 |
| 267 core.int buildCounterAnalyzeDataDescription = 0; | 267 core.int buildCounterAnalyzeDataDescription = 0; |
| 268 buildAnalyzeDataDescription() { | 268 buildAnalyzeDataDescription() { |
| 269 var o = new api.AnalyzeDataDescription(); | 269 var o = new api.AnalyzeDataDescription(); |
| 270 buildCounterAnalyzeDataDescription++; | 270 buildCounterAnalyzeDataDescription++; |
| 271 if (buildCounterAnalyzeDataDescription < 3) { | 271 if (buildCounterAnalyzeDataDescription < 3) { |
| 272 o.features = buildUnnamed1739(); | 272 o.features = buildUnnamed1749(); |
| 273 o.outputFeature = buildAnalyzeDataDescriptionOutputFeature(); | 273 o.outputFeature = buildAnalyzeDataDescriptionOutputFeature(); |
| 274 } | 274 } |
| 275 buildCounterAnalyzeDataDescription--; | 275 buildCounterAnalyzeDataDescription--; |
| 276 return o; | 276 return o; |
| 277 } | 277 } |
| 278 | 278 |
| 279 checkAnalyzeDataDescription(api.AnalyzeDataDescription o) { | 279 checkAnalyzeDataDescription(api.AnalyzeDataDescription o) { |
| 280 buildCounterAnalyzeDataDescription++; | 280 buildCounterAnalyzeDataDescription++; |
| 281 if (buildCounterAnalyzeDataDescription < 3) { | 281 if (buildCounterAnalyzeDataDescription < 3) { |
| 282 checkUnnamed1739(o.features); | 282 checkUnnamed1749(o.features); |
| 283 checkAnalyzeDataDescriptionOutputFeature(o.outputFeature); | 283 checkAnalyzeDataDescriptionOutputFeature(o.outputFeature); |
| 284 } | 284 } |
| 285 buildCounterAnalyzeDataDescription--; | 285 buildCounterAnalyzeDataDescription--; |
| 286 } | 286 } |
| 287 | 287 |
| 288 buildUnnamed1741() { | 288 buildUnnamed1751() { |
| 289 var o = new core.Map<core.String, core.String>(); | 289 var o = new core.Map<core.String, core.String>(); |
| 290 o["x"] = "foo"; | 290 o["x"] = "foo"; |
| 291 o["y"] = "foo"; | 291 o["y"] = "foo"; |
| 292 return o; | 292 return o; |
| 293 } | 293 } |
| 294 | 294 |
| 295 checkUnnamed1741(core.Map<core.String, core.String> o) { | 295 checkUnnamed1751(core.Map<core.String, core.String> o) { |
| 296 unittest.expect(o, unittest.hasLength(2)); | 296 unittest.expect(o, unittest.hasLength(2)); |
| 297 unittest.expect(o["x"], unittest.equals('foo')); | 297 unittest.expect(o["x"], unittest.equals('foo')); |
| 298 unittest.expect(o["y"], unittest.equals('foo')); | 298 unittest.expect(o["y"], unittest.equals('foo')); |
| 299 } | 299 } |
| 300 | 300 |
| 301 buildUnnamed1742() { | 301 buildUnnamed1752() { |
| 302 var o = new core.List<core.Map<core.String, core.String>>(); | 302 var o = new core.List<core.Map<core.String, core.String>>(); |
| 303 o.add(buildUnnamed1741()); | 303 o.add(buildUnnamed1751()); |
| 304 o.add(buildUnnamed1741()); | 304 o.add(buildUnnamed1751()); |
| 305 return o; | 305 return o; |
| 306 } | 306 } |
| 307 | 307 |
| 308 checkUnnamed1742(core.List<core.Map<core.String, core.String>> o) { | 308 checkUnnamed1752(core.List<core.Map<core.String, core.String>> o) { |
| 309 unittest.expect(o, unittest.hasLength(2)); | 309 unittest.expect(o, unittest.hasLength(2)); |
| 310 checkUnnamed1741(o[0]); | 310 checkUnnamed1751(o[0]); |
| 311 checkUnnamed1741(o[1]); | 311 checkUnnamed1751(o[1]); |
| 312 } | 312 } |
| 313 | 313 |
| 314 buildUnnamed1743() { | 314 buildUnnamed1753() { |
| 315 var o = new core.Map<core.String, core.String>(); | 315 var o = new core.Map<core.String, core.String>(); |
| 316 o["x"] = "foo"; | 316 o["x"] = "foo"; |
| 317 o["y"] = "foo"; | 317 o["y"] = "foo"; |
| 318 return o; | 318 return o; |
| 319 } | 319 } |
| 320 | 320 |
| 321 checkUnnamed1743(core.Map<core.String, core.String> o) { | 321 checkUnnamed1753(core.Map<core.String, core.String> o) { |
| 322 unittest.expect(o, unittest.hasLength(2)); | 322 unittest.expect(o, unittest.hasLength(2)); |
| 323 unittest.expect(o["x"], unittest.equals('foo')); | 323 unittest.expect(o["x"], unittest.equals('foo')); |
| 324 unittest.expect(o["y"], unittest.equals('foo')); | 324 unittest.expect(o["y"], unittest.equals('foo')); |
| 325 } | 325 } |
| 326 | 326 |
| 327 buildUnnamed1744() { | 327 buildUnnamed1754() { |
| 328 var o = new core.Map<core.String, core.Map<core.String, core.String>>(); | 328 var o = new core.Map<core.String, core.Map<core.String, core.String>>(); |
| 329 o["x"] = buildUnnamed1743(); | 329 o["x"] = buildUnnamed1753(); |
| 330 o["y"] = buildUnnamed1743(); | 330 o["y"] = buildUnnamed1753(); |
| 331 return o; | 331 return o; |
| 332 } | 332 } |
| 333 | 333 |
| 334 checkUnnamed1744(core.Map<core.String, core.Map<core.String, core.String>> o) { | 334 checkUnnamed1754(core.Map<core.String, core.Map<core.String, core.String>> o) { |
| 335 unittest.expect(o, unittest.hasLength(2)); | 335 unittest.expect(o, unittest.hasLength(2)); |
| 336 checkUnnamed1743(o["x"]); | 336 checkUnnamed1753(o["x"]); |
| 337 checkUnnamed1743(o["y"]); | 337 checkUnnamed1753(o["y"]); |
| 338 } | 338 } |
| 339 | 339 |
| 340 buildUnnamed1745() { | 340 buildUnnamed1755() { |
| 341 var o = new core.Map<core.String, core.String>(); | 341 var o = new core.Map<core.String, core.String>(); |
| 342 o["x"] = "foo"; | 342 o["x"] = "foo"; |
| 343 o["y"] = "foo"; | 343 o["y"] = "foo"; |
| 344 return o; | 344 return o; |
| 345 } | 345 } |
| 346 | 346 |
| 347 checkUnnamed1745(core.Map<core.String, core.String> o) { | 347 checkUnnamed1755(core.Map<core.String, core.String> o) { |
| 348 unittest.expect(o, unittest.hasLength(2)); | 348 unittest.expect(o, unittest.hasLength(2)); |
| 349 unittest.expect(o["x"], unittest.equals('foo')); | 349 unittest.expect(o["x"], unittest.equals('foo')); |
| 350 unittest.expect(o["y"], unittest.equals('foo')); | 350 unittest.expect(o["y"], unittest.equals('foo')); |
| 351 } | 351 } |
| 352 | 352 |
| 353 core.int buildCounterAnalyzeModelDescription = 0; | 353 core.int buildCounterAnalyzeModelDescription = 0; |
| 354 buildAnalyzeModelDescription() { | 354 buildAnalyzeModelDescription() { |
| 355 var o = new api.AnalyzeModelDescription(); | 355 var o = new api.AnalyzeModelDescription(); |
| 356 buildCounterAnalyzeModelDescription++; | 356 buildCounterAnalyzeModelDescription++; |
| 357 if (buildCounterAnalyzeModelDescription < 3) { | 357 if (buildCounterAnalyzeModelDescription < 3) { |
| 358 o.confusionMatrix = buildUnnamed1744(); | 358 o.confusionMatrix = buildUnnamed1754(); |
| 359 o.confusionMatrixRowTotals = buildUnnamed1745(); | 359 o.confusionMatrixRowTotals = buildUnnamed1755(); |
| 360 o.modelinfo = buildInsert2(); | 360 o.modelinfo = buildInsert2(); |
| 361 } | 361 } |
| 362 buildCounterAnalyzeModelDescription--; | 362 buildCounterAnalyzeModelDescription--; |
| 363 return o; | 363 return o; |
| 364 } | 364 } |
| 365 | 365 |
| 366 checkAnalyzeModelDescription(api.AnalyzeModelDescription o) { | 366 checkAnalyzeModelDescription(api.AnalyzeModelDescription o) { |
| 367 buildCounterAnalyzeModelDescription++; | 367 buildCounterAnalyzeModelDescription++; |
| 368 if (buildCounterAnalyzeModelDescription < 3) { | 368 if (buildCounterAnalyzeModelDescription < 3) { |
| 369 checkUnnamed1744(o.confusionMatrix); | 369 checkUnnamed1754(o.confusionMatrix); |
| 370 checkUnnamed1745(o.confusionMatrixRowTotals); | 370 checkUnnamed1755(o.confusionMatrixRowTotals); |
| 371 checkInsert2(o.modelinfo); | 371 checkInsert2(o.modelinfo); |
| 372 } | 372 } |
| 373 buildCounterAnalyzeModelDescription--; | 373 buildCounterAnalyzeModelDescription--; |
| 374 } | 374 } |
| 375 | 375 |
| 376 core.int buildCounterAnalyze = 0; | 376 core.int buildCounterAnalyze = 0; |
| 377 buildAnalyze() { | 377 buildAnalyze() { |
| 378 var o = new api.Analyze(); | 378 var o = new api.Analyze(); |
| 379 buildCounterAnalyze++; | 379 buildCounterAnalyze++; |
| 380 if (buildCounterAnalyze < 3) { | 380 if (buildCounterAnalyze < 3) { |
| 381 o.dataDescription = buildAnalyzeDataDescription(); | 381 o.dataDescription = buildAnalyzeDataDescription(); |
| 382 o.errors = buildUnnamed1742(); | 382 o.errors = buildUnnamed1752(); |
| 383 o.id = "foo"; | 383 o.id = "foo"; |
| 384 o.kind = "foo"; | 384 o.kind = "foo"; |
| 385 o.modelDescription = buildAnalyzeModelDescription(); | 385 o.modelDescription = buildAnalyzeModelDescription(); |
| 386 o.selfLink = "foo"; | 386 o.selfLink = "foo"; |
| 387 } | 387 } |
| 388 buildCounterAnalyze--; | 388 buildCounterAnalyze--; |
| 389 return o; | 389 return o; |
| 390 } | 390 } |
| 391 | 391 |
| 392 checkAnalyze(api.Analyze o) { | 392 checkAnalyze(api.Analyze o) { |
| 393 buildCounterAnalyze++; | 393 buildCounterAnalyze++; |
| 394 if (buildCounterAnalyze < 3) { | 394 if (buildCounterAnalyze < 3) { |
| 395 checkAnalyzeDataDescription(o.dataDescription); | 395 checkAnalyzeDataDescription(o.dataDescription); |
| 396 checkUnnamed1742(o.errors); | 396 checkUnnamed1752(o.errors); |
| 397 unittest.expect(o.id, unittest.equals('foo')); | 397 unittest.expect(o.id, unittest.equals('foo')); |
| 398 unittest.expect(o.kind, unittest.equals('foo')); | 398 unittest.expect(o.kind, unittest.equals('foo')); |
| 399 checkAnalyzeModelDescription(o.modelDescription); | 399 checkAnalyzeModelDescription(o.modelDescription); |
| 400 unittest.expect(o.selfLink, unittest.equals('foo')); | 400 unittest.expect(o.selfLink, unittest.equals('foo')); |
| 401 } | 401 } |
| 402 buildCounterAnalyze--; | 402 buildCounterAnalyze--; |
| 403 } | 403 } |
| 404 | 404 |
| 405 buildUnnamed1746() { | 405 buildUnnamed1756() { |
| 406 var o = new core.List<core.Object>(); | 406 var o = new core.List<core.Object>(); |
| 407 o.add({'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}); | 407 o.add({'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}); |
| 408 o.add({'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}); | 408 o.add({'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}); |
| 409 return o; | 409 return o; |
| 410 } | 410 } |
| 411 | 411 |
| 412 checkUnnamed1746(core.List<core.Object> o) { | 412 checkUnnamed1756(core.List<core.Object> o) { |
| 413 unittest.expect(o, unittest.hasLength(2)); | 413 unittest.expect(o, unittest.hasLength(2)); |
| 414 var casted1 = (o[0]) as core.Map; unittest.expect(casted1, unittest.hasLength(
3)); unittest.expect(casted1["list"], unittest.equals([1, 2, 3])); unittest.expe
ct(casted1["bool"], unittest.equals(true)); unittest.expect(casted1["string"], u
nittest.equals('foo')); | 414 var casted1 = (o[0]) as core.Map; unittest.expect(casted1, unittest.hasLength(
3)); unittest.expect(casted1["list"], unittest.equals([1, 2, 3])); unittest.expe
ct(casted1["bool"], unittest.equals(true)); unittest.expect(casted1["string"], u
nittest.equals('foo')); |
| 415 var casted2 = (o[1]) as core.Map; unittest.expect(casted2, unittest.hasLength(
3)); unittest.expect(casted2["list"], unittest.equals([1, 2, 3])); unittest.expe
ct(casted2["bool"], unittest.equals(true)); unittest.expect(casted2["string"], u
nittest.equals('foo')); | 415 var casted2 = (o[1]) as core.Map; unittest.expect(casted2, unittest.hasLength(
3)); unittest.expect(casted2["list"], unittest.equals([1, 2, 3])); unittest.expe
ct(casted2["bool"], unittest.equals(true)); unittest.expect(casted2["string"], u
nittest.equals('foo')); |
| 416 } | 416 } |
| 417 | 417 |
| 418 core.int buildCounterInputInput = 0; | 418 core.int buildCounterInputInput = 0; |
| 419 buildInputInput() { | 419 buildInputInput() { |
| 420 var o = new api.InputInput(); | 420 var o = new api.InputInput(); |
| 421 buildCounterInputInput++; | 421 buildCounterInputInput++; |
| 422 if (buildCounterInputInput < 3) { | 422 if (buildCounterInputInput < 3) { |
| 423 o.csvInstance = buildUnnamed1746(); | 423 o.csvInstance = buildUnnamed1756(); |
| 424 } | 424 } |
| 425 buildCounterInputInput--; | 425 buildCounterInputInput--; |
| 426 return o; | 426 return o; |
| 427 } | 427 } |
| 428 | 428 |
| 429 checkInputInput(api.InputInput o) { | 429 checkInputInput(api.InputInput o) { |
| 430 buildCounterInputInput++; | 430 buildCounterInputInput++; |
| 431 if (buildCounterInputInput < 3) { | 431 if (buildCounterInputInput < 3) { |
| 432 checkUnnamed1746(o.csvInstance); | 432 checkUnnamed1756(o.csvInstance); |
| 433 } | 433 } |
| 434 buildCounterInputInput--; | 434 buildCounterInputInput--; |
| 435 } | 435 } |
| 436 | 436 |
| 437 core.int buildCounterInput = 0; | 437 core.int buildCounterInput = 0; |
| 438 buildInput() { | 438 buildInput() { |
| 439 var o = new api.Input(); | 439 var o = new api.Input(); |
| 440 buildCounterInput++; | 440 buildCounterInput++; |
| 441 if (buildCounterInput < 3) { | 441 if (buildCounterInput < 3) { |
| 442 o.input = buildInputInput(); | 442 o.input = buildInputInput(); |
| 443 } | 443 } |
| 444 buildCounterInput--; | 444 buildCounterInput--; |
| 445 return o; | 445 return o; |
| 446 } | 446 } |
| 447 | 447 |
| 448 checkInput(api.Input o) { | 448 checkInput(api.Input o) { |
| 449 buildCounterInput++; | 449 buildCounterInput++; |
| 450 if (buildCounterInput < 3) { | 450 if (buildCounterInput < 3) { |
| 451 checkInputInput(o.input); | 451 checkInputInput(o.input); |
| 452 } | 452 } |
| 453 buildCounterInput--; | 453 buildCounterInput--; |
| 454 } | 454 } |
| 455 | 455 |
| 456 buildUnnamed1747() { | 456 buildUnnamed1757() { |
| 457 var o = new core.List<core.Object>(); | 457 var o = new core.List<core.Object>(); |
| 458 o.add({'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}); | 458 o.add({'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}); |
| 459 o.add({'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}); | 459 o.add({'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}); |
| 460 return o; | 460 return o; |
| 461 } | 461 } |
| 462 | 462 |
| 463 checkUnnamed1747(core.List<core.Object> o) { | 463 checkUnnamed1757(core.List<core.Object> o) { |
| 464 unittest.expect(o, unittest.hasLength(2)); | 464 unittest.expect(o, unittest.hasLength(2)); |
| 465 var casted3 = (o[0]) as core.Map; unittest.expect(casted3, unittest.hasLength(
3)); unittest.expect(casted3["list"], unittest.equals([1, 2, 3])); unittest.expe
ct(casted3["bool"], unittest.equals(true)); unittest.expect(casted3["string"], u
nittest.equals('foo')); | 465 var casted3 = (o[0]) as core.Map; unittest.expect(casted3, unittest.hasLength(
3)); unittest.expect(casted3["list"], unittest.equals([1, 2, 3])); unittest.expe
ct(casted3["bool"], unittest.equals(true)); unittest.expect(casted3["string"], u
nittest.equals('foo')); |
| 466 var casted4 = (o[1]) as core.Map; unittest.expect(casted4, unittest.hasLength(
3)); unittest.expect(casted4["list"], unittest.equals([1, 2, 3])); unittest.expe
ct(casted4["bool"], unittest.equals(true)); unittest.expect(casted4["string"], u
nittest.equals('foo')); | 466 var casted4 = (o[1]) as core.Map; unittest.expect(casted4, unittest.hasLength(
3)); unittest.expect(casted4["list"], unittest.equals([1, 2, 3])); unittest.expe
ct(casted4["bool"], unittest.equals(true)); unittest.expect(casted4["string"], u
nittest.equals('foo')); |
| 467 } | 467 } |
| 468 | 468 |
| 469 core.int buildCounterInsertTrainingInstances = 0; | 469 core.int buildCounterInsertTrainingInstances = 0; |
| 470 buildInsertTrainingInstances() { | 470 buildInsertTrainingInstances() { |
| 471 var o = new api.InsertTrainingInstances(); | 471 var o = new api.InsertTrainingInstances(); |
| 472 buildCounterInsertTrainingInstances++; | 472 buildCounterInsertTrainingInstances++; |
| 473 if (buildCounterInsertTrainingInstances < 3) { | 473 if (buildCounterInsertTrainingInstances < 3) { |
| 474 o.csvInstance = buildUnnamed1747(); | 474 o.csvInstance = buildUnnamed1757(); |
| 475 o.output = "foo"; | 475 o.output = "foo"; |
| 476 } | 476 } |
| 477 buildCounterInsertTrainingInstances--; | 477 buildCounterInsertTrainingInstances--; |
| 478 return o; | 478 return o; |
| 479 } | 479 } |
| 480 | 480 |
| 481 checkInsertTrainingInstances(api.InsertTrainingInstances o) { | 481 checkInsertTrainingInstances(api.InsertTrainingInstances o) { |
| 482 buildCounterInsertTrainingInstances++; | 482 buildCounterInsertTrainingInstances++; |
| 483 if (buildCounterInsertTrainingInstances < 3) { | 483 if (buildCounterInsertTrainingInstances < 3) { |
| 484 checkUnnamed1747(o.csvInstance); | 484 checkUnnamed1757(o.csvInstance); |
| 485 unittest.expect(o.output, unittest.equals('foo')); | 485 unittest.expect(o.output, unittest.equals('foo')); |
| 486 } | 486 } |
| 487 buildCounterInsertTrainingInstances--; | 487 buildCounterInsertTrainingInstances--; |
| 488 } | 488 } |
| 489 | 489 |
| 490 buildUnnamed1748() { | 490 buildUnnamed1758() { |
| 491 var o = new core.List<api.InsertTrainingInstances>(); | 491 var o = new core.List<api.InsertTrainingInstances>(); |
| 492 o.add(buildInsertTrainingInstances()); | 492 o.add(buildInsertTrainingInstances()); |
| 493 o.add(buildInsertTrainingInstances()); | 493 o.add(buildInsertTrainingInstances()); |
| 494 return o; | 494 return o; |
| 495 } | 495 } |
| 496 | 496 |
| 497 checkUnnamed1748(core.List<api.InsertTrainingInstances> o) { | 497 checkUnnamed1758(core.List<api.InsertTrainingInstances> o) { |
| 498 unittest.expect(o, unittest.hasLength(2)); | 498 unittest.expect(o, unittest.hasLength(2)); |
| 499 checkInsertTrainingInstances(o[0]); | 499 checkInsertTrainingInstances(o[0]); |
| 500 checkInsertTrainingInstances(o[1]); | 500 checkInsertTrainingInstances(o[1]); |
| 501 } | 501 } |
| 502 | 502 |
| 503 buildUnnamed1749() { | 503 buildUnnamed1759() { |
| 504 var o = new core.Map<core.String, core.double>(); | 504 var o = new core.Map<core.String, core.double>(); |
| 505 o["x"] = 42.0; | 505 o["x"] = 42.0; |
| 506 o["y"] = 42.0; | 506 o["y"] = 42.0; |
| 507 return o; | 507 return o; |
| 508 } | 508 } |
| 509 | 509 |
| 510 checkUnnamed1749(core.Map<core.String, core.double> o) { | 510 checkUnnamed1759(core.Map<core.String, core.double> o) { |
| 511 unittest.expect(o, unittest.hasLength(2)); | 511 unittest.expect(o, unittest.hasLength(2)); |
| 512 unittest.expect(o["x"], unittest.equals(42.0)); | 512 unittest.expect(o["x"], unittest.equals(42.0)); |
| 513 unittest.expect(o["y"], unittest.equals(42.0)); | 513 unittest.expect(o["y"], unittest.equals(42.0)); |
| 514 } | 514 } |
| 515 | 515 |
| 516 buildUnnamed1750() { | 516 buildUnnamed1760() { |
| 517 var o = new core.List<core.Map<core.String, core.double>>(); | 517 var o = new core.List<core.Map<core.String, core.double>>(); |
| 518 o.add(buildUnnamed1749()); | 518 o.add(buildUnnamed1759()); |
| 519 o.add(buildUnnamed1749()); | 519 o.add(buildUnnamed1759()); |
| 520 return o; | 520 return o; |
| 521 } | 521 } |
| 522 | 522 |
| 523 checkUnnamed1750(core.List<core.Map<core.String, core.double>> o) { | 523 checkUnnamed1760(core.List<core.Map<core.String, core.double>> o) { |
| 524 unittest.expect(o, unittest.hasLength(2)); | 524 unittest.expect(o, unittest.hasLength(2)); |
| 525 checkUnnamed1749(o[0]); | 525 checkUnnamed1759(o[0]); |
| 526 checkUnnamed1749(o[1]); | 526 checkUnnamed1759(o[1]); |
| 527 } | 527 } |
| 528 | 528 |
| 529 core.int buildCounterInsert = 0; | 529 core.int buildCounterInsert = 0; |
| 530 buildInsert() { | 530 buildInsert() { |
| 531 var o = new api.Insert(); | 531 var o = new api.Insert(); |
| 532 buildCounterInsert++; | 532 buildCounterInsert++; |
| 533 if (buildCounterInsert < 3) { | 533 if (buildCounterInsert < 3) { |
| 534 o.id = "foo"; | 534 o.id = "foo"; |
| 535 o.modelType = "foo"; | 535 o.modelType = "foo"; |
| 536 o.sourceModel = "foo"; | 536 o.sourceModel = "foo"; |
| 537 o.storageDataLocation = "foo"; | 537 o.storageDataLocation = "foo"; |
| 538 o.storagePMMLLocation = "foo"; | 538 o.storagePMMLLocation = "foo"; |
| 539 o.storagePMMLModelLocation = "foo"; | 539 o.storagePMMLModelLocation = "foo"; |
| 540 o.trainingInstances = buildUnnamed1748(); | 540 o.trainingInstances = buildUnnamed1758(); |
| 541 o.utility = buildUnnamed1750(); | 541 o.utility = buildUnnamed1760(); |
| 542 } | 542 } |
| 543 buildCounterInsert--; | 543 buildCounterInsert--; |
| 544 return o; | 544 return o; |
| 545 } | 545 } |
| 546 | 546 |
| 547 checkInsert(api.Insert o) { | 547 checkInsert(api.Insert o) { |
| 548 buildCounterInsert++; | 548 buildCounterInsert++; |
| 549 if (buildCounterInsert < 3) { | 549 if (buildCounterInsert < 3) { |
| 550 unittest.expect(o.id, unittest.equals('foo')); | 550 unittest.expect(o.id, unittest.equals('foo')); |
| 551 unittest.expect(o.modelType, unittest.equals('foo')); | 551 unittest.expect(o.modelType, unittest.equals('foo')); |
| 552 unittest.expect(o.sourceModel, unittest.equals('foo')); | 552 unittest.expect(o.sourceModel, unittest.equals('foo')); |
| 553 unittest.expect(o.storageDataLocation, unittest.equals('foo')); | 553 unittest.expect(o.storageDataLocation, unittest.equals('foo')); |
| 554 unittest.expect(o.storagePMMLLocation, unittest.equals('foo')); | 554 unittest.expect(o.storagePMMLLocation, unittest.equals('foo')); |
| 555 unittest.expect(o.storagePMMLModelLocation, unittest.equals('foo')); | 555 unittest.expect(o.storagePMMLModelLocation, unittest.equals('foo')); |
| 556 checkUnnamed1748(o.trainingInstances); | 556 checkUnnamed1758(o.trainingInstances); |
| 557 checkUnnamed1750(o.utility); | 557 checkUnnamed1760(o.utility); |
| 558 } | 558 } |
| 559 buildCounterInsert--; | 559 buildCounterInsert--; |
| 560 } | 560 } |
| 561 | 561 |
| 562 core.int buildCounterInsert2ModelInfo = 0; | 562 core.int buildCounterInsert2ModelInfo = 0; |
| 563 buildInsert2ModelInfo() { | 563 buildInsert2ModelInfo() { |
| 564 var o = new api.Insert2ModelInfo(); | 564 var o = new api.Insert2ModelInfo(); |
| 565 buildCounterInsert2ModelInfo++; | 565 buildCounterInsert2ModelInfo++; |
| 566 if (buildCounterInsert2ModelInfo < 3) { | 566 if (buildCounterInsert2ModelInfo < 3) { |
| 567 o.classWeightedAccuracy = "foo"; | 567 o.classWeightedAccuracy = "foo"; |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 620 unittest.expect(o.selfLink, unittest.equals('foo')); | 620 unittest.expect(o.selfLink, unittest.equals('foo')); |
| 621 unittest.expect(o.storageDataLocation, unittest.equals('foo')); | 621 unittest.expect(o.storageDataLocation, unittest.equals('foo')); |
| 622 unittest.expect(o.storagePMMLLocation, unittest.equals('foo')); | 622 unittest.expect(o.storagePMMLLocation, unittest.equals('foo')); |
| 623 unittest.expect(o.storagePMMLModelLocation, unittest.equals('foo')); | 623 unittest.expect(o.storagePMMLModelLocation, unittest.equals('foo')); |
| 624 unittest.expect(o.trainingComplete, unittest.equals(core.DateTime.parse("200
2-02-27T14:01:02"))); | 624 unittest.expect(o.trainingComplete, unittest.equals(core.DateTime.parse("200
2-02-27T14:01:02"))); |
| 625 unittest.expect(o.trainingStatus, unittest.equals('foo')); | 625 unittest.expect(o.trainingStatus, unittest.equals('foo')); |
| 626 } | 626 } |
| 627 buildCounterInsert2--; | 627 buildCounterInsert2--; |
| 628 } | 628 } |
| 629 | 629 |
| 630 buildUnnamed1751() { | 630 buildUnnamed1761() { |
| 631 var o = new core.List<api.Insert2>(); | 631 var o = new core.List<api.Insert2>(); |
| 632 o.add(buildInsert2()); | 632 o.add(buildInsert2()); |
| 633 o.add(buildInsert2()); | 633 o.add(buildInsert2()); |
| 634 return o; | 634 return o; |
| 635 } | 635 } |
| 636 | 636 |
| 637 checkUnnamed1751(core.List<api.Insert2> o) { | 637 checkUnnamed1761(core.List<api.Insert2> o) { |
| 638 unittest.expect(o, unittest.hasLength(2)); | 638 unittest.expect(o, unittest.hasLength(2)); |
| 639 checkInsert2(o[0]); | 639 checkInsert2(o[0]); |
| 640 checkInsert2(o[1]); | 640 checkInsert2(o[1]); |
| 641 } | 641 } |
| 642 | 642 |
| 643 core.int buildCounterList = 0; | 643 core.int buildCounterList = 0; |
| 644 buildList() { | 644 buildList() { |
| 645 var o = new api.List(); | 645 var o = new api.List(); |
| 646 buildCounterList++; | 646 buildCounterList++; |
| 647 if (buildCounterList < 3) { | 647 if (buildCounterList < 3) { |
| 648 o.items = buildUnnamed1751(); | 648 o.items = buildUnnamed1761(); |
| 649 o.kind = "foo"; | 649 o.kind = "foo"; |
| 650 o.nextPageToken = "foo"; | 650 o.nextPageToken = "foo"; |
| 651 o.selfLink = "foo"; | 651 o.selfLink = "foo"; |
| 652 } | 652 } |
| 653 buildCounterList--; | 653 buildCounterList--; |
| 654 return o; | 654 return o; |
| 655 } | 655 } |
| 656 | 656 |
| 657 checkList(api.List o) { | 657 checkList(api.List o) { |
| 658 buildCounterList++; | 658 buildCounterList++; |
| 659 if (buildCounterList < 3) { | 659 if (buildCounterList < 3) { |
| 660 checkUnnamed1751(o.items); | 660 checkUnnamed1761(o.items); |
| 661 unittest.expect(o.kind, unittest.equals('foo')); | 661 unittest.expect(o.kind, unittest.equals('foo')); |
| 662 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 662 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
| 663 unittest.expect(o.selfLink, unittest.equals('foo')); | 663 unittest.expect(o.selfLink, unittest.equals('foo')); |
| 664 } | 664 } |
| 665 buildCounterList--; | 665 buildCounterList--; |
| 666 } | 666 } |
| 667 | 667 |
| 668 core.int buildCounterOutputOutputMulti = 0; | 668 core.int buildCounterOutputOutputMulti = 0; |
| 669 buildOutputOutputMulti() { | 669 buildOutputOutputMulti() { |
| 670 var o = new api.OutputOutputMulti(); | 670 var o = new api.OutputOutputMulti(); |
| 671 buildCounterOutputOutputMulti++; | 671 buildCounterOutputOutputMulti++; |
| 672 if (buildCounterOutputOutputMulti < 3) { | 672 if (buildCounterOutputOutputMulti < 3) { |
| 673 o.label = "foo"; | 673 o.label = "foo"; |
| 674 o.score = "foo"; | 674 o.score = "foo"; |
| 675 } | 675 } |
| 676 buildCounterOutputOutputMulti--; | 676 buildCounterOutputOutputMulti--; |
| 677 return o; | 677 return o; |
| 678 } | 678 } |
| 679 | 679 |
| 680 checkOutputOutputMulti(api.OutputOutputMulti o) { | 680 checkOutputOutputMulti(api.OutputOutputMulti o) { |
| 681 buildCounterOutputOutputMulti++; | 681 buildCounterOutputOutputMulti++; |
| 682 if (buildCounterOutputOutputMulti < 3) { | 682 if (buildCounterOutputOutputMulti < 3) { |
| 683 unittest.expect(o.label, unittest.equals('foo')); | 683 unittest.expect(o.label, unittest.equals('foo')); |
| 684 unittest.expect(o.score, unittest.equals('foo')); | 684 unittest.expect(o.score, unittest.equals('foo')); |
| 685 } | 685 } |
| 686 buildCounterOutputOutputMulti--; | 686 buildCounterOutputOutputMulti--; |
| 687 } | 687 } |
| 688 | 688 |
| 689 buildUnnamed1752() { | 689 buildUnnamed1762() { |
| 690 var o = new core.List<api.OutputOutputMulti>(); | 690 var o = new core.List<api.OutputOutputMulti>(); |
| 691 o.add(buildOutputOutputMulti()); | 691 o.add(buildOutputOutputMulti()); |
| 692 o.add(buildOutputOutputMulti()); | 692 o.add(buildOutputOutputMulti()); |
| 693 return o; | 693 return o; |
| 694 } | 694 } |
| 695 | 695 |
| 696 checkUnnamed1752(core.List<api.OutputOutputMulti> o) { | 696 checkUnnamed1762(core.List<api.OutputOutputMulti> o) { |
| 697 unittest.expect(o, unittest.hasLength(2)); | 697 unittest.expect(o, unittest.hasLength(2)); |
| 698 checkOutputOutputMulti(o[0]); | 698 checkOutputOutputMulti(o[0]); |
| 699 checkOutputOutputMulti(o[1]); | 699 checkOutputOutputMulti(o[1]); |
| 700 } | 700 } |
| 701 | 701 |
| 702 core.int buildCounterOutput = 0; | 702 core.int buildCounterOutput = 0; |
| 703 buildOutput() { | 703 buildOutput() { |
| 704 var o = new api.Output(); | 704 var o = new api.Output(); |
| 705 buildCounterOutput++; | 705 buildCounterOutput++; |
| 706 if (buildCounterOutput < 3) { | 706 if (buildCounterOutput < 3) { |
| 707 o.id = "foo"; | 707 o.id = "foo"; |
| 708 o.kind = "foo"; | 708 o.kind = "foo"; |
| 709 o.outputLabel = "foo"; | 709 o.outputLabel = "foo"; |
| 710 o.outputMulti = buildUnnamed1752(); | 710 o.outputMulti = buildUnnamed1762(); |
| 711 o.outputValue = "foo"; | 711 o.outputValue = "foo"; |
| 712 o.selfLink = "foo"; | 712 o.selfLink = "foo"; |
| 713 } | 713 } |
| 714 buildCounterOutput--; | 714 buildCounterOutput--; |
| 715 return o; | 715 return o; |
| 716 } | 716 } |
| 717 | 717 |
| 718 checkOutput(api.Output o) { | 718 checkOutput(api.Output o) { |
| 719 buildCounterOutput++; | 719 buildCounterOutput++; |
| 720 if (buildCounterOutput < 3) { | 720 if (buildCounterOutput < 3) { |
| 721 unittest.expect(o.id, unittest.equals('foo')); | 721 unittest.expect(o.id, unittest.equals('foo')); |
| 722 unittest.expect(o.kind, unittest.equals('foo')); | 722 unittest.expect(o.kind, unittest.equals('foo')); |
| 723 unittest.expect(o.outputLabel, unittest.equals('foo')); | 723 unittest.expect(o.outputLabel, unittest.equals('foo')); |
| 724 checkUnnamed1752(o.outputMulti); | 724 checkUnnamed1762(o.outputMulti); |
| 725 unittest.expect(o.outputValue, unittest.equals('foo')); | 725 unittest.expect(o.outputValue, unittest.equals('foo')); |
| 726 unittest.expect(o.selfLink, unittest.equals('foo')); | 726 unittest.expect(o.selfLink, unittest.equals('foo')); |
| 727 } | 727 } |
| 728 buildCounterOutput--; | 728 buildCounterOutput--; |
| 729 } | 729 } |
| 730 | 730 |
| 731 buildUnnamed1753() { | 731 buildUnnamed1763() { |
| 732 var o = new core.List<core.Object>(); | 732 var o = new core.List<core.Object>(); |
| 733 o.add({'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}); | 733 o.add({'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}); |
| 734 o.add({'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}); | 734 o.add({'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}); |
| 735 return o; | 735 return o; |
| 736 } | 736 } |
| 737 | 737 |
| 738 checkUnnamed1753(core.List<core.Object> o) { | 738 checkUnnamed1763(core.List<core.Object> o) { |
| 739 unittest.expect(o, unittest.hasLength(2)); | 739 unittest.expect(o, unittest.hasLength(2)); |
| 740 var casted5 = (o[0]) as core.Map; unittest.expect(casted5, unittest.hasLength(
3)); unittest.expect(casted5["list"], unittest.equals([1, 2, 3])); unittest.expe
ct(casted5["bool"], unittest.equals(true)); unittest.expect(casted5["string"], u
nittest.equals('foo')); | 740 var casted5 = (o[0]) as core.Map; unittest.expect(casted5, unittest.hasLength(
3)); unittest.expect(casted5["list"], unittest.equals([1, 2, 3])); unittest.expe
ct(casted5["bool"], unittest.equals(true)); unittest.expect(casted5["string"], u
nittest.equals('foo')); |
| 741 var casted6 = (o[1]) as core.Map; unittest.expect(casted6, unittest.hasLength(
3)); unittest.expect(casted6["list"], unittest.equals([1, 2, 3])); unittest.expe
ct(casted6["bool"], unittest.equals(true)); unittest.expect(casted6["string"], u
nittest.equals('foo')); | 741 var casted6 = (o[1]) as core.Map; unittest.expect(casted6, unittest.hasLength(
3)); unittest.expect(casted6["list"], unittest.equals([1, 2, 3])); unittest.expe
ct(casted6["bool"], unittest.equals(true)); unittest.expect(casted6["string"], u
nittest.equals('foo')); |
| 742 } | 742 } |
| 743 | 743 |
| 744 core.int buildCounterUpdate = 0; | 744 core.int buildCounterUpdate = 0; |
| 745 buildUpdate() { | 745 buildUpdate() { |
| 746 var o = new api.Update(); | 746 var o = new api.Update(); |
| 747 buildCounterUpdate++; | 747 buildCounterUpdate++; |
| 748 if (buildCounterUpdate < 3) { | 748 if (buildCounterUpdate < 3) { |
| 749 o.csvInstance = buildUnnamed1753(); | 749 o.csvInstance = buildUnnamed1763(); |
| 750 o.output = "foo"; | 750 o.output = "foo"; |
| 751 } | 751 } |
| 752 buildCounterUpdate--; | 752 buildCounterUpdate--; |
| 753 return o; | 753 return o; |
| 754 } | 754 } |
| 755 | 755 |
| 756 checkUpdate(api.Update o) { | 756 checkUpdate(api.Update o) { |
| 757 buildCounterUpdate++; | 757 buildCounterUpdate++; |
| 758 if (buildCounterUpdate < 3) { | 758 if (buildCounterUpdate < 3) { |
| 759 checkUnnamed1753(o.csvInstance); | 759 checkUnnamed1763(o.csvInstance); |
| 760 unittest.expect(o.output, unittest.equals('foo')); | 760 unittest.expect(o.output, unittest.equals('foo')); |
| 761 } | 761 } |
| 762 buildCounterUpdate--; | 762 buildCounterUpdate--; |
| 763 } | 763 } |
| 764 | 764 |
| 765 | 765 |
| 766 main() { | 766 main() { |
| 767 unittest.group("obj-schema-AnalyzeDataDescriptionFeaturesCategoricalValues", (
) { | 767 unittest.group("obj-schema-AnalyzeDataDescriptionFeaturesCategoricalValues", (
) { |
| 768 unittest.test("to-json--from-json", () { | 768 unittest.test("to-json--from-json", () { |
| 769 var o = buildAnalyzeDataDescriptionFeaturesCategoricalValues(); | 769 var o = buildAnalyzeDataDescriptionFeaturesCategoricalValues(); |
| (...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 954 | 954 |
| 955 | 955 |
| 956 unittest.group("resource-HostedmodelsResourceApi", () { | 956 unittest.group("resource-HostedmodelsResourceApi", () { |
| 957 unittest.test("method--predict", () { | 957 unittest.test("method--predict", () { |
| 958 | 958 |
| 959 var mock = new HttpServerMock(); | 959 var mock = new HttpServerMock(); |
| 960 api.HostedmodelsResourceApi res = new api.PredictionApi(mock).hostedmodels
; | 960 api.HostedmodelsResourceApi res = new api.PredictionApi(mock).hostedmodels
; |
| 961 var arg_request = buildInput(); | 961 var arg_request = buildInput(); |
| 962 var arg_project = "foo"; | 962 var arg_project = "foo"; |
| 963 var arg_hostedModelName = "foo"; | 963 var arg_hostedModelName = "foo"; |
| 964 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 964 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 965 var obj = new api.Input.fromJson(json); | 965 var obj = new api.Input.fromJson(json); |
| 966 checkInput(obj); | 966 checkInput(obj); |
| 967 | 967 |
| 968 var path = (req.url).path; | 968 var path = (req.url).path; |
| 969 var pathOffset = 0; | 969 var pathOffset = 0; |
| 970 var index; | 970 var index; |
| 971 var subPart; | 971 var subPart; |
| 972 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 972 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 973 pathOffset += 1; | 973 pathOffset += 1; |
| 974 | 974 |
| (...skipping 14 matching lines...) Expand all Loading... |
| 989 } | 989 } |
| 990 } | 990 } |
| 991 | 991 |
| 992 | 992 |
| 993 var h = { | 993 var h = { |
| 994 "content-type" : "application/json; charset=utf-8", | 994 "content-type" : "application/json; charset=utf-8", |
| 995 }; | 995 }; |
| 996 var resp = convert.JSON.encode(buildOutput()); | 996 var resp = convert.JSON.encode(buildOutput()); |
| 997 return new async.Future.value(stringResponse(200, h, resp)); | 997 return new async.Future.value(stringResponse(200, h, resp)); |
| 998 }), true); | 998 }), true); |
| 999 res.predict(arg_request, arg_project, arg_hostedModelName).then(unittest.e
xpectAsync(((api.Output response) { | 999 res.predict(arg_request, arg_project, arg_hostedModelName).then(unittest.e
xpectAsync1(((api.Output response) { |
| 1000 checkOutput(response); | 1000 checkOutput(response); |
| 1001 }))); | 1001 }))); |
| 1002 }); | 1002 }); |
| 1003 | 1003 |
| 1004 }); | 1004 }); |
| 1005 | 1005 |
| 1006 | 1006 |
| 1007 unittest.group("resource-TrainedmodelsResourceApi", () { | 1007 unittest.group("resource-TrainedmodelsResourceApi", () { |
| 1008 unittest.test("method--analyze", () { | 1008 unittest.test("method--analyze", () { |
| 1009 | 1009 |
| 1010 var mock = new HttpServerMock(); | 1010 var mock = new HttpServerMock(); |
| 1011 api.TrainedmodelsResourceApi res = new api.PredictionApi(mock).trainedmode
ls; | 1011 api.TrainedmodelsResourceApi res = new api.PredictionApi(mock).trainedmode
ls; |
| 1012 var arg_project = "foo"; | 1012 var arg_project = "foo"; |
| 1013 var arg_id = "foo"; | 1013 var arg_id = "foo"; |
| 1014 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1014 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 1015 var path = (req.url).path; | 1015 var path = (req.url).path; |
| 1016 var pathOffset = 0; | 1016 var pathOffset = 0; |
| 1017 var index; | 1017 var index; |
| 1018 var subPart; | 1018 var subPart; |
| 1019 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1019 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 1020 pathOffset += 1; | 1020 pathOffset += 1; |
| 1021 | 1021 |
| 1022 var query = (req.url).query; | 1022 var query = (req.url).query; |
| 1023 var queryOffset = 0; | 1023 var queryOffset = 0; |
| 1024 var queryMap = {}; | 1024 var queryMap = {}; |
| (...skipping 11 matching lines...) Expand all Loading... |
| 1036 } | 1036 } |
| 1037 } | 1037 } |
| 1038 | 1038 |
| 1039 | 1039 |
| 1040 var h = { | 1040 var h = { |
| 1041 "content-type" : "application/json; charset=utf-8", | 1041 "content-type" : "application/json; charset=utf-8", |
| 1042 }; | 1042 }; |
| 1043 var resp = convert.JSON.encode(buildAnalyze()); | 1043 var resp = convert.JSON.encode(buildAnalyze()); |
| 1044 return new async.Future.value(stringResponse(200, h, resp)); | 1044 return new async.Future.value(stringResponse(200, h, resp)); |
| 1045 }), true); | 1045 }), true); |
| 1046 res.analyze(arg_project, arg_id).then(unittest.expectAsync(((api.Analyze r
esponse) { | 1046 res.analyze(arg_project, arg_id).then(unittest.expectAsync1(((api.Analyze
response) { |
| 1047 checkAnalyze(response); | 1047 checkAnalyze(response); |
| 1048 }))); | 1048 }))); |
| 1049 }); | 1049 }); |
| 1050 | 1050 |
| 1051 unittest.test("method--delete", () { | 1051 unittest.test("method--delete", () { |
| 1052 | 1052 |
| 1053 var mock = new HttpServerMock(); | 1053 var mock = new HttpServerMock(); |
| 1054 api.TrainedmodelsResourceApi res = new api.PredictionApi(mock).trainedmode
ls; | 1054 api.TrainedmodelsResourceApi res = new api.PredictionApi(mock).trainedmode
ls; |
| 1055 var arg_project = "foo"; | 1055 var arg_project = "foo"; |
| 1056 var arg_id = "foo"; | 1056 var arg_id = "foo"; |
| 1057 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1057 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 1058 var path = (req.url).path; | 1058 var path = (req.url).path; |
| 1059 var pathOffset = 0; | 1059 var pathOffset = 0; |
| 1060 var index; | 1060 var index; |
| 1061 var subPart; | 1061 var subPart; |
| 1062 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1062 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 1063 pathOffset += 1; | 1063 pathOffset += 1; |
| 1064 | 1064 |
| 1065 var query = (req.url).query; | 1065 var query = (req.url).query; |
| 1066 var queryOffset = 0; | 1066 var queryOffset = 0; |
| 1067 var queryMap = {}; | 1067 var queryMap = {}; |
| (...skipping 11 matching lines...) Expand all Loading... |
| 1079 } | 1079 } |
| 1080 } | 1080 } |
| 1081 | 1081 |
| 1082 | 1082 |
| 1083 var h = { | 1083 var h = { |
| 1084 "content-type" : "application/json; charset=utf-8", | 1084 "content-type" : "application/json; charset=utf-8", |
| 1085 }; | 1085 }; |
| 1086 var resp = ""; | 1086 var resp = ""; |
| 1087 return new async.Future.value(stringResponse(200, h, resp)); | 1087 return new async.Future.value(stringResponse(200, h, resp)); |
| 1088 }), true); | 1088 }), true); |
| 1089 res.delete(arg_project, arg_id).then(unittest.expectAsync((_) {})); | 1089 res.delete(arg_project, arg_id).then(unittest.expectAsync1((_) {})); |
| 1090 }); | 1090 }); |
| 1091 | 1091 |
| 1092 unittest.test("method--get", () { | 1092 unittest.test("method--get", () { |
| 1093 | 1093 |
| 1094 var mock = new HttpServerMock(); | 1094 var mock = new HttpServerMock(); |
| 1095 api.TrainedmodelsResourceApi res = new api.PredictionApi(mock).trainedmode
ls; | 1095 api.TrainedmodelsResourceApi res = new api.PredictionApi(mock).trainedmode
ls; |
| 1096 var arg_project = "foo"; | 1096 var arg_project = "foo"; |
| 1097 var arg_id = "foo"; | 1097 var arg_id = "foo"; |
| 1098 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1098 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 1099 var path = (req.url).path; | 1099 var path = (req.url).path; |
| 1100 var pathOffset = 0; | 1100 var pathOffset = 0; |
| 1101 var index; | 1101 var index; |
| 1102 var subPart; | 1102 var subPart; |
| 1103 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1103 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 1104 pathOffset += 1; | 1104 pathOffset += 1; |
| 1105 | 1105 |
| 1106 var query = (req.url).query; | 1106 var query = (req.url).query; |
| 1107 var queryOffset = 0; | 1107 var queryOffset = 0; |
| 1108 var queryMap = {}; | 1108 var queryMap = {}; |
| (...skipping 11 matching lines...) Expand all Loading... |
| 1120 } | 1120 } |
| 1121 } | 1121 } |
| 1122 | 1122 |
| 1123 | 1123 |
| 1124 var h = { | 1124 var h = { |
| 1125 "content-type" : "application/json; charset=utf-8", | 1125 "content-type" : "application/json; charset=utf-8", |
| 1126 }; | 1126 }; |
| 1127 var resp = convert.JSON.encode(buildInsert2()); | 1127 var resp = convert.JSON.encode(buildInsert2()); |
| 1128 return new async.Future.value(stringResponse(200, h, resp)); | 1128 return new async.Future.value(stringResponse(200, h, resp)); |
| 1129 }), true); | 1129 }), true); |
| 1130 res.get(arg_project, arg_id).then(unittest.expectAsync(((api.Insert2 respo
nse) { | 1130 res.get(arg_project, arg_id).then(unittest.expectAsync1(((api.Insert2 resp
onse) { |
| 1131 checkInsert2(response); | 1131 checkInsert2(response); |
| 1132 }))); | 1132 }))); |
| 1133 }); | 1133 }); |
| 1134 | 1134 |
| 1135 unittest.test("method--insert", () { | 1135 unittest.test("method--insert", () { |
| 1136 | 1136 |
| 1137 var mock = new HttpServerMock(); | 1137 var mock = new HttpServerMock(); |
| 1138 api.TrainedmodelsResourceApi res = new api.PredictionApi(mock).trainedmode
ls; | 1138 api.TrainedmodelsResourceApi res = new api.PredictionApi(mock).trainedmode
ls; |
| 1139 var arg_request = buildInsert(); | 1139 var arg_request = buildInsert(); |
| 1140 var arg_project = "foo"; | 1140 var arg_project = "foo"; |
| 1141 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1141 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 1142 var obj = new api.Insert.fromJson(json); | 1142 var obj = new api.Insert.fromJson(json); |
| 1143 checkInsert(obj); | 1143 checkInsert(obj); |
| 1144 | 1144 |
| 1145 var path = (req.url).path; | 1145 var path = (req.url).path; |
| 1146 var pathOffset = 0; | 1146 var pathOffset = 0; |
| 1147 var index; | 1147 var index; |
| 1148 var subPart; | 1148 var subPart; |
| 1149 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1149 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 1150 pathOffset += 1; | 1150 pathOffset += 1; |
| 1151 | 1151 |
| (...skipping 14 matching lines...) Expand all Loading... |
| 1166 } | 1166 } |
| 1167 } | 1167 } |
| 1168 | 1168 |
| 1169 | 1169 |
| 1170 var h = { | 1170 var h = { |
| 1171 "content-type" : "application/json; charset=utf-8", | 1171 "content-type" : "application/json; charset=utf-8", |
| 1172 }; | 1172 }; |
| 1173 var resp = convert.JSON.encode(buildInsert2()); | 1173 var resp = convert.JSON.encode(buildInsert2()); |
| 1174 return new async.Future.value(stringResponse(200, h, resp)); | 1174 return new async.Future.value(stringResponse(200, h, resp)); |
| 1175 }), true); | 1175 }), true); |
| 1176 res.insert(arg_request, arg_project).then(unittest.expectAsync(((api.Inser
t2 response) { | 1176 res.insert(arg_request, arg_project).then(unittest.expectAsync1(((api.Inse
rt2 response) { |
| 1177 checkInsert2(response); | 1177 checkInsert2(response); |
| 1178 }))); | 1178 }))); |
| 1179 }); | 1179 }); |
| 1180 | 1180 |
| 1181 unittest.test("method--list", () { | 1181 unittest.test("method--list", () { |
| 1182 | 1182 |
| 1183 var mock = new HttpServerMock(); | 1183 var mock = new HttpServerMock(); |
| 1184 api.TrainedmodelsResourceApi res = new api.PredictionApi(mock).trainedmode
ls; | 1184 api.TrainedmodelsResourceApi res = new api.PredictionApi(mock).trainedmode
ls; |
| 1185 var arg_project = "foo"; | 1185 var arg_project = "foo"; |
| 1186 var arg_maxResults = 42; | 1186 var arg_maxResults = 42; |
| 1187 var arg_pageToken = "foo"; | 1187 var arg_pageToken = "foo"; |
| 1188 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1188 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 1189 var path = (req.url).path; | 1189 var path = (req.url).path; |
| 1190 var pathOffset = 0; | 1190 var pathOffset = 0; |
| 1191 var index; | 1191 var index; |
| 1192 var subPart; | 1192 var subPart; |
| 1193 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1193 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 1194 pathOffset += 1; | 1194 pathOffset += 1; |
| 1195 | 1195 |
| 1196 var query = (req.url).query; | 1196 var query = (req.url).query; |
| 1197 var queryOffset = 0; | 1197 var queryOffset = 0; |
| 1198 var queryMap = {}; | 1198 var queryMap = {}; |
| (...skipping 13 matching lines...) Expand all Loading... |
| 1212 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | 1212 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); |
| 1213 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | 1213 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); |
| 1214 | 1214 |
| 1215 | 1215 |
| 1216 var h = { | 1216 var h = { |
| 1217 "content-type" : "application/json; charset=utf-8", | 1217 "content-type" : "application/json; charset=utf-8", |
| 1218 }; | 1218 }; |
| 1219 var resp = convert.JSON.encode(buildList()); | 1219 var resp = convert.JSON.encode(buildList()); |
| 1220 return new async.Future.value(stringResponse(200, h, resp)); | 1220 return new async.Future.value(stringResponse(200, h, resp)); |
| 1221 }), true); | 1221 }), true); |
| 1222 res.list(arg_project, maxResults: arg_maxResults, pageToken: arg_pageToken
).then(unittest.expectAsync(((api.List response) { | 1222 res.list(arg_project, maxResults: arg_maxResults, pageToken: arg_pageToken
).then(unittest.expectAsync1(((api.List response) { |
| 1223 checkList(response); | 1223 checkList(response); |
| 1224 }))); | 1224 }))); |
| 1225 }); | 1225 }); |
| 1226 | 1226 |
| 1227 unittest.test("method--predict", () { | 1227 unittest.test("method--predict", () { |
| 1228 | 1228 |
| 1229 var mock = new HttpServerMock(); | 1229 var mock = new HttpServerMock(); |
| 1230 api.TrainedmodelsResourceApi res = new api.PredictionApi(mock).trainedmode
ls; | 1230 api.TrainedmodelsResourceApi res = new api.PredictionApi(mock).trainedmode
ls; |
| 1231 var arg_request = buildInput(); | 1231 var arg_request = buildInput(); |
| 1232 var arg_project = "foo"; | 1232 var arg_project = "foo"; |
| 1233 var arg_id = "foo"; | 1233 var arg_id = "foo"; |
| 1234 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1234 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 1235 var obj = new api.Input.fromJson(json); | 1235 var obj = new api.Input.fromJson(json); |
| 1236 checkInput(obj); | 1236 checkInput(obj); |
| 1237 | 1237 |
| 1238 var path = (req.url).path; | 1238 var path = (req.url).path; |
| 1239 var pathOffset = 0; | 1239 var pathOffset = 0; |
| 1240 var index; | 1240 var index; |
| 1241 var subPart; | 1241 var subPart; |
| 1242 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1242 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 1243 pathOffset += 1; | 1243 pathOffset += 1; |
| 1244 | 1244 |
| (...skipping 14 matching lines...) Expand all Loading... |
| 1259 } | 1259 } |
| 1260 } | 1260 } |
| 1261 | 1261 |
| 1262 | 1262 |
| 1263 var h = { | 1263 var h = { |
| 1264 "content-type" : "application/json; charset=utf-8", | 1264 "content-type" : "application/json; charset=utf-8", |
| 1265 }; | 1265 }; |
| 1266 var resp = convert.JSON.encode(buildOutput()); | 1266 var resp = convert.JSON.encode(buildOutput()); |
| 1267 return new async.Future.value(stringResponse(200, h, resp)); | 1267 return new async.Future.value(stringResponse(200, h, resp)); |
| 1268 }), true); | 1268 }), true); |
| 1269 res.predict(arg_request, arg_project, arg_id).then(unittest.expectAsync(((
api.Output response) { | 1269 res.predict(arg_request, arg_project, arg_id).then(unittest.expectAsync1((
(api.Output response) { |
| 1270 checkOutput(response); | 1270 checkOutput(response); |
| 1271 }))); | 1271 }))); |
| 1272 }); | 1272 }); |
| 1273 | 1273 |
| 1274 unittest.test("method--update", () { | 1274 unittest.test("method--update", () { |
| 1275 | 1275 |
| 1276 var mock = new HttpServerMock(); | 1276 var mock = new HttpServerMock(); |
| 1277 api.TrainedmodelsResourceApi res = new api.PredictionApi(mock).trainedmode
ls; | 1277 api.TrainedmodelsResourceApi res = new api.PredictionApi(mock).trainedmode
ls; |
| 1278 var arg_request = buildUpdate(); | 1278 var arg_request = buildUpdate(); |
| 1279 var arg_project = "foo"; | 1279 var arg_project = "foo"; |
| 1280 var arg_id = "foo"; | 1280 var arg_id = "foo"; |
| 1281 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1281 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 1282 var obj = new api.Update.fromJson(json); | 1282 var obj = new api.Update.fromJson(json); |
| 1283 checkUpdate(obj); | 1283 checkUpdate(obj); |
| 1284 | 1284 |
| 1285 var path = (req.url).path; | 1285 var path = (req.url).path; |
| 1286 var pathOffset = 0; | 1286 var pathOffset = 0; |
| 1287 var index; | 1287 var index; |
| 1288 var subPart; | 1288 var subPart; |
| 1289 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1289 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 1290 pathOffset += 1; | 1290 pathOffset += 1; |
| 1291 | 1291 |
| (...skipping 14 matching lines...) Expand all Loading... |
| 1306 } | 1306 } |
| 1307 } | 1307 } |
| 1308 | 1308 |
| 1309 | 1309 |
| 1310 var h = { | 1310 var h = { |
| 1311 "content-type" : "application/json; charset=utf-8", | 1311 "content-type" : "application/json; charset=utf-8", |
| 1312 }; | 1312 }; |
| 1313 var resp = convert.JSON.encode(buildInsert2()); | 1313 var resp = convert.JSON.encode(buildInsert2()); |
| 1314 return new async.Future.value(stringResponse(200, h, resp)); | 1314 return new async.Future.value(stringResponse(200, h, resp)); |
| 1315 }), true); | 1315 }), true); |
| 1316 res.update(arg_request, arg_project, arg_id).then(unittest.expectAsync(((a
pi.Insert2 response) { | 1316 res.update(arg_request, arg_project, arg_id).then(unittest.expectAsync1(((
api.Insert2 response) { |
| 1317 checkInsert2(response); | 1317 checkInsert2(response); |
| 1318 }))); | 1318 }))); |
| 1319 }); | 1319 }); |
| 1320 | 1320 |
| 1321 }); | 1321 }); |
| 1322 | 1322 |
| 1323 | 1323 |
| 1324 } | 1324 } |
| 1325 | 1325 |
| OLD | NEW |