| OLD | NEW |
| 1 library googleapis_beta.videointelligence.v1beta1.test; | 1 library googleapis_beta.videointelligence.v1beta1.test; |
| 2 | 2 |
| 3 import "dart:core" as core; | 3 import "dart:core" as core; |
| 4 import "dart:collection" as collection; | 4 import "dart:collection" as collection; |
| 5 import "dart:async" as async; | 5 import "dart:async" as async; |
| 6 import "dart:convert" as convert; | 6 import "dart:convert" as convert; |
| 7 | 7 |
| 8 import 'package:http/http.dart' as http; | 8 import 'package:http/http.dart' as http; |
| 9 import 'package:http/testing.dart' as http_testing; | 9 import 'package:http/testing.dart' as http_testing; |
| 10 import 'package:unittest/unittest.dart' as unittest; | 10 import 'package:test/test.dart' as unittest; |
| 11 | 11 |
| 12 import 'package:googleapis_beta/videointelligence/v1beta1.dart' as api; | 12 import 'package:googleapis_beta/videointelligence/v1beta1.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 buildUnnamed3732() { | 54 buildUnnamed3206() { |
| 55 var o = new core.List<api.GoogleCloudVideointelligenceV1beta1VideoAnnotationPr
ogress>(); | 55 var o = new core.List<api.GoogleCloudVideointelligenceV1beta1VideoAnnotationPr
ogress>(); |
| 56 o.add(buildGoogleCloudVideointelligenceV1beta1VideoAnnotationProgress()); | 56 o.add(buildGoogleCloudVideointelligenceV1beta1VideoAnnotationProgress()); |
| 57 o.add(buildGoogleCloudVideointelligenceV1beta1VideoAnnotationProgress()); | 57 o.add(buildGoogleCloudVideointelligenceV1beta1VideoAnnotationProgress()); |
| 58 return o; | 58 return o; |
| 59 } | 59 } |
| 60 | 60 |
| 61 checkUnnamed3732(core.List<api.GoogleCloudVideointelligenceV1beta1VideoAnnotatio
nProgress> o) { | 61 checkUnnamed3206(core.List<api.GoogleCloudVideointelligenceV1beta1VideoAnnotatio
nProgress> o) { |
| 62 unittest.expect(o, unittest.hasLength(2)); | 62 unittest.expect(o, unittest.hasLength(2)); |
| 63 checkGoogleCloudVideointelligenceV1beta1VideoAnnotationProgress(o[0]); | 63 checkGoogleCloudVideointelligenceV1beta1VideoAnnotationProgress(o[0]); |
| 64 checkGoogleCloudVideointelligenceV1beta1VideoAnnotationProgress(o[1]); | 64 checkGoogleCloudVideointelligenceV1beta1VideoAnnotationProgress(o[1]); |
| 65 } | 65 } |
| 66 | 66 |
| 67 core.int buildCounterGoogleCloudVideointelligenceV1beta1AnnotateVideoProgress =
0; | 67 core.int buildCounterGoogleCloudVideointelligenceV1beta1AnnotateVideoProgress =
0; |
| 68 buildGoogleCloudVideointelligenceV1beta1AnnotateVideoProgress() { | 68 buildGoogleCloudVideointelligenceV1beta1AnnotateVideoProgress() { |
| 69 var o = new api.GoogleCloudVideointelligenceV1beta1AnnotateVideoProgress(); | 69 var o = new api.GoogleCloudVideointelligenceV1beta1AnnotateVideoProgress(); |
| 70 buildCounterGoogleCloudVideointelligenceV1beta1AnnotateVideoProgress++; | 70 buildCounterGoogleCloudVideointelligenceV1beta1AnnotateVideoProgress++; |
| 71 if (buildCounterGoogleCloudVideointelligenceV1beta1AnnotateVideoProgress < 3)
{ | 71 if (buildCounterGoogleCloudVideointelligenceV1beta1AnnotateVideoProgress < 3)
{ |
| 72 o.annotationProgress = buildUnnamed3732(); | 72 o.annotationProgress = buildUnnamed3206(); |
| 73 } | 73 } |
| 74 buildCounterGoogleCloudVideointelligenceV1beta1AnnotateVideoProgress--; | 74 buildCounterGoogleCloudVideointelligenceV1beta1AnnotateVideoProgress--; |
| 75 return o; | 75 return o; |
| 76 } | 76 } |
| 77 | 77 |
| 78 checkGoogleCloudVideointelligenceV1beta1AnnotateVideoProgress(api.GoogleCloudVid
eointelligenceV1beta1AnnotateVideoProgress o) { | 78 checkGoogleCloudVideointelligenceV1beta1AnnotateVideoProgress(api.GoogleCloudVid
eointelligenceV1beta1AnnotateVideoProgress o) { |
| 79 buildCounterGoogleCloudVideointelligenceV1beta1AnnotateVideoProgress++; | 79 buildCounterGoogleCloudVideointelligenceV1beta1AnnotateVideoProgress++; |
| 80 if (buildCounterGoogleCloudVideointelligenceV1beta1AnnotateVideoProgress < 3)
{ | 80 if (buildCounterGoogleCloudVideointelligenceV1beta1AnnotateVideoProgress < 3)
{ |
| 81 checkUnnamed3732(o.annotationProgress); | 81 checkUnnamed3206(o.annotationProgress); |
| 82 } | 82 } |
| 83 buildCounterGoogleCloudVideointelligenceV1beta1AnnotateVideoProgress--; | 83 buildCounterGoogleCloudVideointelligenceV1beta1AnnotateVideoProgress--; |
| 84 } | 84 } |
| 85 | 85 |
| 86 buildUnnamed3733() { | 86 buildUnnamed3207() { |
| 87 var o = new core.List<core.String>(); | 87 var o = new core.List<core.String>(); |
| 88 o.add("foo"); | 88 o.add("foo"); |
| 89 o.add("foo"); | 89 o.add("foo"); |
| 90 return o; | 90 return o; |
| 91 } | 91 } |
| 92 | 92 |
| 93 checkUnnamed3733(core.List<core.String> o) { | 93 checkUnnamed3207(core.List<core.String> o) { |
| 94 unittest.expect(o, unittest.hasLength(2)); | 94 unittest.expect(o, unittest.hasLength(2)); |
| 95 unittest.expect(o[0], unittest.equals('foo')); | 95 unittest.expect(o[0], unittest.equals('foo')); |
| 96 unittest.expect(o[1], unittest.equals('foo')); | 96 unittest.expect(o[1], unittest.equals('foo')); |
| 97 } | 97 } |
| 98 | 98 |
| 99 core.int buildCounterGoogleCloudVideointelligenceV1beta1AnnotateVideoRequest = 0
; | 99 core.int buildCounterGoogleCloudVideointelligenceV1beta1AnnotateVideoRequest = 0
; |
| 100 buildGoogleCloudVideointelligenceV1beta1AnnotateVideoRequest() { | 100 buildGoogleCloudVideointelligenceV1beta1AnnotateVideoRequest() { |
| 101 var o = new api.GoogleCloudVideointelligenceV1beta1AnnotateVideoRequest(); | 101 var o = new api.GoogleCloudVideointelligenceV1beta1AnnotateVideoRequest(); |
| 102 buildCounterGoogleCloudVideointelligenceV1beta1AnnotateVideoRequest++; | 102 buildCounterGoogleCloudVideointelligenceV1beta1AnnotateVideoRequest++; |
| 103 if (buildCounterGoogleCloudVideointelligenceV1beta1AnnotateVideoRequest < 3) { | 103 if (buildCounterGoogleCloudVideointelligenceV1beta1AnnotateVideoRequest < 3) { |
| 104 o.features = buildUnnamed3733(); | 104 o.features = buildUnnamed3207(); |
| 105 o.inputContent = "foo"; | 105 o.inputContent = "foo"; |
| 106 o.inputUri = "foo"; | 106 o.inputUri = "foo"; |
| 107 o.locationId = "foo"; | 107 o.locationId = "foo"; |
| 108 o.outputUri = "foo"; | 108 o.outputUri = "foo"; |
| 109 o.videoContext = buildGoogleCloudVideointelligenceV1beta1VideoContext(); | 109 o.videoContext = buildGoogleCloudVideointelligenceV1beta1VideoContext(); |
| 110 } | 110 } |
| 111 buildCounterGoogleCloudVideointelligenceV1beta1AnnotateVideoRequest--; | 111 buildCounterGoogleCloudVideointelligenceV1beta1AnnotateVideoRequest--; |
| 112 return o; | 112 return o; |
| 113 } | 113 } |
| 114 | 114 |
| 115 checkGoogleCloudVideointelligenceV1beta1AnnotateVideoRequest(api.GoogleCloudVide
ointelligenceV1beta1AnnotateVideoRequest o) { | 115 checkGoogleCloudVideointelligenceV1beta1AnnotateVideoRequest(api.GoogleCloudVide
ointelligenceV1beta1AnnotateVideoRequest o) { |
| 116 buildCounterGoogleCloudVideointelligenceV1beta1AnnotateVideoRequest++; | 116 buildCounterGoogleCloudVideointelligenceV1beta1AnnotateVideoRequest++; |
| 117 if (buildCounterGoogleCloudVideointelligenceV1beta1AnnotateVideoRequest < 3) { | 117 if (buildCounterGoogleCloudVideointelligenceV1beta1AnnotateVideoRequest < 3) { |
| 118 checkUnnamed3733(o.features); | 118 checkUnnamed3207(o.features); |
| 119 unittest.expect(o.inputContent, unittest.equals('foo')); | 119 unittest.expect(o.inputContent, unittest.equals('foo')); |
| 120 unittest.expect(o.inputUri, unittest.equals('foo')); | 120 unittest.expect(o.inputUri, unittest.equals('foo')); |
| 121 unittest.expect(o.locationId, unittest.equals('foo')); | 121 unittest.expect(o.locationId, unittest.equals('foo')); |
| 122 unittest.expect(o.outputUri, unittest.equals('foo')); | 122 unittest.expect(o.outputUri, unittest.equals('foo')); |
| 123 checkGoogleCloudVideointelligenceV1beta1VideoContext(o.videoContext); | 123 checkGoogleCloudVideointelligenceV1beta1VideoContext(o.videoContext); |
| 124 } | 124 } |
| 125 buildCounterGoogleCloudVideointelligenceV1beta1AnnotateVideoRequest--; | 125 buildCounterGoogleCloudVideointelligenceV1beta1AnnotateVideoRequest--; |
| 126 } | 126 } |
| 127 | 127 |
| 128 buildUnnamed3734() { | 128 buildUnnamed3208() { |
| 129 var o = new core.List<api.GoogleCloudVideointelligenceV1beta1VideoAnnotationRe
sults>(); | 129 var o = new core.List<api.GoogleCloudVideointelligenceV1beta1VideoAnnotationRe
sults>(); |
| 130 o.add(buildGoogleCloudVideointelligenceV1beta1VideoAnnotationResults()); | 130 o.add(buildGoogleCloudVideointelligenceV1beta1VideoAnnotationResults()); |
| 131 o.add(buildGoogleCloudVideointelligenceV1beta1VideoAnnotationResults()); | 131 o.add(buildGoogleCloudVideointelligenceV1beta1VideoAnnotationResults()); |
| 132 return o; | 132 return o; |
| 133 } | 133 } |
| 134 | 134 |
| 135 checkUnnamed3734(core.List<api.GoogleCloudVideointelligenceV1beta1VideoAnnotatio
nResults> o) { | 135 checkUnnamed3208(core.List<api.GoogleCloudVideointelligenceV1beta1VideoAnnotatio
nResults> o) { |
| 136 unittest.expect(o, unittest.hasLength(2)); | 136 unittest.expect(o, unittest.hasLength(2)); |
| 137 checkGoogleCloudVideointelligenceV1beta1VideoAnnotationResults(o[0]); | 137 checkGoogleCloudVideointelligenceV1beta1VideoAnnotationResults(o[0]); |
| 138 checkGoogleCloudVideointelligenceV1beta1VideoAnnotationResults(o[1]); | 138 checkGoogleCloudVideointelligenceV1beta1VideoAnnotationResults(o[1]); |
| 139 } | 139 } |
| 140 | 140 |
| 141 core.int buildCounterGoogleCloudVideointelligenceV1beta1AnnotateVideoResponse =
0; | 141 core.int buildCounterGoogleCloudVideointelligenceV1beta1AnnotateVideoResponse =
0; |
| 142 buildGoogleCloudVideointelligenceV1beta1AnnotateVideoResponse() { | 142 buildGoogleCloudVideointelligenceV1beta1AnnotateVideoResponse() { |
| 143 var o = new api.GoogleCloudVideointelligenceV1beta1AnnotateVideoResponse(); | 143 var o = new api.GoogleCloudVideointelligenceV1beta1AnnotateVideoResponse(); |
| 144 buildCounterGoogleCloudVideointelligenceV1beta1AnnotateVideoResponse++; | 144 buildCounterGoogleCloudVideointelligenceV1beta1AnnotateVideoResponse++; |
| 145 if (buildCounterGoogleCloudVideointelligenceV1beta1AnnotateVideoResponse < 3)
{ | 145 if (buildCounterGoogleCloudVideointelligenceV1beta1AnnotateVideoResponse < 3)
{ |
| 146 o.annotationResults = buildUnnamed3734(); | 146 o.annotationResults = buildUnnamed3208(); |
| 147 } | 147 } |
| 148 buildCounterGoogleCloudVideointelligenceV1beta1AnnotateVideoResponse--; | 148 buildCounterGoogleCloudVideointelligenceV1beta1AnnotateVideoResponse--; |
| 149 return o; | 149 return o; |
| 150 } | 150 } |
| 151 | 151 |
| 152 checkGoogleCloudVideointelligenceV1beta1AnnotateVideoResponse(api.GoogleCloudVid
eointelligenceV1beta1AnnotateVideoResponse o) { | 152 checkGoogleCloudVideointelligenceV1beta1AnnotateVideoResponse(api.GoogleCloudVid
eointelligenceV1beta1AnnotateVideoResponse o) { |
| 153 buildCounterGoogleCloudVideointelligenceV1beta1AnnotateVideoResponse++; | 153 buildCounterGoogleCloudVideointelligenceV1beta1AnnotateVideoResponse++; |
| 154 if (buildCounterGoogleCloudVideointelligenceV1beta1AnnotateVideoResponse < 3)
{ | 154 if (buildCounterGoogleCloudVideointelligenceV1beta1AnnotateVideoResponse < 3)
{ |
| 155 checkUnnamed3734(o.annotationResults); | 155 checkUnnamed3208(o.annotationResults); |
| 156 } | 156 } |
| 157 buildCounterGoogleCloudVideointelligenceV1beta1AnnotateVideoResponse--; | 157 buildCounterGoogleCloudVideointelligenceV1beta1AnnotateVideoResponse--; |
| 158 } | 158 } |
| 159 | 159 |
| 160 buildUnnamed3735() { | 160 buildUnnamed3209() { |
| 161 var o = new core.List<api.GoogleCloudVideointelligenceV1beta1LabelLocation>(); | 161 var o = new core.List<api.GoogleCloudVideointelligenceV1beta1LabelLocation>(); |
| 162 o.add(buildGoogleCloudVideointelligenceV1beta1LabelLocation()); | 162 o.add(buildGoogleCloudVideointelligenceV1beta1LabelLocation()); |
| 163 o.add(buildGoogleCloudVideointelligenceV1beta1LabelLocation()); | 163 o.add(buildGoogleCloudVideointelligenceV1beta1LabelLocation()); |
| 164 return o; | 164 return o; |
| 165 } | 165 } |
| 166 | 166 |
| 167 checkUnnamed3735(core.List<api.GoogleCloudVideointelligenceV1beta1LabelLocation>
o) { | 167 checkUnnamed3209(core.List<api.GoogleCloudVideointelligenceV1beta1LabelLocation>
o) { |
| 168 unittest.expect(o, unittest.hasLength(2)); | 168 unittest.expect(o, unittest.hasLength(2)); |
| 169 checkGoogleCloudVideointelligenceV1beta1LabelLocation(o[0]); | 169 checkGoogleCloudVideointelligenceV1beta1LabelLocation(o[0]); |
| 170 checkGoogleCloudVideointelligenceV1beta1LabelLocation(o[1]); | 170 checkGoogleCloudVideointelligenceV1beta1LabelLocation(o[1]); |
| 171 } | 171 } |
| 172 | 172 |
| 173 core.int buildCounterGoogleCloudVideointelligenceV1beta1LabelAnnotation = 0; | 173 core.int buildCounterGoogleCloudVideointelligenceV1beta1LabelAnnotation = 0; |
| 174 buildGoogleCloudVideointelligenceV1beta1LabelAnnotation() { | 174 buildGoogleCloudVideointelligenceV1beta1LabelAnnotation() { |
| 175 var o = new api.GoogleCloudVideointelligenceV1beta1LabelAnnotation(); | 175 var o = new api.GoogleCloudVideointelligenceV1beta1LabelAnnotation(); |
| 176 buildCounterGoogleCloudVideointelligenceV1beta1LabelAnnotation++; | 176 buildCounterGoogleCloudVideointelligenceV1beta1LabelAnnotation++; |
| 177 if (buildCounterGoogleCloudVideointelligenceV1beta1LabelAnnotation < 3) { | 177 if (buildCounterGoogleCloudVideointelligenceV1beta1LabelAnnotation < 3) { |
| 178 o.description = "foo"; | 178 o.description = "foo"; |
| 179 o.languageCode = "foo"; | 179 o.languageCode = "foo"; |
| 180 o.locations = buildUnnamed3735(); | 180 o.locations = buildUnnamed3209(); |
| 181 } | 181 } |
| 182 buildCounterGoogleCloudVideointelligenceV1beta1LabelAnnotation--; | 182 buildCounterGoogleCloudVideointelligenceV1beta1LabelAnnotation--; |
| 183 return o; | 183 return o; |
| 184 } | 184 } |
| 185 | 185 |
| 186 checkGoogleCloudVideointelligenceV1beta1LabelAnnotation(api.GoogleCloudVideointe
lligenceV1beta1LabelAnnotation o) { | 186 checkGoogleCloudVideointelligenceV1beta1LabelAnnotation(api.GoogleCloudVideointe
lligenceV1beta1LabelAnnotation o) { |
| 187 buildCounterGoogleCloudVideointelligenceV1beta1LabelAnnotation++; | 187 buildCounterGoogleCloudVideointelligenceV1beta1LabelAnnotation++; |
| 188 if (buildCounterGoogleCloudVideointelligenceV1beta1LabelAnnotation < 3) { | 188 if (buildCounterGoogleCloudVideointelligenceV1beta1LabelAnnotation < 3) { |
| 189 unittest.expect(o.description, unittest.equals('foo')); | 189 unittest.expect(o.description, unittest.equals('foo')); |
| 190 unittest.expect(o.languageCode, unittest.equals('foo')); | 190 unittest.expect(o.languageCode, unittest.equals('foo')); |
| 191 checkUnnamed3735(o.locations); | 191 checkUnnamed3209(o.locations); |
| 192 } | 192 } |
| 193 buildCounterGoogleCloudVideointelligenceV1beta1LabelAnnotation--; | 193 buildCounterGoogleCloudVideointelligenceV1beta1LabelAnnotation--; |
| 194 } | 194 } |
| 195 | 195 |
| 196 core.int buildCounterGoogleCloudVideointelligenceV1beta1LabelLocation = 0; | 196 core.int buildCounterGoogleCloudVideointelligenceV1beta1LabelLocation = 0; |
| 197 buildGoogleCloudVideointelligenceV1beta1LabelLocation() { | 197 buildGoogleCloudVideointelligenceV1beta1LabelLocation() { |
| 198 var o = new api.GoogleCloudVideointelligenceV1beta1LabelLocation(); | 198 var o = new api.GoogleCloudVideointelligenceV1beta1LabelLocation(); |
| 199 buildCounterGoogleCloudVideointelligenceV1beta1LabelLocation++; | 199 buildCounterGoogleCloudVideointelligenceV1beta1LabelLocation++; |
| 200 if (buildCounterGoogleCloudVideointelligenceV1beta1LabelLocation < 3) { | 200 if (buildCounterGoogleCloudVideointelligenceV1beta1LabelLocation < 3) { |
| 201 o.confidence = 42.0; | 201 o.confidence = 42.0; |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 234 buildCounterGoogleCloudVideointelligenceV1beta1VideoAnnotationProgress++; | 234 buildCounterGoogleCloudVideointelligenceV1beta1VideoAnnotationProgress++; |
| 235 if (buildCounterGoogleCloudVideointelligenceV1beta1VideoAnnotationProgress < 3
) { | 235 if (buildCounterGoogleCloudVideointelligenceV1beta1VideoAnnotationProgress < 3
) { |
| 236 unittest.expect(o.inputUri, unittest.equals('foo')); | 236 unittest.expect(o.inputUri, unittest.equals('foo')); |
| 237 unittest.expect(o.progressPercent, unittest.equals(42)); | 237 unittest.expect(o.progressPercent, unittest.equals(42)); |
| 238 unittest.expect(o.startTime, unittest.equals('foo')); | 238 unittest.expect(o.startTime, unittest.equals('foo')); |
| 239 unittest.expect(o.updateTime, unittest.equals('foo')); | 239 unittest.expect(o.updateTime, unittest.equals('foo')); |
| 240 } | 240 } |
| 241 buildCounterGoogleCloudVideointelligenceV1beta1VideoAnnotationProgress--; | 241 buildCounterGoogleCloudVideointelligenceV1beta1VideoAnnotationProgress--; |
| 242 } | 242 } |
| 243 | 243 |
| 244 buildUnnamed3736() { | 244 buildUnnamed3210() { |
| 245 var o = new core.List<api.GoogleCloudVideointelligenceV1beta1LabelAnnotation>(
); | 245 var o = new core.List<api.GoogleCloudVideointelligenceV1beta1LabelAnnotation>(
); |
| 246 o.add(buildGoogleCloudVideointelligenceV1beta1LabelAnnotation()); | 246 o.add(buildGoogleCloudVideointelligenceV1beta1LabelAnnotation()); |
| 247 o.add(buildGoogleCloudVideointelligenceV1beta1LabelAnnotation()); | 247 o.add(buildGoogleCloudVideointelligenceV1beta1LabelAnnotation()); |
| 248 return o; | 248 return o; |
| 249 } | 249 } |
| 250 | 250 |
| 251 checkUnnamed3736(core.List<api.GoogleCloudVideointelligenceV1beta1LabelAnnotatio
n> o) { | 251 checkUnnamed3210(core.List<api.GoogleCloudVideointelligenceV1beta1LabelAnnotatio
n> o) { |
| 252 unittest.expect(o, unittest.hasLength(2)); | 252 unittest.expect(o, unittest.hasLength(2)); |
| 253 checkGoogleCloudVideointelligenceV1beta1LabelAnnotation(o[0]); | 253 checkGoogleCloudVideointelligenceV1beta1LabelAnnotation(o[0]); |
| 254 checkGoogleCloudVideointelligenceV1beta1LabelAnnotation(o[1]); | 254 checkGoogleCloudVideointelligenceV1beta1LabelAnnotation(o[1]); |
| 255 } | 255 } |
| 256 | 256 |
| 257 buildUnnamed3737() { | 257 buildUnnamed3211() { |
| 258 var o = new core.List<api.GoogleCloudVideointelligenceV1beta1VideoSegment>(); | 258 var o = new core.List<api.GoogleCloudVideointelligenceV1beta1VideoSegment>(); |
| 259 o.add(buildGoogleCloudVideointelligenceV1beta1VideoSegment()); | 259 o.add(buildGoogleCloudVideointelligenceV1beta1VideoSegment()); |
| 260 o.add(buildGoogleCloudVideointelligenceV1beta1VideoSegment()); | 260 o.add(buildGoogleCloudVideointelligenceV1beta1VideoSegment()); |
| 261 return o; | 261 return o; |
| 262 } | 262 } |
| 263 | 263 |
| 264 checkUnnamed3737(core.List<api.GoogleCloudVideointelligenceV1beta1VideoSegment>
o) { | 264 checkUnnamed3211(core.List<api.GoogleCloudVideointelligenceV1beta1VideoSegment>
o) { |
| 265 unittest.expect(o, unittest.hasLength(2)); | 265 unittest.expect(o, unittest.hasLength(2)); |
| 266 checkGoogleCloudVideointelligenceV1beta1VideoSegment(o[0]); | 266 checkGoogleCloudVideointelligenceV1beta1VideoSegment(o[0]); |
| 267 checkGoogleCloudVideointelligenceV1beta1VideoSegment(o[1]); | 267 checkGoogleCloudVideointelligenceV1beta1VideoSegment(o[1]); |
| 268 } | 268 } |
| 269 | 269 |
| 270 core.int buildCounterGoogleCloudVideointelligenceV1beta1VideoAnnotationResults =
0; | 270 core.int buildCounterGoogleCloudVideointelligenceV1beta1VideoAnnotationResults =
0; |
| 271 buildGoogleCloudVideointelligenceV1beta1VideoAnnotationResults() { | 271 buildGoogleCloudVideointelligenceV1beta1VideoAnnotationResults() { |
| 272 var o = new api.GoogleCloudVideointelligenceV1beta1VideoAnnotationResults(); | 272 var o = new api.GoogleCloudVideointelligenceV1beta1VideoAnnotationResults(); |
| 273 buildCounterGoogleCloudVideointelligenceV1beta1VideoAnnotationResults++; | 273 buildCounterGoogleCloudVideointelligenceV1beta1VideoAnnotationResults++; |
| 274 if (buildCounterGoogleCloudVideointelligenceV1beta1VideoAnnotationResults < 3)
{ | 274 if (buildCounterGoogleCloudVideointelligenceV1beta1VideoAnnotationResults < 3)
{ |
| 275 o.error = buildGoogleRpcStatus(); | 275 o.error = buildGoogleRpcStatus(); |
| 276 o.inputUri = "foo"; | 276 o.inputUri = "foo"; |
| 277 o.labelAnnotations = buildUnnamed3736(); | 277 o.labelAnnotations = buildUnnamed3210(); |
| 278 o.shotAnnotations = buildUnnamed3737(); | 278 o.shotAnnotations = buildUnnamed3211(); |
| 279 } | 279 } |
| 280 buildCounterGoogleCloudVideointelligenceV1beta1VideoAnnotationResults--; | 280 buildCounterGoogleCloudVideointelligenceV1beta1VideoAnnotationResults--; |
| 281 return o; | 281 return o; |
| 282 } | 282 } |
| 283 | 283 |
| 284 checkGoogleCloudVideointelligenceV1beta1VideoAnnotationResults(api.GoogleCloudVi
deointelligenceV1beta1VideoAnnotationResults o) { | 284 checkGoogleCloudVideointelligenceV1beta1VideoAnnotationResults(api.GoogleCloudVi
deointelligenceV1beta1VideoAnnotationResults o) { |
| 285 buildCounterGoogleCloudVideointelligenceV1beta1VideoAnnotationResults++; | 285 buildCounterGoogleCloudVideointelligenceV1beta1VideoAnnotationResults++; |
| 286 if (buildCounterGoogleCloudVideointelligenceV1beta1VideoAnnotationResults < 3)
{ | 286 if (buildCounterGoogleCloudVideointelligenceV1beta1VideoAnnotationResults < 3)
{ |
| 287 checkGoogleRpcStatus(o.error); | 287 checkGoogleRpcStatus(o.error); |
| 288 unittest.expect(o.inputUri, unittest.equals('foo')); | 288 unittest.expect(o.inputUri, unittest.equals('foo')); |
| 289 checkUnnamed3736(o.labelAnnotations); | 289 checkUnnamed3210(o.labelAnnotations); |
| 290 checkUnnamed3737(o.shotAnnotations); | 290 checkUnnamed3211(o.shotAnnotations); |
| 291 } | 291 } |
| 292 buildCounterGoogleCloudVideointelligenceV1beta1VideoAnnotationResults--; | 292 buildCounterGoogleCloudVideointelligenceV1beta1VideoAnnotationResults--; |
| 293 } | 293 } |
| 294 | 294 |
| 295 buildUnnamed3738() { | 295 buildUnnamed3212() { |
| 296 var o = new core.List<api.GoogleCloudVideointelligenceV1beta1VideoSegment>(); | 296 var o = new core.List<api.GoogleCloudVideointelligenceV1beta1VideoSegment>(); |
| 297 o.add(buildGoogleCloudVideointelligenceV1beta1VideoSegment()); | 297 o.add(buildGoogleCloudVideointelligenceV1beta1VideoSegment()); |
| 298 o.add(buildGoogleCloudVideointelligenceV1beta1VideoSegment()); | 298 o.add(buildGoogleCloudVideointelligenceV1beta1VideoSegment()); |
| 299 return o; | 299 return o; |
| 300 } | 300 } |
| 301 | 301 |
| 302 checkUnnamed3738(core.List<api.GoogleCloudVideointelligenceV1beta1VideoSegment>
o) { | 302 checkUnnamed3212(core.List<api.GoogleCloudVideointelligenceV1beta1VideoSegment>
o) { |
| 303 unittest.expect(o, unittest.hasLength(2)); | 303 unittest.expect(o, unittest.hasLength(2)); |
| 304 checkGoogleCloudVideointelligenceV1beta1VideoSegment(o[0]); | 304 checkGoogleCloudVideointelligenceV1beta1VideoSegment(o[0]); |
| 305 checkGoogleCloudVideointelligenceV1beta1VideoSegment(o[1]); | 305 checkGoogleCloudVideointelligenceV1beta1VideoSegment(o[1]); |
| 306 } | 306 } |
| 307 | 307 |
| 308 core.int buildCounterGoogleCloudVideointelligenceV1beta1VideoContext = 0; | 308 core.int buildCounterGoogleCloudVideointelligenceV1beta1VideoContext = 0; |
| 309 buildGoogleCloudVideointelligenceV1beta1VideoContext() { | 309 buildGoogleCloudVideointelligenceV1beta1VideoContext() { |
| 310 var o = new api.GoogleCloudVideointelligenceV1beta1VideoContext(); | 310 var o = new api.GoogleCloudVideointelligenceV1beta1VideoContext(); |
| 311 buildCounterGoogleCloudVideointelligenceV1beta1VideoContext++; | 311 buildCounterGoogleCloudVideointelligenceV1beta1VideoContext++; |
| 312 if (buildCounterGoogleCloudVideointelligenceV1beta1VideoContext < 3) { | 312 if (buildCounterGoogleCloudVideointelligenceV1beta1VideoContext < 3) { |
| 313 o.labelDetectionMode = "foo"; | 313 o.labelDetectionMode = "foo"; |
| 314 o.labelDetectionModel = "foo"; | 314 o.labelDetectionModel = "foo"; |
| 315 o.segments = buildUnnamed3738(); | 315 o.segments = buildUnnamed3212(); |
| 316 o.shotChangeDetectionModel = "foo"; | 316 o.shotChangeDetectionModel = "foo"; |
| 317 } | 317 } |
| 318 buildCounterGoogleCloudVideointelligenceV1beta1VideoContext--; | 318 buildCounterGoogleCloudVideointelligenceV1beta1VideoContext--; |
| 319 return o; | 319 return o; |
| 320 } | 320 } |
| 321 | 321 |
| 322 checkGoogleCloudVideointelligenceV1beta1VideoContext(api.GoogleCloudVideointelli
genceV1beta1VideoContext o) { | 322 checkGoogleCloudVideointelligenceV1beta1VideoContext(api.GoogleCloudVideointelli
genceV1beta1VideoContext o) { |
| 323 buildCounterGoogleCloudVideointelligenceV1beta1VideoContext++; | 323 buildCounterGoogleCloudVideointelligenceV1beta1VideoContext++; |
| 324 if (buildCounterGoogleCloudVideointelligenceV1beta1VideoContext < 3) { | 324 if (buildCounterGoogleCloudVideointelligenceV1beta1VideoContext < 3) { |
| 325 unittest.expect(o.labelDetectionMode, unittest.equals('foo')); | 325 unittest.expect(o.labelDetectionMode, unittest.equals('foo')); |
| 326 unittest.expect(o.labelDetectionModel, unittest.equals('foo')); | 326 unittest.expect(o.labelDetectionModel, unittest.equals('foo')); |
| 327 checkUnnamed3738(o.segments); | 327 checkUnnamed3212(o.segments); |
| 328 unittest.expect(o.shotChangeDetectionModel, unittest.equals('foo')); | 328 unittest.expect(o.shotChangeDetectionModel, unittest.equals('foo')); |
| 329 } | 329 } |
| 330 buildCounterGoogleCloudVideointelligenceV1beta1VideoContext--; | 330 buildCounterGoogleCloudVideointelligenceV1beta1VideoContext--; |
| 331 } | 331 } |
| 332 | 332 |
| 333 core.int buildCounterGoogleCloudVideointelligenceV1beta1VideoSegment = 0; | 333 core.int buildCounterGoogleCloudVideointelligenceV1beta1VideoSegment = 0; |
| 334 buildGoogleCloudVideointelligenceV1beta1VideoSegment() { | 334 buildGoogleCloudVideointelligenceV1beta1VideoSegment() { |
| 335 var o = new api.GoogleCloudVideointelligenceV1beta1VideoSegment(); | 335 var o = new api.GoogleCloudVideointelligenceV1beta1VideoSegment(); |
| 336 buildCounterGoogleCloudVideointelligenceV1beta1VideoSegment++; | 336 buildCounterGoogleCloudVideointelligenceV1beta1VideoSegment++; |
| 337 if (buildCounterGoogleCloudVideointelligenceV1beta1VideoSegment < 3) { | 337 if (buildCounterGoogleCloudVideointelligenceV1beta1VideoSegment < 3) { |
| 338 o.endTimeOffset = "foo"; | 338 o.endTimeOffset = "foo"; |
| 339 o.startTimeOffset = "foo"; | 339 o.startTimeOffset = "foo"; |
| 340 } | 340 } |
| 341 buildCounterGoogleCloudVideointelligenceV1beta1VideoSegment--; | 341 buildCounterGoogleCloudVideointelligenceV1beta1VideoSegment--; |
| 342 return o; | 342 return o; |
| 343 } | 343 } |
| 344 | 344 |
| 345 checkGoogleCloudVideointelligenceV1beta1VideoSegment(api.GoogleCloudVideointelli
genceV1beta1VideoSegment o) { | 345 checkGoogleCloudVideointelligenceV1beta1VideoSegment(api.GoogleCloudVideointelli
genceV1beta1VideoSegment o) { |
| 346 buildCounterGoogleCloudVideointelligenceV1beta1VideoSegment++; | 346 buildCounterGoogleCloudVideointelligenceV1beta1VideoSegment++; |
| 347 if (buildCounterGoogleCloudVideointelligenceV1beta1VideoSegment < 3) { | 347 if (buildCounterGoogleCloudVideointelligenceV1beta1VideoSegment < 3) { |
| 348 unittest.expect(o.endTimeOffset, unittest.equals('foo')); | 348 unittest.expect(o.endTimeOffset, unittest.equals('foo')); |
| 349 unittest.expect(o.startTimeOffset, unittest.equals('foo')); | 349 unittest.expect(o.startTimeOffset, unittest.equals('foo')); |
| 350 } | 350 } |
| 351 buildCounterGoogleCloudVideointelligenceV1beta1VideoSegment--; | 351 buildCounterGoogleCloudVideointelligenceV1beta1VideoSegment--; |
| 352 } | 352 } |
| 353 | 353 |
| 354 buildUnnamed3739() { | 354 buildUnnamed3213() { |
| 355 var o = new core.Map<core.String, core.Object>(); | 355 var o = new core.Map<core.String, core.Object>(); |
| 356 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 356 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; |
| 357 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 357 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; |
| 358 return o; | 358 return o; |
| 359 } | 359 } |
| 360 | 360 |
| 361 checkUnnamed3739(core.Map<core.String, core.Object> o) { | 361 checkUnnamed3213(core.Map<core.String, core.Object> o) { |
| 362 unittest.expect(o, unittest.hasLength(2)); | 362 unittest.expect(o, unittest.hasLength(2)); |
| 363 var casted1 = (o["x"]) as core.Map; unittest.expect(casted1, unittest.hasLengt
h(3)); unittest.expect(casted1["list"], unittest.equals([1, 2, 3])); unittest.ex
pect(casted1["bool"], unittest.equals(true)); unittest.expect(casted1["string"],
unittest.equals('foo')); | 363 var casted1 = (o["x"]) as core.Map; unittest.expect(casted1, unittest.hasLengt
h(3)); unittest.expect(casted1["list"], unittest.equals([1, 2, 3])); unittest.ex
pect(casted1["bool"], unittest.equals(true)); unittest.expect(casted1["string"],
unittest.equals('foo')); |
| 364 var casted2 = (o["y"]) as core.Map; unittest.expect(casted2, unittest.hasLengt
h(3)); unittest.expect(casted2["list"], unittest.equals([1, 2, 3])); unittest.ex
pect(casted2["bool"], unittest.equals(true)); unittest.expect(casted2["string"],
unittest.equals('foo')); | 364 var casted2 = (o["y"]) as core.Map; unittest.expect(casted2, unittest.hasLengt
h(3)); unittest.expect(casted2["list"], unittest.equals([1, 2, 3])); unittest.ex
pect(casted2["bool"], unittest.equals(true)); unittest.expect(casted2["string"],
unittest.equals('foo')); |
| 365 } | 365 } |
| 366 | 366 |
| 367 buildUnnamed3740() { | 367 buildUnnamed3214() { |
| 368 var o = new core.Map<core.String, core.Object>(); | 368 var o = new core.Map<core.String, core.Object>(); |
| 369 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 369 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; |
| 370 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 370 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; |
| 371 return o; | 371 return o; |
| 372 } | 372 } |
| 373 | 373 |
| 374 checkUnnamed3740(core.Map<core.String, core.Object> o) { | 374 checkUnnamed3214(core.Map<core.String, core.Object> o) { |
| 375 unittest.expect(o, unittest.hasLength(2)); | 375 unittest.expect(o, unittest.hasLength(2)); |
| 376 var casted3 = (o["x"]) as core.Map; unittest.expect(casted3, unittest.hasLengt
h(3)); unittest.expect(casted3["list"], unittest.equals([1, 2, 3])); unittest.ex
pect(casted3["bool"], unittest.equals(true)); unittest.expect(casted3["string"],
unittest.equals('foo')); | 376 var casted3 = (o["x"]) as core.Map; unittest.expect(casted3, unittest.hasLengt
h(3)); unittest.expect(casted3["list"], unittest.equals([1, 2, 3])); unittest.ex
pect(casted3["bool"], unittest.equals(true)); unittest.expect(casted3["string"],
unittest.equals('foo')); |
| 377 var casted4 = (o["y"]) as core.Map; unittest.expect(casted4, unittest.hasLengt
h(3)); unittest.expect(casted4["list"], unittest.equals([1, 2, 3])); unittest.ex
pect(casted4["bool"], unittest.equals(true)); unittest.expect(casted4["string"],
unittest.equals('foo')); | 377 var casted4 = (o["y"]) as core.Map; unittest.expect(casted4, unittest.hasLengt
h(3)); unittest.expect(casted4["list"], unittest.equals([1, 2, 3])); unittest.ex
pect(casted4["bool"], unittest.equals(true)); unittest.expect(casted4["string"],
unittest.equals('foo')); |
| 378 } | 378 } |
| 379 | 379 |
| 380 core.int buildCounterGoogleLongrunningOperation = 0; | 380 core.int buildCounterGoogleLongrunningOperation = 0; |
| 381 buildGoogleLongrunningOperation() { | 381 buildGoogleLongrunningOperation() { |
| 382 var o = new api.GoogleLongrunningOperation(); | 382 var o = new api.GoogleLongrunningOperation(); |
| 383 buildCounterGoogleLongrunningOperation++; | 383 buildCounterGoogleLongrunningOperation++; |
| 384 if (buildCounterGoogleLongrunningOperation < 3) { | 384 if (buildCounterGoogleLongrunningOperation < 3) { |
| 385 o.done = true; | 385 o.done = true; |
| 386 o.error = buildGoogleRpcStatus(); | 386 o.error = buildGoogleRpcStatus(); |
| 387 o.metadata = buildUnnamed3739(); | 387 o.metadata = buildUnnamed3213(); |
| 388 o.name = "foo"; | 388 o.name = "foo"; |
| 389 o.response = buildUnnamed3740(); | 389 o.response = buildUnnamed3214(); |
| 390 } | 390 } |
| 391 buildCounterGoogleLongrunningOperation--; | 391 buildCounterGoogleLongrunningOperation--; |
| 392 return o; | 392 return o; |
| 393 } | 393 } |
| 394 | 394 |
| 395 checkGoogleLongrunningOperation(api.GoogleLongrunningOperation o) { | 395 checkGoogleLongrunningOperation(api.GoogleLongrunningOperation o) { |
| 396 buildCounterGoogleLongrunningOperation++; | 396 buildCounterGoogleLongrunningOperation++; |
| 397 if (buildCounterGoogleLongrunningOperation < 3) { | 397 if (buildCounterGoogleLongrunningOperation < 3) { |
| 398 unittest.expect(o.done, unittest.isTrue); | 398 unittest.expect(o.done, unittest.isTrue); |
| 399 checkGoogleRpcStatus(o.error); | 399 checkGoogleRpcStatus(o.error); |
| 400 checkUnnamed3739(o.metadata); | 400 checkUnnamed3213(o.metadata); |
| 401 unittest.expect(o.name, unittest.equals('foo')); | 401 unittest.expect(o.name, unittest.equals('foo')); |
| 402 checkUnnamed3740(o.response); | 402 checkUnnamed3214(o.response); |
| 403 } | 403 } |
| 404 buildCounterGoogleLongrunningOperation--; | 404 buildCounterGoogleLongrunningOperation--; |
| 405 } | 405 } |
| 406 | 406 |
| 407 buildUnnamed3741() { | 407 buildUnnamed3215() { |
| 408 var o = new core.Map<core.String, core.Object>(); | 408 var o = new core.Map<core.String, core.Object>(); |
| 409 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 409 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; |
| 410 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 410 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; |
| 411 return o; | 411 return o; |
| 412 } | 412 } |
| 413 | 413 |
| 414 checkUnnamed3741(core.Map<core.String, core.Object> o) { | 414 checkUnnamed3215(core.Map<core.String, core.Object> o) { |
| 415 unittest.expect(o, unittest.hasLength(2)); | 415 unittest.expect(o, unittest.hasLength(2)); |
| 416 var casted5 = (o["x"]) as core.Map; unittest.expect(casted5, unittest.hasLengt
h(3)); unittest.expect(casted5["list"], unittest.equals([1, 2, 3])); unittest.ex
pect(casted5["bool"], unittest.equals(true)); unittest.expect(casted5["string"],
unittest.equals('foo')); | 416 var casted5 = (o["x"]) as core.Map; unittest.expect(casted5, unittest.hasLengt
h(3)); unittest.expect(casted5["list"], unittest.equals([1, 2, 3])); unittest.ex
pect(casted5["bool"], unittest.equals(true)); unittest.expect(casted5["string"],
unittest.equals('foo')); |
| 417 var casted6 = (o["y"]) as core.Map; unittest.expect(casted6, unittest.hasLengt
h(3)); unittest.expect(casted6["list"], unittest.equals([1, 2, 3])); unittest.ex
pect(casted6["bool"], unittest.equals(true)); unittest.expect(casted6["string"],
unittest.equals('foo')); | 417 var casted6 = (o["y"]) as core.Map; unittest.expect(casted6, unittest.hasLengt
h(3)); unittest.expect(casted6["list"], unittest.equals([1, 2, 3])); unittest.ex
pect(casted6["bool"], unittest.equals(true)); unittest.expect(casted6["string"],
unittest.equals('foo')); |
| 418 } | 418 } |
| 419 | 419 |
| 420 buildUnnamed3742() { | 420 buildUnnamed3216() { |
| 421 var o = new core.List<core.Map<core.String, core.Object>>(); | 421 var o = new core.List<core.Map<core.String, core.Object>>(); |
| 422 o.add(buildUnnamed3741()); | 422 o.add(buildUnnamed3215()); |
| 423 o.add(buildUnnamed3741()); | 423 o.add(buildUnnamed3215()); |
| 424 return o; | 424 return o; |
| 425 } | 425 } |
| 426 | 426 |
| 427 checkUnnamed3742(core.List<core.Map<core.String, core.Object>> o) { | 427 checkUnnamed3216(core.List<core.Map<core.String, core.Object>> o) { |
| 428 unittest.expect(o, unittest.hasLength(2)); | 428 unittest.expect(o, unittest.hasLength(2)); |
| 429 checkUnnamed3741(o[0]); | 429 checkUnnamed3215(o[0]); |
| 430 checkUnnamed3741(o[1]); | 430 checkUnnamed3215(o[1]); |
| 431 } | 431 } |
| 432 | 432 |
| 433 core.int buildCounterGoogleRpcStatus = 0; | 433 core.int buildCounterGoogleRpcStatus = 0; |
| 434 buildGoogleRpcStatus() { | 434 buildGoogleRpcStatus() { |
| 435 var o = new api.GoogleRpcStatus(); | 435 var o = new api.GoogleRpcStatus(); |
| 436 buildCounterGoogleRpcStatus++; | 436 buildCounterGoogleRpcStatus++; |
| 437 if (buildCounterGoogleRpcStatus < 3) { | 437 if (buildCounterGoogleRpcStatus < 3) { |
| 438 o.code = 42; | 438 o.code = 42; |
| 439 o.details = buildUnnamed3742(); | 439 o.details = buildUnnamed3216(); |
| 440 o.message = "foo"; | 440 o.message = "foo"; |
| 441 } | 441 } |
| 442 buildCounterGoogleRpcStatus--; | 442 buildCounterGoogleRpcStatus--; |
| 443 return o; | 443 return o; |
| 444 } | 444 } |
| 445 | 445 |
| 446 checkGoogleRpcStatus(api.GoogleRpcStatus o) { | 446 checkGoogleRpcStatus(api.GoogleRpcStatus o) { |
| 447 buildCounterGoogleRpcStatus++; | 447 buildCounterGoogleRpcStatus++; |
| 448 if (buildCounterGoogleRpcStatus < 3) { | 448 if (buildCounterGoogleRpcStatus < 3) { |
| 449 unittest.expect(o.code, unittest.equals(42)); | 449 unittest.expect(o.code, unittest.equals(42)); |
| 450 checkUnnamed3742(o.details); | 450 checkUnnamed3216(o.details); |
| 451 unittest.expect(o.message, unittest.equals('foo')); | 451 unittest.expect(o.message, unittest.equals('foo')); |
| 452 } | 452 } |
| 453 buildCounterGoogleRpcStatus--; | 453 buildCounterGoogleRpcStatus--; |
| 454 } | 454 } |
| 455 | 455 |
| 456 | 456 |
| 457 main() { | 457 main() { |
| 458 unittest.group("obj-schema-GoogleCloudVideointelligenceV1beta1AnnotateVideoPro
gress", () { | 458 unittest.group("obj-schema-GoogleCloudVideointelligenceV1beta1AnnotateVideoPro
gress", () { |
| 459 unittest.test("to-json--from-json", () { | 459 unittest.test("to-json--from-json", () { |
| 460 var o = buildGoogleCloudVideointelligenceV1beta1AnnotateVideoProgress(); | 460 var o = buildGoogleCloudVideointelligenceV1beta1AnnotateVideoProgress(); |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 553 }); | 553 }); |
| 554 }); | 554 }); |
| 555 | 555 |
| 556 | 556 |
| 557 unittest.group("resource-VideosResourceApi", () { | 557 unittest.group("resource-VideosResourceApi", () { |
| 558 unittest.test("method--annotate", () { | 558 unittest.test("method--annotate", () { |
| 559 | 559 |
| 560 var mock = new HttpServerMock(); | 560 var mock = new HttpServerMock(); |
| 561 api.VideosResourceApi res = new api.VideointelligenceApi(mock).videos; | 561 api.VideosResourceApi res = new api.VideointelligenceApi(mock).videos; |
| 562 var arg_request = buildGoogleCloudVideointelligenceV1beta1AnnotateVideoReq
uest(); | 562 var arg_request = buildGoogleCloudVideointelligenceV1beta1AnnotateVideoReq
uest(); |
| 563 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 563 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 564 var obj = new api.GoogleCloudVideointelligenceV1beta1AnnotateVideoReques
t.fromJson(json); | 564 var obj = new api.GoogleCloudVideointelligenceV1beta1AnnotateVideoReques
t.fromJson(json); |
| 565 checkGoogleCloudVideointelligenceV1beta1AnnotateVideoRequest(obj); | 565 checkGoogleCloudVideointelligenceV1beta1AnnotateVideoRequest(obj); |
| 566 | 566 |
| 567 var path = (req.url).path; | 567 var path = (req.url).path; |
| 568 var pathOffset = 0; | 568 var pathOffset = 0; |
| 569 var index; | 569 var index; |
| 570 var subPart; | 570 var subPart; |
| 571 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 571 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 572 pathOffset += 1; | 572 pathOffset += 1; |
| 573 unittest.expect(path.substring(pathOffset, pathOffset + 23), unittest.eq
uals("v1beta1/videos:annotate")); | 573 unittest.expect(path.substring(pathOffset, pathOffset + 23), unittest.eq
uals("v1beta1/videos:annotate")); |
| (...skipping 16 matching lines...) Expand all Loading... |
| 590 } | 590 } |
| 591 } | 591 } |
| 592 | 592 |
| 593 | 593 |
| 594 var h = { | 594 var h = { |
| 595 "content-type" : "application/json; charset=utf-8", | 595 "content-type" : "application/json; charset=utf-8", |
| 596 }; | 596 }; |
| 597 var resp = convert.JSON.encode(buildGoogleLongrunningOperation()); | 597 var resp = convert.JSON.encode(buildGoogleLongrunningOperation()); |
| 598 return new async.Future.value(stringResponse(200, h, resp)); | 598 return new async.Future.value(stringResponse(200, h, resp)); |
| 599 }), true); | 599 }), true); |
| 600 res.annotate(arg_request).then(unittest.expectAsync(((api.GoogleLongrunnin
gOperation response) { | 600 res.annotate(arg_request).then(unittest.expectAsync1(((api.GoogleLongrunni
ngOperation response) { |
| 601 checkGoogleLongrunningOperation(response); | 601 checkGoogleLongrunningOperation(response); |
| 602 }))); | 602 }))); |
| 603 }); | 603 }); |
| 604 | 604 |
| 605 }); | 605 }); |
| 606 | 606 |
| 607 | 607 |
| 608 } | 608 } |
| 609 | 609 |
| OLD | NEW |