| 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:unittest/unittest.dart' as unittest; |
| 11 import 'package:googleapis/common/common.dart' as common; | |
| 12 import 'package:googleapis/src/common_internal.dart' as common_internal; | |
| 13 import '../common/common_internal_test.dart' as common_test; | |
| 14 | 11 |
| 15 import 'package:googleapis/prediction/v1_6.dart' as api; | 12 import 'package:googleapis/prediction/v1_6.dart' as api; |
| 16 | 13 |
| 14 class HttpServerMock extends http.BaseClient { |
| 15 core.Function _callback; |
| 16 core.bool _expectJson; |
| 17 | 17 |
| 18 void register(core.Function callback, core.bool expectJson) { |
| 19 _callback = callback; |
| 20 _expectJson = expectJson; |
| 21 } |
| 22 |
| 23 async.Future<http.StreamedResponse> send(http.BaseRequest request) { |
| 24 if (_expectJson) { |
| 25 return request.finalize() |
| 26 .transform(convert.UTF8.decoder) |
| 27 .join('') |
| 28 .then((core.String jsonString) { |
| 29 if (jsonString.isEmpty) { |
| 30 return _callback(request, null); |
| 31 } else { |
| 32 return _callback(request, convert.JSON.decode(jsonString)); |
| 33 } |
| 34 }); |
| 35 } else { |
| 36 var stream = request.finalize(); |
| 37 if (stream == null) { |
| 38 return _callback(request, []); |
| 39 } else { |
| 40 return stream.toBytes().then((data) { |
| 41 return _callback(request, data); |
| 42 }); |
| 43 } |
| 44 } |
| 45 } |
| 46 } |
| 47 |
| 48 http.StreamedResponse stringResponse( |
| 49 core.int status, core.Map headers, core.String body) { |
| 50 var stream = new async.Stream.fromIterable([convert.UTF8.encode(body)]); |
| 51 return new http.StreamedResponse(stream, status, headers: headers); |
| 52 } |
| 18 | 53 |
| 19 core.int buildCounterAnalyzeDataDescriptionFeaturesCategoricalValues = 0; | 54 core.int buildCounterAnalyzeDataDescriptionFeaturesCategoricalValues = 0; |
| 20 buildAnalyzeDataDescriptionFeaturesCategoricalValues() { | 55 buildAnalyzeDataDescriptionFeaturesCategoricalValues() { |
| 21 var o = new api.AnalyzeDataDescriptionFeaturesCategoricalValues(); | 56 var o = new api.AnalyzeDataDescriptionFeaturesCategoricalValues(); |
| 22 buildCounterAnalyzeDataDescriptionFeaturesCategoricalValues++; | 57 buildCounterAnalyzeDataDescriptionFeaturesCategoricalValues++; |
| 23 if (buildCounterAnalyzeDataDescriptionFeaturesCategoricalValues < 3) { | 58 if (buildCounterAnalyzeDataDescriptionFeaturesCategoricalValues < 3) { |
| 24 o.count = "foo"; | 59 o.count = "foo"; |
| 25 o.value = "foo"; | 60 o.value = "foo"; |
| 26 } | 61 } |
| 27 buildCounterAnalyzeDataDescriptionFeaturesCategoricalValues--; | 62 buildCounterAnalyzeDataDescriptionFeaturesCategoricalValues--; |
| 28 return o; | 63 return o; |
| 29 } | 64 } |
| 30 | 65 |
| 31 checkAnalyzeDataDescriptionFeaturesCategoricalValues(api.AnalyzeDataDescriptionF
eaturesCategoricalValues o) { | 66 checkAnalyzeDataDescriptionFeaturesCategoricalValues(api.AnalyzeDataDescriptionF
eaturesCategoricalValues o) { |
| 32 buildCounterAnalyzeDataDescriptionFeaturesCategoricalValues++; | 67 buildCounterAnalyzeDataDescriptionFeaturesCategoricalValues++; |
| 33 if (buildCounterAnalyzeDataDescriptionFeaturesCategoricalValues < 3) { | 68 if (buildCounterAnalyzeDataDescriptionFeaturesCategoricalValues < 3) { |
| 34 unittest.expect(o.count, unittest.equals('foo')); | 69 unittest.expect(o.count, unittest.equals('foo')); |
| 35 unittest.expect(o.value, unittest.equals('foo')); | 70 unittest.expect(o.value, unittest.equals('foo')); |
| 36 } | 71 } |
| 37 buildCounterAnalyzeDataDescriptionFeaturesCategoricalValues--; | 72 buildCounterAnalyzeDataDescriptionFeaturesCategoricalValues--; |
| 38 } | 73 } |
| 39 | 74 |
| 40 buildUnnamed1108() { | 75 buildUnnamed1291() { |
| 41 var o = new core.List<api.AnalyzeDataDescriptionFeaturesCategoricalValues>(); | 76 var o = new core.List<api.AnalyzeDataDescriptionFeaturesCategoricalValues>(); |
| 42 o.add(buildAnalyzeDataDescriptionFeaturesCategoricalValues()); | 77 o.add(buildAnalyzeDataDescriptionFeaturesCategoricalValues()); |
| 43 o.add(buildAnalyzeDataDescriptionFeaturesCategoricalValues()); | 78 o.add(buildAnalyzeDataDescriptionFeaturesCategoricalValues()); |
| 44 return o; | 79 return o; |
| 45 } | 80 } |
| 46 | 81 |
| 47 checkUnnamed1108(core.List<api.AnalyzeDataDescriptionFeaturesCategoricalValues>
o) { | 82 checkUnnamed1291(core.List<api.AnalyzeDataDescriptionFeaturesCategoricalValues>
o) { |
| 48 unittest.expect(o, unittest.hasLength(2)); | 83 unittest.expect(o, unittest.hasLength(2)); |
| 49 checkAnalyzeDataDescriptionFeaturesCategoricalValues(o[0]); | 84 checkAnalyzeDataDescriptionFeaturesCategoricalValues(o[0]); |
| 50 checkAnalyzeDataDescriptionFeaturesCategoricalValues(o[1]); | 85 checkAnalyzeDataDescriptionFeaturesCategoricalValues(o[1]); |
| 51 } | 86 } |
| 52 | 87 |
| 53 core.int buildCounterAnalyzeDataDescriptionFeaturesCategorical = 0; | 88 core.int buildCounterAnalyzeDataDescriptionFeaturesCategorical = 0; |
| 54 buildAnalyzeDataDescriptionFeaturesCategorical() { | 89 buildAnalyzeDataDescriptionFeaturesCategorical() { |
| 55 var o = new api.AnalyzeDataDescriptionFeaturesCategorical(); | 90 var o = new api.AnalyzeDataDescriptionFeaturesCategorical(); |
| 56 buildCounterAnalyzeDataDescriptionFeaturesCategorical++; | 91 buildCounterAnalyzeDataDescriptionFeaturesCategorical++; |
| 57 if (buildCounterAnalyzeDataDescriptionFeaturesCategorical < 3) { | 92 if (buildCounterAnalyzeDataDescriptionFeaturesCategorical < 3) { |
| 58 o.count = "foo"; | 93 o.count = "foo"; |
| 59 o.values = buildUnnamed1108(); | 94 o.values = buildUnnamed1291(); |
| 60 } | 95 } |
| 61 buildCounterAnalyzeDataDescriptionFeaturesCategorical--; | 96 buildCounterAnalyzeDataDescriptionFeaturesCategorical--; |
| 62 return o; | 97 return o; |
| 63 } | 98 } |
| 64 | 99 |
| 65 checkAnalyzeDataDescriptionFeaturesCategorical(api.AnalyzeDataDescriptionFeature
sCategorical o) { | 100 checkAnalyzeDataDescriptionFeaturesCategorical(api.AnalyzeDataDescriptionFeature
sCategorical o) { |
| 66 buildCounterAnalyzeDataDescriptionFeaturesCategorical++; | 101 buildCounterAnalyzeDataDescriptionFeaturesCategorical++; |
| 67 if (buildCounterAnalyzeDataDescriptionFeaturesCategorical < 3) { | 102 if (buildCounterAnalyzeDataDescriptionFeaturesCategorical < 3) { |
| 68 unittest.expect(o.count, unittest.equals('foo')); | 103 unittest.expect(o.count, unittest.equals('foo')); |
| 69 checkUnnamed1108(o.values); | 104 checkUnnamed1291(o.values); |
| 70 } | 105 } |
| 71 buildCounterAnalyzeDataDescriptionFeaturesCategorical--; | 106 buildCounterAnalyzeDataDescriptionFeaturesCategorical--; |
| 72 } | 107 } |
| 73 | 108 |
| 74 core.int buildCounterAnalyzeDataDescriptionFeaturesNumeric = 0; | 109 core.int buildCounterAnalyzeDataDescriptionFeaturesNumeric = 0; |
| 75 buildAnalyzeDataDescriptionFeaturesNumeric() { | 110 buildAnalyzeDataDescriptionFeaturesNumeric() { |
| 76 var o = new api.AnalyzeDataDescriptionFeaturesNumeric(); | 111 var o = new api.AnalyzeDataDescriptionFeaturesNumeric(); |
| 77 buildCounterAnalyzeDataDescriptionFeaturesNumeric++; | 112 buildCounterAnalyzeDataDescriptionFeaturesNumeric++; |
| 78 if (buildCounterAnalyzeDataDescriptionFeaturesNumeric < 3) { | 113 if (buildCounterAnalyzeDataDescriptionFeaturesNumeric < 3) { |
| 79 o.count = "foo"; | 114 o.count = "foo"; |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 131 buildCounterAnalyzeDataDescriptionFeatures++; | 166 buildCounterAnalyzeDataDescriptionFeatures++; |
| 132 if (buildCounterAnalyzeDataDescriptionFeatures < 3) { | 167 if (buildCounterAnalyzeDataDescriptionFeatures < 3) { |
| 133 checkAnalyzeDataDescriptionFeaturesCategorical(o.categorical); | 168 checkAnalyzeDataDescriptionFeaturesCategorical(o.categorical); |
| 134 unittest.expect(o.index, unittest.equals('foo')); | 169 unittest.expect(o.index, unittest.equals('foo')); |
| 135 checkAnalyzeDataDescriptionFeaturesNumeric(o.numeric); | 170 checkAnalyzeDataDescriptionFeaturesNumeric(o.numeric); |
| 136 checkAnalyzeDataDescriptionFeaturesText(o.text); | 171 checkAnalyzeDataDescriptionFeaturesText(o.text); |
| 137 } | 172 } |
| 138 buildCounterAnalyzeDataDescriptionFeatures--; | 173 buildCounterAnalyzeDataDescriptionFeatures--; |
| 139 } | 174 } |
| 140 | 175 |
| 141 buildUnnamed1109() { | 176 buildUnnamed1292() { |
| 142 var o = new core.List<api.AnalyzeDataDescriptionFeatures>(); | 177 var o = new core.List<api.AnalyzeDataDescriptionFeatures>(); |
| 143 o.add(buildAnalyzeDataDescriptionFeatures()); | 178 o.add(buildAnalyzeDataDescriptionFeatures()); |
| 144 o.add(buildAnalyzeDataDescriptionFeatures()); | 179 o.add(buildAnalyzeDataDescriptionFeatures()); |
| 145 return o; | 180 return o; |
| 146 } | 181 } |
| 147 | 182 |
| 148 checkUnnamed1109(core.List<api.AnalyzeDataDescriptionFeatures> o) { | 183 checkUnnamed1292(core.List<api.AnalyzeDataDescriptionFeatures> o) { |
| 149 unittest.expect(o, unittest.hasLength(2)); | 184 unittest.expect(o, unittest.hasLength(2)); |
| 150 checkAnalyzeDataDescriptionFeatures(o[0]); | 185 checkAnalyzeDataDescriptionFeatures(o[0]); |
| 151 checkAnalyzeDataDescriptionFeatures(o[1]); | 186 checkAnalyzeDataDescriptionFeatures(o[1]); |
| 152 } | 187 } |
| 153 | 188 |
| 154 core.int buildCounterAnalyzeDataDescriptionOutputFeatureNumeric = 0; | 189 core.int buildCounterAnalyzeDataDescriptionOutputFeatureNumeric = 0; |
| 155 buildAnalyzeDataDescriptionOutputFeatureNumeric() { | 190 buildAnalyzeDataDescriptionOutputFeatureNumeric() { |
| 156 var o = new api.AnalyzeDataDescriptionOutputFeatureNumeric(); | 191 var o = new api.AnalyzeDataDescriptionOutputFeatureNumeric(); |
| 157 buildCounterAnalyzeDataDescriptionOutputFeatureNumeric++; | 192 buildCounterAnalyzeDataDescriptionOutputFeatureNumeric++; |
| 158 if (buildCounterAnalyzeDataDescriptionOutputFeatureNumeric < 3) { | 193 if (buildCounterAnalyzeDataDescriptionOutputFeatureNumeric < 3) { |
| (...skipping 29 matching lines...) Expand all Loading... |
| 188 | 223 |
| 189 checkAnalyzeDataDescriptionOutputFeatureText(api.AnalyzeDataDescriptionOutputFea
tureText o) { | 224 checkAnalyzeDataDescriptionOutputFeatureText(api.AnalyzeDataDescriptionOutputFea
tureText o) { |
| 190 buildCounterAnalyzeDataDescriptionOutputFeatureText++; | 225 buildCounterAnalyzeDataDescriptionOutputFeatureText++; |
| 191 if (buildCounterAnalyzeDataDescriptionOutputFeatureText < 3) { | 226 if (buildCounterAnalyzeDataDescriptionOutputFeatureText < 3) { |
| 192 unittest.expect(o.count, unittest.equals('foo')); | 227 unittest.expect(o.count, unittest.equals('foo')); |
| 193 unittest.expect(o.value, unittest.equals('foo')); | 228 unittest.expect(o.value, unittest.equals('foo')); |
| 194 } | 229 } |
| 195 buildCounterAnalyzeDataDescriptionOutputFeatureText--; | 230 buildCounterAnalyzeDataDescriptionOutputFeatureText--; |
| 196 } | 231 } |
| 197 | 232 |
| 198 buildUnnamed1110() { | 233 buildUnnamed1293() { |
| 199 var o = new core.List<api.AnalyzeDataDescriptionOutputFeatureText>(); | 234 var o = new core.List<api.AnalyzeDataDescriptionOutputFeatureText>(); |
| 200 o.add(buildAnalyzeDataDescriptionOutputFeatureText()); | 235 o.add(buildAnalyzeDataDescriptionOutputFeatureText()); |
| 201 o.add(buildAnalyzeDataDescriptionOutputFeatureText()); | 236 o.add(buildAnalyzeDataDescriptionOutputFeatureText()); |
| 202 return o; | 237 return o; |
| 203 } | 238 } |
| 204 | 239 |
| 205 checkUnnamed1110(core.List<api.AnalyzeDataDescriptionOutputFeatureText> o) { | 240 checkUnnamed1293(core.List<api.AnalyzeDataDescriptionOutputFeatureText> o) { |
| 206 unittest.expect(o, unittest.hasLength(2)); | 241 unittest.expect(o, unittest.hasLength(2)); |
| 207 checkAnalyzeDataDescriptionOutputFeatureText(o[0]); | 242 checkAnalyzeDataDescriptionOutputFeatureText(o[0]); |
| 208 checkAnalyzeDataDescriptionOutputFeatureText(o[1]); | 243 checkAnalyzeDataDescriptionOutputFeatureText(o[1]); |
| 209 } | 244 } |
| 210 | 245 |
| 211 core.int buildCounterAnalyzeDataDescriptionOutputFeature = 0; | 246 core.int buildCounterAnalyzeDataDescriptionOutputFeature = 0; |
| 212 buildAnalyzeDataDescriptionOutputFeature() { | 247 buildAnalyzeDataDescriptionOutputFeature() { |
| 213 var o = new api.AnalyzeDataDescriptionOutputFeature(); | 248 var o = new api.AnalyzeDataDescriptionOutputFeature(); |
| 214 buildCounterAnalyzeDataDescriptionOutputFeature++; | 249 buildCounterAnalyzeDataDescriptionOutputFeature++; |
| 215 if (buildCounterAnalyzeDataDescriptionOutputFeature < 3) { | 250 if (buildCounterAnalyzeDataDescriptionOutputFeature < 3) { |
| 216 o.numeric = buildAnalyzeDataDescriptionOutputFeatureNumeric(); | 251 o.numeric = buildAnalyzeDataDescriptionOutputFeatureNumeric(); |
| 217 o.text = buildUnnamed1110(); | 252 o.text = buildUnnamed1293(); |
| 218 } | 253 } |
| 219 buildCounterAnalyzeDataDescriptionOutputFeature--; | 254 buildCounterAnalyzeDataDescriptionOutputFeature--; |
| 220 return o; | 255 return o; |
| 221 } | 256 } |
| 222 | 257 |
| 223 checkAnalyzeDataDescriptionOutputFeature(api.AnalyzeDataDescriptionOutputFeature
o) { | 258 checkAnalyzeDataDescriptionOutputFeature(api.AnalyzeDataDescriptionOutputFeature
o) { |
| 224 buildCounterAnalyzeDataDescriptionOutputFeature++; | 259 buildCounterAnalyzeDataDescriptionOutputFeature++; |
| 225 if (buildCounterAnalyzeDataDescriptionOutputFeature < 3) { | 260 if (buildCounterAnalyzeDataDescriptionOutputFeature < 3) { |
| 226 checkAnalyzeDataDescriptionOutputFeatureNumeric(o.numeric); | 261 checkAnalyzeDataDescriptionOutputFeatureNumeric(o.numeric); |
| 227 checkUnnamed1110(o.text); | 262 checkUnnamed1293(o.text); |
| 228 } | 263 } |
| 229 buildCounterAnalyzeDataDescriptionOutputFeature--; | 264 buildCounterAnalyzeDataDescriptionOutputFeature--; |
| 230 } | 265 } |
| 231 | 266 |
| 232 core.int buildCounterAnalyzeDataDescription = 0; | 267 core.int buildCounterAnalyzeDataDescription = 0; |
| 233 buildAnalyzeDataDescription() { | 268 buildAnalyzeDataDescription() { |
| 234 var o = new api.AnalyzeDataDescription(); | 269 var o = new api.AnalyzeDataDescription(); |
| 235 buildCounterAnalyzeDataDescription++; | 270 buildCounterAnalyzeDataDescription++; |
| 236 if (buildCounterAnalyzeDataDescription < 3) { | 271 if (buildCounterAnalyzeDataDescription < 3) { |
| 237 o.features = buildUnnamed1109(); | 272 o.features = buildUnnamed1292(); |
| 238 o.outputFeature = buildAnalyzeDataDescriptionOutputFeature(); | 273 o.outputFeature = buildAnalyzeDataDescriptionOutputFeature(); |
| 239 } | 274 } |
| 240 buildCounterAnalyzeDataDescription--; | 275 buildCounterAnalyzeDataDescription--; |
| 241 return o; | 276 return o; |
| 242 } | 277 } |
| 243 | 278 |
| 244 checkAnalyzeDataDescription(api.AnalyzeDataDescription o) { | 279 checkAnalyzeDataDescription(api.AnalyzeDataDescription o) { |
| 245 buildCounterAnalyzeDataDescription++; | 280 buildCounterAnalyzeDataDescription++; |
| 246 if (buildCounterAnalyzeDataDescription < 3) { | 281 if (buildCounterAnalyzeDataDescription < 3) { |
| 247 checkUnnamed1109(o.features); | 282 checkUnnamed1292(o.features); |
| 248 checkAnalyzeDataDescriptionOutputFeature(o.outputFeature); | 283 checkAnalyzeDataDescriptionOutputFeature(o.outputFeature); |
| 249 } | 284 } |
| 250 buildCounterAnalyzeDataDescription--; | 285 buildCounterAnalyzeDataDescription--; |
| 251 } | 286 } |
| 252 | 287 |
| 253 buildUnnamed1111() { | 288 buildUnnamed1294() { |
| 254 var o = new core.Map<core.String, core.String>(); | 289 var o = new core.Map<core.String, core.String>(); |
| 255 o["x"] = "foo"; | 290 o["x"] = "foo"; |
| 256 o["y"] = "foo"; | 291 o["y"] = "foo"; |
| 257 return o; | 292 return o; |
| 258 } | 293 } |
| 259 | 294 |
| 260 checkUnnamed1111(core.Map<core.String, core.String> o) { | 295 checkUnnamed1294(core.Map<core.String, core.String> o) { |
| 261 unittest.expect(o, unittest.hasLength(2)); | 296 unittest.expect(o, unittest.hasLength(2)); |
| 262 unittest.expect(o["x"], unittest.equals('foo')); | 297 unittest.expect(o["x"], unittest.equals('foo')); |
| 263 unittest.expect(o["y"], unittest.equals('foo')); | 298 unittest.expect(o["y"], unittest.equals('foo')); |
| 264 } | 299 } |
| 265 | 300 |
| 266 buildUnnamed1112() { | 301 buildUnnamed1295() { |
| 267 var o = new core.List<core.Map<core.String, core.String>>(); | 302 var o = new core.List<core.Map<core.String, core.String>>(); |
| 268 o.add(buildUnnamed1111()); | 303 o.add(buildUnnamed1294()); |
| 269 o.add(buildUnnamed1111()); | 304 o.add(buildUnnamed1294()); |
| 270 return o; | 305 return o; |
| 271 } | 306 } |
| 272 | 307 |
| 273 checkUnnamed1112(core.List<core.Map<core.String, core.String>> o) { | 308 checkUnnamed1295(core.List<core.Map<core.String, core.String>> o) { |
| 274 unittest.expect(o, unittest.hasLength(2)); | 309 unittest.expect(o, unittest.hasLength(2)); |
| 275 checkUnnamed1111(o[0]); | 310 checkUnnamed1294(o[0]); |
| 276 checkUnnamed1111(o[1]); | 311 checkUnnamed1294(o[1]); |
| 277 } | 312 } |
| 278 | 313 |
| 279 buildUnnamed1113() { | 314 buildUnnamed1296() { |
| 280 var o = new core.Map<core.String, core.String>(); | 315 var o = new core.Map<core.String, core.String>(); |
| 281 o["x"] = "foo"; | 316 o["x"] = "foo"; |
| 282 o["y"] = "foo"; | 317 o["y"] = "foo"; |
| 283 return o; | 318 return o; |
| 284 } | 319 } |
| 285 | 320 |
| 286 checkUnnamed1113(core.Map<core.String, core.String> o) { | 321 checkUnnamed1296(core.Map<core.String, core.String> o) { |
| 287 unittest.expect(o, unittest.hasLength(2)); | 322 unittest.expect(o, unittest.hasLength(2)); |
| 288 unittest.expect(o["x"], unittest.equals('foo')); | 323 unittest.expect(o["x"], unittest.equals('foo')); |
| 289 unittest.expect(o["y"], unittest.equals('foo')); | 324 unittest.expect(o["y"], unittest.equals('foo')); |
| 290 } | 325 } |
| 291 | 326 |
| 292 buildUnnamed1114() { | 327 buildUnnamed1297() { |
| 293 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>>(); |
| 294 o["x"] = buildUnnamed1113(); | 329 o["x"] = buildUnnamed1296(); |
| 295 o["y"] = buildUnnamed1113(); | 330 o["y"] = buildUnnamed1296(); |
| 296 return o; | 331 return o; |
| 297 } | 332 } |
| 298 | 333 |
| 299 checkUnnamed1114(core.Map<core.String, core.Map<core.String, core.String>> o) { | 334 checkUnnamed1297(core.Map<core.String, core.Map<core.String, core.String>> o) { |
| 300 unittest.expect(o, unittest.hasLength(2)); | 335 unittest.expect(o, unittest.hasLength(2)); |
| 301 checkUnnamed1113(o["x"]); | 336 checkUnnamed1296(o["x"]); |
| 302 checkUnnamed1113(o["y"]); | 337 checkUnnamed1296(o["y"]); |
| 303 } | 338 } |
| 304 | 339 |
| 305 buildUnnamed1115() { | 340 buildUnnamed1298() { |
| 306 var o = new core.Map<core.String, core.String>(); | 341 var o = new core.Map<core.String, core.String>(); |
| 307 o["x"] = "foo"; | 342 o["x"] = "foo"; |
| 308 o["y"] = "foo"; | 343 o["y"] = "foo"; |
| 309 return o; | 344 return o; |
| 310 } | 345 } |
| 311 | 346 |
| 312 checkUnnamed1115(core.Map<core.String, core.String> o) { | 347 checkUnnamed1298(core.Map<core.String, core.String> o) { |
| 313 unittest.expect(o, unittest.hasLength(2)); | 348 unittest.expect(o, unittest.hasLength(2)); |
| 314 unittest.expect(o["x"], unittest.equals('foo')); | 349 unittest.expect(o["x"], unittest.equals('foo')); |
| 315 unittest.expect(o["y"], unittest.equals('foo')); | 350 unittest.expect(o["y"], unittest.equals('foo')); |
| 316 } | 351 } |
| 317 | 352 |
| 318 core.int buildCounterAnalyzeModelDescription = 0; | 353 core.int buildCounterAnalyzeModelDescription = 0; |
| 319 buildAnalyzeModelDescription() { | 354 buildAnalyzeModelDescription() { |
| 320 var o = new api.AnalyzeModelDescription(); | 355 var o = new api.AnalyzeModelDescription(); |
| 321 buildCounterAnalyzeModelDescription++; | 356 buildCounterAnalyzeModelDescription++; |
| 322 if (buildCounterAnalyzeModelDescription < 3) { | 357 if (buildCounterAnalyzeModelDescription < 3) { |
| 323 o.confusionMatrix = buildUnnamed1114(); | 358 o.confusionMatrix = buildUnnamed1297(); |
| 324 o.confusionMatrixRowTotals = buildUnnamed1115(); | 359 o.confusionMatrixRowTotals = buildUnnamed1298(); |
| 325 o.modelinfo = buildInsert2(); | 360 o.modelinfo = buildInsert2(); |
| 326 } | 361 } |
| 327 buildCounterAnalyzeModelDescription--; | 362 buildCounterAnalyzeModelDescription--; |
| 328 return o; | 363 return o; |
| 329 } | 364 } |
| 330 | 365 |
| 331 checkAnalyzeModelDescription(api.AnalyzeModelDescription o) { | 366 checkAnalyzeModelDescription(api.AnalyzeModelDescription o) { |
| 332 buildCounterAnalyzeModelDescription++; | 367 buildCounterAnalyzeModelDescription++; |
| 333 if (buildCounterAnalyzeModelDescription < 3) { | 368 if (buildCounterAnalyzeModelDescription < 3) { |
| 334 checkUnnamed1114(o.confusionMatrix); | 369 checkUnnamed1297(o.confusionMatrix); |
| 335 checkUnnamed1115(o.confusionMatrixRowTotals); | 370 checkUnnamed1298(o.confusionMatrixRowTotals); |
| 336 checkInsert2(o.modelinfo); | 371 checkInsert2(o.modelinfo); |
| 337 } | 372 } |
| 338 buildCounterAnalyzeModelDescription--; | 373 buildCounterAnalyzeModelDescription--; |
| 339 } | 374 } |
| 340 | 375 |
| 341 core.int buildCounterAnalyze = 0; | 376 core.int buildCounterAnalyze = 0; |
| 342 buildAnalyze() { | 377 buildAnalyze() { |
| 343 var o = new api.Analyze(); | 378 var o = new api.Analyze(); |
| 344 buildCounterAnalyze++; | 379 buildCounterAnalyze++; |
| 345 if (buildCounterAnalyze < 3) { | 380 if (buildCounterAnalyze < 3) { |
| 346 o.dataDescription = buildAnalyzeDataDescription(); | 381 o.dataDescription = buildAnalyzeDataDescription(); |
| 347 o.errors = buildUnnamed1112(); | 382 o.errors = buildUnnamed1295(); |
| 348 o.id = "foo"; | 383 o.id = "foo"; |
| 349 o.kind = "foo"; | 384 o.kind = "foo"; |
| 350 o.modelDescription = buildAnalyzeModelDescription(); | 385 o.modelDescription = buildAnalyzeModelDescription(); |
| 351 o.selfLink = "foo"; | 386 o.selfLink = "foo"; |
| 352 } | 387 } |
| 353 buildCounterAnalyze--; | 388 buildCounterAnalyze--; |
| 354 return o; | 389 return o; |
| 355 } | 390 } |
| 356 | 391 |
| 357 checkAnalyze(api.Analyze o) { | 392 checkAnalyze(api.Analyze o) { |
| 358 buildCounterAnalyze++; | 393 buildCounterAnalyze++; |
| 359 if (buildCounterAnalyze < 3) { | 394 if (buildCounterAnalyze < 3) { |
| 360 checkAnalyzeDataDescription(o.dataDescription); | 395 checkAnalyzeDataDescription(o.dataDescription); |
| 361 checkUnnamed1112(o.errors); | 396 checkUnnamed1295(o.errors); |
| 362 unittest.expect(o.id, unittest.equals('foo')); | 397 unittest.expect(o.id, unittest.equals('foo')); |
| 363 unittest.expect(o.kind, unittest.equals('foo')); | 398 unittest.expect(o.kind, unittest.equals('foo')); |
| 364 checkAnalyzeModelDescription(o.modelDescription); | 399 checkAnalyzeModelDescription(o.modelDescription); |
| 365 unittest.expect(o.selfLink, unittest.equals('foo')); | 400 unittest.expect(o.selfLink, unittest.equals('foo')); |
| 366 } | 401 } |
| 367 buildCounterAnalyze--; | 402 buildCounterAnalyze--; |
| 368 } | 403 } |
| 369 | 404 |
| 370 buildUnnamed1116() { | 405 buildUnnamed1299() { |
| 371 var o = new core.List<core.Object>(); | 406 var o = new core.List<core.Object>(); |
| 372 o.add({'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}); | 407 o.add({'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}); |
| 373 o.add({'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}); | 408 o.add({'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}); |
| 374 return o; | 409 return o; |
| 375 } | 410 } |
| 376 | 411 |
| 377 checkUnnamed1116(core.List<core.Object> o) { | 412 checkUnnamed1299(core.List<core.Object> o) { |
| 378 unittest.expect(o, unittest.hasLength(2)); | 413 unittest.expect(o, unittest.hasLength(2)); |
| 379 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')); |
| 380 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')); |
| 381 } | 416 } |
| 382 | 417 |
| 383 core.int buildCounterInputInput = 0; | 418 core.int buildCounterInputInput = 0; |
| 384 buildInputInput() { | 419 buildInputInput() { |
| 385 var o = new api.InputInput(); | 420 var o = new api.InputInput(); |
| 386 buildCounterInputInput++; | 421 buildCounterInputInput++; |
| 387 if (buildCounterInputInput < 3) { | 422 if (buildCounterInputInput < 3) { |
| 388 o.csvInstance = buildUnnamed1116(); | 423 o.csvInstance = buildUnnamed1299(); |
| 389 } | 424 } |
| 390 buildCounterInputInput--; | 425 buildCounterInputInput--; |
| 391 return o; | 426 return o; |
| 392 } | 427 } |
| 393 | 428 |
| 394 checkInputInput(api.InputInput o) { | 429 checkInputInput(api.InputInput o) { |
| 395 buildCounterInputInput++; | 430 buildCounterInputInput++; |
| 396 if (buildCounterInputInput < 3) { | 431 if (buildCounterInputInput < 3) { |
| 397 checkUnnamed1116(o.csvInstance); | 432 checkUnnamed1299(o.csvInstance); |
| 398 } | 433 } |
| 399 buildCounterInputInput--; | 434 buildCounterInputInput--; |
| 400 } | 435 } |
| 401 | 436 |
| 402 core.int buildCounterInput = 0; | 437 core.int buildCounterInput = 0; |
| 403 buildInput() { | 438 buildInput() { |
| 404 var o = new api.Input(); | 439 var o = new api.Input(); |
| 405 buildCounterInput++; | 440 buildCounterInput++; |
| 406 if (buildCounterInput < 3) { | 441 if (buildCounterInput < 3) { |
| 407 o.input = buildInputInput(); | 442 o.input = buildInputInput(); |
| 408 } | 443 } |
| 409 buildCounterInput--; | 444 buildCounterInput--; |
| 410 return o; | 445 return o; |
| 411 } | 446 } |
| 412 | 447 |
| 413 checkInput(api.Input o) { | 448 checkInput(api.Input o) { |
| 414 buildCounterInput++; | 449 buildCounterInput++; |
| 415 if (buildCounterInput < 3) { | 450 if (buildCounterInput < 3) { |
| 416 checkInputInput(o.input); | 451 checkInputInput(o.input); |
| 417 } | 452 } |
| 418 buildCounterInput--; | 453 buildCounterInput--; |
| 419 } | 454 } |
| 420 | 455 |
| 421 buildUnnamed1117() { | 456 buildUnnamed1300() { |
| 422 var o = new core.List<core.Object>(); | 457 var o = new core.List<core.Object>(); |
| 423 o.add({'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}); | 458 o.add({'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}); |
| 424 o.add({'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}); | 459 o.add({'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}); |
| 425 return o; | 460 return o; |
| 426 } | 461 } |
| 427 | 462 |
| 428 checkUnnamed1117(core.List<core.Object> o) { | 463 checkUnnamed1300(core.List<core.Object> o) { |
| 429 unittest.expect(o, unittest.hasLength(2)); | 464 unittest.expect(o, unittest.hasLength(2)); |
| 430 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')); |
| 431 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')); |
| 432 } | 467 } |
| 433 | 468 |
| 434 core.int buildCounterInsertTrainingInstances = 0; | 469 core.int buildCounterInsertTrainingInstances = 0; |
| 435 buildInsertTrainingInstances() { | 470 buildInsertTrainingInstances() { |
| 436 var o = new api.InsertTrainingInstances(); | 471 var o = new api.InsertTrainingInstances(); |
| 437 buildCounterInsertTrainingInstances++; | 472 buildCounterInsertTrainingInstances++; |
| 438 if (buildCounterInsertTrainingInstances < 3) { | 473 if (buildCounterInsertTrainingInstances < 3) { |
| 439 o.csvInstance = buildUnnamed1117(); | 474 o.csvInstance = buildUnnamed1300(); |
| 440 o.output = "foo"; | 475 o.output = "foo"; |
| 441 } | 476 } |
| 442 buildCounterInsertTrainingInstances--; | 477 buildCounterInsertTrainingInstances--; |
| 443 return o; | 478 return o; |
| 444 } | 479 } |
| 445 | 480 |
| 446 checkInsertTrainingInstances(api.InsertTrainingInstances o) { | 481 checkInsertTrainingInstances(api.InsertTrainingInstances o) { |
| 447 buildCounterInsertTrainingInstances++; | 482 buildCounterInsertTrainingInstances++; |
| 448 if (buildCounterInsertTrainingInstances < 3) { | 483 if (buildCounterInsertTrainingInstances < 3) { |
| 449 checkUnnamed1117(o.csvInstance); | 484 checkUnnamed1300(o.csvInstance); |
| 450 unittest.expect(o.output, unittest.equals('foo')); | 485 unittest.expect(o.output, unittest.equals('foo')); |
| 451 } | 486 } |
| 452 buildCounterInsertTrainingInstances--; | 487 buildCounterInsertTrainingInstances--; |
| 453 } | 488 } |
| 454 | 489 |
| 455 buildUnnamed1118() { | 490 buildUnnamed1301() { |
| 456 var o = new core.List<api.InsertTrainingInstances>(); | 491 var o = new core.List<api.InsertTrainingInstances>(); |
| 457 o.add(buildInsertTrainingInstances()); | 492 o.add(buildInsertTrainingInstances()); |
| 458 o.add(buildInsertTrainingInstances()); | 493 o.add(buildInsertTrainingInstances()); |
| 459 return o; | 494 return o; |
| 460 } | 495 } |
| 461 | 496 |
| 462 checkUnnamed1118(core.List<api.InsertTrainingInstances> o) { | 497 checkUnnamed1301(core.List<api.InsertTrainingInstances> o) { |
| 463 unittest.expect(o, unittest.hasLength(2)); | 498 unittest.expect(o, unittest.hasLength(2)); |
| 464 checkInsertTrainingInstances(o[0]); | 499 checkInsertTrainingInstances(o[0]); |
| 465 checkInsertTrainingInstances(o[1]); | 500 checkInsertTrainingInstances(o[1]); |
| 466 } | 501 } |
| 467 | 502 |
| 468 buildUnnamed1119() { | 503 buildUnnamed1302() { |
| 469 var o = new core.Map<core.String, core.double>(); | 504 var o = new core.Map<core.String, core.double>(); |
| 470 o["x"] = 42.0; | 505 o["x"] = 42.0; |
| 471 o["y"] = 42.0; | 506 o["y"] = 42.0; |
| 472 return o; | 507 return o; |
| 473 } | 508 } |
| 474 | 509 |
| 475 checkUnnamed1119(core.Map<core.String, core.double> o) { | 510 checkUnnamed1302(core.Map<core.String, core.double> o) { |
| 476 unittest.expect(o, unittest.hasLength(2)); | 511 unittest.expect(o, unittest.hasLength(2)); |
| 477 unittest.expect(o["x"], unittest.equals(42.0)); | 512 unittest.expect(o["x"], unittest.equals(42.0)); |
| 478 unittest.expect(o["y"], unittest.equals(42.0)); | 513 unittest.expect(o["y"], unittest.equals(42.0)); |
| 479 } | 514 } |
| 480 | 515 |
| 481 buildUnnamed1120() { | 516 buildUnnamed1303() { |
| 482 var o = new core.List<core.Map<core.String, core.double>>(); | 517 var o = new core.List<core.Map<core.String, core.double>>(); |
| 483 o.add(buildUnnamed1119()); | 518 o.add(buildUnnamed1302()); |
| 484 o.add(buildUnnamed1119()); | 519 o.add(buildUnnamed1302()); |
| 485 return o; | 520 return o; |
| 486 } | 521 } |
| 487 | 522 |
| 488 checkUnnamed1120(core.List<core.Map<core.String, core.double>> o) { | 523 checkUnnamed1303(core.List<core.Map<core.String, core.double>> o) { |
| 489 unittest.expect(o, unittest.hasLength(2)); | 524 unittest.expect(o, unittest.hasLength(2)); |
| 490 checkUnnamed1119(o[0]); | 525 checkUnnamed1302(o[0]); |
| 491 checkUnnamed1119(o[1]); | 526 checkUnnamed1302(o[1]); |
| 492 } | 527 } |
| 493 | 528 |
| 494 core.int buildCounterInsert = 0; | 529 core.int buildCounterInsert = 0; |
| 495 buildInsert() { | 530 buildInsert() { |
| 496 var o = new api.Insert(); | 531 var o = new api.Insert(); |
| 497 buildCounterInsert++; | 532 buildCounterInsert++; |
| 498 if (buildCounterInsert < 3) { | 533 if (buildCounterInsert < 3) { |
| 499 o.id = "foo"; | 534 o.id = "foo"; |
| 500 o.modelType = "foo"; | 535 o.modelType = "foo"; |
| 501 o.sourceModel = "foo"; | 536 o.sourceModel = "foo"; |
| 502 o.storageDataLocation = "foo"; | 537 o.storageDataLocation = "foo"; |
| 503 o.storagePMMLLocation = "foo"; | 538 o.storagePMMLLocation = "foo"; |
| 504 o.storagePMMLModelLocation = "foo"; | 539 o.storagePMMLModelLocation = "foo"; |
| 505 o.trainingInstances = buildUnnamed1118(); | 540 o.trainingInstances = buildUnnamed1301(); |
| 506 o.utility = buildUnnamed1120(); | 541 o.utility = buildUnnamed1303(); |
| 507 } | 542 } |
| 508 buildCounterInsert--; | 543 buildCounterInsert--; |
| 509 return o; | 544 return o; |
| 510 } | 545 } |
| 511 | 546 |
| 512 checkInsert(api.Insert o) { | 547 checkInsert(api.Insert o) { |
| 513 buildCounterInsert++; | 548 buildCounterInsert++; |
| 514 if (buildCounterInsert < 3) { | 549 if (buildCounterInsert < 3) { |
| 515 unittest.expect(o.id, unittest.equals('foo')); | 550 unittest.expect(o.id, unittest.equals('foo')); |
| 516 unittest.expect(o.modelType, unittest.equals('foo')); | 551 unittest.expect(o.modelType, unittest.equals('foo')); |
| 517 unittest.expect(o.sourceModel, unittest.equals('foo')); | 552 unittest.expect(o.sourceModel, unittest.equals('foo')); |
| 518 unittest.expect(o.storageDataLocation, unittest.equals('foo')); | 553 unittest.expect(o.storageDataLocation, unittest.equals('foo')); |
| 519 unittest.expect(o.storagePMMLLocation, unittest.equals('foo')); | 554 unittest.expect(o.storagePMMLLocation, unittest.equals('foo')); |
| 520 unittest.expect(o.storagePMMLModelLocation, unittest.equals('foo')); | 555 unittest.expect(o.storagePMMLModelLocation, unittest.equals('foo')); |
| 521 checkUnnamed1118(o.trainingInstances); | 556 checkUnnamed1301(o.trainingInstances); |
| 522 checkUnnamed1120(o.utility); | 557 checkUnnamed1303(o.utility); |
| 523 } | 558 } |
| 524 buildCounterInsert--; | 559 buildCounterInsert--; |
| 525 } | 560 } |
| 526 | 561 |
| 527 core.int buildCounterInsert2ModelInfo = 0; | 562 core.int buildCounterInsert2ModelInfo = 0; |
| 528 buildInsert2ModelInfo() { | 563 buildInsert2ModelInfo() { |
| 529 var o = new api.Insert2ModelInfo(); | 564 var o = new api.Insert2ModelInfo(); |
| 530 buildCounterInsert2ModelInfo++; | 565 buildCounterInsert2ModelInfo++; |
| 531 if (buildCounterInsert2ModelInfo < 3) { | 566 if (buildCounterInsert2ModelInfo < 3) { |
| 532 o.classWeightedAccuracy = "foo"; | 567 o.classWeightedAccuracy = "foo"; |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 585 unittest.expect(o.selfLink, unittest.equals('foo')); | 620 unittest.expect(o.selfLink, unittest.equals('foo')); |
| 586 unittest.expect(o.storageDataLocation, unittest.equals('foo')); | 621 unittest.expect(o.storageDataLocation, unittest.equals('foo')); |
| 587 unittest.expect(o.storagePMMLLocation, unittest.equals('foo')); | 622 unittest.expect(o.storagePMMLLocation, unittest.equals('foo')); |
| 588 unittest.expect(o.storagePMMLModelLocation, unittest.equals('foo')); | 623 unittest.expect(o.storagePMMLModelLocation, unittest.equals('foo')); |
| 589 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"))); |
| 590 unittest.expect(o.trainingStatus, unittest.equals('foo')); | 625 unittest.expect(o.trainingStatus, unittest.equals('foo')); |
| 591 } | 626 } |
| 592 buildCounterInsert2--; | 627 buildCounterInsert2--; |
| 593 } | 628 } |
| 594 | 629 |
| 595 buildUnnamed1121() { | 630 buildUnnamed1304() { |
| 596 var o = new core.List<api.Insert2>(); | 631 var o = new core.List<api.Insert2>(); |
| 597 o.add(buildInsert2()); | 632 o.add(buildInsert2()); |
| 598 o.add(buildInsert2()); | 633 o.add(buildInsert2()); |
| 599 return o; | 634 return o; |
| 600 } | 635 } |
| 601 | 636 |
| 602 checkUnnamed1121(core.List<api.Insert2> o) { | 637 checkUnnamed1304(core.List<api.Insert2> o) { |
| 603 unittest.expect(o, unittest.hasLength(2)); | 638 unittest.expect(o, unittest.hasLength(2)); |
| 604 checkInsert2(o[0]); | 639 checkInsert2(o[0]); |
| 605 checkInsert2(o[1]); | 640 checkInsert2(o[1]); |
| 606 } | 641 } |
| 607 | 642 |
| 608 core.int buildCounterList = 0; | 643 core.int buildCounterList = 0; |
| 609 buildList() { | 644 buildList() { |
| 610 var o = new api.List(); | 645 var o = new api.List(); |
| 611 buildCounterList++; | 646 buildCounterList++; |
| 612 if (buildCounterList < 3) { | 647 if (buildCounterList < 3) { |
| 613 o.items = buildUnnamed1121(); | 648 o.items = buildUnnamed1304(); |
| 614 o.kind = "foo"; | 649 o.kind = "foo"; |
| 615 o.nextPageToken = "foo"; | 650 o.nextPageToken = "foo"; |
| 616 o.selfLink = "foo"; | 651 o.selfLink = "foo"; |
| 617 } | 652 } |
| 618 buildCounterList--; | 653 buildCounterList--; |
| 619 return o; | 654 return o; |
| 620 } | 655 } |
| 621 | 656 |
| 622 checkList(api.List o) { | 657 checkList(api.List o) { |
| 623 buildCounterList++; | 658 buildCounterList++; |
| 624 if (buildCounterList < 3) { | 659 if (buildCounterList < 3) { |
| 625 checkUnnamed1121(o.items); | 660 checkUnnamed1304(o.items); |
| 626 unittest.expect(o.kind, unittest.equals('foo')); | 661 unittest.expect(o.kind, unittest.equals('foo')); |
| 627 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 662 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
| 628 unittest.expect(o.selfLink, unittest.equals('foo')); | 663 unittest.expect(o.selfLink, unittest.equals('foo')); |
| 629 } | 664 } |
| 630 buildCounterList--; | 665 buildCounterList--; |
| 631 } | 666 } |
| 632 | 667 |
| 633 core.int buildCounterOutputOutputMulti = 0; | 668 core.int buildCounterOutputOutputMulti = 0; |
| 634 buildOutputOutputMulti() { | 669 buildOutputOutputMulti() { |
| 635 var o = new api.OutputOutputMulti(); | 670 var o = new api.OutputOutputMulti(); |
| 636 buildCounterOutputOutputMulti++; | 671 buildCounterOutputOutputMulti++; |
| 637 if (buildCounterOutputOutputMulti < 3) { | 672 if (buildCounterOutputOutputMulti < 3) { |
| 638 o.label = "foo"; | 673 o.label = "foo"; |
| 639 o.score = "foo"; | 674 o.score = "foo"; |
| 640 } | 675 } |
| 641 buildCounterOutputOutputMulti--; | 676 buildCounterOutputOutputMulti--; |
| 642 return o; | 677 return o; |
| 643 } | 678 } |
| 644 | 679 |
| 645 checkOutputOutputMulti(api.OutputOutputMulti o) { | 680 checkOutputOutputMulti(api.OutputOutputMulti o) { |
| 646 buildCounterOutputOutputMulti++; | 681 buildCounterOutputOutputMulti++; |
| 647 if (buildCounterOutputOutputMulti < 3) { | 682 if (buildCounterOutputOutputMulti < 3) { |
| 648 unittest.expect(o.label, unittest.equals('foo')); | 683 unittest.expect(o.label, unittest.equals('foo')); |
| 649 unittest.expect(o.score, unittest.equals('foo')); | 684 unittest.expect(o.score, unittest.equals('foo')); |
| 650 } | 685 } |
| 651 buildCounterOutputOutputMulti--; | 686 buildCounterOutputOutputMulti--; |
| 652 } | 687 } |
| 653 | 688 |
| 654 buildUnnamed1122() { | 689 buildUnnamed1305() { |
| 655 var o = new core.List<api.OutputOutputMulti>(); | 690 var o = new core.List<api.OutputOutputMulti>(); |
| 656 o.add(buildOutputOutputMulti()); | 691 o.add(buildOutputOutputMulti()); |
| 657 o.add(buildOutputOutputMulti()); | 692 o.add(buildOutputOutputMulti()); |
| 658 return o; | 693 return o; |
| 659 } | 694 } |
| 660 | 695 |
| 661 checkUnnamed1122(core.List<api.OutputOutputMulti> o) { | 696 checkUnnamed1305(core.List<api.OutputOutputMulti> o) { |
| 662 unittest.expect(o, unittest.hasLength(2)); | 697 unittest.expect(o, unittest.hasLength(2)); |
| 663 checkOutputOutputMulti(o[0]); | 698 checkOutputOutputMulti(o[0]); |
| 664 checkOutputOutputMulti(o[1]); | 699 checkOutputOutputMulti(o[1]); |
| 665 } | 700 } |
| 666 | 701 |
| 667 core.int buildCounterOutput = 0; | 702 core.int buildCounterOutput = 0; |
| 668 buildOutput() { | 703 buildOutput() { |
| 669 var o = new api.Output(); | 704 var o = new api.Output(); |
| 670 buildCounterOutput++; | 705 buildCounterOutput++; |
| 671 if (buildCounterOutput < 3) { | 706 if (buildCounterOutput < 3) { |
| 672 o.id = "foo"; | 707 o.id = "foo"; |
| 673 o.kind = "foo"; | 708 o.kind = "foo"; |
| 674 o.outputLabel = "foo"; | 709 o.outputLabel = "foo"; |
| 675 o.outputMulti = buildUnnamed1122(); | 710 o.outputMulti = buildUnnamed1305(); |
| 676 o.outputValue = 42.0; | 711 o.outputValue = 42.0; |
| 677 o.selfLink = "foo"; | 712 o.selfLink = "foo"; |
| 678 } | 713 } |
| 679 buildCounterOutput--; | 714 buildCounterOutput--; |
| 680 return o; | 715 return o; |
| 681 } | 716 } |
| 682 | 717 |
| 683 checkOutput(api.Output o) { | 718 checkOutput(api.Output o) { |
| 684 buildCounterOutput++; | 719 buildCounterOutput++; |
| 685 if (buildCounterOutput < 3) { | 720 if (buildCounterOutput < 3) { |
| 686 unittest.expect(o.id, unittest.equals('foo')); | 721 unittest.expect(o.id, unittest.equals('foo')); |
| 687 unittest.expect(o.kind, unittest.equals('foo')); | 722 unittest.expect(o.kind, unittest.equals('foo')); |
| 688 unittest.expect(o.outputLabel, unittest.equals('foo')); | 723 unittest.expect(o.outputLabel, unittest.equals('foo')); |
| 689 checkUnnamed1122(o.outputMulti); | 724 checkUnnamed1305(o.outputMulti); |
| 690 unittest.expect(o.outputValue, unittest.equals(42.0)); | 725 unittest.expect(o.outputValue, unittest.equals(42.0)); |
| 691 unittest.expect(o.selfLink, unittest.equals('foo')); | 726 unittest.expect(o.selfLink, unittest.equals('foo')); |
| 692 } | 727 } |
| 693 buildCounterOutput--; | 728 buildCounterOutput--; |
| 694 } | 729 } |
| 695 | 730 |
| 696 buildUnnamed1123() { | 731 buildUnnamed1306() { |
| 697 var o = new core.List<core.Object>(); | 732 var o = new core.List<core.Object>(); |
| 698 o.add({'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}); | 733 o.add({'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}); |
| 699 o.add({'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}); | 734 o.add({'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}); |
| 700 return o; | 735 return o; |
| 701 } | 736 } |
| 702 | 737 |
| 703 checkUnnamed1123(core.List<core.Object> o) { | 738 checkUnnamed1306(core.List<core.Object> o) { |
| 704 unittest.expect(o, unittest.hasLength(2)); | 739 unittest.expect(o, unittest.hasLength(2)); |
| 705 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')); |
| 706 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')); |
| 707 } | 742 } |
| 708 | 743 |
| 709 core.int buildCounterUpdate = 0; | 744 core.int buildCounterUpdate = 0; |
| 710 buildUpdate() { | 745 buildUpdate() { |
| 711 var o = new api.Update(); | 746 var o = new api.Update(); |
| 712 buildCounterUpdate++; | 747 buildCounterUpdate++; |
| 713 if (buildCounterUpdate < 3) { | 748 if (buildCounterUpdate < 3) { |
| 714 o.csvInstance = buildUnnamed1123(); | 749 o.csvInstance = buildUnnamed1306(); |
| 715 o.output = "foo"; | 750 o.output = "foo"; |
| 716 } | 751 } |
| 717 buildCounterUpdate--; | 752 buildCounterUpdate--; |
| 718 return o; | 753 return o; |
| 719 } | 754 } |
| 720 | 755 |
| 721 checkUpdate(api.Update o) { | 756 checkUpdate(api.Update o) { |
| 722 buildCounterUpdate++; | 757 buildCounterUpdate++; |
| 723 if (buildCounterUpdate < 3) { | 758 if (buildCounterUpdate < 3) { |
| 724 checkUnnamed1123(o.csvInstance); | 759 checkUnnamed1306(o.csvInstance); |
| 725 unittest.expect(o.output, unittest.equals('foo')); | 760 unittest.expect(o.output, unittest.equals('foo')); |
| 726 } | 761 } |
| 727 buildCounterUpdate--; | 762 buildCounterUpdate--; |
| 728 } | 763 } |
| 729 | 764 |
| 730 | 765 |
| 731 main() { | 766 main() { |
| 732 unittest.group("obj-schema-AnalyzeDataDescriptionFeaturesCategoricalValues", (
) { | 767 unittest.group("obj-schema-AnalyzeDataDescriptionFeaturesCategoricalValues", (
) { |
| 733 unittest.test("to-json--from-json", () { | 768 unittest.test("to-json--from-json", () { |
| 734 var o = buildAnalyzeDataDescriptionFeaturesCategoricalValues(); | 769 var o = buildAnalyzeDataDescriptionFeaturesCategoricalValues(); |
| (...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 914 var o = buildUpdate(); | 949 var o = buildUpdate(); |
| 915 var od = new api.Update.fromJson(o.toJson()); | 950 var od = new api.Update.fromJson(o.toJson()); |
| 916 checkUpdate(od); | 951 checkUpdate(od); |
| 917 }); | 952 }); |
| 918 }); | 953 }); |
| 919 | 954 |
| 920 | 955 |
| 921 unittest.group("resource-HostedmodelsResourceApi", () { | 956 unittest.group("resource-HostedmodelsResourceApi", () { |
| 922 unittest.test("method--predict", () { | 957 unittest.test("method--predict", () { |
| 923 | 958 |
| 924 var mock = new common_test.HttpServerMock(); | 959 var mock = new HttpServerMock(); |
| 925 api.HostedmodelsResourceApi res = new api.PredictionApi(mock).hostedmodels
; | 960 api.HostedmodelsResourceApi res = new api.PredictionApi(mock).hostedmodels
; |
| 926 var arg_request = buildInput(); | 961 var arg_request = buildInput(); |
| 927 var arg_project = "foo"; | 962 var arg_project = "foo"; |
| 928 var arg_hostedModelName = "foo"; | 963 var arg_hostedModelName = "foo"; |
| 929 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 964 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 930 var obj = new api.Input.fromJson(json); | 965 var obj = new api.Input.fromJson(json); |
| 931 checkInput(obj); | 966 checkInput(obj); |
| 932 | 967 |
| 933 var path = (req.url).path; | 968 var path = (req.url).path; |
| 934 var pathOffset = 0; | 969 var pathOffset = 0; |
| (...skipping 17 matching lines...) Expand all Loading... |
| 952 var keyvalue = part.split("="); | 987 var keyvalue = part.split("="); |
| 953 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 988 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 954 } | 989 } |
| 955 } | 990 } |
| 956 | 991 |
| 957 | 992 |
| 958 var h = { | 993 var h = { |
| 959 "content-type" : "application/json; charset=utf-8", | 994 "content-type" : "application/json; charset=utf-8", |
| 960 }; | 995 }; |
| 961 var resp = convert.JSON.encode(buildOutput()); | 996 var resp = convert.JSON.encode(buildOutput()); |
| 962 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 997 return new async.Future.value(stringResponse(200, h, resp)); |
| 963 }), true); | 998 }), true); |
| 964 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
xpectAsync(((api.Output response) { |
| 965 checkOutput(response); | 1000 checkOutput(response); |
| 966 }))); | 1001 }))); |
| 967 }); | 1002 }); |
| 968 | 1003 |
| 969 }); | 1004 }); |
| 970 | 1005 |
| 971 | 1006 |
| 972 unittest.group("resource-TrainedmodelsResourceApi", () { | 1007 unittest.group("resource-TrainedmodelsResourceApi", () { |
| 973 unittest.test("method--analyze", () { | 1008 unittest.test("method--analyze", () { |
| 974 | 1009 |
| 975 var mock = new common_test.HttpServerMock(); | 1010 var mock = new HttpServerMock(); |
| 976 api.TrainedmodelsResourceApi res = new api.PredictionApi(mock).trainedmode
ls; | 1011 api.TrainedmodelsResourceApi res = new api.PredictionApi(mock).trainedmode
ls; |
| 977 var arg_project = "foo"; | 1012 var arg_project = "foo"; |
| 978 var arg_id = "foo"; | 1013 var arg_id = "foo"; |
| 979 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1014 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 980 var path = (req.url).path; | 1015 var path = (req.url).path; |
| 981 var pathOffset = 0; | 1016 var pathOffset = 0; |
| 982 var index; | 1017 var index; |
| 983 var subPart; | 1018 var subPart; |
| 984 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1019 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 985 pathOffset += 1; | 1020 pathOffset += 1; |
| (...skipping 13 matching lines...) Expand all Loading... |
| 999 var keyvalue = part.split("="); | 1034 var keyvalue = part.split("="); |
| 1000 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 1035 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 1001 } | 1036 } |
| 1002 } | 1037 } |
| 1003 | 1038 |
| 1004 | 1039 |
| 1005 var h = { | 1040 var h = { |
| 1006 "content-type" : "application/json; charset=utf-8", | 1041 "content-type" : "application/json; charset=utf-8", |
| 1007 }; | 1042 }; |
| 1008 var resp = convert.JSON.encode(buildAnalyze()); | 1043 var resp = convert.JSON.encode(buildAnalyze()); |
| 1009 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 1044 return new async.Future.value(stringResponse(200, h, resp)); |
| 1010 }), true); | 1045 }), true); |
| 1011 res.analyze(arg_project, arg_id).then(unittest.expectAsync(((api.Analyze r
esponse) { | 1046 res.analyze(arg_project, arg_id).then(unittest.expectAsync(((api.Analyze r
esponse) { |
| 1012 checkAnalyze(response); | 1047 checkAnalyze(response); |
| 1013 }))); | 1048 }))); |
| 1014 }); | 1049 }); |
| 1015 | 1050 |
| 1016 unittest.test("method--delete", () { | 1051 unittest.test("method--delete", () { |
| 1017 | 1052 |
| 1018 var mock = new common_test.HttpServerMock(); | 1053 var mock = new HttpServerMock(); |
| 1019 api.TrainedmodelsResourceApi res = new api.PredictionApi(mock).trainedmode
ls; | 1054 api.TrainedmodelsResourceApi res = new api.PredictionApi(mock).trainedmode
ls; |
| 1020 var arg_project = "foo"; | 1055 var arg_project = "foo"; |
| 1021 var arg_id = "foo"; | 1056 var arg_id = "foo"; |
| 1022 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1057 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 1023 var path = (req.url).path; | 1058 var path = (req.url).path; |
| 1024 var pathOffset = 0; | 1059 var pathOffset = 0; |
| 1025 var index; | 1060 var index; |
| 1026 var subPart; | 1061 var subPart; |
| 1027 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1062 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 1028 pathOffset += 1; | 1063 pathOffset += 1; |
| (...skipping 13 matching lines...) Expand all Loading... |
| 1042 var keyvalue = part.split("="); | 1077 var keyvalue = part.split("="); |
| 1043 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 1078 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 1044 } | 1079 } |
| 1045 } | 1080 } |
| 1046 | 1081 |
| 1047 | 1082 |
| 1048 var h = { | 1083 var h = { |
| 1049 "content-type" : "application/json; charset=utf-8", | 1084 "content-type" : "application/json; charset=utf-8", |
| 1050 }; | 1085 }; |
| 1051 var resp = ""; | 1086 var resp = ""; |
| 1052 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 1087 return new async.Future.value(stringResponse(200, h, resp)); |
| 1053 }), true); | 1088 }), true); |
| 1054 res.delete(arg_project, arg_id).then(unittest.expectAsync((_) {})); | 1089 res.delete(arg_project, arg_id).then(unittest.expectAsync((_) {})); |
| 1055 }); | 1090 }); |
| 1056 | 1091 |
| 1057 unittest.test("method--get", () { | 1092 unittest.test("method--get", () { |
| 1058 | 1093 |
| 1059 var mock = new common_test.HttpServerMock(); | 1094 var mock = new HttpServerMock(); |
| 1060 api.TrainedmodelsResourceApi res = new api.PredictionApi(mock).trainedmode
ls; | 1095 api.TrainedmodelsResourceApi res = new api.PredictionApi(mock).trainedmode
ls; |
| 1061 var arg_project = "foo"; | 1096 var arg_project = "foo"; |
| 1062 var arg_id = "foo"; | 1097 var arg_id = "foo"; |
| 1063 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1098 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 1064 var path = (req.url).path; | 1099 var path = (req.url).path; |
| 1065 var pathOffset = 0; | 1100 var pathOffset = 0; |
| 1066 var index; | 1101 var index; |
| 1067 var subPart; | 1102 var subPart; |
| 1068 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1103 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 1069 pathOffset += 1; | 1104 pathOffset += 1; |
| (...skipping 13 matching lines...) Expand all Loading... |
| 1083 var keyvalue = part.split("="); | 1118 var keyvalue = part.split("="); |
| 1084 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 1119 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 1085 } | 1120 } |
| 1086 } | 1121 } |
| 1087 | 1122 |
| 1088 | 1123 |
| 1089 var h = { | 1124 var h = { |
| 1090 "content-type" : "application/json; charset=utf-8", | 1125 "content-type" : "application/json; charset=utf-8", |
| 1091 }; | 1126 }; |
| 1092 var resp = convert.JSON.encode(buildInsert2()); | 1127 var resp = convert.JSON.encode(buildInsert2()); |
| 1093 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 1128 return new async.Future.value(stringResponse(200, h, resp)); |
| 1094 }), true); | 1129 }), true); |
| 1095 res.get(arg_project, arg_id).then(unittest.expectAsync(((api.Insert2 respo
nse) { | 1130 res.get(arg_project, arg_id).then(unittest.expectAsync(((api.Insert2 respo
nse) { |
| 1096 checkInsert2(response); | 1131 checkInsert2(response); |
| 1097 }))); | 1132 }))); |
| 1098 }); | 1133 }); |
| 1099 | 1134 |
| 1100 unittest.test("method--insert", () { | 1135 unittest.test("method--insert", () { |
| 1101 | 1136 |
| 1102 var mock = new common_test.HttpServerMock(); | 1137 var mock = new HttpServerMock(); |
| 1103 api.TrainedmodelsResourceApi res = new api.PredictionApi(mock).trainedmode
ls; | 1138 api.TrainedmodelsResourceApi res = new api.PredictionApi(mock).trainedmode
ls; |
| 1104 var arg_request = buildInsert(); | 1139 var arg_request = buildInsert(); |
| 1105 var arg_project = "foo"; | 1140 var arg_project = "foo"; |
| 1106 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1141 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 1107 var obj = new api.Insert.fromJson(json); | 1142 var obj = new api.Insert.fromJson(json); |
| 1108 checkInsert(obj); | 1143 checkInsert(obj); |
| 1109 | 1144 |
| 1110 var path = (req.url).path; | 1145 var path = (req.url).path; |
| 1111 var pathOffset = 0; | 1146 var pathOffset = 0; |
| 1112 var index; | 1147 var index; |
| (...skipping 16 matching lines...) Expand all Loading... |
| 1129 var keyvalue = part.split("="); | 1164 var keyvalue = part.split("="); |
| 1130 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 1165 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 1131 } | 1166 } |
| 1132 } | 1167 } |
| 1133 | 1168 |
| 1134 | 1169 |
| 1135 var h = { | 1170 var h = { |
| 1136 "content-type" : "application/json; charset=utf-8", | 1171 "content-type" : "application/json; charset=utf-8", |
| 1137 }; | 1172 }; |
| 1138 var resp = convert.JSON.encode(buildInsert2()); | 1173 var resp = convert.JSON.encode(buildInsert2()); |
| 1139 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 1174 return new async.Future.value(stringResponse(200, h, resp)); |
| 1140 }), true); | 1175 }), true); |
| 1141 res.insert(arg_request, arg_project).then(unittest.expectAsync(((api.Inser
t2 response) { | 1176 res.insert(arg_request, arg_project).then(unittest.expectAsync(((api.Inser
t2 response) { |
| 1142 checkInsert2(response); | 1177 checkInsert2(response); |
| 1143 }))); | 1178 }))); |
| 1144 }); | 1179 }); |
| 1145 | 1180 |
| 1146 unittest.test("method--list", () { | 1181 unittest.test("method--list", () { |
| 1147 | 1182 |
| 1148 var mock = new common_test.HttpServerMock(); | 1183 var mock = new HttpServerMock(); |
| 1149 api.TrainedmodelsResourceApi res = new api.PredictionApi(mock).trainedmode
ls; | 1184 api.TrainedmodelsResourceApi res = new api.PredictionApi(mock).trainedmode
ls; |
| 1150 var arg_project = "foo"; | 1185 var arg_project = "foo"; |
| 1151 var arg_maxResults = 42; | 1186 var arg_maxResults = 42; |
| 1152 var arg_pageToken = "foo"; | 1187 var arg_pageToken = "foo"; |
| 1153 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1188 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 1154 var path = (req.url).path; | 1189 var path = (req.url).path; |
| 1155 var pathOffset = 0; | 1190 var pathOffset = 0; |
| 1156 var index; | 1191 var index; |
| 1157 var subPart; | 1192 var subPart; |
| 1158 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1193 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| (...skipping 16 matching lines...) Expand all Loading... |
| 1175 } | 1210 } |
| 1176 } | 1211 } |
| 1177 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)); |
| 1178 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | 1213 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); |
| 1179 | 1214 |
| 1180 | 1215 |
| 1181 var h = { | 1216 var h = { |
| 1182 "content-type" : "application/json; charset=utf-8", | 1217 "content-type" : "application/json; charset=utf-8", |
| 1183 }; | 1218 }; |
| 1184 var resp = convert.JSON.encode(buildList()); | 1219 var resp = convert.JSON.encode(buildList()); |
| 1185 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 1220 return new async.Future.value(stringResponse(200, h, resp)); |
| 1186 }), true); | 1221 }), true); |
| 1187 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.expectAsync(((api.List response) { |
| 1188 checkList(response); | 1223 checkList(response); |
| 1189 }))); | 1224 }))); |
| 1190 }); | 1225 }); |
| 1191 | 1226 |
| 1192 unittest.test("method--predict", () { | 1227 unittest.test("method--predict", () { |
| 1193 | 1228 |
| 1194 var mock = new common_test.HttpServerMock(); | 1229 var mock = new HttpServerMock(); |
| 1195 api.TrainedmodelsResourceApi res = new api.PredictionApi(mock).trainedmode
ls; | 1230 api.TrainedmodelsResourceApi res = new api.PredictionApi(mock).trainedmode
ls; |
| 1196 var arg_request = buildInput(); | 1231 var arg_request = buildInput(); |
| 1197 var arg_project = "foo"; | 1232 var arg_project = "foo"; |
| 1198 var arg_id = "foo"; | 1233 var arg_id = "foo"; |
| 1199 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1234 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 1200 var obj = new api.Input.fromJson(json); | 1235 var obj = new api.Input.fromJson(json); |
| 1201 checkInput(obj); | 1236 checkInput(obj); |
| 1202 | 1237 |
| 1203 var path = (req.url).path; | 1238 var path = (req.url).path; |
| 1204 var pathOffset = 0; | 1239 var pathOffset = 0; |
| (...skipping 17 matching lines...) Expand all Loading... |
| 1222 var keyvalue = part.split("="); | 1257 var keyvalue = part.split("="); |
| 1223 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 1258 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 1224 } | 1259 } |
| 1225 } | 1260 } |
| 1226 | 1261 |
| 1227 | 1262 |
| 1228 var h = { | 1263 var h = { |
| 1229 "content-type" : "application/json; charset=utf-8", | 1264 "content-type" : "application/json; charset=utf-8", |
| 1230 }; | 1265 }; |
| 1231 var resp = convert.JSON.encode(buildOutput()); | 1266 var resp = convert.JSON.encode(buildOutput()); |
| 1232 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 1267 return new async.Future.value(stringResponse(200, h, resp)); |
| 1233 }), true); | 1268 }), true); |
| 1234 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.expectAsync(((
api.Output response) { |
| 1235 checkOutput(response); | 1270 checkOutput(response); |
| 1236 }))); | 1271 }))); |
| 1237 }); | 1272 }); |
| 1238 | 1273 |
| 1239 unittest.test("method--update", () { | 1274 unittest.test("method--update", () { |
| 1240 | 1275 |
| 1241 var mock = new common_test.HttpServerMock(); | 1276 var mock = new HttpServerMock(); |
| 1242 api.TrainedmodelsResourceApi res = new api.PredictionApi(mock).trainedmode
ls; | 1277 api.TrainedmodelsResourceApi res = new api.PredictionApi(mock).trainedmode
ls; |
| 1243 var arg_request = buildUpdate(); | 1278 var arg_request = buildUpdate(); |
| 1244 var arg_project = "foo"; | 1279 var arg_project = "foo"; |
| 1245 var arg_id = "foo"; | 1280 var arg_id = "foo"; |
| 1246 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1281 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 1247 var obj = new api.Update.fromJson(json); | 1282 var obj = new api.Update.fromJson(json); |
| 1248 checkUpdate(obj); | 1283 checkUpdate(obj); |
| 1249 | 1284 |
| 1250 var path = (req.url).path; | 1285 var path = (req.url).path; |
| 1251 var pathOffset = 0; | 1286 var pathOffset = 0; |
| (...skipping 17 matching lines...) Expand all Loading... |
| 1269 var keyvalue = part.split("="); | 1304 var keyvalue = part.split("="); |
| 1270 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 1305 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 1271 } | 1306 } |
| 1272 } | 1307 } |
| 1273 | 1308 |
| 1274 | 1309 |
| 1275 var h = { | 1310 var h = { |
| 1276 "content-type" : "application/json; charset=utf-8", | 1311 "content-type" : "application/json; charset=utf-8", |
| 1277 }; | 1312 }; |
| 1278 var resp = convert.JSON.encode(buildInsert2()); | 1313 var resp = convert.JSON.encode(buildInsert2()); |
| 1279 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 1314 return new async.Future.value(stringResponse(200, h, resp)); |
| 1280 }), true); | 1315 }), true); |
| 1281 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.expectAsync(((a
pi.Insert2 response) { |
| 1282 checkInsert2(response); | 1317 checkInsert2(response); |
| 1283 }))); | 1318 }))); |
| 1284 }); | 1319 }); |
| 1285 | 1320 |
| 1286 }); | 1321 }); |
| 1287 | 1322 |
| 1288 | 1323 |
| 1289 } | 1324 } |
| 1290 | 1325 |
| OLD | NEW |