| OLD | NEW |
| 1 library googleapis.drive.v2.test; | 1 library googleapis.drive.v2.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/drive/v2.dart' as api; | 12 import 'package:googleapis/drive/v2.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 } |
| 18 | 22 |
| 19 buildUnnamed687() { | 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 } |
| 53 |
| 54 buildUnnamed974() { |
| 20 var o = new core.List<core.String>(); | 55 var o = new core.List<core.String>(); |
| 21 o.add("foo"); | 56 o.add("foo"); |
| 22 o.add("foo"); | 57 o.add("foo"); |
| 23 return o; | 58 return o; |
| 24 } | 59 } |
| 25 | 60 |
| 26 checkUnnamed687(core.List<core.String> o) { | 61 checkUnnamed974(core.List<core.String> o) { |
| 27 unittest.expect(o, unittest.hasLength(2)); | 62 unittest.expect(o, unittest.hasLength(2)); |
| 28 unittest.expect(o[0], unittest.equals('foo')); | 63 unittest.expect(o[0], unittest.equals('foo')); |
| 29 unittest.expect(o[1], unittest.equals('foo')); | 64 unittest.expect(o[1], unittest.equals('foo')); |
| 30 } | 65 } |
| 31 | 66 |
| 32 core.int buildCounterAboutAdditionalRoleInfoRoleSets = 0; | 67 core.int buildCounterAboutAdditionalRoleInfoRoleSets = 0; |
| 33 buildAboutAdditionalRoleInfoRoleSets() { | 68 buildAboutAdditionalRoleInfoRoleSets() { |
| 34 var o = new api.AboutAdditionalRoleInfoRoleSets(); | 69 var o = new api.AboutAdditionalRoleInfoRoleSets(); |
| 35 buildCounterAboutAdditionalRoleInfoRoleSets++; | 70 buildCounterAboutAdditionalRoleInfoRoleSets++; |
| 36 if (buildCounterAboutAdditionalRoleInfoRoleSets < 3) { | 71 if (buildCounterAboutAdditionalRoleInfoRoleSets < 3) { |
| 37 o.additionalRoles = buildUnnamed687(); | 72 o.additionalRoles = buildUnnamed974(); |
| 38 o.primaryRole = "foo"; | 73 o.primaryRole = "foo"; |
| 39 } | 74 } |
| 40 buildCounterAboutAdditionalRoleInfoRoleSets--; | 75 buildCounterAboutAdditionalRoleInfoRoleSets--; |
| 41 return o; | 76 return o; |
| 42 } | 77 } |
| 43 | 78 |
| 44 checkAboutAdditionalRoleInfoRoleSets(api.AboutAdditionalRoleInfoRoleSets o) { | 79 checkAboutAdditionalRoleInfoRoleSets(api.AboutAdditionalRoleInfoRoleSets o) { |
| 45 buildCounterAboutAdditionalRoleInfoRoleSets++; | 80 buildCounterAboutAdditionalRoleInfoRoleSets++; |
| 46 if (buildCounterAboutAdditionalRoleInfoRoleSets < 3) { | 81 if (buildCounterAboutAdditionalRoleInfoRoleSets < 3) { |
| 47 checkUnnamed687(o.additionalRoles); | 82 checkUnnamed974(o.additionalRoles); |
| 48 unittest.expect(o.primaryRole, unittest.equals('foo')); | 83 unittest.expect(o.primaryRole, unittest.equals('foo')); |
| 49 } | 84 } |
| 50 buildCounterAboutAdditionalRoleInfoRoleSets--; | 85 buildCounterAboutAdditionalRoleInfoRoleSets--; |
| 51 } | 86 } |
| 52 | 87 |
| 53 buildUnnamed688() { | 88 buildUnnamed975() { |
| 54 var o = new core.List<api.AboutAdditionalRoleInfoRoleSets>(); | 89 var o = new core.List<api.AboutAdditionalRoleInfoRoleSets>(); |
| 55 o.add(buildAboutAdditionalRoleInfoRoleSets()); | 90 o.add(buildAboutAdditionalRoleInfoRoleSets()); |
| 56 o.add(buildAboutAdditionalRoleInfoRoleSets()); | 91 o.add(buildAboutAdditionalRoleInfoRoleSets()); |
| 57 return o; | 92 return o; |
| 58 } | 93 } |
| 59 | 94 |
| 60 checkUnnamed688(core.List<api.AboutAdditionalRoleInfoRoleSets> o) { | 95 checkUnnamed975(core.List<api.AboutAdditionalRoleInfoRoleSets> o) { |
| 61 unittest.expect(o, unittest.hasLength(2)); | 96 unittest.expect(o, unittest.hasLength(2)); |
| 62 checkAboutAdditionalRoleInfoRoleSets(o[0]); | 97 checkAboutAdditionalRoleInfoRoleSets(o[0]); |
| 63 checkAboutAdditionalRoleInfoRoleSets(o[1]); | 98 checkAboutAdditionalRoleInfoRoleSets(o[1]); |
| 64 } | 99 } |
| 65 | 100 |
| 66 core.int buildCounterAboutAdditionalRoleInfo = 0; | 101 core.int buildCounterAboutAdditionalRoleInfo = 0; |
| 67 buildAboutAdditionalRoleInfo() { | 102 buildAboutAdditionalRoleInfo() { |
| 68 var o = new api.AboutAdditionalRoleInfo(); | 103 var o = new api.AboutAdditionalRoleInfo(); |
| 69 buildCounterAboutAdditionalRoleInfo++; | 104 buildCounterAboutAdditionalRoleInfo++; |
| 70 if (buildCounterAboutAdditionalRoleInfo < 3) { | 105 if (buildCounterAboutAdditionalRoleInfo < 3) { |
| 71 o.roleSets = buildUnnamed688(); | 106 o.roleSets = buildUnnamed975(); |
| 72 o.type = "foo"; | 107 o.type = "foo"; |
| 73 } | 108 } |
| 74 buildCounterAboutAdditionalRoleInfo--; | 109 buildCounterAboutAdditionalRoleInfo--; |
| 75 return o; | 110 return o; |
| 76 } | 111 } |
| 77 | 112 |
| 78 checkAboutAdditionalRoleInfo(api.AboutAdditionalRoleInfo o) { | 113 checkAboutAdditionalRoleInfo(api.AboutAdditionalRoleInfo o) { |
| 79 buildCounterAboutAdditionalRoleInfo++; | 114 buildCounterAboutAdditionalRoleInfo++; |
| 80 if (buildCounterAboutAdditionalRoleInfo < 3) { | 115 if (buildCounterAboutAdditionalRoleInfo < 3) { |
| 81 checkUnnamed688(o.roleSets); | 116 checkUnnamed975(o.roleSets); |
| 82 unittest.expect(o.type, unittest.equals('foo')); | 117 unittest.expect(o.type, unittest.equals('foo')); |
| 83 } | 118 } |
| 84 buildCounterAboutAdditionalRoleInfo--; | 119 buildCounterAboutAdditionalRoleInfo--; |
| 85 } | 120 } |
| 86 | 121 |
| 87 buildUnnamed689() { | 122 buildUnnamed976() { |
| 88 var o = new core.List<api.AboutAdditionalRoleInfo>(); | 123 var o = new core.List<api.AboutAdditionalRoleInfo>(); |
| 89 o.add(buildAboutAdditionalRoleInfo()); | 124 o.add(buildAboutAdditionalRoleInfo()); |
| 90 o.add(buildAboutAdditionalRoleInfo()); | 125 o.add(buildAboutAdditionalRoleInfo()); |
| 91 return o; | 126 return o; |
| 92 } | 127 } |
| 93 | 128 |
| 94 checkUnnamed689(core.List<api.AboutAdditionalRoleInfo> o) { | 129 checkUnnamed976(core.List<api.AboutAdditionalRoleInfo> o) { |
| 95 unittest.expect(o, unittest.hasLength(2)); | 130 unittest.expect(o, unittest.hasLength(2)); |
| 96 checkAboutAdditionalRoleInfo(o[0]); | 131 checkAboutAdditionalRoleInfo(o[0]); |
| 97 checkAboutAdditionalRoleInfo(o[1]); | 132 checkAboutAdditionalRoleInfo(o[1]); |
| 98 } | 133 } |
| 99 | 134 |
| 100 buildUnnamed690() { | 135 buildUnnamed977() { |
| 101 var o = new core.List<core.String>(); | 136 var o = new core.List<core.String>(); |
| 102 o.add("foo"); | 137 o.add("foo"); |
| 103 o.add("foo"); | 138 o.add("foo"); |
| 104 return o; | 139 return o; |
| 105 } | 140 } |
| 106 | 141 |
| 107 checkUnnamed690(core.List<core.String> o) { | 142 checkUnnamed977(core.List<core.String> o) { |
| 108 unittest.expect(o, unittest.hasLength(2)); | 143 unittest.expect(o, unittest.hasLength(2)); |
| 109 unittest.expect(o[0], unittest.equals('foo')); | 144 unittest.expect(o[0], unittest.equals('foo')); |
| 110 unittest.expect(o[1], unittest.equals('foo')); | 145 unittest.expect(o[1], unittest.equals('foo')); |
| 111 } | 146 } |
| 112 | 147 |
| 113 core.int buildCounterAboutExportFormats = 0; | 148 core.int buildCounterAboutExportFormats = 0; |
| 114 buildAboutExportFormats() { | 149 buildAboutExportFormats() { |
| 115 var o = new api.AboutExportFormats(); | 150 var o = new api.AboutExportFormats(); |
| 116 buildCounterAboutExportFormats++; | 151 buildCounterAboutExportFormats++; |
| 117 if (buildCounterAboutExportFormats < 3) { | 152 if (buildCounterAboutExportFormats < 3) { |
| 118 o.source = "foo"; | 153 o.source = "foo"; |
| 119 o.targets = buildUnnamed690(); | 154 o.targets = buildUnnamed977(); |
| 120 } | 155 } |
| 121 buildCounterAboutExportFormats--; | 156 buildCounterAboutExportFormats--; |
| 122 return o; | 157 return o; |
| 123 } | 158 } |
| 124 | 159 |
| 125 checkAboutExportFormats(api.AboutExportFormats o) { | 160 checkAboutExportFormats(api.AboutExportFormats o) { |
| 126 buildCounterAboutExportFormats++; | 161 buildCounterAboutExportFormats++; |
| 127 if (buildCounterAboutExportFormats < 3) { | 162 if (buildCounterAboutExportFormats < 3) { |
| 128 unittest.expect(o.source, unittest.equals('foo')); | 163 unittest.expect(o.source, unittest.equals('foo')); |
| 129 checkUnnamed690(o.targets); | 164 checkUnnamed977(o.targets); |
| 130 } | 165 } |
| 131 buildCounterAboutExportFormats--; | 166 buildCounterAboutExportFormats--; |
| 132 } | 167 } |
| 133 | 168 |
| 134 buildUnnamed691() { | 169 buildUnnamed978() { |
| 135 var o = new core.List<api.AboutExportFormats>(); | 170 var o = new core.List<api.AboutExportFormats>(); |
| 136 o.add(buildAboutExportFormats()); | 171 o.add(buildAboutExportFormats()); |
| 137 o.add(buildAboutExportFormats()); | 172 o.add(buildAboutExportFormats()); |
| 138 return o; | 173 return o; |
| 139 } | 174 } |
| 140 | 175 |
| 141 checkUnnamed691(core.List<api.AboutExportFormats> o) { | 176 checkUnnamed978(core.List<api.AboutExportFormats> o) { |
| 142 unittest.expect(o, unittest.hasLength(2)); | 177 unittest.expect(o, unittest.hasLength(2)); |
| 143 checkAboutExportFormats(o[0]); | 178 checkAboutExportFormats(o[0]); |
| 144 checkAboutExportFormats(o[1]); | 179 checkAboutExportFormats(o[1]); |
| 145 } | 180 } |
| 146 | 181 |
| 147 core.int buildCounterAboutFeatures = 0; | 182 core.int buildCounterAboutFeatures = 0; |
| 148 buildAboutFeatures() { | 183 buildAboutFeatures() { |
| 149 var o = new api.AboutFeatures(); | 184 var o = new api.AboutFeatures(); |
| 150 buildCounterAboutFeatures++; | 185 buildCounterAboutFeatures++; |
| 151 if (buildCounterAboutFeatures < 3) { | 186 if (buildCounterAboutFeatures < 3) { |
| 152 o.featureName = "foo"; | 187 o.featureName = "foo"; |
| 153 o.featureRate = 42.0; | 188 o.featureRate = 42.0; |
| 154 } | 189 } |
| 155 buildCounterAboutFeatures--; | 190 buildCounterAboutFeatures--; |
| 156 return o; | 191 return o; |
| 157 } | 192 } |
| 158 | 193 |
| 159 checkAboutFeatures(api.AboutFeatures o) { | 194 checkAboutFeatures(api.AboutFeatures o) { |
| 160 buildCounterAboutFeatures++; | 195 buildCounterAboutFeatures++; |
| 161 if (buildCounterAboutFeatures < 3) { | 196 if (buildCounterAboutFeatures < 3) { |
| 162 unittest.expect(o.featureName, unittest.equals('foo')); | 197 unittest.expect(o.featureName, unittest.equals('foo')); |
| 163 unittest.expect(o.featureRate, unittest.equals(42.0)); | 198 unittest.expect(o.featureRate, unittest.equals(42.0)); |
| 164 } | 199 } |
| 165 buildCounterAboutFeatures--; | 200 buildCounterAboutFeatures--; |
| 166 } | 201 } |
| 167 | 202 |
| 168 buildUnnamed692() { | 203 buildUnnamed979() { |
| 169 var o = new core.List<api.AboutFeatures>(); | 204 var o = new core.List<api.AboutFeatures>(); |
| 170 o.add(buildAboutFeatures()); | 205 o.add(buildAboutFeatures()); |
| 171 o.add(buildAboutFeatures()); | 206 o.add(buildAboutFeatures()); |
| 172 return o; | 207 return o; |
| 173 } | 208 } |
| 174 | 209 |
| 175 checkUnnamed692(core.List<api.AboutFeatures> o) { | 210 checkUnnamed979(core.List<api.AboutFeatures> o) { |
| 176 unittest.expect(o, unittest.hasLength(2)); | 211 unittest.expect(o, unittest.hasLength(2)); |
| 177 checkAboutFeatures(o[0]); | 212 checkAboutFeatures(o[0]); |
| 178 checkAboutFeatures(o[1]); | 213 checkAboutFeatures(o[1]); |
| 179 } | 214 } |
| 180 | 215 |
| 181 buildUnnamed693() { | 216 buildUnnamed980() { |
| 182 var o = new core.List<core.String>(); | 217 var o = new core.List<core.String>(); |
| 183 o.add("foo"); | 218 o.add("foo"); |
| 184 o.add("foo"); | 219 o.add("foo"); |
| 185 return o; | 220 return o; |
| 186 } | 221 } |
| 187 | 222 |
| 188 checkUnnamed693(core.List<core.String> o) { | 223 checkUnnamed980(core.List<core.String> o) { |
| 189 unittest.expect(o, unittest.hasLength(2)); | 224 unittest.expect(o, unittest.hasLength(2)); |
| 190 unittest.expect(o[0], unittest.equals('foo')); | 225 unittest.expect(o[0], unittest.equals('foo')); |
| 191 unittest.expect(o[1], unittest.equals('foo')); | 226 unittest.expect(o[1], unittest.equals('foo')); |
| 192 } | 227 } |
| 193 | 228 |
| 194 buildUnnamed694() { | 229 buildUnnamed981() { |
| 195 var o = new core.List<core.String>(); | 230 var o = new core.List<core.String>(); |
| 196 o.add("foo"); | 231 o.add("foo"); |
| 197 o.add("foo"); | 232 o.add("foo"); |
| 198 return o; | 233 return o; |
| 199 } | 234 } |
| 200 | 235 |
| 201 checkUnnamed694(core.List<core.String> o) { | 236 checkUnnamed981(core.List<core.String> o) { |
| 202 unittest.expect(o, unittest.hasLength(2)); | 237 unittest.expect(o, unittest.hasLength(2)); |
| 203 unittest.expect(o[0], unittest.equals('foo')); | 238 unittest.expect(o[0], unittest.equals('foo')); |
| 204 unittest.expect(o[1], unittest.equals('foo')); | 239 unittest.expect(o[1], unittest.equals('foo')); |
| 205 } | 240 } |
| 206 | 241 |
| 207 core.int buildCounterAboutImportFormats = 0; | 242 core.int buildCounterAboutImportFormats = 0; |
| 208 buildAboutImportFormats() { | 243 buildAboutImportFormats() { |
| 209 var o = new api.AboutImportFormats(); | 244 var o = new api.AboutImportFormats(); |
| 210 buildCounterAboutImportFormats++; | 245 buildCounterAboutImportFormats++; |
| 211 if (buildCounterAboutImportFormats < 3) { | 246 if (buildCounterAboutImportFormats < 3) { |
| 212 o.source = "foo"; | 247 o.source = "foo"; |
| 213 o.targets = buildUnnamed694(); | 248 o.targets = buildUnnamed981(); |
| 214 } | 249 } |
| 215 buildCounterAboutImportFormats--; | 250 buildCounterAboutImportFormats--; |
| 216 return o; | 251 return o; |
| 217 } | 252 } |
| 218 | 253 |
| 219 checkAboutImportFormats(api.AboutImportFormats o) { | 254 checkAboutImportFormats(api.AboutImportFormats o) { |
| 220 buildCounterAboutImportFormats++; | 255 buildCounterAboutImportFormats++; |
| 221 if (buildCounterAboutImportFormats < 3) { | 256 if (buildCounterAboutImportFormats < 3) { |
| 222 unittest.expect(o.source, unittest.equals('foo')); | 257 unittest.expect(o.source, unittest.equals('foo')); |
| 223 checkUnnamed694(o.targets); | 258 checkUnnamed981(o.targets); |
| 224 } | 259 } |
| 225 buildCounterAboutImportFormats--; | 260 buildCounterAboutImportFormats--; |
| 226 } | 261 } |
| 227 | 262 |
| 228 buildUnnamed695() { | 263 buildUnnamed982() { |
| 229 var o = new core.List<api.AboutImportFormats>(); | 264 var o = new core.List<api.AboutImportFormats>(); |
| 230 o.add(buildAboutImportFormats()); | 265 o.add(buildAboutImportFormats()); |
| 231 o.add(buildAboutImportFormats()); | 266 o.add(buildAboutImportFormats()); |
| 232 return o; | 267 return o; |
| 233 } | 268 } |
| 234 | 269 |
| 235 checkUnnamed695(core.List<api.AboutImportFormats> o) { | 270 checkUnnamed982(core.List<api.AboutImportFormats> o) { |
| 236 unittest.expect(o, unittest.hasLength(2)); | 271 unittest.expect(o, unittest.hasLength(2)); |
| 237 checkAboutImportFormats(o[0]); | 272 checkAboutImportFormats(o[0]); |
| 238 checkAboutImportFormats(o[1]); | 273 checkAboutImportFormats(o[1]); |
| 239 } | 274 } |
| 240 | 275 |
| 241 core.int buildCounterAboutMaxUploadSizes = 0; | 276 core.int buildCounterAboutMaxUploadSizes = 0; |
| 242 buildAboutMaxUploadSizes() { | 277 buildAboutMaxUploadSizes() { |
| 243 var o = new api.AboutMaxUploadSizes(); | 278 var o = new api.AboutMaxUploadSizes(); |
| 244 buildCounterAboutMaxUploadSizes++; | 279 buildCounterAboutMaxUploadSizes++; |
| 245 if (buildCounterAboutMaxUploadSizes < 3) { | 280 if (buildCounterAboutMaxUploadSizes < 3) { |
| 246 o.size = "foo"; | 281 o.size = "foo"; |
| 247 o.type = "foo"; | 282 o.type = "foo"; |
| 248 } | 283 } |
| 249 buildCounterAboutMaxUploadSizes--; | 284 buildCounterAboutMaxUploadSizes--; |
| 250 return o; | 285 return o; |
| 251 } | 286 } |
| 252 | 287 |
| 253 checkAboutMaxUploadSizes(api.AboutMaxUploadSizes o) { | 288 checkAboutMaxUploadSizes(api.AboutMaxUploadSizes o) { |
| 254 buildCounterAboutMaxUploadSizes++; | 289 buildCounterAboutMaxUploadSizes++; |
| 255 if (buildCounterAboutMaxUploadSizes < 3) { | 290 if (buildCounterAboutMaxUploadSizes < 3) { |
| 256 unittest.expect(o.size, unittest.equals('foo')); | 291 unittest.expect(o.size, unittest.equals('foo')); |
| 257 unittest.expect(o.type, unittest.equals('foo')); | 292 unittest.expect(o.type, unittest.equals('foo')); |
| 258 } | 293 } |
| 259 buildCounterAboutMaxUploadSizes--; | 294 buildCounterAboutMaxUploadSizes--; |
| 260 } | 295 } |
| 261 | 296 |
| 262 buildUnnamed696() { | 297 buildUnnamed983() { |
| 263 var o = new core.List<api.AboutMaxUploadSizes>(); | 298 var o = new core.List<api.AboutMaxUploadSizes>(); |
| 264 o.add(buildAboutMaxUploadSizes()); | 299 o.add(buildAboutMaxUploadSizes()); |
| 265 o.add(buildAboutMaxUploadSizes()); | 300 o.add(buildAboutMaxUploadSizes()); |
| 266 return o; | 301 return o; |
| 267 } | 302 } |
| 268 | 303 |
| 269 checkUnnamed696(core.List<api.AboutMaxUploadSizes> o) { | 304 checkUnnamed983(core.List<api.AboutMaxUploadSizes> o) { |
| 270 unittest.expect(o, unittest.hasLength(2)); | 305 unittest.expect(o, unittest.hasLength(2)); |
| 271 checkAboutMaxUploadSizes(o[0]); | 306 checkAboutMaxUploadSizes(o[0]); |
| 272 checkAboutMaxUploadSizes(o[1]); | 307 checkAboutMaxUploadSizes(o[1]); |
| 273 } | 308 } |
| 274 | 309 |
| 275 core.int buildCounterAboutQuotaBytesByService = 0; | 310 core.int buildCounterAboutQuotaBytesByService = 0; |
| 276 buildAboutQuotaBytesByService() { | 311 buildAboutQuotaBytesByService() { |
| 277 var o = new api.AboutQuotaBytesByService(); | 312 var o = new api.AboutQuotaBytesByService(); |
| 278 buildCounterAboutQuotaBytesByService++; | 313 buildCounterAboutQuotaBytesByService++; |
| 279 if (buildCounterAboutQuotaBytesByService < 3) { | 314 if (buildCounterAboutQuotaBytesByService < 3) { |
| 280 o.bytesUsed = "foo"; | 315 o.bytesUsed = "foo"; |
| 281 o.serviceName = "foo"; | 316 o.serviceName = "foo"; |
| 282 } | 317 } |
| 283 buildCounterAboutQuotaBytesByService--; | 318 buildCounterAboutQuotaBytesByService--; |
| 284 return o; | 319 return o; |
| 285 } | 320 } |
| 286 | 321 |
| 287 checkAboutQuotaBytesByService(api.AboutQuotaBytesByService o) { | 322 checkAboutQuotaBytesByService(api.AboutQuotaBytesByService o) { |
| 288 buildCounterAboutQuotaBytesByService++; | 323 buildCounterAboutQuotaBytesByService++; |
| 289 if (buildCounterAboutQuotaBytesByService < 3) { | 324 if (buildCounterAboutQuotaBytesByService < 3) { |
| 290 unittest.expect(o.bytesUsed, unittest.equals('foo')); | 325 unittest.expect(o.bytesUsed, unittest.equals('foo')); |
| 291 unittest.expect(o.serviceName, unittest.equals('foo')); | 326 unittest.expect(o.serviceName, unittest.equals('foo')); |
| 292 } | 327 } |
| 293 buildCounterAboutQuotaBytesByService--; | 328 buildCounterAboutQuotaBytesByService--; |
| 294 } | 329 } |
| 295 | 330 |
| 296 buildUnnamed697() { | 331 buildUnnamed984() { |
| 297 var o = new core.List<api.AboutQuotaBytesByService>(); | 332 var o = new core.List<api.AboutQuotaBytesByService>(); |
| 298 o.add(buildAboutQuotaBytesByService()); | 333 o.add(buildAboutQuotaBytesByService()); |
| 299 o.add(buildAboutQuotaBytesByService()); | 334 o.add(buildAboutQuotaBytesByService()); |
| 300 return o; | 335 return o; |
| 301 } | 336 } |
| 302 | 337 |
| 303 checkUnnamed697(core.List<api.AboutQuotaBytesByService> o) { | 338 checkUnnamed984(core.List<api.AboutQuotaBytesByService> o) { |
| 304 unittest.expect(o, unittest.hasLength(2)); | 339 unittest.expect(o, unittest.hasLength(2)); |
| 305 checkAboutQuotaBytesByService(o[0]); | 340 checkAboutQuotaBytesByService(o[0]); |
| 306 checkAboutQuotaBytesByService(o[1]); | 341 checkAboutQuotaBytesByService(o[1]); |
| 307 } | 342 } |
| 308 | 343 |
| 309 core.int buildCounterAbout = 0; | 344 core.int buildCounterAbout = 0; |
| 310 buildAbout() { | 345 buildAbout() { |
| 311 var o = new api.About(); | 346 var o = new api.About(); |
| 312 buildCounterAbout++; | 347 buildCounterAbout++; |
| 313 if (buildCounterAbout < 3) { | 348 if (buildCounterAbout < 3) { |
| 314 o.additionalRoleInfo = buildUnnamed689(); | 349 o.additionalRoleInfo = buildUnnamed976(); |
| 315 o.domainSharingPolicy = "foo"; | 350 o.domainSharingPolicy = "foo"; |
| 316 o.etag = "foo"; | 351 o.etag = "foo"; |
| 317 o.exportFormats = buildUnnamed691(); | 352 o.exportFormats = buildUnnamed978(); |
| 318 o.features = buildUnnamed692(); | 353 o.features = buildUnnamed979(); |
| 319 o.folderColorPalette = buildUnnamed693(); | 354 o.folderColorPalette = buildUnnamed980(); |
| 320 o.importFormats = buildUnnamed695(); | 355 o.importFormats = buildUnnamed982(); |
| 321 o.isCurrentAppInstalled = true; | 356 o.isCurrentAppInstalled = true; |
| 322 o.kind = "foo"; | 357 o.kind = "foo"; |
| 323 o.languageCode = "foo"; | 358 o.languageCode = "foo"; |
| 324 o.largestChangeId = "foo"; | 359 o.largestChangeId = "foo"; |
| 325 o.maxUploadSizes = buildUnnamed696(); | 360 o.maxUploadSizes = buildUnnamed983(); |
| 326 o.name = "foo"; | 361 o.name = "foo"; |
| 327 o.permissionId = "foo"; | 362 o.permissionId = "foo"; |
| 328 o.quotaBytesByService = buildUnnamed697(); | 363 o.quotaBytesByService = buildUnnamed984(); |
| 329 o.quotaBytesTotal = "foo"; | 364 o.quotaBytesTotal = "foo"; |
| 330 o.quotaBytesUsed = "foo"; | 365 o.quotaBytesUsed = "foo"; |
| 331 o.quotaBytesUsedAggregate = "foo"; | 366 o.quotaBytesUsedAggregate = "foo"; |
| 332 o.quotaBytesUsedInTrash = "foo"; | 367 o.quotaBytesUsedInTrash = "foo"; |
| 333 o.quotaType = "foo"; | 368 o.quotaType = "foo"; |
| 334 o.remainingChangeIds = "foo"; | 369 o.remainingChangeIds = "foo"; |
| 335 o.rootFolderId = "foo"; | 370 o.rootFolderId = "foo"; |
| 336 o.selfLink = "foo"; | 371 o.selfLink = "foo"; |
| 337 o.user = buildUser(); | 372 o.user = buildUser(); |
| 338 } | 373 } |
| 339 buildCounterAbout--; | 374 buildCounterAbout--; |
| 340 return o; | 375 return o; |
| 341 } | 376 } |
| 342 | 377 |
| 343 checkAbout(api.About o) { | 378 checkAbout(api.About o) { |
| 344 buildCounterAbout++; | 379 buildCounterAbout++; |
| 345 if (buildCounterAbout < 3) { | 380 if (buildCounterAbout < 3) { |
| 346 checkUnnamed689(o.additionalRoleInfo); | 381 checkUnnamed976(o.additionalRoleInfo); |
| 347 unittest.expect(o.domainSharingPolicy, unittest.equals('foo')); | 382 unittest.expect(o.domainSharingPolicy, unittest.equals('foo')); |
| 348 unittest.expect(o.etag, unittest.equals('foo')); | 383 unittest.expect(o.etag, unittest.equals('foo')); |
| 349 checkUnnamed691(o.exportFormats); | 384 checkUnnamed978(o.exportFormats); |
| 350 checkUnnamed692(o.features); | 385 checkUnnamed979(o.features); |
| 351 checkUnnamed693(o.folderColorPalette); | 386 checkUnnamed980(o.folderColorPalette); |
| 352 checkUnnamed695(o.importFormats); | 387 checkUnnamed982(o.importFormats); |
| 353 unittest.expect(o.isCurrentAppInstalled, unittest.isTrue); | 388 unittest.expect(o.isCurrentAppInstalled, unittest.isTrue); |
| 354 unittest.expect(o.kind, unittest.equals('foo')); | 389 unittest.expect(o.kind, unittest.equals('foo')); |
| 355 unittest.expect(o.languageCode, unittest.equals('foo')); | 390 unittest.expect(o.languageCode, unittest.equals('foo')); |
| 356 unittest.expect(o.largestChangeId, unittest.equals('foo')); | 391 unittest.expect(o.largestChangeId, unittest.equals('foo')); |
| 357 checkUnnamed696(o.maxUploadSizes); | 392 checkUnnamed983(o.maxUploadSizes); |
| 358 unittest.expect(o.name, unittest.equals('foo')); | 393 unittest.expect(o.name, unittest.equals('foo')); |
| 359 unittest.expect(o.permissionId, unittest.equals('foo')); | 394 unittest.expect(o.permissionId, unittest.equals('foo')); |
| 360 checkUnnamed697(o.quotaBytesByService); | 395 checkUnnamed984(o.quotaBytesByService); |
| 361 unittest.expect(o.quotaBytesTotal, unittest.equals('foo')); | 396 unittest.expect(o.quotaBytesTotal, unittest.equals('foo')); |
| 362 unittest.expect(o.quotaBytesUsed, unittest.equals('foo')); | 397 unittest.expect(o.quotaBytesUsed, unittest.equals('foo')); |
| 363 unittest.expect(o.quotaBytesUsedAggregate, unittest.equals('foo')); | 398 unittest.expect(o.quotaBytesUsedAggregate, unittest.equals('foo')); |
| 364 unittest.expect(o.quotaBytesUsedInTrash, unittest.equals('foo')); | 399 unittest.expect(o.quotaBytesUsedInTrash, unittest.equals('foo')); |
| 365 unittest.expect(o.quotaType, unittest.equals('foo')); | 400 unittest.expect(o.quotaType, unittest.equals('foo')); |
| 366 unittest.expect(o.remainingChangeIds, unittest.equals('foo')); | 401 unittest.expect(o.remainingChangeIds, unittest.equals('foo')); |
| 367 unittest.expect(o.rootFolderId, unittest.equals('foo')); | 402 unittest.expect(o.rootFolderId, unittest.equals('foo')); |
| 368 unittest.expect(o.selfLink, unittest.equals('foo')); | 403 unittest.expect(o.selfLink, unittest.equals('foo')); |
| 369 checkUser(o.user); | 404 checkUser(o.user); |
| 370 } | 405 } |
| (...skipping 16 matching lines...) Expand all Loading... |
| 387 checkAppIcons(api.AppIcons o) { | 422 checkAppIcons(api.AppIcons o) { |
| 388 buildCounterAppIcons++; | 423 buildCounterAppIcons++; |
| 389 if (buildCounterAppIcons < 3) { | 424 if (buildCounterAppIcons < 3) { |
| 390 unittest.expect(o.category, unittest.equals('foo')); | 425 unittest.expect(o.category, unittest.equals('foo')); |
| 391 unittest.expect(o.iconUrl, unittest.equals('foo')); | 426 unittest.expect(o.iconUrl, unittest.equals('foo')); |
| 392 unittest.expect(o.size, unittest.equals(42)); | 427 unittest.expect(o.size, unittest.equals(42)); |
| 393 } | 428 } |
| 394 buildCounterAppIcons--; | 429 buildCounterAppIcons--; |
| 395 } | 430 } |
| 396 | 431 |
| 397 buildUnnamed698() { | 432 buildUnnamed985() { |
| 398 var o = new core.List<api.AppIcons>(); | 433 var o = new core.List<api.AppIcons>(); |
| 399 o.add(buildAppIcons()); | 434 o.add(buildAppIcons()); |
| 400 o.add(buildAppIcons()); | 435 o.add(buildAppIcons()); |
| 401 return o; | 436 return o; |
| 402 } | 437 } |
| 403 | 438 |
| 404 checkUnnamed698(core.List<api.AppIcons> o) { | 439 checkUnnamed985(core.List<api.AppIcons> o) { |
| 405 unittest.expect(o, unittest.hasLength(2)); | 440 unittest.expect(o, unittest.hasLength(2)); |
| 406 checkAppIcons(o[0]); | 441 checkAppIcons(o[0]); |
| 407 checkAppIcons(o[1]); | 442 checkAppIcons(o[1]); |
| 408 } | 443 } |
| 409 | 444 |
| 410 buildUnnamed699() { | 445 buildUnnamed986() { |
| 411 var o = new core.List<core.String>(); | 446 var o = new core.List<core.String>(); |
| 412 o.add("foo"); | 447 o.add("foo"); |
| 413 o.add("foo"); | 448 o.add("foo"); |
| 414 return o; | 449 return o; |
| 415 } | 450 } |
| 416 | 451 |
| 417 checkUnnamed699(core.List<core.String> o) { | 452 checkUnnamed986(core.List<core.String> o) { |
| 418 unittest.expect(o, unittest.hasLength(2)); | 453 unittest.expect(o, unittest.hasLength(2)); |
| 419 unittest.expect(o[0], unittest.equals('foo')); | 454 unittest.expect(o[0], unittest.equals('foo')); |
| 420 unittest.expect(o[1], unittest.equals('foo')); | 455 unittest.expect(o[1], unittest.equals('foo')); |
| 421 } | 456 } |
| 422 | 457 |
| 423 buildUnnamed700() { | 458 buildUnnamed987() { |
| 424 var o = new core.List<core.String>(); | 459 var o = new core.List<core.String>(); |
| 425 o.add("foo"); | 460 o.add("foo"); |
| 426 o.add("foo"); | 461 o.add("foo"); |
| 427 return o; | 462 return o; |
| 428 } | 463 } |
| 429 | 464 |
| 430 checkUnnamed700(core.List<core.String> o) { | 465 checkUnnamed987(core.List<core.String> o) { |
| 431 unittest.expect(o, unittest.hasLength(2)); | 466 unittest.expect(o, unittest.hasLength(2)); |
| 432 unittest.expect(o[0], unittest.equals('foo')); | 467 unittest.expect(o[0], unittest.equals('foo')); |
| 433 unittest.expect(o[1], unittest.equals('foo')); | 468 unittest.expect(o[1], unittest.equals('foo')); |
| 434 } | 469 } |
| 435 | 470 |
| 436 buildUnnamed701() { | 471 buildUnnamed988() { |
| 437 var o = new core.List<core.String>(); | 472 var o = new core.List<core.String>(); |
| 438 o.add("foo"); | 473 o.add("foo"); |
| 439 o.add("foo"); | 474 o.add("foo"); |
| 440 return o; | 475 return o; |
| 441 } | 476 } |
| 442 | 477 |
| 443 checkUnnamed701(core.List<core.String> o) { | 478 checkUnnamed988(core.List<core.String> o) { |
| 444 unittest.expect(o, unittest.hasLength(2)); | 479 unittest.expect(o, unittest.hasLength(2)); |
| 445 unittest.expect(o[0], unittest.equals('foo')); | 480 unittest.expect(o[0], unittest.equals('foo')); |
| 446 unittest.expect(o[1], unittest.equals('foo')); | 481 unittest.expect(o[1], unittest.equals('foo')); |
| 447 } | 482 } |
| 448 | 483 |
| 449 buildUnnamed702() { | 484 buildUnnamed989() { |
| 450 var o = new core.List<core.String>(); | 485 var o = new core.List<core.String>(); |
| 451 o.add("foo"); | 486 o.add("foo"); |
| 452 o.add("foo"); | 487 o.add("foo"); |
| 453 return o; | 488 return o; |
| 454 } | 489 } |
| 455 | 490 |
| 456 checkUnnamed702(core.List<core.String> o) { | 491 checkUnnamed989(core.List<core.String> o) { |
| 457 unittest.expect(o, unittest.hasLength(2)); | 492 unittest.expect(o, unittest.hasLength(2)); |
| 458 unittest.expect(o[0], unittest.equals('foo')); | 493 unittest.expect(o[0], unittest.equals('foo')); |
| 459 unittest.expect(o[1], unittest.equals('foo')); | 494 unittest.expect(o[1], unittest.equals('foo')); |
| 460 } | 495 } |
| 461 | 496 |
| 462 core.int buildCounterApp = 0; | 497 core.int buildCounterApp = 0; |
| 463 buildApp() { | 498 buildApp() { |
| 464 var o = new api.App(); | 499 var o = new api.App(); |
| 465 buildCounterApp++; | 500 buildCounterApp++; |
| 466 if (buildCounterApp < 3) { | 501 if (buildCounterApp < 3) { |
| 467 o.authorized = true; | 502 o.authorized = true; |
| 468 o.createInFolderTemplate = "foo"; | 503 o.createInFolderTemplate = "foo"; |
| 469 o.createUrl = "foo"; | 504 o.createUrl = "foo"; |
| 470 o.hasDriveWideScope = true; | 505 o.hasDriveWideScope = true; |
| 471 o.icons = buildUnnamed698(); | 506 o.icons = buildUnnamed985(); |
| 472 o.id = "foo"; | 507 o.id = "foo"; |
| 473 o.installed = true; | 508 o.installed = true; |
| 474 o.kind = "foo"; | 509 o.kind = "foo"; |
| 475 o.longDescription = "foo"; | 510 o.longDescription = "foo"; |
| 476 o.name = "foo"; | 511 o.name = "foo"; |
| 477 o.objectType = "foo"; | 512 o.objectType = "foo"; |
| 478 o.openUrlTemplate = "foo"; | 513 o.openUrlTemplate = "foo"; |
| 479 o.primaryFileExtensions = buildUnnamed699(); | 514 o.primaryFileExtensions = buildUnnamed986(); |
| 480 o.primaryMimeTypes = buildUnnamed700(); | 515 o.primaryMimeTypes = buildUnnamed987(); |
| 481 o.productId = "foo"; | 516 o.productId = "foo"; |
| 482 o.productUrl = "foo"; | 517 o.productUrl = "foo"; |
| 483 o.secondaryFileExtensions = buildUnnamed701(); | 518 o.secondaryFileExtensions = buildUnnamed988(); |
| 484 o.secondaryMimeTypes = buildUnnamed702(); | 519 o.secondaryMimeTypes = buildUnnamed989(); |
| 485 o.shortDescription = "foo"; | 520 o.shortDescription = "foo"; |
| 486 o.supportsCreate = true; | 521 o.supportsCreate = true; |
| 487 o.supportsImport = true; | 522 o.supportsImport = true; |
| 488 o.supportsMultiOpen = true; | 523 o.supportsMultiOpen = true; |
| 489 o.supportsOfflineCreate = true; | 524 o.supportsOfflineCreate = true; |
| 490 o.useByDefault = true; | 525 o.useByDefault = true; |
| 491 } | 526 } |
| 492 buildCounterApp--; | 527 buildCounterApp--; |
| 493 return o; | 528 return o; |
| 494 } | 529 } |
| 495 | 530 |
| 496 checkApp(api.App o) { | 531 checkApp(api.App o) { |
| 497 buildCounterApp++; | 532 buildCounterApp++; |
| 498 if (buildCounterApp < 3) { | 533 if (buildCounterApp < 3) { |
| 499 unittest.expect(o.authorized, unittest.isTrue); | 534 unittest.expect(o.authorized, unittest.isTrue); |
| 500 unittest.expect(o.createInFolderTemplate, unittest.equals('foo')); | 535 unittest.expect(o.createInFolderTemplate, unittest.equals('foo')); |
| 501 unittest.expect(o.createUrl, unittest.equals('foo')); | 536 unittest.expect(o.createUrl, unittest.equals('foo')); |
| 502 unittest.expect(o.hasDriveWideScope, unittest.isTrue); | 537 unittest.expect(o.hasDriveWideScope, unittest.isTrue); |
| 503 checkUnnamed698(o.icons); | 538 checkUnnamed985(o.icons); |
| 504 unittest.expect(o.id, unittest.equals('foo')); | 539 unittest.expect(o.id, unittest.equals('foo')); |
| 505 unittest.expect(o.installed, unittest.isTrue); | 540 unittest.expect(o.installed, unittest.isTrue); |
| 506 unittest.expect(o.kind, unittest.equals('foo')); | 541 unittest.expect(o.kind, unittest.equals('foo')); |
| 507 unittest.expect(o.longDescription, unittest.equals('foo')); | 542 unittest.expect(o.longDescription, unittest.equals('foo')); |
| 508 unittest.expect(o.name, unittest.equals('foo')); | 543 unittest.expect(o.name, unittest.equals('foo')); |
| 509 unittest.expect(o.objectType, unittest.equals('foo')); | 544 unittest.expect(o.objectType, unittest.equals('foo')); |
| 510 unittest.expect(o.openUrlTemplate, unittest.equals('foo')); | 545 unittest.expect(o.openUrlTemplate, unittest.equals('foo')); |
| 511 checkUnnamed699(o.primaryFileExtensions); | 546 checkUnnamed986(o.primaryFileExtensions); |
| 512 checkUnnamed700(o.primaryMimeTypes); | 547 checkUnnamed987(o.primaryMimeTypes); |
| 513 unittest.expect(o.productId, unittest.equals('foo')); | 548 unittest.expect(o.productId, unittest.equals('foo')); |
| 514 unittest.expect(o.productUrl, unittest.equals('foo')); | 549 unittest.expect(o.productUrl, unittest.equals('foo')); |
| 515 checkUnnamed701(o.secondaryFileExtensions); | 550 checkUnnamed988(o.secondaryFileExtensions); |
| 516 checkUnnamed702(o.secondaryMimeTypes); | 551 checkUnnamed989(o.secondaryMimeTypes); |
| 517 unittest.expect(o.shortDescription, unittest.equals('foo')); | 552 unittest.expect(o.shortDescription, unittest.equals('foo')); |
| 518 unittest.expect(o.supportsCreate, unittest.isTrue); | 553 unittest.expect(o.supportsCreate, unittest.isTrue); |
| 519 unittest.expect(o.supportsImport, unittest.isTrue); | 554 unittest.expect(o.supportsImport, unittest.isTrue); |
| 520 unittest.expect(o.supportsMultiOpen, unittest.isTrue); | 555 unittest.expect(o.supportsMultiOpen, unittest.isTrue); |
| 521 unittest.expect(o.supportsOfflineCreate, unittest.isTrue); | 556 unittest.expect(o.supportsOfflineCreate, unittest.isTrue); |
| 522 unittest.expect(o.useByDefault, unittest.isTrue); | 557 unittest.expect(o.useByDefault, unittest.isTrue); |
| 523 } | 558 } |
| 524 buildCounterApp--; | 559 buildCounterApp--; |
| 525 } | 560 } |
| 526 | 561 |
| 527 buildUnnamed703() { | 562 buildUnnamed990() { |
| 528 var o = new core.List<core.String>(); | 563 var o = new core.List<core.String>(); |
| 529 o.add("foo"); | 564 o.add("foo"); |
| 530 o.add("foo"); | 565 o.add("foo"); |
| 531 return o; | 566 return o; |
| 532 } | 567 } |
| 533 | 568 |
| 534 checkUnnamed703(core.List<core.String> o) { | 569 checkUnnamed990(core.List<core.String> o) { |
| 535 unittest.expect(o, unittest.hasLength(2)); | 570 unittest.expect(o, unittest.hasLength(2)); |
| 536 unittest.expect(o[0], unittest.equals('foo')); | 571 unittest.expect(o[0], unittest.equals('foo')); |
| 537 unittest.expect(o[1], unittest.equals('foo')); | 572 unittest.expect(o[1], unittest.equals('foo')); |
| 538 } | 573 } |
| 539 | 574 |
| 540 buildUnnamed704() { | 575 buildUnnamed991() { |
| 541 var o = new core.List<api.App>(); | 576 var o = new core.List<api.App>(); |
| 542 o.add(buildApp()); | 577 o.add(buildApp()); |
| 543 o.add(buildApp()); | 578 o.add(buildApp()); |
| 544 return o; | 579 return o; |
| 545 } | 580 } |
| 546 | 581 |
| 547 checkUnnamed704(core.List<api.App> o) { | 582 checkUnnamed991(core.List<api.App> o) { |
| 548 unittest.expect(o, unittest.hasLength(2)); | 583 unittest.expect(o, unittest.hasLength(2)); |
| 549 checkApp(o[0]); | 584 checkApp(o[0]); |
| 550 checkApp(o[1]); | 585 checkApp(o[1]); |
| 551 } | 586 } |
| 552 | 587 |
| 553 core.int buildCounterAppList = 0; | 588 core.int buildCounterAppList = 0; |
| 554 buildAppList() { | 589 buildAppList() { |
| 555 var o = new api.AppList(); | 590 var o = new api.AppList(); |
| 556 buildCounterAppList++; | 591 buildCounterAppList++; |
| 557 if (buildCounterAppList < 3) { | 592 if (buildCounterAppList < 3) { |
| 558 o.defaultAppIds = buildUnnamed703(); | 593 o.defaultAppIds = buildUnnamed990(); |
| 559 o.etag = "foo"; | 594 o.etag = "foo"; |
| 560 o.items = buildUnnamed704(); | 595 o.items = buildUnnamed991(); |
| 561 o.kind = "foo"; | 596 o.kind = "foo"; |
| 562 o.selfLink = "foo"; | 597 o.selfLink = "foo"; |
| 563 } | 598 } |
| 564 buildCounterAppList--; | 599 buildCounterAppList--; |
| 565 return o; | 600 return o; |
| 566 } | 601 } |
| 567 | 602 |
| 568 checkAppList(api.AppList o) { | 603 checkAppList(api.AppList o) { |
| 569 buildCounterAppList++; | 604 buildCounterAppList++; |
| 570 if (buildCounterAppList < 3) { | 605 if (buildCounterAppList < 3) { |
| 571 checkUnnamed703(o.defaultAppIds); | 606 checkUnnamed990(o.defaultAppIds); |
| 572 unittest.expect(o.etag, unittest.equals('foo')); | 607 unittest.expect(o.etag, unittest.equals('foo')); |
| 573 checkUnnamed704(o.items); | 608 checkUnnamed991(o.items); |
| 574 unittest.expect(o.kind, unittest.equals('foo')); | 609 unittest.expect(o.kind, unittest.equals('foo')); |
| 575 unittest.expect(o.selfLink, unittest.equals('foo')); | 610 unittest.expect(o.selfLink, unittest.equals('foo')); |
| 576 } | 611 } |
| 577 buildCounterAppList--; | 612 buildCounterAppList--; |
| 578 } | 613 } |
| 579 | 614 |
| 580 core.int buildCounterChange = 0; | 615 core.int buildCounterChange = 0; |
| 581 buildChange() { | 616 buildChange() { |
| 582 var o = new api.Change(); | 617 var o = new api.Change(); |
| 583 buildCounterChange++; | 618 buildCounterChange++; |
| (...skipping 17 matching lines...) Expand all Loading... |
| 601 checkFile(o.file); | 636 checkFile(o.file); |
| 602 unittest.expect(o.fileId, unittest.equals('foo')); | 637 unittest.expect(o.fileId, unittest.equals('foo')); |
| 603 unittest.expect(o.id, unittest.equals('foo')); | 638 unittest.expect(o.id, unittest.equals('foo')); |
| 604 unittest.expect(o.kind, unittest.equals('foo')); | 639 unittest.expect(o.kind, unittest.equals('foo')); |
| 605 unittest.expect(o.modificationDate, unittest.equals(core.DateTime.parse("200
2-02-27T14:01:02"))); | 640 unittest.expect(o.modificationDate, unittest.equals(core.DateTime.parse("200
2-02-27T14:01:02"))); |
| 606 unittest.expect(o.selfLink, unittest.equals('foo')); | 641 unittest.expect(o.selfLink, unittest.equals('foo')); |
| 607 } | 642 } |
| 608 buildCounterChange--; | 643 buildCounterChange--; |
| 609 } | 644 } |
| 610 | 645 |
| 611 buildUnnamed705() { | 646 buildUnnamed992() { |
| 612 var o = new core.List<api.Change>(); | 647 var o = new core.List<api.Change>(); |
| 613 o.add(buildChange()); | 648 o.add(buildChange()); |
| 614 o.add(buildChange()); | 649 o.add(buildChange()); |
| 615 return o; | 650 return o; |
| 616 } | 651 } |
| 617 | 652 |
| 618 checkUnnamed705(core.List<api.Change> o) { | 653 checkUnnamed992(core.List<api.Change> o) { |
| 619 unittest.expect(o, unittest.hasLength(2)); | 654 unittest.expect(o, unittest.hasLength(2)); |
| 620 checkChange(o[0]); | 655 checkChange(o[0]); |
| 621 checkChange(o[1]); | 656 checkChange(o[1]); |
| 622 } | 657 } |
| 623 | 658 |
| 624 core.int buildCounterChangeList = 0; | 659 core.int buildCounterChangeList = 0; |
| 625 buildChangeList() { | 660 buildChangeList() { |
| 626 var o = new api.ChangeList(); | 661 var o = new api.ChangeList(); |
| 627 buildCounterChangeList++; | 662 buildCounterChangeList++; |
| 628 if (buildCounterChangeList < 3) { | 663 if (buildCounterChangeList < 3) { |
| 629 o.etag = "foo"; | 664 o.etag = "foo"; |
| 630 o.items = buildUnnamed705(); | 665 o.items = buildUnnamed992(); |
| 631 o.kind = "foo"; | 666 o.kind = "foo"; |
| 632 o.largestChangeId = "foo"; | 667 o.largestChangeId = "foo"; |
| 633 o.nextLink = "foo"; | 668 o.nextLink = "foo"; |
| 634 o.nextPageToken = "foo"; | 669 o.nextPageToken = "foo"; |
| 635 o.selfLink = "foo"; | 670 o.selfLink = "foo"; |
| 636 } | 671 } |
| 637 buildCounterChangeList--; | 672 buildCounterChangeList--; |
| 638 return o; | 673 return o; |
| 639 } | 674 } |
| 640 | 675 |
| 641 checkChangeList(api.ChangeList o) { | 676 checkChangeList(api.ChangeList o) { |
| 642 buildCounterChangeList++; | 677 buildCounterChangeList++; |
| 643 if (buildCounterChangeList < 3) { | 678 if (buildCounterChangeList < 3) { |
| 644 unittest.expect(o.etag, unittest.equals('foo')); | 679 unittest.expect(o.etag, unittest.equals('foo')); |
| 645 checkUnnamed705(o.items); | 680 checkUnnamed992(o.items); |
| 646 unittest.expect(o.kind, unittest.equals('foo')); | 681 unittest.expect(o.kind, unittest.equals('foo')); |
| 647 unittest.expect(o.largestChangeId, unittest.equals('foo')); | 682 unittest.expect(o.largestChangeId, unittest.equals('foo')); |
| 648 unittest.expect(o.nextLink, unittest.equals('foo')); | 683 unittest.expect(o.nextLink, unittest.equals('foo')); |
| 649 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 684 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
| 650 unittest.expect(o.selfLink, unittest.equals('foo')); | 685 unittest.expect(o.selfLink, unittest.equals('foo')); |
| 651 } | 686 } |
| 652 buildCounterChangeList--; | 687 buildCounterChangeList--; |
| 653 } | 688 } |
| 654 | 689 |
| 655 buildUnnamed706() { | 690 buildUnnamed993() { |
| 656 var o = new core.Map<core.String, core.String>(); | 691 var o = new core.Map<core.String, core.String>(); |
| 657 o["x"] = "foo"; | 692 o["x"] = "foo"; |
| 658 o["y"] = "foo"; | 693 o["y"] = "foo"; |
| 659 return o; | 694 return o; |
| 660 } | 695 } |
| 661 | 696 |
| 662 checkUnnamed706(core.Map<core.String, core.String> o) { | 697 checkUnnamed993(core.Map<core.String, core.String> o) { |
| 663 unittest.expect(o, unittest.hasLength(2)); | 698 unittest.expect(o, unittest.hasLength(2)); |
| 664 unittest.expect(o["x"], unittest.equals('foo')); | 699 unittest.expect(o["x"], unittest.equals('foo')); |
| 665 unittest.expect(o["y"], unittest.equals('foo')); | 700 unittest.expect(o["y"], unittest.equals('foo')); |
| 666 } | 701 } |
| 667 | 702 |
| 668 core.int buildCounterChannel = 0; | 703 core.int buildCounterChannel = 0; |
| 669 buildChannel() { | 704 buildChannel() { |
| 670 var o = new api.Channel(); | 705 var o = new api.Channel(); |
| 671 buildCounterChannel++; | 706 buildCounterChannel++; |
| 672 if (buildCounterChannel < 3) { | 707 if (buildCounterChannel < 3) { |
| 673 o.address = "foo"; | 708 o.address = "foo"; |
| 674 o.expiration = "foo"; | 709 o.expiration = "foo"; |
| 675 o.id = "foo"; | 710 o.id = "foo"; |
| 676 o.kind = "foo"; | 711 o.kind = "foo"; |
| 677 o.params = buildUnnamed706(); | 712 o.params = buildUnnamed993(); |
| 678 o.payload = true; | 713 o.payload = true; |
| 679 o.resourceId = "foo"; | 714 o.resourceId = "foo"; |
| 680 o.resourceUri = "foo"; | 715 o.resourceUri = "foo"; |
| 681 o.token = "foo"; | 716 o.token = "foo"; |
| 682 o.type = "foo"; | 717 o.type = "foo"; |
| 683 } | 718 } |
| 684 buildCounterChannel--; | 719 buildCounterChannel--; |
| 685 return o; | 720 return o; |
| 686 } | 721 } |
| 687 | 722 |
| 688 checkChannel(api.Channel o) { | 723 checkChannel(api.Channel o) { |
| 689 buildCounterChannel++; | 724 buildCounterChannel++; |
| 690 if (buildCounterChannel < 3) { | 725 if (buildCounterChannel < 3) { |
| 691 unittest.expect(o.address, unittest.equals('foo')); | 726 unittest.expect(o.address, unittest.equals('foo')); |
| 692 unittest.expect(o.expiration, unittest.equals('foo')); | 727 unittest.expect(o.expiration, unittest.equals('foo')); |
| 693 unittest.expect(o.id, unittest.equals('foo')); | 728 unittest.expect(o.id, unittest.equals('foo')); |
| 694 unittest.expect(o.kind, unittest.equals('foo')); | 729 unittest.expect(o.kind, unittest.equals('foo')); |
| 695 checkUnnamed706(o.params); | 730 checkUnnamed993(o.params); |
| 696 unittest.expect(o.payload, unittest.isTrue); | 731 unittest.expect(o.payload, unittest.isTrue); |
| 697 unittest.expect(o.resourceId, unittest.equals('foo')); | 732 unittest.expect(o.resourceId, unittest.equals('foo')); |
| 698 unittest.expect(o.resourceUri, unittest.equals('foo')); | 733 unittest.expect(o.resourceUri, unittest.equals('foo')); |
| 699 unittest.expect(o.token, unittest.equals('foo')); | 734 unittest.expect(o.token, unittest.equals('foo')); |
| 700 unittest.expect(o.type, unittest.equals('foo')); | 735 unittest.expect(o.type, unittest.equals('foo')); |
| 701 } | 736 } |
| 702 buildCounterChannel--; | 737 buildCounterChannel--; |
| 703 } | 738 } |
| 704 | 739 |
| 705 buildUnnamed707() { | 740 buildUnnamed994() { |
| 706 var o = new core.List<api.ChildReference>(); | 741 var o = new core.List<api.ChildReference>(); |
| 707 o.add(buildChildReference()); | 742 o.add(buildChildReference()); |
| 708 o.add(buildChildReference()); | 743 o.add(buildChildReference()); |
| 709 return o; | 744 return o; |
| 710 } | 745 } |
| 711 | 746 |
| 712 checkUnnamed707(core.List<api.ChildReference> o) { | 747 checkUnnamed994(core.List<api.ChildReference> o) { |
| 713 unittest.expect(o, unittest.hasLength(2)); | 748 unittest.expect(o, unittest.hasLength(2)); |
| 714 checkChildReference(o[0]); | 749 checkChildReference(o[0]); |
| 715 checkChildReference(o[1]); | 750 checkChildReference(o[1]); |
| 716 } | 751 } |
| 717 | 752 |
| 718 core.int buildCounterChildList = 0; | 753 core.int buildCounterChildList = 0; |
| 719 buildChildList() { | 754 buildChildList() { |
| 720 var o = new api.ChildList(); | 755 var o = new api.ChildList(); |
| 721 buildCounterChildList++; | 756 buildCounterChildList++; |
| 722 if (buildCounterChildList < 3) { | 757 if (buildCounterChildList < 3) { |
| 723 o.etag = "foo"; | 758 o.etag = "foo"; |
| 724 o.items = buildUnnamed707(); | 759 o.items = buildUnnamed994(); |
| 725 o.kind = "foo"; | 760 o.kind = "foo"; |
| 726 o.nextLink = "foo"; | 761 o.nextLink = "foo"; |
| 727 o.nextPageToken = "foo"; | 762 o.nextPageToken = "foo"; |
| 728 o.selfLink = "foo"; | 763 o.selfLink = "foo"; |
| 729 } | 764 } |
| 730 buildCounterChildList--; | 765 buildCounterChildList--; |
| 731 return o; | 766 return o; |
| 732 } | 767 } |
| 733 | 768 |
| 734 checkChildList(api.ChildList o) { | 769 checkChildList(api.ChildList o) { |
| 735 buildCounterChildList++; | 770 buildCounterChildList++; |
| 736 if (buildCounterChildList < 3) { | 771 if (buildCounterChildList < 3) { |
| 737 unittest.expect(o.etag, unittest.equals('foo')); | 772 unittest.expect(o.etag, unittest.equals('foo')); |
| 738 checkUnnamed707(o.items); | 773 checkUnnamed994(o.items); |
| 739 unittest.expect(o.kind, unittest.equals('foo')); | 774 unittest.expect(o.kind, unittest.equals('foo')); |
| 740 unittest.expect(o.nextLink, unittest.equals('foo')); | 775 unittest.expect(o.nextLink, unittest.equals('foo')); |
| 741 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 776 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
| 742 unittest.expect(o.selfLink, unittest.equals('foo')); | 777 unittest.expect(o.selfLink, unittest.equals('foo')); |
| 743 } | 778 } |
| 744 buildCounterChildList--; | 779 buildCounterChildList--; |
| 745 } | 780 } |
| 746 | 781 |
| 747 core.int buildCounterChildReference = 0; | 782 core.int buildCounterChildReference = 0; |
| 748 buildChildReference() { | 783 buildChildReference() { |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 783 | 818 |
| 784 checkCommentContext(api.CommentContext o) { | 819 checkCommentContext(api.CommentContext o) { |
| 785 buildCounterCommentContext++; | 820 buildCounterCommentContext++; |
| 786 if (buildCounterCommentContext < 3) { | 821 if (buildCounterCommentContext < 3) { |
| 787 unittest.expect(o.type, unittest.equals('foo')); | 822 unittest.expect(o.type, unittest.equals('foo')); |
| 788 unittest.expect(o.value, unittest.equals('foo')); | 823 unittest.expect(o.value, unittest.equals('foo')); |
| 789 } | 824 } |
| 790 buildCounterCommentContext--; | 825 buildCounterCommentContext--; |
| 791 } | 826 } |
| 792 | 827 |
| 793 buildUnnamed708() { | 828 buildUnnamed995() { |
| 794 var o = new core.List<api.CommentReply>(); | 829 var o = new core.List<api.CommentReply>(); |
| 795 o.add(buildCommentReply()); | 830 o.add(buildCommentReply()); |
| 796 o.add(buildCommentReply()); | 831 o.add(buildCommentReply()); |
| 797 return o; | 832 return o; |
| 798 } | 833 } |
| 799 | 834 |
| 800 checkUnnamed708(core.List<api.CommentReply> o) { | 835 checkUnnamed995(core.List<api.CommentReply> o) { |
| 801 unittest.expect(o, unittest.hasLength(2)); | 836 unittest.expect(o, unittest.hasLength(2)); |
| 802 checkCommentReply(o[0]); | 837 checkCommentReply(o[0]); |
| 803 checkCommentReply(o[1]); | 838 checkCommentReply(o[1]); |
| 804 } | 839 } |
| 805 | 840 |
| 806 core.int buildCounterComment = 0; | 841 core.int buildCounterComment = 0; |
| 807 buildComment() { | 842 buildComment() { |
| 808 var o = new api.Comment(); | 843 var o = new api.Comment(); |
| 809 buildCounterComment++; | 844 buildCounterComment++; |
| 810 if (buildCounterComment < 3) { | 845 if (buildCounterComment < 3) { |
| 811 o.anchor = "foo"; | 846 o.anchor = "foo"; |
| 812 o.author = buildUser(); | 847 o.author = buildUser(); |
| 813 o.commentId = "foo"; | 848 o.commentId = "foo"; |
| 814 o.content = "foo"; | 849 o.content = "foo"; |
| 815 o.context = buildCommentContext(); | 850 o.context = buildCommentContext(); |
| 816 o.createdDate = core.DateTime.parse("2002-02-27T14:01:02"); | 851 o.createdDate = core.DateTime.parse("2002-02-27T14:01:02"); |
| 817 o.deleted = true; | 852 o.deleted = true; |
| 818 o.fileId = "foo"; | 853 o.fileId = "foo"; |
| 819 o.fileTitle = "foo"; | 854 o.fileTitle = "foo"; |
| 820 o.htmlContent = "foo"; | 855 o.htmlContent = "foo"; |
| 821 o.kind = "foo"; | 856 o.kind = "foo"; |
| 822 o.modifiedDate = core.DateTime.parse("2002-02-27T14:01:02"); | 857 o.modifiedDate = core.DateTime.parse("2002-02-27T14:01:02"); |
| 823 o.replies = buildUnnamed708(); | 858 o.replies = buildUnnamed995(); |
| 824 o.selfLink = "foo"; | 859 o.selfLink = "foo"; |
| 825 o.status = "foo"; | 860 o.status = "foo"; |
| 826 } | 861 } |
| 827 buildCounterComment--; | 862 buildCounterComment--; |
| 828 return o; | 863 return o; |
| 829 } | 864 } |
| 830 | 865 |
| 831 checkComment(api.Comment o) { | 866 checkComment(api.Comment o) { |
| 832 buildCounterComment++; | 867 buildCounterComment++; |
| 833 if (buildCounterComment < 3) { | 868 if (buildCounterComment < 3) { |
| 834 unittest.expect(o.anchor, unittest.equals('foo')); | 869 unittest.expect(o.anchor, unittest.equals('foo')); |
| 835 checkUser(o.author); | 870 checkUser(o.author); |
| 836 unittest.expect(o.commentId, unittest.equals('foo')); | 871 unittest.expect(o.commentId, unittest.equals('foo')); |
| 837 unittest.expect(o.content, unittest.equals('foo')); | 872 unittest.expect(o.content, unittest.equals('foo')); |
| 838 checkCommentContext(o.context); | 873 checkCommentContext(o.context); |
| 839 unittest.expect(o.createdDate, unittest.equals(core.DateTime.parse("2002-02-
27T14:01:02"))); | 874 unittest.expect(o.createdDate, unittest.equals(core.DateTime.parse("2002-02-
27T14:01:02"))); |
| 840 unittest.expect(o.deleted, unittest.isTrue); | 875 unittest.expect(o.deleted, unittest.isTrue); |
| 841 unittest.expect(o.fileId, unittest.equals('foo')); | 876 unittest.expect(o.fileId, unittest.equals('foo')); |
| 842 unittest.expect(o.fileTitle, unittest.equals('foo')); | 877 unittest.expect(o.fileTitle, unittest.equals('foo')); |
| 843 unittest.expect(o.htmlContent, unittest.equals('foo')); | 878 unittest.expect(o.htmlContent, unittest.equals('foo')); |
| 844 unittest.expect(o.kind, unittest.equals('foo')); | 879 unittest.expect(o.kind, unittest.equals('foo')); |
| 845 unittest.expect(o.modifiedDate, unittest.equals(core.DateTime.parse("2002-02
-27T14:01:02"))); | 880 unittest.expect(o.modifiedDate, unittest.equals(core.DateTime.parse("2002-02
-27T14:01:02"))); |
| 846 checkUnnamed708(o.replies); | 881 checkUnnamed995(o.replies); |
| 847 unittest.expect(o.selfLink, unittest.equals('foo')); | 882 unittest.expect(o.selfLink, unittest.equals('foo')); |
| 848 unittest.expect(o.status, unittest.equals('foo')); | 883 unittest.expect(o.status, unittest.equals('foo')); |
| 849 } | 884 } |
| 850 buildCounterComment--; | 885 buildCounterComment--; |
| 851 } | 886 } |
| 852 | 887 |
| 853 buildUnnamed709() { | 888 buildUnnamed996() { |
| 854 var o = new core.List<api.Comment>(); | 889 var o = new core.List<api.Comment>(); |
| 855 o.add(buildComment()); | 890 o.add(buildComment()); |
| 856 o.add(buildComment()); | 891 o.add(buildComment()); |
| 857 return o; | 892 return o; |
| 858 } | 893 } |
| 859 | 894 |
| 860 checkUnnamed709(core.List<api.Comment> o) { | 895 checkUnnamed996(core.List<api.Comment> o) { |
| 861 unittest.expect(o, unittest.hasLength(2)); | 896 unittest.expect(o, unittest.hasLength(2)); |
| 862 checkComment(o[0]); | 897 checkComment(o[0]); |
| 863 checkComment(o[1]); | 898 checkComment(o[1]); |
| 864 } | 899 } |
| 865 | 900 |
| 866 core.int buildCounterCommentList = 0; | 901 core.int buildCounterCommentList = 0; |
| 867 buildCommentList() { | 902 buildCommentList() { |
| 868 var o = new api.CommentList(); | 903 var o = new api.CommentList(); |
| 869 buildCounterCommentList++; | 904 buildCounterCommentList++; |
| 870 if (buildCounterCommentList < 3) { | 905 if (buildCounterCommentList < 3) { |
| 871 o.items = buildUnnamed709(); | 906 o.items = buildUnnamed996(); |
| 872 o.kind = "foo"; | 907 o.kind = "foo"; |
| 873 o.nextLink = "foo"; | 908 o.nextLink = "foo"; |
| 874 o.nextPageToken = "foo"; | 909 o.nextPageToken = "foo"; |
| 875 o.selfLink = "foo"; | 910 o.selfLink = "foo"; |
| 876 } | 911 } |
| 877 buildCounterCommentList--; | 912 buildCounterCommentList--; |
| 878 return o; | 913 return o; |
| 879 } | 914 } |
| 880 | 915 |
| 881 checkCommentList(api.CommentList o) { | 916 checkCommentList(api.CommentList o) { |
| 882 buildCounterCommentList++; | 917 buildCounterCommentList++; |
| 883 if (buildCounterCommentList < 3) { | 918 if (buildCounterCommentList < 3) { |
| 884 checkUnnamed709(o.items); | 919 checkUnnamed996(o.items); |
| 885 unittest.expect(o.kind, unittest.equals('foo')); | 920 unittest.expect(o.kind, unittest.equals('foo')); |
| 886 unittest.expect(o.nextLink, unittest.equals('foo')); | 921 unittest.expect(o.nextLink, unittest.equals('foo')); |
| 887 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 922 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
| 888 unittest.expect(o.selfLink, unittest.equals('foo')); | 923 unittest.expect(o.selfLink, unittest.equals('foo')); |
| 889 } | 924 } |
| 890 buildCounterCommentList--; | 925 buildCounterCommentList--; |
| 891 } | 926 } |
| 892 | 927 |
| 893 core.int buildCounterCommentReply = 0; | 928 core.int buildCounterCommentReply = 0; |
| 894 buildCommentReply() { | 929 buildCommentReply() { |
| (...skipping 23 matching lines...) Expand all Loading... |
| 918 unittest.expect(o.deleted, unittest.isTrue); | 953 unittest.expect(o.deleted, unittest.isTrue); |
| 919 unittest.expect(o.htmlContent, unittest.equals('foo')); | 954 unittest.expect(o.htmlContent, unittest.equals('foo')); |
| 920 unittest.expect(o.kind, unittest.equals('foo')); | 955 unittest.expect(o.kind, unittest.equals('foo')); |
| 921 unittest.expect(o.modifiedDate, unittest.equals(core.DateTime.parse("2002-02
-27T14:01:02"))); | 956 unittest.expect(o.modifiedDate, unittest.equals(core.DateTime.parse("2002-02
-27T14:01:02"))); |
| 922 unittest.expect(o.replyId, unittest.equals('foo')); | 957 unittest.expect(o.replyId, unittest.equals('foo')); |
| 923 unittest.expect(o.verb, unittest.equals('foo')); | 958 unittest.expect(o.verb, unittest.equals('foo')); |
| 924 } | 959 } |
| 925 buildCounterCommentReply--; | 960 buildCounterCommentReply--; |
| 926 } | 961 } |
| 927 | 962 |
| 928 buildUnnamed710() { | 963 buildUnnamed997() { |
| 929 var o = new core.List<api.CommentReply>(); | 964 var o = new core.List<api.CommentReply>(); |
| 930 o.add(buildCommentReply()); | 965 o.add(buildCommentReply()); |
| 931 o.add(buildCommentReply()); | 966 o.add(buildCommentReply()); |
| 932 return o; | 967 return o; |
| 933 } | 968 } |
| 934 | 969 |
| 935 checkUnnamed710(core.List<api.CommentReply> o) { | 970 checkUnnamed997(core.List<api.CommentReply> o) { |
| 936 unittest.expect(o, unittest.hasLength(2)); | 971 unittest.expect(o, unittest.hasLength(2)); |
| 937 checkCommentReply(o[0]); | 972 checkCommentReply(o[0]); |
| 938 checkCommentReply(o[1]); | 973 checkCommentReply(o[1]); |
| 939 } | 974 } |
| 940 | 975 |
| 941 core.int buildCounterCommentReplyList = 0; | 976 core.int buildCounterCommentReplyList = 0; |
| 942 buildCommentReplyList() { | 977 buildCommentReplyList() { |
| 943 var o = new api.CommentReplyList(); | 978 var o = new api.CommentReplyList(); |
| 944 buildCounterCommentReplyList++; | 979 buildCounterCommentReplyList++; |
| 945 if (buildCounterCommentReplyList < 3) { | 980 if (buildCounterCommentReplyList < 3) { |
| 946 o.items = buildUnnamed710(); | 981 o.items = buildUnnamed997(); |
| 947 o.kind = "foo"; | 982 o.kind = "foo"; |
| 948 o.nextLink = "foo"; | 983 o.nextLink = "foo"; |
| 949 o.nextPageToken = "foo"; | 984 o.nextPageToken = "foo"; |
| 950 o.selfLink = "foo"; | 985 o.selfLink = "foo"; |
| 951 } | 986 } |
| 952 buildCounterCommentReplyList--; | 987 buildCounterCommentReplyList--; |
| 953 return o; | 988 return o; |
| 954 } | 989 } |
| 955 | 990 |
| 956 checkCommentReplyList(api.CommentReplyList o) { | 991 checkCommentReplyList(api.CommentReplyList o) { |
| 957 buildCounterCommentReplyList++; | 992 buildCounterCommentReplyList++; |
| 958 if (buildCounterCommentReplyList < 3) { | 993 if (buildCounterCommentReplyList < 3) { |
| 959 checkUnnamed710(o.items); | 994 checkUnnamed997(o.items); |
| 960 unittest.expect(o.kind, unittest.equals('foo')); | 995 unittest.expect(o.kind, unittest.equals('foo')); |
| 961 unittest.expect(o.nextLink, unittest.equals('foo')); | 996 unittest.expect(o.nextLink, unittest.equals('foo')); |
| 962 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 997 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
| 963 unittest.expect(o.selfLink, unittest.equals('foo')); | 998 unittest.expect(o.selfLink, unittest.equals('foo')); |
| 964 } | 999 } |
| 965 buildCounterCommentReplyList--; | 1000 buildCounterCommentReplyList--; |
| 966 } | 1001 } |
| 967 | 1002 |
| 968 buildUnnamed711() { | 1003 buildUnnamed998() { |
| 969 var o = new core.Map<core.String, core.String>(); | 1004 var o = new core.Map<core.String, core.String>(); |
| 970 o["x"] = "foo"; | 1005 o["x"] = "foo"; |
| 971 o["y"] = "foo"; | 1006 o["y"] = "foo"; |
| 972 return o; | 1007 return o; |
| 973 } | 1008 } |
| 974 | 1009 |
| 975 checkUnnamed711(core.Map<core.String, core.String> o) { | 1010 checkUnnamed998(core.Map<core.String, core.String> o) { |
| 976 unittest.expect(o, unittest.hasLength(2)); | 1011 unittest.expect(o, unittest.hasLength(2)); |
| 977 unittest.expect(o["x"], unittest.equals('foo')); | 1012 unittest.expect(o["x"], unittest.equals('foo')); |
| 978 unittest.expect(o["y"], unittest.equals('foo')); | 1013 unittest.expect(o["y"], unittest.equals('foo')); |
| 979 } | 1014 } |
| 980 | 1015 |
| 981 core.int buildCounterFileImageMediaMetadataLocation = 0; | 1016 core.int buildCounterFileImageMediaMetadataLocation = 0; |
| 982 buildFileImageMediaMetadataLocation() { | 1017 buildFileImageMediaMetadataLocation() { |
| 983 var o = new api.FileImageMediaMetadataLocation(); | 1018 var o = new api.FileImageMediaMetadataLocation(); |
| 984 buildCounterFileImageMediaMetadataLocation++; | 1019 buildCounterFileImageMediaMetadataLocation++; |
| 985 if (buildCounterFileImageMediaMetadataLocation < 3) { | 1020 if (buildCounterFileImageMediaMetadataLocation < 3) { |
| (...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1099 if (buildCounterFileLabels < 3) { | 1134 if (buildCounterFileLabels < 3) { |
| 1100 unittest.expect(o.hidden, unittest.isTrue); | 1135 unittest.expect(o.hidden, unittest.isTrue); |
| 1101 unittest.expect(o.restricted, unittest.isTrue); | 1136 unittest.expect(o.restricted, unittest.isTrue); |
| 1102 unittest.expect(o.starred, unittest.isTrue); | 1137 unittest.expect(o.starred, unittest.isTrue); |
| 1103 unittest.expect(o.trashed, unittest.isTrue); | 1138 unittest.expect(o.trashed, unittest.isTrue); |
| 1104 unittest.expect(o.viewed, unittest.isTrue); | 1139 unittest.expect(o.viewed, unittest.isTrue); |
| 1105 } | 1140 } |
| 1106 buildCounterFileLabels--; | 1141 buildCounterFileLabels--; |
| 1107 } | 1142 } |
| 1108 | 1143 |
| 1109 buildUnnamed712() { | 1144 buildUnnamed999() { |
| 1110 var o = new core.Map<core.String, core.String>(); | 1145 var o = new core.Map<core.String, core.String>(); |
| 1111 o["x"] = "foo"; | 1146 o["x"] = "foo"; |
| 1112 o["y"] = "foo"; | 1147 o["y"] = "foo"; |
| 1113 return o; | 1148 return o; |
| 1114 } | 1149 } |
| 1115 | 1150 |
| 1116 checkUnnamed712(core.Map<core.String, core.String> o) { | 1151 checkUnnamed999(core.Map<core.String, core.String> o) { |
| 1117 unittest.expect(o, unittest.hasLength(2)); | 1152 unittest.expect(o, unittest.hasLength(2)); |
| 1118 unittest.expect(o["x"], unittest.equals('foo')); | 1153 unittest.expect(o["x"], unittest.equals('foo')); |
| 1119 unittest.expect(o["y"], unittest.equals('foo')); | 1154 unittest.expect(o["y"], unittest.equals('foo')); |
| 1120 } | 1155 } |
| 1121 | 1156 |
| 1122 buildUnnamed713() { | 1157 buildUnnamed1000() { |
| 1123 var o = new core.List<core.String>(); | 1158 var o = new core.List<core.String>(); |
| 1124 o.add("foo"); | 1159 o.add("foo"); |
| 1125 o.add("foo"); | 1160 o.add("foo"); |
| 1126 return o; | 1161 return o; |
| 1127 } | 1162 } |
| 1128 | 1163 |
| 1129 checkUnnamed713(core.List<core.String> o) { | 1164 checkUnnamed1000(core.List<core.String> o) { |
| 1130 unittest.expect(o, unittest.hasLength(2)); | 1165 unittest.expect(o, unittest.hasLength(2)); |
| 1131 unittest.expect(o[0], unittest.equals('foo')); | 1166 unittest.expect(o[0], unittest.equals('foo')); |
| 1132 unittest.expect(o[1], unittest.equals('foo')); | 1167 unittest.expect(o[1], unittest.equals('foo')); |
| 1133 } | 1168 } |
| 1134 | 1169 |
| 1135 buildUnnamed714() { | 1170 buildUnnamed1001() { |
| 1136 var o = new core.List<api.User>(); | 1171 var o = new core.List<api.User>(); |
| 1137 o.add(buildUser()); | 1172 o.add(buildUser()); |
| 1138 o.add(buildUser()); | 1173 o.add(buildUser()); |
| 1139 return o; | 1174 return o; |
| 1140 } | 1175 } |
| 1141 | 1176 |
| 1142 checkUnnamed714(core.List<api.User> o) { | 1177 checkUnnamed1001(core.List<api.User> o) { |
| 1143 unittest.expect(o, unittest.hasLength(2)); | 1178 unittest.expect(o, unittest.hasLength(2)); |
| 1144 checkUser(o[0]); | 1179 checkUser(o[0]); |
| 1145 checkUser(o[1]); | 1180 checkUser(o[1]); |
| 1146 } | 1181 } |
| 1147 | 1182 |
| 1148 buildUnnamed715() { | 1183 buildUnnamed1002() { |
| 1149 var o = new core.List<api.ParentReference>(); | 1184 var o = new core.List<api.ParentReference>(); |
| 1150 o.add(buildParentReference()); | 1185 o.add(buildParentReference()); |
| 1151 o.add(buildParentReference()); | 1186 o.add(buildParentReference()); |
| 1152 return o; | 1187 return o; |
| 1153 } | 1188 } |
| 1154 | 1189 |
| 1155 checkUnnamed715(core.List<api.ParentReference> o) { | 1190 checkUnnamed1002(core.List<api.ParentReference> o) { |
| 1156 unittest.expect(o, unittest.hasLength(2)); | 1191 unittest.expect(o, unittest.hasLength(2)); |
| 1157 checkParentReference(o[0]); | 1192 checkParentReference(o[0]); |
| 1158 checkParentReference(o[1]); | 1193 checkParentReference(o[1]); |
| 1159 } | 1194 } |
| 1160 | 1195 |
| 1161 buildUnnamed716() { | 1196 buildUnnamed1003() { |
| 1162 var o = new core.List<api.Permission>(); | 1197 var o = new core.List<api.Permission>(); |
| 1163 o.add(buildPermission()); | 1198 o.add(buildPermission()); |
| 1164 o.add(buildPermission()); | 1199 o.add(buildPermission()); |
| 1165 return o; | 1200 return o; |
| 1166 } | 1201 } |
| 1167 | 1202 |
| 1168 checkUnnamed716(core.List<api.Permission> o) { | 1203 checkUnnamed1003(core.List<api.Permission> o) { |
| 1169 unittest.expect(o, unittest.hasLength(2)); | 1204 unittest.expect(o, unittest.hasLength(2)); |
| 1170 checkPermission(o[0]); | 1205 checkPermission(o[0]); |
| 1171 checkPermission(o[1]); | 1206 checkPermission(o[1]); |
| 1172 } | 1207 } |
| 1173 | 1208 |
| 1174 buildUnnamed717() { | 1209 buildUnnamed1004() { |
| 1175 var o = new core.List<api.Property>(); | 1210 var o = new core.List<api.Property>(); |
| 1176 o.add(buildProperty()); | 1211 o.add(buildProperty()); |
| 1177 o.add(buildProperty()); | 1212 o.add(buildProperty()); |
| 1178 return o; | 1213 return o; |
| 1179 } | 1214 } |
| 1180 | 1215 |
| 1181 checkUnnamed717(core.List<api.Property> o) { | 1216 checkUnnamed1004(core.List<api.Property> o) { |
| 1182 unittest.expect(o, unittest.hasLength(2)); | 1217 unittest.expect(o, unittest.hasLength(2)); |
| 1183 checkProperty(o[0]); | 1218 checkProperty(o[0]); |
| 1184 checkProperty(o[1]); | 1219 checkProperty(o[1]); |
| 1185 } | 1220 } |
| 1186 | 1221 |
| 1187 core.int buildCounterFileThumbnail = 0; | 1222 core.int buildCounterFileThumbnail = 0; |
| 1188 buildFileThumbnail() { | 1223 buildFileThumbnail() { |
| 1189 var o = new api.FileThumbnail(); | 1224 var o = new api.FileThumbnail(); |
| 1190 buildCounterFileThumbnail++; | 1225 buildCounterFileThumbnail++; |
| 1191 if (buildCounterFileThumbnail < 3) { | 1226 if (buildCounterFileThumbnail < 3) { |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1237 o.appDataContents = true; | 1272 o.appDataContents = true; |
| 1238 o.copyable = true; | 1273 o.copyable = true; |
| 1239 o.createdDate = core.DateTime.parse("2002-02-27T14:01:02"); | 1274 o.createdDate = core.DateTime.parse("2002-02-27T14:01:02"); |
| 1240 o.defaultOpenWithLink = "foo"; | 1275 o.defaultOpenWithLink = "foo"; |
| 1241 o.description = "foo"; | 1276 o.description = "foo"; |
| 1242 o.downloadUrl = "foo"; | 1277 o.downloadUrl = "foo"; |
| 1243 o.editable = true; | 1278 o.editable = true; |
| 1244 o.embedLink = "foo"; | 1279 o.embedLink = "foo"; |
| 1245 o.etag = "foo"; | 1280 o.etag = "foo"; |
| 1246 o.explicitlyTrashed = true; | 1281 o.explicitlyTrashed = true; |
| 1247 o.exportLinks = buildUnnamed711(); | 1282 o.exportLinks = buildUnnamed998(); |
| 1248 o.fileExtension = "foo"; | 1283 o.fileExtension = "foo"; |
| 1249 o.fileSize = "foo"; | 1284 o.fileSize = "foo"; |
| 1250 o.folderColorRgb = "foo"; | 1285 o.folderColorRgb = "foo"; |
| 1251 o.headRevisionId = "foo"; | 1286 o.headRevisionId = "foo"; |
| 1252 o.iconLink = "foo"; | 1287 o.iconLink = "foo"; |
| 1253 o.id = "foo"; | 1288 o.id = "foo"; |
| 1254 o.imageMediaMetadata = buildFileImageMediaMetadata(); | 1289 o.imageMediaMetadata = buildFileImageMediaMetadata(); |
| 1255 o.indexableText = buildFileIndexableText(); | 1290 o.indexableText = buildFileIndexableText(); |
| 1256 o.kind = "foo"; | 1291 o.kind = "foo"; |
| 1257 o.labels = buildFileLabels(); | 1292 o.labels = buildFileLabels(); |
| 1258 o.lastModifyingUser = buildUser(); | 1293 o.lastModifyingUser = buildUser(); |
| 1259 o.lastModifyingUserName = "foo"; | 1294 o.lastModifyingUserName = "foo"; |
| 1260 o.lastViewedByMeDate = core.DateTime.parse("2002-02-27T14:01:02"); | 1295 o.lastViewedByMeDate = core.DateTime.parse("2002-02-27T14:01:02"); |
| 1261 o.markedViewedByMeDate = core.DateTime.parse("2002-02-27T14:01:02"); | 1296 o.markedViewedByMeDate = core.DateTime.parse("2002-02-27T14:01:02"); |
| 1262 o.md5Checksum = "foo"; | 1297 o.md5Checksum = "foo"; |
| 1263 o.mimeType = "foo"; | 1298 o.mimeType = "foo"; |
| 1264 o.modifiedByMeDate = core.DateTime.parse("2002-02-27T14:01:02"); | 1299 o.modifiedByMeDate = core.DateTime.parse("2002-02-27T14:01:02"); |
| 1265 o.modifiedDate = core.DateTime.parse("2002-02-27T14:01:02"); | 1300 o.modifiedDate = core.DateTime.parse("2002-02-27T14:01:02"); |
| 1266 o.openWithLinks = buildUnnamed712(); | 1301 o.openWithLinks = buildUnnamed999(); |
| 1267 o.originalFilename = "foo"; | 1302 o.originalFilename = "foo"; |
| 1268 o.ownerNames = buildUnnamed713(); | 1303 o.ownerNames = buildUnnamed1000(); |
| 1269 o.owners = buildUnnamed714(); | 1304 o.owners = buildUnnamed1001(); |
| 1270 o.parents = buildUnnamed715(); | 1305 o.parents = buildUnnamed1002(); |
| 1271 o.permissions = buildUnnamed716(); | 1306 o.permissions = buildUnnamed1003(); |
| 1272 o.properties = buildUnnamed717(); | 1307 o.properties = buildUnnamed1004(); |
| 1273 o.quotaBytesUsed = "foo"; | 1308 o.quotaBytesUsed = "foo"; |
| 1274 o.selfLink = "foo"; | 1309 o.selfLink = "foo"; |
| 1275 o.shared = true; | 1310 o.shared = true; |
| 1276 o.sharedWithMeDate = core.DateTime.parse("2002-02-27T14:01:02"); | 1311 o.sharedWithMeDate = core.DateTime.parse("2002-02-27T14:01:02"); |
| 1277 o.sharingUser = buildUser(); | 1312 o.sharingUser = buildUser(); |
| 1278 o.thumbnail = buildFileThumbnail(); | 1313 o.thumbnail = buildFileThumbnail(); |
| 1279 o.thumbnailLink = "foo"; | 1314 o.thumbnailLink = "foo"; |
| 1280 o.title = "foo"; | 1315 o.title = "foo"; |
| 1281 o.userPermission = buildPermission(); | 1316 o.userPermission = buildPermission(); |
| 1282 o.version = "foo"; | 1317 o.version = "foo"; |
| (...skipping 13 matching lines...) Expand all Loading... |
| 1296 unittest.expect(o.appDataContents, unittest.isTrue); | 1331 unittest.expect(o.appDataContents, unittest.isTrue); |
| 1297 unittest.expect(o.copyable, unittest.isTrue); | 1332 unittest.expect(o.copyable, unittest.isTrue); |
| 1298 unittest.expect(o.createdDate, unittest.equals(core.DateTime.parse("2002-02-
27T14:01:02"))); | 1333 unittest.expect(o.createdDate, unittest.equals(core.DateTime.parse("2002-02-
27T14:01:02"))); |
| 1299 unittest.expect(o.defaultOpenWithLink, unittest.equals('foo')); | 1334 unittest.expect(o.defaultOpenWithLink, unittest.equals('foo')); |
| 1300 unittest.expect(o.description, unittest.equals('foo')); | 1335 unittest.expect(o.description, unittest.equals('foo')); |
| 1301 unittest.expect(o.downloadUrl, unittest.equals('foo')); | 1336 unittest.expect(o.downloadUrl, unittest.equals('foo')); |
| 1302 unittest.expect(o.editable, unittest.isTrue); | 1337 unittest.expect(o.editable, unittest.isTrue); |
| 1303 unittest.expect(o.embedLink, unittest.equals('foo')); | 1338 unittest.expect(o.embedLink, unittest.equals('foo')); |
| 1304 unittest.expect(o.etag, unittest.equals('foo')); | 1339 unittest.expect(o.etag, unittest.equals('foo')); |
| 1305 unittest.expect(o.explicitlyTrashed, unittest.isTrue); | 1340 unittest.expect(o.explicitlyTrashed, unittest.isTrue); |
| 1306 checkUnnamed711(o.exportLinks); | 1341 checkUnnamed998(o.exportLinks); |
| 1307 unittest.expect(o.fileExtension, unittest.equals('foo')); | 1342 unittest.expect(o.fileExtension, unittest.equals('foo')); |
| 1308 unittest.expect(o.fileSize, unittest.equals('foo')); | 1343 unittest.expect(o.fileSize, unittest.equals('foo')); |
| 1309 unittest.expect(o.folderColorRgb, unittest.equals('foo')); | 1344 unittest.expect(o.folderColorRgb, unittest.equals('foo')); |
| 1310 unittest.expect(o.headRevisionId, unittest.equals('foo')); | 1345 unittest.expect(o.headRevisionId, unittest.equals('foo')); |
| 1311 unittest.expect(o.iconLink, unittest.equals('foo')); | 1346 unittest.expect(o.iconLink, unittest.equals('foo')); |
| 1312 unittest.expect(o.id, unittest.equals('foo')); | 1347 unittest.expect(o.id, unittest.equals('foo')); |
| 1313 checkFileImageMediaMetadata(o.imageMediaMetadata); | 1348 checkFileImageMediaMetadata(o.imageMediaMetadata); |
| 1314 checkFileIndexableText(o.indexableText); | 1349 checkFileIndexableText(o.indexableText); |
| 1315 unittest.expect(o.kind, unittest.equals('foo')); | 1350 unittest.expect(o.kind, unittest.equals('foo')); |
| 1316 checkFileLabels(o.labels); | 1351 checkFileLabels(o.labels); |
| 1317 checkUser(o.lastModifyingUser); | 1352 checkUser(o.lastModifyingUser); |
| 1318 unittest.expect(o.lastModifyingUserName, unittest.equals('foo')); | 1353 unittest.expect(o.lastModifyingUserName, unittest.equals('foo')); |
| 1319 unittest.expect(o.lastViewedByMeDate, unittest.equals(core.DateTime.parse("2
002-02-27T14:01:02"))); | 1354 unittest.expect(o.lastViewedByMeDate, unittest.equals(core.DateTime.parse("2
002-02-27T14:01:02"))); |
| 1320 unittest.expect(o.markedViewedByMeDate, unittest.equals(core.DateTime.parse(
"2002-02-27T14:01:02"))); | 1355 unittest.expect(o.markedViewedByMeDate, unittest.equals(core.DateTime.parse(
"2002-02-27T14:01:02"))); |
| 1321 unittest.expect(o.md5Checksum, unittest.equals('foo')); | 1356 unittest.expect(o.md5Checksum, unittest.equals('foo')); |
| 1322 unittest.expect(o.mimeType, unittest.equals('foo')); | 1357 unittest.expect(o.mimeType, unittest.equals('foo')); |
| 1323 unittest.expect(o.modifiedByMeDate, unittest.equals(core.DateTime.parse("200
2-02-27T14:01:02"))); | 1358 unittest.expect(o.modifiedByMeDate, unittest.equals(core.DateTime.parse("200
2-02-27T14:01:02"))); |
| 1324 unittest.expect(o.modifiedDate, unittest.equals(core.DateTime.parse("2002-02
-27T14:01:02"))); | 1359 unittest.expect(o.modifiedDate, unittest.equals(core.DateTime.parse("2002-02
-27T14:01:02"))); |
| 1325 checkUnnamed712(o.openWithLinks); | 1360 checkUnnamed999(o.openWithLinks); |
| 1326 unittest.expect(o.originalFilename, unittest.equals('foo')); | 1361 unittest.expect(o.originalFilename, unittest.equals('foo')); |
| 1327 checkUnnamed713(o.ownerNames); | 1362 checkUnnamed1000(o.ownerNames); |
| 1328 checkUnnamed714(o.owners); | 1363 checkUnnamed1001(o.owners); |
| 1329 checkUnnamed715(o.parents); | 1364 checkUnnamed1002(o.parents); |
| 1330 checkUnnamed716(o.permissions); | 1365 checkUnnamed1003(o.permissions); |
| 1331 checkUnnamed717(o.properties); | 1366 checkUnnamed1004(o.properties); |
| 1332 unittest.expect(o.quotaBytesUsed, unittest.equals('foo')); | 1367 unittest.expect(o.quotaBytesUsed, unittest.equals('foo')); |
| 1333 unittest.expect(o.selfLink, unittest.equals('foo')); | 1368 unittest.expect(o.selfLink, unittest.equals('foo')); |
| 1334 unittest.expect(o.shared, unittest.isTrue); | 1369 unittest.expect(o.shared, unittest.isTrue); |
| 1335 unittest.expect(o.sharedWithMeDate, unittest.equals(core.DateTime.parse("200
2-02-27T14:01:02"))); | 1370 unittest.expect(o.sharedWithMeDate, unittest.equals(core.DateTime.parse("200
2-02-27T14:01:02"))); |
| 1336 checkUser(o.sharingUser); | 1371 checkUser(o.sharingUser); |
| 1337 checkFileThumbnail(o.thumbnail); | 1372 checkFileThumbnail(o.thumbnail); |
| 1338 unittest.expect(o.thumbnailLink, unittest.equals('foo')); | 1373 unittest.expect(o.thumbnailLink, unittest.equals('foo')); |
| 1339 unittest.expect(o.title, unittest.equals('foo')); | 1374 unittest.expect(o.title, unittest.equals('foo')); |
| 1340 checkPermission(o.userPermission); | 1375 checkPermission(o.userPermission); |
| 1341 unittest.expect(o.version, unittest.equals('foo')); | 1376 unittest.expect(o.version, unittest.equals('foo')); |
| 1342 checkFileVideoMediaMetadata(o.videoMediaMetadata); | 1377 checkFileVideoMediaMetadata(o.videoMediaMetadata); |
| 1343 unittest.expect(o.webContentLink, unittest.equals('foo')); | 1378 unittest.expect(o.webContentLink, unittest.equals('foo')); |
| 1344 unittest.expect(o.webViewLink, unittest.equals('foo')); | 1379 unittest.expect(o.webViewLink, unittest.equals('foo')); |
| 1345 unittest.expect(o.writersCanShare, unittest.isTrue); | 1380 unittest.expect(o.writersCanShare, unittest.isTrue); |
| 1346 } | 1381 } |
| 1347 buildCounterFile--; | 1382 buildCounterFile--; |
| 1348 } | 1383 } |
| 1349 | 1384 |
| 1350 buildUnnamed718() { | 1385 buildUnnamed1005() { |
| 1351 var o = new core.List<api.File>(); | 1386 var o = new core.List<api.File>(); |
| 1352 o.add(buildFile()); | 1387 o.add(buildFile()); |
| 1353 o.add(buildFile()); | 1388 o.add(buildFile()); |
| 1354 return o; | 1389 return o; |
| 1355 } | 1390 } |
| 1356 | 1391 |
| 1357 checkUnnamed718(core.List<api.File> o) { | 1392 checkUnnamed1005(core.List<api.File> o) { |
| 1358 unittest.expect(o, unittest.hasLength(2)); | 1393 unittest.expect(o, unittest.hasLength(2)); |
| 1359 checkFile(o[0]); | 1394 checkFile(o[0]); |
| 1360 checkFile(o[1]); | 1395 checkFile(o[1]); |
| 1361 } | 1396 } |
| 1362 | 1397 |
| 1363 core.int buildCounterFileList = 0; | 1398 core.int buildCounterFileList = 0; |
| 1364 buildFileList() { | 1399 buildFileList() { |
| 1365 var o = new api.FileList(); | 1400 var o = new api.FileList(); |
| 1366 buildCounterFileList++; | 1401 buildCounterFileList++; |
| 1367 if (buildCounterFileList < 3) { | 1402 if (buildCounterFileList < 3) { |
| 1368 o.etag = "foo"; | 1403 o.etag = "foo"; |
| 1369 o.items = buildUnnamed718(); | 1404 o.items = buildUnnamed1005(); |
| 1370 o.kind = "foo"; | 1405 o.kind = "foo"; |
| 1371 o.nextLink = "foo"; | 1406 o.nextLink = "foo"; |
| 1372 o.nextPageToken = "foo"; | 1407 o.nextPageToken = "foo"; |
| 1373 o.selfLink = "foo"; | 1408 o.selfLink = "foo"; |
| 1374 } | 1409 } |
| 1375 buildCounterFileList--; | 1410 buildCounterFileList--; |
| 1376 return o; | 1411 return o; |
| 1377 } | 1412 } |
| 1378 | 1413 |
| 1379 checkFileList(api.FileList o) { | 1414 checkFileList(api.FileList o) { |
| 1380 buildCounterFileList++; | 1415 buildCounterFileList++; |
| 1381 if (buildCounterFileList < 3) { | 1416 if (buildCounterFileList < 3) { |
| 1382 unittest.expect(o.etag, unittest.equals('foo')); | 1417 unittest.expect(o.etag, unittest.equals('foo')); |
| 1383 checkUnnamed718(o.items); | 1418 checkUnnamed1005(o.items); |
| 1384 unittest.expect(o.kind, unittest.equals('foo')); | 1419 unittest.expect(o.kind, unittest.equals('foo')); |
| 1385 unittest.expect(o.nextLink, unittest.equals('foo')); | 1420 unittest.expect(o.nextLink, unittest.equals('foo')); |
| 1386 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 1421 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
| 1387 unittest.expect(o.selfLink, unittest.equals('foo')); | 1422 unittest.expect(o.selfLink, unittest.equals('foo')); |
| 1388 } | 1423 } |
| 1389 buildCounterFileList--; | 1424 buildCounterFileList--; |
| 1390 } | 1425 } |
| 1391 | 1426 |
| 1392 buildUnnamed719() { | 1427 buildUnnamed1006() { |
| 1393 var o = new core.List<api.ParentReference>(); | 1428 var o = new core.List<api.ParentReference>(); |
| 1394 o.add(buildParentReference()); | 1429 o.add(buildParentReference()); |
| 1395 o.add(buildParentReference()); | 1430 o.add(buildParentReference()); |
| 1396 return o; | 1431 return o; |
| 1397 } | 1432 } |
| 1398 | 1433 |
| 1399 checkUnnamed719(core.List<api.ParentReference> o) { | 1434 checkUnnamed1006(core.List<api.ParentReference> o) { |
| 1400 unittest.expect(o, unittest.hasLength(2)); | 1435 unittest.expect(o, unittest.hasLength(2)); |
| 1401 checkParentReference(o[0]); | 1436 checkParentReference(o[0]); |
| 1402 checkParentReference(o[1]); | 1437 checkParentReference(o[1]); |
| 1403 } | 1438 } |
| 1404 | 1439 |
| 1405 core.int buildCounterParentList = 0; | 1440 core.int buildCounterParentList = 0; |
| 1406 buildParentList() { | 1441 buildParentList() { |
| 1407 var o = new api.ParentList(); | 1442 var o = new api.ParentList(); |
| 1408 buildCounterParentList++; | 1443 buildCounterParentList++; |
| 1409 if (buildCounterParentList < 3) { | 1444 if (buildCounterParentList < 3) { |
| 1410 o.etag = "foo"; | 1445 o.etag = "foo"; |
| 1411 o.items = buildUnnamed719(); | 1446 o.items = buildUnnamed1006(); |
| 1412 o.kind = "foo"; | 1447 o.kind = "foo"; |
| 1413 o.selfLink = "foo"; | 1448 o.selfLink = "foo"; |
| 1414 } | 1449 } |
| 1415 buildCounterParentList--; | 1450 buildCounterParentList--; |
| 1416 return o; | 1451 return o; |
| 1417 } | 1452 } |
| 1418 | 1453 |
| 1419 checkParentList(api.ParentList o) { | 1454 checkParentList(api.ParentList o) { |
| 1420 buildCounterParentList++; | 1455 buildCounterParentList++; |
| 1421 if (buildCounterParentList < 3) { | 1456 if (buildCounterParentList < 3) { |
| 1422 unittest.expect(o.etag, unittest.equals('foo')); | 1457 unittest.expect(o.etag, unittest.equals('foo')); |
| 1423 checkUnnamed719(o.items); | 1458 checkUnnamed1006(o.items); |
| 1424 unittest.expect(o.kind, unittest.equals('foo')); | 1459 unittest.expect(o.kind, unittest.equals('foo')); |
| 1425 unittest.expect(o.selfLink, unittest.equals('foo')); | 1460 unittest.expect(o.selfLink, unittest.equals('foo')); |
| 1426 } | 1461 } |
| 1427 buildCounterParentList--; | 1462 buildCounterParentList--; |
| 1428 } | 1463 } |
| 1429 | 1464 |
| 1430 core.int buildCounterParentReference = 0; | 1465 core.int buildCounterParentReference = 0; |
| 1431 buildParentReference() { | 1466 buildParentReference() { |
| 1432 var o = new api.ParentReference(); | 1467 var o = new api.ParentReference(); |
| 1433 buildCounterParentReference++; | 1468 buildCounterParentReference++; |
| (...skipping 13 matching lines...) Expand all Loading... |
| 1447 if (buildCounterParentReference < 3) { | 1482 if (buildCounterParentReference < 3) { |
| 1448 unittest.expect(o.id, unittest.equals('foo')); | 1483 unittest.expect(o.id, unittest.equals('foo')); |
| 1449 unittest.expect(o.isRoot, unittest.isTrue); | 1484 unittest.expect(o.isRoot, unittest.isTrue); |
| 1450 unittest.expect(o.kind, unittest.equals('foo')); | 1485 unittest.expect(o.kind, unittest.equals('foo')); |
| 1451 unittest.expect(o.parentLink, unittest.equals('foo')); | 1486 unittest.expect(o.parentLink, unittest.equals('foo')); |
| 1452 unittest.expect(o.selfLink, unittest.equals('foo')); | 1487 unittest.expect(o.selfLink, unittest.equals('foo')); |
| 1453 } | 1488 } |
| 1454 buildCounterParentReference--; | 1489 buildCounterParentReference--; |
| 1455 } | 1490 } |
| 1456 | 1491 |
| 1457 buildUnnamed720() { | 1492 buildUnnamed1007() { |
| 1458 var o = new core.List<core.String>(); | 1493 var o = new core.List<core.String>(); |
| 1459 o.add("foo"); | 1494 o.add("foo"); |
| 1460 o.add("foo"); | 1495 o.add("foo"); |
| 1461 return o; | 1496 return o; |
| 1462 } | 1497 } |
| 1463 | 1498 |
| 1464 checkUnnamed720(core.List<core.String> o) { | 1499 checkUnnamed1007(core.List<core.String> o) { |
| 1465 unittest.expect(o, unittest.hasLength(2)); | 1500 unittest.expect(o, unittest.hasLength(2)); |
| 1466 unittest.expect(o[0], unittest.equals('foo')); | 1501 unittest.expect(o[0], unittest.equals('foo')); |
| 1467 unittest.expect(o[1], unittest.equals('foo')); | 1502 unittest.expect(o[1], unittest.equals('foo')); |
| 1468 } | 1503 } |
| 1469 | 1504 |
| 1470 core.int buildCounterPermission = 0; | 1505 core.int buildCounterPermission = 0; |
| 1471 buildPermission() { | 1506 buildPermission() { |
| 1472 var o = new api.Permission(); | 1507 var o = new api.Permission(); |
| 1473 buildCounterPermission++; | 1508 buildCounterPermission++; |
| 1474 if (buildCounterPermission < 3) { | 1509 if (buildCounterPermission < 3) { |
| 1475 o.additionalRoles = buildUnnamed720(); | 1510 o.additionalRoles = buildUnnamed1007(); |
| 1476 o.authKey = "foo"; | 1511 o.authKey = "foo"; |
| 1477 o.domain = "foo"; | 1512 o.domain = "foo"; |
| 1478 o.emailAddress = "foo"; | 1513 o.emailAddress = "foo"; |
| 1479 o.etag = "foo"; | 1514 o.etag = "foo"; |
| 1480 o.id = "foo"; | 1515 o.id = "foo"; |
| 1481 o.kind = "foo"; | 1516 o.kind = "foo"; |
| 1482 o.name = "foo"; | 1517 o.name = "foo"; |
| 1483 o.photoLink = "foo"; | 1518 o.photoLink = "foo"; |
| 1484 o.role = "foo"; | 1519 o.role = "foo"; |
| 1485 o.selfLink = "foo"; | 1520 o.selfLink = "foo"; |
| 1486 o.type = "foo"; | 1521 o.type = "foo"; |
| 1487 o.value = "foo"; | 1522 o.value = "foo"; |
| 1488 o.withLink = true; | 1523 o.withLink = true; |
| 1489 } | 1524 } |
| 1490 buildCounterPermission--; | 1525 buildCounterPermission--; |
| 1491 return o; | 1526 return o; |
| 1492 } | 1527 } |
| 1493 | 1528 |
| 1494 checkPermission(api.Permission o) { | 1529 checkPermission(api.Permission o) { |
| 1495 buildCounterPermission++; | 1530 buildCounterPermission++; |
| 1496 if (buildCounterPermission < 3) { | 1531 if (buildCounterPermission < 3) { |
| 1497 checkUnnamed720(o.additionalRoles); | 1532 checkUnnamed1007(o.additionalRoles); |
| 1498 unittest.expect(o.authKey, unittest.equals('foo')); | 1533 unittest.expect(o.authKey, unittest.equals('foo')); |
| 1499 unittest.expect(o.domain, unittest.equals('foo')); | 1534 unittest.expect(o.domain, unittest.equals('foo')); |
| 1500 unittest.expect(o.emailAddress, unittest.equals('foo')); | 1535 unittest.expect(o.emailAddress, unittest.equals('foo')); |
| 1501 unittest.expect(o.etag, unittest.equals('foo')); | 1536 unittest.expect(o.etag, unittest.equals('foo')); |
| 1502 unittest.expect(o.id, unittest.equals('foo')); | 1537 unittest.expect(o.id, unittest.equals('foo')); |
| 1503 unittest.expect(o.kind, unittest.equals('foo')); | 1538 unittest.expect(o.kind, unittest.equals('foo')); |
| 1504 unittest.expect(o.name, unittest.equals('foo')); | 1539 unittest.expect(o.name, unittest.equals('foo')); |
| 1505 unittest.expect(o.photoLink, unittest.equals('foo')); | 1540 unittest.expect(o.photoLink, unittest.equals('foo')); |
| 1506 unittest.expect(o.role, unittest.equals('foo')); | 1541 unittest.expect(o.role, unittest.equals('foo')); |
| 1507 unittest.expect(o.selfLink, unittest.equals('foo')); | 1542 unittest.expect(o.selfLink, unittest.equals('foo')); |
| (...skipping 18 matching lines...) Expand all Loading... |
| 1526 | 1561 |
| 1527 checkPermissionId(api.PermissionId o) { | 1562 checkPermissionId(api.PermissionId o) { |
| 1528 buildCounterPermissionId++; | 1563 buildCounterPermissionId++; |
| 1529 if (buildCounterPermissionId < 3) { | 1564 if (buildCounterPermissionId < 3) { |
| 1530 unittest.expect(o.id, unittest.equals('foo')); | 1565 unittest.expect(o.id, unittest.equals('foo')); |
| 1531 unittest.expect(o.kind, unittest.equals('foo')); | 1566 unittest.expect(o.kind, unittest.equals('foo')); |
| 1532 } | 1567 } |
| 1533 buildCounterPermissionId--; | 1568 buildCounterPermissionId--; |
| 1534 } | 1569 } |
| 1535 | 1570 |
| 1536 buildUnnamed721() { | 1571 buildUnnamed1008() { |
| 1537 var o = new core.List<api.Permission>(); | 1572 var o = new core.List<api.Permission>(); |
| 1538 o.add(buildPermission()); | 1573 o.add(buildPermission()); |
| 1539 o.add(buildPermission()); | 1574 o.add(buildPermission()); |
| 1540 return o; | 1575 return o; |
| 1541 } | 1576 } |
| 1542 | 1577 |
| 1543 checkUnnamed721(core.List<api.Permission> o) { | 1578 checkUnnamed1008(core.List<api.Permission> o) { |
| 1544 unittest.expect(o, unittest.hasLength(2)); | 1579 unittest.expect(o, unittest.hasLength(2)); |
| 1545 checkPermission(o[0]); | 1580 checkPermission(o[0]); |
| 1546 checkPermission(o[1]); | 1581 checkPermission(o[1]); |
| 1547 } | 1582 } |
| 1548 | 1583 |
| 1549 core.int buildCounterPermissionList = 0; | 1584 core.int buildCounterPermissionList = 0; |
| 1550 buildPermissionList() { | 1585 buildPermissionList() { |
| 1551 var o = new api.PermissionList(); | 1586 var o = new api.PermissionList(); |
| 1552 buildCounterPermissionList++; | 1587 buildCounterPermissionList++; |
| 1553 if (buildCounterPermissionList < 3) { | 1588 if (buildCounterPermissionList < 3) { |
| 1554 o.etag = "foo"; | 1589 o.etag = "foo"; |
| 1555 o.items = buildUnnamed721(); | 1590 o.items = buildUnnamed1008(); |
| 1556 o.kind = "foo"; | 1591 o.kind = "foo"; |
| 1557 o.selfLink = "foo"; | 1592 o.selfLink = "foo"; |
| 1558 } | 1593 } |
| 1559 buildCounterPermissionList--; | 1594 buildCounterPermissionList--; |
| 1560 return o; | 1595 return o; |
| 1561 } | 1596 } |
| 1562 | 1597 |
| 1563 checkPermissionList(api.PermissionList o) { | 1598 checkPermissionList(api.PermissionList o) { |
| 1564 buildCounterPermissionList++; | 1599 buildCounterPermissionList++; |
| 1565 if (buildCounterPermissionList < 3) { | 1600 if (buildCounterPermissionList < 3) { |
| 1566 unittest.expect(o.etag, unittest.equals('foo')); | 1601 unittest.expect(o.etag, unittest.equals('foo')); |
| 1567 checkUnnamed721(o.items); | 1602 checkUnnamed1008(o.items); |
| 1568 unittest.expect(o.kind, unittest.equals('foo')); | 1603 unittest.expect(o.kind, unittest.equals('foo')); |
| 1569 unittest.expect(o.selfLink, unittest.equals('foo')); | 1604 unittest.expect(o.selfLink, unittest.equals('foo')); |
| 1570 } | 1605 } |
| 1571 buildCounterPermissionList--; | 1606 buildCounterPermissionList--; |
| 1572 } | 1607 } |
| 1573 | 1608 |
| 1574 core.int buildCounterProperty = 0; | 1609 core.int buildCounterProperty = 0; |
| 1575 buildProperty() { | 1610 buildProperty() { |
| 1576 var o = new api.Property(); | 1611 var o = new api.Property(); |
| 1577 buildCounterProperty++; | 1612 buildCounterProperty++; |
| (...skipping 15 matching lines...) Expand all Loading... |
| 1593 unittest.expect(o.etag, unittest.equals('foo')); | 1628 unittest.expect(o.etag, unittest.equals('foo')); |
| 1594 unittest.expect(o.key, unittest.equals('foo')); | 1629 unittest.expect(o.key, unittest.equals('foo')); |
| 1595 unittest.expect(o.kind, unittest.equals('foo')); | 1630 unittest.expect(o.kind, unittest.equals('foo')); |
| 1596 unittest.expect(o.selfLink, unittest.equals('foo')); | 1631 unittest.expect(o.selfLink, unittest.equals('foo')); |
| 1597 unittest.expect(o.value, unittest.equals('foo')); | 1632 unittest.expect(o.value, unittest.equals('foo')); |
| 1598 unittest.expect(o.visibility, unittest.equals('foo')); | 1633 unittest.expect(o.visibility, unittest.equals('foo')); |
| 1599 } | 1634 } |
| 1600 buildCounterProperty--; | 1635 buildCounterProperty--; |
| 1601 } | 1636 } |
| 1602 | 1637 |
| 1603 buildUnnamed722() { | 1638 buildUnnamed1009() { |
| 1604 var o = new core.List<api.Property>(); | 1639 var o = new core.List<api.Property>(); |
| 1605 o.add(buildProperty()); | 1640 o.add(buildProperty()); |
| 1606 o.add(buildProperty()); | 1641 o.add(buildProperty()); |
| 1607 return o; | 1642 return o; |
| 1608 } | 1643 } |
| 1609 | 1644 |
| 1610 checkUnnamed722(core.List<api.Property> o) { | 1645 checkUnnamed1009(core.List<api.Property> o) { |
| 1611 unittest.expect(o, unittest.hasLength(2)); | 1646 unittest.expect(o, unittest.hasLength(2)); |
| 1612 checkProperty(o[0]); | 1647 checkProperty(o[0]); |
| 1613 checkProperty(o[1]); | 1648 checkProperty(o[1]); |
| 1614 } | 1649 } |
| 1615 | 1650 |
| 1616 core.int buildCounterPropertyList = 0; | 1651 core.int buildCounterPropertyList = 0; |
| 1617 buildPropertyList() { | 1652 buildPropertyList() { |
| 1618 var o = new api.PropertyList(); | 1653 var o = new api.PropertyList(); |
| 1619 buildCounterPropertyList++; | 1654 buildCounterPropertyList++; |
| 1620 if (buildCounterPropertyList < 3) { | 1655 if (buildCounterPropertyList < 3) { |
| 1621 o.etag = "foo"; | 1656 o.etag = "foo"; |
| 1622 o.items = buildUnnamed722(); | 1657 o.items = buildUnnamed1009(); |
| 1623 o.kind = "foo"; | 1658 o.kind = "foo"; |
| 1624 o.selfLink = "foo"; | 1659 o.selfLink = "foo"; |
| 1625 } | 1660 } |
| 1626 buildCounterPropertyList--; | 1661 buildCounterPropertyList--; |
| 1627 return o; | 1662 return o; |
| 1628 } | 1663 } |
| 1629 | 1664 |
| 1630 checkPropertyList(api.PropertyList o) { | 1665 checkPropertyList(api.PropertyList o) { |
| 1631 buildCounterPropertyList++; | 1666 buildCounterPropertyList++; |
| 1632 if (buildCounterPropertyList < 3) { | 1667 if (buildCounterPropertyList < 3) { |
| 1633 unittest.expect(o.etag, unittest.equals('foo')); | 1668 unittest.expect(o.etag, unittest.equals('foo')); |
| 1634 checkUnnamed722(o.items); | 1669 checkUnnamed1009(o.items); |
| 1635 unittest.expect(o.kind, unittest.equals('foo')); | 1670 unittest.expect(o.kind, unittest.equals('foo')); |
| 1636 unittest.expect(o.selfLink, unittest.equals('foo')); | 1671 unittest.expect(o.selfLink, unittest.equals('foo')); |
| 1637 } | 1672 } |
| 1638 buildCounterPropertyList--; | 1673 buildCounterPropertyList--; |
| 1639 } | 1674 } |
| 1640 | 1675 |
| 1641 buildUnnamed723() { | 1676 buildUnnamed1010() { |
| 1642 var o = new core.Map<core.String, core.String>(); | 1677 var o = new core.Map<core.String, core.String>(); |
| 1643 o["x"] = "foo"; | 1678 o["x"] = "foo"; |
| 1644 o["y"] = "foo"; | 1679 o["y"] = "foo"; |
| 1645 return o; | 1680 return o; |
| 1646 } | 1681 } |
| 1647 | 1682 |
| 1648 checkUnnamed723(core.Map<core.String, core.String> o) { | 1683 checkUnnamed1010(core.Map<core.String, core.String> o) { |
| 1649 unittest.expect(o, unittest.hasLength(2)); | 1684 unittest.expect(o, unittest.hasLength(2)); |
| 1650 unittest.expect(o["x"], unittest.equals('foo')); | 1685 unittest.expect(o["x"], unittest.equals('foo')); |
| 1651 unittest.expect(o["y"], unittest.equals('foo')); | 1686 unittest.expect(o["y"], unittest.equals('foo')); |
| 1652 } | 1687 } |
| 1653 | 1688 |
| 1654 core.int buildCounterRevision = 0; | 1689 core.int buildCounterRevision = 0; |
| 1655 buildRevision() { | 1690 buildRevision() { |
| 1656 var o = new api.Revision(); | 1691 var o = new api.Revision(); |
| 1657 buildCounterRevision++; | 1692 buildCounterRevision++; |
| 1658 if (buildCounterRevision < 3) { | 1693 if (buildCounterRevision < 3) { |
| 1659 o.downloadUrl = "foo"; | 1694 o.downloadUrl = "foo"; |
| 1660 o.etag = "foo"; | 1695 o.etag = "foo"; |
| 1661 o.exportLinks = buildUnnamed723(); | 1696 o.exportLinks = buildUnnamed1010(); |
| 1662 o.fileSize = "foo"; | 1697 o.fileSize = "foo"; |
| 1663 o.id = "foo"; | 1698 o.id = "foo"; |
| 1664 o.kind = "foo"; | 1699 o.kind = "foo"; |
| 1665 o.lastModifyingUser = buildUser(); | 1700 o.lastModifyingUser = buildUser(); |
| 1666 o.lastModifyingUserName = "foo"; | 1701 o.lastModifyingUserName = "foo"; |
| 1667 o.md5Checksum = "foo"; | 1702 o.md5Checksum = "foo"; |
| 1668 o.mimeType = "foo"; | 1703 o.mimeType = "foo"; |
| 1669 o.modifiedDate = core.DateTime.parse("2002-02-27T14:01:02"); | 1704 o.modifiedDate = core.DateTime.parse("2002-02-27T14:01:02"); |
| 1670 o.originalFilename = "foo"; | 1705 o.originalFilename = "foo"; |
| 1671 o.pinned = true; | 1706 o.pinned = true; |
| 1672 o.publishAuto = true; | 1707 o.publishAuto = true; |
| 1673 o.published = true; | 1708 o.published = true; |
| 1674 o.publishedLink = "foo"; | 1709 o.publishedLink = "foo"; |
| 1675 o.publishedOutsideDomain = true; | 1710 o.publishedOutsideDomain = true; |
| 1676 o.selfLink = "foo"; | 1711 o.selfLink = "foo"; |
| 1677 } | 1712 } |
| 1678 buildCounterRevision--; | 1713 buildCounterRevision--; |
| 1679 return o; | 1714 return o; |
| 1680 } | 1715 } |
| 1681 | 1716 |
| 1682 checkRevision(api.Revision o) { | 1717 checkRevision(api.Revision o) { |
| 1683 buildCounterRevision++; | 1718 buildCounterRevision++; |
| 1684 if (buildCounterRevision < 3) { | 1719 if (buildCounterRevision < 3) { |
| 1685 unittest.expect(o.downloadUrl, unittest.equals('foo')); | 1720 unittest.expect(o.downloadUrl, unittest.equals('foo')); |
| 1686 unittest.expect(o.etag, unittest.equals('foo')); | 1721 unittest.expect(o.etag, unittest.equals('foo')); |
| 1687 checkUnnamed723(o.exportLinks); | 1722 checkUnnamed1010(o.exportLinks); |
| 1688 unittest.expect(o.fileSize, unittest.equals('foo')); | 1723 unittest.expect(o.fileSize, unittest.equals('foo')); |
| 1689 unittest.expect(o.id, unittest.equals('foo')); | 1724 unittest.expect(o.id, unittest.equals('foo')); |
| 1690 unittest.expect(o.kind, unittest.equals('foo')); | 1725 unittest.expect(o.kind, unittest.equals('foo')); |
| 1691 checkUser(o.lastModifyingUser); | 1726 checkUser(o.lastModifyingUser); |
| 1692 unittest.expect(o.lastModifyingUserName, unittest.equals('foo')); | 1727 unittest.expect(o.lastModifyingUserName, unittest.equals('foo')); |
| 1693 unittest.expect(o.md5Checksum, unittest.equals('foo')); | 1728 unittest.expect(o.md5Checksum, unittest.equals('foo')); |
| 1694 unittest.expect(o.mimeType, unittest.equals('foo')); | 1729 unittest.expect(o.mimeType, unittest.equals('foo')); |
| 1695 unittest.expect(o.modifiedDate, unittest.equals(core.DateTime.parse("2002-02
-27T14:01:02"))); | 1730 unittest.expect(o.modifiedDate, unittest.equals(core.DateTime.parse("2002-02
-27T14:01:02"))); |
| 1696 unittest.expect(o.originalFilename, unittest.equals('foo')); | 1731 unittest.expect(o.originalFilename, unittest.equals('foo')); |
| 1697 unittest.expect(o.pinned, unittest.isTrue); | 1732 unittest.expect(o.pinned, unittest.isTrue); |
| 1698 unittest.expect(o.publishAuto, unittest.isTrue); | 1733 unittest.expect(o.publishAuto, unittest.isTrue); |
| 1699 unittest.expect(o.published, unittest.isTrue); | 1734 unittest.expect(o.published, unittest.isTrue); |
| 1700 unittest.expect(o.publishedLink, unittest.equals('foo')); | 1735 unittest.expect(o.publishedLink, unittest.equals('foo')); |
| 1701 unittest.expect(o.publishedOutsideDomain, unittest.isTrue); | 1736 unittest.expect(o.publishedOutsideDomain, unittest.isTrue); |
| 1702 unittest.expect(o.selfLink, unittest.equals('foo')); | 1737 unittest.expect(o.selfLink, unittest.equals('foo')); |
| 1703 } | 1738 } |
| 1704 buildCounterRevision--; | 1739 buildCounterRevision--; |
| 1705 } | 1740 } |
| 1706 | 1741 |
| 1707 buildUnnamed724() { | 1742 buildUnnamed1011() { |
| 1708 var o = new core.List<api.Revision>(); | 1743 var o = new core.List<api.Revision>(); |
| 1709 o.add(buildRevision()); | 1744 o.add(buildRevision()); |
| 1710 o.add(buildRevision()); | 1745 o.add(buildRevision()); |
| 1711 return o; | 1746 return o; |
| 1712 } | 1747 } |
| 1713 | 1748 |
| 1714 checkUnnamed724(core.List<api.Revision> o) { | 1749 checkUnnamed1011(core.List<api.Revision> o) { |
| 1715 unittest.expect(o, unittest.hasLength(2)); | 1750 unittest.expect(o, unittest.hasLength(2)); |
| 1716 checkRevision(o[0]); | 1751 checkRevision(o[0]); |
| 1717 checkRevision(o[1]); | 1752 checkRevision(o[1]); |
| 1718 } | 1753 } |
| 1719 | 1754 |
| 1720 core.int buildCounterRevisionList = 0; | 1755 core.int buildCounterRevisionList = 0; |
| 1721 buildRevisionList() { | 1756 buildRevisionList() { |
| 1722 var o = new api.RevisionList(); | 1757 var o = new api.RevisionList(); |
| 1723 buildCounterRevisionList++; | 1758 buildCounterRevisionList++; |
| 1724 if (buildCounterRevisionList < 3) { | 1759 if (buildCounterRevisionList < 3) { |
| 1725 o.etag = "foo"; | 1760 o.etag = "foo"; |
| 1726 o.items = buildUnnamed724(); | 1761 o.items = buildUnnamed1011(); |
| 1727 o.kind = "foo"; | 1762 o.kind = "foo"; |
| 1728 o.selfLink = "foo"; | 1763 o.selfLink = "foo"; |
| 1729 } | 1764 } |
| 1730 buildCounterRevisionList--; | 1765 buildCounterRevisionList--; |
| 1731 return o; | 1766 return o; |
| 1732 } | 1767 } |
| 1733 | 1768 |
| 1734 checkRevisionList(api.RevisionList o) { | 1769 checkRevisionList(api.RevisionList o) { |
| 1735 buildCounterRevisionList++; | 1770 buildCounterRevisionList++; |
| 1736 if (buildCounterRevisionList < 3) { | 1771 if (buildCounterRevisionList < 3) { |
| 1737 unittest.expect(o.etag, unittest.equals('foo')); | 1772 unittest.expect(o.etag, unittest.equals('foo')); |
| 1738 checkUnnamed724(o.items); | 1773 checkUnnamed1011(o.items); |
| 1739 unittest.expect(o.kind, unittest.equals('foo')); | 1774 unittest.expect(o.kind, unittest.equals('foo')); |
| 1740 unittest.expect(o.selfLink, unittest.equals('foo')); | 1775 unittest.expect(o.selfLink, unittest.equals('foo')); |
| 1741 } | 1776 } |
| 1742 buildCounterRevisionList--; | 1777 buildCounterRevisionList--; |
| 1743 } | 1778 } |
| 1744 | 1779 |
| 1745 core.int buildCounterUserPicture = 0; | 1780 core.int buildCounterUserPicture = 0; |
| 1746 buildUserPicture() { | 1781 buildUserPicture() { |
| 1747 var o = new api.UserPicture(); | 1782 var o = new api.UserPicture(); |
| 1748 buildCounterUserPicture++; | 1783 buildCounterUserPicture++; |
| (...skipping 399 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2148 var o = buildUser(); | 2183 var o = buildUser(); |
| 2149 var od = new api.User.fromJson(o.toJson()); | 2184 var od = new api.User.fromJson(o.toJson()); |
| 2150 checkUser(od); | 2185 checkUser(od); |
| 2151 }); | 2186 }); |
| 2152 }); | 2187 }); |
| 2153 | 2188 |
| 2154 | 2189 |
| 2155 unittest.group("resource-AboutResourceApi", () { | 2190 unittest.group("resource-AboutResourceApi", () { |
| 2156 unittest.test("method--get", () { | 2191 unittest.test("method--get", () { |
| 2157 | 2192 |
| 2158 var mock = new common_test.HttpServerMock(); | 2193 var mock = new HttpServerMock(); |
| 2159 api.AboutResourceApi res = new api.DriveApi(mock).about; | 2194 api.AboutResourceApi res = new api.DriveApi(mock).about; |
| 2160 var arg_includeSubscribed = true; | 2195 var arg_includeSubscribed = true; |
| 2161 var arg_maxChangeIdCount = "foo"; | 2196 var arg_maxChangeIdCount = "foo"; |
| 2162 var arg_startChangeId = "foo"; | 2197 var arg_startChangeId = "foo"; |
| 2163 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2198 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 2164 var path = (req.url).path; | 2199 var path = (req.url).path; |
| 2165 var pathOffset = 0; | 2200 var pathOffset = 0; |
| 2166 var index; | 2201 var index; |
| 2167 var subPart; | 2202 var subPart; |
| 2168 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2203 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| (...skipping 21 matching lines...) Expand all Loading... |
| 2190 } | 2225 } |
| 2191 unittest.expect(queryMap["includeSubscribed"].first, unittest.equals("$a
rg_includeSubscribed")); | 2226 unittest.expect(queryMap["includeSubscribed"].first, unittest.equals("$a
rg_includeSubscribed")); |
| 2192 unittest.expect(queryMap["maxChangeIdCount"].first, unittest.equals(arg_
maxChangeIdCount)); | 2227 unittest.expect(queryMap["maxChangeIdCount"].first, unittest.equals(arg_
maxChangeIdCount)); |
| 2193 unittest.expect(queryMap["startChangeId"].first, unittest.equals(arg_sta
rtChangeId)); | 2228 unittest.expect(queryMap["startChangeId"].first, unittest.equals(arg_sta
rtChangeId)); |
| 2194 | 2229 |
| 2195 | 2230 |
| 2196 var h = { | 2231 var h = { |
| 2197 "content-type" : "application/json; charset=utf-8", | 2232 "content-type" : "application/json; charset=utf-8", |
| 2198 }; | 2233 }; |
| 2199 var resp = convert.JSON.encode(buildAbout()); | 2234 var resp = convert.JSON.encode(buildAbout()); |
| 2200 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 2235 return new async.Future.value(stringResponse(200, h, resp)); |
| 2201 }), true); | 2236 }), true); |
| 2202 res.get(includeSubscribed: arg_includeSubscribed, maxChangeIdCount: arg_ma
xChangeIdCount, startChangeId: arg_startChangeId).then(unittest.expectAsync(((ap
i.About response) { | 2237 res.get(includeSubscribed: arg_includeSubscribed, maxChangeIdCount: arg_ma
xChangeIdCount, startChangeId: arg_startChangeId).then(unittest.expectAsync(((ap
i.About response) { |
| 2203 checkAbout(response); | 2238 checkAbout(response); |
| 2204 }))); | 2239 }))); |
| 2205 }); | 2240 }); |
| 2206 | 2241 |
| 2207 }); | 2242 }); |
| 2208 | 2243 |
| 2209 | 2244 |
| 2210 unittest.group("resource-AppsResourceApi", () { | 2245 unittest.group("resource-AppsResourceApi", () { |
| 2211 unittest.test("method--get", () { | 2246 unittest.test("method--get", () { |
| 2212 | 2247 |
| 2213 var mock = new common_test.HttpServerMock(); | 2248 var mock = new HttpServerMock(); |
| 2214 api.AppsResourceApi res = new api.DriveApi(mock).apps; | 2249 api.AppsResourceApi res = new api.DriveApi(mock).apps; |
| 2215 var arg_appId = "foo"; | 2250 var arg_appId = "foo"; |
| 2216 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2251 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 2217 var path = (req.url).path; | 2252 var path = (req.url).path; |
| 2218 var pathOffset = 0; | 2253 var pathOffset = 0; |
| 2219 var index; | 2254 var index; |
| 2220 var subPart; | 2255 var subPart; |
| 2221 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2256 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 2222 pathOffset += 1; | 2257 pathOffset += 1; |
| 2223 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("drive/v2/")); | 2258 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("drive/v2/")); |
| (...skipping 19 matching lines...) Expand all Loading... |
| 2243 var keyvalue = part.split("="); | 2278 var keyvalue = part.split("="); |
| 2244 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 2279 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 2245 } | 2280 } |
| 2246 } | 2281 } |
| 2247 | 2282 |
| 2248 | 2283 |
| 2249 var h = { | 2284 var h = { |
| 2250 "content-type" : "application/json; charset=utf-8", | 2285 "content-type" : "application/json; charset=utf-8", |
| 2251 }; | 2286 }; |
| 2252 var resp = convert.JSON.encode(buildApp()); | 2287 var resp = convert.JSON.encode(buildApp()); |
| 2253 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 2288 return new async.Future.value(stringResponse(200, h, resp)); |
| 2254 }), true); | 2289 }), true); |
| 2255 res.get(arg_appId).then(unittest.expectAsync(((api.App response) { | 2290 res.get(arg_appId).then(unittest.expectAsync(((api.App response) { |
| 2256 checkApp(response); | 2291 checkApp(response); |
| 2257 }))); | 2292 }))); |
| 2258 }); | 2293 }); |
| 2259 | 2294 |
| 2260 unittest.test("method--list", () { | 2295 unittest.test("method--list", () { |
| 2261 | 2296 |
| 2262 var mock = new common_test.HttpServerMock(); | 2297 var mock = new HttpServerMock(); |
| 2263 api.AppsResourceApi res = new api.DriveApi(mock).apps; | 2298 api.AppsResourceApi res = new api.DriveApi(mock).apps; |
| 2264 var arg_appFilterExtensions = "foo"; | 2299 var arg_appFilterExtensions = "foo"; |
| 2265 var arg_appFilterMimeTypes = "foo"; | 2300 var arg_appFilterMimeTypes = "foo"; |
| 2266 var arg_languageCode = "foo"; | 2301 var arg_languageCode = "foo"; |
| 2267 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2302 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 2268 var path = (req.url).path; | 2303 var path = (req.url).path; |
| 2269 var pathOffset = 0; | 2304 var pathOffset = 0; |
| 2270 var index; | 2305 var index; |
| 2271 var subPart; | 2306 var subPart; |
| 2272 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2307 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| (...skipping 21 matching lines...) Expand all Loading... |
| 2294 } | 2329 } |
| 2295 unittest.expect(queryMap["appFilterExtensions"].first, unittest.equals(a
rg_appFilterExtensions)); | 2330 unittest.expect(queryMap["appFilterExtensions"].first, unittest.equals(a
rg_appFilterExtensions)); |
| 2296 unittest.expect(queryMap["appFilterMimeTypes"].first, unittest.equals(ar
g_appFilterMimeTypes)); | 2331 unittest.expect(queryMap["appFilterMimeTypes"].first, unittest.equals(ar
g_appFilterMimeTypes)); |
| 2297 unittest.expect(queryMap["languageCode"].first, unittest.equals(arg_lang
uageCode)); | 2332 unittest.expect(queryMap["languageCode"].first, unittest.equals(arg_lang
uageCode)); |
| 2298 | 2333 |
| 2299 | 2334 |
| 2300 var h = { | 2335 var h = { |
| 2301 "content-type" : "application/json; charset=utf-8", | 2336 "content-type" : "application/json; charset=utf-8", |
| 2302 }; | 2337 }; |
| 2303 var resp = convert.JSON.encode(buildAppList()); | 2338 var resp = convert.JSON.encode(buildAppList()); |
| 2304 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 2339 return new async.Future.value(stringResponse(200, h, resp)); |
| 2305 }), true); | 2340 }), true); |
| 2306 res.list(appFilterExtensions: arg_appFilterExtensions, appFilterMimeTypes:
arg_appFilterMimeTypes, languageCode: arg_languageCode).then(unittest.expectAsy
nc(((api.AppList response) { | 2341 res.list(appFilterExtensions: arg_appFilterExtensions, appFilterMimeTypes:
arg_appFilterMimeTypes, languageCode: arg_languageCode).then(unittest.expectAsy
nc(((api.AppList response) { |
| 2307 checkAppList(response); | 2342 checkAppList(response); |
| 2308 }))); | 2343 }))); |
| 2309 }); | 2344 }); |
| 2310 | 2345 |
| 2311 }); | 2346 }); |
| 2312 | 2347 |
| 2313 | 2348 |
| 2314 unittest.group("resource-ChangesResourceApi", () { | 2349 unittest.group("resource-ChangesResourceApi", () { |
| 2315 unittest.test("method--get", () { | 2350 unittest.test("method--get", () { |
| 2316 | 2351 |
| 2317 var mock = new common_test.HttpServerMock(); | 2352 var mock = new HttpServerMock(); |
| 2318 api.ChangesResourceApi res = new api.DriveApi(mock).changes; | 2353 api.ChangesResourceApi res = new api.DriveApi(mock).changes; |
| 2319 var arg_changeId = "foo"; | 2354 var arg_changeId = "foo"; |
| 2320 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2355 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 2321 var path = (req.url).path; | 2356 var path = (req.url).path; |
| 2322 var pathOffset = 0; | 2357 var pathOffset = 0; |
| 2323 var index; | 2358 var index; |
| 2324 var subPart; | 2359 var subPart; |
| 2325 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2360 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 2326 pathOffset += 1; | 2361 pathOffset += 1; |
| 2327 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("drive/v2/")); | 2362 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("drive/v2/")); |
| (...skipping 19 matching lines...) Expand all Loading... |
| 2347 var keyvalue = part.split("="); | 2382 var keyvalue = part.split("="); |
| 2348 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 2383 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 2349 } | 2384 } |
| 2350 } | 2385 } |
| 2351 | 2386 |
| 2352 | 2387 |
| 2353 var h = { | 2388 var h = { |
| 2354 "content-type" : "application/json; charset=utf-8", | 2389 "content-type" : "application/json; charset=utf-8", |
| 2355 }; | 2390 }; |
| 2356 var resp = convert.JSON.encode(buildChange()); | 2391 var resp = convert.JSON.encode(buildChange()); |
| 2357 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 2392 return new async.Future.value(stringResponse(200, h, resp)); |
| 2358 }), true); | 2393 }), true); |
| 2359 res.get(arg_changeId).then(unittest.expectAsync(((api.Change response) { | 2394 res.get(arg_changeId).then(unittest.expectAsync(((api.Change response) { |
| 2360 checkChange(response); | 2395 checkChange(response); |
| 2361 }))); | 2396 }))); |
| 2362 }); | 2397 }); |
| 2363 | 2398 |
| 2364 unittest.test("method--list", () { | 2399 unittest.test("method--list", () { |
| 2365 | 2400 |
| 2366 var mock = new common_test.HttpServerMock(); | 2401 var mock = new HttpServerMock(); |
| 2367 api.ChangesResourceApi res = new api.DriveApi(mock).changes; | 2402 api.ChangesResourceApi res = new api.DriveApi(mock).changes; |
| 2368 var arg_includeDeleted = true; | 2403 var arg_includeDeleted = true; |
| 2369 var arg_includeSubscribed = true; | 2404 var arg_includeSubscribed = true; |
| 2370 var arg_maxResults = 42; | 2405 var arg_maxResults = 42; |
| 2371 var arg_pageToken = "foo"; | 2406 var arg_pageToken = "foo"; |
| 2372 var arg_startChangeId = "foo"; | 2407 var arg_startChangeId = "foo"; |
| 2373 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2408 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 2374 var path = (req.url).path; | 2409 var path = (req.url).path; |
| 2375 var pathOffset = 0; | 2410 var pathOffset = 0; |
| 2376 var index; | 2411 var index; |
| (...skipping 25 matching lines...) Expand all Loading... |
| 2402 unittest.expect(queryMap["includeSubscribed"].first, unittest.equals("$a
rg_includeSubscribed")); | 2437 unittest.expect(queryMap["includeSubscribed"].first, unittest.equals("$a
rg_includeSubscribed")); |
| 2403 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | 2438 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); |
| 2404 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | 2439 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); |
| 2405 unittest.expect(queryMap["startChangeId"].first, unittest.equals(arg_sta
rtChangeId)); | 2440 unittest.expect(queryMap["startChangeId"].first, unittest.equals(arg_sta
rtChangeId)); |
| 2406 | 2441 |
| 2407 | 2442 |
| 2408 var h = { | 2443 var h = { |
| 2409 "content-type" : "application/json; charset=utf-8", | 2444 "content-type" : "application/json; charset=utf-8", |
| 2410 }; | 2445 }; |
| 2411 var resp = convert.JSON.encode(buildChangeList()); | 2446 var resp = convert.JSON.encode(buildChangeList()); |
| 2412 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 2447 return new async.Future.value(stringResponse(200, h, resp)); |
| 2413 }), true); | 2448 }), true); |
| 2414 res.list(includeDeleted: arg_includeDeleted, includeSubscribed: arg_includ
eSubscribed, maxResults: arg_maxResults, pageToken: arg_pageToken, startChangeId
: arg_startChangeId).then(unittest.expectAsync(((api.ChangeList response) { | 2449 res.list(includeDeleted: arg_includeDeleted, includeSubscribed: arg_includ
eSubscribed, maxResults: arg_maxResults, pageToken: arg_pageToken, startChangeId
: arg_startChangeId).then(unittest.expectAsync(((api.ChangeList response) { |
| 2415 checkChangeList(response); | 2450 checkChangeList(response); |
| 2416 }))); | 2451 }))); |
| 2417 }); | 2452 }); |
| 2418 | 2453 |
| 2419 unittest.test("method--watch", () { | 2454 unittest.test("method--watch", () { |
| 2420 | 2455 |
| 2421 var mock = new common_test.HttpServerMock(); | 2456 var mock = new HttpServerMock(); |
| 2422 api.ChangesResourceApi res = new api.DriveApi(mock).changes; | 2457 api.ChangesResourceApi res = new api.DriveApi(mock).changes; |
| 2423 var arg_request = buildChannel(); | 2458 var arg_request = buildChannel(); |
| 2424 var arg_includeDeleted = true; | 2459 var arg_includeDeleted = true; |
| 2425 var arg_includeSubscribed = true; | 2460 var arg_includeSubscribed = true; |
| 2426 var arg_maxResults = 42; | 2461 var arg_maxResults = 42; |
| 2427 var arg_pageToken = "foo"; | 2462 var arg_pageToken = "foo"; |
| 2428 var arg_startChangeId = "foo"; | 2463 var arg_startChangeId = "foo"; |
| 2429 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2464 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 2430 var obj = new api.Channel.fromJson(json); | 2465 var obj = new api.Channel.fromJson(json); |
| 2431 checkChannel(obj); | 2466 checkChannel(obj); |
| (...skipping 29 matching lines...) Expand all Loading... |
| 2461 unittest.expect(queryMap["includeSubscribed"].first, unittest.equals("$a
rg_includeSubscribed")); | 2496 unittest.expect(queryMap["includeSubscribed"].first, unittest.equals("$a
rg_includeSubscribed")); |
| 2462 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | 2497 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); |
| 2463 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | 2498 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); |
| 2464 unittest.expect(queryMap["startChangeId"].first, unittest.equals(arg_sta
rtChangeId)); | 2499 unittest.expect(queryMap["startChangeId"].first, unittest.equals(arg_sta
rtChangeId)); |
| 2465 | 2500 |
| 2466 | 2501 |
| 2467 var h = { | 2502 var h = { |
| 2468 "content-type" : "application/json; charset=utf-8", | 2503 "content-type" : "application/json; charset=utf-8", |
| 2469 }; | 2504 }; |
| 2470 var resp = convert.JSON.encode(buildChannel()); | 2505 var resp = convert.JSON.encode(buildChannel()); |
| 2471 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 2506 return new async.Future.value(stringResponse(200, h, resp)); |
| 2472 }), true); | 2507 }), true); |
| 2473 res.watch(arg_request, includeDeleted: arg_includeDeleted, includeSubscrib
ed: arg_includeSubscribed, maxResults: arg_maxResults, pageToken: arg_pageToken,
startChangeId: arg_startChangeId).then(unittest.expectAsync(((api.Channel respo
nse) { | 2508 res.watch(arg_request, includeDeleted: arg_includeDeleted, includeSubscrib
ed: arg_includeSubscribed, maxResults: arg_maxResults, pageToken: arg_pageToken,
startChangeId: arg_startChangeId).then(unittest.expectAsync(((api.Channel respo
nse) { |
| 2474 checkChannel(response); | 2509 checkChannel(response); |
| 2475 }))); | 2510 }))); |
| 2476 }); | 2511 }); |
| 2477 | 2512 |
| 2478 }); | 2513 }); |
| 2479 | 2514 |
| 2480 | 2515 |
| 2481 unittest.group("resource-ChannelsResourceApi", () { | 2516 unittest.group("resource-ChannelsResourceApi", () { |
| 2482 unittest.test("method--stop", () { | 2517 unittest.test("method--stop", () { |
| 2483 | 2518 |
| 2484 var mock = new common_test.HttpServerMock(); | 2519 var mock = new HttpServerMock(); |
| 2485 api.ChannelsResourceApi res = new api.DriveApi(mock).channels; | 2520 api.ChannelsResourceApi res = new api.DriveApi(mock).channels; |
| 2486 var arg_request = buildChannel(); | 2521 var arg_request = buildChannel(); |
| 2487 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2522 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 2488 var obj = new api.Channel.fromJson(json); | 2523 var obj = new api.Channel.fromJson(json); |
| 2489 checkChannel(obj); | 2524 checkChannel(obj); |
| 2490 | 2525 |
| 2491 var path = (req.url).path; | 2526 var path = (req.url).path; |
| 2492 var pathOffset = 0; | 2527 var pathOffset = 0; |
| 2493 var index; | 2528 var index; |
| 2494 var subPart; | 2529 var subPart; |
| (...skipping 19 matching lines...) Expand all Loading... |
| 2514 var keyvalue = part.split("="); | 2549 var keyvalue = part.split("="); |
| 2515 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 2550 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 2516 } | 2551 } |
| 2517 } | 2552 } |
| 2518 | 2553 |
| 2519 | 2554 |
| 2520 var h = { | 2555 var h = { |
| 2521 "content-type" : "application/json; charset=utf-8", | 2556 "content-type" : "application/json; charset=utf-8", |
| 2522 }; | 2557 }; |
| 2523 var resp = ""; | 2558 var resp = ""; |
| 2524 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 2559 return new async.Future.value(stringResponse(200, h, resp)); |
| 2525 }), true); | 2560 }), true); |
| 2526 res.stop(arg_request).then(unittest.expectAsync((_) {})); | 2561 res.stop(arg_request).then(unittest.expectAsync((_) {})); |
| 2527 }); | 2562 }); |
| 2528 | 2563 |
| 2529 }); | 2564 }); |
| 2530 | 2565 |
| 2531 | 2566 |
| 2532 unittest.group("resource-ChildrenResourceApi", () { | 2567 unittest.group("resource-ChildrenResourceApi", () { |
| 2533 unittest.test("method--delete", () { | 2568 unittest.test("method--delete", () { |
| 2534 | 2569 |
| 2535 var mock = new common_test.HttpServerMock(); | 2570 var mock = new HttpServerMock(); |
| 2536 api.ChildrenResourceApi res = new api.DriveApi(mock).children; | 2571 api.ChildrenResourceApi res = new api.DriveApi(mock).children; |
| 2537 var arg_folderId = "foo"; | 2572 var arg_folderId = "foo"; |
| 2538 var arg_childId = "foo"; | 2573 var arg_childId = "foo"; |
| 2539 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2574 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 2540 var path = (req.url).path; | 2575 var path = (req.url).path; |
| 2541 var pathOffset = 0; | 2576 var pathOffset = 0; |
| 2542 var index; | 2577 var index; |
| 2543 var subPart; | 2578 var subPart; |
| 2544 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2579 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 2545 pathOffset += 1; | 2580 pathOffset += 1; |
| (...skipping 27 matching lines...) Expand all Loading... |
| 2573 var keyvalue = part.split("="); | 2608 var keyvalue = part.split("="); |
| 2574 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 2609 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 2575 } | 2610 } |
| 2576 } | 2611 } |
| 2577 | 2612 |
| 2578 | 2613 |
| 2579 var h = { | 2614 var h = { |
| 2580 "content-type" : "application/json; charset=utf-8", | 2615 "content-type" : "application/json; charset=utf-8", |
| 2581 }; | 2616 }; |
| 2582 var resp = ""; | 2617 var resp = ""; |
| 2583 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 2618 return new async.Future.value(stringResponse(200, h, resp)); |
| 2584 }), true); | 2619 }), true); |
| 2585 res.delete(arg_folderId, arg_childId).then(unittest.expectAsync((_) {})); | 2620 res.delete(arg_folderId, arg_childId).then(unittest.expectAsync((_) {})); |
| 2586 }); | 2621 }); |
| 2587 | 2622 |
| 2588 unittest.test("method--get", () { | 2623 unittest.test("method--get", () { |
| 2589 | 2624 |
| 2590 var mock = new common_test.HttpServerMock(); | 2625 var mock = new HttpServerMock(); |
| 2591 api.ChildrenResourceApi res = new api.DriveApi(mock).children; | 2626 api.ChildrenResourceApi res = new api.DriveApi(mock).children; |
| 2592 var arg_folderId = "foo"; | 2627 var arg_folderId = "foo"; |
| 2593 var arg_childId = "foo"; | 2628 var arg_childId = "foo"; |
| 2594 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2629 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 2595 var path = (req.url).path; | 2630 var path = (req.url).path; |
| 2596 var pathOffset = 0; | 2631 var pathOffset = 0; |
| 2597 var index; | 2632 var index; |
| 2598 var subPart; | 2633 var subPart; |
| 2599 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2634 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 2600 pathOffset += 1; | 2635 pathOffset += 1; |
| (...skipping 27 matching lines...) Expand all Loading... |
| 2628 var keyvalue = part.split("="); | 2663 var keyvalue = part.split("="); |
| 2629 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 2664 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 2630 } | 2665 } |
| 2631 } | 2666 } |
| 2632 | 2667 |
| 2633 | 2668 |
| 2634 var h = { | 2669 var h = { |
| 2635 "content-type" : "application/json; charset=utf-8", | 2670 "content-type" : "application/json; charset=utf-8", |
| 2636 }; | 2671 }; |
| 2637 var resp = convert.JSON.encode(buildChildReference()); | 2672 var resp = convert.JSON.encode(buildChildReference()); |
| 2638 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 2673 return new async.Future.value(stringResponse(200, h, resp)); |
| 2639 }), true); | 2674 }), true); |
| 2640 res.get(arg_folderId, arg_childId).then(unittest.expectAsync(((api.ChildRe
ference response) { | 2675 res.get(arg_folderId, arg_childId).then(unittest.expectAsync(((api.ChildRe
ference response) { |
| 2641 checkChildReference(response); | 2676 checkChildReference(response); |
| 2642 }))); | 2677 }))); |
| 2643 }); | 2678 }); |
| 2644 | 2679 |
| 2645 unittest.test("method--insert", () { | 2680 unittest.test("method--insert", () { |
| 2646 | 2681 |
| 2647 var mock = new common_test.HttpServerMock(); | 2682 var mock = new HttpServerMock(); |
| 2648 api.ChildrenResourceApi res = new api.DriveApi(mock).children; | 2683 api.ChildrenResourceApi res = new api.DriveApi(mock).children; |
| 2649 var arg_request = buildChildReference(); | 2684 var arg_request = buildChildReference(); |
| 2650 var arg_folderId = "foo"; | 2685 var arg_folderId = "foo"; |
| 2651 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2686 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 2652 var obj = new api.ChildReference.fromJson(json); | 2687 var obj = new api.ChildReference.fromJson(json); |
| 2653 checkChildReference(obj); | 2688 checkChildReference(obj); |
| 2654 | 2689 |
| 2655 var path = (req.url).path; | 2690 var path = (req.url).path; |
| 2656 var pathOffset = 0; | 2691 var pathOffset = 0; |
| 2657 var index; | 2692 var index; |
| (...skipping 27 matching lines...) Expand all Loading... |
| 2685 var keyvalue = part.split("="); | 2720 var keyvalue = part.split("="); |
| 2686 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 2721 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 2687 } | 2722 } |
| 2688 } | 2723 } |
| 2689 | 2724 |
| 2690 | 2725 |
| 2691 var h = { | 2726 var h = { |
| 2692 "content-type" : "application/json; charset=utf-8", | 2727 "content-type" : "application/json; charset=utf-8", |
| 2693 }; | 2728 }; |
| 2694 var resp = convert.JSON.encode(buildChildReference()); | 2729 var resp = convert.JSON.encode(buildChildReference()); |
| 2695 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 2730 return new async.Future.value(stringResponse(200, h, resp)); |
| 2696 }), true); | 2731 }), true); |
| 2697 res.insert(arg_request, arg_folderId).then(unittest.expectAsync(((api.Chil
dReference response) { | 2732 res.insert(arg_request, arg_folderId).then(unittest.expectAsync(((api.Chil
dReference response) { |
| 2698 checkChildReference(response); | 2733 checkChildReference(response); |
| 2699 }))); | 2734 }))); |
| 2700 }); | 2735 }); |
| 2701 | 2736 |
| 2702 unittest.test("method--list", () { | 2737 unittest.test("method--list", () { |
| 2703 | 2738 |
| 2704 var mock = new common_test.HttpServerMock(); | 2739 var mock = new HttpServerMock(); |
| 2705 api.ChildrenResourceApi res = new api.DriveApi(mock).children; | 2740 api.ChildrenResourceApi res = new api.DriveApi(mock).children; |
| 2706 var arg_folderId = "foo"; | 2741 var arg_folderId = "foo"; |
| 2707 var arg_maxResults = 42; | 2742 var arg_maxResults = 42; |
| 2708 var arg_pageToken = "foo"; | 2743 var arg_pageToken = "foo"; |
| 2709 var arg_q = "foo"; | 2744 var arg_q = "foo"; |
| 2710 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2745 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 2711 var path = (req.url).path; | 2746 var path = (req.url).path; |
| 2712 var pathOffset = 0; | 2747 var pathOffset = 0; |
| 2713 var index; | 2748 var index; |
| 2714 var subPart; | 2749 var subPart; |
| (...skipping 29 matching lines...) Expand all Loading... |
| 2744 } | 2779 } |
| 2745 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | 2780 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); |
| 2746 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | 2781 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); |
| 2747 unittest.expect(queryMap["q"].first, unittest.equals(arg_q)); | 2782 unittest.expect(queryMap["q"].first, unittest.equals(arg_q)); |
| 2748 | 2783 |
| 2749 | 2784 |
| 2750 var h = { | 2785 var h = { |
| 2751 "content-type" : "application/json; charset=utf-8", | 2786 "content-type" : "application/json; charset=utf-8", |
| 2752 }; | 2787 }; |
| 2753 var resp = convert.JSON.encode(buildChildList()); | 2788 var resp = convert.JSON.encode(buildChildList()); |
| 2754 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 2789 return new async.Future.value(stringResponse(200, h, resp)); |
| 2755 }), true); | 2790 }), true); |
| 2756 res.list(arg_folderId, maxResults: arg_maxResults, pageToken: arg_pageToke
n, q: arg_q).then(unittest.expectAsync(((api.ChildList response) { | 2791 res.list(arg_folderId, maxResults: arg_maxResults, pageToken: arg_pageToke
n, q: arg_q).then(unittest.expectAsync(((api.ChildList response) { |
| 2757 checkChildList(response); | 2792 checkChildList(response); |
| 2758 }))); | 2793 }))); |
| 2759 }); | 2794 }); |
| 2760 | 2795 |
| 2761 }); | 2796 }); |
| 2762 | 2797 |
| 2763 | 2798 |
| 2764 unittest.group("resource-CommentsResourceApi", () { | 2799 unittest.group("resource-CommentsResourceApi", () { |
| 2765 unittest.test("method--delete", () { | 2800 unittest.test("method--delete", () { |
| 2766 | 2801 |
| 2767 var mock = new common_test.HttpServerMock(); | 2802 var mock = new HttpServerMock(); |
| 2768 api.CommentsResourceApi res = new api.DriveApi(mock).comments; | 2803 api.CommentsResourceApi res = new api.DriveApi(mock).comments; |
| 2769 var arg_fileId = "foo"; | 2804 var arg_fileId = "foo"; |
| 2770 var arg_commentId = "foo"; | 2805 var arg_commentId = "foo"; |
| 2771 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2806 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 2772 var path = (req.url).path; | 2807 var path = (req.url).path; |
| 2773 var pathOffset = 0; | 2808 var pathOffset = 0; |
| 2774 var index; | 2809 var index; |
| 2775 var subPart; | 2810 var subPart; |
| 2776 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2811 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 2777 pathOffset += 1; | 2812 pathOffset += 1; |
| (...skipping 27 matching lines...) Expand all Loading... |
| 2805 var keyvalue = part.split("="); | 2840 var keyvalue = part.split("="); |
| 2806 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 2841 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 2807 } | 2842 } |
| 2808 } | 2843 } |
| 2809 | 2844 |
| 2810 | 2845 |
| 2811 var h = { | 2846 var h = { |
| 2812 "content-type" : "application/json; charset=utf-8", | 2847 "content-type" : "application/json; charset=utf-8", |
| 2813 }; | 2848 }; |
| 2814 var resp = ""; | 2849 var resp = ""; |
| 2815 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 2850 return new async.Future.value(stringResponse(200, h, resp)); |
| 2816 }), true); | 2851 }), true); |
| 2817 res.delete(arg_fileId, arg_commentId).then(unittest.expectAsync((_) {})); | 2852 res.delete(arg_fileId, arg_commentId).then(unittest.expectAsync((_) {})); |
| 2818 }); | 2853 }); |
| 2819 | 2854 |
| 2820 unittest.test("method--get", () { | 2855 unittest.test("method--get", () { |
| 2821 | 2856 |
| 2822 var mock = new common_test.HttpServerMock(); | 2857 var mock = new HttpServerMock(); |
| 2823 api.CommentsResourceApi res = new api.DriveApi(mock).comments; | 2858 api.CommentsResourceApi res = new api.DriveApi(mock).comments; |
| 2824 var arg_fileId = "foo"; | 2859 var arg_fileId = "foo"; |
| 2825 var arg_commentId = "foo"; | 2860 var arg_commentId = "foo"; |
| 2826 var arg_includeDeleted = true; | 2861 var arg_includeDeleted = true; |
| 2827 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2862 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 2828 var path = (req.url).path; | 2863 var path = (req.url).path; |
| 2829 var pathOffset = 0; | 2864 var pathOffset = 0; |
| 2830 var index; | 2865 var index; |
| 2831 var subPart; | 2866 var subPart; |
| 2832 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2867 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| (...skipping 29 matching lines...) Expand all Loading... |
| 2862 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 2897 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 2863 } | 2898 } |
| 2864 } | 2899 } |
| 2865 unittest.expect(queryMap["includeDeleted"].first, unittest.equals("$arg_
includeDeleted")); | 2900 unittest.expect(queryMap["includeDeleted"].first, unittest.equals("$arg_
includeDeleted")); |
| 2866 | 2901 |
| 2867 | 2902 |
| 2868 var h = { | 2903 var h = { |
| 2869 "content-type" : "application/json; charset=utf-8", | 2904 "content-type" : "application/json; charset=utf-8", |
| 2870 }; | 2905 }; |
| 2871 var resp = convert.JSON.encode(buildComment()); | 2906 var resp = convert.JSON.encode(buildComment()); |
| 2872 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 2907 return new async.Future.value(stringResponse(200, h, resp)); |
| 2873 }), true); | 2908 }), true); |
| 2874 res.get(arg_fileId, arg_commentId, includeDeleted: arg_includeDeleted).the
n(unittest.expectAsync(((api.Comment response) { | 2909 res.get(arg_fileId, arg_commentId, includeDeleted: arg_includeDeleted).the
n(unittest.expectAsync(((api.Comment response) { |
| 2875 checkComment(response); | 2910 checkComment(response); |
| 2876 }))); | 2911 }))); |
| 2877 }); | 2912 }); |
| 2878 | 2913 |
| 2879 unittest.test("method--insert", () { | 2914 unittest.test("method--insert", () { |
| 2880 | 2915 |
| 2881 var mock = new common_test.HttpServerMock(); | 2916 var mock = new HttpServerMock(); |
| 2882 api.CommentsResourceApi res = new api.DriveApi(mock).comments; | 2917 api.CommentsResourceApi res = new api.DriveApi(mock).comments; |
| 2883 var arg_request = buildComment(); | 2918 var arg_request = buildComment(); |
| 2884 var arg_fileId = "foo"; | 2919 var arg_fileId = "foo"; |
| 2885 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2920 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 2886 var obj = new api.Comment.fromJson(json); | 2921 var obj = new api.Comment.fromJson(json); |
| 2887 checkComment(obj); | 2922 checkComment(obj); |
| 2888 | 2923 |
| 2889 var path = (req.url).path; | 2924 var path = (req.url).path; |
| 2890 var pathOffset = 0; | 2925 var pathOffset = 0; |
| 2891 var index; | 2926 var index; |
| (...skipping 27 matching lines...) Expand all Loading... |
| 2919 var keyvalue = part.split("="); | 2954 var keyvalue = part.split("="); |
| 2920 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 2955 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 2921 } | 2956 } |
| 2922 } | 2957 } |
| 2923 | 2958 |
| 2924 | 2959 |
| 2925 var h = { | 2960 var h = { |
| 2926 "content-type" : "application/json; charset=utf-8", | 2961 "content-type" : "application/json; charset=utf-8", |
| 2927 }; | 2962 }; |
| 2928 var resp = convert.JSON.encode(buildComment()); | 2963 var resp = convert.JSON.encode(buildComment()); |
| 2929 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 2964 return new async.Future.value(stringResponse(200, h, resp)); |
| 2930 }), true); | 2965 }), true); |
| 2931 res.insert(arg_request, arg_fileId).then(unittest.expectAsync(((api.Commen
t response) { | 2966 res.insert(arg_request, arg_fileId).then(unittest.expectAsync(((api.Commen
t response) { |
| 2932 checkComment(response); | 2967 checkComment(response); |
| 2933 }))); | 2968 }))); |
| 2934 }); | 2969 }); |
| 2935 | 2970 |
| 2936 unittest.test("method--list", () { | 2971 unittest.test("method--list", () { |
| 2937 | 2972 |
| 2938 var mock = new common_test.HttpServerMock(); | 2973 var mock = new HttpServerMock(); |
| 2939 api.CommentsResourceApi res = new api.DriveApi(mock).comments; | 2974 api.CommentsResourceApi res = new api.DriveApi(mock).comments; |
| 2940 var arg_fileId = "foo"; | 2975 var arg_fileId = "foo"; |
| 2941 var arg_includeDeleted = true; | 2976 var arg_includeDeleted = true; |
| 2942 var arg_maxResults = 42; | 2977 var arg_maxResults = 42; |
| 2943 var arg_pageToken = "foo"; | 2978 var arg_pageToken = "foo"; |
| 2944 var arg_updatedMin = "foo"; | 2979 var arg_updatedMin = "foo"; |
| 2945 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2980 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 2946 var path = (req.url).path; | 2981 var path = (req.url).path; |
| 2947 var pathOffset = 0; | 2982 var pathOffset = 0; |
| 2948 var index; | 2983 var index; |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2980 unittest.expect(queryMap["includeDeleted"].first, unittest.equals("$arg_
includeDeleted")); | 3015 unittest.expect(queryMap["includeDeleted"].first, unittest.equals("$arg_
includeDeleted")); |
| 2981 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | 3016 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); |
| 2982 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | 3017 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); |
| 2983 unittest.expect(queryMap["updatedMin"].first, unittest.equals(arg_update
dMin)); | 3018 unittest.expect(queryMap["updatedMin"].first, unittest.equals(arg_update
dMin)); |
| 2984 | 3019 |
| 2985 | 3020 |
| 2986 var h = { | 3021 var h = { |
| 2987 "content-type" : "application/json; charset=utf-8", | 3022 "content-type" : "application/json; charset=utf-8", |
| 2988 }; | 3023 }; |
| 2989 var resp = convert.JSON.encode(buildCommentList()); | 3024 var resp = convert.JSON.encode(buildCommentList()); |
| 2990 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 3025 return new async.Future.value(stringResponse(200, h, resp)); |
| 2991 }), true); | 3026 }), true); |
| 2992 res.list(arg_fileId, includeDeleted: arg_includeDeleted, maxResults: arg_m
axResults, pageToken: arg_pageToken, updatedMin: arg_updatedMin).then(unittest.e
xpectAsync(((api.CommentList response) { | 3027 res.list(arg_fileId, includeDeleted: arg_includeDeleted, maxResults: arg_m
axResults, pageToken: arg_pageToken, updatedMin: arg_updatedMin).then(unittest.e
xpectAsync(((api.CommentList response) { |
| 2993 checkCommentList(response); | 3028 checkCommentList(response); |
| 2994 }))); | 3029 }))); |
| 2995 }); | 3030 }); |
| 2996 | 3031 |
| 2997 unittest.test("method--patch", () { | 3032 unittest.test("method--patch", () { |
| 2998 | 3033 |
| 2999 var mock = new common_test.HttpServerMock(); | 3034 var mock = new HttpServerMock(); |
| 3000 api.CommentsResourceApi res = new api.DriveApi(mock).comments; | 3035 api.CommentsResourceApi res = new api.DriveApi(mock).comments; |
| 3001 var arg_request = buildComment(); | 3036 var arg_request = buildComment(); |
| 3002 var arg_fileId = "foo"; | 3037 var arg_fileId = "foo"; |
| 3003 var arg_commentId = "foo"; | 3038 var arg_commentId = "foo"; |
| 3004 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 3039 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 3005 var obj = new api.Comment.fromJson(json); | 3040 var obj = new api.Comment.fromJson(json); |
| 3006 checkComment(obj); | 3041 checkComment(obj); |
| 3007 | 3042 |
| 3008 var path = (req.url).path; | 3043 var path = (req.url).path; |
| 3009 var pathOffset = 0; | 3044 var pathOffset = 0; |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3041 var keyvalue = part.split("="); | 3076 var keyvalue = part.split("="); |
| 3042 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 3077 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 3043 } | 3078 } |
| 3044 } | 3079 } |
| 3045 | 3080 |
| 3046 | 3081 |
| 3047 var h = { | 3082 var h = { |
| 3048 "content-type" : "application/json; charset=utf-8", | 3083 "content-type" : "application/json; charset=utf-8", |
| 3049 }; | 3084 }; |
| 3050 var resp = convert.JSON.encode(buildComment()); | 3085 var resp = convert.JSON.encode(buildComment()); |
| 3051 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 3086 return new async.Future.value(stringResponse(200, h, resp)); |
| 3052 }), true); | 3087 }), true); |
| 3053 res.patch(arg_request, arg_fileId, arg_commentId).then(unittest.expectAsyn
c(((api.Comment response) { | 3088 res.patch(arg_request, arg_fileId, arg_commentId).then(unittest.expectAsyn
c(((api.Comment response) { |
| 3054 checkComment(response); | 3089 checkComment(response); |
| 3055 }))); | 3090 }))); |
| 3056 }); | 3091 }); |
| 3057 | 3092 |
| 3058 unittest.test("method--update", () { | 3093 unittest.test("method--update", () { |
| 3059 | 3094 |
| 3060 var mock = new common_test.HttpServerMock(); | 3095 var mock = new HttpServerMock(); |
| 3061 api.CommentsResourceApi res = new api.DriveApi(mock).comments; | 3096 api.CommentsResourceApi res = new api.DriveApi(mock).comments; |
| 3062 var arg_request = buildComment(); | 3097 var arg_request = buildComment(); |
| 3063 var arg_fileId = "foo"; | 3098 var arg_fileId = "foo"; |
| 3064 var arg_commentId = "foo"; | 3099 var arg_commentId = "foo"; |
| 3065 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 3100 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 3066 var obj = new api.Comment.fromJson(json); | 3101 var obj = new api.Comment.fromJson(json); |
| 3067 checkComment(obj); | 3102 checkComment(obj); |
| 3068 | 3103 |
| 3069 var path = (req.url).path; | 3104 var path = (req.url).path; |
| 3070 var pathOffset = 0; | 3105 var pathOffset = 0; |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3102 var keyvalue = part.split("="); | 3137 var keyvalue = part.split("="); |
| 3103 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 3138 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 3104 } | 3139 } |
| 3105 } | 3140 } |
| 3106 | 3141 |
| 3107 | 3142 |
| 3108 var h = { | 3143 var h = { |
| 3109 "content-type" : "application/json; charset=utf-8", | 3144 "content-type" : "application/json; charset=utf-8", |
| 3110 }; | 3145 }; |
| 3111 var resp = convert.JSON.encode(buildComment()); | 3146 var resp = convert.JSON.encode(buildComment()); |
| 3112 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 3147 return new async.Future.value(stringResponse(200, h, resp)); |
| 3113 }), true); | 3148 }), true); |
| 3114 res.update(arg_request, arg_fileId, arg_commentId).then(unittest.expectAsy
nc(((api.Comment response) { | 3149 res.update(arg_request, arg_fileId, arg_commentId).then(unittest.expectAsy
nc(((api.Comment response) { |
| 3115 checkComment(response); | 3150 checkComment(response); |
| 3116 }))); | 3151 }))); |
| 3117 }); | 3152 }); |
| 3118 | 3153 |
| 3119 }); | 3154 }); |
| 3120 | 3155 |
| 3121 | 3156 |
| 3122 unittest.group("resource-FilesResourceApi", () { | 3157 unittest.group("resource-FilesResourceApi", () { |
| 3123 unittest.test("method--copy", () { | 3158 unittest.test("method--copy", () { |
| 3124 | 3159 |
| 3125 var mock = new common_test.HttpServerMock(); | 3160 var mock = new HttpServerMock(); |
| 3126 api.FilesResourceApi res = new api.DriveApi(mock).files; | 3161 api.FilesResourceApi res = new api.DriveApi(mock).files; |
| 3127 var arg_request = buildFile(); | 3162 var arg_request = buildFile(); |
| 3128 var arg_fileId = "foo"; | 3163 var arg_fileId = "foo"; |
| 3129 var arg_convert = true; | 3164 var arg_convert = true; |
| 3130 var arg_ocr = true; | 3165 var arg_ocr = true; |
| 3131 var arg_ocrLanguage = "foo"; | 3166 var arg_ocrLanguage = "foo"; |
| 3132 var arg_pinned = true; | 3167 var arg_pinned = true; |
| 3133 var arg_timedTextLanguage = "foo"; | 3168 var arg_timedTextLanguage = "foo"; |
| 3134 var arg_timedTextTrackName = "foo"; | 3169 var arg_timedTextTrackName = "foo"; |
| 3135 var arg_visibility = "foo"; | 3170 var arg_visibility = "foo"; |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3177 unittest.expect(queryMap["pinned"].first, unittest.equals("$arg_pinned")
); | 3212 unittest.expect(queryMap["pinned"].first, unittest.equals("$arg_pinned")
); |
| 3178 unittest.expect(queryMap["timedTextLanguage"].first, unittest.equals(arg
_timedTextLanguage)); | 3213 unittest.expect(queryMap["timedTextLanguage"].first, unittest.equals(arg
_timedTextLanguage)); |
| 3179 unittest.expect(queryMap["timedTextTrackName"].first, unittest.equals(ar
g_timedTextTrackName)); | 3214 unittest.expect(queryMap["timedTextTrackName"].first, unittest.equals(ar
g_timedTextTrackName)); |
| 3180 unittest.expect(queryMap["visibility"].first, unittest.equals(arg_visibi
lity)); | 3215 unittest.expect(queryMap["visibility"].first, unittest.equals(arg_visibi
lity)); |
| 3181 | 3216 |
| 3182 | 3217 |
| 3183 var h = { | 3218 var h = { |
| 3184 "content-type" : "application/json; charset=utf-8", | 3219 "content-type" : "application/json; charset=utf-8", |
| 3185 }; | 3220 }; |
| 3186 var resp = convert.JSON.encode(buildFile()); | 3221 var resp = convert.JSON.encode(buildFile()); |
| 3187 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 3222 return new async.Future.value(stringResponse(200, h, resp)); |
| 3188 }), true); | 3223 }), true); |
| 3189 res.copy(arg_request, arg_fileId, convert: arg_convert, ocr: arg_ocr, ocrL
anguage: arg_ocrLanguage, pinned: arg_pinned, timedTextLanguage: arg_timedTextLa
nguage, timedTextTrackName: arg_timedTextTrackName, visibility: arg_visibility).
then(unittest.expectAsync(((api.File response) { | 3224 res.copy(arg_request, arg_fileId, convert: arg_convert, ocr: arg_ocr, ocrL
anguage: arg_ocrLanguage, pinned: arg_pinned, timedTextLanguage: arg_timedTextLa
nguage, timedTextTrackName: arg_timedTextTrackName, visibility: arg_visibility).
then(unittest.expectAsync(((api.File response) { |
| 3190 checkFile(response); | 3225 checkFile(response); |
| 3191 }))); | 3226 }))); |
| 3192 }); | 3227 }); |
| 3193 | 3228 |
| 3194 unittest.test("method--delete", () { | 3229 unittest.test("method--delete", () { |
| 3195 | 3230 |
| 3196 var mock = new common_test.HttpServerMock(); | 3231 var mock = new HttpServerMock(); |
| 3197 api.FilesResourceApi res = new api.DriveApi(mock).files; | 3232 api.FilesResourceApi res = new api.DriveApi(mock).files; |
| 3198 var arg_fileId = "foo"; | 3233 var arg_fileId = "foo"; |
| 3199 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 3234 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 3200 var path = (req.url).path; | 3235 var path = (req.url).path; |
| 3201 var pathOffset = 0; | 3236 var pathOffset = 0; |
| 3202 var index; | 3237 var index; |
| 3203 var subPart; | 3238 var subPart; |
| 3204 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 3239 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 3205 pathOffset += 1; | 3240 pathOffset += 1; |
| 3206 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("drive/v2/")); | 3241 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("drive/v2/")); |
| (...skipping 19 matching lines...) Expand all Loading... |
| 3226 var keyvalue = part.split("="); | 3261 var keyvalue = part.split("="); |
| 3227 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 3262 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 3228 } | 3263 } |
| 3229 } | 3264 } |
| 3230 | 3265 |
| 3231 | 3266 |
| 3232 var h = { | 3267 var h = { |
| 3233 "content-type" : "application/json; charset=utf-8", | 3268 "content-type" : "application/json; charset=utf-8", |
| 3234 }; | 3269 }; |
| 3235 var resp = ""; | 3270 var resp = ""; |
| 3236 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 3271 return new async.Future.value(stringResponse(200, h, resp)); |
| 3237 }), true); | 3272 }), true); |
| 3238 res.delete(arg_fileId).then(unittest.expectAsync((_) {})); | 3273 res.delete(arg_fileId).then(unittest.expectAsync((_) {})); |
| 3239 }); | 3274 }); |
| 3240 | 3275 |
| 3241 unittest.test("method--emptyTrash", () { | 3276 unittest.test("method--emptyTrash", () { |
| 3242 | 3277 |
| 3243 var mock = new common_test.HttpServerMock(); | 3278 var mock = new HttpServerMock(); |
| 3244 api.FilesResourceApi res = new api.DriveApi(mock).files; | 3279 api.FilesResourceApi res = new api.DriveApi(mock).files; |
| 3245 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 3280 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 3246 var path = (req.url).path; | 3281 var path = (req.url).path; |
| 3247 var pathOffset = 0; | 3282 var pathOffset = 0; |
| 3248 var index; | 3283 var index; |
| 3249 var subPart; | 3284 var subPart; |
| 3250 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 3285 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 3251 pathOffset += 1; | 3286 pathOffset += 1; |
| 3252 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("drive/v2/")); | 3287 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("drive/v2/")); |
| 3253 pathOffset += 9; | 3288 pathOffset += 9; |
| (...skipping 15 matching lines...) Expand all Loading... |
| 3269 var keyvalue = part.split("="); | 3304 var keyvalue = part.split("="); |
| 3270 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 3305 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 3271 } | 3306 } |
| 3272 } | 3307 } |
| 3273 | 3308 |
| 3274 | 3309 |
| 3275 var h = { | 3310 var h = { |
| 3276 "content-type" : "application/json; charset=utf-8", | 3311 "content-type" : "application/json; charset=utf-8", |
| 3277 }; | 3312 }; |
| 3278 var resp = ""; | 3313 var resp = ""; |
| 3279 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 3314 return new async.Future.value(stringResponse(200, h, resp)); |
| 3280 }), true); | 3315 }), true); |
| 3281 res.emptyTrash().then(unittest.expectAsync((_) {})); | 3316 res.emptyTrash().then(unittest.expectAsync((_) {})); |
| 3282 }); | 3317 }); |
| 3283 | 3318 |
| 3284 unittest.test("method--get", () { | 3319 unittest.test("method--get", () { |
| 3285 // TODO: Implement tests for media upload; | 3320 // TODO: Implement tests for media upload; |
| 3286 // TODO: Implement tests for media download; | 3321 // TODO: Implement tests for media download; |
| 3287 | 3322 |
| 3288 var mock = new common_test.HttpServerMock(); | 3323 var mock = new HttpServerMock(); |
| 3289 api.FilesResourceApi res = new api.DriveApi(mock).files; | 3324 api.FilesResourceApi res = new api.DriveApi(mock).files; |
| 3290 var arg_fileId = "foo"; | 3325 var arg_fileId = "foo"; |
| 3291 var arg_acknowledgeAbuse = true; | 3326 var arg_acknowledgeAbuse = true; |
| 3292 var arg_projection = "foo"; | 3327 var arg_projection = "foo"; |
| 3328 var arg_revisionId = "foo"; |
| 3293 var arg_updateViewedDate = true; | 3329 var arg_updateViewedDate = true; |
| 3294 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 3330 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 3295 var path = (req.url).path; | 3331 var path = (req.url).path; |
| 3296 var pathOffset = 0; | 3332 var pathOffset = 0; |
| 3297 var index; | 3333 var index; |
| 3298 var subPart; | 3334 var subPart; |
| 3299 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 3335 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 3300 pathOffset += 1; | 3336 pathOffset += 1; |
| 3301 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("drive/v2/")); | 3337 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("drive/v2/")); |
| 3302 pathOffset += 9; | 3338 pathOffset += 9; |
| (...skipping 14 matching lines...) Expand all Loading... |
| 3317 throw new core.ArgumentError("Invalid boolean: $n"); | 3353 throw new core.ArgumentError("Invalid boolean: $n"); |
| 3318 } | 3354 } |
| 3319 if (query.length > 0) { | 3355 if (query.length > 0) { |
| 3320 for (var part in query.split("&")) { | 3356 for (var part in query.split("&")) { |
| 3321 var keyvalue = part.split("="); | 3357 var keyvalue = part.split("="); |
| 3322 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 3358 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 3323 } | 3359 } |
| 3324 } | 3360 } |
| 3325 unittest.expect(queryMap["acknowledgeAbuse"].first, unittest.equals("$ar
g_acknowledgeAbuse")); | 3361 unittest.expect(queryMap["acknowledgeAbuse"].first, unittest.equals("$ar
g_acknowledgeAbuse")); |
| 3326 unittest.expect(queryMap["projection"].first, unittest.equals(arg_projec
tion)); | 3362 unittest.expect(queryMap["projection"].first, unittest.equals(arg_projec
tion)); |
| 3363 unittest.expect(queryMap["revisionId"].first, unittest.equals(arg_revisi
onId)); |
| 3327 unittest.expect(queryMap["updateViewedDate"].first, unittest.equals("$ar
g_updateViewedDate")); | 3364 unittest.expect(queryMap["updateViewedDate"].first, unittest.equals("$ar
g_updateViewedDate")); |
| 3328 | 3365 |
| 3329 | 3366 |
| 3330 var h = { | 3367 var h = { |
| 3331 "content-type" : "application/json; charset=utf-8", | 3368 "content-type" : "application/json; charset=utf-8", |
| 3332 }; | 3369 }; |
| 3333 var resp = convert.JSON.encode(buildFile()); | 3370 var resp = convert.JSON.encode(buildFile()); |
| 3334 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 3371 return new async.Future.value(stringResponse(200, h, resp)); |
| 3335 }), true); | 3372 }), true); |
| 3336 res.get(arg_fileId, acknowledgeAbuse: arg_acknowledgeAbuse, projection: ar
g_projection, updateViewedDate: arg_updateViewedDate).then(unittest.expectAsync(
((api.File response) { | 3373 res.get(arg_fileId, acknowledgeAbuse: arg_acknowledgeAbuse, projection: ar
g_projection, revisionId: arg_revisionId, updateViewedDate: arg_updateViewedDate
).then(unittest.expectAsync(((api.File response) { |
| 3337 checkFile(response); | 3374 checkFile(response); |
| 3338 }))); | 3375 }))); |
| 3339 }); | 3376 }); |
| 3340 | 3377 |
| 3341 unittest.test("method--insert", () { | 3378 unittest.test("method--insert", () { |
| 3342 // TODO: Implement tests for media upload; | 3379 // TODO: Implement tests for media upload; |
| 3343 // TODO: Implement tests for media download; | 3380 // TODO: Implement tests for media download; |
| 3344 | 3381 |
| 3345 var mock = new common_test.HttpServerMock(); | 3382 var mock = new HttpServerMock(); |
| 3346 api.FilesResourceApi res = new api.DriveApi(mock).files; | 3383 api.FilesResourceApi res = new api.DriveApi(mock).files; |
| 3347 var arg_request = buildFile(); | 3384 var arg_request = buildFile(); |
| 3348 var arg_convert = true; | 3385 var arg_convert = true; |
| 3349 var arg_ocr = true; | 3386 var arg_ocr = true; |
| 3350 var arg_ocrLanguage = "foo"; | 3387 var arg_ocrLanguage = "foo"; |
| 3351 var arg_pinned = true; | 3388 var arg_pinned = true; |
| 3352 var arg_timedTextLanguage = "foo"; | 3389 var arg_timedTextLanguage = "foo"; |
| 3353 var arg_timedTextTrackName = "foo"; | 3390 var arg_timedTextTrackName = "foo"; |
| 3354 var arg_useContentAsIndexableText = true; | 3391 var arg_useContentAsIndexableText = true; |
| 3355 var arg_visibility = "foo"; | 3392 var arg_visibility = "foo"; |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3391 unittest.expect(queryMap["timedTextLanguage"].first, unittest.equals(arg
_timedTextLanguage)); | 3428 unittest.expect(queryMap["timedTextLanguage"].first, unittest.equals(arg
_timedTextLanguage)); |
| 3392 unittest.expect(queryMap["timedTextTrackName"].first, unittest.equals(ar
g_timedTextTrackName)); | 3429 unittest.expect(queryMap["timedTextTrackName"].first, unittest.equals(ar
g_timedTextTrackName)); |
| 3393 unittest.expect(queryMap["useContentAsIndexableText"].first, unittest.eq
uals("$arg_useContentAsIndexableText")); | 3430 unittest.expect(queryMap["useContentAsIndexableText"].first, unittest.eq
uals("$arg_useContentAsIndexableText")); |
| 3394 unittest.expect(queryMap["visibility"].first, unittest.equals(arg_visibi
lity)); | 3431 unittest.expect(queryMap["visibility"].first, unittest.equals(arg_visibi
lity)); |
| 3395 | 3432 |
| 3396 | 3433 |
| 3397 var h = { | 3434 var h = { |
| 3398 "content-type" : "application/json; charset=utf-8", | 3435 "content-type" : "application/json; charset=utf-8", |
| 3399 }; | 3436 }; |
| 3400 var resp = convert.JSON.encode(buildFile()); | 3437 var resp = convert.JSON.encode(buildFile()); |
| 3401 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 3438 return new async.Future.value(stringResponse(200, h, resp)); |
| 3402 }), true); | 3439 }), true); |
| 3403 res.insert(arg_request, convert: arg_convert, ocr: arg_ocr, ocrLanguage: a
rg_ocrLanguage, pinned: arg_pinned, timedTextLanguage: arg_timedTextLanguage, ti
medTextTrackName: arg_timedTextTrackName, useContentAsIndexableText: arg_useCont
entAsIndexableText, visibility: arg_visibility).then(unittest.expectAsync(((api.
File response) { | 3440 res.insert(arg_request, convert: arg_convert, ocr: arg_ocr, ocrLanguage: a
rg_ocrLanguage, pinned: arg_pinned, timedTextLanguage: arg_timedTextLanguage, ti
medTextTrackName: arg_timedTextTrackName, useContentAsIndexableText: arg_useCont
entAsIndexableText, visibility: arg_visibility).then(unittest.expectAsync(((api.
File response) { |
| 3404 checkFile(response); | 3441 checkFile(response); |
| 3405 }))); | 3442 }))); |
| 3406 }); | 3443 }); |
| 3407 | 3444 |
| 3408 unittest.test("method--list", () { | 3445 unittest.test("method--list", () { |
| 3409 | 3446 |
| 3410 var mock = new common_test.HttpServerMock(); | 3447 var mock = new HttpServerMock(); |
| 3411 api.FilesResourceApi res = new api.DriveApi(mock).files; | 3448 api.FilesResourceApi res = new api.DriveApi(mock).files; |
| 3412 var arg_corpus = "foo"; | 3449 var arg_corpus = "foo"; |
| 3413 var arg_maxResults = 42; | 3450 var arg_maxResults = 42; |
| 3414 var arg_pageToken = "foo"; | 3451 var arg_pageToken = "foo"; |
| 3415 var arg_projection = "foo"; | 3452 var arg_projection = "foo"; |
| 3416 var arg_q = "foo"; | 3453 var arg_q = "foo"; |
| 3417 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 3454 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 3418 var path = (req.url).path; | 3455 var path = (req.url).path; |
| 3419 var pathOffset = 0; | 3456 var pathOffset = 0; |
| 3420 var index; | 3457 var index; |
| (...skipping 25 matching lines...) Expand all Loading... |
| 3446 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | 3483 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); |
| 3447 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | 3484 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); |
| 3448 unittest.expect(queryMap["projection"].first, unittest.equals(arg_projec
tion)); | 3485 unittest.expect(queryMap["projection"].first, unittest.equals(arg_projec
tion)); |
| 3449 unittest.expect(queryMap["q"].first, unittest.equals(arg_q)); | 3486 unittest.expect(queryMap["q"].first, unittest.equals(arg_q)); |
| 3450 | 3487 |
| 3451 | 3488 |
| 3452 var h = { | 3489 var h = { |
| 3453 "content-type" : "application/json; charset=utf-8", | 3490 "content-type" : "application/json; charset=utf-8", |
| 3454 }; | 3491 }; |
| 3455 var resp = convert.JSON.encode(buildFileList()); | 3492 var resp = convert.JSON.encode(buildFileList()); |
| 3456 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 3493 return new async.Future.value(stringResponse(200, h, resp)); |
| 3457 }), true); | 3494 }), true); |
| 3458 res.list(corpus: arg_corpus, maxResults: arg_maxResults, pageToken: arg_pa
geToken, projection: arg_projection, q: arg_q).then(unittest.expectAsync(((api.F
ileList response) { | 3495 res.list(corpus: arg_corpus, maxResults: arg_maxResults, pageToken: arg_pa
geToken, projection: arg_projection, q: arg_q).then(unittest.expectAsync(((api.F
ileList response) { |
| 3459 checkFileList(response); | 3496 checkFileList(response); |
| 3460 }))); | 3497 }))); |
| 3461 }); | 3498 }); |
| 3462 | 3499 |
| 3463 unittest.test("method--patch", () { | 3500 unittest.test("method--patch", () { |
| 3464 | 3501 |
| 3465 var mock = new common_test.HttpServerMock(); | 3502 var mock = new HttpServerMock(); |
| 3466 api.FilesResourceApi res = new api.DriveApi(mock).files; | 3503 api.FilesResourceApi res = new api.DriveApi(mock).files; |
| 3467 var arg_request = buildFile(); | 3504 var arg_request = buildFile(); |
| 3468 var arg_fileId = "foo"; | 3505 var arg_fileId = "foo"; |
| 3469 var arg_addParents = "foo"; | 3506 var arg_addParents = "foo"; |
| 3470 var arg_convert = true; | 3507 var arg_convert = true; |
| 3471 var arg_newRevision = true; | 3508 var arg_newRevision = true; |
| 3472 var arg_ocr = true; | 3509 var arg_ocr = true; |
| 3473 var arg_ocrLanguage = "foo"; | 3510 var arg_ocrLanguage = "foo"; |
| 3474 var arg_pinned = true; | 3511 var arg_pinned = true; |
| 3475 var arg_removeParents = "foo"; | 3512 var arg_removeParents = "foo"; |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3523 unittest.expect(queryMap["timedTextLanguage"].first, unittest.equals(arg
_timedTextLanguage)); | 3560 unittest.expect(queryMap["timedTextLanguage"].first, unittest.equals(arg
_timedTextLanguage)); |
| 3524 unittest.expect(queryMap["timedTextTrackName"].first, unittest.equals(ar
g_timedTextTrackName)); | 3561 unittest.expect(queryMap["timedTextTrackName"].first, unittest.equals(ar
g_timedTextTrackName)); |
| 3525 unittest.expect(queryMap["updateViewedDate"].first, unittest.equals("$ar
g_updateViewedDate")); | 3562 unittest.expect(queryMap["updateViewedDate"].first, unittest.equals("$ar
g_updateViewedDate")); |
| 3526 unittest.expect(queryMap["useContentAsIndexableText"].first, unittest.eq
uals("$arg_useContentAsIndexableText")); | 3563 unittest.expect(queryMap["useContentAsIndexableText"].first, unittest.eq
uals("$arg_useContentAsIndexableText")); |
| 3527 | 3564 |
| 3528 | 3565 |
| 3529 var h = { | 3566 var h = { |
| 3530 "content-type" : "application/json; charset=utf-8", | 3567 "content-type" : "application/json; charset=utf-8", |
| 3531 }; | 3568 }; |
| 3532 var resp = convert.JSON.encode(buildFile()); | 3569 var resp = convert.JSON.encode(buildFile()); |
| 3533 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 3570 return new async.Future.value(stringResponse(200, h, resp)); |
| 3534 }), true); | 3571 }), true); |
| 3535 res.patch(arg_request, arg_fileId, addParents: arg_addParents, convert: ar
g_convert, newRevision: arg_newRevision, ocr: arg_ocr, ocrLanguage: arg_ocrLangu
age, pinned: arg_pinned, removeParents: arg_removeParents, setModifiedDate: arg_
setModifiedDate, timedTextLanguage: arg_timedTextLanguage, timedTextTrackName: a
rg_timedTextTrackName, updateViewedDate: arg_updateViewedDate, useContentAsIndex
ableText: arg_useContentAsIndexableText).then(unittest.expectAsync(((api.File re
sponse) { | 3572 res.patch(arg_request, arg_fileId, addParents: arg_addParents, convert: ar
g_convert, newRevision: arg_newRevision, ocr: arg_ocr, ocrLanguage: arg_ocrLangu
age, pinned: arg_pinned, removeParents: arg_removeParents, setModifiedDate: arg_
setModifiedDate, timedTextLanguage: arg_timedTextLanguage, timedTextTrackName: a
rg_timedTextTrackName, updateViewedDate: arg_updateViewedDate, useContentAsIndex
ableText: arg_useContentAsIndexableText).then(unittest.expectAsync(((api.File re
sponse) { |
| 3536 checkFile(response); | 3573 checkFile(response); |
| 3537 }))); | 3574 }))); |
| 3538 }); | 3575 }); |
| 3539 | 3576 |
| 3540 unittest.test("method--touch", () { | 3577 unittest.test("method--touch", () { |
| 3541 | 3578 |
| 3542 var mock = new common_test.HttpServerMock(); | 3579 var mock = new HttpServerMock(); |
| 3543 api.FilesResourceApi res = new api.DriveApi(mock).files; | 3580 api.FilesResourceApi res = new api.DriveApi(mock).files; |
| 3544 var arg_fileId = "foo"; | 3581 var arg_fileId = "foo"; |
| 3545 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 3582 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 3546 var path = (req.url).path; | 3583 var path = (req.url).path; |
| 3547 var pathOffset = 0; | 3584 var pathOffset = 0; |
| 3548 var index; | 3585 var index; |
| 3549 var subPart; | 3586 var subPart; |
| 3550 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 3587 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 3551 pathOffset += 1; | 3588 pathOffset += 1; |
| 3552 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("drive/v2/")); | 3589 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("drive/v2/")); |
| (...skipping 23 matching lines...) Expand all Loading... |
| 3576 var keyvalue = part.split("="); | 3613 var keyvalue = part.split("="); |
| 3577 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 3614 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 3578 } | 3615 } |
| 3579 } | 3616 } |
| 3580 | 3617 |
| 3581 | 3618 |
| 3582 var h = { | 3619 var h = { |
| 3583 "content-type" : "application/json; charset=utf-8", | 3620 "content-type" : "application/json; charset=utf-8", |
| 3584 }; | 3621 }; |
| 3585 var resp = convert.JSON.encode(buildFile()); | 3622 var resp = convert.JSON.encode(buildFile()); |
| 3586 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 3623 return new async.Future.value(stringResponse(200, h, resp)); |
| 3587 }), true); | 3624 }), true); |
| 3588 res.touch(arg_fileId).then(unittest.expectAsync(((api.File response) { | 3625 res.touch(arg_fileId).then(unittest.expectAsync(((api.File response) { |
| 3589 checkFile(response); | 3626 checkFile(response); |
| 3590 }))); | 3627 }))); |
| 3591 }); | 3628 }); |
| 3592 | 3629 |
| 3593 unittest.test("method--trash", () { | 3630 unittest.test("method--trash", () { |
| 3594 | 3631 |
| 3595 var mock = new common_test.HttpServerMock(); | 3632 var mock = new HttpServerMock(); |
| 3596 api.FilesResourceApi res = new api.DriveApi(mock).files; | 3633 api.FilesResourceApi res = new api.DriveApi(mock).files; |
| 3597 var arg_fileId = "foo"; | 3634 var arg_fileId = "foo"; |
| 3598 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 3635 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 3599 var path = (req.url).path; | 3636 var path = (req.url).path; |
| 3600 var pathOffset = 0; | 3637 var pathOffset = 0; |
| 3601 var index; | 3638 var index; |
| 3602 var subPart; | 3639 var subPart; |
| 3603 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 3640 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 3604 pathOffset += 1; | 3641 pathOffset += 1; |
| 3605 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("drive/v2/")); | 3642 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("drive/v2/")); |
| (...skipping 23 matching lines...) Expand all Loading... |
| 3629 var keyvalue = part.split("="); | 3666 var keyvalue = part.split("="); |
| 3630 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 3667 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 3631 } | 3668 } |
| 3632 } | 3669 } |
| 3633 | 3670 |
| 3634 | 3671 |
| 3635 var h = { | 3672 var h = { |
| 3636 "content-type" : "application/json; charset=utf-8", | 3673 "content-type" : "application/json; charset=utf-8", |
| 3637 }; | 3674 }; |
| 3638 var resp = convert.JSON.encode(buildFile()); | 3675 var resp = convert.JSON.encode(buildFile()); |
| 3639 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 3676 return new async.Future.value(stringResponse(200, h, resp)); |
| 3640 }), true); | 3677 }), true); |
| 3641 res.trash(arg_fileId).then(unittest.expectAsync(((api.File response) { | 3678 res.trash(arg_fileId).then(unittest.expectAsync(((api.File response) { |
| 3642 checkFile(response); | 3679 checkFile(response); |
| 3643 }))); | 3680 }))); |
| 3644 }); | 3681 }); |
| 3645 | 3682 |
| 3646 unittest.test("method--untrash", () { | 3683 unittest.test("method--untrash", () { |
| 3647 | 3684 |
| 3648 var mock = new common_test.HttpServerMock(); | 3685 var mock = new HttpServerMock(); |
| 3649 api.FilesResourceApi res = new api.DriveApi(mock).files; | 3686 api.FilesResourceApi res = new api.DriveApi(mock).files; |
| 3650 var arg_fileId = "foo"; | 3687 var arg_fileId = "foo"; |
| 3651 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 3688 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 3652 var path = (req.url).path; | 3689 var path = (req.url).path; |
| 3653 var pathOffset = 0; | 3690 var pathOffset = 0; |
| 3654 var index; | 3691 var index; |
| 3655 var subPart; | 3692 var subPart; |
| 3656 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 3693 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 3657 pathOffset += 1; | 3694 pathOffset += 1; |
| 3658 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("drive/v2/")); | 3695 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("drive/v2/")); |
| (...skipping 23 matching lines...) Expand all Loading... |
| 3682 var keyvalue = part.split("="); | 3719 var keyvalue = part.split("="); |
| 3683 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 3720 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 3684 } | 3721 } |
| 3685 } | 3722 } |
| 3686 | 3723 |
| 3687 | 3724 |
| 3688 var h = { | 3725 var h = { |
| 3689 "content-type" : "application/json; charset=utf-8", | 3726 "content-type" : "application/json; charset=utf-8", |
| 3690 }; | 3727 }; |
| 3691 var resp = convert.JSON.encode(buildFile()); | 3728 var resp = convert.JSON.encode(buildFile()); |
| 3692 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 3729 return new async.Future.value(stringResponse(200, h, resp)); |
| 3693 }), true); | 3730 }), true); |
| 3694 res.untrash(arg_fileId).then(unittest.expectAsync(((api.File response) { | 3731 res.untrash(arg_fileId).then(unittest.expectAsync(((api.File response) { |
| 3695 checkFile(response); | 3732 checkFile(response); |
| 3696 }))); | 3733 }))); |
| 3697 }); | 3734 }); |
| 3698 | 3735 |
| 3699 unittest.test("method--update", () { | 3736 unittest.test("method--update", () { |
| 3700 // TODO: Implement tests for media upload; | 3737 // TODO: Implement tests for media upload; |
| 3701 // TODO: Implement tests for media download; | 3738 // TODO: Implement tests for media download; |
| 3702 | 3739 |
| 3703 var mock = new common_test.HttpServerMock(); | 3740 var mock = new HttpServerMock(); |
| 3704 api.FilesResourceApi res = new api.DriveApi(mock).files; | 3741 api.FilesResourceApi res = new api.DriveApi(mock).files; |
| 3705 var arg_request = buildFile(); | 3742 var arg_request = buildFile(); |
| 3706 var arg_fileId = "foo"; | 3743 var arg_fileId = "foo"; |
| 3707 var arg_addParents = "foo"; | 3744 var arg_addParents = "foo"; |
| 3708 var arg_convert = true; | 3745 var arg_convert = true; |
| 3709 var arg_newRevision = true; | 3746 var arg_newRevision = true; |
| 3710 var arg_ocr = true; | 3747 var arg_ocr = true; |
| 3711 var arg_ocrLanguage = "foo"; | 3748 var arg_ocrLanguage = "foo"; |
| 3712 var arg_pinned = true; | 3749 var arg_pinned = true; |
| 3713 var arg_removeParents = "foo"; | 3750 var arg_removeParents = "foo"; |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3761 unittest.expect(queryMap["timedTextLanguage"].first, unittest.equals(arg
_timedTextLanguage)); | 3798 unittest.expect(queryMap["timedTextLanguage"].first, unittest.equals(arg
_timedTextLanguage)); |
| 3762 unittest.expect(queryMap["timedTextTrackName"].first, unittest.equals(ar
g_timedTextTrackName)); | 3799 unittest.expect(queryMap["timedTextTrackName"].first, unittest.equals(ar
g_timedTextTrackName)); |
| 3763 unittest.expect(queryMap["updateViewedDate"].first, unittest.equals("$ar
g_updateViewedDate")); | 3800 unittest.expect(queryMap["updateViewedDate"].first, unittest.equals("$ar
g_updateViewedDate")); |
| 3764 unittest.expect(queryMap["useContentAsIndexableText"].first, unittest.eq
uals("$arg_useContentAsIndexableText")); | 3801 unittest.expect(queryMap["useContentAsIndexableText"].first, unittest.eq
uals("$arg_useContentAsIndexableText")); |
| 3765 | 3802 |
| 3766 | 3803 |
| 3767 var h = { | 3804 var h = { |
| 3768 "content-type" : "application/json; charset=utf-8", | 3805 "content-type" : "application/json; charset=utf-8", |
| 3769 }; | 3806 }; |
| 3770 var resp = convert.JSON.encode(buildFile()); | 3807 var resp = convert.JSON.encode(buildFile()); |
| 3771 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 3808 return new async.Future.value(stringResponse(200, h, resp)); |
| 3772 }), true); | 3809 }), true); |
| 3773 res.update(arg_request, arg_fileId, addParents: arg_addParents, convert: a
rg_convert, newRevision: arg_newRevision, ocr: arg_ocr, ocrLanguage: arg_ocrLang
uage, pinned: arg_pinned, removeParents: arg_removeParents, setModifiedDate: arg
_setModifiedDate, timedTextLanguage: arg_timedTextLanguage, timedTextTrackName:
arg_timedTextTrackName, updateViewedDate: arg_updateViewedDate, useContentAsInde
xableText: arg_useContentAsIndexableText).then(unittest.expectAsync(((api.File r
esponse) { | 3810 res.update(arg_request, arg_fileId, addParents: arg_addParents, convert: a
rg_convert, newRevision: arg_newRevision, ocr: arg_ocr, ocrLanguage: arg_ocrLang
uage, pinned: arg_pinned, removeParents: arg_removeParents, setModifiedDate: arg
_setModifiedDate, timedTextLanguage: arg_timedTextLanguage, timedTextTrackName:
arg_timedTextTrackName, updateViewedDate: arg_updateViewedDate, useContentAsInde
xableText: arg_useContentAsIndexableText).then(unittest.expectAsync(((api.File r
esponse) { |
| 3774 checkFile(response); | 3811 checkFile(response); |
| 3775 }))); | 3812 }))); |
| 3776 }); | 3813 }); |
| 3777 | 3814 |
| 3778 unittest.test("method--watch", () { | 3815 unittest.test("method--watch", () { |
| 3779 // TODO: Implement tests for media upload; | 3816 // TODO: Implement tests for media upload; |
| 3780 // TODO: Implement tests for media download; | 3817 // TODO: Implement tests for media download; |
| 3781 | 3818 |
| 3782 var mock = new common_test.HttpServerMock(); | 3819 var mock = new HttpServerMock(); |
| 3783 api.FilesResourceApi res = new api.DriveApi(mock).files; | 3820 api.FilesResourceApi res = new api.DriveApi(mock).files; |
| 3784 var arg_request = buildChannel(); | 3821 var arg_request = buildChannel(); |
| 3785 var arg_fileId = "foo"; | 3822 var arg_fileId = "foo"; |
| 3786 var arg_acknowledgeAbuse = true; | 3823 var arg_acknowledgeAbuse = true; |
| 3787 var arg_projection = "foo"; | 3824 var arg_projection = "foo"; |
| 3825 var arg_revisionId = "foo"; |
| 3788 var arg_updateViewedDate = true; | 3826 var arg_updateViewedDate = true; |
| 3789 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 3827 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 3790 var obj = new api.Channel.fromJson(json); | 3828 var obj = new api.Channel.fromJson(json); |
| 3791 checkChannel(obj); | 3829 checkChannel(obj); |
| 3792 | 3830 |
| 3793 var path = (req.url).path; | 3831 var path = (req.url).path; |
| 3794 var pathOffset = 0; | 3832 var pathOffset = 0; |
| 3795 var index; | 3833 var index; |
| 3796 var subPart; | 3834 var subPart; |
| 3797 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 3835 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| (...skipping 21 matching lines...) Expand all Loading... |
| 3819 throw new core.ArgumentError("Invalid boolean: $n"); | 3857 throw new core.ArgumentError("Invalid boolean: $n"); |
| 3820 } | 3858 } |
| 3821 if (query.length > 0) { | 3859 if (query.length > 0) { |
| 3822 for (var part in query.split("&")) { | 3860 for (var part in query.split("&")) { |
| 3823 var keyvalue = part.split("="); | 3861 var keyvalue = part.split("="); |
| 3824 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 3862 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 3825 } | 3863 } |
| 3826 } | 3864 } |
| 3827 unittest.expect(queryMap["acknowledgeAbuse"].first, unittest.equals("$ar
g_acknowledgeAbuse")); | 3865 unittest.expect(queryMap["acknowledgeAbuse"].first, unittest.equals("$ar
g_acknowledgeAbuse")); |
| 3828 unittest.expect(queryMap["projection"].first, unittest.equals(arg_projec
tion)); | 3866 unittest.expect(queryMap["projection"].first, unittest.equals(arg_projec
tion)); |
| 3867 unittest.expect(queryMap["revisionId"].first, unittest.equals(arg_revisi
onId)); |
| 3829 unittest.expect(queryMap["updateViewedDate"].first, unittest.equals("$ar
g_updateViewedDate")); | 3868 unittest.expect(queryMap["updateViewedDate"].first, unittest.equals("$ar
g_updateViewedDate")); |
| 3830 | 3869 |
| 3831 | 3870 |
| 3832 var h = { | 3871 var h = { |
| 3833 "content-type" : "application/json; charset=utf-8", | 3872 "content-type" : "application/json; charset=utf-8", |
| 3834 }; | 3873 }; |
| 3835 var resp = convert.JSON.encode(buildChannel()); | 3874 var resp = convert.JSON.encode(buildChannel()); |
| 3836 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 3875 return new async.Future.value(stringResponse(200, h, resp)); |
| 3837 }), true); | 3876 }), true); |
| 3838 res.watch(arg_request, arg_fileId, acknowledgeAbuse: arg_acknowledgeAbuse,
projection: arg_projection, updateViewedDate: arg_updateViewedDate).then(unitte
st.expectAsync(((api.Channel response) { | 3877 res.watch(arg_request, arg_fileId, acknowledgeAbuse: arg_acknowledgeAbuse,
projection: arg_projection, revisionId: arg_revisionId, updateViewedDate: arg_u
pdateViewedDate).then(unittest.expectAsync(((api.Channel response) { |
| 3839 checkChannel(response); | 3878 checkChannel(response); |
| 3840 }))); | 3879 }))); |
| 3841 }); | 3880 }); |
| 3842 | 3881 |
| 3843 }); | 3882 }); |
| 3844 | 3883 |
| 3845 | 3884 |
| 3846 unittest.group("resource-ParentsResourceApi", () { | 3885 unittest.group("resource-ParentsResourceApi", () { |
| 3847 unittest.test("method--delete", () { | 3886 unittest.test("method--delete", () { |
| 3848 | 3887 |
| 3849 var mock = new common_test.HttpServerMock(); | 3888 var mock = new HttpServerMock(); |
| 3850 api.ParentsResourceApi res = new api.DriveApi(mock).parents; | 3889 api.ParentsResourceApi res = new api.DriveApi(mock).parents; |
| 3851 var arg_fileId = "foo"; | 3890 var arg_fileId = "foo"; |
| 3852 var arg_parentId = "foo"; | 3891 var arg_parentId = "foo"; |
| 3853 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 3892 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 3854 var path = (req.url).path; | 3893 var path = (req.url).path; |
| 3855 var pathOffset = 0; | 3894 var pathOffset = 0; |
| 3856 var index; | 3895 var index; |
| 3857 var subPart; | 3896 var subPart; |
| 3858 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 3897 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 3859 pathOffset += 1; | 3898 pathOffset += 1; |
| (...skipping 27 matching lines...) Expand all Loading... |
| 3887 var keyvalue = part.split("="); | 3926 var keyvalue = part.split("="); |
| 3888 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 3927 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 3889 } | 3928 } |
| 3890 } | 3929 } |
| 3891 | 3930 |
| 3892 | 3931 |
| 3893 var h = { | 3932 var h = { |
| 3894 "content-type" : "application/json; charset=utf-8", | 3933 "content-type" : "application/json; charset=utf-8", |
| 3895 }; | 3934 }; |
| 3896 var resp = ""; | 3935 var resp = ""; |
| 3897 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 3936 return new async.Future.value(stringResponse(200, h, resp)); |
| 3898 }), true); | 3937 }), true); |
| 3899 res.delete(arg_fileId, arg_parentId).then(unittest.expectAsync((_) {})); | 3938 res.delete(arg_fileId, arg_parentId).then(unittest.expectAsync((_) {})); |
| 3900 }); | 3939 }); |
| 3901 | 3940 |
| 3902 unittest.test("method--get", () { | 3941 unittest.test("method--get", () { |
| 3903 | 3942 |
| 3904 var mock = new common_test.HttpServerMock(); | 3943 var mock = new HttpServerMock(); |
| 3905 api.ParentsResourceApi res = new api.DriveApi(mock).parents; | 3944 api.ParentsResourceApi res = new api.DriveApi(mock).parents; |
| 3906 var arg_fileId = "foo"; | 3945 var arg_fileId = "foo"; |
| 3907 var arg_parentId = "foo"; | 3946 var arg_parentId = "foo"; |
| 3908 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 3947 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 3909 var path = (req.url).path; | 3948 var path = (req.url).path; |
| 3910 var pathOffset = 0; | 3949 var pathOffset = 0; |
| 3911 var index; | 3950 var index; |
| 3912 var subPart; | 3951 var subPart; |
| 3913 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 3952 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 3914 pathOffset += 1; | 3953 pathOffset += 1; |
| (...skipping 27 matching lines...) Expand all Loading... |
| 3942 var keyvalue = part.split("="); | 3981 var keyvalue = part.split("="); |
| 3943 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 3982 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 3944 } | 3983 } |
| 3945 } | 3984 } |
| 3946 | 3985 |
| 3947 | 3986 |
| 3948 var h = { | 3987 var h = { |
| 3949 "content-type" : "application/json; charset=utf-8", | 3988 "content-type" : "application/json; charset=utf-8", |
| 3950 }; | 3989 }; |
| 3951 var resp = convert.JSON.encode(buildParentReference()); | 3990 var resp = convert.JSON.encode(buildParentReference()); |
| 3952 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 3991 return new async.Future.value(stringResponse(200, h, resp)); |
| 3953 }), true); | 3992 }), true); |
| 3954 res.get(arg_fileId, arg_parentId).then(unittest.expectAsync(((api.ParentRe
ference response) { | 3993 res.get(arg_fileId, arg_parentId).then(unittest.expectAsync(((api.ParentRe
ference response) { |
| 3955 checkParentReference(response); | 3994 checkParentReference(response); |
| 3956 }))); | 3995 }))); |
| 3957 }); | 3996 }); |
| 3958 | 3997 |
| 3959 unittest.test("method--insert", () { | 3998 unittest.test("method--insert", () { |
| 3960 | 3999 |
| 3961 var mock = new common_test.HttpServerMock(); | 4000 var mock = new HttpServerMock(); |
| 3962 api.ParentsResourceApi res = new api.DriveApi(mock).parents; | 4001 api.ParentsResourceApi res = new api.DriveApi(mock).parents; |
| 3963 var arg_request = buildParentReference(); | 4002 var arg_request = buildParentReference(); |
| 3964 var arg_fileId = "foo"; | 4003 var arg_fileId = "foo"; |
| 3965 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 4004 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 3966 var obj = new api.ParentReference.fromJson(json); | 4005 var obj = new api.ParentReference.fromJson(json); |
| 3967 checkParentReference(obj); | 4006 checkParentReference(obj); |
| 3968 | 4007 |
| 3969 var path = (req.url).path; | 4008 var path = (req.url).path; |
| 3970 var pathOffset = 0; | 4009 var pathOffset = 0; |
| 3971 var index; | 4010 var index; |
| (...skipping 27 matching lines...) Expand all Loading... |
| 3999 var keyvalue = part.split("="); | 4038 var keyvalue = part.split("="); |
| 4000 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 4039 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 4001 } | 4040 } |
| 4002 } | 4041 } |
| 4003 | 4042 |
| 4004 | 4043 |
| 4005 var h = { | 4044 var h = { |
| 4006 "content-type" : "application/json; charset=utf-8", | 4045 "content-type" : "application/json; charset=utf-8", |
| 4007 }; | 4046 }; |
| 4008 var resp = convert.JSON.encode(buildParentReference()); | 4047 var resp = convert.JSON.encode(buildParentReference()); |
| 4009 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 4048 return new async.Future.value(stringResponse(200, h, resp)); |
| 4010 }), true); | 4049 }), true); |
| 4011 res.insert(arg_request, arg_fileId).then(unittest.expectAsync(((api.Parent
Reference response) { | 4050 res.insert(arg_request, arg_fileId).then(unittest.expectAsync(((api.Parent
Reference response) { |
| 4012 checkParentReference(response); | 4051 checkParentReference(response); |
| 4013 }))); | 4052 }))); |
| 4014 }); | 4053 }); |
| 4015 | 4054 |
| 4016 unittest.test("method--list", () { | 4055 unittest.test("method--list", () { |
| 4017 | 4056 |
| 4018 var mock = new common_test.HttpServerMock(); | 4057 var mock = new HttpServerMock(); |
| 4019 api.ParentsResourceApi res = new api.DriveApi(mock).parents; | 4058 api.ParentsResourceApi res = new api.DriveApi(mock).parents; |
| 4020 var arg_fileId = "foo"; | 4059 var arg_fileId = "foo"; |
| 4021 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 4060 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 4022 var path = (req.url).path; | 4061 var path = (req.url).path; |
| 4023 var pathOffset = 0; | 4062 var pathOffset = 0; |
| 4024 var index; | 4063 var index; |
| 4025 var subPart; | 4064 var subPart; |
| 4026 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 4065 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 4027 pathOffset += 1; | 4066 pathOffset += 1; |
| 4028 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("drive/v2/")); | 4067 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("drive/v2/")); |
| (...skipping 23 matching lines...) Expand all Loading... |
| 4052 var keyvalue = part.split("="); | 4091 var keyvalue = part.split("="); |
| 4053 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 4092 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 4054 } | 4093 } |
| 4055 } | 4094 } |
| 4056 | 4095 |
| 4057 | 4096 |
| 4058 var h = { | 4097 var h = { |
| 4059 "content-type" : "application/json; charset=utf-8", | 4098 "content-type" : "application/json; charset=utf-8", |
| 4060 }; | 4099 }; |
| 4061 var resp = convert.JSON.encode(buildParentList()); | 4100 var resp = convert.JSON.encode(buildParentList()); |
| 4062 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 4101 return new async.Future.value(stringResponse(200, h, resp)); |
| 4063 }), true); | 4102 }), true); |
| 4064 res.list(arg_fileId).then(unittest.expectAsync(((api.ParentList response)
{ | 4103 res.list(arg_fileId).then(unittest.expectAsync(((api.ParentList response)
{ |
| 4065 checkParentList(response); | 4104 checkParentList(response); |
| 4066 }))); | 4105 }))); |
| 4067 }); | 4106 }); |
| 4068 | 4107 |
| 4069 }); | 4108 }); |
| 4070 | 4109 |
| 4071 | 4110 |
| 4072 unittest.group("resource-PermissionsResourceApi", () { | 4111 unittest.group("resource-PermissionsResourceApi", () { |
| 4073 unittest.test("method--delete", () { | 4112 unittest.test("method--delete", () { |
| 4074 | 4113 |
| 4075 var mock = new common_test.HttpServerMock(); | 4114 var mock = new HttpServerMock(); |
| 4076 api.PermissionsResourceApi res = new api.DriveApi(mock).permissions; | 4115 api.PermissionsResourceApi res = new api.DriveApi(mock).permissions; |
| 4077 var arg_fileId = "foo"; | 4116 var arg_fileId = "foo"; |
| 4078 var arg_permissionId = "foo"; | 4117 var arg_permissionId = "foo"; |
| 4079 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 4118 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 4080 var path = (req.url).path; | 4119 var path = (req.url).path; |
| 4081 var pathOffset = 0; | 4120 var pathOffset = 0; |
| 4082 var index; | 4121 var index; |
| 4083 var subPart; | 4122 var subPart; |
| 4084 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 4123 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 4085 pathOffset += 1; | 4124 pathOffset += 1; |
| (...skipping 27 matching lines...) Expand all Loading... |
| 4113 var keyvalue = part.split("="); | 4152 var keyvalue = part.split("="); |
| 4114 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 4153 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 4115 } | 4154 } |
| 4116 } | 4155 } |
| 4117 | 4156 |
| 4118 | 4157 |
| 4119 var h = { | 4158 var h = { |
| 4120 "content-type" : "application/json; charset=utf-8", | 4159 "content-type" : "application/json; charset=utf-8", |
| 4121 }; | 4160 }; |
| 4122 var resp = ""; | 4161 var resp = ""; |
| 4123 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 4162 return new async.Future.value(stringResponse(200, h, resp)); |
| 4124 }), true); | 4163 }), true); |
| 4125 res.delete(arg_fileId, arg_permissionId).then(unittest.expectAsync((_) {})
); | 4164 res.delete(arg_fileId, arg_permissionId).then(unittest.expectAsync((_) {})
); |
| 4126 }); | 4165 }); |
| 4127 | 4166 |
| 4128 unittest.test("method--get", () { | 4167 unittest.test("method--get", () { |
| 4129 | 4168 |
| 4130 var mock = new common_test.HttpServerMock(); | 4169 var mock = new HttpServerMock(); |
| 4131 api.PermissionsResourceApi res = new api.DriveApi(mock).permissions; | 4170 api.PermissionsResourceApi res = new api.DriveApi(mock).permissions; |
| 4132 var arg_fileId = "foo"; | 4171 var arg_fileId = "foo"; |
| 4133 var arg_permissionId = "foo"; | 4172 var arg_permissionId = "foo"; |
| 4134 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 4173 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 4135 var path = (req.url).path; | 4174 var path = (req.url).path; |
| 4136 var pathOffset = 0; | 4175 var pathOffset = 0; |
| 4137 var index; | 4176 var index; |
| 4138 var subPart; | 4177 var subPart; |
| 4139 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 4178 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 4140 pathOffset += 1; | 4179 pathOffset += 1; |
| (...skipping 27 matching lines...) Expand all Loading... |
| 4168 var keyvalue = part.split("="); | 4207 var keyvalue = part.split("="); |
| 4169 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 4208 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 4170 } | 4209 } |
| 4171 } | 4210 } |
| 4172 | 4211 |
| 4173 | 4212 |
| 4174 var h = { | 4213 var h = { |
| 4175 "content-type" : "application/json; charset=utf-8", | 4214 "content-type" : "application/json; charset=utf-8", |
| 4176 }; | 4215 }; |
| 4177 var resp = convert.JSON.encode(buildPermission()); | 4216 var resp = convert.JSON.encode(buildPermission()); |
| 4178 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 4217 return new async.Future.value(stringResponse(200, h, resp)); |
| 4179 }), true); | 4218 }), true); |
| 4180 res.get(arg_fileId, arg_permissionId).then(unittest.expectAsync(((api.Perm
ission response) { | 4219 res.get(arg_fileId, arg_permissionId).then(unittest.expectAsync(((api.Perm
ission response) { |
| 4181 checkPermission(response); | 4220 checkPermission(response); |
| 4182 }))); | 4221 }))); |
| 4183 }); | 4222 }); |
| 4184 | 4223 |
| 4185 unittest.test("method--getIdForEmail", () { | 4224 unittest.test("method--getIdForEmail", () { |
| 4186 | 4225 |
| 4187 var mock = new common_test.HttpServerMock(); | 4226 var mock = new HttpServerMock(); |
| 4188 api.PermissionsResourceApi res = new api.DriveApi(mock).permissions; | 4227 api.PermissionsResourceApi res = new api.DriveApi(mock).permissions; |
| 4189 var arg_email = "foo"; | 4228 var arg_email = "foo"; |
| 4190 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 4229 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 4191 var path = (req.url).path; | 4230 var path = (req.url).path; |
| 4192 var pathOffset = 0; | 4231 var pathOffset = 0; |
| 4193 var index; | 4232 var index; |
| 4194 var subPart; | 4233 var subPart; |
| 4195 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 4234 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 4196 pathOffset += 1; | 4235 pathOffset += 1; |
| 4197 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("drive/v2/")); | 4236 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("drive/v2/")); |
| (...skipping 19 matching lines...) Expand all Loading... |
| 4217 var keyvalue = part.split("="); | 4256 var keyvalue = part.split("="); |
| 4218 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 4257 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 4219 } | 4258 } |
| 4220 } | 4259 } |
| 4221 | 4260 |
| 4222 | 4261 |
| 4223 var h = { | 4262 var h = { |
| 4224 "content-type" : "application/json; charset=utf-8", | 4263 "content-type" : "application/json; charset=utf-8", |
| 4225 }; | 4264 }; |
| 4226 var resp = convert.JSON.encode(buildPermissionId()); | 4265 var resp = convert.JSON.encode(buildPermissionId()); |
| 4227 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 4266 return new async.Future.value(stringResponse(200, h, resp)); |
| 4228 }), true); | 4267 }), true); |
| 4229 res.getIdForEmail(arg_email).then(unittest.expectAsync(((api.PermissionId
response) { | 4268 res.getIdForEmail(arg_email).then(unittest.expectAsync(((api.PermissionId
response) { |
| 4230 checkPermissionId(response); | 4269 checkPermissionId(response); |
| 4231 }))); | 4270 }))); |
| 4232 }); | 4271 }); |
| 4233 | 4272 |
| 4234 unittest.test("method--insert", () { | 4273 unittest.test("method--insert", () { |
| 4235 | 4274 |
| 4236 var mock = new common_test.HttpServerMock(); | 4275 var mock = new HttpServerMock(); |
| 4237 api.PermissionsResourceApi res = new api.DriveApi(mock).permissions; | 4276 api.PermissionsResourceApi res = new api.DriveApi(mock).permissions; |
| 4238 var arg_request = buildPermission(); | 4277 var arg_request = buildPermission(); |
| 4239 var arg_fileId = "foo"; | 4278 var arg_fileId = "foo"; |
| 4240 var arg_emailMessage = "foo"; | 4279 var arg_emailMessage = "foo"; |
| 4241 var arg_sendNotificationEmails = true; | 4280 var arg_sendNotificationEmails = true; |
| 4242 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 4281 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 4243 var obj = new api.Permission.fromJson(json); | 4282 var obj = new api.Permission.fromJson(json); |
| 4244 checkPermission(obj); | 4283 checkPermission(obj); |
| 4245 | 4284 |
| 4246 var path = (req.url).path; | 4285 var path = (req.url).path; |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4278 } | 4317 } |
| 4279 } | 4318 } |
| 4280 unittest.expect(queryMap["emailMessage"].first, unittest.equals(arg_emai
lMessage)); | 4319 unittest.expect(queryMap["emailMessage"].first, unittest.equals(arg_emai
lMessage)); |
| 4281 unittest.expect(queryMap["sendNotificationEmails"].first, unittest.equal
s("$arg_sendNotificationEmails")); | 4320 unittest.expect(queryMap["sendNotificationEmails"].first, unittest.equal
s("$arg_sendNotificationEmails")); |
| 4282 | 4321 |
| 4283 | 4322 |
| 4284 var h = { | 4323 var h = { |
| 4285 "content-type" : "application/json; charset=utf-8", | 4324 "content-type" : "application/json; charset=utf-8", |
| 4286 }; | 4325 }; |
| 4287 var resp = convert.JSON.encode(buildPermission()); | 4326 var resp = convert.JSON.encode(buildPermission()); |
| 4288 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 4327 return new async.Future.value(stringResponse(200, h, resp)); |
| 4289 }), true); | 4328 }), true); |
| 4290 res.insert(arg_request, arg_fileId, emailMessage: arg_emailMessage, sendNo
tificationEmails: arg_sendNotificationEmails).then(unittest.expectAsync(((api.Pe
rmission response) { | 4329 res.insert(arg_request, arg_fileId, emailMessage: arg_emailMessage, sendNo
tificationEmails: arg_sendNotificationEmails).then(unittest.expectAsync(((api.Pe
rmission response) { |
| 4291 checkPermission(response); | 4330 checkPermission(response); |
| 4292 }))); | 4331 }))); |
| 4293 }); | 4332 }); |
| 4294 | 4333 |
| 4295 unittest.test("method--list", () { | 4334 unittest.test("method--list", () { |
| 4296 | 4335 |
| 4297 var mock = new common_test.HttpServerMock(); | 4336 var mock = new HttpServerMock(); |
| 4298 api.PermissionsResourceApi res = new api.DriveApi(mock).permissions; | 4337 api.PermissionsResourceApi res = new api.DriveApi(mock).permissions; |
| 4299 var arg_fileId = "foo"; | 4338 var arg_fileId = "foo"; |
| 4300 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 4339 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 4301 var path = (req.url).path; | 4340 var path = (req.url).path; |
| 4302 var pathOffset = 0; | 4341 var pathOffset = 0; |
| 4303 var index; | 4342 var index; |
| 4304 var subPart; | 4343 var subPart; |
| 4305 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 4344 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 4306 pathOffset += 1; | 4345 pathOffset += 1; |
| 4307 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("drive/v2/")); | 4346 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("drive/v2/")); |
| (...skipping 23 matching lines...) Expand all Loading... |
| 4331 var keyvalue = part.split("="); | 4370 var keyvalue = part.split("="); |
| 4332 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 4371 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 4333 } | 4372 } |
| 4334 } | 4373 } |
| 4335 | 4374 |
| 4336 | 4375 |
| 4337 var h = { | 4376 var h = { |
| 4338 "content-type" : "application/json; charset=utf-8", | 4377 "content-type" : "application/json; charset=utf-8", |
| 4339 }; | 4378 }; |
| 4340 var resp = convert.JSON.encode(buildPermissionList()); | 4379 var resp = convert.JSON.encode(buildPermissionList()); |
| 4341 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 4380 return new async.Future.value(stringResponse(200, h, resp)); |
| 4342 }), true); | 4381 }), true); |
| 4343 res.list(arg_fileId).then(unittest.expectAsync(((api.PermissionList respon
se) { | 4382 res.list(arg_fileId).then(unittest.expectAsync(((api.PermissionList respon
se) { |
| 4344 checkPermissionList(response); | 4383 checkPermissionList(response); |
| 4345 }))); | 4384 }))); |
| 4346 }); | 4385 }); |
| 4347 | 4386 |
| 4348 unittest.test("method--patch", () { | 4387 unittest.test("method--patch", () { |
| 4349 | 4388 |
| 4350 var mock = new common_test.HttpServerMock(); | 4389 var mock = new HttpServerMock(); |
| 4351 api.PermissionsResourceApi res = new api.DriveApi(mock).permissions; | 4390 api.PermissionsResourceApi res = new api.DriveApi(mock).permissions; |
| 4352 var arg_request = buildPermission(); | 4391 var arg_request = buildPermission(); |
| 4353 var arg_fileId = "foo"; | 4392 var arg_fileId = "foo"; |
| 4354 var arg_permissionId = "foo"; | 4393 var arg_permissionId = "foo"; |
| 4355 var arg_transferOwnership = true; | 4394 var arg_transferOwnership = true; |
| 4356 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 4395 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 4357 var obj = new api.Permission.fromJson(json); | 4396 var obj = new api.Permission.fromJson(json); |
| 4358 checkPermission(obj); | 4397 checkPermission(obj); |
| 4359 | 4398 |
| 4360 var path = (req.url).path; | 4399 var path = (req.url).path; |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4394 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 4433 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 4395 } | 4434 } |
| 4396 } | 4435 } |
| 4397 unittest.expect(queryMap["transferOwnership"].first, unittest.equals("$a
rg_transferOwnership")); | 4436 unittest.expect(queryMap["transferOwnership"].first, unittest.equals("$a
rg_transferOwnership")); |
| 4398 | 4437 |
| 4399 | 4438 |
| 4400 var h = { | 4439 var h = { |
| 4401 "content-type" : "application/json; charset=utf-8", | 4440 "content-type" : "application/json; charset=utf-8", |
| 4402 }; | 4441 }; |
| 4403 var resp = convert.JSON.encode(buildPermission()); | 4442 var resp = convert.JSON.encode(buildPermission()); |
| 4404 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 4443 return new async.Future.value(stringResponse(200, h, resp)); |
| 4405 }), true); | 4444 }), true); |
| 4406 res.patch(arg_request, arg_fileId, arg_permissionId, transferOwnership: ar
g_transferOwnership).then(unittest.expectAsync(((api.Permission response) { | 4445 res.patch(arg_request, arg_fileId, arg_permissionId, transferOwnership: ar
g_transferOwnership).then(unittest.expectAsync(((api.Permission response) { |
| 4407 checkPermission(response); | 4446 checkPermission(response); |
| 4408 }))); | 4447 }))); |
| 4409 }); | 4448 }); |
| 4410 | 4449 |
| 4411 unittest.test("method--update", () { | 4450 unittest.test("method--update", () { |
| 4412 | 4451 |
| 4413 var mock = new common_test.HttpServerMock(); | 4452 var mock = new HttpServerMock(); |
| 4414 api.PermissionsResourceApi res = new api.DriveApi(mock).permissions; | 4453 api.PermissionsResourceApi res = new api.DriveApi(mock).permissions; |
| 4415 var arg_request = buildPermission(); | 4454 var arg_request = buildPermission(); |
| 4416 var arg_fileId = "foo"; | 4455 var arg_fileId = "foo"; |
| 4417 var arg_permissionId = "foo"; | 4456 var arg_permissionId = "foo"; |
| 4418 var arg_transferOwnership = true; | 4457 var arg_transferOwnership = true; |
| 4419 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 4458 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 4420 var obj = new api.Permission.fromJson(json); | 4459 var obj = new api.Permission.fromJson(json); |
| 4421 checkPermission(obj); | 4460 checkPermission(obj); |
| 4422 | 4461 |
| 4423 var path = (req.url).path; | 4462 var path = (req.url).path; |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4457 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 4496 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 4458 } | 4497 } |
| 4459 } | 4498 } |
| 4460 unittest.expect(queryMap["transferOwnership"].first, unittest.equals("$a
rg_transferOwnership")); | 4499 unittest.expect(queryMap["transferOwnership"].first, unittest.equals("$a
rg_transferOwnership")); |
| 4461 | 4500 |
| 4462 | 4501 |
| 4463 var h = { | 4502 var h = { |
| 4464 "content-type" : "application/json; charset=utf-8", | 4503 "content-type" : "application/json; charset=utf-8", |
| 4465 }; | 4504 }; |
| 4466 var resp = convert.JSON.encode(buildPermission()); | 4505 var resp = convert.JSON.encode(buildPermission()); |
| 4467 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 4506 return new async.Future.value(stringResponse(200, h, resp)); |
| 4468 }), true); | 4507 }), true); |
| 4469 res.update(arg_request, arg_fileId, arg_permissionId, transferOwnership: a
rg_transferOwnership).then(unittest.expectAsync(((api.Permission response) { | 4508 res.update(arg_request, arg_fileId, arg_permissionId, transferOwnership: a
rg_transferOwnership).then(unittest.expectAsync(((api.Permission response) { |
| 4470 checkPermission(response); | 4509 checkPermission(response); |
| 4471 }))); | 4510 }))); |
| 4472 }); | 4511 }); |
| 4473 | 4512 |
| 4474 }); | 4513 }); |
| 4475 | 4514 |
| 4476 | 4515 |
| 4477 unittest.group("resource-PropertiesResourceApi", () { | 4516 unittest.group("resource-PropertiesResourceApi", () { |
| 4478 unittest.test("method--delete", () { | 4517 unittest.test("method--delete", () { |
| 4479 | 4518 |
| 4480 var mock = new common_test.HttpServerMock(); | 4519 var mock = new HttpServerMock(); |
| 4481 api.PropertiesResourceApi res = new api.DriveApi(mock).properties; | 4520 api.PropertiesResourceApi res = new api.DriveApi(mock).properties; |
| 4482 var arg_fileId = "foo"; | 4521 var arg_fileId = "foo"; |
| 4483 var arg_propertyKey = "foo"; | 4522 var arg_propertyKey = "foo"; |
| 4484 var arg_visibility = "foo"; | 4523 var arg_visibility = "foo"; |
| 4485 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 4524 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 4486 var path = (req.url).path; | 4525 var path = (req.url).path; |
| 4487 var pathOffset = 0; | 4526 var pathOffset = 0; |
| 4488 var index; | 4527 var index; |
| 4489 var subPart; | 4528 var subPart; |
| 4490 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 4529 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| (...skipping 29 matching lines...) Expand all Loading... |
| 4520 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 4559 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 4521 } | 4560 } |
| 4522 } | 4561 } |
| 4523 unittest.expect(queryMap["visibility"].first, unittest.equals(arg_visibi
lity)); | 4562 unittest.expect(queryMap["visibility"].first, unittest.equals(arg_visibi
lity)); |
| 4524 | 4563 |
| 4525 | 4564 |
| 4526 var h = { | 4565 var h = { |
| 4527 "content-type" : "application/json; charset=utf-8", | 4566 "content-type" : "application/json; charset=utf-8", |
| 4528 }; | 4567 }; |
| 4529 var resp = ""; | 4568 var resp = ""; |
| 4530 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 4569 return new async.Future.value(stringResponse(200, h, resp)); |
| 4531 }), true); | 4570 }), true); |
| 4532 res.delete(arg_fileId, arg_propertyKey, visibility: arg_visibility).then(u
nittest.expectAsync((_) {})); | 4571 res.delete(arg_fileId, arg_propertyKey, visibility: arg_visibility).then(u
nittest.expectAsync((_) {})); |
| 4533 }); | 4572 }); |
| 4534 | 4573 |
| 4535 unittest.test("method--get", () { | 4574 unittest.test("method--get", () { |
| 4536 | 4575 |
| 4537 var mock = new common_test.HttpServerMock(); | 4576 var mock = new HttpServerMock(); |
| 4538 api.PropertiesResourceApi res = new api.DriveApi(mock).properties; | 4577 api.PropertiesResourceApi res = new api.DriveApi(mock).properties; |
| 4539 var arg_fileId = "foo"; | 4578 var arg_fileId = "foo"; |
| 4540 var arg_propertyKey = "foo"; | 4579 var arg_propertyKey = "foo"; |
| 4541 var arg_visibility = "foo"; | 4580 var arg_visibility = "foo"; |
| 4542 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 4581 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 4543 var path = (req.url).path; | 4582 var path = (req.url).path; |
| 4544 var pathOffset = 0; | 4583 var pathOffset = 0; |
| 4545 var index; | 4584 var index; |
| 4546 var subPart; | 4585 var subPart; |
| 4547 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 4586 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| (...skipping 29 matching lines...) Expand all Loading... |
| 4577 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 4616 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 4578 } | 4617 } |
| 4579 } | 4618 } |
| 4580 unittest.expect(queryMap["visibility"].first, unittest.equals(arg_visibi
lity)); | 4619 unittest.expect(queryMap["visibility"].first, unittest.equals(arg_visibi
lity)); |
| 4581 | 4620 |
| 4582 | 4621 |
| 4583 var h = { | 4622 var h = { |
| 4584 "content-type" : "application/json; charset=utf-8", | 4623 "content-type" : "application/json; charset=utf-8", |
| 4585 }; | 4624 }; |
| 4586 var resp = convert.JSON.encode(buildProperty()); | 4625 var resp = convert.JSON.encode(buildProperty()); |
| 4587 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 4626 return new async.Future.value(stringResponse(200, h, resp)); |
| 4588 }), true); | 4627 }), true); |
| 4589 res.get(arg_fileId, arg_propertyKey, visibility: arg_visibility).then(unit
test.expectAsync(((api.Property response) { | 4628 res.get(arg_fileId, arg_propertyKey, visibility: arg_visibility).then(unit
test.expectAsync(((api.Property response) { |
| 4590 checkProperty(response); | 4629 checkProperty(response); |
| 4591 }))); | 4630 }))); |
| 4592 }); | 4631 }); |
| 4593 | 4632 |
| 4594 unittest.test("method--insert", () { | 4633 unittest.test("method--insert", () { |
| 4595 | 4634 |
| 4596 var mock = new common_test.HttpServerMock(); | 4635 var mock = new HttpServerMock(); |
| 4597 api.PropertiesResourceApi res = new api.DriveApi(mock).properties; | 4636 api.PropertiesResourceApi res = new api.DriveApi(mock).properties; |
| 4598 var arg_request = buildProperty(); | 4637 var arg_request = buildProperty(); |
| 4599 var arg_fileId = "foo"; | 4638 var arg_fileId = "foo"; |
| 4600 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 4639 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 4601 var obj = new api.Property.fromJson(json); | 4640 var obj = new api.Property.fromJson(json); |
| 4602 checkProperty(obj); | 4641 checkProperty(obj); |
| 4603 | 4642 |
| 4604 var path = (req.url).path; | 4643 var path = (req.url).path; |
| 4605 var pathOffset = 0; | 4644 var pathOffset = 0; |
| 4606 var index; | 4645 var index; |
| (...skipping 27 matching lines...) Expand all Loading... |
| 4634 var keyvalue = part.split("="); | 4673 var keyvalue = part.split("="); |
| 4635 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 4674 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 4636 } | 4675 } |
| 4637 } | 4676 } |
| 4638 | 4677 |
| 4639 | 4678 |
| 4640 var h = { | 4679 var h = { |
| 4641 "content-type" : "application/json; charset=utf-8", | 4680 "content-type" : "application/json; charset=utf-8", |
| 4642 }; | 4681 }; |
| 4643 var resp = convert.JSON.encode(buildProperty()); | 4682 var resp = convert.JSON.encode(buildProperty()); |
| 4644 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 4683 return new async.Future.value(stringResponse(200, h, resp)); |
| 4645 }), true); | 4684 }), true); |
| 4646 res.insert(arg_request, arg_fileId).then(unittest.expectAsync(((api.Proper
ty response) { | 4685 res.insert(arg_request, arg_fileId).then(unittest.expectAsync(((api.Proper
ty response) { |
| 4647 checkProperty(response); | 4686 checkProperty(response); |
| 4648 }))); | 4687 }))); |
| 4649 }); | 4688 }); |
| 4650 | 4689 |
| 4651 unittest.test("method--list", () { | 4690 unittest.test("method--list", () { |
| 4652 | 4691 |
| 4653 var mock = new common_test.HttpServerMock(); | 4692 var mock = new HttpServerMock(); |
| 4654 api.PropertiesResourceApi res = new api.DriveApi(mock).properties; | 4693 api.PropertiesResourceApi res = new api.DriveApi(mock).properties; |
| 4655 var arg_fileId = "foo"; | 4694 var arg_fileId = "foo"; |
| 4656 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 4695 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 4657 var path = (req.url).path; | 4696 var path = (req.url).path; |
| 4658 var pathOffset = 0; | 4697 var pathOffset = 0; |
| 4659 var index; | 4698 var index; |
| 4660 var subPart; | 4699 var subPart; |
| 4661 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 4700 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 4662 pathOffset += 1; | 4701 pathOffset += 1; |
| 4663 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("drive/v2/")); | 4702 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("drive/v2/")); |
| (...skipping 23 matching lines...) Expand all Loading... |
| 4687 var keyvalue = part.split("="); | 4726 var keyvalue = part.split("="); |
| 4688 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 4727 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 4689 } | 4728 } |
| 4690 } | 4729 } |
| 4691 | 4730 |
| 4692 | 4731 |
| 4693 var h = { | 4732 var h = { |
| 4694 "content-type" : "application/json; charset=utf-8", | 4733 "content-type" : "application/json; charset=utf-8", |
| 4695 }; | 4734 }; |
| 4696 var resp = convert.JSON.encode(buildPropertyList()); | 4735 var resp = convert.JSON.encode(buildPropertyList()); |
| 4697 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 4736 return new async.Future.value(stringResponse(200, h, resp)); |
| 4698 }), true); | 4737 }), true); |
| 4699 res.list(arg_fileId).then(unittest.expectAsync(((api.PropertyList response
) { | 4738 res.list(arg_fileId).then(unittest.expectAsync(((api.PropertyList response
) { |
| 4700 checkPropertyList(response); | 4739 checkPropertyList(response); |
| 4701 }))); | 4740 }))); |
| 4702 }); | 4741 }); |
| 4703 | 4742 |
| 4704 unittest.test("method--patch", () { | 4743 unittest.test("method--patch", () { |
| 4705 | 4744 |
| 4706 var mock = new common_test.HttpServerMock(); | 4745 var mock = new HttpServerMock(); |
| 4707 api.PropertiesResourceApi res = new api.DriveApi(mock).properties; | 4746 api.PropertiesResourceApi res = new api.DriveApi(mock).properties; |
| 4708 var arg_request = buildProperty(); | 4747 var arg_request = buildProperty(); |
| 4709 var arg_fileId = "foo"; | 4748 var arg_fileId = "foo"; |
| 4710 var arg_propertyKey = "foo"; | 4749 var arg_propertyKey = "foo"; |
| 4711 var arg_visibility = "foo"; | 4750 var arg_visibility = "foo"; |
| 4712 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 4751 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 4713 var obj = new api.Property.fromJson(json); | 4752 var obj = new api.Property.fromJson(json); |
| 4714 checkProperty(obj); | 4753 checkProperty(obj); |
| 4715 | 4754 |
| 4716 var path = (req.url).path; | 4755 var path = (req.url).path; |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4750 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 4789 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 4751 } | 4790 } |
| 4752 } | 4791 } |
| 4753 unittest.expect(queryMap["visibility"].first, unittest.equals(arg_visibi
lity)); | 4792 unittest.expect(queryMap["visibility"].first, unittest.equals(arg_visibi
lity)); |
| 4754 | 4793 |
| 4755 | 4794 |
| 4756 var h = { | 4795 var h = { |
| 4757 "content-type" : "application/json; charset=utf-8", | 4796 "content-type" : "application/json; charset=utf-8", |
| 4758 }; | 4797 }; |
| 4759 var resp = convert.JSON.encode(buildProperty()); | 4798 var resp = convert.JSON.encode(buildProperty()); |
| 4760 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 4799 return new async.Future.value(stringResponse(200, h, resp)); |
| 4761 }), true); | 4800 }), true); |
| 4762 res.patch(arg_request, arg_fileId, arg_propertyKey, visibility: arg_visibi
lity).then(unittest.expectAsync(((api.Property response) { | 4801 res.patch(arg_request, arg_fileId, arg_propertyKey, visibility: arg_visibi
lity).then(unittest.expectAsync(((api.Property response) { |
| 4763 checkProperty(response); | 4802 checkProperty(response); |
| 4764 }))); | 4803 }))); |
| 4765 }); | 4804 }); |
| 4766 | 4805 |
| 4767 unittest.test("method--update", () { | 4806 unittest.test("method--update", () { |
| 4768 | 4807 |
| 4769 var mock = new common_test.HttpServerMock(); | 4808 var mock = new HttpServerMock(); |
| 4770 api.PropertiesResourceApi res = new api.DriveApi(mock).properties; | 4809 api.PropertiesResourceApi res = new api.DriveApi(mock).properties; |
| 4771 var arg_request = buildProperty(); | 4810 var arg_request = buildProperty(); |
| 4772 var arg_fileId = "foo"; | 4811 var arg_fileId = "foo"; |
| 4773 var arg_propertyKey = "foo"; | 4812 var arg_propertyKey = "foo"; |
| 4774 var arg_visibility = "foo"; | 4813 var arg_visibility = "foo"; |
| 4775 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 4814 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 4776 var obj = new api.Property.fromJson(json); | 4815 var obj = new api.Property.fromJson(json); |
| 4777 checkProperty(obj); | 4816 checkProperty(obj); |
| 4778 | 4817 |
| 4779 var path = (req.url).path; | 4818 var path = (req.url).path; |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4813 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 4852 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 4814 } | 4853 } |
| 4815 } | 4854 } |
| 4816 unittest.expect(queryMap["visibility"].first, unittest.equals(arg_visibi
lity)); | 4855 unittest.expect(queryMap["visibility"].first, unittest.equals(arg_visibi
lity)); |
| 4817 | 4856 |
| 4818 | 4857 |
| 4819 var h = { | 4858 var h = { |
| 4820 "content-type" : "application/json; charset=utf-8", | 4859 "content-type" : "application/json; charset=utf-8", |
| 4821 }; | 4860 }; |
| 4822 var resp = convert.JSON.encode(buildProperty()); | 4861 var resp = convert.JSON.encode(buildProperty()); |
| 4823 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 4862 return new async.Future.value(stringResponse(200, h, resp)); |
| 4824 }), true); | 4863 }), true); |
| 4825 res.update(arg_request, arg_fileId, arg_propertyKey, visibility: arg_visib
ility).then(unittest.expectAsync(((api.Property response) { | 4864 res.update(arg_request, arg_fileId, arg_propertyKey, visibility: arg_visib
ility).then(unittest.expectAsync(((api.Property response) { |
| 4826 checkProperty(response); | 4865 checkProperty(response); |
| 4827 }))); | 4866 }))); |
| 4828 }); | 4867 }); |
| 4829 | 4868 |
| 4830 }); | 4869 }); |
| 4831 | 4870 |
| 4832 | 4871 |
| 4833 unittest.group("resource-RealtimeResourceApi", () { | 4872 unittest.group("resource-RealtimeResourceApi", () { |
| 4834 unittest.test("method--get", () { | 4873 unittest.test("method--get", () { |
| 4835 // TODO: Implement tests for media upload; | 4874 // TODO: Implement tests for media upload; |
| 4836 // TODO: Implement tests for media download; | 4875 // TODO: Implement tests for media download; |
| 4837 | 4876 |
| 4838 var mock = new common_test.HttpServerMock(); | 4877 var mock = new HttpServerMock(); |
| 4839 api.RealtimeResourceApi res = new api.DriveApi(mock).realtime; | 4878 api.RealtimeResourceApi res = new api.DriveApi(mock).realtime; |
| 4840 var arg_fileId = "foo"; | 4879 var arg_fileId = "foo"; |
| 4841 var arg_revision = 42; | 4880 var arg_revision = 42; |
| 4842 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 4881 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 4843 var path = (req.url).path; | 4882 var path = (req.url).path; |
| 4844 var pathOffset = 0; | 4883 var pathOffset = 0; |
| 4845 var index; | 4884 var index; |
| 4846 var subPart; | 4885 var subPart; |
| 4847 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 4886 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 4848 pathOffset += 1; | 4887 pathOffset += 1; |
| (...skipping 25 matching lines...) Expand all Loading... |
| 4874 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 4913 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 4875 } | 4914 } |
| 4876 } | 4915 } |
| 4877 unittest.expect(core.int.parse(queryMap["revision"].first), unittest.equ
als(arg_revision)); | 4916 unittest.expect(core.int.parse(queryMap["revision"].first), unittest.equ
als(arg_revision)); |
| 4878 | 4917 |
| 4879 | 4918 |
| 4880 var h = { | 4919 var h = { |
| 4881 "content-type" : "application/json; charset=utf-8", | 4920 "content-type" : "application/json; charset=utf-8", |
| 4882 }; | 4921 }; |
| 4883 var resp = ""; | 4922 var resp = ""; |
| 4884 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 4923 return new async.Future.value(stringResponse(200, h, resp)); |
| 4885 }), true); | 4924 }), true); |
| 4886 res.get(arg_fileId, revision: arg_revision).then(unittest.expectAsync((_)
{})); | 4925 res.get(arg_fileId, revision: arg_revision).then(unittest.expectAsync((_)
{})); |
| 4887 }); | 4926 }); |
| 4888 | 4927 |
| 4889 unittest.test("method--update", () { | 4928 unittest.test("method--update", () { |
| 4890 // TODO: Implement tests for media upload; | 4929 // TODO: Implement tests for media upload; |
| 4891 // TODO: Implement tests for media download; | 4930 // TODO: Implement tests for media download; |
| 4892 | 4931 |
| 4893 var mock = new common_test.HttpServerMock(); | 4932 var mock = new HttpServerMock(); |
| 4894 api.RealtimeResourceApi res = new api.DriveApi(mock).realtime; | 4933 api.RealtimeResourceApi res = new api.DriveApi(mock).realtime; |
| 4895 var arg_fileId = "foo"; | 4934 var arg_fileId = "foo"; |
| 4896 var arg_baseRevision = "foo"; | 4935 var arg_baseRevision = "foo"; |
| 4897 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 4936 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 4898 var path = (req.url).path; | 4937 var path = (req.url).path; |
| 4899 var pathOffset = 0; | 4938 var pathOffset = 0; |
| 4900 var index; | 4939 var index; |
| 4901 var subPart; | 4940 var subPart; |
| 4902 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 4941 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 4903 pathOffset += 1; | 4942 pathOffset += 1; |
| (...skipping 25 matching lines...) Expand all Loading... |
| 4929 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 4968 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 4930 } | 4969 } |
| 4931 } | 4970 } |
| 4932 unittest.expect(queryMap["baseRevision"].first, unittest.equals(arg_base
Revision)); | 4971 unittest.expect(queryMap["baseRevision"].first, unittest.equals(arg_base
Revision)); |
| 4933 | 4972 |
| 4934 | 4973 |
| 4935 var h = { | 4974 var h = { |
| 4936 "content-type" : "application/json; charset=utf-8", | 4975 "content-type" : "application/json; charset=utf-8", |
| 4937 }; | 4976 }; |
| 4938 var resp = ""; | 4977 var resp = ""; |
| 4939 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 4978 return new async.Future.value(stringResponse(200, h, resp)); |
| 4940 }), true); | 4979 }), true); |
| 4941 res.update(arg_fileId, baseRevision: arg_baseRevision).then(unittest.expec
tAsync((_) {})); | 4980 res.update(arg_fileId, baseRevision: arg_baseRevision).then(unittest.expec
tAsync((_) {})); |
| 4942 }); | 4981 }); |
| 4943 | 4982 |
| 4944 }); | 4983 }); |
| 4945 | 4984 |
| 4946 | 4985 |
| 4947 unittest.group("resource-RepliesResourceApi", () { | 4986 unittest.group("resource-RepliesResourceApi", () { |
| 4948 unittest.test("method--delete", () { | 4987 unittest.test("method--delete", () { |
| 4949 | 4988 |
| 4950 var mock = new common_test.HttpServerMock(); | 4989 var mock = new HttpServerMock(); |
| 4951 api.RepliesResourceApi res = new api.DriveApi(mock).replies; | 4990 api.RepliesResourceApi res = new api.DriveApi(mock).replies; |
| 4952 var arg_fileId = "foo"; | 4991 var arg_fileId = "foo"; |
| 4953 var arg_commentId = "foo"; | 4992 var arg_commentId = "foo"; |
| 4954 var arg_replyId = "foo"; | 4993 var arg_replyId = "foo"; |
| 4955 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 4994 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 4956 var path = (req.url).path; | 4995 var path = (req.url).path; |
| 4957 var pathOffset = 0; | 4996 var pathOffset = 0; |
| 4958 var index; | 4997 var index; |
| 4959 var subPart; | 4998 var subPart; |
| 4960 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 4999 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4996 var keyvalue = part.split("="); | 5035 var keyvalue = part.split("="); |
| 4997 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 5036 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 4998 } | 5037 } |
| 4999 } | 5038 } |
| 5000 | 5039 |
| 5001 | 5040 |
| 5002 var h = { | 5041 var h = { |
| 5003 "content-type" : "application/json; charset=utf-8", | 5042 "content-type" : "application/json; charset=utf-8", |
| 5004 }; | 5043 }; |
| 5005 var resp = ""; | 5044 var resp = ""; |
| 5006 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 5045 return new async.Future.value(stringResponse(200, h, resp)); |
| 5007 }), true); | 5046 }), true); |
| 5008 res.delete(arg_fileId, arg_commentId, arg_replyId).then(unittest.expectAsy
nc((_) {})); | 5047 res.delete(arg_fileId, arg_commentId, arg_replyId).then(unittest.expectAsy
nc((_) {})); |
| 5009 }); | 5048 }); |
| 5010 | 5049 |
| 5011 unittest.test("method--get", () { | 5050 unittest.test("method--get", () { |
| 5012 | 5051 |
| 5013 var mock = new common_test.HttpServerMock(); | 5052 var mock = new HttpServerMock(); |
| 5014 api.RepliesResourceApi res = new api.DriveApi(mock).replies; | 5053 api.RepliesResourceApi res = new api.DriveApi(mock).replies; |
| 5015 var arg_fileId = "foo"; | 5054 var arg_fileId = "foo"; |
| 5016 var arg_commentId = "foo"; | 5055 var arg_commentId = "foo"; |
| 5017 var arg_replyId = "foo"; | 5056 var arg_replyId = "foo"; |
| 5018 var arg_includeDeleted = true; | 5057 var arg_includeDeleted = true; |
| 5019 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 5058 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 5020 var path = (req.url).path; | 5059 var path = (req.url).path; |
| 5021 var pathOffset = 0; | 5060 var pathOffset = 0; |
| 5022 var index; | 5061 var index; |
| 5023 var subPart; | 5062 var subPart; |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5061 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 5100 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 5062 } | 5101 } |
| 5063 } | 5102 } |
| 5064 unittest.expect(queryMap["includeDeleted"].first, unittest.equals("$arg_
includeDeleted")); | 5103 unittest.expect(queryMap["includeDeleted"].first, unittest.equals("$arg_
includeDeleted")); |
| 5065 | 5104 |
| 5066 | 5105 |
| 5067 var h = { | 5106 var h = { |
| 5068 "content-type" : "application/json; charset=utf-8", | 5107 "content-type" : "application/json; charset=utf-8", |
| 5069 }; | 5108 }; |
| 5070 var resp = convert.JSON.encode(buildCommentReply()); | 5109 var resp = convert.JSON.encode(buildCommentReply()); |
| 5071 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 5110 return new async.Future.value(stringResponse(200, h, resp)); |
| 5072 }), true); | 5111 }), true); |
| 5073 res.get(arg_fileId, arg_commentId, arg_replyId, includeDeleted: arg_includ
eDeleted).then(unittest.expectAsync(((api.CommentReply response) { | 5112 res.get(arg_fileId, arg_commentId, arg_replyId, includeDeleted: arg_includ
eDeleted).then(unittest.expectAsync(((api.CommentReply response) { |
| 5074 checkCommentReply(response); | 5113 checkCommentReply(response); |
| 5075 }))); | 5114 }))); |
| 5076 }); | 5115 }); |
| 5077 | 5116 |
| 5078 unittest.test("method--insert", () { | 5117 unittest.test("method--insert", () { |
| 5079 | 5118 |
| 5080 var mock = new common_test.HttpServerMock(); | 5119 var mock = new HttpServerMock(); |
| 5081 api.RepliesResourceApi res = new api.DriveApi(mock).replies; | 5120 api.RepliesResourceApi res = new api.DriveApi(mock).replies; |
| 5082 var arg_request = buildCommentReply(); | 5121 var arg_request = buildCommentReply(); |
| 5083 var arg_fileId = "foo"; | 5122 var arg_fileId = "foo"; |
| 5084 var arg_commentId = "foo"; | 5123 var arg_commentId = "foo"; |
| 5085 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 5124 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 5086 var obj = new api.CommentReply.fromJson(json); | 5125 var obj = new api.CommentReply.fromJson(json); |
| 5087 checkCommentReply(obj); | 5126 checkCommentReply(obj); |
| 5088 | 5127 |
| 5089 var path = (req.url).path; | 5128 var path = (req.url).path; |
| 5090 var pathOffset = 0; | 5129 var pathOffset = 0; |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5126 var keyvalue = part.split("="); | 5165 var keyvalue = part.split("="); |
| 5127 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 5166 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 5128 } | 5167 } |
| 5129 } | 5168 } |
| 5130 | 5169 |
| 5131 | 5170 |
| 5132 var h = { | 5171 var h = { |
| 5133 "content-type" : "application/json; charset=utf-8", | 5172 "content-type" : "application/json; charset=utf-8", |
| 5134 }; | 5173 }; |
| 5135 var resp = convert.JSON.encode(buildCommentReply()); | 5174 var resp = convert.JSON.encode(buildCommentReply()); |
| 5136 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 5175 return new async.Future.value(stringResponse(200, h, resp)); |
| 5137 }), true); | 5176 }), true); |
| 5138 res.insert(arg_request, arg_fileId, arg_commentId).then(unittest.expectAsy
nc(((api.CommentReply response) { | 5177 res.insert(arg_request, arg_fileId, arg_commentId).then(unittest.expectAsy
nc(((api.CommentReply response) { |
| 5139 checkCommentReply(response); | 5178 checkCommentReply(response); |
| 5140 }))); | 5179 }))); |
| 5141 }); | 5180 }); |
| 5142 | 5181 |
| 5143 unittest.test("method--list", () { | 5182 unittest.test("method--list", () { |
| 5144 | 5183 |
| 5145 var mock = new common_test.HttpServerMock(); | 5184 var mock = new HttpServerMock(); |
| 5146 api.RepliesResourceApi res = new api.DriveApi(mock).replies; | 5185 api.RepliesResourceApi res = new api.DriveApi(mock).replies; |
| 5147 var arg_fileId = "foo"; | 5186 var arg_fileId = "foo"; |
| 5148 var arg_commentId = "foo"; | 5187 var arg_commentId = "foo"; |
| 5149 var arg_includeDeleted = true; | 5188 var arg_includeDeleted = true; |
| 5150 var arg_maxResults = 42; | 5189 var arg_maxResults = 42; |
| 5151 var arg_pageToken = "foo"; | 5190 var arg_pageToken = "foo"; |
| 5152 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 5191 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 5153 var path = (req.url).path; | 5192 var path = (req.url).path; |
| 5154 var pathOffset = 0; | 5193 var pathOffset = 0; |
| 5155 var index; | 5194 var index; |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5193 } | 5232 } |
| 5194 unittest.expect(queryMap["includeDeleted"].first, unittest.equals("$arg_
includeDeleted")); | 5233 unittest.expect(queryMap["includeDeleted"].first, unittest.equals("$arg_
includeDeleted")); |
| 5195 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | 5234 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); |
| 5196 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | 5235 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); |
| 5197 | 5236 |
| 5198 | 5237 |
| 5199 var h = { | 5238 var h = { |
| 5200 "content-type" : "application/json; charset=utf-8", | 5239 "content-type" : "application/json; charset=utf-8", |
| 5201 }; | 5240 }; |
| 5202 var resp = convert.JSON.encode(buildCommentReplyList()); | 5241 var resp = convert.JSON.encode(buildCommentReplyList()); |
| 5203 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 5242 return new async.Future.value(stringResponse(200, h, resp)); |
| 5204 }), true); | 5243 }), true); |
| 5205 res.list(arg_fileId, arg_commentId, includeDeleted: arg_includeDeleted, ma
xResults: arg_maxResults, pageToken: arg_pageToken).then(unittest.expectAsync(((
api.CommentReplyList response) { | 5244 res.list(arg_fileId, arg_commentId, includeDeleted: arg_includeDeleted, ma
xResults: arg_maxResults, pageToken: arg_pageToken).then(unittest.expectAsync(((
api.CommentReplyList response) { |
| 5206 checkCommentReplyList(response); | 5245 checkCommentReplyList(response); |
| 5207 }))); | 5246 }))); |
| 5208 }); | 5247 }); |
| 5209 | 5248 |
| 5210 unittest.test("method--patch", () { | 5249 unittest.test("method--patch", () { |
| 5211 | 5250 |
| 5212 var mock = new common_test.HttpServerMock(); | 5251 var mock = new HttpServerMock(); |
| 5213 api.RepliesResourceApi res = new api.DriveApi(mock).replies; | 5252 api.RepliesResourceApi res = new api.DriveApi(mock).replies; |
| 5214 var arg_request = buildCommentReply(); | 5253 var arg_request = buildCommentReply(); |
| 5215 var arg_fileId = "foo"; | 5254 var arg_fileId = "foo"; |
| 5216 var arg_commentId = "foo"; | 5255 var arg_commentId = "foo"; |
| 5217 var arg_replyId = "foo"; | 5256 var arg_replyId = "foo"; |
| 5218 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 5257 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 5219 var obj = new api.CommentReply.fromJson(json); | 5258 var obj = new api.CommentReply.fromJson(json); |
| 5220 checkCommentReply(obj); | 5259 checkCommentReply(obj); |
| 5221 | 5260 |
| 5222 var path = (req.url).path; | 5261 var path = (req.url).path; |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5262 var keyvalue = part.split("="); | 5301 var keyvalue = part.split("="); |
| 5263 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 5302 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 5264 } | 5303 } |
| 5265 } | 5304 } |
| 5266 | 5305 |
| 5267 | 5306 |
| 5268 var h = { | 5307 var h = { |
| 5269 "content-type" : "application/json; charset=utf-8", | 5308 "content-type" : "application/json; charset=utf-8", |
| 5270 }; | 5309 }; |
| 5271 var resp = convert.JSON.encode(buildCommentReply()); | 5310 var resp = convert.JSON.encode(buildCommentReply()); |
| 5272 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 5311 return new async.Future.value(stringResponse(200, h, resp)); |
| 5273 }), true); | 5312 }), true); |
| 5274 res.patch(arg_request, arg_fileId, arg_commentId, arg_replyId).then(unitte
st.expectAsync(((api.CommentReply response) { | 5313 res.patch(arg_request, arg_fileId, arg_commentId, arg_replyId).then(unitte
st.expectAsync(((api.CommentReply response) { |
| 5275 checkCommentReply(response); | 5314 checkCommentReply(response); |
| 5276 }))); | 5315 }))); |
| 5277 }); | 5316 }); |
| 5278 | 5317 |
| 5279 unittest.test("method--update", () { | 5318 unittest.test("method--update", () { |
| 5280 | 5319 |
| 5281 var mock = new common_test.HttpServerMock(); | 5320 var mock = new HttpServerMock(); |
| 5282 api.RepliesResourceApi res = new api.DriveApi(mock).replies; | 5321 api.RepliesResourceApi res = new api.DriveApi(mock).replies; |
| 5283 var arg_request = buildCommentReply(); | 5322 var arg_request = buildCommentReply(); |
| 5284 var arg_fileId = "foo"; | 5323 var arg_fileId = "foo"; |
| 5285 var arg_commentId = "foo"; | 5324 var arg_commentId = "foo"; |
| 5286 var arg_replyId = "foo"; | 5325 var arg_replyId = "foo"; |
| 5287 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 5326 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 5288 var obj = new api.CommentReply.fromJson(json); | 5327 var obj = new api.CommentReply.fromJson(json); |
| 5289 checkCommentReply(obj); | 5328 checkCommentReply(obj); |
| 5290 | 5329 |
| 5291 var path = (req.url).path; | 5330 var path = (req.url).path; |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5331 var keyvalue = part.split("="); | 5370 var keyvalue = part.split("="); |
| 5332 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 5371 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 5333 } | 5372 } |
| 5334 } | 5373 } |
| 5335 | 5374 |
| 5336 | 5375 |
| 5337 var h = { | 5376 var h = { |
| 5338 "content-type" : "application/json; charset=utf-8", | 5377 "content-type" : "application/json; charset=utf-8", |
| 5339 }; | 5378 }; |
| 5340 var resp = convert.JSON.encode(buildCommentReply()); | 5379 var resp = convert.JSON.encode(buildCommentReply()); |
| 5341 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 5380 return new async.Future.value(stringResponse(200, h, resp)); |
| 5342 }), true); | 5381 }), true); |
| 5343 res.update(arg_request, arg_fileId, arg_commentId, arg_replyId).then(unitt
est.expectAsync(((api.CommentReply response) { | 5382 res.update(arg_request, arg_fileId, arg_commentId, arg_replyId).then(unitt
est.expectAsync(((api.CommentReply response) { |
| 5344 checkCommentReply(response); | 5383 checkCommentReply(response); |
| 5345 }))); | 5384 }))); |
| 5346 }); | 5385 }); |
| 5347 | 5386 |
| 5348 }); | 5387 }); |
| 5349 | 5388 |
| 5350 | 5389 |
| 5351 unittest.group("resource-RevisionsResourceApi", () { | 5390 unittest.group("resource-RevisionsResourceApi", () { |
| 5352 unittest.test("method--delete", () { | 5391 unittest.test("method--delete", () { |
| 5353 | 5392 |
| 5354 var mock = new common_test.HttpServerMock(); | 5393 var mock = new HttpServerMock(); |
| 5355 api.RevisionsResourceApi res = new api.DriveApi(mock).revisions; | 5394 api.RevisionsResourceApi res = new api.DriveApi(mock).revisions; |
| 5356 var arg_fileId = "foo"; | 5395 var arg_fileId = "foo"; |
| 5357 var arg_revisionId = "foo"; | 5396 var arg_revisionId = "foo"; |
| 5358 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 5397 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 5359 var path = (req.url).path; | 5398 var path = (req.url).path; |
| 5360 var pathOffset = 0; | 5399 var pathOffset = 0; |
| 5361 var index; | 5400 var index; |
| 5362 var subPart; | 5401 var subPart; |
| 5363 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 5402 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 5364 pathOffset += 1; | 5403 pathOffset += 1; |
| (...skipping 27 matching lines...) Expand all Loading... |
| 5392 var keyvalue = part.split("="); | 5431 var keyvalue = part.split("="); |
| 5393 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 5432 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 5394 } | 5433 } |
| 5395 } | 5434 } |
| 5396 | 5435 |
| 5397 | 5436 |
| 5398 var h = { | 5437 var h = { |
| 5399 "content-type" : "application/json; charset=utf-8", | 5438 "content-type" : "application/json; charset=utf-8", |
| 5400 }; | 5439 }; |
| 5401 var resp = ""; | 5440 var resp = ""; |
| 5402 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 5441 return new async.Future.value(stringResponse(200, h, resp)); |
| 5403 }), true); | 5442 }), true); |
| 5404 res.delete(arg_fileId, arg_revisionId).then(unittest.expectAsync((_) {})); | 5443 res.delete(arg_fileId, arg_revisionId).then(unittest.expectAsync((_) {})); |
| 5405 }); | 5444 }); |
| 5406 | 5445 |
| 5407 unittest.test("method--get", () { | 5446 unittest.test("method--get", () { |
| 5408 | 5447 |
| 5409 var mock = new common_test.HttpServerMock(); | 5448 var mock = new HttpServerMock(); |
| 5410 api.RevisionsResourceApi res = new api.DriveApi(mock).revisions; | 5449 api.RevisionsResourceApi res = new api.DriveApi(mock).revisions; |
| 5411 var arg_fileId = "foo"; | 5450 var arg_fileId = "foo"; |
| 5412 var arg_revisionId = "foo"; | 5451 var arg_revisionId = "foo"; |
| 5413 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 5452 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 5414 var path = (req.url).path; | 5453 var path = (req.url).path; |
| 5415 var pathOffset = 0; | 5454 var pathOffset = 0; |
| 5416 var index; | 5455 var index; |
| 5417 var subPart; | 5456 var subPart; |
| 5418 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 5457 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 5419 pathOffset += 1; | 5458 pathOffset += 1; |
| (...skipping 27 matching lines...) Expand all Loading... |
| 5447 var keyvalue = part.split("="); | 5486 var keyvalue = part.split("="); |
| 5448 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 5487 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 5449 } | 5488 } |
| 5450 } | 5489 } |
| 5451 | 5490 |
| 5452 | 5491 |
| 5453 var h = { | 5492 var h = { |
| 5454 "content-type" : "application/json; charset=utf-8", | 5493 "content-type" : "application/json; charset=utf-8", |
| 5455 }; | 5494 }; |
| 5456 var resp = convert.JSON.encode(buildRevision()); | 5495 var resp = convert.JSON.encode(buildRevision()); |
| 5457 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 5496 return new async.Future.value(stringResponse(200, h, resp)); |
| 5458 }), true); | 5497 }), true); |
| 5459 res.get(arg_fileId, arg_revisionId).then(unittest.expectAsync(((api.Revisi
on response) { | 5498 res.get(arg_fileId, arg_revisionId).then(unittest.expectAsync(((api.Revisi
on response) { |
| 5460 checkRevision(response); | 5499 checkRevision(response); |
| 5461 }))); | 5500 }))); |
| 5462 }); | 5501 }); |
| 5463 | 5502 |
| 5464 unittest.test("method--list", () { | 5503 unittest.test("method--list", () { |
| 5465 | 5504 |
| 5466 var mock = new common_test.HttpServerMock(); | 5505 var mock = new HttpServerMock(); |
| 5467 api.RevisionsResourceApi res = new api.DriveApi(mock).revisions; | 5506 api.RevisionsResourceApi res = new api.DriveApi(mock).revisions; |
| 5468 var arg_fileId = "foo"; | 5507 var arg_fileId = "foo"; |
| 5469 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 5508 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 5470 var path = (req.url).path; | 5509 var path = (req.url).path; |
| 5471 var pathOffset = 0; | 5510 var pathOffset = 0; |
| 5472 var index; | 5511 var index; |
| 5473 var subPart; | 5512 var subPart; |
| 5474 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 5513 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 5475 pathOffset += 1; | 5514 pathOffset += 1; |
| 5476 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("drive/v2/")); | 5515 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("drive/v2/")); |
| (...skipping 23 matching lines...) Expand all Loading... |
| 5500 var keyvalue = part.split("="); | 5539 var keyvalue = part.split("="); |
| 5501 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 5540 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 5502 } | 5541 } |
| 5503 } | 5542 } |
| 5504 | 5543 |
| 5505 | 5544 |
| 5506 var h = { | 5545 var h = { |
| 5507 "content-type" : "application/json; charset=utf-8", | 5546 "content-type" : "application/json; charset=utf-8", |
| 5508 }; | 5547 }; |
| 5509 var resp = convert.JSON.encode(buildRevisionList()); | 5548 var resp = convert.JSON.encode(buildRevisionList()); |
| 5510 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 5549 return new async.Future.value(stringResponse(200, h, resp)); |
| 5511 }), true); | 5550 }), true); |
| 5512 res.list(arg_fileId).then(unittest.expectAsync(((api.RevisionList response
) { | 5551 res.list(arg_fileId).then(unittest.expectAsync(((api.RevisionList response
) { |
| 5513 checkRevisionList(response); | 5552 checkRevisionList(response); |
| 5514 }))); | 5553 }))); |
| 5515 }); | 5554 }); |
| 5516 | 5555 |
| 5517 unittest.test("method--patch", () { | 5556 unittest.test("method--patch", () { |
| 5518 | 5557 |
| 5519 var mock = new common_test.HttpServerMock(); | 5558 var mock = new HttpServerMock(); |
| 5520 api.RevisionsResourceApi res = new api.DriveApi(mock).revisions; | 5559 api.RevisionsResourceApi res = new api.DriveApi(mock).revisions; |
| 5521 var arg_request = buildRevision(); | 5560 var arg_request = buildRevision(); |
| 5522 var arg_fileId = "foo"; | 5561 var arg_fileId = "foo"; |
| 5523 var arg_revisionId = "foo"; | 5562 var arg_revisionId = "foo"; |
| 5524 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 5563 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 5525 var obj = new api.Revision.fromJson(json); | 5564 var obj = new api.Revision.fromJson(json); |
| 5526 checkRevision(obj); | 5565 checkRevision(obj); |
| 5527 | 5566 |
| 5528 var path = (req.url).path; | 5567 var path = (req.url).path; |
| 5529 var pathOffset = 0; | 5568 var pathOffset = 0; |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5561 var keyvalue = part.split("="); | 5600 var keyvalue = part.split("="); |
| 5562 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 5601 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 5563 } | 5602 } |
| 5564 } | 5603 } |
| 5565 | 5604 |
| 5566 | 5605 |
| 5567 var h = { | 5606 var h = { |
| 5568 "content-type" : "application/json; charset=utf-8", | 5607 "content-type" : "application/json; charset=utf-8", |
| 5569 }; | 5608 }; |
| 5570 var resp = convert.JSON.encode(buildRevision()); | 5609 var resp = convert.JSON.encode(buildRevision()); |
| 5571 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 5610 return new async.Future.value(stringResponse(200, h, resp)); |
| 5572 }), true); | 5611 }), true); |
| 5573 res.patch(arg_request, arg_fileId, arg_revisionId).then(unittest.expectAsy
nc(((api.Revision response) { | 5612 res.patch(arg_request, arg_fileId, arg_revisionId).then(unittest.expectAsy
nc(((api.Revision response) { |
| 5574 checkRevision(response); | 5613 checkRevision(response); |
| 5575 }))); | 5614 }))); |
| 5576 }); | 5615 }); |
| 5577 | 5616 |
| 5578 unittest.test("method--update", () { | 5617 unittest.test("method--update", () { |
| 5579 | 5618 |
| 5580 var mock = new common_test.HttpServerMock(); | 5619 var mock = new HttpServerMock(); |
| 5581 api.RevisionsResourceApi res = new api.DriveApi(mock).revisions; | 5620 api.RevisionsResourceApi res = new api.DriveApi(mock).revisions; |
| 5582 var arg_request = buildRevision(); | 5621 var arg_request = buildRevision(); |
| 5583 var arg_fileId = "foo"; | 5622 var arg_fileId = "foo"; |
| 5584 var arg_revisionId = "foo"; | 5623 var arg_revisionId = "foo"; |
| 5585 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 5624 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 5586 var obj = new api.Revision.fromJson(json); | 5625 var obj = new api.Revision.fromJson(json); |
| 5587 checkRevision(obj); | 5626 checkRevision(obj); |
| 5588 | 5627 |
| 5589 var path = (req.url).path; | 5628 var path = (req.url).path; |
| 5590 var pathOffset = 0; | 5629 var pathOffset = 0; |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5622 var keyvalue = part.split("="); | 5661 var keyvalue = part.split("="); |
| 5623 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 5662 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 5624 } | 5663 } |
| 5625 } | 5664 } |
| 5626 | 5665 |
| 5627 | 5666 |
| 5628 var h = { | 5667 var h = { |
| 5629 "content-type" : "application/json; charset=utf-8", | 5668 "content-type" : "application/json; charset=utf-8", |
| 5630 }; | 5669 }; |
| 5631 var resp = convert.JSON.encode(buildRevision()); | 5670 var resp = convert.JSON.encode(buildRevision()); |
| 5632 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 5671 return new async.Future.value(stringResponse(200, h, resp)); |
| 5633 }), true); | 5672 }), true); |
| 5634 res.update(arg_request, arg_fileId, arg_revisionId).then(unittest.expectAs
ync(((api.Revision response) { | 5673 res.update(arg_request, arg_fileId, arg_revisionId).then(unittest.expectAs
ync(((api.Revision response) { |
| 5635 checkRevision(response); | 5674 checkRevision(response); |
| 5636 }))); | 5675 }))); |
| 5637 }); | 5676 }); |
| 5638 | 5677 |
| 5639 }); | 5678 }); |
| 5640 | 5679 |
| 5641 | 5680 |
| 5642 } | 5681 } |
| 5643 | 5682 |
| OLD | NEW |