| OLD | NEW |
| 1 library googleapis.androidenterprise.v1.test; | 1 library googleapis.androidenterprise.v1.test; |
| 2 | 2 |
| 3 import "dart:core" as core; | 3 import "dart:core" as core; |
| 4 import "dart:collection" as collection; | 4 import "dart:collection" as collection; |
| 5 import "dart:async" as async; | 5 import "dart:async" as async; |
| 6 import "dart:convert" as convert; | 6 import "dart:convert" as convert; |
| 7 | 7 |
| 8 import 'package:http/http.dart' as http; | 8 import 'package:http/http.dart' as http; |
| 9 import 'package:http/testing.dart' as http_testing; | 9 import 'package:http/testing.dart' as http_testing; |
| 10 import 'package:unittest/unittest.dart' as unittest; | 10 import 'package:test/test.dart' as unittest; |
| 11 | 11 |
| 12 import 'package:googleapis/androidenterprise/v1.dart' as api; | 12 import 'package:googleapis/androidenterprise/v1.dart' as api; |
| 13 | 13 |
| 14 class HttpServerMock extends http.BaseClient { | 14 class HttpServerMock extends http.BaseClient { |
| 15 core.Function _callback; | 15 core.Function _callback; |
| 16 core.bool _expectJson; | 16 core.bool _expectJson; |
| 17 | 17 |
| 18 void register(core.Function callback, core.bool expectJson) { | 18 void register(core.Function callback, core.bool expectJson) { |
| 19 _callback = callback; | 19 _callback = callback; |
| 20 _expectJson = expectJson; | 20 _expectJson = expectJson; |
| (...skipping 18 matching lines...) Expand all Loading... |
| 39 } else { | 39 } else { |
| 40 return stream.toBytes().then((data) { | 40 return stream.toBytes().then((data) { |
| 41 return _callback(request, data); | 41 return _callback(request, data); |
| 42 }); | 42 }); |
| 43 } | 43 } |
| 44 } | 44 } |
| 45 } | 45 } |
| 46 } | 46 } |
| 47 | 47 |
| 48 http.StreamedResponse stringResponse( | 48 http.StreamedResponse stringResponse( |
| 49 core.int status, core.Map headers, core.String body) { | 49 core.int status, core.Map<core.String, core.String> headers, core.String bod
y) { |
| 50 var stream = new async.Stream.fromIterable([convert.UTF8.encode(body)]); | 50 var stream = new async.Stream.fromIterable([convert.UTF8.encode(body)]); |
| 51 return new http.StreamedResponse(stream, status, headers: headers); | 51 return new http.StreamedResponse(stream, status, headers: headers); |
| 52 } | 52 } |
| 53 | 53 |
| 54 core.int buildCounterAdministrator = 0; | 54 core.int buildCounterAdministrator = 0; |
| 55 buildAdministrator() { | 55 buildAdministrator() { |
| 56 var o = new api.Administrator(); | 56 var o = new api.Administrator(); |
| 57 buildCounterAdministrator++; | 57 buildCounterAdministrator++; |
| 58 if (buildCounterAdministrator < 3) { | 58 if (buildCounterAdministrator < 3) { |
| 59 o.email = "foo"; | 59 o.email = "foo"; |
| (...skipping 24 matching lines...) Expand all Loading... |
| 84 | 84 |
| 85 checkAdministratorWebToken(api.AdministratorWebToken o) { | 85 checkAdministratorWebToken(api.AdministratorWebToken o) { |
| 86 buildCounterAdministratorWebToken++; | 86 buildCounterAdministratorWebToken++; |
| 87 if (buildCounterAdministratorWebToken < 3) { | 87 if (buildCounterAdministratorWebToken < 3) { |
| 88 unittest.expect(o.kind, unittest.equals('foo')); | 88 unittest.expect(o.kind, unittest.equals('foo')); |
| 89 unittest.expect(o.token, unittest.equals('foo')); | 89 unittest.expect(o.token, unittest.equals('foo')); |
| 90 } | 90 } |
| 91 buildCounterAdministratorWebToken--; | 91 buildCounterAdministratorWebToken--; |
| 92 } | 92 } |
| 93 | 93 |
| 94 buildUnnamed2010() { | 94 buildUnnamed2020() { |
| 95 var o = new core.List<core.String>(); | 95 var o = new core.List<core.String>(); |
| 96 o.add("foo"); | 96 o.add("foo"); |
| 97 o.add("foo"); | 97 o.add("foo"); |
| 98 return o; | 98 return o; |
| 99 } | 99 } |
| 100 | 100 |
| 101 checkUnnamed2010(core.List<core.String> o) { | 101 checkUnnamed2020(core.List<core.String> o) { |
| 102 unittest.expect(o, unittest.hasLength(2)); | 102 unittest.expect(o, unittest.hasLength(2)); |
| 103 unittest.expect(o[0], unittest.equals('foo')); | 103 unittest.expect(o[0], unittest.equals('foo')); |
| 104 unittest.expect(o[1], unittest.equals('foo')); | 104 unittest.expect(o[1], unittest.equals('foo')); |
| 105 } | 105 } |
| 106 | 106 |
| 107 core.int buildCounterAdministratorWebTokenSpec = 0; | 107 core.int buildCounterAdministratorWebTokenSpec = 0; |
| 108 buildAdministratorWebTokenSpec() { | 108 buildAdministratorWebTokenSpec() { |
| 109 var o = new api.AdministratorWebTokenSpec(); | 109 var o = new api.AdministratorWebTokenSpec(); |
| 110 buildCounterAdministratorWebTokenSpec++; | 110 buildCounterAdministratorWebTokenSpec++; |
| 111 if (buildCounterAdministratorWebTokenSpec < 3) { | 111 if (buildCounterAdministratorWebTokenSpec < 3) { |
| 112 o.kind = "foo"; | 112 o.kind = "foo"; |
| 113 o.parent = "foo"; | 113 o.parent = "foo"; |
| 114 o.permission = buildUnnamed2010(); | 114 o.permission = buildUnnamed2020(); |
| 115 } | 115 } |
| 116 buildCounterAdministratorWebTokenSpec--; | 116 buildCounterAdministratorWebTokenSpec--; |
| 117 return o; | 117 return o; |
| 118 } | 118 } |
| 119 | 119 |
| 120 checkAdministratorWebTokenSpec(api.AdministratorWebTokenSpec o) { | 120 checkAdministratorWebTokenSpec(api.AdministratorWebTokenSpec o) { |
| 121 buildCounterAdministratorWebTokenSpec++; | 121 buildCounterAdministratorWebTokenSpec++; |
| 122 if (buildCounterAdministratorWebTokenSpec < 3) { | 122 if (buildCounterAdministratorWebTokenSpec < 3) { |
| 123 unittest.expect(o.kind, unittest.equals('foo')); | 123 unittest.expect(o.kind, unittest.equals('foo')); |
| 124 unittest.expect(o.parent, unittest.equals('foo')); | 124 unittest.expect(o.parent, unittest.equals('foo')); |
| 125 checkUnnamed2010(o.permission); | 125 checkUnnamed2020(o.permission); |
| 126 } | 126 } |
| 127 buildCounterAdministratorWebTokenSpec--; | 127 buildCounterAdministratorWebTokenSpec--; |
| 128 } | 128 } |
| 129 | 129 |
| 130 buildUnnamed2011() { | 130 buildUnnamed2021() { |
| 131 var o = new core.List<api.AppRestrictionsSchemaRestriction>(); | 131 var o = new core.List<api.AppRestrictionsSchemaRestriction>(); |
| 132 o.add(buildAppRestrictionsSchemaRestriction()); | 132 o.add(buildAppRestrictionsSchemaRestriction()); |
| 133 o.add(buildAppRestrictionsSchemaRestriction()); | 133 o.add(buildAppRestrictionsSchemaRestriction()); |
| 134 return o; | 134 return o; |
| 135 } | 135 } |
| 136 | 136 |
| 137 checkUnnamed2011(core.List<api.AppRestrictionsSchemaRestriction> o) { | 137 checkUnnamed2021(core.List<api.AppRestrictionsSchemaRestriction> o) { |
| 138 unittest.expect(o, unittest.hasLength(2)); | 138 unittest.expect(o, unittest.hasLength(2)); |
| 139 checkAppRestrictionsSchemaRestriction(o[0]); | 139 checkAppRestrictionsSchemaRestriction(o[0]); |
| 140 checkAppRestrictionsSchemaRestriction(o[1]); | 140 checkAppRestrictionsSchemaRestriction(o[1]); |
| 141 } | 141 } |
| 142 | 142 |
| 143 core.int buildCounterAppRestrictionsSchema = 0; | 143 core.int buildCounterAppRestrictionsSchema = 0; |
| 144 buildAppRestrictionsSchema() { | 144 buildAppRestrictionsSchema() { |
| 145 var o = new api.AppRestrictionsSchema(); | 145 var o = new api.AppRestrictionsSchema(); |
| 146 buildCounterAppRestrictionsSchema++; | 146 buildCounterAppRestrictionsSchema++; |
| 147 if (buildCounterAppRestrictionsSchema < 3) { | 147 if (buildCounterAppRestrictionsSchema < 3) { |
| 148 o.kind = "foo"; | 148 o.kind = "foo"; |
| 149 o.restrictions = buildUnnamed2011(); | 149 o.restrictions = buildUnnamed2021(); |
| 150 } | 150 } |
| 151 buildCounterAppRestrictionsSchema--; | 151 buildCounterAppRestrictionsSchema--; |
| 152 return o; | 152 return o; |
| 153 } | 153 } |
| 154 | 154 |
| 155 checkAppRestrictionsSchema(api.AppRestrictionsSchema o) { | 155 checkAppRestrictionsSchema(api.AppRestrictionsSchema o) { |
| 156 buildCounterAppRestrictionsSchema++; | 156 buildCounterAppRestrictionsSchema++; |
| 157 if (buildCounterAppRestrictionsSchema < 3) { | 157 if (buildCounterAppRestrictionsSchema < 3) { |
| 158 unittest.expect(o.kind, unittest.equals('foo')); | 158 unittest.expect(o.kind, unittest.equals('foo')); |
| 159 checkUnnamed2011(o.restrictions); | 159 checkUnnamed2021(o.restrictions); |
| 160 } | 160 } |
| 161 buildCounterAppRestrictionsSchema--; | 161 buildCounterAppRestrictionsSchema--; |
| 162 } | 162 } |
| 163 | 163 |
| 164 core.int buildCounterAppRestrictionsSchemaChangeEvent = 0; | 164 core.int buildCounterAppRestrictionsSchemaChangeEvent = 0; |
| 165 buildAppRestrictionsSchemaChangeEvent() { | 165 buildAppRestrictionsSchemaChangeEvent() { |
| 166 var o = new api.AppRestrictionsSchemaChangeEvent(); | 166 var o = new api.AppRestrictionsSchemaChangeEvent(); |
| 167 buildCounterAppRestrictionsSchemaChangeEvent++; | 167 buildCounterAppRestrictionsSchemaChangeEvent++; |
| 168 if (buildCounterAppRestrictionsSchemaChangeEvent < 3) { | 168 if (buildCounterAppRestrictionsSchemaChangeEvent < 3) { |
| 169 o.productId = "foo"; | 169 o.productId = "foo"; |
| 170 } | 170 } |
| 171 buildCounterAppRestrictionsSchemaChangeEvent--; | 171 buildCounterAppRestrictionsSchemaChangeEvent--; |
| 172 return o; | 172 return o; |
| 173 } | 173 } |
| 174 | 174 |
| 175 checkAppRestrictionsSchemaChangeEvent(api.AppRestrictionsSchemaChangeEvent o) { | 175 checkAppRestrictionsSchemaChangeEvent(api.AppRestrictionsSchemaChangeEvent o) { |
| 176 buildCounterAppRestrictionsSchemaChangeEvent++; | 176 buildCounterAppRestrictionsSchemaChangeEvent++; |
| 177 if (buildCounterAppRestrictionsSchemaChangeEvent < 3) { | 177 if (buildCounterAppRestrictionsSchemaChangeEvent < 3) { |
| 178 unittest.expect(o.productId, unittest.equals('foo')); | 178 unittest.expect(o.productId, unittest.equals('foo')); |
| 179 } | 179 } |
| 180 buildCounterAppRestrictionsSchemaChangeEvent--; | 180 buildCounterAppRestrictionsSchemaChangeEvent--; |
| 181 } | 181 } |
| 182 | 182 |
| 183 buildUnnamed2012() { | 183 buildUnnamed2022() { |
| 184 var o = new core.List<core.String>(); | 184 var o = new core.List<core.String>(); |
| 185 o.add("foo"); | 185 o.add("foo"); |
| 186 o.add("foo"); | 186 o.add("foo"); |
| 187 return o; | 187 return o; |
| 188 } | 188 } |
| 189 | 189 |
| 190 checkUnnamed2012(core.List<core.String> o) { | 190 checkUnnamed2022(core.List<core.String> o) { |
| 191 unittest.expect(o, unittest.hasLength(2)); | 191 unittest.expect(o, unittest.hasLength(2)); |
| 192 unittest.expect(o[0], unittest.equals('foo')); | 192 unittest.expect(o[0], unittest.equals('foo')); |
| 193 unittest.expect(o[1], unittest.equals('foo')); | 193 unittest.expect(o[1], unittest.equals('foo')); |
| 194 } | 194 } |
| 195 | 195 |
| 196 buildUnnamed2013() { | 196 buildUnnamed2023() { |
| 197 var o = new core.List<core.String>(); | 197 var o = new core.List<core.String>(); |
| 198 o.add("foo"); | 198 o.add("foo"); |
| 199 o.add("foo"); | 199 o.add("foo"); |
| 200 return o; | 200 return o; |
| 201 } | 201 } |
| 202 | 202 |
| 203 checkUnnamed2013(core.List<core.String> o) { | 203 checkUnnamed2023(core.List<core.String> o) { |
| 204 unittest.expect(o, unittest.hasLength(2)); | 204 unittest.expect(o, unittest.hasLength(2)); |
| 205 unittest.expect(o[0], unittest.equals('foo')); | 205 unittest.expect(o[0], unittest.equals('foo')); |
| 206 unittest.expect(o[1], unittest.equals('foo')); | 206 unittest.expect(o[1], unittest.equals('foo')); |
| 207 } | 207 } |
| 208 | 208 |
| 209 buildUnnamed2014() { | 209 buildUnnamed2024() { |
| 210 var o = new core.List<api.AppRestrictionsSchemaRestriction>(); | 210 var o = new core.List<api.AppRestrictionsSchemaRestriction>(); |
| 211 o.add(buildAppRestrictionsSchemaRestriction()); | 211 o.add(buildAppRestrictionsSchemaRestriction()); |
| 212 o.add(buildAppRestrictionsSchemaRestriction()); | 212 o.add(buildAppRestrictionsSchemaRestriction()); |
| 213 return o; | 213 return o; |
| 214 } | 214 } |
| 215 | 215 |
| 216 checkUnnamed2014(core.List<api.AppRestrictionsSchemaRestriction> o) { | 216 checkUnnamed2024(core.List<api.AppRestrictionsSchemaRestriction> o) { |
| 217 unittest.expect(o, unittest.hasLength(2)); | 217 unittest.expect(o, unittest.hasLength(2)); |
| 218 checkAppRestrictionsSchemaRestriction(o[0]); | 218 checkAppRestrictionsSchemaRestriction(o[0]); |
| 219 checkAppRestrictionsSchemaRestriction(o[1]); | 219 checkAppRestrictionsSchemaRestriction(o[1]); |
| 220 } | 220 } |
| 221 | 221 |
| 222 core.int buildCounterAppRestrictionsSchemaRestriction = 0; | 222 core.int buildCounterAppRestrictionsSchemaRestriction = 0; |
| 223 buildAppRestrictionsSchemaRestriction() { | 223 buildAppRestrictionsSchemaRestriction() { |
| 224 var o = new api.AppRestrictionsSchemaRestriction(); | 224 var o = new api.AppRestrictionsSchemaRestriction(); |
| 225 buildCounterAppRestrictionsSchemaRestriction++; | 225 buildCounterAppRestrictionsSchemaRestriction++; |
| 226 if (buildCounterAppRestrictionsSchemaRestriction < 3) { | 226 if (buildCounterAppRestrictionsSchemaRestriction < 3) { |
| 227 o.defaultValue = buildAppRestrictionsSchemaRestrictionRestrictionValue(); | 227 o.defaultValue = buildAppRestrictionsSchemaRestrictionRestrictionValue(); |
| 228 o.description = "foo"; | 228 o.description = "foo"; |
| 229 o.entry = buildUnnamed2012(); | 229 o.entry = buildUnnamed2022(); |
| 230 o.entryValue = buildUnnamed2013(); | 230 o.entryValue = buildUnnamed2023(); |
| 231 o.key = "foo"; | 231 o.key = "foo"; |
| 232 o.nestedRestriction = buildUnnamed2014(); | 232 o.nestedRestriction = buildUnnamed2024(); |
| 233 o.restrictionType = "foo"; | 233 o.restrictionType = "foo"; |
| 234 o.title = "foo"; | 234 o.title = "foo"; |
| 235 } | 235 } |
| 236 buildCounterAppRestrictionsSchemaRestriction--; | 236 buildCounterAppRestrictionsSchemaRestriction--; |
| 237 return o; | 237 return o; |
| 238 } | 238 } |
| 239 | 239 |
| 240 checkAppRestrictionsSchemaRestriction(api.AppRestrictionsSchemaRestriction o) { | 240 checkAppRestrictionsSchemaRestriction(api.AppRestrictionsSchemaRestriction o) { |
| 241 buildCounterAppRestrictionsSchemaRestriction++; | 241 buildCounterAppRestrictionsSchemaRestriction++; |
| 242 if (buildCounterAppRestrictionsSchemaRestriction < 3) { | 242 if (buildCounterAppRestrictionsSchemaRestriction < 3) { |
| 243 checkAppRestrictionsSchemaRestrictionRestrictionValue(o.defaultValue); | 243 checkAppRestrictionsSchemaRestrictionRestrictionValue(o.defaultValue); |
| 244 unittest.expect(o.description, unittest.equals('foo')); | 244 unittest.expect(o.description, unittest.equals('foo')); |
| 245 checkUnnamed2012(o.entry); | 245 checkUnnamed2022(o.entry); |
| 246 checkUnnamed2013(o.entryValue); | 246 checkUnnamed2023(o.entryValue); |
| 247 unittest.expect(o.key, unittest.equals('foo')); | 247 unittest.expect(o.key, unittest.equals('foo')); |
| 248 checkUnnamed2014(o.nestedRestriction); | 248 checkUnnamed2024(o.nestedRestriction); |
| 249 unittest.expect(o.restrictionType, unittest.equals('foo')); | 249 unittest.expect(o.restrictionType, unittest.equals('foo')); |
| 250 unittest.expect(o.title, unittest.equals('foo')); | 250 unittest.expect(o.title, unittest.equals('foo')); |
| 251 } | 251 } |
| 252 buildCounterAppRestrictionsSchemaRestriction--; | 252 buildCounterAppRestrictionsSchemaRestriction--; |
| 253 } | 253 } |
| 254 | 254 |
| 255 buildUnnamed2015() { | 255 buildUnnamed2025() { |
| 256 var o = new core.List<core.String>(); | 256 var o = new core.List<core.String>(); |
| 257 o.add("foo"); | 257 o.add("foo"); |
| 258 o.add("foo"); | 258 o.add("foo"); |
| 259 return o; | 259 return o; |
| 260 } | 260 } |
| 261 | 261 |
| 262 checkUnnamed2015(core.List<core.String> o) { | 262 checkUnnamed2025(core.List<core.String> o) { |
| 263 unittest.expect(o, unittest.hasLength(2)); | 263 unittest.expect(o, unittest.hasLength(2)); |
| 264 unittest.expect(o[0], unittest.equals('foo')); | 264 unittest.expect(o[0], unittest.equals('foo')); |
| 265 unittest.expect(o[1], unittest.equals('foo')); | 265 unittest.expect(o[1], unittest.equals('foo')); |
| 266 } | 266 } |
| 267 | 267 |
| 268 core.int buildCounterAppRestrictionsSchemaRestrictionRestrictionValue = 0; | 268 core.int buildCounterAppRestrictionsSchemaRestrictionRestrictionValue = 0; |
| 269 buildAppRestrictionsSchemaRestrictionRestrictionValue() { | 269 buildAppRestrictionsSchemaRestrictionRestrictionValue() { |
| 270 var o = new api.AppRestrictionsSchemaRestrictionRestrictionValue(); | 270 var o = new api.AppRestrictionsSchemaRestrictionRestrictionValue(); |
| 271 buildCounterAppRestrictionsSchemaRestrictionRestrictionValue++; | 271 buildCounterAppRestrictionsSchemaRestrictionRestrictionValue++; |
| 272 if (buildCounterAppRestrictionsSchemaRestrictionRestrictionValue < 3) { | 272 if (buildCounterAppRestrictionsSchemaRestrictionRestrictionValue < 3) { |
| 273 o.type = "foo"; | 273 o.type = "foo"; |
| 274 o.valueBool = true; | 274 o.valueBool = true; |
| 275 o.valueInteger = 42; | 275 o.valueInteger = 42; |
| 276 o.valueMultiselect = buildUnnamed2015(); | 276 o.valueMultiselect = buildUnnamed2025(); |
| 277 o.valueString = "foo"; | 277 o.valueString = "foo"; |
| 278 } | 278 } |
| 279 buildCounterAppRestrictionsSchemaRestrictionRestrictionValue--; | 279 buildCounterAppRestrictionsSchemaRestrictionRestrictionValue--; |
| 280 return o; | 280 return o; |
| 281 } | 281 } |
| 282 | 282 |
| 283 checkAppRestrictionsSchemaRestrictionRestrictionValue(api.AppRestrictionsSchemaR
estrictionRestrictionValue o) { | 283 checkAppRestrictionsSchemaRestrictionRestrictionValue(api.AppRestrictionsSchemaR
estrictionRestrictionValue o) { |
| 284 buildCounterAppRestrictionsSchemaRestrictionRestrictionValue++; | 284 buildCounterAppRestrictionsSchemaRestrictionRestrictionValue++; |
| 285 if (buildCounterAppRestrictionsSchemaRestrictionRestrictionValue < 3) { | 285 if (buildCounterAppRestrictionsSchemaRestrictionRestrictionValue < 3) { |
| 286 unittest.expect(o.type, unittest.equals('foo')); | 286 unittest.expect(o.type, unittest.equals('foo')); |
| 287 unittest.expect(o.valueBool, unittest.isTrue); | 287 unittest.expect(o.valueBool, unittest.isTrue); |
| 288 unittest.expect(o.valueInteger, unittest.equals(42)); | 288 unittest.expect(o.valueInteger, unittest.equals(42)); |
| 289 checkUnnamed2015(o.valueMultiselect); | 289 checkUnnamed2025(o.valueMultiselect); |
| 290 unittest.expect(o.valueString, unittest.equals('foo')); | 290 unittest.expect(o.valueString, unittest.equals('foo')); |
| 291 } | 291 } |
| 292 buildCounterAppRestrictionsSchemaRestrictionRestrictionValue--; | 292 buildCounterAppRestrictionsSchemaRestrictionRestrictionValue--; |
| 293 } | 293 } |
| 294 | 294 |
| 295 core.int buildCounterAppUpdateEvent = 0; | 295 core.int buildCounterAppUpdateEvent = 0; |
| 296 buildAppUpdateEvent() { | 296 buildAppUpdateEvent() { |
| 297 var o = new api.AppUpdateEvent(); | 297 var o = new api.AppUpdateEvent(); |
| 298 buildCounterAppUpdateEvent++; | 298 buildCounterAppUpdateEvent++; |
| 299 if (buildCounterAppUpdateEvent < 3) { | 299 if (buildCounterAppUpdateEvent < 3) { |
| (...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 411 | 411 |
| 412 checkDeviceState(api.DeviceState o) { | 412 checkDeviceState(api.DeviceState o) { |
| 413 buildCounterDeviceState++; | 413 buildCounterDeviceState++; |
| 414 if (buildCounterDeviceState < 3) { | 414 if (buildCounterDeviceState < 3) { |
| 415 unittest.expect(o.accountState, unittest.equals('foo')); | 415 unittest.expect(o.accountState, unittest.equals('foo')); |
| 416 unittest.expect(o.kind, unittest.equals('foo')); | 416 unittest.expect(o.kind, unittest.equals('foo')); |
| 417 } | 417 } |
| 418 buildCounterDeviceState--; | 418 buildCounterDeviceState--; |
| 419 } | 419 } |
| 420 | 420 |
| 421 buildUnnamed2016() { | 421 buildUnnamed2026() { |
| 422 var o = new core.List<api.Device>(); | 422 var o = new core.List<api.Device>(); |
| 423 o.add(buildDevice()); | 423 o.add(buildDevice()); |
| 424 o.add(buildDevice()); | 424 o.add(buildDevice()); |
| 425 return o; | 425 return o; |
| 426 } | 426 } |
| 427 | 427 |
| 428 checkUnnamed2016(core.List<api.Device> o) { | 428 checkUnnamed2026(core.List<api.Device> o) { |
| 429 unittest.expect(o, unittest.hasLength(2)); | 429 unittest.expect(o, unittest.hasLength(2)); |
| 430 checkDevice(o[0]); | 430 checkDevice(o[0]); |
| 431 checkDevice(o[1]); | 431 checkDevice(o[1]); |
| 432 } | 432 } |
| 433 | 433 |
| 434 core.int buildCounterDevicesListResponse = 0; | 434 core.int buildCounterDevicesListResponse = 0; |
| 435 buildDevicesListResponse() { | 435 buildDevicesListResponse() { |
| 436 var o = new api.DevicesListResponse(); | 436 var o = new api.DevicesListResponse(); |
| 437 buildCounterDevicesListResponse++; | 437 buildCounterDevicesListResponse++; |
| 438 if (buildCounterDevicesListResponse < 3) { | 438 if (buildCounterDevicesListResponse < 3) { |
| 439 o.device = buildUnnamed2016(); | 439 o.device = buildUnnamed2026(); |
| 440 o.kind = "foo"; | 440 o.kind = "foo"; |
| 441 } | 441 } |
| 442 buildCounterDevicesListResponse--; | 442 buildCounterDevicesListResponse--; |
| 443 return o; | 443 return o; |
| 444 } | 444 } |
| 445 | 445 |
| 446 checkDevicesListResponse(api.DevicesListResponse o) { | 446 checkDevicesListResponse(api.DevicesListResponse o) { |
| 447 buildCounterDevicesListResponse++; | 447 buildCounterDevicesListResponse++; |
| 448 if (buildCounterDevicesListResponse < 3) { | 448 if (buildCounterDevicesListResponse < 3) { |
| 449 checkUnnamed2016(o.device); | 449 checkUnnamed2026(o.device); |
| 450 unittest.expect(o.kind, unittest.equals('foo')); | 450 unittest.expect(o.kind, unittest.equals('foo')); |
| 451 } | 451 } |
| 452 buildCounterDevicesListResponse--; | 452 buildCounterDevicesListResponse--; |
| 453 } | 453 } |
| 454 | 454 |
| 455 buildUnnamed2017() { | 455 buildUnnamed2027() { |
| 456 var o = new core.List<api.Administrator>(); | 456 var o = new core.List<api.Administrator>(); |
| 457 o.add(buildAdministrator()); | 457 o.add(buildAdministrator()); |
| 458 o.add(buildAdministrator()); | 458 o.add(buildAdministrator()); |
| 459 return o; | 459 return o; |
| 460 } | 460 } |
| 461 | 461 |
| 462 checkUnnamed2017(core.List<api.Administrator> o) { | 462 checkUnnamed2027(core.List<api.Administrator> o) { |
| 463 unittest.expect(o, unittest.hasLength(2)); | 463 unittest.expect(o, unittest.hasLength(2)); |
| 464 checkAdministrator(o[0]); | 464 checkAdministrator(o[0]); |
| 465 checkAdministrator(o[1]); | 465 checkAdministrator(o[1]); |
| 466 } | 466 } |
| 467 | 467 |
| 468 core.int buildCounterEnterprise = 0; | 468 core.int buildCounterEnterprise = 0; |
| 469 buildEnterprise() { | 469 buildEnterprise() { |
| 470 var o = new api.Enterprise(); | 470 var o = new api.Enterprise(); |
| 471 buildCounterEnterprise++; | 471 buildCounterEnterprise++; |
| 472 if (buildCounterEnterprise < 3) { | 472 if (buildCounterEnterprise < 3) { |
| 473 o.administrator = buildUnnamed2017(); | 473 o.administrator = buildUnnamed2027(); |
| 474 o.id = "foo"; | 474 o.id = "foo"; |
| 475 o.kind = "foo"; | 475 o.kind = "foo"; |
| 476 o.name = "foo"; | 476 o.name = "foo"; |
| 477 o.primaryDomain = "foo"; | 477 o.primaryDomain = "foo"; |
| 478 } | 478 } |
| 479 buildCounterEnterprise--; | 479 buildCounterEnterprise--; |
| 480 return o; | 480 return o; |
| 481 } | 481 } |
| 482 | 482 |
| 483 checkEnterprise(api.Enterprise o) { | 483 checkEnterprise(api.Enterprise o) { |
| 484 buildCounterEnterprise++; | 484 buildCounterEnterprise++; |
| 485 if (buildCounterEnterprise < 3) { | 485 if (buildCounterEnterprise < 3) { |
| 486 checkUnnamed2017(o.administrator); | 486 checkUnnamed2027(o.administrator); |
| 487 unittest.expect(o.id, unittest.equals('foo')); | 487 unittest.expect(o.id, unittest.equals('foo')); |
| 488 unittest.expect(o.kind, unittest.equals('foo')); | 488 unittest.expect(o.kind, unittest.equals('foo')); |
| 489 unittest.expect(o.name, unittest.equals('foo')); | 489 unittest.expect(o.name, unittest.equals('foo')); |
| 490 unittest.expect(o.primaryDomain, unittest.equals('foo')); | 490 unittest.expect(o.primaryDomain, unittest.equals('foo')); |
| 491 } | 491 } |
| 492 buildCounterEnterprise--; | 492 buildCounterEnterprise--; |
| 493 } | 493 } |
| 494 | 494 |
| 495 core.int buildCounterEnterpriseAccount = 0; | 495 core.int buildCounterEnterpriseAccount = 0; |
| 496 buildEnterpriseAccount() { | 496 buildEnterpriseAccount() { |
| 497 var o = new api.EnterpriseAccount(); | 497 var o = new api.EnterpriseAccount(); |
| 498 buildCounterEnterpriseAccount++; | 498 buildCounterEnterpriseAccount++; |
| 499 if (buildCounterEnterpriseAccount < 3) { | 499 if (buildCounterEnterpriseAccount < 3) { |
| 500 o.accountEmail = "foo"; | 500 o.accountEmail = "foo"; |
| 501 o.kind = "foo"; | 501 o.kind = "foo"; |
| 502 } | 502 } |
| 503 buildCounterEnterpriseAccount--; | 503 buildCounterEnterpriseAccount--; |
| 504 return o; | 504 return o; |
| 505 } | 505 } |
| 506 | 506 |
| 507 checkEnterpriseAccount(api.EnterpriseAccount o) { | 507 checkEnterpriseAccount(api.EnterpriseAccount o) { |
| 508 buildCounterEnterpriseAccount++; | 508 buildCounterEnterpriseAccount++; |
| 509 if (buildCounterEnterpriseAccount < 3) { | 509 if (buildCounterEnterpriseAccount < 3) { |
| 510 unittest.expect(o.accountEmail, unittest.equals('foo')); | 510 unittest.expect(o.accountEmail, unittest.equals('foo')); |
| 511 unittest.expect(o.kind, unittest.equals('foo')); | 511 unittest.expect(o.kind, unittest.equals('foo')); |
| 512 } | 512 } |
| 513 buildCounterEnterpriseAccount--; | 513 buildCounterEnterpriseAccount--; |
| 514 } | 514 } |
| 515 | 515 |
| 516 buildUnnamed2018() { | 516 buildUnnamed2028() { |
| 517 var o = new core.List<api.Enterprise>(); | 517 var o = new core.List<api.Enterprise>(); |
| 518 o.add(buildEnterprise()); | 518 o.add(buildEnterprise()); |
| 519 o.add(buildEnterprise()); | 519 o.add(buildEnterprise()); |
| 520 return o; | 520 return o; |
| 521 } | 521 } |
| 522 | 522 |
| 523 checkUnnamed2018(core.List<api.Enterprise> o) { | 523 checkUnnamed2028(core.List<api.Enterprise> o) { |
| 524 unittest.expect(o, unittest.hasLength(2)); | 524 unittest.expect(o, unittest.hasLength(2)); |
| 525 checkEnterprise(o[0]); | 525 checkEnterprise(o[0]); |
| 526 checkEnterprise(o[1]); | 526 checkEnterprise(o[1]); |
| 527 } | 527 } |
| 528 | 528 |
| 529 core.int buildCounterEnterprisesListResponse = 0; | 529 core.int buildCounterEnterprisesListResponse = 0; |
| 530 buildEnterprisesListResponse() { | 530 buildEnterprisesListResponse() { |
| 531 var o = new api.EnterprisesListResponse(); | 531 var o = new api.EnterprisesListResponse(); |
| 532 buildCounterEnterprisesListResponse++; | 532 buildCounterEnterprisesListResponse++; |
| 533 if (buildCounterEnterprisesListResponse < 3) { | 533 if (buildCounterEnterprisesListResponse < 3) { |
| 534 o.enterprise = buildUnnamed2018(); | 534 o.enterprise = buildUnnamed2028(); |
| 535 o.kind = "foo"; | 535 o.kind = "foo"; |
| 536 } | 536 } |
| 537 buildCounterEnterprisesListResponse--; | 537 buildCounterEnterprisesListResponse--; |
| 538 return o; | 538 return o; |
| 539 } | 539 } |
| 540 | 540 |
| 541 checkEnterprisesListResponse(api.EnterprisesListResponse o) { | 541 checkEnterprisesListResponse(api.EnterprisesListResponse o) { |
| 542 buildCounterEnterprisesListResponse++; | 542 buildCounterEnterprisesListResponse++; |
| 543 if (buildCounterEnterprisesListResponse < 3) { | 543 if (buildCounterEnterprisesListResponse < 3) { |
| 544 checkUnnamed2018(o.enterprise); | 544 checkUnnamed2028(o.enterprise); |
| 545 unittest.expect(o.kind, unittest.equals('foo')); | 545 unittest.expect(o.kind, unittest.equals('foo')); |
| 546 } | 546 } |
| 547 buildCounterEnterprisesListResponse--; | 547 buildCounterEnterprisesListResponse--; |
| 548 } | 548 } |
| 549 | 549 |
| 550 core.int buildCounterEnterprisesSendTestPushNotificationResponse = 0; | 550 core.int buildCounterEnterprisesSendTestPushNotificationResponse = 0; |
| 551 buildEnterprisesSendTestPushNotificationResponse() { | 551 buildEnterprisesSendTestPushNotificationResponse() { |
| 552 var o = new api.EnterprisesSendTestPushNotificationResponse(); | 552 var o = new api.EnterprisesSendTestPushNotificationResponse(); |
| 553 buildCounterEnterprisesSendTestPushNotificationResponse++; | 553 buildCounterEnterprisesSendTestPushNotificationResponse++; |
| 554 if (buildCounterEnterprisesSendTestPushNotificationResponse < 3) { | 554 if (buildCounterEnterprisesSendTestPushNotificationResponse < 3) { |
| (...skipping 29 matching lines...) Expand all Loading... |
| 584 checkEntitlement(api.Entitlement o) { | 584 checkEntitlement(api.Entitlement o) { |
| 585 buildCounterEntitlement++; | 585 buildCounterEntitlement++; |
| 586 if (buildCounterEntitlement < 3) { | 586 if (buildCounterEntitlement < 3) { |
| 587 unittest.expect(o.kind, unittest.equals('foo')); | 587 unittest.expect(o.kind, unittest.equals('foo')); |
| 588 unittest.expect(o.productId, unittest.equals('foo')); | 588 unittest.expect(o.productId, unittest.equals('foo')); |
| 589 unittest.expect(o.reason, unittest.equals('foo')); | 589 unittest.expect(o.reason, unittest.equals('foo')); |
| 590 } | 590 } |
| 591 buildCounterEntitlement--; | 591 buildCounterEntitlement--; |
| 592 } | 592 } |
| 593 | 593 |
| 594 buildUnnamed2019() { | 594 buildUnnamed2029() { |
| 595 var o = new core.List<api.Entitlement>(); | 595 var o = new core.List<api.Entitlement>(); |
| 596 o.add(buildEntitlement()); | 596 o.add(buildEntitlement()); |
| 597 o.add(buildEntitlement()); | 597 o.add(buildEntitlement()); |
| 598 return o; | 598 return o; |
| 599 } | 599 } |
| 600 | 600 |
| 601 checkUnnamed2019(core.List<api.Entitlement> o) { | 601 checkUnnamed2029(core.List<api.Entitlement> o) { |
| 602 unittest.expect(o, unittest.hasLength(2)); | 602 unittest.expect(o, unittest.hasLength(2)); |
| 603 checkEntitlement(o[0]); | 603 checkEntitlement(o[0]); |
| 604 checkEntitlement(o[1]); | 604 checkEntitlement(o[1]); |
| 605 } | 605 } |
| 606 | 606 |
| 607 core.int buildCounterEntitlementsListResponse = 0; | 607 core.int buildCounterEntitlementsListResponse = 0; |
| 608 buildEntitlementsListResponse() { | 608 buildEntitlementsListResponse() { |
| 609 var o = new api.EntitlementsListResponse(); | 609 var o = new api.EntitlementsListResponse(); |
| 610 buildCounterEntitlementsListResponse++; | 610 buildCounterEntitlementsListResponse++; |
| 611 if (buildCounterEntitlementsListResponse < 3) { | 611 if (buildCounterEntitlementsListResponse < 3) { |
| 612 o.entitlement = buildUnnamed2019(); | 612 o.entitlement = buildUnnamed2029(); |
| 613 o.kind = "foo"; | 613 o.kind = "foo"; |
| 614 } | 614 } |
| 615 buildCounterEntitlementsListResponse--; | 615 buildCounterEntitlementsListResponse--; |
| 616 return o; | 616 return o; |
| 617 } | 617 } |
| 618 | 618 |
| 619 checkEntitlementsListResponse(api.EntitlementsListResponse o) { | 619 checkEntitlementsListResponse(api.EntitlementsListResponse o) { |
| 620 buildCounterEntitlementsListResponse++; | 620 buildCounterEntitlementsListResponse++; |
| 621 if (buildCounterEntitlementsListResponse < 3) { | 621 if (buildCounterEntitlementsListResponse < 3) { |
| 622 checkUnnamed2019(o.entitlement); | 622 checkUnnamed2029(o.entitlement); |
| 623 unittest.expect(o.kind, unittest.equals('foo')); | 623 unittest.expect(o.kind, unittest.equals('foo')); |
| 624 } | 624 } |
| 625 buildCounterEntitlementsListResponse--; | 625 buildCounterEntitlementsListResponse--; |
| 626 } | 626 } |
| 627 | 627 |
| 628 core.int buildCounterGroupLicense = 0; | 628 core.int buildCounterGroupLicense = 0; |
| 629 buildGroupLicense() { | 629 buildGroupLicense() { |
| 630 var o = new api.GroupLicense(); | 630 var o = new api.GroupLicense(); |
| 631 buildCounterGroupLicense++; | 631 buildCounterGroupLicense++; |
| 632 if (buildCounterGroupLicense < 3) { | 632 if (buildCounterGroupLicense < 3) { |
| (...skipping 16 matching lines...) Expand all Loading... |
| 649 unittest.expect(o.approval, unittest.equals('foo')); | 649 unittest.expect(o.approval, unittest.equals('foo')); |
| 650 unittest.expect(o.kind, unittest.equals('foo')); | 650 unittest.expect(o.kind, unittest.equals('foo')); |
| 651 unittest.expect(o.numProvisioned, unittest.equals(42)); | 651 unittest.expect(o.numProvisioned, unittest.equals(42)); |
| 652 unittest.expect(o.numPurchased, unittest.equals(42)); | 652 unittest.expect(o.numPurchased, unittest.equals(42)); |
| 653 unittest.expect(o.permissions, unittest.equals('foo')); | 653 unittest.expect(o.permissions, unittest.equals('foo')); |
| 654 unittest.expect(o.productId, unittest.equals('foo')); | 654 unittest.expect(o.productId, unittest.equals('foo')); |
| 655 } | 655 } |
| 656 buildCounterGroupLicense--; | 656 buildCounterGroupLicense--; |
| 657 } | 657 } |
| 658 | 658 |
| 659 buildUnnamed2020() { | 659 buildUnnamed2030() { |
| 660 var o = new core.List<api.User>(); | 660 var o = new core.List<api.User>(); |
| 661 o.add(buildUser()); | 661 o.add(buildUser()); |
| 662 o.add(buildUser()); | 662 o.add(buildUser()); |
| 663 return o; | 663 return o; |
| 664 } | 664 } |
| 665 | 665 |
| 666 checkUnnamed2020(core.List<api.User> o) { | 666 checkUnnamed2030(core.List<api.User> o) { |
| 667 unittest.expect(o, unittest.hasLength(2)); | 667 unittest.expect(o, unittest.hasLength(2)); |
| 668 checkUser(o[0]); | 668 checkUser(o[0]); |
| 669 checkUser(o[1]); | 669 checkUser(o[1]); |
| 670 } | 670 } |
| 671 | 671 |
| 672 core.int buildCounterGroupLicenseUsersListResponse = 0; | 672 core.int buildCounterGroupLicenseUsersListResponse = 0; |
| 673 buildGroupLicenseUsersListResponse() { | 673 buildGroupLicenseUsersListResponse() { |
| 674 var o = new api.GroupLicenseUsersListResponse(); | 674 var o = new api.GroupLicenseUsersListResponse(); |
| 675 buildCounterGroupLicenseUsersListResponse++; | 675 buildCounterGroupLicenseUsersListResponse++; |
| 676 if (buildCounterGroupLicenseUsersListResponse < 3) { | 676 if (buildCounterGroupLicenseUsersListResponse < 3) { |
| 677 o.kind = "foo"; | 677 o.kind = "foo"; |
| 678 o.user = buildUnnamed2020(); | 678 o.user = buildUnnamed2030(); |
| 679 } | 679 } |
| 680 buildCounterGroupLicenseUsersListResponse--; | 680 buildCounterGroupLicenseUsersListResponse--; |
| 681 return o; | 681 return o; |
| 682 } | 682 } |
| 683 | 683 |
| 684 checkGroupLicenseUsersListResponse(api.GroupLicenseUsersListResponse o) { | 684 checkGroupLicenseUsersListResponse(api.GroupLicenseUsersListResponse o) { |
| 685 buildCounterGroupLicenseUsersListResponse++; | 685 buildCounterGroupLicenseUsersListResponse++; |
| 686 if (buildCounterGroupLicenseUsersListResponse < 3) { | 686 if (buildCounterGroupLicenseUsersListResponse < 3) { |
| 687 unittest.expect(o.kind, unittest.equals('foo')); | 687 unittest.expect(o.kind, unittest.equals('foo')); |
| 688 checkUnnamed2020(o.user); | 688 checkUnnamed2030(o.user); |
| 689 } | 689 } |
| 690 buildCounterGroupLicenseUsersListResponse--; | 690 buildCounterGroupLicenseUsersListResponse--; |
| 691 } | 691 } |
| 692 | 692 |
| 693 buildUnnamed2021() { | 693 buildUnnamed2031() { |
| 694 var o = new core.List<api.GroupLicense>(); | 694 var o = new core.List<api.GroupLicense>(); |
| 695 o.add(buildGroupLicense()); | 695 o.add(buildGroupLicense()); |
| 696 o.add(buildGroupLicense()); | 696 o.add(buildGroupLicense()); |
| 697 return o; | 697 return o; |
| 698 } | 698 } |
| 699 | 699 |
| 700 checkUnnamed2021(core.List<api.GroupLicense> o) { | 700 checkUnnamed2031(core.List<api.GroupLicense> o) { |
| 701 unittest.expect(o, unittest.hasLength(2)); | 701 unittest.expect(o, unittest.hasLength(2)); |
| 702 checkGroupLicense(o[0]); | 702 checkGroupLicense(o[0]); |
| 703 checkGroupLicense(o[1]); | 703 checkGroupLicense(o[1]); |
| 704 } | 704 } |
| 705 | 705 |
| 706 core.int buildCounterGroupLicensesListResponse = 0; | 706 core.int buildCounterGroupLicensesListResponse = 0; |
| 707 buildGroupLicensesListResponse() { | 707 buildGroupLicensesListResponse() { |
| 708 var o = new api.GroupLicensesListResponse(); | 708 var o = new api.GroupLicensesListResponse(); |
| 709 buildCounterGroupLicensesListResponse++; | 709 buildCounterGroupLicensesListResponse++; |
| 710 if (buildCounterGroupLicensesListResponse < 3) { | 710 if (buildCounterGroupLicensesListResponse < 3) { |
| 711 o.groupLicense = buildUnnamed2021(); | 711 o.groupLicense = buildUnnamed2031(); |
| 712 o.kind = "foo"; | 712 o.kind = "foo"; |
| 713 } | 713 } |
| 714 buildCounterGroupLicensesListResponse--; | 714 buildCounterGroupLicensesListResponse--; |
| 715 return o; | 715 return o; |
| 716 } | 716 } |
| 717 | 717 |
| 718 checkGroupLicensesListResponse(api.GroupLicensesListResponse o) { | 718 checkGroupLicensesListResponse(api.GroupLicensesListResponse o) { |
| 719 buildCounterGroupLicensesListResponse++; | 719 buildCounterGroupLicensesListResponse++; |
| 720 if (buildCounterGroupLicensesListResponse < 3) { | 720 if (buildCounterGroupLicensesListResponse < 3) { |
| 721 checkUnnamed2021(o.groupLicense); | 721 checkUnnamed2031(o.groupLicense); |
| 722 unittest.expect(o.kind, unittest.equals('foo')); | 722 unittest.expect(o.kind, unittest.equals('foo')); |
| 723 } | 723 } |
| 724 buildCounterGroupLicensesListResponse--; | 724 buildCounterGroupLicensesListResponse--; |
| 725 } | 725 } |
| 726 | 726 |
| 727 core.int buildCounterInstall = 0; | 727 core.int buildCounterInstall = 0; |
| 728 buildInstall() { | 728 buildInstall() { |
| 729 var o = new api.Install(); | 729 var o = new api.Install(); |
| 730 buildCounterInstall++; | 730 buildCounterInstall++; |
| 731 if (buildCounterInstall < 3) { | 731 if (buildCounterInstall < 3) { |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 769 if (buildCounterInstallFailureEvent < 3) { | 769 if (buildCounterInstallFailureEvent < 3) { |
| 770 unittest.expect(o.deviceId, unittest.equals('foo')); | 770 unittest.expect(o.deviceId, unittest.equals('foo')); |
| 771 unittest.expect(o.failureDetails, unittest.equals('foo')); | 771 unittest.expect(o.failureDetails, unittest.equals('foo')); |
| 772 unittest.expect(o.failureReason, unittest.equals('foo')); | 772 unittest.expect(o.failureReason, unittest.equals('foo')); |
| 773 unittest.expect(o.productId, unittest.equals('foo')); | 773 unittest.expect(o.productId, unittest.equals('foo')); |
| 774 unittest.expect(o.userId, unittest.equals('foo')); | 774 unittest.expect(o.userId, unittest.equals('foo')); |
| 775 } | 775 } |
| 776 buildCounterInstallFailureEvent--; | 776 buildCounterInstallFailureEvent--; |
| 777 } | 777 } |
| 778 | 778 |
| 779 buildUnnamed2022() { | 779 buildUnnamed2032() { |
| 780 var o = new core.List<api.Install>(); | 780 var o = new core.List<api.Install>(); |
| 781 o.add(buildInstall()); | 781 o.add(buildInstall()); |
| 782 o.add(buildInstall()); | 782 o.add(buildInstall()); |
| 783 return o; | 783 return o; |
| 784 } | 784 } |
| 785 | 785 |
| 786 checkUnnamed2022(core.List<api.Install> o) { | 786 checkUnnamed2032(core.List<api.Install> o) { |
| 787 unittest.expect(o, unittest.hasLength(2)); | 787 unittest.expect(o, unittest.hasLength(2)); |
| 788 checkInstall(o[0]); | 788 checkInstall(o[0]); |
| 789 checkInstall(o[1]); | 789 checkInstall(o[1]); |
| 790 } | 790 } |
| 791 | 791 |
| 792 core.int buildCounterInstallsListResponse = 0; | 792 core.int buildCounterInstallsListResponse = 0; |
| 793 buildInstallsListResponse() { | 793 buildInstallsListResponse() { |
| 794 var o = new api.InstallsListResponse(); | 794 var o = new api.InstallsListResponse(); |
| 795 buildCounterInstallsListResponse++; | 795 buildCounterInstallsListResponse++; |
| 796 if (buildCounterInstallsListResponse < 3) { | 796 if (buildCounterInstallsListResponse < 3) { |
| 797 o.install = buildUnnamed2022(); | 797 o.install = buildUnnamed2032(); |
| 798 o.kind = "foo"; | 798 o.kind = "foo"; |
| 799 } | 799 } |
| 800 buildCounterInstallsListResponse--; | 800 buildCounterInstallsListResponse--; |
| 801 return o; | 801 return o; |
| 802 } | 802 } |
| 803 | 803 |
| 804 checkInstallsListResponse(api.InstallsListResponse o) { | 804 checkInstallsListResponse(api.InstallsListResponse o) { |
| 805 buildCounterInstallsListResponse++; | 805 buildCounterInstallsListResponse++; |
| 806 if (buildCounterInstallsListResponse < 3) { | 806 if (buildCounterInstallsListResponse < 3) { |
| 807 checkUnnamed2022(o.install); | 807 checkUnnamed2032(o.install); |
| 808 unittest.expect(o.kind, unittest.equals('foo')); | 808 unittest.expect(o.kind, unittest.equals('foo')); |
| 809 } | 809 } |
| 810 buildCounterInstallsListResponse--; | 810 buildCounterInstallsListResponse--; |
| 811 } | 811 } |
| 812 | 812 |
| 813 core.int buildCounterLocalizedText = 0; | 813 core.int buildCounterLocalizedText = 0; |
| 814 buildLocalizedText() { | 814 buildLocalizedText() { |
| 815 var o = new api.LocalizedText(); | 815 var o = new api.LocalizedText(); |
| 816 buildCounterLocalizedText++; | 816 buildCounterLocalizedText++; |
| 817 if (buildCounterLocalizedText < 3) { | 817 if (buildCounterLocalizedText < 3) { |
| 818 o.locale = "foo"; | 818 o.locale = "foo"; |
| 819 o.text = "foo"; | 819 o.text = "foo"; |
| 820 } | 820 } |
| 821 buildCounterLocalizedText--; | 821 buildCounterLocalizedText--; |
| 822 return o; | 822 return o; |
| 823 } | 823 } |
| 824 | 824 |
| 825 checkLocalizedText(api.LocalizedText o) { | 825 checkLocalizedText(api.LocalizedText o) { |
| 826 buildCounterLocalizedText++; | 826 buildCounterLocalizedText++; |
| 827 if (buildCounterLocalizedText < 3) { | 827 if (buildCounterLocalizedText < 3) { |
| 828 unittest.expect(o.locale, unittest.equals('foo')); | 828 unittest.expect(o.locale, unittest.equals('foo')); |
| 829 unittest.expect(o.text, unittest.equals('foo')); | 829 unittest.expect(o.text, unittest.equals('foo')); |
| 830 } | 830 } |
| 831 buildCounterLocalizedText--; | 831 buildCounterLocalizedText--; |
| 832 } | 832 } |
| 833 | 833 |
| 834 buildUnnamed2023() { | 834 buildUnnamed2033() { |
| 835 var o = new core.List<api.ManagedProperty>(); | 835 var o = new core.List<api.ManagedProperty>(); |
| 836 o.add(buildManagedProperty()); | 836 o.add(buildManagedProperty()); |
| 837 o.add(buildManagedProperty()); | 837 o.add(buildManagedProperty()); |
| 838 return o; | 838 return o; |
| 839 } | 839 } |
| 840 | 840 |
| 841 checkUnnamed2023(core.List<api.ManagedProperty> o) { | 841 checkUnnamed2033(core.List<api.ManagedProperty> o) { |
| 842 unittest.expect(o, unittest.hasLength(2)); | 842 unittest.expect(o, unittest.hasLength(2)); |
| 843 checkManagedProperty(o[0]); | 843 checkManagedProperty(o[0]); |
| 844 checkManagedProperty(o[1]); | 844 checkManagedProperty(o[1]); |
| 845 } | 845 } |
| 846 | 846 |
| 847 core.int buildCounterManagedConfiguration = 0; | 847 core.int buildCounterManagedConfiguration = 0; |
| 848 buildManagedConfiguration() { | 848 buildManagedConfiguration() { |
| 849 var o = new api.ManagedConfiguration(); | 849 var o = new api.ManagedConfiguration(); |
| 850 buildCounterManagedConfiguration++; | 850 buildCounterManagedConfiguration++; |
| 851 if (buildCounterManagedConfiguration < 3) { | 851 if (buildCounterManagedConfiguration < 3) { |
| 852 o.kind = "foo"; | 852 o.kind = "foo"; |
| 853 o.managedProperty = buildUnnamed2023(); | 853 o.managedProperty = buildUnnamed2033(); |
| 854 o.productId = "foo"; | 854 o.productId = "foo"; |
| 855 } | 855 } |
| 856 buildCounterManagedConfiguration--; | 856 buildCounterManagedConfiguration--; |
| 857 return o; | 857 return o; |
| 858 } | 858 } |
| 859 | 859 |
| 860 checkManagedConfiguration(api.ManagedConfiguration o) { | 860 checkManagedConfiguration(api.ManagedConfiguration o) { |
| 861 buildCounterManagedConfiguration++; | 861 buildCounterManagedConfiguration++; |
| 862 if (buildCounterManagedConfiguration < 3) { | 862 if (buildCounterManagedConfiguration < 3) { |
| 863 unittest.expect(o.kind, unittest.equals('foo')); | 863 unittest.expect(o.kind, unittest.equals('foo')); |
| 864 checkUnnamed2023(o.managedProperty); | 864 checkUnnamed2033(o.managedProperty); |
| 865 unittest.expect(o.productId, unittest.equals('foo')); | 865 unittest.expect(o.productId, unittest.equals('foo')); |
| 866 } | 866 } |
| 867 buildCounterManagedConfiguration--; | 867 buildCounterManagedConfiguration--; |
| 868 } | 868 } |
| 869 | 869 |
| 870 buildUnnamed2024() { | 870 buildUnnamed2034() { |
| 871 var o = new core.List<api.ManagedConfiguration>(); | 871 var o = new core.List<api.ManagedConfiguration>(); |
| 872 o.add(buildManagedConfiguration()); | 872 o.add(buildManagedConfiguration()); |
| 873 o.add(buildManagedConfiguration()); | 873 o.add(buildManagedConfiguration()); |
| 874 return o; | 874 return o; |
| 875 } | 875 } |
| 876 | 876 |
| 877 checkUnnamed2024(core.List<api.ManagedConfiguration> o) { | 877 checkUnnamed2034(core.List<api.ManagedConfiguration> o) { |
| 878 unittest.expect(o, unittest.hasLength(2)); | 878 unittest.expect(o, unittest.hasLength(2)); |
| 879 checkManagedConfiguration(o[0]); | 879 checkManagedConfiguration(o[0]); |
| 880 checkManagedConfiguration(o[1]); | 880 checkManagedConfiguration(o[1]); |
| 881 } | 881 } |
| 882 | 882 |
| 883 core.int buildCounterManagedConfigurationsForDeviceListResponse = 0; | 883 core.int buildCounterManagedConfigurationsForDeviceListResponse = 0; |
| 884 buildManagedConfigurationsForDeviceListResponse() { | 884 buildManagedConfigurationsForDeviceListResponse() { |
| 885 var o = new api.ManagedConfigurationsForDeviceListResponse(); | 885 var o = new api.ManagedConfigurationsForDeviceListResponse(); |
| 886 buildCounterManagedConfigurationsForDeviceListResponse++; | 886 buildCounterManagedConfigurationsForDeviceListResponse++; |
| 887 if (buildCounterManagedConfigurationsForDeviceListResponse < 3) { | 887 if (buildCounterManagedConfigurationsForDeviceListResponse < 3) { |
| 888 o.kind = "foo"; | 888 o.kind = "foo"; |
| 889 o.managedConfigurationForDevice = buildUnnamed2024(); | 889 o.managedConfigurationForDevice = buildUnnamed2034(); |
| 890 } | 890 } |
| 891 buildCounterManagedConfigurationsForDeviceListResponse--; | 891 buildCounterManagedConfigurationsForDeviceListResponse--; |
| 892 return o; | 892 return o; |
| 893 } | 893 } |
| 894 | 894 |
| 895 checkManagedConfigurationsForDeviceListResponse(api.ManagedConfigurationsForDevi
ceListResponse o) { | 895 checkManagedConfigurationsForDeviceListResponse(api.ManagedConfigurationsForDevi
ceListResponse o) { |
| 896 buildCounterManagedConfigurationsForDeviceListResponse++; | 896 buildCounterManagedConfigurationsForDeviceListResponse++; |
| 897 if (buildCounterManagedConfigurationsForDeviceListResponse < 3) { | 897 if (buildCounterManagedConfigurationsForDeviceListResponse < 3) { |
| 898 unittest.expect(o.kind, unittest.equals('foo')); | 898 unittest.expect(o.kind, unittest.equals('foo')); |
| 899 checkUnnamed2024(o.managedConfigurationForDevice); | 899 checkUnnamed2034(o.managedConfigurationForDevice); |
| 900 } | 900 } |
| 901 buildCounterManagedConfigurationsForDeviceListResponse--; | 901 buildCounterManagedConfigurationsForDeviceListResponse--; |
| 902 } | 902 } |
| 903 | 903 |
| 904 buildUnnamed2025() { | 904 buildUnnamed2035() { |
| 905 var o = new core.List<api.ManagedConfiguration>(); | 905 var o = new core.List<api.ManagedConfiguration>(); |
| 906 o.add(buildManagedConfiguration()); | 906 o.add(buildManagedConfiguration()); |
| 907 o.add(buildManagedConfiguration()); | 907 o.add(buildManagedConfiguration()); |
| 908 return o; | 908 return o; |
| 909 } | 909 } |
| 910 | 910 |
| 911 checkUnnamed2025(core.List<api.ManagedConfiguration> o) { | 911 checkUnnamed2035(core.List<api.ManagedConfiguration> o) { |
| 912 unittest.expect(o, unittest.hasLength(2)); | 912 unittest.expect(o, unittest.hasLength(2)); |
| 913 checkManagedConfiguration(o[0]); | 913 checkManagedConfiguration(o[0]); |
| 914 checkManagedConfiguration(o[1]); | 914 checkManagedConfiguration(o[1]); |
| 915 } | 915 } |
| 916 | 916 |
| 917 core.int buildCounterManagedConfigurationsForUserListResponse = 0; | 917 core.int buildCounterManagedConfigurationsForUserListResponse = 0; |
| 918 buildManagedConfigurationsForUserListResponse() { | 918 buildManagedConfigurationsForUserListResponse() { |
| 919 var o = new api.ManagedConfigurationsForUserListResponse(); | 919 var o = new api.ManagedConfigurationsForUserListResponse(); |
| 920 buildCounterManagedConfigurationsForUserListResponse++; | 920 buildCounterManagedConfigurationsForUserListResponse++; |
| 921 if (buildCounterManagedConfigurationsForUserListResponse < 3) { | 921 if (buildCounterManagedConfigurationsForUserListResponse < 3) { |
| 922 o.kind = "foo"; | 922 o.kind = "foo"; |
| 923 o.managedConfigurationForUser = buildUnnamed2025(); | 923 o.managedConfigurationForUser = buildUnnamed2035(); |
| 924 } | 924 } |
| 925 buildCounterManagedConfigurationsForUserListResponse--; | 925 buildCounterManagedConfigurationsForUserListResponse--; |
| 926 return o; | 926 return o; |
| 927 } | 927 } |
| 928 | 928 |
| 929 checkManagedConfigurationsForUserListResponse(api.ManagedConfigurationsForUserLi
stResponse o) { | 929 checkManagedConfigurationsForUserListResponse(api.ManagedConfigurationsForUserLi
stResponse o) { |
| 930 buildCounterManagedConfigurationsForUserListResponse++; | 930 buildCounterManagedConfigurationsForUserListResponse++; |
| 931 if (buildCounterManagedConfigurationsForUserListResponse < 3) { | 931 if (buildCounterManagedConfigurationsForUserListResponse < 3) { |
| 932 unittest.expect(o.kind, unittest.equals('foo')); | 932 unittest.expect(o.kind, unittest.equals('foo')); |
| 933 checkUnnamed2025(o.managedConfigurationForUser); | 933 checkUnnamed2035(o.managedConfigurationForUser); |
| 934 } | 934 } |
| 935 buildCounterManagedConfigurationsForUserListResponse--; | 935 buildCounterManagedConfigurationsForUserListResponse--; |
| 936 } | 936 } |
| 937 | 937 |
| 938 buildUnnamed2026() { | 938 buildUnnamed2036() { |
| 939 var o = new core.List<api.ManagedPropertyBundle>(); | 939 var o = new core.List<api.ManagedPropertyBundle>(); |
| 940 o.add(buildManagedPropertyBundle()); | 940 o.add(buildManagedPropertyBundle()); |
| 941 o.add(buildManagedPropertyBundle()); | 941 o.add(buildManagedPropertyBundle()); |
| 942 return o; | 942 return o; |
| 943 } | 943 } |
| 944 | 944 |
| 945 checkUnnamed2026(core.List<api.ManagedPropertyBundle> o) { | 945 checkUnnamed2036(core.List<api.ManagedPropertyBundle> o) { |
| 946 unittest.expect(o, unittest.hasLength(2)); | 946 unittest.expect(o, unittest.hasLength(2)); |
| 947 checkManagedPropertyBundle(o[0]); | 947 checkManagedPropertyBundle(o[0]); |
| 948 checkManagedPropertyBundle(o[1]); | 948 checkManagedPropertyBundle(o[1]); |
| 949 } | 949 } |
| 950 | 950 |
| 951 buildUnnamed2027() { | 951 buildUnnamed2037() { |
| 952 var o = new core.List<core.String>(); | 952 var o = new core.List<core.String>(); |
| 953 o.add("foo"); | 953 o.add("foo"); |
| 954 o.add("foo"); | 954 o.add("foo"); |
| 955 return o; | 955 return o; |
| 956 } | 956 } |
| 957 | 957 |
| 958 checkUnnamed2027(core.List<core.String> o) { | 958 checkUnnamed2037(core.List<core.String> o) { |
| 959 unittest.expect(o, unittest.hasLength(2)); | 959 unittest.expect(o, unittest.hasLength(2)); |
| 960 unittest.expect(o[0], unittest.equals('foo')); | 960 unittest.expect(o[0], unittest.equals('foo')); |
| 961 unittest.expect(o[1], unittest.equals('foo')); | 961 unittest.expect(o[1], unittest.equals('foo')); |
| 962 } | 962 } |
| 963 | 963 |
| 964 core.int buildCounterManagedProperty = 0; | 964 core.int buildCounterManagedProperty = 0; |
| 965 buildManagedProperty() { | 965 buildManagedProperty() { |
| 966 var o = new api.ManagedProperty(); | 966 var o = new api.ManagedProperty(); |
| 967 buildCounterManagedProperty++; | 967 buildCounterManagedProperty++; |
| 968 if (buildCounterManagedProperty < 3) { | 968 if (buildCounterManagedProperty < 3) { |
| 969 o.key = "foo"; | 969 o.key = "foo"; |
| 970 o.valueBool = true; | 970 o.valueBool = true; |
| 971 o.valueBundle = buildManagedPropertyBundle(); | 971 o.valueBundle = buildManagedPropertyBundle(); |
| 972 o.valueBundleArray = buildUnnamed2026(); | 972 o.valueBundleArray = buildUnnamed2036(); |
| 973 o.valueInteger = 42; | 973 o.valueInteger = 42; |
| 974 o.valueString = "foo"; | 974 o.valueString = "foo"; |
| 975 o.valueStringArray = buildUnnamed2027(); | 975 o.valueStringArray = buildUnnamed2037(); |
| 976 } | 976 } |
| 977 buildCounterManagedProperty--; | 977 buildCounterManagedProperty--; |
| 978 return o; | 978 return o; |
| 979 } | 979 } |
| 980 | 980 |
| 981 checkManagedProperty(api.ManagedProperty o) { | 981 checkManagedProperty(api.ManagedProperty o) { |
| 982 buildCounterManagedProperty++; | 982 buildCounterManagedProperty++; |
| 983 if (buildCounterManagedProperty < 3) { | 983 if (buildCounterManagedProperty < 3) { |
| 984 unittest.expect(o.key, unittest.equals('foo')); | 984 unittest.expect(o.key, unittest.equals('foo')); |
| 985 unittest.expect(o.valueBool, unittest.isTrue); | 985 unittest.expect(o.valueBool, unittest.isTrue); |
| 986 checkManagedPropertyBundle(o.valueBundle); | 986 checkManagedPropertyBundle(o.valueBundle); |
| 987 checkUnnamed2026(o.valueBundleArray); | 987 checkUnnamed2036(o.valueBundleArray); |
| 988 unittest.expect(o.valueInteger, unittest.equals(42)); | 988 unittest.expect(o.valueInteger, unittest.equals(42)); |
| 989 unittest.expect(o.valueString, unittest.equals('foo')); | 989 unittest.expect(o.valueString, unittest.equals('foo')); |
| 990 checkUnnamed2027(o.valueStringArray); | 990 checkUnnamed2037(o.valueStringArray); |
| 991 } | 991 } |
| 992 buildCounterManagedProperty--; | 992 buildCounterManagedProperty--; |
| 993 } | 993 } |
| 994 | 994 |
| 995 buildUnnamed2028() { | 995 buildUnnamed2038() { |
| 996 var o = new core.List<api.ManagedProperty>(); | 996 var o = new core.List<api.ManagedProperty>(); |
| 997 o.add(buildManagedProperty()); | 997 o.add(buildManagedProperty()); |
| 998 o.add(buildManagedProperty()); | 998 o.add(buildManagedProperty()); |
| 999 return o; | 999 return o; |
| 1000 } | 1000 } |
| 1001 | 1001 |
| 1002 checkUnnamed2028(core.List<api.ManagedProperty> o) { | 1002 checkUnnamed2038(core.List<api.ManagedProperty> o) { |
| 1003 unittest.expect(o, unittest.hasLength(2)); | 1003 unittest.expect(o, unittest.hasLength(2)); |
| 1004 checkManagedProperty(o[0]); | 1004 checkManagedProperty(o[0]); |
| 1005 checkManagedProperty(o[1]); | 1005 checkManagedProperty(o[1]); |
| 1006 } | 1006 } |
| 1007 | 1007 |
| 1008 core.int buildCounterManagedPropertyBundle = 0; | 1008 core.int buildCounterManagedPropertyBundle = 0; |
| 1009 buildManagedPropertyBundle() { | 1009 buildManagedPropertyBundle() { |
| 1010 var o = new api.ManagedPropertyBundle(); | 1010 var o = new api.ManagedPropertyBundle(); |
| 1011 buildCounterManagedPropertyBundle++; | 1011 buildCounterManagedPropertyBundle++; |
| 1012 if (buildCounterManagedPropertyBundle < 3) { | 1012 if (buildCounterManagedPropertyBundle < 3) { |
| 1013 o.managedProperty = buildUnnamed2028(); | 1013 o.managedProperty = buildUnnamed2038(); |
| 1014 } | 1014 } |
| 1015 buildCounterManagedPropertyBundle--; | 1015 buildCounterManagedPropertyBundle--; |
| 1016 return o; | 1016 return o; |
| 1017 } | 1017 } |
| 1018 | 1018 |
| 1019 checkManagedPropertyBundle(api.ManagedPropertyBundle o) { | 1019 checkManagedPropertyBundle(api.ManagedPropertyBundle o) { |
| 1020 buildCounterManagedPropertyBundle++; | 1020 buildCounterManagedPropertyBundle++; |
| 1021 if (buildCounterManagedPropertyBundle < 3) { | 1021 if (buildCounterManagedPropertyBundle < 3) { |
| 1022 checkUnnamed2028(o.managedProperty); | 1022 checkUnnamed2038(o.managedProperty); |
| 1023 } | 1023 } |
| 1024 buildCounterManagedPropertyBundle--; | 1024 buildCounterManagedPropertyBundle--; |
| 1025 } | 1025 } |
| 1026 | 1026 |
| 1027 core.int buildCounterNewDeviceEvent = 0; | 1027 core.int buildCounterNewDeviceEvent = 0; |
| 1028 buildNewDeviceEvent() { | 1028 buildNewDeviceEvent() { |
| 1029 var o = new api.NewDeviceEvent(); | 1029 var o = new api.NewDeviceEvent(); |
| 1030 buildCounterNewDeviceEvent++; | 1030 buildCounterNewDeviceEvent++; |
| 1031 if (buildCounterNewDeviceEvent < 3) { | 1031 if (buildCounterNewDeviceEvent < 3) { |
| 1032 o.deviceId = "foo"; | 1032 o.deviceId = "foo"; |
| 1033 o.managementType = "foo"; | 1033 o.managementType = "foo"; |
| 1034 o.userId = "foo"; | 1034 o.userId = "foo"; |
| 1035 } | 1035 } |
| 1036 buildCounterNewDeviceEvent--; | 1036 buildCounterNewDeviceEvent--; |
| 1037 return o; | 1037 return o; |
| 1038 } | 1038 } |
| 1039 | 1039 |
| 1040 checkNewDeviceEvent(api.NewDeviceEvent o) { | 1040 checkNewDeviceEvent(api.NewDeviceEvent o) { |
| 1041 buildCounterNewDeviceEvent++; | 1041 buildCounterNewDeviceEvent++; |
| 1042 if (buildCounterNewDeviceEvent < 3) { | 1042 if (buildCounterNewDeviceEvent < 3) { |
| 1043 unittest.expect(o.deviceId, unittest.equals('foo')); | 1043 unittest.expect(o.deviceId, unittest.equals('foo')); |
| 1044 unittest.expect(o.managementType, unittest.equals('foo')); | 1044 unittest.expect(o.managementType, unittest.equals('foo')); |
| 1045 unittest.expect(o.userId, unittest.equals('foo')); | 1045 unittest.expect(o.userId, unittest.equals('foo')); |
| 1046 } | 1046 } |
| 1047 buildCounterNewDeviceEvent--; | 1047 buildCounterNewDeviceEvent--; |
| 1048 } | 1048 } |
| 1049 | 1049 |
| 1050 buildUnnamed2029() { | 1050 buildUnnamed2039() { |
| 1051 var o = new core.List<core.String>(); | 1051 var o = new core.List<core.String>(); |
| 1052 o.add("foo"); | 1052 o.add("foo"); |
| 1053 o.add("foo"); | 1053 o.add("foo"); |
| 1054 return o; | 1054 return o; |
| 1055 } | 1055 } |
| 1056 | 1056 |
| 1057 checkUnnamed2029(core.List<core.String> o) { | 1057 checkUnnamed2039(core.List<core.String> o) { |
| 1058 unittest.expect(o, unittest.hasLength(2)); | 1058 unittest.expect(o, unittest.hasLength(2)); |
| 1059 unittest.expect(o[0], unittest.equals('foo')); | 1059 unittest.expect(o[0], unittest.equals('foo')); |
| 1060 unittest.expect(o[1], unittest.equals('foo')); | 1060 unittest.expect(o[1], unittest.equals('foo')); |
| 1061 } | 1061 } |
| 1062 | 1062 |
| 1063 buildUnnamed2030() { | 1063 buildUnnamed2040() { |
| 1064 var o = new core.List<core.String>(); | 1064 var o = new core.List<core.String>(); |
| 1065 o.add("foo"); | 1065 o.add("foo"); |
| 1066 o.add("foo"); | 1066 o.add("foo"); |
| 1067 return o; | 1067 return o; |
| 1068 } | 1068 } |
| 1069 | 1069 |
| 1070 checkUnnamed2030(core.List<core.String> o) { | 1070 checkUnnamed2040(core.List<core.String> o) { |
| 1071 unittest.expect(o, unittest.hasLength(2)); | 1071 unittest.expect(o, unittest.hasLength(2)); |
| 1072 unittest.expect(o[0], unittest.equals('foo')); | 1072 unittest.expect(o[0], unittest.equals('foo')); |
| 1073 unittest.expect(o[1], unittest.equals('foo')); | 1073 unittest.expect(o[1], unittest.equals('foo')); |
| 1074 } | 1074 } |
| 1075 | 1075 |
| 1076 core.int buildCounterNewPermissionsEvent = 0; | 1076 core.int buildCounterNewPermissionsEvent = 0; |
| 1077 buildNewPermissionsEvent() { | 1077 buildNewPermissionsEvent() { |
| 1078 var o = new api.NewPermissionsEvent(); | 1078 var o = new api.NewPermissionsEvent(); |
| 1079 buildCounterNewPermissionsEvent++; | 1079 buildCounterNewPermissionsEvent++; |
| 1080 if (buildCounterNewPermissionsEvent < 3) { | 1080 if (buildCounterNewPermissionsEvent < 3) { |
| 1081 o.approvedPermissions = buildUnnamed2029(); | 1081 o.approvedPermissions = buildUnnamed2039(); |
| 1082 o.productId = "foo"; | 1082 o.productId = "foo"; |
| 1083 o.requestedPermissions = buildUnnamed2030(); | 1083 o.requestedPermissions = buildUnnamed2040(); |
| 1084 } | 1084 } |
| 1085 buildCounterNewPermissionsEvent--; | 1085 buildCounterNewPermissionsEvent--; |
| 1086 return o; | 1086 return o; |
| 1087 } | 1087 } |
| 1088 | 1088 |
| 1089 checkNewPermissionsEvent(api.NewPermissionsEvent o) { | 1089 checkNewPermissionsEvent(api.NewPermissionsEvent o) { |
| 1090 buildCounterNewPermissionsEvent++; | 1090 buildCounterNewPermissionsEvent++; |
| 1091 if (buildCounterNewPermissionsEvent < 3) { | 1091 if (buildCounterNewPermissionsEvent < 3) { |
| 1092 checkUnnamed2029(o.approvedPermissions); | 1092 checkUnnamed2039(o.approvedPermissions); |
| 1093 unittest.expect(o.productId, unittest.equals('foo')); | 1093 unittest.expect(o.productId, unittest.equals('foo')); |
| 1094 checkUnnamed2030(o.requestedPermissions); | 1094 checkUnnamed2040(o.requestedPermissions); |
| 1095 } | 1095 } |
| 1096 buildCounterNewPermissionsEvent--; | 1096 buildCounterNewPermissionsEvent--; |
| 1097 } | 1097 } |
| 1098 | 1098 |
| 1099 core.int buildCounterNotification = 0; | 1099 core.int buildCounterNotification = 0; |
| 1100 buildNotification() { | 1100 buildNotification() { |
| 1101 var o = new api.Notification(); | 1101 var o = new api.Notification(); |
| 1102 buildCounterNotification++; | 1102 buildCounterNotification++; |
| 1103 if (buildCounterNotification < 3) { | 1103 if (buildCounterNotification < 3) { |
| 1104 o.appRestrictionsSchemaChangeEvent = buildAppRestrictionsSchemaChangeEvent()
; | 1104 o.appRestrictionsSchemaChangeEvent = buildAppRestrictionsSchemaChangeEvent()
; |
| (...skipping 21 matching lines...) Expand all Loading... |
| 1126 checkNewDeviceEvent(o.newDeviceEvent); | 1126 checkNewDeviceEvent(o.newDeviceEvent); |
| 1127 checkNewPermissionsEvent(o.newPermissionsEvent); | 1127 checkNewPermissionsEvent(o.newPermissionsEvent); |
| 1128 unittest.expect(o.notificationType, unittest.equals('foo')); | 1128 unittest.expect(o.notificationType, unittest.equals('foo')); |
| 1129 checkProductApprovalEvent(o.productApprovalEvent); | 1129 checkProductApprovalEvent(o.productApprovalEvent); |
| 1130 checkProductAvailabilityChangeEvent(o.productAvailabilityChangeEvent); | 1130 checkProductAvailabilityChangeEvent(o.productAvailabilityChangeEvent); |
| 1131 unittest.expect(o.timestampMillis, unittest.equals('foo')); | 1131 unittest.expect(o.timestampMillis, unittest.equals('foo')); |
| 1132 } | 1132 } |
| 1133 buildCounterNotification--; | 1133 buildCounterNotification--; |
| 1134 } | 1134 } |
| 1135 | 1135 |
| 1136 buildUnnamed2031() { | 1136 buildUnnamed2041() { |
| 1137 var o = new core.List<api.Notification>(); | 1137 var o = new core.List<api.Notification>(); |
| 1138 o.add(buildNotification()); | 1138 o.add(buildNotification()); |
| 1139 o.add(buildNotification()); | 1139 o.add(buildNotification()); |
| 1140 return o; | 1140 return o; |
| 1141 } | 1141 } |
| 1142 | 1142 |
| 1143 checkUnnamed2031(core.List<api.Notification> o) { | 1143 checkUnnamed2041(core.List<api.Notification> o) { |
| 1144 unittest.expect(o, unittest.hasLength(2)); | 1144 unittest.expect(o, unittest.hasLength(2)); |
| 1145 checkNotification(o[0]); | 1145 checkNotification(o[0]); |
| 1146 checkNotification(o[1]); | 1146 checkNotification(o[1]); |
| 1147 } | 1147 } |
| 1148 | 1148 |
| 1149 core.int buildCounterNotificationSet = 0; | 1149 core.int buildCounterNotificationSet = 0; |
| 1150 buildNotificationSet() { | 1150 buildNotificationSet() { |
| 1151 var o = new api.NotificationSet(); | 1151 var o = new api.NotificationSet(); |
| 1152 buildCounterNotificationSet++; | 1152 buildCounterNotificationSet++; |
| 1153 if (buildCounterNotificationSet < 3) { | 1153 if (buildCounterNotificationSet < 3) { |
| 1154 o.kind = "foo"; | 1154 o.kind = "foo"; |
| 1155 o.notification = buildUnnamed2031(); | 1155 o.notification = buildUnnamed2041(); |
| 1156 o.notificationSetId = "foo"; | 1156 o.notificationSetId = "foo"; |
| 1157 } | 1157 } |
| 1158 buildCounterNotificationSet--; | 1158 buildCounterNotificationSet--; |
| 1159 return o; | 1159 return o; |
| 1160 } | 1160 } |
| 1161 | 1161 |
| 1162 checkNotificationSet(api.NotificationSet o) { | 1162 checkNotificationSet(api.NotificationSet o) { |
| 1163 buildCounterNotificationSet++; | 1163 buildCounterNotificationSet++; |
| 1164 if (buildCounterNotificationSet < 3) { | 1164 if (buildCounterNotificationSet < 3) { |
| 1165 unittest.expect(o.kind, unittest.equals('foo')); | 1165 unittest.expect(o.kind, unittest.equals('foo')); |
| 1166 checkUnnamed2031(o.notification); | 1166 checkUnnamed2041(o.notification); |
| 1167 unittest.expect(o.notificationSetId, unittest.equals('foo')); | 1167 unittest.expect(o.notificationSetId, unittest.equals('foo')); |
| 1168 } | 1168 } |
| 1169 buildCounterNotificationSet--; | 1169 buildCounterNotificationSet--; |
| 1170 } | 1170 } |
| 1171 | 1171 |
| 1172 core.int buildCounterPageInfo = 0; | 1172 core.int buildCounterPageInfo = 0; |
| 1173 buildPageInfo() { | 1173 buildPageInfo() { |
| 1174 var o = new api.PageInfo(); | 1174 var o = new api.PageInfo(); |
| 1175 buildCounterPageInfo++; | 1175 buildCounterPageInfo++; |
| 1176 if (buildCounterPageInfo < 3) { | 1176 if (buildCounterPageInfo < 3) { |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1210 buildCounterPermission++; | 1210 buildCounterPermission++; |
| 1211 if (buildCounterPermission < 3) { | 1211 if (buildCounterPermission < 3) { |
| 1212 unittest.expect(o.description, unittest.equals('foo')); | 1212 unittest.expect(o.description, unittest.equals('foo')); |
| 1213 unittest.expect(o.kind, unittest.equals('foo')); | 1213 unittest.expect(o.kind, unittest.equals('foo')); |
| 1214 unittest.expect(o.name, unittest.equals('foo')); | 1214 unittest.expect(o.name, unittest.equals('foo')); |
| 1215 unittest.expect(o.permissionId, unittest.equals('foo')); | 1215 unittest.expect(o.permissionId, unittest.equals('foo')); |
| 1216 } | 1216 } |
| 1217 buildCounterPermission--; | 1217 buildCounterPermission--; |
| 1218 } | 1218 } |
| 1219 | 1219 |
| 1220 buildUnnamed2032() { | 1220 buildUnnamed2042() { |
| 1221 var o = new core.List<api.AppVersion>(); | 1221 var o = new core.List<api.AppVersion>(); |
| 1222 o.add(buildAppVersion()); | 1222 o.add(buildAppVersion()); |
| 1223 o.add(buildAppVersion()); | 1223 o.add(buildAppVersion()); |
| 1224 return o; | 1224 return o; |
| 1225 } | 1225 } |
| 1226 | 1226 |
| 1227 checkUnnamed2032(core.List<api.AppVersion> o) { | 1227 checkUnnamed2042(core.List<api.AppVersion> o) { |
| 1228 unittest.expect(o, unittest.hasLength(2)); | 1228 unittest.expect(o, unittest.hasLength(2)); |
| 1229 checkAppVersion(o[0]); | 1229 checkAppVersion(o[0]); |
| 1230 checkAppVersion(o[1]); | 1230 checkAppVersion(o[1]); |
| 1231 } | 1231 } |
| 1232 | 1232 |
| 1233 core.int buildCounterProduct = 0; | 1233 core.int buildCounterProduct = 0; |
| 1234 buildProduct() { | 1234 buildProduct() { |
| 1235 var o = new api.Product(); | 1235 var o = new api.Product(); |
| 1236 buildCounterProduct++; | 1236 buildCounterProduct++; |
| 1237 if (buildCounterProduct < 3) { | 1237 if (buildCounterProduct < 3) { |
| 1238 o.appVersion = buildUnnamed2032(); | 1238 o.appVersion = buildUnnamed2042(); |
| 1239 o.authorName = "foo"; | 1239 o.authorName = "foo"; |
| 1240 o.detailsUrl = "foo"; | 1240 o.detailsUrl = "foo"; |
| 1241 o.distributionChannel = "foo"; | 1241 o.distributionChannel = "foo"; |
| 1242 o.iconUrl = "foo"; | 1242 o.iconUrl = "foo"; |
| 1243 o.kind = "foo"; | 1243 o.kind = "foo"; |
| 1244 o.productId = "foo"; | 1244 o.productId = "foo"; |
| 1245 o.productPricing = "foo"; | 1245 o.productPricing = "foo"; |
| 1246 o.requiresContainerApp = true; | 1246 o.requiresContainerApp = true; |
| 1247 o.smallIconUrl = "foo"; | 1247 o.smallIconUrl = "foo"; |
| 1248 o.title = "foo"; | 1248 o.title = "foo"; |
| 1249 o.workDetailsUrl = "foo"; | 1249 o.workDetailsUrl = "foo"; |
| 1250 } | 1250 } |
| 1251 buildCounterProduct--; | 1251 buildCounterProduct--; |
| 1252 return o; | 1252 return o; |
| 1253 } | 1253 } |
| 1254 | 1254 |
| 1255 checkProduct(api.Product o) { | 1255 checkProduct(api.Product o) { |
| 1256 buildCounterProduct++; | 1256 buildCounterProduct++; |
| 1257 if (buildCounterProduct < 3) { | 1257 if (buildCounterProduct < 3) { |
| 1258 checkUnnamed2032(o.appVersion); | 1258 checkUnnamed2042(o.appVersion); |
| 1259 unittest.expect(o.authorName, unittest.equals('foo')); | 1259 unittest.expect(o.authorName, unittest.equals('foo')); |
| 1260 unittest.expect(o.detailsUrl, unittest.equals('foo')); | 1260 unittest.expect(o.detailsUrl, unittest.equals('foo')); |
| 1261 unittest.expect(o.distributionChannel, unittest.equals('foo')); | 1261 unittest.expect(o.distributionChannel, unittest.equals('foo')); |
| 1262 unittest.expect(o.iconUrl, unittest.equals('foo')); | 1262 unittest.expect(o.iconUrl, unittest.equals('foo')); |
| 1263 unittest.expect(o.kind, unittest.equals('foo')); | 1263 unittest.expect(o.kind, unittest.equals('foo')); |
| 1264 unittest.expect(o.productId, unittest.equals('foo')); | 1264 unittest.expect(o.productId, unittest.equals('foo')); |
| 1265 unittest.expect(o.productPricing, unittest.equals('foo')); | 1265 unittest.expect(o.productPricing, unittest.equals('foo')); |
| 1266 unittest.expect(o.requiresContainerApp, unittest.isTrue); | 1266 unittest.expect(o.requiresContainerApp, unittest.isTrue); |
| 1267 unittest.expect(o.smallIconUrl, unittest.equals('foo')); | 1267 unittest.expect(o.smallIconUrl, unittest.equals('foo')); |
| 1268 unittest.expect(o.title, unittest.equals('foo')); | 1268 unittest.expect(o.title, unittest.equals('foo')); |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1327 | 1327 |
| 1328 checkProductPermission(api.ProductPermission o) { | 1328 checkProductPermission(api.ProductPermission o) { |
| 1329 buildCounterProductPermission++; | 1329 buildCounterProductPermission++; |
| 1330 if (buildCounterProductPermission < 3) { | 1330 if (buildCounterProductPermission < 3) { |
| 1331 unittest.expect(o.permissionId, unittest.equals('foo')); | 1331 unittest.expect(o.permissionId, unittest.equals('foo')); |
| 1332 unittest.expect(o.state, unittest.equals('foo')); | 1332 unittest.expect(o.state, unittest.equals('foo')); |
| 1333 } | 1333 } |
| 1334 buildCounterProductPermission--; | 1334 buildCounterProductPermission--; |
| 1335 } | 1335 } |
| 1336 | 1336 |
| 1337 buildUnnamed2033() { | 1337 buildUnnamed2043() { |
| 1338 var o = new core.List<api.ProductPermission>(); | 1338 var o = new core.List<api.ProductPermission>(); |
| 1339 o.add(buildProductPermission()); | 1339 o.add(buildProductPermission()); |
| 1340 o.add(buildProductPermission()); | 1340 o.add(buildProductPermission()); |
| 1341 return o; | 1341 return o; |
| 1342 } | 1342 } |
| 1343 | 1343 |
| 1344 checkUnnamed2033(core.List<api.ProductPermission> o) { | 1344 checkUnnamed2043(core.List<api.ProductPermission> o) { |
| 1345 unittest.expect(o, unittest.hasLength(2)); | 1345 unittest.expect(o, unittest.hasLength(2)); |
| 1346 checkProductPermission(o[0]); | 1346 checkProductPermission(o[0]); |
| 1347 checkProductPermission(o[1]); | 1347 checkProductPermission(o[1]); |
| 1348 } | 1348 } |
| 1349 | 1349 |
| 1350 core.int buildCounterProductPermissions = 0; | 1350 core.int buildCounterProductPermissions = 0; |
| 1351 buildProductPermissions() { | 1351 buildProductPermissions() { |
| 1352 var o = new api.ProductPermissions(); | 1352 var o = new api.ProductPermissions(); |
| 1353 buildCounterProductPermissions++; | 1353 buildCounterProductPermissions++; |
| 1354 if (buildCounterProductPermissions < 3) { | 1354 if (buildCounterProductPermissions < 3) { |
| 1355 o.kind = "foo"; | 1355 o.kind = "foo"; |
| 1356 o.permission = buildUnnamed2033(); | 1356 o.permission = buildUnnamed2043(); |
| 1357 o.productId = "foo"; | 1357 o.productId = "foo"; |
| 1358 } | 1358 } |
| 1359 buildCounterProductPermissions--; | 1359 buildCounterProductPermissions--; |
| 1360 return o; | 1360 return o; |
| 1361 } | 1361 } |
| 1362 | 1362 |
| 1363 checkProductPermissions(api.ProductPermissions o) { | 1363 checkProductPermissions(api.ProductPermissions o) { |
| 1364 buildCounterProductPermissions++; | 1364 buildCounterProductPermissions++; |
| 1365 if (buildCounterProductPermissions < 3) { | 1365 if (buildCounterProductPermissions < 3) { |
| 1366 unittest.expect(o.kind, unittest.equals('foo')); | 1366 unittest.expect(o.kind, unittest.equals('foo')); |
| 1367 checkUnnamed2033(o.permission); | 1367 checkUnnamed2043(o.permission); |
| 1368 unittest.expect(o.productId, unittest.equals('foo')); | 1368 unittest.expect(o.productId, unittest.equals('foo')); |
| 1369 } | 1369 } |
| 1370 buildCounterProductPermissions--; | 1370 buildCounterProductPermissions--; |
| 1371 } | 1371 } |
| 1372 | 1372 |
| 1373 buildUnnamed2034() { | 1373 buildUnnamed2044() { |
| 1374 var o = new core.List<core.String>(); | 1374 var o = new core.List<core.String>(); |
| 1375 o.add("foo"); | 1375 o.add("foo"); |
| 1376 o.add("foo"); | 1376 o.add("foo"); |
| 1377 return o; | 1377 return o; |
| 1378 } | 1378 } |
| 1379 | 1379 |
| 1380 checkUnnamed2034(core.List<core.String> o) { | 1380 checkUnnamed2044(core.List<core.String> o) { |
| 1381 unittest.expect(o, unittest.hasLength(2)); | 1381 unittest.expect(o, unittest.hasLength(2)); |
| 1382 unittest.expect(o[0], unittest.equals('foo')); | 1382 unittest.expect(o[0], unittest.equals('foo')); |
| 1383 unittest.expect(o[1], unittest.equals('foo')); | 1383 unittest.expect(o[1], unittest.equals('foo')); |
| 1384 } | 1384 } |
| 1385 | 1385 |
| 1386 core.int buildCounterProductSet = 0; | 1386 core.int buildCounterProductSet = 0; |
| 1387 buildProductSet() { | 1387 buildProductSet() { |
| 1388 var o = new api.ProductSet(); | 1388 var o = new api.ProductSet(); |
| 1389 buildCounterProductSet++; | 1389 buildCounterProductSet++; |
| 1390 if (buildCounterProductSet < 3) { | 1390 if (buildCounterProductSet < 3) { |
| 1391 o.kind = "foo"; | 1391 o.kind = "foo"; |
| 1392 o.productId = buildUnnamed2034(); | 1392 o.productId = buildUnnamed2044(); |
| 1393 o.productSetBehavior = "foo"; | 1393 o.productSetBehavior = "foo"; |
| 1394 } | 1394 } |
| 1395 buildCounterProductSet--; | 1395 buildCounterProductSet--; |
| 1396 return o; | 1396 return o; |
| 1397 } | 1397 } |
| 1398 | 1398 |
| 1399 checkProductSet(api.ProductSet o) { | 1399 checkProductSet(api.ProductSet o) { |
| 1400 buildCounterProductSet++; | 1400 buildCounterProductSet++; |
| 1401 if (buildCounterProductSet < 3) { | 1401 if (buildCounterProductSet < 3) { |
| 1402 unittest.expect(o.kind, unittest.equals('foo')); | 1402 unittest.expect(o.kind, unittest.equals('foo')); |
| 1403 checkUnnamed2034(o.productId); | 1403 checkUnnamed2044(o.productId); |
| 1404 unittest.expect(o.productSetBehavior, unittest.equals('foo')); | 1404 unittest.expect(o.productSetBehavior, unittest.equals('foo')); |
| 1405 } | 1405 } |
| 1406 buildCounterProductSet--; | 1406 buildCounterProductSet--; |
| 1407 } | 1407 } |
| 1408 | 1408 |
| 1409 core.int buildCounterProductsApproveRequest = 0; | 1409 core.int buildCounterProductsApproveRequest = 0; |
| 1410 buildProductsApproveRequest() { | 1410 buildProductsApproveRequest() { |
| 1411 var o = new api.ProductsApproveRequest(); | 1411 var o = new api.ProductsApproveRequest(); |
| 1412 buildCounterProductsApproveRequest++; | 1412 buildCounterProductsApproveRequest++; |
| 1413 if (buildCounterProductsApproveRequest < 3) { | 1413 if (buildCounterProductsApproveRequest < 3) { |
| (...skipping 25 matching lines...) Expand all Loading... |
| 1439 } | 1439 } |
| 1440 | 1440 |
| 1441 checkProductsGenerateApprovalUrlResponse(api.ProductsGenerateApprovalUrlResponse
o) { | 1441 checkProductsGenerateApprovalUrlResponse(api.ProductsGenerateApprovalUrlResponse
o) { |
| 1442 buildCounterProductsGenerateApprovalUrlResponse++; | 1442 buildCounterProductsGenerateApprovalUrlResponse++; |
| 1443 if (buildCounterProductsGenerateApprovalUrlResponse < 3) { | 1443 if (buildCounterProductsGenerateApprovalUrlResponse < 3) { |
| 1444 unittest.expect(o.url, unittest.equals('foo')); | 1444 unittest.expect(o.url, unittest.equals('foo')); |
| 1445 } | 1445 } |
| 1446 buildCounterProductsGenerateApprovalUrlResponse--; | 1446 buildCounterProductsGenerateApprovalUrlResponse--; |
| 1447 } | 1447 } |
| 1448 | 1448 |
| 1449 buildUnnamed2035() { | 1449 buildUnnamed2045() { |
| 1450 var o = new core.List<api.Product>(); | 1450 var o = new core.List<api.Product>(); |
| 1451 o.add(buildProduct()); | 1451 o.add(buildProduct()); |
| 1452 o.add(buildProduct()); | 1452 o.add(buildProduct()); |
| 1453 return o; | 1453 return o; |
| 1454 } | 1454 } |
| 1455 | 1455 |
| 1456 checkUnnamed2035(core.List<api.Product> o) { | 1456 checkUnnamed2045(core.List<api.Product> o) { |
| 1457 unittest.expect(o, unittest.hasLength(2)); | 1457 unittest.expect(o, unittest.hasLength(2)); |
| 1458 checkProduct(o[0]); | 1458 checkProduct(o[0]); |
| 1459 checkProduct(o[1]); | 1459 checkProduct(o[1]); |
| 1460 } | 1460 } |
| 1461 | 1461 |
| 1462 core.int buildCounterProductsListResponse = 0; | 1462 core.int buildCounterProductsListResponse = 0; |
| 1463 buildProductsListResponse() { | 1463 buildProductsListResponse() { |
| 1464 var o = new api.ProductsListResponse(); | 1464 var o = new api.ProductsListResponse(); |
| 1465 buildCounterProductsListResponse++; | 1465 buildCounterProductsListResponse++; |
| 1466 if (buildCounterProductsListResponse < 3) { | 1466 if (buildCounterProductsListResponse < 3) { |
| 1467 o.kind = "foo"; | 1467 o.kind = "foo"; |
| 1468 o.pageInfo = buildPageInfo(); | 1468 o.pageInfo = buildPageInfo(); |
| 1469 o.product = buildUnnamed2035(); | 1469 o.product = buildUnnamed2045(); |
| 1470 o.tokenPagination = buildTokenPagination(); | 1470 o.tokenPagination = buildTokenPagination(); |
| 1471 } | 1471 } |
| 1472 buildCounterProductsListResponse--; | 1472 buildCounterProductsListResponse--; |
| 1473 return o; | 1473 return o; |
| 1474 } | 1474 } |
| 1475 | 1475 |
| 1476 checkProductsListResponse(api.ProductsListResponse o) { | 1476 checkProductsListResponse(api.ProductsListResponse o) { |
| 1477 buildCounterProductsListResponse++; | 1477 buildCounterProductsListResponse++; |
| 1478 if (buildCounterProductsListResponse < 3) { | 1478 if (buildCounterProductsListResponse < 3) { |
| 1479 unittest.expect(o.kind, unittest.equals('foo')); | 1479 unittest.expect(o.kind, unittest.equals('foo')); |
| 1480 checkPageInfo(o.pageInfo); | 1480 checkPageInfo(o.pageInfo); |
| 1481 checkUnnamed2035(o.product); | 1481 checkUnnamed2045(o.product); |
| 1482 checkTokenPagination(o.tokenPagination); | 1482 checkTokenPagination(o.tokenPagination); |
| 1483 } | 1483 } |
| 1484 buildCounterProductsListResponse--; | 1484 buildCounterProductsListResponse--; |
| 1485 } | 1485 } |
| 1486 | 1486 |
| 1487 core.int buildCounterServiceAccount = 0; | 1487 core.int buildCounterServiceAccount = 0; |
| 1488 buildServiceAccount() { | 1488 buildServiceAccount() { |
| 1489 var o = new api.ServiceAccount(); | 1489 var o = new api.ServiceAccount(); |
| 1490 buildCounterServiceAccount++; | 1490 buildCounterServiceAccount++; |
| 1491 if (buildCounterServiceAccount < 3) { | 1491 if (buildCounterServiceAccount < 3) { |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1527 if (buildCounterServiceAccountKey < 3) { | 1527 if (buildCounterServiceAccountKey < 3) { |
| 1528 unittest.expect(o.data, unittest.equals('foo')); | 1528 unittest.expect(o.data, unittest.equals('foo')); |
| 1529 unittest.expect(o.id, unittest.equals('foo')); | 1529 unittest.expect(o.id, unittest.equals('foo')); |
| 1530 unittest.expect(o.kind, unittest.equals('foo')); | 1530 unittest.expect(o.kind, unittest.equals('foo')); |
| 1531 unittest.expect(o.publicData, unittest.equals('foo')); | 1531 unittest.expect(o.publicData, unittest.equals('foo')); |
| 1532 unittest.expect(o.type, unittest.equals('foo')); | 1532 unittest.expect(o.type, unittest.equals('foo')); |
| 1533 } | 1533 } |
| 1534 buildCounterServiceAccountKey--; | 1534 buildCounterServiceAccountKey--; |
| 1535 } | 1535 } |
| 1536 | 1536 |
| 1537 buildUnnamed2036() { | 1537 buildUnnamed2046() { |
| 1538 var o = new core.List<api.ServiceAccountKey>(); | 1538 var o = new core.List<api.ServiceAccountKey>(); |
| 1539 o.add(buildServiceAccountKey()); | 1539 o.add(buildServiceAccountKey()); |
| 1540 o.add(buildServiceAccountKey()); | 1540 o.add(buildServiceAccountKey()); |
| 1541 return o; | 1541 return o; |
| 1542 } | 1542 } |
| 1543 | 1543 |
| 1544 checkUnnamed2036(core.List<api.ServiceAccountKey> o) { | 1544 checkUnnamed2046(core.List<api.ServiceAccountKey> o) { |
| 1545 unittest.expect(o, unittest.hasLength(2)); | 1545 unittest.expect(o, unittest.hasLength(2)); |
| 1546 checkServiceAccountKey(o[0]); | 1546 checkServiceAccountKey(o[0]); |
| 1547 checkServiceAccountKey(o[1]); | 1547 checkServiceAccountKey(o[1]); |
| 1548 } | 1548 } |
| 1549 | 1549 |
| 1550 core.int buildCounterServiceAccountKeysListResponse = 0; | 1550 core.int buildCounterServiceAccountKeysListResponse = 0; |
| 1551 buildServiceAccountKeysListResponse() { | 1551 buildServiceAccountKeysListResponse() { |
| 1552 var o = new api.ServiceAccountKeysListResponse(); | 1552 var o = new api.ServiceAccountKeysListResponse(); |
| 1553 buildCounterServiceAccountKeysListResponse++; | 1553 buildCounterServiceAccountKeysListResponse++; |
| 1554 if (buildCounterServiceAccountKeysListResponse < 3) { | 1554 if (buildCounterServiceAccountKeysListResponse < 3) { |
| 1555 o.serviceAccountKey = buildUnnamed2036(); | 1555 o.serviceAccountKey = buildUnnamed2046(); |
| 1556 } | 1556 } |
| 1557 buildCounterServiceAccountKeysListResponse--; | 1557 buildCounterServiceAccountKeysListResponse--; |
| 1558 return o; | 1558 return o; |
| 1559 } | 1559 } |
| 1560 | 1560 |
| 1561 checkServiceAccountKeysListResponse(api.ServiceAccountKeysListResponse o) { | 1561 checkServiceAccountKeysListResponse(api.ServiceAccountKeysListResponse o) { |
| 1562 buildCounterServiceAccountKeysListResponse++; | 1562 buildCounterServiceAccountKeysListResponse++; |
| 1563 if (buildCounterServiceAccountKeysListResponse < 3) { | 1563 if (buildCounterServiceAccountKeysListResponse < 3) { |
| 1564 checkUnnamed2036(o.serviceAccountKey); | 1564 checkUnnamed2046(o.serviceAccountKey); |
| 1565 } | 1565 } |
| 1566 buildCounterServiceAccountKeysListResponse--; | 1566 buildCounterServiceAccountKeysListResponse--; |
| 1567 } | 1567 } |
| 1568 | 1568 |
| 1569 core.int buildCounterSignupInfo = 0; | 1569 core.int buildCounterSignupInfo = 0; |
| 1570 buildSignupInfo() { | 1570 buildSignupInfo() { |
| 1571 var o = new api.SignupInfo(); | 1571 var o = new api.SignupInfo(); |
| 1572 buildCounterSignupInfo++; | 1572 buildCounterSignupInfo++; |
| 1573 if (buildCounterSignupInfo < 3) { | 1573 if (buildCounterSignupInfo < 3) { |
| 1574 o.completionToken = "foo"; | 1574 o.completionToken = "foo"; |
| 1575 o.kind = "foo"; | 1575 o.kind = "foo"; |
| 1576 o.url = "foo"; | 1576 o.url = "foo"; |
| 1577 } | 1577 } |
| 1578 buildCounterSignupInfo--; | 1578 buildCounterSignupInfo--; |
| 1579 return o; | 1579 return o; |
| 1580 } | 1580 } |
| 1581 | 1581 |
| 1582 checkSignupInfo(api.SignupInfo o) { | 1582 checkSignupInfo(api.SignupInfo o) { |
| 1583 buildCounterSignupInfo++; | 1583 buildCounterSignupInfo++; |
| 1584 if (buildCounterSignupInfo < 3) { | 1584 if (buildCounterSignupInfo < 3) { |
| 1585 unittest.expect(o.completionToken, unittest.equals('foo')); | 1585 unittest.expect(o.completionToken, unittest.equals('foo')); |
| 1586 unittest.expect(o.kind, unittest.equals('foo')); | 1586 unittest.expect(o.kind, unittest.equals('foo')); |
| 1587 unittest.expect(o.url, unittest.equals('foo')); | 1587 unittest.expect(o.url, unittest.equals('foo')); |
| 1588 } | 1588 } |
| 1589 buildCounterSignupInfo--; | 1589 buildCounterSignupInfo--; |
| 1590 } | 1590 } |
| 1591 | 1591 |
| 1592 buildUnnamed2037() { | 1592 buildUnnamed2047() { |
| 1593 var o = new core.List<api.LocalizedText>(); | 1593 var o = new core.List<api.LocalizedText>(); |
| 1594 o.add(buildLocalizedText()); | 1594 o.add(buildLocalizedText()); |
| 1595 o.add(buildLocalizedText()); | 1595 o.add(buildLocalizedText()); |
| 1596 return o; | 1596 return o; |
| 1597 } | 1597 } |
| 1598 | 1598 |
| 1599 checkUnnamed2037(core.List<api.LocalizedText> o) { | 1599 checkUnnamed2047(core.List<api.LocalizedText> o) { |
| 1600 unittest.expect(o, unittest.hasLength(2)); | 1600 unittest.expect(o, unittest.hasLength(2)); |
| 1601 checkLocalizedText(o[0]); | 1601 checkLocalizedText(o[0]); |
| 1602 checkLocalizedText(o[1]); | 1602 checkLocalizedText(o[1]); |
| 1603 } | 1603 } |
| 1604 | 1604 |
| 1605 buildUnnamed2038() { | 1605 buildUnnamed2048() { |
| 1606 var o = new core.List<core.String>(); | 1606 var o = new core.List<core.String>(); |
| 1607 o.add("foo"); | 1607 o.add("foo"); |
| 1608 o.add("foo"); | 1608 o.add("foo"); |
| 1609 return o; | 1609 return o; |
| 1610 } | 1610 } |
| 1611 | 1611 |
| 1612 checkUnnamed2038(core.List<core.String> o) { | 1612 checkUnnamed2048(core.List<core.String> o) { |
| 1613 unittest.expect(o, unittest.hasLength(2)); | 1613 unittest.expect(o, unittest.hasLength(2)); |
| 1614 unittest.expect(o[0], unittest.equals('foo')); | 1614 unittest.expect(o[0], unittest.equals('foo')); |
| 1615 unittest.expect(o[1], unittest.equals('foo')); | 1615 unittest.expect(o[1], unittest.equals('foo')); |
| 1616 } | 1616 } |
| 1617 | 1617 |
| 1618 core.int buildCounterStoreCluster = 0; | 1618 core.int buildCounterStoreCluster = 0; |
| 1619 buildStoreCluster() { | 1619 buildStoreCluster() { |
| 1620 var o = new api.StoreCluster(); | 1620 var o = new api.StoreCluster(); |
| 1621 buildCounterStoreCluster++; | 1621 buildCounterStoreCluster++; |
| 1622 if (buildCounterStoreCluster < 3) { | 1622 if (buildCounterStoreCluster < 3) { |
| 1623 o.id = "foo"; | 1623 o.id = "foo"; |
| 1624 o.kind = "foo"; | 1624 o.kind = "foo"; |
| 1625 o.name = buildUnnamed2037(); | 1625 o.name = buildUnnamed2047(); |
| 1626 o.orderInPage = "foo"; | 1626 o.orderInPage = "foo"; |
| 1627 o.productId = buildUnnamed2038(); | 1627 o.productId = buildUnnamed2048(); |
| 1628 } | 1628 } |
| 1629 buildCounterStoreCluster--; | 1629 buildCounterStoreCluster--; |
| 1630 return o; | 1630 return o; |
| 1631 } | 1631 } |
| 1632 | 1632 |
| 1633 checkStoreCluster(api.StoreCluster o) { | 1633 checkStoreCluster(api.StoreCluster o) { |
| 1634 buildCounterStoreCluster++; | 1634 buildCounterStoreCluster++; |
| 1635 if (buildCounterStoreCluster < 3) { | 1635 if (buildCounterStoreCluster < 3) { |
| 1636 unittest.expect(o.id, unittest.equals('foo')); | 1636 unittest.expect(o.id, unittest.equals('foo')); |
| 1637 unittest.expect(o.kind, unittest.equals('foo')); | 1637 unittest.expect(o.kind, unittest.equals('foo')); |
| 1638 checkUnnamed2037(o.name); | 1638 checkUnnamed2047(o.name); |
| 1639 unittest.expect(o.orderInPage, unittest.equals('foo')); | 1639 unittest.expect(o.orderInPage, unittest.equals('foo')); |
| 1640 checkUnnamed2038(o.productId); | 1640 checkUnnamed2048(o.productId); |
| 1641 } | 1641 } |
| 1642 buildCounterStoreCluster--; | 1642 buildCounterStoreCluster--; |
| 1643 } | 1643 } |
| 1644 | 1644 |
| 1645 core.int buildCounterStoreLayout = 0; | 1645 core.int buildCounterStoreLayout = 0; |
| 1646 buildStoreLayout() { | 1646 buildStoreLayout() { |
| 1647 var o = new api.StoreLayout(); | 1647 var o = new api.StoreLayout(); |
| 1648 buildCounterStoreLayout++; | 1648 buildCounterStoreLayout++; |
| 1649 if (buildCounterStoreLayout < 3) { | 1649 if (buildCounterStoreLayout < 3) { |
| 1650 o.homepageId = "foo"; | 1650 o.homepageId = "foo"; |
| 1651 o.kind = "foo"; | 1651 o.kind = "foo"; |
| 1652 o.storeLayoutType = "foo"; | 1652 o.storeLayoutType = "foo"; |
| 1653 } | 1653 } |
| 1654 buildCounterStoreLayout--; | 1654 buildCounterStoreLayout--; |
| 1655 return o; | 1655 return o; |
| 1656 } | 1656 } |
| 1657 | 1657 |
| 1658 checkStoreLayout(api.StoreLayout o) { | 1658 checkStoreLayout(api.StoreLayout o) { |
| 1659 buildCounterStoreLayout++; | 1659 buildCounterStoreLayout++; |
| 1660 if (buildCounterStoreLayout < 3) { | 1660 if (buildCounterStoreLayout < 3) { |
| 1661 unittest.expect(o.homepageId, unittest.equals('foo')); | 1661 unittest.expect(o.homepageId, unittest.equals('foo')); |
| 1662 unittest.expect(o.kind, unittest.equals('foo')); | 1662 unittest.expect(o.kind, unittest.equals('foo')); |
| 1663 unittest.expect(o.storeLayoutType, unittest.equals('foo')); | 1663 unittest.expect(o.storeLayoutType, unittest.equals('foo')); |
| 1664 } | 1664 } |
| 1665 buildCounterStoreLayout--; | 1665 buildCounterStoreLayout--; |
| 1666 } | 1666 } |
| 1667 | 1667 |
| 1668 buildUnnamed2039() { | 1668 buildUnnamed2049() { |
| 1669 var o = new core.List<api.StoreCluster>(); | 1669 var o = new core.List<api.StoreCluster>(); |
| 1670 o.add(buildStoreCluster()); | 1670 o.add(buildStoreCluster()); |
| 1671 o.add(buildStoreCluster()); | 1671 o.add(buildStoreCluster()); |
| 1672 return o; | 1672 return o; |
| 1673 } | 1673 } |
| 1674 | 1674 |
| 1675 checkUnnamed2039(core.List<api.StoreCluster> o) { | 1675 checkUnnamed2049(core.List<api.StoreCluster> o) { |
| 1676 unittest.expect(o, unittest.hasLength(2)); | 1676 unittest.expect(o, unittest.hasLength(2)); |
| 1677 checkStoreCluster(o[0]); | 1677 checkStoreCluster(o[0]); |
| 1678 checkStoreCluster(o[1]); | 1678 checkStoreCluster(o[1]); |
| 1679 } | 1679 } |
| 1680 | 1680 |
| 1681 core.int buildCounterStoreLayoutClustersListResponse = 0; | 1681 core.int buildCounterStoreLayoutClustersListResponse = 0; |
| 1682 buildStoreLayoutClustersListResponse() { | 1682 buildStoreLayoutClustersListResponse() { |
| 1683 var o = new api.StoreLayoutClustersListResponse(); | 1683 var o = new api.StoreLayoutClustersListResponse(); |
| 1684 buildCounterStoreLayoutClustersListResponse++; | 1684 buildCounterStoreLayoutClustersListResponse++; |
| 1685 if (buildCounterStoreLayoutClustersListResponse < 3) { | 1685 if (buildCounterStoreLayoutClustersListResponse < 3) { |
| 1686 o.cluster = buildUnnamed2039(); | 1686 o.cluster = buildUnnamed2049(); |
| 1687 o.kind = "foo"; | 1687 o.kind = "foo"; |
| 1688 } | 1688 } |
| 1689 buildCounterStoreLayoutClustersListResponse--; | 1689 buildCounterStoreLayoutClustersListResponse--; |
| 1690 return o; | 1690 return o; |
| 1691 } | 1691 } |
| 1692 | 1692 |
| 1693 checkStoreLayoutClustersListResponse(api.StoreLayoutClustersListResponse o) { | 1693 checkStoreLayoutClustersListResponse(api.StoreLayoutClustersListResponse o) { |
| 1694 buildCounterStoreLayoutClustersListResponse++; | 1694 buildCounterStoreLayoutClustersListResponse++; |
| 1695 if (buildCounterStoreLayoutClustersListResponse < 3) { | 1695 if (buildCounterStoreLayoutClustersListResponse < 3) { |
| 1696 checkUnnamed2039(o.cluster); | 1696 checkUnnamed2049(o.cluster); |
| 1697 unittest.expect(o.kind, unittest.equals('foo')); | 1697 unittest.expect(o.kind, unittest.equals('foo')); |
| 1698 } | 1698 } |
| 1699 buildCounterStoreLayoutClustersListResponse--; | 1699 buildCounterStoreLayoutClustersListResponse--; |
| 1700 } | 1700 } |
| 1701 | 1701 |
| 1702 buildUnnamed2040() { | 1702 buildUnnamed2050() { |
| 1703 var o = new core.List<api.StorePage>(); | 1703 var o = new core.List<api.StorePage>(); |
| 1704 o.add(buildStorePage()); | 1704 o.add(buildStorePage()); |
| 1705 o.add(buildStorePage()); | 1705 o.add(buildStorePage()); |
| 1706 return o; | 1706 return o; |
| 1707 } | 1707 } |
| 1708 | 1708 |
| 1709 checkUnnamed2040(core.List<api.StorePage> o) { | 1709 checkUnnamed2050(core.List<api.StorePage> o) { |
| 1710 unittest.expect(o, unittest.hasLength(2)); | 1710 unittest.expect(o, unittest.hasLength(2)); |
| 1711 checkStorePage(o[0]); | 1711 checkStorePage(o[0]); |
| 1712 checkStorePage(o[1]); | 1712 checkStorePage(o[1]); |
| 1713 } | 1713 } |
| 1714 | 1714 |
| 1715 core.int buildCounterStoreLayoutPagesListResponse = 0; | 1715 core.int buildCounterStoreLayoutPagesListResponse = 0; |
| 1716 buildStoreLayoutPagesListResponse() { | 1716 buildStoreLayoutPagesListResponse() { |
| 1717 var o = new api.StoreLayoutPagesListResponse(); | 1717 var o = new api.StoreLayoutPagesListResponse(); |
| 1718 buildCounterStoreLayoutPagesListResponse++; | 1718 buildCounterStoreLayoutPagesListResponse++; |
| 1719 if (buildCounterStoreLayoutPagesListResponse < 3) { | 1719 if (buildCounterStoreLayoutPagesListResponse < 3) { |
| 1720 o.kind = "foo"; | 1720 o.kind = "foo"; |
| 1721 o.page = buildUnnamed2040(); | 1721 o.page = buildUnnamed2050(); |
| 1722 } | 1722 } |
| 1723 buildCounterStoreLayoutPagesListResponse--; | 1723 buildCounterStoreLayoutPagesListResponse--; |
| 1724 return o; | 1724 return o; |
| 1725 } | 1725 } |
| 1726 | 1726 |
| 1727 checkStoreLayoutPagesListResponse(api.StoreLayoutPagesListResponse o) { | 1727 checkStoreLayoutPagesListResponse(api.StoreLayoutPagesListResponse o) { |
| 1728 buildCounterStoreLayoutPagesListResponse++; | 1728 buildCounterStoreLayoutPagesListResponse++; |
| 1729 if (buildCounterStoreLayoutPagesListResponse < 3) { | 1729 if (buildCounterStoreLayoutPagesListResponse < 3) { |
| 1730 unittest.expect(o.kind, unittest.equals('foo')); | 1730 unittest.expect(o.kind, unittest.equals('foo')); |
| 1731 checkUnnamed2040(o.page); | 1731 checkUnnamed2050(o.page); |
| 1732 } | 1732 } |
| 1733 buildCounterStoreLayoutPagesListResponse--; | 1733 buildCounterStoreLayoutPagesListResponse--; |
| 1734 } | 1734 } |
| 1735 | 1735 |
| 1736 buildUnnamed2041() { | 1736 buildUnnamed2051() { |
| 1737 var o = new core.List<core.String>(); | 1737 var o = new core.List<core.String>(); |
| 1738 o.add("foo"); | 1738 o.add("foo"); |
| 1739 o.add("foo"); | 1739 o.add("foo"); |
| 1740 return o; | 1740 return o; |
| 1741 } | 1741 } |
| 1742 | 1742 |
| 1743 checkUnnamed2041(core.List<core.String> o) { | 1743 checkUnnamed2051(core.List<core.String> o) { |
| 1744 unittest.expect(o, unittest.hasLength(2)); | 1744 unittest.expect(o, unittest.hasLength(2)); |
| 1745 unittest.expect(o[0], unittest.equals('foo')); | 1745 unittest.expect(o[0], unittest.equals('foo')); |
| 1746 unittest.expect(o[1], unittest.equals('foo')); | 1746 unittest.expect(o[1], unittest.equals('foo')); |
| 1747 } | 1747 } |
| 1748 | 1748 |
| 1749 buildUnnamed2042() { | 1749 buildUnnamed2052() { |
| 1750 var o = new core.List<api.LocalizedText>(); | 1750 var o = new core.List<api.LocalizedText>(); |
| 1751 o.add(buildLocalizedText()); | 1751 o.add(buildLocalizedText()); |
| 1752 o.add(buildLocalizedText()); | 1752 o.add(buildLocalizedText()); |
| 1753 return o; | 1753 return o; |
| 1754 } | 1754 } |
| 1755 | 1755 |
| 1756 checkUnnamed2042(core.List<api.LocalizedText> o) { | 1756 checkUnnamed2052(core.List<api.LocalizedText> o) { |
| 1757 unittest.expect(o, unittest.hasLength(2)); | 1757 unittest.expect(o, unittest.hasLength(2)); |
| 1758 checkLocalizedText(o[0]); | 1758 checkLocalizedText(o[0]); |
| 1759 checkLocalizedText(o[1]); | 1759 checkLocalizedText(o[1]); |
| 1760 } | 1760 } |
| 1761 | 1761 |
| 1762 core.int buildCounterStorePage = 0; | 1762 core.int buildCounterStorePage = 0; |
| 1763 buildStorePage() { | 1763 buildStorePage() { |
| 1764 var o = new api.StorePage(); | 1764 var o = new api.StorePage(); |
| 1765 buildCounterStorePage++; | 1765 buildCounterStorePage++; |
| 1766 if (buildCounterStorePage < 3) { | 1766 if (buildCounterStorePage < 3) { |
| 1767 o.id = "foo"; | 1767 o.id = "foo"; |
| 1768 o.kind = "foo"; | 1768 o.kind = "foo"; |
| 1769 o.link = buildUnnamed2041(); | 1769 o.link = buildUnnamed2051(); |
| 1770 o.name = buildUnnamed2042(); | 1770 o.name = buildUnnamed2052(); |
| 1771 } | 1771 } |
| 1772 buildCounterStorePage--; | 1772 buildCounterStorePage--; |
| 1773 return o; | 1773 return o; |
| 1774 } | 1774 } |
| 1775 | 1775 |
| 1776 checkStorePage(api.StorePage o) { | 1776 checkStorePage(api.StorePage o) { |
| 1777 buildCounterStorePage++; | 1777 buildCounterStorePage++; |
| 1778 if (buildCounterStorePage < 3) { | 1778 if (buildCounterStorePage < 3) { |
| 1779 unittest.expect(o.id, unittest.equals('foo')); | 1779 unittest.expect(o.id, unittest.equals('foo')); |
| 1780 unittest.expect(o.kind, unittest.equals('foo')); | 1780 unittest.expect(o.kind, unittest.equals('foo')); |
| 1781 checkUnnamed2041(o.link); | 1781 checkUnnamed2051(o.link); |
| 1782 checkUnnamed2042(o.name); | 1782 checkUnnamed2052(o.name); |
| 1783 } | 1783 } |
| 1784 buildCounterStorePage--; | 1784 buildCounterStorePage--; |
| 1785 } | 1785 } |
| 1786 | 1786 |
| 1787 core.int buildCounterTokenPagination = 0; | 1787 core.int buildCounterTokenPagination = 0; |
| 1788 buildTokenPagination() { | 1788 buildTokenPagination() { |
| 1789 var o = new api.TokenPagination(); | 1789 var o = new api.TokenPagination(); |
| 1790 buildCounterTokenPagination++; | 1790 buildCounterTokenPagination++; |
| 1791 if (buildCounterTokenPagination < 3) { | 1791 if (buildCounterTokenPagination < 3) { |
| 1792 o.nextPageToken = "foo"; | 1792 o.nextPageToken = "foo"; |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1852 checkUserToken(api.UserToken o) { | 1852 checkUserToken(api.UserToken o) { |
| 1853 buildCounterUserToken++; | 1853 buildCounterUserToken++; |
| 1854 if (buildCounterUserToken < 3) { | 1854 if (buildCounterUserToken < 3) { |
| 1855 unittest.expect(o.kind, unittest.equals('foo')); | 1855 unittest.expect(o.kind, unittest.equals('foo')); |
| 1856 unittest.expect(o.token, unittest.equals('foo')); | 1856 unittest.expect(o.token, unittest.equals('foo')); |
| 1857 unittest.expect(o.userId, unittest.equals('foo')); | 1857 unittest.expect(o.userId, unittest.equals('foo')); |
| 1858 } | 1858 } |
| 1859 buildCounterUserToken--; | 1859 buildCounterUserToken--; |
| 1860 } | 1860 } |
| 1861 | 1861 |
| 1862 buildUnnamed2043() { | 1862 buildUnnamed2053() { |
| 1863 var o = new core.List<api.User>(); | 1863 var o = new core.List<api.User>(); |
| 1864 o.add(buildUser()); | 1864 o.add(buildUser()); |
| 1865 o.add(buildUser()); | 1865 o.add(buildUser()); |
| 1866 return o; | 1866 return o; |
| 1867 } | 1867 } |
| 1868 | 1868 |
| 1869 checkUnnamed2043(core.List<api.User> o) { | 1869 checkUnnamed2053(core.List<api.User> o) { |
| 1870 unittest.expect(o, unittest.hasLength(2)); | 1870 unittest.expect(o, unittest.hasLength(2)); |
| 1871 checkUser(o[0]); | 1871 checkUser(o[0]); |
| 1872 checkUser(o[1]); | 1872 checkUser(o[1]); |
| 1873 } | 1873 } |
| 1874 | 1874 |
| 1875 core.int buildCounterUsersListResponse = 0; | 1875 core.int buildCounterUsersListResponse = 0; |
| 1876 buildUsersListResponse() { | 1876 buildUsersListResponse() { |
| 1877 var o = new api.UsersListResponse(); | 1877 var o = new api.UsersListResponse(); |
| 1878 buildCounterUsersListResponse++; | 1878 buildCounterUsersListResponse++; |
| 1879 if (buildCounterUsersListResponse < 3) { | 1879 if (buildCounterUsersListResponse < 3) { |
| 1880 o.kind = "foo"; | 1880 o.kind = "foo"; |
| 1881 o.user = buildUnnamed2043(); | 1881 o.user = buildUnnamed2053(); |
| 1882 } | 1882 } |
| 1883 buildCounterUsersListResponse--; | 1883 buildCounterUsersListResponse--; |
| 1884 return o; | 1884 return o; |
| 1885 } | 1885 } |
| 1886 | 1886 |
| 1887 checkUsersListResponse(api.UsersListResponse o) { | 1887 checkUsersListResponse(api.UsersListResponse o) { |
| 1888 buildCounterUsersListResponse++; | 1888 buildCounterUsersListResponse++; |
| 1889 if (buildCounterUsersListResponse < 3) { | 1889 if (buildCounterUsersListResponse < 3) { |
| 1890 unittest.expect(o.kind, unittest.equals('foo')); | 1890 unittest.expect(o.kind, unittest.equals('foo')); |
| 1891 checkUnnamed2043(o.user); | 1891 checkUnnamed2053(o.user); |
| 1892 } | 1892 } |
| 1893 buildCounterUsersListResponse--; | 1893 buildCounterUsersListResponse--; |
| 1894 } | 1894 } |
| 1895 | 1895 |
| 1896 | 1896 |
| 1897 main() { | 1897 main() { |
| 1898 unittest.group("obj-schema-Administrator", () { | 1898 unittest.group("obj-schema-Administrator", () { |
| 1899 unittest.test("to-json--from-json", () { | 1899 unittest.test("to-json--from-json", () { |
| 1900 var o = buildAdministrator(); | 1900 var o = buildAdministrator(); |
| 1901 var od = new api.Administrator.fromJson(o.toJson()); | 1901 var od = new api.Administrator.fromJson(o.toJson()); |
| (...skipping 534 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2436 | 2436 |
| 2437 | 2437 |
| 2438 unittest.group("resource-DevicesResourceApi", () { | 2438 unittest.group("resource-DevicesResourceApi", () { |
| 2439 unittest.test("method--get", () { | 2439 unittest.test("method--get", () { |
| 2440 | 2440 |
| 2441 var mock = new HttpServerMock(); | 2441 var mock = new HttpServerMock(); |
| 2442 api.DevicesResourceApi res = new api.AndroidenterpriseApi(mock).devices; | 2442 api.DevicesResourceApi res = new api.AndroidenterpriseApi(mock).devices; |
| 2443 var arg_enterpriseId = "foo"; | 2443 var arg_enterpriseId = "foo"; |
| 2444 var arg_userId = "foo"; | 2444 var arg_userId = "foo"; |
| 2445 var arg_deviceId = "foo"; | 2445 var arg_deviceId = "foo"; |
| 2446 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2446 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 2447 var path = (req.url).path; | 2447 var path = (req.url).path; |
| 2448 var pathOffset = 0; | 2448 var pathOffset = 0; |
| 2449 var index; | 2449 var index; |
| 2450 var subPart; | 2450 var subPart; |
| 2451 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2451 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 2452 pathOffset += 1; | 2452 pathOffset += 1; |
| 2453 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq
uals("androidenterprise/v1/")); | 2453 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq
uals("androidenterprise/v1/")); |
| 2454 pathOffset += 21; | 2454 pathOffset += 21; |
| 2455 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("enterprises/")); | 2455 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("enterprises/")); |
| 2456 pathOffset += 12; | 2456 pathOffset += 12; |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2489 } | 2489 } |
| 2490 } | 2490 } |
| 2491 | 2491 |
| 2492 | 2492 |
| 2493 var h = { | 2493 var h = { |
| 2494 "content-type" : "application/json; charset=utf-8", | 2494 "content-type" : "application/json; charset=utf-8", |
| 2495 }; | 2495 }; |
| 2496 var resp = convert.JSON.encode(buildDevice()); | 2496 var resp = convert.JSON.encode(buildDevice()); |
| 2497 return new async.Future.value(stringResponse(200, h, resp)); | 2497 return new async.Future.value(stringResponse(200, h, resp)); |
| 2498 }), true); | 2498 }), true); |
| 2499 res.get(arg_enterpriseId, arg_userId, arg_deviceId).then(unittest.expectAs
ync(((api.Device response) { | 2499 res.get(arg_enterpriseId, arg_userId, arg_deviceId).then(unittest.expectAs
ync1(((api.Device response) { |
| 2500 checkDevice(response); | 2500 checkDevice(response); |
| 2501 }))); | 2501 }))); |
| 2502 }); | 2502 }); |
| 2503 | 2503 |
| 2504 unittest.test("method--getState", () { | 2504 unittest.test("method--getState", () { |
| 2505 | 2505 |
| 2506 var mock = new HttpServerMock(); | 2506 var mock = new HttpServerMock(); |
| 2507 api.DevicesResourceApi res = new api.AndroidenterpriseApi(mock).devices; | 2507 api.DevicesResourceApi res = new api.AndroidenterpriseApi(mock).devices; |
| 2508 var arg_enterpriseId = "foo"; | 2508 var arg_enterpriseId = "foo"; |
| 2509 var arg_userId = "foo"; | 2509 var arg_userId = "foo"; |
| 2510 var arg_deviceId = "foo"; | 2510 var arg_deviceId = "foo"; |
| 2511 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2511 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 2512 var path = (req.url).path; | 2512 var path = (req.url).path; |
| 2513 var pathOffset = 0; | 2513 var pathOffset = 0; |
| 2514 var index; | 2514 var index; |
| 2515 var subPart; | 2515 var subPart; |
| 2516 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2516 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 2517 pathOffset += 1; | 2517 pathOffset += 1; |
| 2518 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq
uals("androidenterprise/v1/")); | 2518 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq
uals("androidenterprise/v1/")); |
| 2519 pathOffset += 21; | 2519 pathOffset += 21; |
| 2520 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("enterprises/")); | 2520 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("enterprises/")); |
| 2521 pathOffset += 12; | 2521 pathOffset += 12; |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2558 } | 2558 } |
| 2559 } | 2559 } |
| 2560 | 2560 |
| 2561 | 2561 |
| 2562 var h = { | 2562 var h = { |
| 2563 "content-type" : "application/json; charset=utf-8", | 2563 "content-type" : "application/json; charset=utf-8", |
| 2564 }; | 2564 }; |
| 2565 var resp = convert.JSON.encode(buildDeviceState()); | 2565 var resp = convert.JSON.encode(buildDeviceState()); |
| 2566 return new async.Future.value(stringResponse(200, h, resp)); | 2566 return new async.Future.value(stringResponse(200, h, resp)); |
| 2567 }), true); | 2567 }), true); |
| 2568 res.getState(arg_enterpriseId, arg_userId, arg_deviceId).then(unittest.exp
ectAsync(((api.DeviceState response) { | 2568 res.getState(arg_enterpriseId, arg_userId, arg_deviceId).then(unittest.exp
ectAsync1(((api.DeviceState response) { |
| 2569 checkDeviceState(response); | 2569 checkDeviceState(response); |
| 2570 }))); | 2570 }))); |
| 2571 }); | 2571 }); |
| 2572 | 2572 |
| 2573 unittest.test("method--list", () { | 2573 unittest.test("method--list", () { |
| 2574 | 2574 |
| 2575 var mock = new HttpServerMock(); | 2575 var mock = new HttpServerMock(); |
| 2576 api.DevicesResourceApi res = new api.AndroidenterpriseApi(mock).devices; | 2576 api.DevicesResourceApi res = new api.AndroidenterpriseApi(mock).devices; |
| 2577 var arg_enterpriseId = "foo"; | 2577 var arg_enterpriseId = "foo"; |
| 2578 var arg_userId = "foo"; | 2578 var arg_userId = "foo"; |
| 2579 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2579 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 2580 var path = (req.url).path; | 2580 var path = (req.url).path; |
| 2581 var pathOffset = 0; | 2581 var pathOffset = 0; |
| 2582 var index; | 2582 var index; |
| 2583 var subPart; | 2583 var subPart; |
| 2584 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2584 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 2585 pathOffset += 1; | 2585 pathOffset += 1; |
| 2586 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq
uals("androidenterprise/v1/")); | 2586 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq
uals("androidenterprise/v1/")); |
| 2587 pathOffset += 21; | 2587 pathOffset += 21; |
| 2588 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("enterprises/")); | 2588 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("enterprises/")); |
| 2589 pathOffset += 12; | 2589 pathOffset += 12; |
| (...skipping 29 matching lines...) Expand all Loading... |
| 2619 } | 2619 } |
| 2620 } | 2620 } |
| 2621 | 2621 |
| 2622 | 2622 |
| 2623 var h = { | 2623 var h = { |
| 2624 "content-type" : "application/json; charset=utf-8", | 2624 "content-type" : "application/json; charset=utf-8", |
| 2625 }; | 2625 }; |
| 2626 var resp = convert.JSON.encode(buildDevicesListResponse()); | 2626 var resp = convert.JSON.encode(buildDevicesListResponse()); |
| 2627 return new async.Future.value(stringResponse(200, h, resp)); | 2627 return new async.Future.value(stringResponse(200, h, resp)); |
| 2628 }), true); | 2628 }), true); |
| 2629 res.list(arg_enterpriseId, arg_userId).then(unittest.expectAsync(((api.Dev
icesListResponse response) { | 2629 res.list(arg_enterpriseId, arg_userId).then(unittest.expectAsync1(((api.De
vicesListResponse response) { |
| 2630 checkDevicesListResponse(response); | 2630 checkDevicesListResponse(response); |
| 2631 }))); | 2631 }))); |
| 2632 }); | 2632 }); |
| 2633 | 2633 |
| 2634 unittest.test("method--setState", () { | 2634 unittest.test("method--setState", () { |
| 2635 | 2635 |
| 2636 var mock = new HttpServerMock(); | 2636 var mock = new HttpServerMock(); |
| 2637 api.DevicesResourceApi res = new api.AndroidenterpriseApi(mock).devices; | 2637 api.DevicesResourceApi res = new api.AndroidenterpriseApi(mock).devices; |
| 2638 var arg_request = buildDeviceState(); | 2638 var arg_request = buildDeviceState(); |
| 2639 var arg_enterpriseId = "foo"; | 2639 var arg_enterpriseId = "foo"; |
| 2640 var arg_userId = "foo"; | 2640 var arg_userId = "foo"; |
| 2641 var arg_deviceId = "foo"; | 2641 var arg_deviceId = "foo"; |
| 2642 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2642 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 2643 var obj = new api.DeviceState.fromJson(json); | 2643 var obj = new api.DeviceState.fromJson(json); |
| 2644 checkDeviceState(obj); | 2644 checkDeviceState(obj); |
| 2645 | 2645 |
| 2646 var path = (req.url).path; | 2646 var path = (req.url).path; |
| 2647 var pathOffset = 0; | 2647 var pathOffset = 0; |
| 2648 var index; | 2648 var index; |
| 2649 var subPart; | 2649 var subPart; |
| 2650 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2650 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 2651 pathOffset += 1; | 2651 pathOffset += 1; |
| 2652 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq
uals("androidenterprise/v1/")); | 2652 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq
uals("androidenterprise/v1/")); |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2692 } | 2692 } |
| 2693 } | 2693 } |
| 2694 | 2694 |
| 2695 | 2695 |
| 2696 var h = { | 2696 var h = { |
| 2697 "content-type" : "application/json; charset=utf-8", | 2697 "content-type" : "application/json; charset=utf-8", |
| 2698 }; | 2698 }; |
| 2699 var resp = convert.JSON.encode(buildDeviceState()); | 2699 var resp = convert.JSON.encode(buildDeviceState()); |
| 2700 return new async.Future.value(stringResponse(200, h, resp)); | 2700 return new async.Future.value(stringResponse(200, h, resp)); |
| 2701 }), true); | 2701 }), true); |
| 2702 res.setState(arg_request, arg_enterpriseId, arg_userId, arg_deviceId).then
(unittest.expectAsync(((api.DeviceState response) { | 2702 res.setState(arg_request, arg_enterpriseId, arg_userId, arg_deviceId).then
(unittest.expectAsync1(((api.DeviceState response) { |
| 2703 checkDeviceState(response); | 2703 checkDeviceState(response); |
| 2704 }))); | 2704 }))); |
| 2705 }); | 2705 }); |
| 2706 | 2706 |
| 2707 }); | 2707 }); |
| 2708 | 2708 |
| 2709 | 2709 |
| 2710 unittest.group("resource-EnterprisesResourceApi", () { | 2710 unittest.group("resource-EnterprisesResourceApi", () { |
| 2711 unittest.test("method--acknowledgeNotificationSet", () { | 2711 unittest.test("method--acknowledgeNotificationSet", () { |
| 2712 | 2712 |
| 2713 var mock = new HttpServerMock(); | 2713 var mock = new HttpServerMock(); |
| 2714 api.EnterprisesResourceApi res = new api.AndroidenterpriseApi(mock).enterp
rises; | 2714 api.EnterprisesResourceApi res = new api.AndroidenterpriseApi(mock).enterp
rises; |
| 2715 var arg_notificationSetId = "foo"; | 2715 var arg_notificationSetId = "foo"; |
| 2716 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2716 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 2717 var path = (req.url).path; | 2717 var path = (req.url).path; |
| 2718 var pathOffset = 0; | 2718 var pathOffset = 0; |
| 2719 var index; | 2719 var index; |
| 2720 var subPart; | 2720 var subPart; |
| 2721 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2721 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 2722 pathOffset += 1; | 2722 pathOffset += 1; |
| 2723 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq
uals("androidenterprise/v1/")); | 2723 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq
uals("androidenterprise/v1/")); |
| 2724 pathOffset += 21; | 2724 pathOffset += 21; |
| 2725 unittest.expect(path.substring(pathOffset, pathOffset + 38), unittest.eq
uals("enterprises/acknowledgeNotificationSet")); | 2725 unittest.expect(path.substring(pathOffset, pathOffset + 38), unittest.eq
uals("enterprises/acknowledgeNotificationSet")); |
| 2726 pathOffset += 38; | 2726 pathOffset += 38; |
| (...skipping 16 matching lines...) Expand all Loading... |
| 2743 } | 2743 } |
| 2744 unittest.expect(queryMap["notificationSetId"].first, unittest.equals(arg
_notificationSetId)); | 2744 unittest.expect(queryMap["notificationSetId"].first, unittest.equals(arg
_notificationSetId)); |
| 2745 | 2745 |
| 2746 | 2746 |
| 2747 var h = { | 2747 var h = { |
| 2748 "content-type" : "application/json; charset=utf-8", | 2748 "content-type" : "application/json; charset=utf-8", |
| 2749 }; | 2749 }; |
| 2750 var resp = ""; | 2750 var resp = ""; |
| 2751 return new async.Future.value(stringResponse(200, h, resp)); | 2751 return new async.Future.value(stringResponse(200, h, resp)); |
| 2752 }), true); | 2752 }), true); |
| 2753 res.acknowledgeNotificationSet(notificationSetId: arg_notificationSetId).t
hen(unittest.expectAsync((_) {})); | 2753 res.acknowledgeNotificationSet(notificationSetId: arg_notificationSetId).t
hen(unittest.expectAsync1((_) {})); |
| 2754 }); | 2754 }); |
| 2755 | 2755 |
| 2756 unittest.test("method--completeSignup", () { | 2756 unittest.test("method--completeSignup", () { |
| 2757 | 2757 |
| 2758 var mock = new HttpServerMock(); | 2758 var mock = new HttpServerMock(); |
| 2759 api.EnterprisesResourceApi res = new api.AndroidenterpriseApi(mock).enterp
rises; | 2759 api.EnterprisesResourceApi res = new api.AndroidenterpriseApi(mock).enterp
rises; |
| 2760 var arg_completionToken = "foo"; | 2760 var arg_completionToken = "foo"; |
| 2761 var arg_enterpriseToken = "foo"; | 2761 var arg_enterpriseToken = "foo"; |
| 2762 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2762 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 2763 var path = (req.url).path; | 2763 var path = (req.url).path; |
| 2764 var pathOffset = 0; | 2764 var pathOffset = 0; |
| 2765 var index; | 2765 var index; |
| 2766 var subPart; | 2766 var subPart; |
| 2767 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2767 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 2768 pathOffset += 1; | 2768 pathOffset += 1; |
| 2769 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq
uals("androidenterprise/v1/")); | 2769 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq
uals("androidenterprise/v1/")); |
| 2770 pathOffset += 21; | 2770 pathOffset += 21; |
| 2771 unittest.expect(path.substring(pathOffset, pathOffset + 26), unittest.eq
uals("enterprises/completeSignup")); | 2771 unittest.expect(path.substring(pathOffset, pathOffset + 26), unittest.eq
uals("enterprises/completeSignup")); |
| 2772 pathOffset += 26; | 2772 pathOffset += 26; |
| (...skipping 17 matching lines...) Expand all Loading... |
| 2790 unittest.expect(queryMap["completionToken"].first, unittest.equals(arg_c
ompletionToken)); | 2790 unittest.expect(queryMap["completionToken"].first, unittest.equals(arg_c
ompletionToken)); |
| 2791 unittest.expect(queryMap["enterpriseToken"].first, unittest.equals(arg_e
nterpriseToken)); | 2791 unittest.expect(queryMap["enterpriseToken"].first, unittest.equals(arg_e
nterpriseToken)); |
| 2792 | 2792 |
| 2793 | 2793 |
| 2794 var h = { | 2794 var h = { |
| 2795 "content-type" : "application/json; charset=utf-8", | 2795 "content-type" : "application/json; charset=utf-8", |
| 2796 }; | 2796 }; |
| 2797 var resp = convert.JSON.encode(buildEnterprise()); | 2797 var resp = convert.JSON.encode(buildEnterprise()); |
| 2798 return new async.Future.value(stringResponse(200, h, resp)); | 2798 return new async.Future.value(stringResponse(200, h, resp)); |
| 2799 }), true); | 2799 }), true); |
| 2800 res.completeSignup(completionToken: arg_completionToken, enterpriseToken:
arg_enterpriseToken).then(unittest.expectAsync(((api.Enterprise response) { | 2800 res.completeSignup(completionToken: arg_completionToken, enterpriseToken:
arg_enterpriseToken).then(unittest.expectAsync1(((api.Enterprise response) { |
| 2801 checkEnterprise(response); | 2801 checkEnterprise(response); |
| 2802 }))); | 2802 }))); |
| 2803 }); | 2803 }); |
| 2804 | 2804 |
| 2805 unittest.test("method--createWebToken", () { | 2805 unittest.test("method--createWebToken", () { |
| 2806 | 2806 |
| 2807 var mock = new HttpServerMock(); | 2807 var mock = new HttpServerMock(); |
| 2808 api.EnterprisesResourceApi res = new api.AndroidenterpriseApi(mock).enterp
rises; | 2808 api.EnterprisesResourceApi res = new api.AndroidenterpriseApi(mock).enterp
rises; |
| 2809 var arg_request = buildAdministratorWebTokenSpec(); | 2809 var arg_request = buildAdministratorWebTokenSpec(); |
| 2810 var arg_enterpriseId = "foo"; | 2810 var arg_enterpriseId = "foo"; |
| 2811 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2811 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 2812 var obj = new api.AdministratorWebTokenSpec.fromJson(json); | 2812 var obj = new api.AdministratorWebTokenSpec.fromJson(json); |
| 2813 checkAdministratorWebTokenSpec(obj); | 2813 checkAdministratorWebTokenSpec(obj); |
| 2814 | 2814 |
| 2815 var path = (req.url).path; | 2815 var path = (req.url).path; |
| 2816 var pathOffset = 0; | 2816 var pathOffset = 0; |
| 2817 var index; | 2817 var index; |
| 2818 var subPart; | 2818 var subPart; |
| 2819 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2819 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 2820 pathOffset += 1; | 2820 pathOffset += 1; |
| 2821 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq
uals("androidenterprise/v1/")); | 2821 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq
uals("androidenterprise/v1/")); |
| (...skipping 25 matching lines...) Expand all Loading... |
| 2847 } | 2847 } |
| 2848 } | 2848 } |
| 2849 | 2849 |
| 2850 | 2850 |
| 2851 var h = { | 2851 var h = { |
| 2852 "content-type" : "application/json; charset=utf-8", | 2852 "content-type" : "application/json; charset=utf-8", |
| 2853 }; | 2853 }; |
| 2854 var resp = convert.JSON.encode(buildAdministratorWebToken()); | 2854 var resp = convert.JSON.encode(buildAdministratorWebToken()); |
| 2855 return new async.Future.value(stringResponse(200, h, resp)); | 2855 return new async.Future.value(stringResponse(200, h, resp)); |
| 2856 }), true); | 2856 }), true); |
| 2857 res.createWebToken(arg_request, arg_enterpriseId).then(unittest.expectAsyn
c(((api.AdministratorWebToken response) { | 2857 res.createWebToken(arg_request, arg_enterpriseId).then(unittest.expectAsyn
c1(((api.AdministratorWebToken response) { |
| 2858 checkAdministratorWebToken(response); | 2858 checkAdministratorWebToken(response); |
| 2859 }))); | 2859 }))); |
| 2860 }); | 2860 }); |
| 2861 | 2861 |
| 2862 unittest.test("method--delete", () { | 2862 unittest.test("method--delete", () { |
| 2863 | 2863 |
| 2864 var mock = new HttpServerMock(); | 2864 var mock = new HttpServerMock(); |
| 2865 api.EnterprisesResourceApi res = new api.AndroidenterpriseApi(mock).enterp
rises; | 2865 api.EnterprisesResourceApi res = new api.AndroidenterpriseApi(mock).enterp
rises; |
| 2866 var arg_enterpriseId = "foo"; | 2866 var arg_enterpriseId = "foo"; |
| 2867 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2867 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 2868 var path = (req.url).path; | 2868 var path = (req.url).path; |
| 2869 var pathOffset = 0; | 2869 var pathOffset = 0; |
| 2870 var index; | 2870 var index; |
| 2871 var subPart; | 2871 var subPart; |
| 2872 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2872 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 2873 pathOffset += 1; | 2873 pathOffset += 1; |
| 2874 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq
uals("androidenterprise/v1/")); | 2874 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq
uals("androidenterprise/v1/")); |
| 2875 pathOffset += 21; | 2875 pathOffset += 21; |
| 2876 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("enterprises/")); | 2876 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("enterprises/")); |
| 2877 pathOffset += 12; | 2877 pathOffset += 12; |
| (...skipping 18 matching lines...) Expand all Loading... |
| 2896 } | 2896 } |
| 2897 } | 2897 } |
| 2898 | 2898 |
| 2899 | 2899 |
| 2900 var h = { | 2900 var h = { |
| 2901 "content-type" : "application/json; charset=utf-8", | 2901 "content-type" : "application/json; charset=utf-8", |
| 2902 }; | 2902 }; |
| 2903 var resp = ""; | 2903 var resp = ""; |
| 2904 return new async.Future.value(stringResponse(200, h, resp)); | 2904 return new async.Future.value(stringResponse(200, h, resp)); |
| 2905 }), true); | 2905 }), true); |
| 2906 res.delete(arg_enterpriseId).then(unittest.expectAsync((_) {})); | 2906 res.delete(arg_enterpriseId).then(unittest.expectAsync1((_) {})); |
| 2907 }); | 2907 }); |
| 2908 | 2908 |
| 2909 unittest.test("method--enroll", () { | 2909 unittest.test("method--enroll", () { |
| 2910 | 2910 |
| 2911 var mock = new HttpServerMock(); | 2911 var mock = new HttpServerMock(); |
| 2912 api.EnterprisesResourceApi res = new api.AndroidenterpriseApi(mock).enterp
rises; | 2912 api.EnterprisesResourceApi res = new api.AndroidenterpriseApi(mock).enterp
rises; |
| 2913 var arg_request = buildEnterprise(); | 2913 var arg_request = buildEnterprise(); |
| 2914 var arg_token = "foo"; | 2914 var arg_token = "foo"; |
| 2915 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2915 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 2916 var obj = new api.Enterprise.fromJson(json); | 2916 var obj = new api.Enterprise.fromJson(json); |
| 2917 checkEnterprise(obj); | 2917 checkEnterprise(obj); |
| 2918 | 2918 |
| 2919 var path = (req.url).path; | 2919 var path = (req.url).path; |
| 2920 var pathOffset = 0; | 2920 var pathOffset = 0; |
| 2921 var index; | 2921 var index; |
| 2922 var subPart; | 2922 var subPart; |
| 2923 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2923 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 2924 pathOffset += 1; | 2924 pathOffset += 1; |
| 2925 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq
uals("androidenterprise/v1/")); | 2925 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq
uals("androidenterprise/v1/")); |
| (...skipping 19 matching lines...) Expand all Loading... |
| 2945 } | 2945 } |
| 2946 unittest.expect(queryMap["token"].first, unittest.equals(arg_token)); | 2946 unittest.expect(queryMap["token"].first, unittest.equals(arg_token)); |
| 2947 | 2947 |
| 2948 | 2948 |
| 2949 var h = { | 2949 var h = { |
| 2950 "content-type" : "application/json; charset=utf-8", | 2950 "content-type" : "application/json; charset=utf-8", |
| 2951 }; | 2951 }; |
| 2952 var resp = convert.JSON.encode(buildEnterprise()); | 2952 var resp = convert.JSON.encode(buildEnterprise()); |
| 2953 return new async.Future.value(stringResponse(200, h, resp)); | 2953 return new async.Future.value(stringResponse(200, h, resp)); |
| 2954 }), true); | 2954 }), true); |
| 2955 res.enroll(arg_request, arg_token).then(unittest.expectAsync(((api.Enterpr
ise response) { | 2955 res.enroll(arg_request, arg_token).then(unittest.expectAsync1(((api.Enterp
rise response) { |
| 2956 checkEnterprise(response); | 2956 checkEnterprise(response); |
| 2957 }))); | 2957 }))); |
| 2958 }); | 2958 }); |
| 2959 | 2959 |
| 2960 unittest.test("method--generateSignupUrl", () { | 2960 unittest.test("method--generateSignupUrl", () { |
| 2961 | 2961 |
| 2962 var mock = new HttpServerMock(); | 2962 var mock = new HttpServerMock(); |
| 2963 api.EnterprisesResourceApi res = new api.AndroidenterpriseApi(mock).enterp
rises; | 2963 api.EnterprisesResourceApi res = new api.AndroidenterpriseApi(mock).enterp
rises; |
| 2964 var arg_callbackUrl = "foo"; | 2964 var arg_callbackUrl = "foo"; |
| 2965 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2965 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 2966 var path = (req.url).path; | 2966 var path = (req.url).path; |
| 2967 var pathOffset = 0; | 2967 var pathOffset = 0; |
| 2968 var index; | 2968 var index; |
| 2969 var subPart; | 2969 var subPart; |
| 2970 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2970 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 2971 pathOffset += 1; | 2971 pathOffset += 1; |
| 2972 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq
uals("androidenterprise/v1/")); | 2972 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq
uals("androidenterprise/v1/")); |
| 2973 pathOffset += 21; | 2973 pathOffset += 21; |
| 2974 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq
uals("enterprises/signupUrl")); | 2974 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq
uals("enterprises/signupUrl")); |
| 2975 pathOffset += 21; | 2975 pathOffset += 21; |
| (...skipping 16 matching lines...) Expand all Loading... |
| 2992 } | 2992 } |
| 2993 unittest.expect(queryMap["callbackUrl"].first, unittest.equals(arg_callb
ackUrl)); | 2993 unittest.expect(queryMap["callbackUrl"].first, unittest.equals(arg_callb
ackUrl)); |
| 2994 | 2994 |
| 2995 | 2995 |
| 2996 var h = { | 2996 var h = { |
| 2997 "content-type" : "application/json; charset=utf-8", | 2997 "content-type" : "application/json; charset=utf-8", |
| 2998 }; | 2998 }; |
| 2999 var resp = convert.JSON.encode(buildSignupInfo()); | 2999 var resp = convert.JSON.encode(buildSignupInfo()); |
| 3000 return new async.Future.value(stringResponse(200, h, resp)); | 3000 return new async.Future.value(stringResponse(200, h, resp)); |
| 3001 }), true); | 3001 }), true); |
| 3002 res.generateSignupUrl(callbackUrl: arg_callbackUrl).then(unittest.expectAs
ync(((api.SignupInfo response) { | 3002 res.generateSignupUrl(callbackUrl: arg_callbackUrl).then(unittest.expectAs
ync1(((api.SignupInfo response) { |
| 3003 checkSignupInfo(response); | 3003 checkSignupInfo(response); |
| 3004 }))); | 3004 }))); |
| 3005 }); | 3005 }); |
| 3006 | 3006 |
| 3007 unittest.test("method--get", () { | 3007 unittest.test("method--get", () { |
| 3008 | 3008 |
| 3009 var mock = new HttpServerMock(); | 3009 var mock = new HttpServerMock(); |
| 3010 api.EnterprisesResourceApi res = new api.AndroidenterpriseApi(mock).enterp
rises; | 3010 api.EnterprisesResourceApi res = new api.AndroidenterpriseApi(mock).enterp
rises; |
| 3011 var arg_enterpriseId = "foo"; | 3011 var arg_enterpriseId = "foo"; |
| 3012 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 3012 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 3013 var path = (req.url).path; | 3013 var path = (req.url).path; |
| 3014 var pathOffset = 0; | 3014 var pathOffset = 0; |
| 3015 var index; | 3015 var index; |
| 3016 var subPart; | 3016 var subPart; |
| 3017 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 3017 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 3018 pathOffset += 1; | 3018 pathOffset += 1; |
| 3019 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq
uals("androidenterprise/v1/")); | 3019 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq
uals("androidenterprise/v1/")); |
| 3020 pathOffset += 21; | 3020 pathOffset += 21; |
| 3021 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("enterprises/")); | 3021 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("enterprises/")); |
| 3022 pathOffset += 12; | 3022 pathOffset += 12; |
| (...skipping 18 matching lines...) Expand all Loading... |
| 3041 } | 3041 } |
| 3042 } | 3042 } |
| 3043 | 3043 |
| 3044 | 3044 |
| 3045 var h = { | 3045 var h = { |
| 3046 "content-type" : "application/json; charset=utf-8", | 3046 "content-type" : "application/json; charset=utf-8", |
| 3047 }; | 3047 }; |
| 3048 var resp = convert.JSON.encode(buildEnterprise()); | 3048 var resp = convert.JSON.encode(buildEnterprise()); |
| 3049 return new async.Future.value(stringResponse(200, h, resp)); | 3049 return new async.Future.value(stringResponse(200, h, resp)); |
| 3050 }), true); | 3050 }), true); |
| 3051 res.get(arg_enterpriseId).then(unittest.expectAsync(((api.Enterprise respo
nse) { | 3051 res.get(arg_enterpriseId).then(unittest.expectAsync1(((api.Enterprise resp
onse) { |
| 3052 checkEnterprise(response); | 3052 checkEnterprise(response); |
| 3053 }))); | 3053 }))); |
| 3054 }); | 3054 }); |
| 3055 | 3055 |
| 3056 unittest.test("method--getServiceAccount", () { | 3056 unittest.test("method--getServiceAccount", () { |
| 3057 | 3057 |
| 3058 var mock = new HttpServerMock(); | 3058 var mock = new HttpServerMock(); |
| 3059 api.EnterprisesResourceApi res = new api.AndroidenterpriseApi(mock).enterp
rises; | 3059 api.EnterprisesResourceApi res = new api.AndroidenterpriseApi(mock).enterp
rises; |
| 3060 var arg_enterpriseId = "foo"; | 3060 var arg_enterpriseId = "foo"; |
| 3061 var arg_keyType = "foo"; | 3061 var arg_keyType = "foo"; |
| 3062 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 3062 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 3063 var path = (req.url).path; | 3063 var path = (req.url).path; |
| 3064 var pathOffset = 0; | 3064 var pathOffset = 0; |
| 3065 var index; | 3065 var index; |
| 3066 var subPart; | 3066 var subPart; |
| 3067 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 3067 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 3068 pathOffset += 1; | 3068 pathOffset += 1; |
| 3069 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq
uals("androidenterprise/v1/")); | 3069 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq
uals("androidenterprise/v1/")); |
| 3070 pathOffset += 21; | 3070 pathOffset += 21; |
| 3071 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("enterprises/")); | 3071 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("enterprises/")); |
| 3072 pathOffset += 12; | 3072 pathOffset += 12; |
| (...skipping 23 matching lines...) Expand all Loading... |
| 3096 } | 3096 } |
| 3097 unittest.expect(queryMap["keyType"].first, unittest.equals(arg_keyType))
; | 3097 unittest.expect(queryMap["keyType"].first, unittest.equals(arg_keyType))
; |
| 3098 | 3098 |
| 3099 | 3099 |
| 3100 var h = { | 3100 var h = { |
| 3101 "content-type" : "application/json; charset=utf-8", | 3101 "content-type" : "application/json; charset=utf-8", |
| 3102 }; | 3102 }; |
| 3103 var resp = convert.JSON.encode(buildServiceAccount()); | 3103 var resp = convert.JSON.encode(buildServiceAccount()); |
| 3104 return new async.Future.value(stringResponse(200, h, resp)); | 3104 return new async.Future.value(stringResponse(200, h, resp)); |
| 3105 }), true); | 3105 }), true); |
| 3106 res.getServiceAccount(arg_enterpriseId, keyType: arg_keyType).then(unittes
t.expectAsync(((api.ServiceAccount response) { | 3106 res.getServiceAccount(arg_enterpriseId, keyType: arg_keyType).then(unittes
t.expectAsync1(((api.ServiceAccount response) { |
| 3107 checkServiceAccount(response); | 3107 checkServiceAccount(response); |
| 3108 }))); | 3108 }))); |
| 3109 }); | 3109 }); |
| 3110 | 3110 |
| 3111 unittest.test("method--getStoreLayout", () { | 3111 unittest.test("method--getStoreLayout", () { |
| 3112 | 3112 |
| 3113 var mock = new HttpServerMock(); | 3113 var mock = new HttpServerMock(); |
| 3114 api.EnterprisesResourceApi res = new api.AndroidenterpriseApi(mock).enterp
rises; | 3114 api.EnterprisesResourceApi res = new api.AndroidenterpriseApi(mock).enterp
rises; |
| 3115 var arg_enterpriseId = "foo"; | 3115 var arg_enterpriseId = "foo"; |
| 3116 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 3116 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 3117 var path = (req.url).path; | 3117 var path = (req.url).path; |
| 3118 var pathOffset = 0; | 3118 var pathOffset = 0; |
| 3119 var index; | 3119 var index; |
| 3120 var subPart; | 3120 var subPart; |
| 3121 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 3121 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 3122 pathOffset += 1; | 3122 pathOffset += 1; |
| 3123 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq
uals("androidenterprise/v1/")); | 3123 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq
uals("androidenterprise/v1/")); |
| 3124 pathOffset += 21; | 3124 pathOffset += 21; |
| 3125 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("enterprises/")); | 3125 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("enterprises/")); |
| 3126 pathOffset += 12; | 3126 pathOffset += 12; |
| (...skipping 22 matching lines...) Expand all Loading... |
| 3149 } | 3149 } |
| 3150 } | 3150 } |
| 3151 | 3151 |
| 3152 | 3152 |
| 3153 var h = { | 3153 var h = { |
| 3154 "content-type" : "application/json; charset=utf-8", | 3154 "content-type" : "application/json; charset=utf-8", |
| 3155 }; | 3155 }; |
| 3156 var resp = convert.JSON.encode(buildStoreLayout()); | 3156 var resp = convert.JSON.encode(buildStoreLayout()); |
| 3157 return new async.Future.value(stringResponse(200, h, resp)); | 3157 return new async.Future.value(stringResponse(200, h, resp)); |
| 3158 }), true); | 3158 }), true); |
| 3159 res.getStoreLayout(arg_enterpriseId).then(unittest.expectAsync(((api.Store
Layout response) { | 3159 res.getStoreLayout(arg_enterpriseId).then(unittest.expectAsync1(((api.Stor
eLayout response) { |
| 3160 checkStoreLayout(response); | 3160 checkStoreLayout(response); |
| 3161 }))); | 3161 }))); |
| 3162 }); | 3162 }); |
| 3163 | 3163 |
| 3164 unittest.test("method--insert", () { | 3164 unittest.test("method--insert", () { |
| 3165 | 3165 |
| 3166 var mock = new HttpServerMock(); | 3166 var mock = new HttpServerMock(); |
| 3167 api.EnterprisesResourceApi res = new api.AndroidenterpriseApi(mock).enterp
rises; | 3167 api.EnterprisesResourceApi res = new api.AndroidenterpriseApi(mock).enterp
rises; |
| 3168 var arg_request = buildEnterprise(); | 3168 var arg_request = buildEnterprise(); |
| 3169 var arg_token = "foo"; | 3169 var arg_token = "foo"; |
| 3170 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 3170 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 3171 var obj = new api.Enterprise.fromJson(json); | 3171 var obj = new api.Enterprise.fromJson(json); |
| 3172 checkEnterprise(obj); | 3172 checkEnterprise(obj); |
| 3173 | 3173 |
| 3174 var path = (req.url).path; | 3174 var path = (req.url).path; |
| 3175 var pathOffset = 0; | 3175 var pathOffset = 0; |
| 3176 var index; | 3176 var index; |
| 3177 var subPart; | 3177 var subPart; |
| 3178 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 3178 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 3179 pathOffset += 1; | 3179 pathOffset += 1; |
| 3180 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq
uals("androidenterprise/v1/")); | 3180 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq
uals("androidenterprise/v1/")); |
| (...skipping 19 matching lines...) Expand all Loading... |
| 3200 } | 3200 } |
| 3201 unittest.expect(queryMap["token"].first, unittest.equals(arg_token)); | 3201 unittest.expect(queryMap["token"].first, unittest.equals(arg_token)); |
| 3202 | 3202 |
| 3203 | 3203 |
| 3204 var h = { | 3204 var h = { |
| 3205 "content-type" : "application/json; charset=utf-8", | 3205 "content-type" : "application/json; charset=utf-8", |
| 3206 }; | 3206 }; |
| 3207 var resp = convert.JSON.encode(buildEnterprise()); | 3207 var resp = convert.JSON.encode(buildEnterprise()); |
| 3208 return new async.Future.value(stringResponse(200, h, resp)); | 3208 return new async.Future.value(stringResponse(200, h, resp)); |
| 3209 }), true); | 3209 }), true); |
| 3210 res.insert(arg_request, arg_token).then(unittest.expectAsync(((api.Enterpr
ise response) { | 3210 res.insert(arg_request, arg_token).then(unittest.expectAsync1(((api.Enterp
rise response) { |
| 3211 checkEnterprise(response); | 3211 checkEnterprise(response); |
| 3212 }))); | 3212 }))); |
| 3213 }); | 3213 }); |
| 3214 | 3214 |
| 3215 unittest.test("method--list", () { | 3215 unittest.test("method--list", () { |
| 3216 | 3216 |
| 3217 var mock = new HttpServerMock(); | 3217 var mock = new HttpServerMock(); |
| 3218 api.EnterprisesResourceApi res = new api.AndroidenterpriseApi(mock).enterp
rises; | 3218 api.EnterprisesResourceApi res = new api.AndroidenterpriseApi(mock).enterp
rises; |
| 3219 var arg_domain = "foo"; | 3219 var arg_domain = "foo"; |
| 3220 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 3220 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 3221 var path = (req.url).path; | 3221 var path = (req.url).path; |
| 3222 var pathOffset = 0; | 3222 var pathOffset = 0; |
| 3223 var index; | 3223 var index; |
| 3224 var subPart; | 3224 var subPart; |
| 3225 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 3225 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 3226 pathOffset += 1; | 3226 pathOffset += 1; |
| 3227 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq
uals("androidenterprise/v1/")); | 3227 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq
uals("androidenterprise/v1/")); |
| 3228 pathOffset += 21; | 3228 pathOffset += 21; |
| 3229 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("enterprises")); | 3229 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("enterprises")); |
| 3230 pathOffset += 11; | 3230 pathOffset += 11; |
| (...skipping 16 matching lines...) Expand all Loading... |
| 3247 } | 3247 } |
| 3248 unittest.expect(queryMap["domain"].first, unittest.equals(arg_domain)); | 3248 unittest.expect(queryMap["domain"].first, unittest.equals(arg_domain)); |
| 3249 | 3249 |
| 3250 | 3250 |
| 3251 var h = { | 3251 var h = { |
| 3252 "content-type" : "application/json; charset=utf-8", | 3252 "content-type" : "application/json; charset=utf-8", |
| 3253 }; | 3253 }; |
| 3254 var resp = convert.JSON.encode(buildEnterprisesListResponse()); | 3254 var resp = convert.JSON.encode(buildEnterprisesListResponse()); |
| 3255 return new async.Future.value(stringResponse(200, h, resp)); | 3255 return new async.Future.value(stringResponse(200, h, resp)); |
| 3256 }), true); | 3256 }), true); |
| 3257 res.list(arg_domain).then(unittest.expectAsync(((api.EnterprisesListRespon
se response) { | 3257 res.list(arg_domain).then(unittest.expectAsync1(((api.EnterprisesListRespo
nse response) { |
| 3258 checkEnterprisesListResponse(response); | 3258 checkEnterprisesListResponse(response); |
| 3259 }))); | 3259 }))); |
| 3260 }); | 3260 }); |
| 3261 | 3261 |
| 3262 unittest.test("method--pullNotificationSet", () { | 3262 unittest.test("method--pullNotificationSet", () { |
| 3263 | 3263 |
| 3264 var mock = new HttpServerMock(); | 3264 var mock = new HttpServerMock(); |
| 3265 api.EnterprisesResourceApi res = new api.AndroidenterpriseApi(mock).enterp
rises; | 3265 api.EnterprisesResourceApi res = new api.AndroidenterpriseApi(mock).enterp
rises; |
| 3266 var arg_requestMode = "foo"; | 3266 var arg_requestMode = "foo"; |
| 3267 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 3267 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 3268 var path = (req.url).path; | 3268 var path = (req.url).path; |
| 3269 var pathOffset = 0; | 3269 var pathOffset = 0; |
| 3270 var index; | 3270 var index; |
| 3271 var subPart; | 3271 var subPart; |
| 3272 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 3272 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 3273 pathOffset += 1; | 3273 pathOffset += 1; |
| 3274 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq
uals("androidenterprise/v1/")); | 3274 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq
uals("androidenterprise/v1/")); |
| 3275 pathOffset += 21; | 3275 pathOffset += 21; |
| 3276 unittest.expect(path.substring(pathOffset, pathOffset + 31), unittest.eq
uals("enterprises/pullNotificationSet")); | 3276 unittest.expect(path.substring(pathOffset, pathOffset + 31), unittest.eq
uals("enterprises/pullNotificationSet")); |
| 3277 pathOffset += 31; | 3277 pathOffset += 31; |
| (...skipping 16 matching lines...) Expand all Loading... |
| 3294 } | 3294 } |
| 3295 unittest.expect(queryMap["requestMode"].first, unittest.equals(arg_reque
stMode)); | 3295 unittest.expect(queryMap["requestMode"].first, unittest.equals(arg_reque
stMode)); |
| 3296 | 3296 |
| 3297 | 3297 |
| 3298 var h = { | 3298 var h = { |
| 3299 "content-type" : "application/json; charset=utf-8", | 3299 "content-type" : "application/json; charset=utf-8", |
| 3300 }; | 3300 }; |
| 3301 var resp = convert.JSON.encode(buildNotificationSet()); | 3301 var resp = convert.JSON.encode(buildNotificationSet()); |
| 3302 return new async.Future.value(stringResponse(200, h, resp)); | 3302 return new async.Future.value(stringResponse(200, h, resp)); |
| 3303 }), true); | 3303 }), true); |
| 3304 res.pullNotificationSet(requestMode: arg_requestMode).then(unittest.expect
Async(((api.NotificationSet response) { | 3304 res.pullNotificationSet(requestMode: arg_requestMode).then(unittest.expect
Async1(((api.NotificationSet response) { |
| 3305 checkNotificationSet(response); | 3305 checkNotificationSet(response); |
| 3306 }))); | 3306 }))); |
| 3307 }); | 3307 }); |
| 3308 | 3308 |
| 3309 unittest.test("method--sendTestPushNotification", () { | 3309 unittest.test("method--sendTestPushNotification", () { |
| 3310 | 3310 |
| 3311 var mock = new HttpServerMock(); | 3311 var mock = new HttpServerMock(); |
| 3312 api.EnterprisesResourceApi res = new api.AndroidenterpriseApi(mock).enterp
rises; | 3312 api.EnterprisesResourceApi res = new api.AndroidenterpriseApi(mock).enterp
rises; |
| 3313 var arg_enterpriseId = "foo"; | 3313 var arg_enterpriseId = "foo"; |
| 3314 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 3314 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 3315 var path = (req.url).path; | 3315 var path = (req.url).path; |
| 3316 var pathOffset = 0; | 3316 var pathOffset = 0; |
| 3317 var index; | 3317 var index; |
| 3318 var subPart; | 3318 var subPart; |
| 3319 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 3319 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 3320 pathOffset += 1; | 3320 pathOffset += 1; |
| 3321 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq
uals("androidenterprise/v1/")); | 3321 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq
uals("androidenterprise/v1/")); |
| 3322 pathOffset += 21; | 3322 pathOffset += 21; |
| 3323 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("enterprises/")); | 3323 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("enterprises/")); |
| 3324 pathOffset += 12; | 3324 pathOffset += 12; |
| (...skipping 22 matching lines...) Expand all Loading... |
| 3347 } | 3347 } |
| 3348 } | 3348 } |
| 3349 | 3349 |
| 3350 | 3350 |
| 3351 var h = { | 3351 var h = { |
| 3352 "content-type" : "application/json; charset=utf-8", | 3352 "content-type" : "application/json; charset=utf-8", |
| 3353 }; | 3353 }; |
| 3354 var resp = convert.JSON.encode(buildEnterprisesSendTestPushNotificationR
esponse()); | 3354 var resp = convert.JSON.encode(buildEnterprisesSendTestPushNotificationR
esponse()); |
| 3355 return new async.Future.value(stringResponse(200, h, resp)); | 3355 return new async.Future.value(stringResponse(200, h, resp)); |
| 3356 }), true); | 3356 }), true); |
| 3357 res.sendTestPushNotification(arg_enterpriseId).then(unittest.expectAsync((
(api.EnterprisesSendTestPushNotificationResponse response) { | 3357 res.sendTestPushNotification(arg_enterpriseId).then(unittest.expectAsync1(
((api.EnterprisesSendTestPushNotificationResponse response) { |
| 3358 checkEnterprisesSendTestPushNotificationResponse(response); | 3358 checkEnterprisesSendTestPushNotificationResponse(response); |
| 3359 }))); | 3359 }))); |
| 3360 }); | 3360 }); |
| 3361 | 3361 |
| 3362 unittest.test("method--setAccount", () { | 3362 unittest.test("method--setAccount", () { |
| 3363 | 3363 |
| 3364 var mock = new HttpServerMock(); | 3364 var mock = new HttpServerMock(); |
| 3365 api.EnterprisesResourceApi res = new api.AndroidenterpriseApi(mock).enterp
rises; | 3365 api.EnterprisesResourceApi res = new api.AndroidenterpriseApi(mock).enterp
rises; |
| 3366 var arg_request = buildEnterpriseAccount(); | 3366 var arg_request = buildEnterpriseAccount(); |
| 3367 var arg_enterpriseId = "foo"; | 3367 var arg_enterpriseId = "foo"; |
| 3368 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 3368 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 3369 var obj = new api.EnterpriseAccount.fromJson(json); | 3369 var obj = new api.EnterpriseAccount.fromJson(json); |
| 3370 checkEnterpriseAccount(obj); | 3370 checkEnterpriseAccount(obj); |
| 3371 | 3371 |
| 3372 var path = (req.url).path; | 3372 var path = (req.url).path; |
| 3373 var pathOffset = 0; | 3373 var pathOffset = 0; |
| 3374 var index; | 3374 var index; |
| 3375 var subPart; | 3375 var subPart; |
| 3376 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 3376 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 3377 pathOffset += 1; | 3377 pathOffset += 1; |
| 3378 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq
uals("androidenterprise/v1/")); | 3378 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq
uals("androidenterprise/v1/")); |
| (...skipping 25 matching lines...) Expand all Loading... |
| 3404 } | 3404 } |
| 3405 } | 3405 } |
| 3406 | 3406 |
| 3407 | 3407 |
| 3408 var h = { | 3408 var h = { |
| 3409 "content-type" : "application/json; charset=utf-8", | 3409 "content-type" : "application/json; charset=utf-8", |
| 3410 }; | 3410 }; |
| 3411 var resp = convert.JSON.encode(buildEnterpriseAccount()); | 3411 var resp = convert.JSON.encode(buildEnterpriseAccount()); |
| 3412 return new async.Future.value(stringResponse(200, h, resp)); | 3412 return new async.Future.value(stringResponse(200, h, resp)); |
| 3413 }), true); | 3413 }), true); |
| 3414 res.setAccount(arg_request, arg_enterpriseId).then(unittest.expectAsync(((
api.EnterpriseAccount response) { | 3414 res.setAccount(arg_request, arg_enterpriseId).then(unittest.expectAsync1((
(api.EnterpriseAccount response) { |
| 3415 checkEnterpriseAccount(response); | 3415 checkEnterpriseAccount(response); |
| 3416 }))); | 3416 }))); |
| 3417 }); | 3417 }); |
| 3418 | 3418 |
| 3419 unittest.test("method--setStoreLayout", () { | 3419 unittest.test("method--setStoreLayout", () { |
| 3420 | 3420 |
| 3421 var mock = new HttpServerMock(); | 3421 var mock = new HttpServerMock(); |
| 3422 api.EnterprisesResourceApi res = new api.AndroidenterpriseApi(mock).enterp
rises; | 3422 api.EnterprisesResourceApi res = new api.AndroidenterpriseApi(mock).enterp
rises; |
| 3423 var arg_request = buildStoreLayout(); | 3423 var arg_request = buildStoreLayout(); |
| 3424 var arg_enterpriseId = "foo"; | 3424 var arg_enterpriseId = "foo"; |
| 3425 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 3425 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 3426 var obj = new api.StoreLayout.fromJson(json); | 3426 var obj = new api.StoreLayout.fromJson(json); |
| 3427 checkStoreLayout(obj); | 3427 checkStoreLayout(obj); |
| 3428 | 3428 |
| 3429 var path = (req.url).path; | 3429 var path = (req.url).path; |
| 3430 var pathOffset = 0; | 3430 var pathOffset = 0; |
| 3431 var index; | 3431 var index; |
| 3432 var subPart; | 3432 var subPart; |
| 3433 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 3433 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 3434 pathOffset += 1; | 3434 pathOffset += 1; |
| 3435 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq
uals("androidenterprise/v1/")); | 3435 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq
uals("androidenterprise/v1/")); |
| (...skipping 25 matching lines...) Expand all Loading... |
| 3461 } | 3461 } |
| 3462 } | 3462 } |
| 3463 | 3463 |
| 3464 | 3464 |
| 3465 var h = { | 3465 var h = { |
| 3466 "content-type" : "application/json; charset=utf-8", | 3466 "content-type" : "application/json; charset=utf-8", |
| 3467 }; | 3467 }; |
| 3468 var resp = convert.JSON.encode(buildStoreLayout()); | 3468 var resp = convert.JSON.encode(buildStoreLayout()); |
| 3469 return new async.Future.value(stringResponse(200, h, resp)); | 3469 return new async.Future.value(stringResponse(200, h, resp)); |
| 3470 }), true); | 3470 }), true); |
| 3471 res.setStoreLayout(arg_request, arg_enterpriseId).then(unittest.expectAsyn
c(((api.StoreLayout response) { | 3471 res.setStoreLayout(arg_request, arg_enterpriseId).then(unittest.expectAsyn
c1(((api.StoreLayout response) { |
| 3472 checkStoreLayout(response); | 3472 checkStoreLayout(response); |
| 3473 }))); | 3473 }))); |
| 3474 }); | 3474 }); |
| 3475 | 3475 |
| 3476 unittest.test("method--unenroll", () { | 3476 unittest.test("method--unenroll", () { |
| 3477 | 3477 |
| 3478 var mock = new HttpServerMock(); | 3478 var mock = new HttpServerMock(); |
| 3479 api.EnterprisesResourceApi res = new api.AndroidenterpriseApi(mock).enterp
rises; | 3479 api.EnterprisesResourceApi res = new api.AndroidenterpriseApi(mock).enterp
rises; |
| 3480 var arg_enterpriseId = "foo"; | 3480 var arg_enterpriseId = "foo"; |
| 3481 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 3481 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 3482 var path = (req.url).path; | 3482 var path = (req.url).path; |
| 3483 var pathOffset = 0; | 3483 var pathOffset = 0; |
| 3484 var index; | 3484 var index; |
| 3485 var subPart; | 3485 var subPart; |
| 3486 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 3486 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 3487 pathOffset += 1; | 3487 pathOffset += 1; |
| 3488 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq
uals("androidenterprise/v1/")); | 3488 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq
uals("androidenterprise/v1/")); |
| 3489 pathOffset += 21; | 3489 pathOffset += 21; |
| 3490 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("enterprises/")); | 3490 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("enterprises/")); |
| 3491 pathOffset += 12; | 3491 pathOffset += 12; |
| (...skipping 22 matching lines...) Expand all Loading... |
| 3514 } | 3514 } |
| 3515 } | 3515 } |
| 3516 | 3516 |
| 3517 | 3517 |
| 3518 var h = { | 3518 var h = { |
| 3519 "content-type" : "application/json; charset=utf-8", | 3519 "content-type" : "application/json; charset=utf-8", |
| 3520 }; | 3520 }; |
| 3521 var resp = ""; | 3521 var resp = ""; |
| 3522 return new async.Future.value(stringResponse(200, h, resp)); | 3522 return new async.Future.value(stringResponse(200, h, resp)); |
| 3523 }), true); | 3523 }), true); |
| 3524 res.unenroll(arg_enterpriseId).then(unittest.expectAsync((_) {})); | 3524 res.unenroll(arg_enterpriseId).then(unittest.expectAsync1((_) {})); |
| 3525 }); | 3525 }); |
| 3526 | 3526 |
| 3527 }); | 3527 }); |
| 3528 | 3528 |
| 3529 | 3529 |
| 3530 unittest.group("resource-EntitlementsResourceApi", () { | 3530 unittest.group("resource-EntitlementsResourceApi", () { |
| 3531 unittest.test("method--delete", () { | 3531 unittest.test("method--delete", () { |
| 3532 | 3532 |
| 3533 var mock = new HttpServerMock(); | 3533 var mock = new HttpServerMock(); |
| 3534 api.EntitlementsResourceApi res = new api.AndroidenterpriseApi(mock).entit
lements; | 3534 api.EntitlementsResourceApi res = new api.AndroidenterpriseApi(mock).entit
lements; |
| 3535 var arg_enterpriseId = "foo"; | 3535 var arg_enterpriseId = "foo"; |
| 3536 var arg_userId = "foo"; | 3536 var arg_userId = "foo"; |
| 3537 var arg_entitlementId = "foo"; | 3537 var arg_entitlementId = "foo"; |
| 3538 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 3538 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 3539 var path = (req.url).path; | 3539 var path = (req.url).path; |
| 3540 var pathOffset = 0; | 3540 var pathOffset = 0; |
| 3541 var index; | 3541 var index; |
| 3542 var subPart; | 3542 var subPart; |
| 3543 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 3543 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 3544 pathOffset += 1; | 3544 pathOffset += 1; |
| 3545 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq
uals("androidenterprise/v1/")); | 3545 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq
uals("androidenterprise/v1/")); |
| 3546 pathOffset += 21; | 3546 pathOffset += 21; |
| 3547 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("enterprises/")); | 3547 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("enterprises/")); |
| 3548 pathOffset += 12; | 3548 pathOffset += 12; |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3581 } | 3581 } |
| 3582 } | 3582 } |
| 3583 | 3583 |
| 3584 | 3584 |
| 3585 var h = { | 3585 var h = { |
| 3586 "content-type" : "application/json; charset=utf-8", | 3586 "content-type" : "application/json; charset=utf-8", |
| 3587 }; | 3587 }; |
| 3588 var resp = ""; | 3588 var resp = ""; |
| 3589 return new async.Future.value(stringResponse(200, h, resp)); | 3589 return new async.Future.value(stringResponse(200, h, resp)); |
| 3590 }), true); | 3590 }), true); |
| 3591 res.delete(arg_enterpriseId, arg_userId, arg_entitlementId).then(unittest.
expectAsync((_) {})); | 3591 res.delete(arg_enterpriseId, arg_userId, arg_entitlementId).then(unittest.
expectAsync1((_) {})); |
| 3592 }); | 3592 }); |
| 3593 | 3593 |
| 3594 unittest.test("method--get", () { | 3594 unittest.test("method--get", () { |
| 3595 | 3595 |
| 3596 var mock = new HttpServerMock(); | 3596 var mock = new HttpServerMock(); |
| 3597 api.EntitlementsResourceApi res = new api.AndroidenterpriseApi(mock).entit
lements; | 3597 api.EntitlementsResourceApi res = new api.AndroidenterpriseApi(mock).entit
lements; |
| 3598 var arg_enterpriseId = "foo"; | 3598 var arg_enterpriseId = "foo"; |
| 3599 var arg_userId = "foo"; | 3599 var arg_userId = "foo"; |
| 3600 var arg_entitlementId = "foo"; | 3600 var arg_entitlementId = "foo"; |
| 3601 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 3601 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 3602 var path = (req.url).path; | 3602 var path = (req.url).path; |
| 3603 var pathOffset = 0; | 3603 var pathOffset = 0; |
| 3604 var index; | 3604 var index; |
| 3605 var subPart; | 3605 var subPart; |
| 3606 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 3606 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 3607 pathOffset += 1; | 3607 pathOffset += 1; |
| 3608 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq
uals("androidenterprise/v1/")); | 3608 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq
uals("androidenterprise/v1/")); |
| 3609 pathOffset += 21; | 3609 pathOffset += 21; |
| 3610 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("enterprises/")); | 3610 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("enterprises/")); |
| 3611 pathOffset += 12; | 3611 pathOffset += 12; |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3644 } | 3644 } |
| 3645 } | 3645 } |
| 3646 | 3646 |
| 3647 | 3647 |
| 3648 var h = { | 3648 var h = { |
| 3649 "content-type" : "application/json; charset=utf-8", | 3649 "content-type" : "application/json; charset=utf-8", |
| 3650 }; | 3650 }; |
| 3651 var resp = convert.JSON.encode(buildEntitlement()); | 3651 var resp = convert.JSON.encode(buildEntitlement()); |
| 3652 return new async.Future.value(stringResponse(200, h, resp)); | 3652 return new async.Future.value(stringResponse(200, h, resp)); |
| 3653 }), true); | 3653 }), true); |
| 3654 res.get(arg_enterpriseId, arg_userId, arg_entitlementId).then(unittest.exp
ectAsync(((api.Entitlement response) { | 3654 res.get(arg_enterpriseId, arg_userId, arg_entitlementId).then(unittest.exp
ectAsync1(((api.Entitlement response) { |
| 3655 checkEntitlement(response); | 3655 checkEntitlement(response); |
| 3656 }))); | 3656 }))); |
| 3657 }); | 3657 }); |
| 3658 | 3658 |
| 3659 unittest.test("method--list", () { | 3659 unittest.test("method--list", () { |
| 3660 | 3660 |
| 3661 var mock = new HttpServerMock(); | 3661 var mock = new HttpServerMock(); |
| 3662 api.EntitlementsResourceApi res = new api.AndroidenterpriseApi(mock).entit
lements; | 3662 api.EntitlementsResourceApi res = new api.AndroidenterpriseApi(mock).entit
lements; |
| 3663 var arg_enterpriseId = "foo"; | 3663 var arg_enterpriseId = "foo"; |
| 3664 var arg_userId = "foo"; | 3664 var arg_userId = "foo"; |
| 3665 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 3665 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 3666 var path = (req.url).path; | 3666 var path = (req.url).path; |
| 3667 var pathOffset = 0; | 3667 var pathOffset = 0; |
| 3668 var index; | 3668 var index; |
| 3669 var subPart; | 3669 var subPart; |
| 3670 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 3670 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 3671 pathOffset += 1; | 3671 pathOffset += 1; |
| 3672 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq
uals("androidenterprise/v1/")); | 3672 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq
uals("androidenterprise/v1/")); |
| 3673 pathOffset += 21; | 3673 pathOffset += 21; |
| 3674 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("enterprises/")); | 3674 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("enterprises/")); |
| 3675 pathOffset += 12; | 3675 pathOffset += 12; |
| (...skipping 29 matching lines...) Expand all Loading... |
| 3705 } | 3705 } |
| 3706 } | 3706 } |
| 3707 | 3707 |
| 3708 | 3708 |
| 3709 var h = { | 3709 var h = { |
| 3710 "content-type" : "application/json; charset=utf-8", | 3710 "content-type" : "application/json; charset=utf-8", |
| 3711 }; | 3711 }; |
| 3712 var resp = convert.JSON.encode(buildEntitlementsListResponse()); | 3712 var resp = convert.JSON.encode(buildEntitlementsListResponse()); |
| 3713 return new async.Future.value(stringResponse(200, h, resp)); | 3713 return new async.Future.value(stringResponse(200, h, resp)); |
| 3714 }), true); | 3714 }), true); |
| 3715 res.list(arg_enterpriseId, arg_userId).then(unittest.expectAsync(((api.Ent
itlementsListResponse response) { | 3715 res.list(arg_enterpriseId, arg_userId).then(unittest.expectAsync1(((api.En
titlementsListResponse response) { |
| 3716 checkEntitlementsListResponse(response); | 3716 checkEntitlementsListResponse(response); |
| 3717 }))); | 3717 }))); |
| 3718 }); | 3718 }); |
| 3719 | 3719 |
| 3720 unittest.test("method--patch", () { | 3720 unittest.test("method--patch", () { |
| 3721 | 3721 |
| 3722 var mock = new HttpServerMock(); | 3722 var mock = new HttpServerMock(); |
| 3723 api.EntitlementsResourceApi res = new api.AndroidenterpriseApi(mock).entit
lements; | 3723 api.EntitlementsResourceApi res = new api.AndroidenterpriseApi(mock).entit
lements; |
| 3724 var arg_request = buildEntitlement(); | 3724 var arg_request = buildEntitlement(); |
| 3725 var arg_enterpriseId = "foo"; | 3725 var arg_enterpriseId = "foo"; |
| 3726 var arg_userId = "foo"; | 3726 var arg_userId = "foo"; |
| 3727 var arg_entitlementId = "foo"; | 3727 var arg_entitlementId = "foo"; |
| 3728 var arg_install = true; | 3728 var arg_install = true; |
| 3729 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 3729 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 3730 var obj = new api.Entitlement.fromJson(json); | 3730 var obj = new api.Entitlement.fromJson(json); |
| 3731 checkEntitlement(obj); | 3731 checkEntitlement(obj); |
| 3732 | 3732 |
| 3733 var path = (req.url).path; | 3733 var path = (req.url).path; |
| 3734 var pathOffset = 0; | 3734 var pathOffset = 0; |
| 3735 var index; | 3735 var index; |
| 3736 var subPart; | 3736 var subPart; |
| 3737 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 3737 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 3738 pathOffset += 1; | 3738 pathOffset += 1; |
| 3739 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq
uals("androidenterprise/v1/")); | 3739 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq
uals("androidenterprise/v1/")); |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3776 } | 3776 } |
| 3777 unittest.expect(queryMap["install"].first, unittest.equals("$arg_install
")); | 3777 unittest.expect(queryMap["install"].first, unittest.equals("$arg_install
")); |
| 3778 | 3778 |
| 3779 | 3779 |
| 3780 var h = { | 3780 var h = { |
| 3781 "content-type" : "application/json; charset=utf-8", | 3781 "content-type" : "application/json; charset=utf-8", |
| 3782 }; | 3782 }; |
| 3783 var resp = convert.JSON.encode(buildEntitlement()); | 3783 var resp = convert.JSON.encode(buildEntitlement()); |
| 3784 return new async.Future.value(stringResponse(200, h, resp)); | 3784 return new async.Future.value(stringResponse(200, h, resp)); |
| 3785 }), true); | 3785 }), true); |
| 3786 res.patch(arg_request, arg_enterpriseId, arg_userId, arg_entitlementId, in
stall: arg_install).then(unittest.expectAsync(((api.Entitlement response) { | 3786 res.patch(arg_request, arg_enterpriseId, arg_userId, arg_entitlementId, in
stall: arg_install).then(unittest.expectAsync1(((api.Entitlement response) { |
| 3787 checkEntitlement(response); | 3787 checkEntitlement(response); |
| 3788 }))); | 3788 }))); |
| 3789 }); | 3789 }); |
| 3790 | 3790 |
| 3791 unittest.test("method--update", () { | 3791 unittest.test("method--update", () { |
| 3792 | 3792 |
| 3793 var mock = new HttpServerMock(); | 3793 var mock = new HttpServerMock(); |
| 3794 api.EntitlementsResourceApi res = new api.AndroidenterpriseApi(mock).entit
lements; | 3794 api.EntitlementsResourceApi res = new api.AndroidenterpriseApi(mock).entit
lements; |
| 3795 var arg_request = buildEntitlement(); | 3795 var arg_request = buildEntitlement(); |
| 3796 var arg_enterpriseId = "foo"; | 3796 var arg_enterpriseId = "foo"; |
| 3797 var arg_userId = "foo"; | 3797 var arg_userId = "foo"; |
| 3798 var arg_entitlementId = "foo"; | 3798 var arg_entitlementId = "foo"; |
| 3799 var arg_install = true; | 3799 var arg_install = true; |
| 3800 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 3800 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 3801 var obj = new api.Entitlement.fromJson(json); | 3801 var obj = new api.Entitlement.fromJson(json); |
| 3802 checkEntitlement(obj); | 3802 checkEntitlement(obj); |
| 3803 | 3803 |
| 3804 var path = (req.url).path; | 3804 var path = (req.url).path; |
| 3805 var pathOffset = 0; | 3805 var pathOffset = 0; |
| 3806 var index; | 3806 var index; |
| 3807 var subPart; | 3807 var subPart; |
| 3808 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 3808 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 3809 pathOffset += 1; | 3809 pathOffset += 1; |
| 3810 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq
uals("androidenterprise/v1/")); | 3810 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq
uals("androidenterprise/v1/")); |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3847 } | 3847 } |
| 3848 unittest.expect(queryMap["install"].first, unittest.equals("$arg_install
")); | 3848 unittest.expect(queryMap["install"].first, unittest.equals("$arg_install
")); |
| 3849 | 3849 |
| 3850 | 3850 |
| 3851 var h = { | 3851 var h = { |
| 3852 "content-type" : "application/json; charset=utf-8", | 3852 "content-type" : "application/json; charset=utf-8", |
| 3853 }; | 3853 }; |
| 3854 var resp = convert.JSON.encode(buildEntitlement()); | 3854 var resp = convert.JSON.encode(buildEntitlement()); |
| 3855 return new async.Future.value(stringResponse(200, h, resp)); | 3855 return new async.Future.value(stringResponse(200, h, resp)); |
| 3856 }), true); | 3856 }), true); |
| 3857 res.update(arg_request, arg_enterpriseId, arg_userId, arg_entitlementId, i
nstall: arg_install).then(unittest.expectAsync(((api.Entitlement response) { | 3857 res.update(arg_request, arg_enterpriseId, arg_userId, arg_entitlementId, i
nstall: arg_install).then(unittest.expectAsync1(((api.Entitlement response) { |
| 3858 checkEntitlement(response); | 3858 checkEntitlement(response); |
| 3859 }))); | 3859 }))); |
| 3860 }); | 3860 }); |
| 3861 | 3861 |
| 3862 }); | 3862 }); |
| 3863 | 3863 |
| 3864 | 3864 |
| 3865 unittest.group("resource-GrouplicensesResourceApi", () { | 3865 unittest.group("resource-GrouplicensesResourceApi", () { |
| 3866 unittest.test("method--get", () { | 3866 unittest.test("method--get", () { |
| 3867 | 3867 |
| 3868 var mock = new HttpServerMock(); | 3868 var mock = new HttpServerMock(); |
| 3869 api.GrouplicensesResourceApi res = new api.AndroidenterpriseApi(mock).grou
plicenses; | 3869 api.GrouplicensesResourceApi res = new api.AndroidenterpriseApi(mock).grou
plicenses; |
| 3870 var arg_enterpriseId = "foo"; | 3870 var arg_enterpriseId = "foo"; |
| 3871 var arg_groupLicenseId = "foo"; | 3871 var arg_groupLicenseId = "foo"; |
| 3872 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 3872 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 3873 var path = (req.url).path; | 3873 var path = (req.url).path; |
| 3874 var pathOffset = 0; | 3874 var pathOffset = 0; |
| 3875 var index; | 3875 var index; |
| 3876 var subPart; | 3876 var subPart; |
| 3877 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 3877 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 3878 pathOffset += 1; | 3878 pathOffset += 1; |
| 3879 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq
uals("androidenterprise/v1/")); | 3879 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq
uals("androidenterprise/v1/")); |
| 3880 pathOffset += 21; | 3880 pathOffset += 21; |
| 3881 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("enterprises/")); | 3881 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("enterprises/")); |
| 3882 pathOffset += 12; | 3882 pathOffset += 12; |
| (...skipping 25 matching lines...) Expand all Loading... |
| 3908 } | 3908 } |
| 3909 } | 3909 } |
| 3910 | 3910 |
| 3911 | 3911 |
| 3912 var h = { | 3912 var h = { |
| 3913 "content-type" : "application/json; charset=utf-8", | 3913 "content-type" : "application/json; charset=utf-8", |
| 3914 }; | 3914 }; |
| 3915 var resp = convert.JSON.encode(buildGroupLicense()); | 3915 var resp = convert.JSON.encode(buildGroupLicense()); |
| 3916 return new async.Future.value(stringResponse(200, h, resp)); | 3916 return new async.Future.value(stringResponse(200, h, resp)); |
| 3917 }), true); | 3917 }), true); |
| 3918 res.get(arg_enterpriseId, arg_groupLicenseId).then(unittest.expectAsync(((
api.GroupLicense response) { | 3918 res.get(arg_enterpriseId, arg_groupLicenseId).then(unittest.expectAsync1((
(api.GroupLicense response) { |
| 3919 checkGroupLicense(response); | 3919 checkGroupLicense(response); |
| 3920 }))); | 3920 }))); |
| 3921 }); | 3921 }); |
| 3922 | 3922 |
| 3923 unittest.test("method--list", () { | 3923 unittest.test("method--list", () { |
| 3924 | 3924 |
| 3925 var mock = new HttpServerMock(); | 3925 var mock = new HttpServerMock(); |
| 3926 api.GrouplicensesResourceApi res = new api.AndroidenterpriseApi(mock).grou
plicenses; | 3926 api.GrouplicensesResourceApi res = new api.AndroidenterpriseApi(mock).grou
plicenses; |
| 3927 var arg_enterpriseId = "foo"; | 3927 var arg_enterpriseId = "foo"; |
| 3928 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 3928 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 3929 var path = (req.url).path; | 3929 var path = (req.url).path; |
| 3930 var pathOffset = 0; | 3930 var pathOffset = 0; |
| 3931 var index; | 3931 var index; |
| 3932 var subPart; | 3932 var subPart; |
| 3933 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 3933 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 3934 pathOffset += 1; | 3934 pathOffset += 1; |
| 3935 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq
uals("androidenterprise/v1/")); | 3935 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq
uals("androidenterprise/v1/")); |
| 3936 pathOffset += 21; | 3936 pathOffset += 21; |
| 3937 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("enterprises/")); | 3937 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("enterprises/")); |
| 3938 pathOffset += 12; | 3938 pathOffset += 12; |
| (...skipping 22 matching lines...) Expand all Loading... |
| 3961 } | 3961 } |
| 3962 } | 3962 } |
| 3963 | 3963 |
| 3964 | 3964 |
| 3965 var h = { | 3965 var h = { |
| 3966 "content-type" : "application/json; charset=utf-8", | 3966 "content-type" : "application/json; charset=utf-8", |
| 3967 }; | 3967 }; |
| 3968 var resp = convert.JSON.encode(buildGroupLicensesListResponse()); | 3968 var resp = convert.JSON.encode(buildGroupLicensesListResponse()); |
| 3969 return new async.Future.value(stringResponse(200, h, resp)); | 3969 return new async.Future.value(stringResponse(200, h, resp)); |
| 3970 }), true); | 3970 }), true); |
| 3971 res.list(arg_enterpriseId).then(unittest.expectAsync(((api.GroupLicensesLi
stResponse response) { | 3971 res.list(arg_enterpriseId).then(unittest.expectAsync1(((api.GroupLicensesL
istResponse response) { |
| 3972 checkGroupLicensesListResponse(response); | 3972 checkGroupLicensesListResponse(response); |
| 3973 }))); | 3973 }))); |
| 3974 }); | 3974 }); |
| 3975 | 3975 |
| 3976 }); | 3976 }); |
| 3977 | 3977 |
| 3978 | 3978 |
| 3979 unittest.group("resource-GrouplicenseusersResourceApi", () { | 3979 unittest.group("resource-GrouplicenseusersResourceApi", () { |
| 3980 unittest.test("method--list", () { | 3980 unittest.test("method--list", () { |
| 3981 | 3981 |
| 3982 var mock = new HttpServerMock(); | 3982 var mock = new HttpServerMock(); |
| 3983 api.GrouplicenseusersResourceApi res = new api.AndroidenterpriseApi(mock).
grouplicenseusers; | 3983 api.GrouplicenseusersResourceApi res = new api.AndroidenterpriseApi(mock).
grouplicenseusers; |
| 3984 var arg_enterpriseId = "foo"; | 3984 var arg_enterpriseId = "foo"; |
| 3985 var arg_groupLicenseId = "foo"; | 3985 var arg_groupLicenseId = "foo"; |
| 3986 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 3986 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 3987 var path = (req.url).path; | 3987 var path = (req.url).path; |
| 3988 var pathOffset = 0; | 3988 var pathOffset = 0; |
| 3989 var index; | 3989 var index; |
| 3990 var subPart; | 3990 var subPart; |
| 3991 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 3991 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 3992 pathOffset += 1; | 3992 pathOffset += 1; |
| 3993 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq
uals("androidenterprise/v1/")); | 3993 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq
uals("androidenterprise/v1/")); |
| 3994 pathOffset += 21; | 3994 pathOffset += 21; |
| 3995 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("enterprises/")); | 3995 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("enterprises/")); |
| 3996 pathOffset += 12; | 3996 pathOffset += 12; |
| (...skipping 29 matching lines...) Expand all Loading... |
| 4026 } | 4026 } |
| 4027 } | 4027 } |
| 4028 | 4028 |
| 4029 | 4029 |
| 4030 var h = { | 4030 var h = { |
| 4031 "content-type" : "application/json; charset=utf-8", | 4031 "content-type" : "application/json; charset=utf-8", |
| 4032 }; | 4032 }; |
| 4033 var resp = convert.JSON.encode(buildGroupLicenseUsersListResponse()); | 4033 var resp = convert.JSON.encode(buildGroupLicenseUsersListResponse()); |
| 4034 return new async.Future.value(stringResponse(200, h, resp)); | 4034 return new async.Future.value(stringResponse(200, h, resp)); |
| 4035 }), true); | 4035 }), true); |
| 4036 res.list(arg_enterpriseId, arg_groupLicenseId).then(unittest.expectAsync((
(api.GroupLicenseUsersListResponse response) { | 4036 res.list(arg_enterpriseId, arg_groupLicenseId).then(unittest.expectAsync1(
((api.GroupLicenseUsersListResponse response) { |
| 4037 checkGroupLicenseUsersListResponse(response); | 4037 checkGroupLicenseUsersListResponse(response); |
| 4038 }))); | 4038 }))); |
| 4039 }); | 4039 }); |
| 4040 | 4040 |
| 4041 }); | 4041 }); |
| 4042 | 4042 |
| 4043 | 4043 |
| 4044 unittest.group("resource-InstallsResourceApi", () { | 4044 unittest.group("resource-InstallsResourceApi", () { |
| 4045 unittest.test("method--delete", () { | 4045 unittest.test("method--delete", () { |
| 4046 | 4046 |
| 4047 var mock = new HttpServerMock(); | 4047 var mock = new HttpServerMock(); |
| 4048 api.InstallsResourceApi res = new api.AndroidenterpriseApi(mock).installs; | 4048 api.InstallsResourceApi res = new api.AndroidenterpriseApi(mock).installs; |
| 4049 var arg_enterpriseId = "foo"; | 4049 var arg_enterpriseId = "foo"; |
| 4050 var arg_userId = "foo"; | 4050 var arg_userId = "foo"; |
| 4051 var arg_deviceId = "foo"; | 4051 var arg_deviceId = "foo"; |
| 4052 var arg_installId = "foo"; | 4052 var arg_installId = "foo"; |
| 4053 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 4053 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 4054 var path = (req.url).path; | 4054 var path = (req.url).path; |
| 4055 var pathOffset = 0; | 4055 var pathOffset = 0; |
| 4056 var index; | 4056 var index; |
| 4057 var subPart; | 4057 var subPart; |
| 4058 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 4058 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 4059 pathOffset += 1; | 4059 pathOffset += 1; |
| 4060 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq
uals("androidenterprise/v1/")); | 4060 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq
uals("androidenterprise/v1/")); |
| 4061 pathOffset += 21; | 4061 pathOffset += 21; |
| 4062 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("enterprises/")); | 4062 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("enterprises/")); |
| 4063 pathOffset += 12; | 4063 pathOffset += 12; |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4103 } | 4103 } |
| 4104 } | 4104 } |
| 4105 | 4105 |
| 4106 | 4106 |
| 4107 var h = { | 4107 var h = { |
| 4108 "content-type" : "application/json; charset=utf-8", | 4108 "content-type" : "application/json; charset=utf-8", |
| 4109 }; | 4109 }; |
| 4110 var resp = ""; | 4110 var resp = ""; |
| 4111 return new async.Future.value(stringResponse(200, h, resp)); | 4111 return new async.Future.value(stringResponse(200, h, resp)); |
| 4112 }), true); | 4112 }), true); |
| 4113 res.delete(arg_enterpriseId, arg_userId, arg_deviceId, arg_installId).then
(unittest.expectAsync((_) {})); | 4113 res.delete(arg_enterpriseId, arg_userId, arg_deviceId, arg_installId).then
(unittest.expectAsync1((_) {})); |
| 4114 }); | 4114 }); |
| 4115 | 4115 |
| 4116 unittest.test("method--get", () { | 4116 unittest.test("method--get", () { |
| 4117 | 4117 |
| 4118 var mock = new HttpServerMock(); | 4118 var mock = new HttpServerMock(); |
| 4119 api.InstallsResourceApi res = new api.AndroidenterpriseApi(mock).installs; | 4119 api.InstallsResourceApi res = new api.AndroidenterpriseApi(mock).installs; |
| 4120 var arg_enterpriseId = "foo"; | 4120 var arg_enterpriseId = "foo"; |
| 4121 var arg_userId = "foo"; | 4121 var arg_userId = "foo"; |
| 4122 var arg_deviceId = "foo"; | 4122 var arg_deviceId = "foo"; |
| 4123 var arg_installId = "foo"; | 4123 var arg_installId = "foo"; |
| 4124 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 4124 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 4125 var path = (req.url).path; | 4125 var path = (req.url).path; |
| 4126 var pathOffset = 0; | 4126 var pathOffset = 0; |
| 4127 var index; | 4127 var index; |
| 4128 var subPart; | 4128 var subPart; |
| 4129 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 4129 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 4130 pathOffset += 1; | 4130 pathOffset += 1; |
| 4131 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq
uals("androidenterprise/v1/")); | 4131 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq
uals("androidenterprise/v1/")); |
| 4132 pathOffset += 21; | 4132 pathOffset += 21; |
| 4133 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("enterprises/")); | 4133 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("enterprises/")); |
| 4134 pathOffset += 12; | 4134 pathOffset += 12; |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4174 } | 4174 } |
| 4175 } | 4175 } |
| 4176 | 4176 |
| 4177 | 4177 |
| 4178 var h = { | 4178 var h = { |
| 4179 "content-type" : "application/json; charset=utf-8", | 4179 "content-type" : "application/json; charset=utf-8", |
| 4180 }; | 4180 }; |
| 4181 var resp = convert.JSON.encode(buildInstall()); | 4181 var resp = convert.JSON.encode(buildInstall()); |
| 4182 return new async.Future.value(stringResponse(200, h, resp)); | 4182 return new async.Future.value(stringResponse(200, h, resp)); |
| 4183 }), true); | 4183 }), true); |
| 4184 res.get(arg_enterpriseId, arg_userId, arg_deviceId, arg_installId).then(un
ittest.expectAsync(((api.Install response) { | 4184 res.get(arg_enterpriseId, arg_userId, arg_deviceId, arg_installId).then(un
ittest.expectAsync1(((api.Install response) { |
| 4185 checkInstall(response); | 4185 checkInstall(response); |
| 4186 }))); | 4186 }))); |
| 4187 }); | 4187 }); |
| 4188 | 4188 |
| 4189 unittest.test("method--list", () { | 4189 unittest.test("method--list", () { |
| 4190 | 4190 |
| 4191 var mock = new HttpServerMock(); | 4191 var mock = new HttpServerMock(); |
| 4192 api.InstallsResourceApi res = new api.AndroidenterpriseApi(mock).installs; | 4192 api.InstallsResourceApi res = new api.AndroidenterpriseApi(mock).installs; |
| 4193 var arg_enterpriseId = "foo"; | 4193 var arg_enterpriseId = "foo"; |
| 4194 var arg_userId = "foo"; | 4194 var arg_userId = "foo"; |
| 4195 var arg_deviceId = "foo"; | 4195 var arg_deviceId = "foo"; |
| 4196 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 4196 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 4197 var path = (req.url).path; | 4197 var path = (req.url).path; |
| 4198 var pathOffset = 0; | 4198 var pathOffset = 0; |
| 4199 var index; | 4199 var index; |
| 4200 var subPart; | 4200 var subPart; |
| 4201 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 4201 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 4202 pathOffset += 1; | 4202 pathOffset += 1; |
| 4203 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq
uals("androidenterprise/v1/")); | 4203 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq
uals("androidenterprise/v1/")); |
| 4204 pathOffset += 21; | 4204 pathOffset += 21; |
| 4205 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("enterprises/")); | 4205 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("enterprises/")); |
| 4206 pathOffset += 12; | 4206 pathOffset += 12; |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4243 } | 4243 } |
| 4244 } | 4244 } |
| 4245 | 4245 |
| 4246 | 4246 |
| 4247 var h = { | 4247 var h = { |
| 4248 "content-type" : "application/json; charset=utf-8", | 4248 "content-type" : "application/json; charset=utf-8", |
| 4249 }; | 4249 }; |
| 4250 var resp = convert.JSON.encode(buildInstallsListResponse()); | 4250 var resp = convert.JSON.encode(buildInstallsListResponse()); |
| 4251 return new async.Future.value(stringResponse(200, h, resp)); | 4251 return new async.Future.value(stringResponse(200, h, resp)); |
| 4252 }), true); | 4252 }), true); |
| 4253 res.list(arg_enterpriseId, arg_userId, arg_deviceId).then(unittest.expectA
sync(((api.InstallsListResponse response) { | 4253 res.list(arg_enterpriseId, arg_userId, arg_deviceId).then(unittest.expectA
sync1(((api.InstallsListResponse response) { |
| 4254 checkInstallsListResponse(response); | 4254 checkInstallsListResponse(response); |
| 4255 }))); | 4255 }))); |
| 4256 }); | 4256 }); |
| 4257 | 4257 |
| 4258 unittest.test("method--patch", () { | 4258 unittest.test("method--patch", () { |
| 4259 | 4259 |
| 4260 var mock = new HttpServerMock(); | 4260 var mock = new HttpServerMock(); |
| 4261 api.InstallsResourceApi res = new api.AndroidenterpriseApi(mock).installs; | 4261 api.InstallsResourceApi res = new api.AndroidenterpriseApi(mock).installs; |
| 4262 var arg_request = buildInstall(); | 4262 var arg_request = buildInstall(); |
| 4263 var arg_enterpriseId = "foo"; | 4263 var arg_enterpriseId = "foo"; |
| 4264 var arg_userId = "foo"; | 4264 var arg_userId = "foo"; |
| 4265 var arg_deviceId = "foo"; | 4265 var arg_deviceId = "foo"; |
| 4266 var arg_installId = "foo"; | 4266 var arg_installId = "foo"; |
| 4267 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 4267 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 4268 var obj = new api.Install.fromJson(json); | 4268 var obj = new api.Install.fromJson(json); |
| 4269 checkInstall(obj); | 4269 checkInstall(obj); |
| 4270 | 4270 |
| 4271 var path = (req.url).path; | 4271 var path = (req.url).path; |
| 4272 var pathOffset = 0; | 4272 var pathOffset = 0; |
| 4273 var index; | 4273 var index; |
| 4274 var subPart; | 4274 var subPart; |
| 4275 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 4275 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 4276 pathOffset += 1; | 4276 pathOffset += 1; |
| 4277 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq
uals("androidenterprise/v1/")); | 4277 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq
uals("androidenterprise/v1/")); |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4320 } | 4320 } |
| 4321 } | 4321 } |
| 4322 | 4322 |
| 4323 | 4323 |
| 4324 var h = { | 4324 var h = { |
| 4325 "content-type" : "application/json; charset=utf-8", | 4325 "content-type" : "application/json; charset=utf-8", |
| 4326 }; | 4326 }; |
| 4327 var resp = convert.JSON.encode(buildInstall()); | 4327 var resp = convert.JSON.encode(buildInstall()); |
| 4328 return new async.Future.value(stringResponse(200, h, resp)); | 4328 return new async.Future.value(stringResponse(200, h, resp)); |
| 4329 }), true); | 4329 }), true); |
| 4330 res.patch(arg_request, arg_enterpriseId, arg_userId, arg_deviceId, arg_ins
tallId).then(unittest.expectAsync(((api.Install response) { | 4330 res.patch(arg_request, arg_enterpriseId, arg_userId, arg_deviceId, arg_ins
tallId).then(unittest.expectAsync1(((api.Install response) { |
| 4331 checkInstall(response); | 4331 checkInstall(response); |
| 4332 }))); | 4332 }))); |
| 4333 }); | 4333 }); |
| 4334 | 4334 |
| 4335 unittest.test("method--update", () { | 4335 unittest.test("method--update", () { |
| 4336 | 4336 |
| 4337 var mock = new HttpServerMock(); | 4337 var mock = new HttpServerMock(); |
| 4338 api.InstallsResourceApi res = new api.AndroidenterpriseApi(mock).installs; | 4338 api.InstallsResourceApi res = new api.AndroidenterpriseApi(mock).installs; |
| 4339 var arg_request = buildInstall(); | 4339 var arg_request = buildInstall(); |
| 4340 var arg_enterpriseId = "foo"; | 4340 var arg_enterpriseId = "foo"; |
| 4341 var arg_userId = "foo"; | 4341 var arg_userId = "foo"; |
| 4342 var arg_deviceId = "foo"; | 4342 var arg_deviceId = "foo"; |
| 4343 var arg_installId = "foo"; | 4343 var arg_installId = "foo"; |
| 4344 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 4344 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 4345 var obj = new api.Install.fromJson(json); | 4345 var obj = new api.Install.fromJson(json); |
| 4346 checkInstall(obj); | 4346 checkInstall(obj); |
| 4347 | 4347 |
| 4348 var path = (req.url).path; | 4348 var path = (req.url).path; |
| 4349 var pathOffset = 0; | 4349 var pathOffset = 0; |
| 4350 var index; | 4350 var index; |
| 4351 var subPart; | 4351 var subPart; |
| 4352 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 4352 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 4353 pathOffset += 1; | 4353 pathOffset += 1; |
| 4354 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq
uals("androidenterprise/v1/")); | 4354 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq
uals("androidenterprise/v1/")); |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4397 } | 4397 } |
| 4398 } | 4398 } |
| 4399 | 4399 |
| 4400 | 4400 |
| 4401 var h = { | 4401 var h = { |
| 4402 "content-type" : "application/json; charset=utf-8", | 4402 "content-type" : "application/json; charset=utf-8", |
| 4403 }; | 4403 }; |
| 4404 var resp = convert.JSON.encode(buildInstall()); | 4404 var resp = convert.JSON.encode(buildInstall()); |
| 4405 return new async.Future.value(stringResponse(200, h, resp)); | 4405 return new async.Future.value(stringResponse(200, h, resp)); |
| 4406 }), true); | 4406 }), true); |
| 4407 res.update(arg_request, arg_enterpriseId, arg_userId, arg_deviceId, arg_in
stallId).then(unittest.expectAsync(((api.Install response) { | 4407 res.update(arg_request, arg_enterpriseId, arg_userId, arg_deviceId, arg_in
stallId).then(unittest.expectAsync1(((api.Install response) { |
| 4408 checkInstall(response); | 4408 checkInstall(response); |
| 4409 }))); | 4409 }))); |
| 4410 }); | 4410 }); |
| 4411 | 4411 |
| 4412 }); | 4412 }); |
| 4413 | 4413 |
| 4414 | 4414 |
| 4415 unittest.group("resource-ManagedconfigurationsfordeviceResourceApi", () { | 4415 unittest.group("resource-ManagedconfigurationsfordeviceResourceApi", () { |
| 4416 unittest.test("method--delete", () { | 4416 unittest.test("method--delete", () { |
| 4417 | 4417 |
| 4418 var mock = new HttpServerMock(); | 4418 var mock = new HttpServerMock(); |
| 4419 api.ManagedconfigurationsfordeviceResourceApi res = new api.Androidenterpr
iseApi(mock).managedconfigurationsfordevice; | 4419 api.ManagedconfigurationsfordeviceResourceApi res = new api.Androidenterpr
iseApi(mock).managedconfigurationsfordevice; |
| 4420 var arg_enterpriseId = "foo"; | 4420 var arg_enterpriseId = "foo"; |
| 4421 var arg_userId = "foo"; | 4421 var arg_userId = "foo"; |
| 4422 var arg_deviceId = "foo"; | 4422 var arg_deviceId = "foo"; |
| 4423 var arg_managedConfigurationForDeviceId = "foo"; | 4423 var arg_managedConfigurationForDeviceId = "foo"; |
| 4424 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 4424 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 4425 var path = (req.url).path; | 4425 var path = (req.url).path; |
| 4426 var pathOffset = 0; | 4426 var pathOffset = 0; |
| 4427 var index; | 4427 var index; |
| 4428 var subPart; | 4428 var subPart; |
| 4429 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 4429 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 4430 pathOffset += 1; | 4430 pathOffset += 1; |
| 4431 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq
uals("androidenterprise/v1/")); | 4431 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq
uals("androidenterprise/v1/")); |
| 4432 pathOffset += 21; | 4432 pathOffset += 21; |
| 4433 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("enterprises/")); | 4433 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("enterprises/")); |
| 4434 pathOffset += 12; | 4434 pathOffset += 12; |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4474 } | 4474 } |
| 4475 } | 4475 } |
| 4476 | 4476 |
| 4477 | 4477 |
| 4478 var h = { | 4478 var h = { |
| 4479 "content-type" : "application/json; charset=utf-8", | 4479 "content-type" : "application/json; charset=utf-8", |
| 4480 }; | 4480 }; |
| 4481 var resp = ""; | 4481 var resp = ""; |
| 4482 return new async.Future.value(stringResponse(200, h, resp)); | 4482 return new async.Future.value(stringResponse(200, h, resp)); |
| 4483 }), true); | 4483 }), true); |
| 4484 res.delete(arg_enterpriseId, arg_userId, arg_deviceId, arg_managedConfigur
ationForDeviceId).then(unittest.expectAsync((_) {})); | 4484 res.delete(arg_enterpriseId, arg_userId, arg_deviceId, arg_managedConfigur
ationForDeviceId).then(unittest.expectAsync1((_) {})); |
| 4485 }); | 4485 }); |
| 4486 | 4486 |
| 4487 unittest.test("method--get", () { | 4487 unittest.test("method--get", () { |
| 4488 | 4488 |
| 4489 var mock = new HttpServerMock(); | 4489 var mock = new HttpServerMock(); |
| 4490 api.ManagedconfigurationsfordeviceResourceApi res = new api.Androidenterpr
iseApi(mock).managedconfigurationsfordevice; | 4490 api.ManagedconfigurationsfordeviceResourceApi res = new api.Androidenterpr
iseApi(mock).managedconfigurationsfordevice; |
| 4491 var arg_enterpriseId = "foo"; | 4491 var arg_enterpriseId = "foo"; |
| 4492 var arg_userId = "foo"; | 4492 var arg_userId = "foo"; |
| 4493 var arg_deviceId = "foo"; | 4493 var arg_deviceId = "foo"; |
| 4494 var arg_managedConfigurationForDeviceId = "foo"; | 4494 var arg_managedConfigurationForDeviceId = "foo"; |
| 4495 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 4495 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 4496 var path = (req.url).path; | 4496 var path = (req.url).path; |
| 4497 var pathOffset = 0; | 4497 var pathOffset = 0; |
| 4498 var index; | 4498 var index; |
| 4499 var subPart; | 4499 var subPart; |
| 4500 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 4500 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 4501 pathOffset += 1; | 4501 pathOffset += 1; |
| 4502 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq
uals("androidenterprise/v1/")); | 4502 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq
uals("androidenterprise/v1/")); |
| 4503 pathOffset += 21; | 4503 pathOffset += 21; |
| 4504 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("enterprises/")); | 4504 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("enterprises/")); |
| 4505 pathOffset += 12; | 4505 pathOffset += 12; |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4545 } | 4545 } |
| 4546 } | 4546 } |
| 4547 | 4547 |
| 4548 | 4548 |
| 4549 var h = { | 4549 var h = { |
| 4550 "content-type" : "application/json; charset=utf-8", | 4550 "content-type" : "application/json; charset=utf-8", |
| 4551 }; | 4551 }; |
| 4552 var resp = convert.JSON.encode(buildManagedConfiguration()); | 4552 var resp = convert.JSON.encode(buildManagedConfiguration()); |
| 4553 return new async.Future.value(stringResponse(200, h, resp)); | 4553 return new async.Future.value(stringResponse(200, h, resp)); |
| 4554 }), true); | 4554 }), true); |
| 4555 res.get(arg_enterpriseId, arg_userId, arg_deviceId, arg_managedConfigurati
onForDeviceId).then(unittest.expectAsync(((api.ManagedConfiguration response) { | 4555 res.get(arg_enterpriseId, arg_userId, arg_deviceId, arg_managedConfigurati
onForDeviceId).then(unittest.expectAsync1(((api.ManagedConfiguration response) { |
| 4556 checkManagedConfiguration(response); | 4556 checkManagedConfiguration(response); |
| 4557 }))); | 4557 }))); |
| 4558 }); | 4558 }); |
| 4559 | 4559 |
| 4560 unittest.test("method--list", () { | 4560 unittest.test("method--list", () { |
| 4561 | 4561 |
| 4562 var mock = new HttpServerMock(); | 4562 var mock = new HttpServerMock(); |
| 4563 api.ManagedconfigurationsfordeviceResourceApi res = new api.Androidenterpr
iseApi(mock).managedconfigurationsfordevice; | 4563 api.ManagedconfigurationsfordeviceResourceApi res = new api.Androidenterpr
iseApi(mock).managedconfigurationsfordevice; |
| 4564 var arg_enterpriseId = "foo"; | 4564 var arg_enterpriseId = "foo"; |
| 4565 var arg_userId = "foo"; | 4565 var arg_userId = "foo"; |
| 4566 var arg_deviceId = "foo"; | 4566 var arg_deviceId = "foo"; |
| 4567 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 4567 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 4568 var path = (req.url).path; | 4568 var path = (req.url).path; |
| 4569 var pathOffset = 0; | 4569 var pathOffset = 0; |
| 4570 var index; | 4570 var index; |
| 4571 var subPart; | 4571 var subPart; |
| 4572 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 4572 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 4573 pathOffset += 1; | 4573 pathOffset += 1; |
| 4574 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq
uals("androidenterprise/v1/")); | 4574 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq
uals("androidenterprise/v1/")); |
| 4575 pathOffset += 21; | 4575 pathOffset += 21; |
| 4576 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("enterprises/")); | 4576 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("enterprises/")); |
| 4577 pathOffset += 12; | 4577 pathOffset += 12; |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4614 } | 4614 } |
| 4615 } | 4615 } |
| 4616 | 4616 |
| 4617 | 4617 |
| 4618 var h = { | 4618 var h = { |
| 4619 "content-type" : "application/json; charset=utf-8", | 4619 "content-type" : "application/json; charset=utf-8", |
| 4620 }; | 4620 }; |
| 4621 var resp = convert.JSON.encode(buildManagedConfigurationsForDeviceListRe
sponse()); | 4621 var resp = convert.JSON.encode(buildManagedConfigurationsForDeviceListRe
sponse()); |
| 4622 return new async.Future.value(stringResponse(200, h, resp)); | 4622 return new async.Future.value(stringResponse(200, h, resp)); |
| 4623 }), true); | 4623 }), true); |
| 4624 res.list(arg_enterpriseId, arg_userId, arg_deviceId).then(unittest.expectA
sync(((api.ManagedConfigurationsForDeviceListResponse response) { | 4624 res.list(arg_enterpriseId, arg_userId, arg_deviceId).then(unittest.expectA
sync1(((api.ManagedConfigurationsForDeviceListResponse response) { |
| 4625 checkManagedConfigurationsForDeviceListResponse(response); | 4625 checkManagedConfigurationsForDeviceListResponse(response); |
| 4626 }))); | 4626 }))); |
| 4627 }); | 4627 }); |
| 4628 | 4628 |
| 4629 unittest.test("method--patch", () { | 4629 unittest.test("method--patch", () { |
| 4630 | 4630 |
| 4631 var mock = new HttpServerMock(); | 4631 var mock = new HttpServerMock(); |
| 4632 api.ManagedconfigurationsfordeviceResourceApi res = new api.Androidenterpr
iseApi(mock).managedconfigurationsfordevice; | 4632 api.ManagedconfigurationsfordeviceResourceApi res = new api.Androidenterpr
iseApi(mock).managedconfigurationsfordevice; |
| 4633 var arg_request = buildManagedConfiguration(); | 4633 var arg_request = buildManagedConfiguration(); |
| 4634 var arg_enterpriseId = "foo"; | 4634 var arg_enterpriseId = "foo"; |
| 4635 var arg_userId = "foo"; | 4635 var arg_userId = "foo"; |
| 4636 var arg_deviceId = "foo"; | 4636 var arg_deviceId = "foo"; |
| 4637 var arg_managedConfigurationForDeviceId = "foo"; | 4637 var arg_managedConfigurationForDeviceId = "foo"; |
| 4638 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 4638 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 4639 var obj = new api.ManagedConfiguration.fromJson(json); | 4639 var obj = new api.ManagedConfiguration.fromJson(json); |
| 4640 checkManagedConfiguration(obj); | 4640 checkManagedConfiguration(obj); |
| 4641 | 4641 |
| 4642 var path = (req.url).path; | 4642 var path = (req.url).path; |
| 4643 var pathOffset = 0; | 4643 var pathOffset = 0; |
| 4644 var index; | 4644 var index; |
| 4645 var subPart; | 4645 var subPart; |
| 4646 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 4646 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 4647 pathOffset += 1; | 4647 pathOffset += 1; |
| 4648 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq
uals("androidenterprise/v1/")); | 4648 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq
uals("androidenterprise/v1/")); |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4691 } | 4691 } |
| 4692 } | 4692 } |
| 4693 | 4693 |
| 4694 | 4694 |
| 4695 var h = { | 4695 var h = { |
| 4696 "content-type" : "application/json; charset=utf-8", | 4696 "content-type" : "application/json; charset=utf-8", |
| 4697 }; | 4697 }; |
| 4698 var resp = convert.JSON.encode(buildManagedConfiguration()); | 4698 var resp = convert.JSON.encode(buildManagedConfiguration()); |
| 4699 return new async.Future.value(stringResponse(200, h, resp)); | 4699 return new async.Future.value(stringResponse(200, h, resp)); |
| 4700 }), true); | 4700 }), true); |
| 4701 res.patch(arg_request, arg_enterpriseId, arg_userId, arg_deviceId, arg_man
agedConfigurationForDeviceId).then(unittest.expectAsync(((api.ManagedConfigurati
on response) { | 4701 res.patch(arg_request, arg_enterpriseId, arg_userId, arg_deviceId, arg_man
agedConfigurationForDeviceId).then(unittest.expectAsync1(((api.ManagedConfigurat
ion response) { |
| 4702 checkManagedConfiguration(response); | 4702 checkManagedConfiguration(response); |
| 4703 }))); | 4703 }))); |
| 4704 }); | 4704 }); |
| 4705 | 4705 |
| 4706 unittest.test("method--update", () { | 4706 unittest.test("method--update", () { |
| 4707 | 4707 |
| 4708 var mock = new HttpServerMock(); | 4708 var mock = new HttpServerMock(); |
| 4709 api.ManagedconfigurationsfordeviceResourceApi res = new api.Androidenterpr
iseApi(mock).managedconfigurationsfordevice; | 4709 api.ManagedconfigurationsfordeviceResourceApi res = new api.Androidenterpr
iseApi(mock).managedconfigurationsfordevice; |
| 4710 var arg_request = buildManagedConfiguration(); | 4710 var arg_request = buildManagedConfiguration(); |
| 4711 var arg_enterpriseId = "foo"; | 4711 var arg_enterpriseId = "foo"; |
| 4712 var arg_userId = "foo"; | 4712 var arg_userId = "foo"; |
| 4713 var arg_deviceId = "foo"; | 4713 var arg_deviceId = "foo"; |
| 4714 var arg_managedConfigurationForDeviceId = "foo"; | 4714 var arg_managedConfigurationForDeviceId = "foo"; |
| 4715 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 4715 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 4716 var obj = new api.ManagedConfiguration.fromJson(json); | 4716 var obj = new api.ManagedConfiguration.fromJson(json); |
| 4717 checkManagedConfiguration(obj); | 4717 checkManagedConfiguration(obj); |
| 4718 | 4718 |
| 4719 var path = (req.url).path; | 4719 var path = (req.url).path; |
| 4720 var pathOffset = 0; | 4720 var pathOffset = 0; |
| 4721 var index; | 4721 var index; |
| 4722 var subPart; | 4722 var subPart; |
| 4723 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 4723 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 4724 pathOffset += 1; | 4724 pathOffset += 1; |
| 4725 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq
uals("androidenterprise/v1/")); | 4725 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq
uals("androidenterprise/v1/")); |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4768 } | 4768 } |
| 4769 } | 4769 } |
| 4770 | 4770 |
| 4771 | 4771 |
| 4772 var h = { | 4772 var h = { |
| 4773 "content-type" : "application/json; charset=utf-8", | 4773 "content-type" : "application/json; charset=utf-8", |
| 4774 }; | 4774 }; |
| 4775 var resp = convert.JSON.encode(buildManagedConfiguration()); | 4775 var resp = convert.JSON.encode(buildManagedConfiguration()); |
| 4776 return new async.Future.value(stringResponse(200, h, resp)); | 4776 return new async.Future.value(stringResponse(200, h, resp)); |
| 4777 }), true); | 4777 }), true); |
| 4778 res.update(arg_request, arg_enterpriseId, arg_userId, arg_deviceId, arg_ma
nagedConfigurationForDeviceId).then(unittest.expectAsync(((api.ManagedConfigurat
ion response) { | 4778 res.update(arg_request, arg_enterpriseId, arg_userId, arg_deviceId, arg_ma
nagedConfigurationForDeviceId).then(unittest.expectAsync1(((api.ManagedConfigura
tion response) { |
| 4779 checkManagedConfiguration(response); | 4779 checkManagedConfiguration(response); |
| 4780 }))); | 4780 }))); |
| 4781 }); | 4781 }); |
| 4782 | 4782 |
| 4783 }); | 4783 }); |
| 4784 | 4784 |
| 4785 | 4785 |
| 4786 unittest.group("resource-ManagedconfigurationsforuserResourceApi", () { | 4786 unittest.group("resource-ManagedconfigurationsforuserResourceApi", () { |
| 4787 unittest.test("method--delete", () { | 4787 unittest.test("method--delete", () { |
| 4788 | 4788 |
| 4789 var mock = new HttpServerMock(); | 4789 var mock = new HttpServerMock(); |
| 4790 api.ManagedconfigurationsforuserResourceApi res = new api.Androidenterpris
eApi(mock).managedconfigurationsforuser; | 4790 api.ManagedconfigurationsforuserResourceApi res = new api.Androidenterpris
eApi(mock).managedconfigurationsforuser; |
| 4791 var arg_enterpriseId = "foo"; | 4791 var arg_enterpriseId = "foo"; |
| 4792 var arg_userId = "foo"; | 4792 var arg_userId = "foo"; |
| 4793 var arg_managedConfigurationForUserId = "foo"; | 4793 var arg_managedConfigurationForUserId = "foo"; |
| 4794 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 4794 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 4795 var path = (req.url).path; | 4795 var path = (req.url).path; |
| 4796 var pathOffset = 0; | 4796 var pathOffset = 0; |
| 4797 var index; | 4797 var index; |
| 4798 var subPart; | 4798 var subPart; |
| 4799 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 4799 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 4800 pathOffset += 1; | 4800 pathOffset += 1; |
| 4801 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq
uals("androidenterprise/v1/")); | 4801 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq
uals("androidenterprise/v1/")); |
| 4802 pathOffset += 21; | 4802 pathOffset += 21; |
| 4803 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("enterprises/")); | 4803 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("enterprises/")); |
| 4804 pathOffset += 12; | 4804 pathOffset += 12; |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4837 } | 4837 } |
| 4838 } | 4838 } |
| 4839 | 4839 |
| 4840 | 4840 |
| 4841 var h = { | 4841 var h = { |
| 4842 "content-type" : "application/json; charset=utf-8", | 4842 "content-type" : "application/json; charset=utf-8", |
| 4843 }; | 4843 }; |
| 4844 var resp = ""; | 4844 var resp = ""; |
| 4845 return new async.Future.value(stringResponse(200, h, resp)); | 4845 return new async.Future.value(stringResponse(200, h, resp)); |
| 4846 }), true); | 4846 }), true); |
| 4847 res.delete(arg_enterpriseId, arg_userId, arg_managedConfigurationForUserId
).then(unittest.expectAsync((_) {})); | 4847 res.delete(arg_enterpriseId, arg_userId, arg_managedConfigurationForUserId
).then(unittest.expectAsync1((_) {})); |
| 4848 }); | 4848 }); |
| 4849 | 4849 |
| 4850 unittest.test("method--get", () { | 4850 unittest.test("method--get", () { |
| 4851 | 4851 |
| 4852 var mock = new HttpServerMock(); | 4852 var mock = new HttpServerMock(); |
| 4853 api.ManagedconfigurationsforuserResourceApi res = new api.Androidenterpris
eApi(mock).managedconfigurationsforuser; | 4853 api.ManagedconfigurationsforuserResourceApi res = new api.Androidenterpris
eApi(mock).managedconfigurationsforuser; |
| 4854 var arg_enterpriseId = "foo"; | 4854 var arg_enterpriseId = "foo"; |
| 4855 var arg_userId = "foo"; | 4855 var arg_userId = "foo"; |
| 4856 var arg_managedConfigurationForUserId = "foo"; | 4856 var arg_managedConfigurationForUserId = "foo"; |
| 4857 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 4857 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 4858 var path = (req.url).path; | 4858 var path = (req.url).path; |
| 4859 var pathOffset = 0; | 4859 var pathOffset = 0; |
| 4860 var index; | 4860 var index; |
| 4861 var subPart; | 4861 var subPart; |
| 4862 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 4862 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 4863 pathOffset += 1; | 4863 pathOffset += 1; |
| 4864 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq
uals("androidenterprise/v1/")); | 4864 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq
uals("androidenterprise/v1/")); |
| 4865 pathOffset += 21; | 4865 pathOffset += 21; |
| 4866 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("enterprises/")); | 4866 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("enterprises/")); |
| 4867 pathOffset += 12; | 4867 pathOffset += 12; |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4900 } | 4900 } |
| 4901 } | 4901 } |
| 4902 | 4902 |
| 4903 | 4903 |
| 4904 var h = { | 4904 var h = { |
| 4905 "content-type" : "application/json; charset=utf-8", | 4905 "content-type" : "application/json; charset=utf-8", |
| 4906 }; | 4906 }; |
| 4907 var resp = convert.JSON.encode(buildManagedConfiguration()); | 4907 var resp = convert.JSON.encode(buildManagedConfiguration()); |
| 4908 return new async.Future.value(stringResponse(200, h, resp)); | 4908 return new async.Future.value(stringResponse(200, h, resp)); |
| 4909 }), true); | 4909 }), true); |
| 4910 res.get(arg_enterpriseId, arg_userId, arg_managedConfigurationForUserId).t
hen(unittest.expectAsync(((api.ManagedConfiguration response) { | 4910 res.get(arg_enterpriseId, arg_userId, arg_managedConfigurationForUserId).t
hen(unittest.expectAsync1(((api.ManagedConfiguration response) { |
| 4911 checkManagedConfiguration(response); | 4911 checkManagedConfiguration(response); |
| 4912 }))); | 4912 }))); |
| 4913 }); | 4913 }); |
| 4914 | 4914 |
| 4915 unittest.test("method--list", () { | 4915 unittest.test("method--list", () { |
| 4916 | 4916 |
| 4917 var mock = new HttpServerMock(); | 4917 var mock = new HttpServerMock(); |
| 4918 api.ManagedconfigurationsforuserResourceApi res = new api.Androidenterpris
eApi(mock).managedconfigurationsforuser; | 4918 api.ManagedconfigurationsforuserResourceApi res = new api.Androidenterpris
eApi(mock).managedconfigurationsforuser; |
| 4919 var arg_enterpriseId = "foo"; | 4919 var arg_enterpriseId = "foo"; |
| 4920 var arg_userId = "foo"; | 4920 var arg_userId = "foo"; |
| 4921 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 4921 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 4922 var path = (req.url).path; | 4922 var path = (req.url).path; |
| 4923 var pathOffset = 0; | 4923 var pathOffset = 0; |
| 4924 var index; | 4924 var index; |
| 4925 var subPart; | 4925 var subPart; |
| 4926 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 4926 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 4927 pathOffset += 1; | 4927 pathOffset += 1; |
| 4928 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq
uals("androidenterprise/v1/")); | 4928 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq
uals("androidenterprise/v1/")); |
| 4929 pathOffset += 21; | 4929 pathOffset += 21; |
| 4930 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("enterprises/")); | 4930 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("enterprises/")); |
| 4931 pathOffset += 12; | 4931 pathOffset += 12; |
| (...skipping 29 matching lines...) Expand all Loading... |
| 4961 } | 4961 } |
| 4962 } | 4962 } |
| 4963 | 4963 |
| 4964 | 4964 |
| 4965 var h = { | 4965 var h = { |
| 4966 "content-type" : "application/json; charset=utf-8", | 4966 "content-type" : "application/json; charset=utf-8", |
| 4967 }; | 4967 }; |
| 4968 var resp = convert.JSON.encode(buildManagedConfigurationsForUserListResp
onse()); | 4968 var resp = convert.JSON.encode(buildManagedConfigurationsForUserListResp
onse()); |
| 4969 return new async.Future.value(stringResponse(200, h, resp)); | 4969 return new async.Future.value(stringResponse(200, h, resp)); |
| 4970 }), true); | 4970 }), true); |
| 4971 res.list(arg_enterpriseId, arg_userId).then(unittest.expectAsync(((api.Man
agedConfigurationsForUserListResponse response) { | 4971 res.list(arg_enterpriseId, arg_userId).then(unittest.expectAsync1(((api.Ma
nagedConfigurationsForUserListResponse response) { |
| 4972 checkManagedConfigurationsForUserListResponse(response); | 4972 checkManagedConfigurationsForUserListResponse(response); |
| 4973 }))); | 4973 }))); |
| 4974 }); | 4974 }); |
| 4975 | 4975 |
| 4976 unittest.test("method--patch", () { | 4976 unittest.test("method--patch", () { |
| 4977 | 4977 |
| 4978 var mock = new HttpServerMock(); | 4978 var mock = new HttpServerMock(); |
| 4979 api.ManagedconfigurationsforuserResourceApi res = new api.Androidenterpris
eApi(mock).managedconfigurationsforuser; | 4979 api.ManagedconfigurationsforuserResourceApi res = new api.Androidenterpris
eApi(mock).managedconfigurationsforuser; |
| 4980 var arg_request = buildManagedConfiguration(); | 4980 var arg_request = buildManagedConfiguration(); |
| 4981 var arg_enterpriseId = "foo"; | 4981 var arg_enterpriseId = "foo"; |
| 4982 var arg_userId = "foo"; | 4982 var arg_userId = "foo"; |
| 4983 var arg_managedConfigurationForUserId = "foo"; | 4983 var arg_managedConfigurationForUserId = "foo"; |
| 4984 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 4984 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 4985 var obj = new api.ManagedConfiguration.fromJson(json); | 4985 var obj = new api.ManagedConfiguration.fromJson(json); |
| 4986 checkManagedConfiguration(obj); | 4986 checkManagedConfiguration(obj); |
| 4987 | 4987 |
| 4988 var path = (req.url).path; | 4988 var path = (req.url).path; |
| 4989 var pathOffset = 0; | 4989 var pathOffset = 0; |
| 4990 var index; | 4990 var index; |
| 4991 var subPart; | 4991 var subPart; |
| 4992 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 4992 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 4993 pathOffset += 1; | 4993 pathOffset += 1; |
| 4994 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq
uals("androidenterprise/v1/")); | 4994 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq
uals("androidenterprise/v1/")); |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5030 } | 5030 } |
| 5031 } | 5031 } |
| 5032 | 5032 |
| 5033 | 5033 |
| 5034 var h = { | 5034 var h = { |
| 5035 "content-type" : "application/json; charset=utf-8", | 5035 "content-type" : "application/json; charset=utf-8", |
| 5036 }; | 5036 }; |
| 5037 var resp = convert.JSON.encode(buildManagedConfiguration()); | 5037 var resp = convert.JSON.encode(buildManagedConfiguration()); |
| 5038 return new async.Future.value(stringResponse(200, h, resp)); | 5038 return new async.Future.value(stringResponse(200, h, resp)); |
| 5039 }), true); | 5039 }), true); |
| 5040 res.patch(arg_request, arg_enterpriseId, arg_userId, arg_managedConfigurat
ionForUserId).then(unittest.expectAsync(((api.ManagedConfiguration response) { | 5040 res.patch(arg_request, arg_enterpriseId, arg_userId, arg_managedConfigurat
ionForUserId).then(unittest.expectAsync1(((api.ManagedConfiguration response) { |
| 5041 checkManagedConfiguration(response); | 5041 checkManagedConfiguration(response); |
| 5042 }))); | 5042 }))); |
| 5043 }); | 5043 }); |
| 5044 | 5044 |
| 5045 unittest.test("method--update", () { | 5045 unittest.test("method--update", () { |
| 5046 | 5046 |
| 5047 var mock = new HttpServerMock(); | 5047 var mock = new HttpServerMock(); |
| 5048 api.ManagedconfigurationsforuserResourceApi res = new api.Androidenterpris
eApi(mock).managedconfigurationsforuser; | 5048 api.ManagedconfigurationsforuserResourceApi res = new api.Androidenterpris
eApi(mock).managedconfigurationsforuser; |
| 5049 var arg_request = buildManagedConfiguration(); | 5049 var arg_request = buildManagedConfiguration(); |
| 5050 var arg_enterpriseId = "foo"; | 5050 var arg_enterpriseId = "foo"; |
| 5051 var arg_userId = "foo"; | 5051 var arg_userId = "foo"; |
| 5052 var arg_managedConfigurationForUserId = "foo"; | 5052 var arg_managedConfigurationForUserId = "foo"; |
| 5053 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 5053 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 5054 var obj = new api.ManagedConfiguration.fromJson(json); | 5054 var obj = new api.ManagedConfiguration.fromJson(json); |
| 5055 checkManagedConfiguration(obj); | 5055 checkManagedConfiguration(obj); |
| 5056 | 5056 |
| 5057 var path = (req.url).path; | 5057 var path = (req.url).path; |
| 5058 var pathOffset = 0; | 5058 var pathOffset = 0; |
| 5059 var index; | 5059 var index; |
| 5060 var subPart; | 5060 var subPart; |
| 5061 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 5061 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 5062 pathOffset += 1; | 5062 pathOffset += 1; |
| 5063 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq
uals("androidenterprise/v1/")); | 5063 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq
uals("androidenterprise/v1/")); |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5099 } | 5099 } |
| 5100 } | 5100 } |
| 5101 | 5101 |
| 5102 | 5102 |
| 5103 var h = { | 5103 var h = { |
| 5104 "content-type" : "application/json; charset=utf-8", | 5104 "content-type" : "application/json; charset=utf-8", |
| 5105 }; | 5105 }; |
| 5106 var resp = convert.JSON.encode(buildManagedConfiguration()); | 5106 var resp = convert.JSON.encode(buildManagedConfiguration()); |
| 5107 return new async.Future.value(stringResponse(200, h, resp)); | 5107 return new async.Future.value(stringResponse(200, h, resp)); |
| 5108 }), true); | 5108 }), true); |
| 5109 res.update(arg_request, arg_enterpriseId, arg_userId, arg_managedConfigura
tionForUserId).then(unittest.expectAsync(((api.ManagedConfiguration response) { | 5109 res.update(arg_request, arg_enterpriseId, arg_userId, arg_managedConfigura
tionForUserId).then(unittest.expectAsync1(((api.ManagedConfiguration response) { |
| 5110 checkManagedConfiguration(response); | 5110 checkManagedConfiguration(response); |
| 5111 }))); | 5111 }))); |
| 5112 }); | 5112 }); |
| 5113 | 5113 |
| 5114 }); | 5114 }); |
| 5115 | 5115 |
| 5116 | 5116 |
| 5117 unittest.group("resource-PermissionsResourceApi", () { | 5117 unittest.group("resource-PermissionsResourceApi", () { |
| 5118 unittest.test("method--get", () { | 5118 unittest.test("method--get", () { |
| 5119 | 5119 |
| 5120 var mock = new HttpServerMock(); | 5120 var mock = new HttpServerMock(); |
| 5121 api.PermissionsResourceApi res = new api.AndroidenterpriseApi(mock).permis
sions; | 5121 api.PermissionsResourceApi res = new api.AndroidenterpriseApi(mock).permis
sions; |
| 5122 var arg_permissionId = "foo"; | 5122 var arg_permissionId = "foo"; |
| 5123 var arg_language = "foo"; | 5123 var arg_language = "foo"; |
| 5124 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 5124 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 5125 var path = (req.url).path; | 5125 var path = (req.url).path; |
| 5126 var pathOffset = 0; | 5126 var pathOffset = 0; |
| 5127 var index; | 5127 var index; |
| 5128 var subPart; | 5128 var subPart; |
| 5129 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 5129 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 5130 pathOffset += 1; | 5130 pathOffset += 1; |
| 5131 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq
uals("androidenterprise/v1/")); | 5131 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq
uals("androidenterprise/v1/")); |
| 5132 pathOffset += 21; | 5132 pathOffset += 21; |
| 5133 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("permissions/")); | 5133 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("permissions/")); |
| 5134 pathOffset += 12; | 5134 pathOffset += 12; |
| (...skipping 19 matching lines...) Expand all Loading... |
| 5154 } | 5154 } |
| 5155 unittest.expect(queryMap["language"].first, unittest.equals(arg_language
)); | 5155 unittest.expect(queryMap["language"].first, unittest.equals(arg_language
)); |
| 5156 | 5156 |
| 5157 | 5157 |
| 5158 var h = { | 5158 var h = { |
| 5159 "content-type" : "application/json; charset=utf-8", | 5159 "content-type" : "application/json; charset=utf-8", |
| 5160 }; | 5160 }; |
| 5161 var resp = convert.JSON.encode(buildPermission()); | 5161 var resp = convert.JSON.encode(buildPermission()); |
| 5162 return new async.Future.value(stringResponse(200, h, resp)); | 5162 return new async.Future.value(stringResponse(200, h, resp)); |
| 5163 }), true); | 5163 }), true); |
| 5164 res.get(arg_permissionId, language: arg_language).then(unittest.expectAsyn
c(((api.Permission response) { | 5164 res.get(arg_permissionId, language: arg_language).then(unittest.expectAsyn
c1(((api.Permission response) { |
| 5165 checkPermission(response); | 5165 checkPermission(response); |
| 5166 }))); | 5166 }))); |
| 5167 }); | 5167 }); |
| 5168 | 5168 |
| 5169 }); | 5169 }); |
| 5170 | 5170 |
| 5171 | 5171 |
| 5172 unittest.group("resource-ProductsResourceApi", () { | 5172 unittest.group("resource-ProductsResourceApi", () { |
| 5173 unittest.test("method--approve", () { | 5173 unittest.test("method--approve", () { |
| 5174 | 5174 |
| 5175 var mock = new HttpServerMock(); | 5175 var mock = new HttpServerMock(); |
| 5176 api.ProductsResourceApi res = new api.AndroidenterpriseApi(mock).products; | 5176 api.ProductsResourceApi res = new api.AndroidenterpriseApi(mock).products; |
| 5177 var arg_request = buildProductsApproveRequest(); | 5177 var arg_request = buildProductsApproveRequest(); |
| 5178 var arg_enterpriseId = "foo"; | 5178 var arg_enterpriseId = "foo"; |
| 5179 var arg_productId = "foo"; | 5179 var arg_productId = "foo"; |
| 5180 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 5180 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 5181 var obj = new api.ProductsApproveRequest.fromJson(json); | 5181 var obj = new api.ProductsApproveRequest.fromJson(json); |
| 5182 checkProductsApproveRequest(obj); | 5182 checkProductsApproveRequest(obj); |
| 5183 | 5183 |
| 5184 var path = (req.url).path; | 5184 var path = (req.url).path; |
| 5185 var pathOffset = 0; | 5185 var pathOffset = 0; |
| 5186 var index; | 5186 var index; |
| 5187 var subPart; | 5187 var subPart; |
| 5188 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 5188 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 5189 pathOffset += 1; | 5189 pathOffset += 1; |
| 5190 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq
uals("androidenterprise/v1/")); | 5190 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq
uals("androidenterprise/v1/")); |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5223 } | 5223 } |
| 5224 } | 5224 } |
| 5225 | 5225 |
| 5226 | 5226 |
| 5227 var h = { | 5227 var h = { |
| 5228 "content-type" : "application/json; charset=utf-8", | 5228 "content-type" : "application/json; charset=utf-8", |
| 5229 }; | 5229 }; |
| 5230 var resp = ""; | 5230 var resp = ""; |
| 5231 return new async.Future.value(stringResponse(200, h, resp)); | 5231 return new async.Future.value(stringResponse(200, h, resp)); |
| 5232 }), true); | 5232 }), true); |
| 5233 res.approve(arg_request, arg_enterpriseId, arg_productId).then(unittest.ex
pectAsync((_) {})); | 5233 res.approve(arg_request, arg_enterpriseId, arg_productId).then(unittest.ex
pectAsync1((_) {})); |
| 5234 }); | 5234 }); |
| 5235 | 5235 |
| 5236 unittest.test("method--generateApprovalUrl", () { | 5236 unittest.test("method--generateApprovalUrl", () { |
| 5237 | 5237 |
| 5238 var mock = new HttpServerMock(); | 5238 var mock = new HttpServerMock(); |
| 5239 api.ProductsResourceApi res = new api.AndroidenterpriseApi(mock).products; | 5239 api.ProductsResourceApi res = new api.AndroidenterpriseApi(mock).products; |
| 5240 var arg_enterpriseId = "foo"; | 5240 var arg_enterpriseId = "foo"; |
| 5241 var arg_productId = "foo"; | 5241 var arg_productId = "foo"; |
| 5242 var arg_languageCode = "foo"; | 5242 var arg_languageCode = "foo"; |
| 5243 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 5243 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 5244 var path = (req.url).path; | 5244 var path = (req.url).path; |
| 5245 var pathOffset = 0; | 5245 var pathOffset = 0; |
| 5246 var index; | 5246 var index; |
| 5247 var subPart; | 5247 var subPart; |
| 5248 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 5248 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 5249 pathOffset += 1; | 5249 pathOffset += 1; |
| 5250 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq
uals("androidenterprise/v1/")); | 5250 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq
uals("androidenterprise/v1/")); |
| 5251 pathOffset += 21; | 5251 pathOffset += 21; |
| 5252 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("enterprises/")); | 5252 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("enterprises/")); |
| 5253 pathOffset += 12; | 5253 pathOffset += 12; |
| (...skipping 30 matching lines...) Expand all Loading... |
| 5284 } | 5284 } |
| 5285 unittest.expect(queryMap["languageCode"].first, unittest.equals(arg_lang
uageCode)); | 5285 unittest.expect(queryMap["languageCode"].first, unittest.equals(arg_lang
uageCode)); |
| 5286 | 5286 |
| 5287 | 5287 |
| 5288 var h = { | 5288 var h = { |
| 5289 "content-type" : "application/json; charset=utf-8", | 5289 "content-type" : "application/json; charset=utf-8", |
| 5290 }; | 5290 }; |
| 5291 var resp = convert.JSON.encode(buildProductsGenerateApprovalUrlResponse(
)); | 5291 var resp = convert.JSON.encode(buildProductsGenerateApprovalUrlResponse(
)); |
| 5292 return new async.Future.value(stringResponse(200, h, resp)); | 5292 return new async.Future.value(stringResponse(200, h, resp)); |
| 5293 }), true); | 5293 }), true); |
| 5294 res.generateApprovalUrl(arg_enterpriseId, arg_productId, languageCode: arg
_languageCode).then(unittest.expectAsync(((api.ProductsGenerateApprovalUrlRespon
se response) { | 5294 res.generateApprovalUrl(arg_enterpriseId, arg_productId, languageCode: arg
_languageCode).then(unittest.expectAsync1(((api.ProductsGenerateApprovalUrlRespo
nse response) { |
| 5295 checkProductsGenerateApprovalUrlResponse(response); | 5295 checkProductsGenerateApprovalUrlResponse(response); |
| 5296 }))); | 5296 }))); |
| 5297 }); | 5297 }); |
| 5298 | 5298 |
| 5299 unittest.test("method--get", () { | 5299 unittest.test("method--get", () { |
| 5300 | 5300 |
| 5301 var mock = new HttpServerMock(); | 5301 var mock = new HttpServerMock(); |
| 5302 api.ProductsResourceApi res = new api.AndroidenterpriseApi(mock).products; | 5302 api.ProductsResourceApi res = new api.AndroidenterpriseApi(mock).products; |
| 5303 var arg_enterpriseId = "foo"; | 5303 var arg_enterpriseId = "foo"; |
| 5304 var arg_productId = "foo"; | 5304 var arg_productId = "foo"; |
| 5305 var arg_language = "foo"; | 5305 var arg_language = "foo"; |
| 5306 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 5306 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 5307 var path = (req.url).path; | 5307 var path = (req.url).path; |
| 5308 var pathOffset = 0; | 5308 var pathOffset = 0; |
| 5309 var index; | 5309 var index; |
| 5310 var subPart; | 5310 var subPart; |
| 5311 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 5311 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 5312 pathOffset += 1; | 5312 pathOffset += 1; |
| 5313 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq
uals("androidenterprise/v1/")); | 5313 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq
uals("androidenterprise/v1/")); |
| 5314 pathOffset += 21; | 5314 pathOffset += 21; |
| 5315 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("enterprises/")); | 5315 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("enterprises/")); |
| 5316 pathOffset += 12; | 5316 pathOffset += 12; |
| (...skipping 26 matching lines...) Expand all Loading... |
| 5343 } | 5343 } |
| 5344 unittest.expect(queryMap["language"].first, unittest.equals(arg_language
)); | 5344 unittest.expect(queryMap["language"].first, unittest.equals(arg_language
)); |
| 5345 | 5345 |
| 5346 | 5346 |
| 5347 var h = { | 5347 var h = { |
| 5348 "content-type" : "application/json; charset=utf-8", | 5348 "content-type" : "application/json; charset=utf-8", |
| 5349 }; | 5349 }; |
| 5350 var resp = convert.JSON.encode(buildProduct()); | 5350 var resp = convert.JSON.encode(buildProduct()); |
| 5351 return new async.Future.value(stringResponse(200, h, resp)); | 5351 return new async.Future.value(stringResponse(200, h, resp)); |
| 5352 }), true); | 5352 }), true); |
| 5353 res.get(arg_enterpriseId, arg_productId, language: arg_language).then(unit
test.expectAsync(((api.Product response) { | 5353 res.get(arg_enterpriseId, arg_productId, language: arg_language).then(unit
test.expectAsync1(((api.Product response) { |
| 5354 checkProduct(response); | 5354 checkProduct(response); |
| 5355 }))); | 5355 }))); |
| 5356 }); | 5356 }); |
| 5357 | 5357 |
| 5358 unittest.test("method--getAppRestrictionsSchema", () { | 5358 unittest.test("method--getAppRestrictionsSchema", () { |
| 5359 | 5359 |
| 5360 var mock = new HttpServerMock(); | 5360 var mock = new HttpServerMock(); |
| 5361 api.ProductsResourceApi res = new api.AndroidenterpriseApi(mock).products; | 5361 api.ProductsResourceApi res = new api.AndroidenterpriseApi(mock).products; |
| 5362 var arg_enterpriseId = "foo"; | 5362 var arg_enterpriseId = "foo"; |
| 5363 var arg_productId = "foo"; | 5363 var arg_productId = "foo"; |
| 5364 var arg_language = "foo"; | 5364 var arg_language = "foo"; |
| 5365 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 5365 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 5366 var path = (req.url).path; | 5366 var path = (req.url).path; |
| 5367 var pathOffset = 0; | 5367 var pathOffset = 0; |
| 5368 var index; | 5368 var index; |
| 5369 var subPart; | 5369 var subPart; |
| 5370 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 5370 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 5371 pathOffset += 1; | 5371 pathOffset += 1; |
| 5372 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq
uals("androidenterprise/v1/")); | 5372 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq
uals("androidenterprise/v1/")); |
| 5373 pathOffset += 21; | 5373 pathOffset += 21; |
| 5374 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("enterprises/")); | 5374 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("enterprises/")); |
| 5375 pathOffset += 12; | 5375 pathOffset += 12; |
| (...skipping 30 matching lines...) Expand all Loading... |
| 5406 } | 5406 } |
| 5407 unittest.expect(queryMap["language"].first, unittest.equals(arg_language
)); | 5407 unittest.expect(queryMap["language"].first, unittest.equals(arg_language
)); |
| 5408 | 5408 |
| 5409 | 5409 |
| 5410 var h = { | 5410 var h = { |
| 5411 "content-type" : "application/json; charset=utf-8", | 5411 "content-type" : "application/json; charset=utf-8", |
| 5412 }; | 5412 }; |
| 5413 var resp = convert.JSON.encode(buildAppRestrictionsSchema()); | 5413 var resp = convert.JSON.encode(buildAppRestrictionsSchema()); |
| 5414 return new async.Future.value(stringResponse(200, h, resp)); | 5414 return new async.Future.value(stringResponse(200, h, resp)); |
| 5415 }), true); | 5415 }), true); |
| 5416 res.getAppRestrictionsSchema(arg_enterpriseId, arg_productId, language: ar
g_language).then(unittest.expectAsync(((api.AppRestrictionsSchema response) { | 5416 res.getAppRestrictionsSchema(arg_enterpriseId, arg_productId, language: ar
g_language).then(unittest.expectAsync1(((api.AppRestrictionsSchema response) { |
| 5417 checkAppRestrictionsSchema(response); | 5417 checkAppRestrictionsSchema(response); |
| 5418 }))); | 5418 }))); |
| 5419 }); | 5419 }); |
| 5420 | 5420 |
| 5421 unittest.test("method--getPermissions", () { | 5421 unittest.test("method--getPermissions", () { |
| 5422 | 5422 |
| 5423 var mock = new HttpServerMock(); | 5423 var mock = new HttpServerMock(); |
| 5424 api.ProductsResourceApi res = new api.AndroidenterpriseApi(mock).products; | 5424 api.ProductsResourceApi res = new api.AndroidenterpriseApi(mock).products; |
| 5425 var arg_enterpriseId = "foo"; | 5425 var arg_enterpriseId = "foo"; |
| 5426 var arg_productId = "foo"; | 5426 var arg_productId = "foo"; |
| 5427 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 5427 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 5428 var path = (req.url).path; | 5428 var path = (req.url).path; |
| 5429 var pathOffset = 0; | 5429 var pathOffset = 0; |
| 5430 var index; | 5430 var index; |
| 5431 var subPart; | 5431 var subPart; |
| 5432 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 5432 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 5433 pathOffset += 1; | 5433 pathOffset += 1; |
| 5434 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq
uals("androidenterprise/v1/")); | 5434 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq
uals("androidenterprise/v1/")); |
| 5435 pathOffset += 21; | 5435 pathOffset += 21; |
| 5436 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("enterprises/")); | 5436 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("enterprises/")); |
| 5437 pathOffset += 12; | 5437 pathOffset += 12; |
| (...skipping 29 matching lines...) Expand all Loading... |
| 5467 } | 5467 } |
| 5468 } | 5468 } |
| 5469 | 5469 |
| 5470 | 5470 |
| 5471 var h = { | 5471 var h = { |
| 5472 "content-type" : "application/json; charset=utf-8", | 5472 "content-type" : "application/json; charset=utf-8", |
| 5473 }; | 5473 }; |
| 5474 var resp = convert.JSON.encode(buildProductPermissions()); | 5474 var resp = convert.JSON.encode(buildProductPermissions()); |
| 5475 return new async.Future.value(stringResponse(200, h, resp)); | 5475 return new async.Future.value(stringResponse(200, h, resp)); |
| 5476 }), true); | 5476 }), true); |
| 5477 res.getPermissions(arg_enterpriseId, arg_productId).then(unittest.expectAs
ync(((api.ProductPermissions response) { | 5477 res.getPermissions(arg_enterpriseId, arg_productId).then(unittest.expectAs
ync1(((api.ProductPermissions response) { |
| 5478 checkProductPermissions(response); | 5478 checkProductPermissions(response); |
| 5479 }))); | 5479 }))); |
| 5480 }); | 5480 }); |
| 5481 | 5481 |
| 5482 unittest.test("method--list", () { | 5482 unittest.test("method--list", () { |
| 5483 | 5483 |
| 5484 var mock = new HttpServerMock(); | 5484 var mock = new HttpServerMock(); |
| 5485 api.ProductsResourceApi res = new api.AndroidenterpriseApi(mock).products; | 5485 api.ProductsResourceApi res = new api.AndroidenterpriseApi(mock).products; |
| 5486 var arg_enterpriseId = "foo"; | 5486 var arg_enterpriseId = "foo"; |
| 5487 var arg_approved = true; | 5487 var arg_approved = true; |
| 5488 var arg_language = "foo"; | 5488 var arg_language = "foo"; |
| 5489 var arg_maxResults = 42; | 5489 var arg_maxResults = 42; |
| 5490 var arg_query = "foo"; | 5490 var arg_query = "foo"; |
| 5491 var arg_token = "foo"; | 5491 var arg_token = "foo"; |
| 5492 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 5492 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 5493 var path = (req.url).path; | 5493 var path = (req.url).path; |
| 5494 var pathOffset = 0; | 5494 var pathOffset = 0; |
| 5495 var index; | 5495 var index; |
| 5496 var subPart; | 5496 var subPart; |
| 5497 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 5497 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 5498 pathOffset += 1; | 5498 pathOffset += 1; |
| 5499 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq
uals("androidenterprise/v1/")); | 5499 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq
uals("androidenterprise/v1/")); |
| 5500 pathOffset += 21; | 5500 pathOffset += 21; |
| 5501 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("enterprises/")); | 5501 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("enterprises/")); |
| 5502 pathOffset += 12; | 5502 pathOffset += 12; |
| (...skipping 27 matching lines...) Expand all Loading... |
| 5530 unittest.expect(queryMap["query"].first, unittest.equals(arg_query)); | 5530 unittest.expect(queryMap["query"].first, unittest.equals(arg_query)); |
| 5531 unittest.expect(queryMap["token"].first, unittest.equals(arg_token)); | 5531 unittest.expect(queryMap["token"].first, unittest.equals(arg_token)); |
| 5532 | 5532 |
| 5533 | 5533 |
| 5534 var h = { | 5534 var h = { |
| 5535 "content-type" : "application/json; charset=utf-8", | 5535 "content-type" : "application/json; charset=utf-8", |
| 5536 }; | 5536 }; |
| 5537 var resp = convert.JSON.encode(buildProductsListResponse()); | 5537 var resp = convert.JSON.encode(buildProductsListResponse()); |
| 5538 return new async.Future.value(stringResponse(200, h, resp)); | 5538 return new async.Future.value(stringResponse(200, h, resp)); |
| 5539 }), true); | 5539 }), true); |
| 5540 res.list(arg_enterpriseId, approved: arg_approved, language: arg_language,
maxResults: arg_maxResults, query: arg_query, token: arg_token).then(unittest.e
xpectAsync(((api.ProductsListResponse response) { | 5540 res.list(arg_enterpriseId, approved: arg_approved, language: arg_language,
maxResults: arg_maxResults, query: arg_query, token: arg_token).then(unittest.e
xpectAsync1(((api.ProductsListResponse response) { |
| 5541 checkProductsListResponse(response); | 5541 checkProductsListResponse(response); |
| 5542 }))); | 5542 }))); |
| 5543 }); | 5543 }); |
| 5544 | 5544 |
| 5545 unittest.test("method--unapprove", () { | 5545 unittest.test("method--unapprove", () { |
| 5546 | 5546 |
| 5547 var mock = new HttpServerMock(); | 5547 var mock = new HttpServerMock(); |
| 5548 api.ProductsResourceApi res = new api.AndroidenterpriseApi(mock).products; | 5548 api.ProductsResourceApi res = new api.AndroidenterpriseApi(mock).products; |
| 5549 var arg_enterpriseId = "foo"; | 5549 var arg_enterpriseId = "foo"; |
| 5550 var arg_productId = "foo"; | 5550 var arg_productId = "foo"; |
| 5551 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 5551 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 5552 var path = (req.url).path; | 5552 var path = (req.url).path; |
| 5553 var pathOffset = 0; | 5553 var pathOffset = 0; |
| 5554 var index; | 5554 var index; |
| 5555 var subPart; | 5555 var subPart; |
| 5556 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 5556 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 5557 pathOffset += 1; | 5557 pathOffset += 1; |
| 5558 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq
uals("androidenterprise/v1/")); | 5558 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq
uals("androidenterprise/v1/")); |
| 5559 pathOffset += 21; | 5559 pathOffset += 21; |
| 5560 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("enterprises/")); | 5560 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("enterprises/")); |
| 5561 pathOffset += 12; | 5561 pathOffset += 12; |
| (...skipping 29 matching lines...) Expand all Loading... |
| 5591 } | 5591 } |
| 5592 } | 5592 } |
| 5593 | 5593 |
| 5594 | 5594 |
| 5595 var h = { | 5595 var h = { |
| 5596 "content-type" : "application/json; charset=utf-8", | 5596 "content-type" : "application/json; charset=utf-8", |
| 5597 }; | 5597 }; |
| 5598 var resp = ""; | 5598 var resp = ""; |
| 5599 return new async.Future.value(stringResponse(200, h, resp)); | 5599 return new async.Future.value(stringResponse(200, h, resp)); |
| 5600 }), true); | 5600 }), true); |
| 5601 res.unapprove(arg_enterpriseId, arg_productId).then(unittest.expectAsync((
_) {})); | 5601 res.unapprove(arg_enterpriseId, arg_productId).then(unittest.expectAsync1(
(_) {})); |
| 5602 }); | 5602 }); |
| 5603 | 5603 |
| 5604 }); | 5604 }); |
| 5605 | 5605 |
| 5606 | 5606 |
| 5607 unittest.group("resource-ServiceaccountkeysResourceApi", () { | 5607 unittest.group("resource-ServiceaccountkeysResourceApi", () { |
| 5608 unittest.test("method--delete", () { | 5608 unittest.test("method--delete", () { |
| 5609 | 5609 |
| 5610 var mock = new HttpServerMock(); | 5610 var mock = new HttpServerMock(); |
| 5611 api.ServiceaccountkeysResourceApi res = new api.AndroidenterpriseApi(mock)
.serviceaccountkeys; | 5611 api.ServiceaccountkeysResourceApi res = new api.AndroidenterpriseApi(mock)
.serviceaccountkeys; |
| 5612 var arg_enterpriseId = "foo"; | 5612 var arg_enterpriseId = "foo"; |
| 5613 var arg_keyId = "foo"; | 5613 var arg_keyId = "foo"; |
| 5614 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 5614 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 5615 var path = (req.url).path; | 5615 var path = (req.url).path; |
| 5616 var pathOffset = 0; | 5616 var pathOffset = 0; |
| 5617 var index; | 5617 var index; |
| 5618 var subPart; | 5618 var subPart; |
| 5619 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 5619 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 5620 pathOffset += 1; | 5620 pathOffset += 1; |
| 5621 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq
uals("androidenterprise/v1/")); | 5621 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq
uals("androidenterprise/v1/")); |
| 5622 pathOffset += 21; | 5622 pathOffset += 21; |
| 5623 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("enterprises/")); | 5623 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("enterprises/")); |
| 5624 pathOffset += 12; | 5624 pathOffset += 12; |
| (...skipping 25 matching lines...) Expand all Loading... |
| 5650 } | 5650 } |
| 5651 } | 5651 } |
| 5652 | 5652 |
| 5653 | 5653 |
| 5654 var h = { | 5654 var h = { |
| 5655 "content-type" : "application/json; charset=utf-8", | 5655 "content-type" : "application/json; charset=utf-8", |
| 5656 }; | 5656 }; |
| 5657 var resp = ""; | 5657 var resp = ""; |
| 5658 return new async.Future.value(stringResponse(200, h, resp)); | 5658 return new async.Future.value(stringResponse(200, h, resp)); |
| 5659 }), true); | 5659 }), true); |
| 5660 res.delete(arg_enterpriseId, arg_keyId).then(unittest.expectAsync((_) {}))
; | 5660 res.delete(arg_enterpriseId, arg_keyId).then(unittest.expectAsync1((_) {})
); |
| 5661 }); | 5661 }); |
| 5662 | 5662 |
| 5663 unittest.test("method--insert", () { | 5663 unittest.test("method--insert", () { |
| 5664 | 5664 |
| 5665 var mock = new HttpServerMock(); | 5665 var mock = new HttpServerMock(); |
| 5666 api.ServiceaccountkeysResourceApi res = new api.AndroidenterpriseApi(mock)
.serviceaccountkeys; | 5666 api.ServiceaccountkeysResourceApi res = new api.AndroidenterpriseApi(mock)
.serviceaccountkeys; |
| 5667 var arg_request = buildServiceAccountKey(); | 5667 var arg_request = buildServiceAccountKey(); |
| 5668 var arg_enterpriseId = "foo"; | 5668 var arg_enterpriseId = "foo"; |
| 5669 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 5669 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 5670 var obj = new api.ServiceAccountKey.fromJson(json); | 5670 var obj = new api.ServiceAccountKey.fromJson(json); |
| 5671 checkServiceAccountKey(obj); | 5671 checkServiceAccountKey(obj); |
| 5672 | 5672 |
| 5673 var path = (req.url).path; | 5673 var path = (req.url).path; |
| 5674 var pathOffset = 0; | 5674 var pathOffset = 0; |
| 5675 var index; | 5675 var index; |
| 5676 var subPart; | 5676 var subPart; |
| 5677 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 5677 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 5678 pathOffset += 1; | 5678 pathOffset += 1; |
| 5679 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq
uals("androidenterprise/v1/")); | 5679 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq
uals("androidenterprise/v1/")); |
| (...skipping 25 matching lines...) Expand all Loading... |
| 5705 } | 5705 } |
| 5706 } | 5706 } |
| 5707 | 5707 |
| 5708 | 5708 |
| 5709 var h = { | 5709 var h = { |
| 5710 "content-type" : "application/json; charset=utf-8", | 5710 "content-type" : "application/json; charset=utf-8", |
| 5711 }; | 5711 }; |
| 5712 var resp = convert.JSON.encode(buildServiceAccountKey()); | 5712 var resp = convert.JSON.encode(buildServiceAccountKey()); |
| 5713 return new async.Future.value(stringResponse(200, h, resp)); | 5713 return new async.Future.value(stringResponse(200, h, resp)); |
| 5714 }), true); | 5714 }), true); |
| 5715 res.insert(arg_request, arg_enterpriseId).then(unittest.expectAsync(((api.
ServiceAccountKey response) { | 5715 res.insert(arg_request, arg_enterpriseId).then(unittest.expectAsync1(((api
.ServiceAccountKey response) { |
| 5716 checkServiceAccountKey(response); | 5716 checkServiceAccountKey(response); |
| 5717 }))); | 5717 }))); |
| 5718 }); | 5718 }); |
| 5719 | 5719 |
| 5720 unittest.test("method--list", () { | 5720 unittest.test("method--list", () { |
| 5721 | 5721 |
| 5722 var mock = new HttpServerMock(); | 5722 var mock = new HttpServerMock(); |
| 5723 api.ServiceaccountkeysResourceApi res = new api.AndroidenterpriseApi(mock)
.serviceaccountkeys; | 5723 api.ServiceaccountkeysResourceApi res = new api.AndroidenterpriseApi(mock)
.serviceaccountkeys; |
| 5724 var arg_enterpriseId = "foo"; | 5724 var arg_enterpriseId = "foo"; |
| 5725 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 5725 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 5726 var path = (req.url).path; | 5726 var path = (req.url).path; |
| 5727 var pathOffset = 0; | 5727 var pathOffset = 0; |
| 5728 var index; | 5728 var index; |
| 5729 var subPart; | 5729 var subPart; |
| 5730 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 5730 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 5731 pathOffset += 1; | 5731 pathOffset += 1; |
| 5732 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq
uals("androidenterprise/v1/")); | 5732 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq
uals("androidenterprise/v1/")); |
| 5733 pathOffset += 21; | 5733 pathOffset += 21; |
| 5734 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("enterprises/")); | 5734 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("enterprises/")); |
| 5735 pathOffset += 12; | 5735 pathOffset += 12; |
| (...skipping 22 matching lines...) Expand all Loading... |
| 5758 } | 5758 } |
| 5759 } | 5759 } |
| 5760 | 5760 |
| 5761 | 5761 |
| 5762 var h = { | 5762 var h = { |
| 5763 "content-type" : "application/json; charset=utf-8", | 5763 "content-type" : "application/json; charset=utf-8", |
| 5764 }; | 5764 }; |
| 5765 var resp = convert.JSON.encode(buildServiceAccountKeysListResponse()); | 5765 var resp = convert.JSON.encode(buildServiceAccountKeysListResponse()); |
| 5766 return new async.Future.value(stringResponse(200, h, resp)); | 5766 return new async.Future.value(stringResponse(200, h, resp)); |
| 5767 }), true); | 5767 }), true); |
| 5768 res.list(arg_enterpriseId).then(unittest.expectAsync(((api.ServiceAccountK
eysListResponse response) { | 5768 res.list(arg_enterpriseId).then(unittest.expectAsync1(((api.ServiceAccount
KeysListResponse response) { |
| 5769 checkServiceAccountKeysListResponse(response); | 5769 checkServiceAccountKeysListResponse(response); |
| 5770 }))); | 5770 }))); |
| 5771 }); | 5771 }); |
| 5772 | 5772 |
| 5773 }); | 5773 }); |
| 5774 | 5774 |
| 5775 | 5775 |
| 5776 unittest.group("resource-StorelayoutclustersResourceApi", () { | 5776 unittest.group("resource-StorelayoutclustersResourceApi", () { |
| 5777 unittest.test("method--delete", () { | 5777 unittest.test("method--delete", () { |
| 5778 | 5778 |
| 5779 var mock = new HttpServerMock(); | 5779 var mock = new HttpServerMock(); |
| 5780 api.StorelayoutclustersResourceApi res = new api.AndroidenterpriseApi(mock
).storelayoutclusters; | 5780 api.StorelayoutclustersResourceApi res = new api.AndroidenterpriseApi(mock
).storelayoutclusters; |
| 5781 var arg_enterpriseId = "foo"; | 5781 var arg_enterpriseId = "foo"; |
| 5782 var arg_pageId = "foo"; | 5782 var arg_pageId = "foo"; |
| 5783 var arg_clusterId = "foo"; | 5783 var arg_clusterId = "foo"; |
| 5784 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 5784 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 5785 var path = (req.url).path; | 5785 var path = (req.url).path; |
| 5786 var pathOffset = 0; | 5786 var pathOffset = 0; |
| 5787 var index; | 5787 var index; |
| 5788 var subPart; | 5788 var subPart; |
| 5789 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 5789 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 5790 pathOffset += 1; | 5790 pathOffset += 1; |
| 5791 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq
uals("androidenterprise/v1/")); | 5791 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq
uals("androidenterprise/v1/")); |
| 5792 pathOffset += 21; | 5792 pathOffset += 21; |
| 5793 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("enterprises/")); | 5793 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("enterprises/")); |
| 5794 pathOffset += 12; | 5794 pathOffset += 12; |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5827 } | 5827 } |
| 5828 } | 5828 } |
| 5829 | 5829 |
| 5830 | 5830 |
| 5831 var h = { | 5831 var h = { |
| 5832 "content-type" : "application/json; charset=utf-8", | 5832 "content-type" : "application/json; charset=utf-8", |
| 5833 }; | 5833 }; |
| 5834 var resp = ""; | 5834 var resp = ""; |
| 5835 return new async.Future.value(stringResponse(200, h, resp)); | 5835 return new async.Future.value(stringResponse(200, h, resp)); |
| 5836 }), true); | 5836 }), true); |
| 5837 res.delete(arg_enterpriseId, arg_pageId, arg_clusterId).then(unittest.expe
ctAsync((_) {})); | 5837 res.delete(arg_enterpriseId, arg_pageId, arg_clusterId).then(unittest.expe
ctAsync1((_) {})); |
| 5838 }); | 5838 }); |
| 5839 | 5839 |
| 5840 unittest.test("method--get", () { | 5840 unittest.test("method--get", () { |
| 5841 | 5841 |
| 5842 var mock = new HttpServerMock(); | 5842 var mock = new HttpServerMock(); |
| 5843 api.StorelayoutclustersResourceApi res = new api.AndroidenterpriseApi(mock
).storelayoutclusters; | 5843 api.StorelayoutclustersResourceApi res = new api.AndroidenterpriseApi(mock
).storelayoutclusters; |
| 5844 var arg_enterpriseId = "foo"; | 5844 var arg_enterpriseId = "foo"; |
| 5845 var arg_pageId = "foo"; | 5845 var arg_pageId = "foo"; |
| 5846 var arg_clusterId = "foo"; | 5846 var arg_clusterId = "foo"; |
| 5847 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 5847 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 5848 var path = (req.url).path; | 5848 var path = (req.url).path; |
| 5849 var pathOffset = 0; | 5849 var pathOffset = 0; |
| 5850 var index; | 5850 var index; |
| 5851 var subPart; | 5851 var subPart; |
| 5852 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 5852 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 5853 pathOffset += 1; | 5853 pathOffset += 1; |
| 5854 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq
uals("androidenterprise/v1/")); | 5854 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq
uals("androidenterprise/v1/")); |
| 5855 pathOffset += 21; | 5855 pathOffset += 21; |
| 5856 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("enterprises/")); | 5856 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("enterprises/")); |
| 5857 pathOffset += 12; | 5857 pathOffset += 12; |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5890 } | 5890 } |
| 5891 } | 5891 } |
| 5892 | 5892 |
| 5893 | 5893 |
| 5894 var h = { | 5894 var h = { |
| 5895 "content-type" : "application/json; charset=utf-8", | 5895 "content-type" : "application/json; charset=utf-8", |
| 5896 }; | 5896 }; |
| 5897 var resp = convert.JSON.encode(buildStoreCluster()); | 5897 var resp = convert.JSON.encode(buildStoreCluster()); |
| 5898 return new async.Future.value(stringResponse(200, h, resp)); | 5898 return new async.Future.value(stringResponse(200, h, resp)); |
| 5899 }), true); | 5899 }), true); |
| 5900 res.get(arg_enterpriseId, arg_pageId, arg_clusterId).then(unittest.expectA
sync(((api.StoreCluster response) { | 5900 res.get(arg_enterpriseId, arg_pageId, arg_clusterId).then(unittest.expectA
sync1(((api.StoreCluster response) { |
| 5901 checkStoreCluster(response); | 5901 checkStoreCluster(response); |
| 5902 }))); | 5902 }))); |
| 5903 }); | 5903 }); |
| 5904 | 5904 |
| 5905 unittest.test("method--insert", () { | 5905 unittest.test("method--insert", () { |
| 5906 | 5906 |
| 5907 var mock = new HttpServerMock(); | 5907 var mock = new HttpServerMock(); |
| 5908 api.StorelayoutclustersResourceApi res = new api.AndroidenterpriseApi(mock
).storelayoutclusters; | 5908 api.StorelayoutclustersResourceApi res = new api.AndroidenterpriseApi(mock
).storelayoutclusters; |
| 5909 var arg_request = buildStoreCluster(); | 5909 var arg_request = buildStoreCluster(); |
| 5910 var arg_enterpriseId = "foo"; | 5910 var arg_enterpriseId = "foo"; |
| 5911 var arg_pageId = "foo"; | 5911 var arg_pageId = "foo"; |
| 5912 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 5912 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 5913 var obj = new api.StoreCluster.fromJson(json); | 5913 var obj = new api.StoreCluster.fromJson(json); |
| 5914 checkStoreCluster(obj); | 5914 checkStoreCluster(obj); |
| 5915 | 5915 |
| 5916 var path = (req.url).path; | 5916 var path = (req.url).path; |
| 5917 var pathOffset = 0; | 5917 var pathOffset = 0; |
| 5918 var index; | 5918 var index; |
| 5919 var subPart; | 5919 var subPart; |
| 5920 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 5920 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 5921 pathOffset += 1; | 5921 pathOffset += 1; |
| 5922 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq
uals("androidenterprise/v1/")); | 5922 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq
uals("androidenterprise/v1/")); |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5955 } | 5955 } |
| 5956 } | 5956 } |
| 5957 | 5957 |
| 5958 | 5958 |
| 5959 var h = { | 5959 var h = { |
| 5960 "content-type" : "application/json; charset=utf-8", | 5960 "content-type" : "application/json; charset=utf-8", |
| 5961 }; | 5961 }; |
| 5962 var resp = convert.JSON.encode(buildStoreCluster()); | 5962 var resp = convert.JSON.encode(buildStoreCluster()); |
| 5963 return new async.Future.value(stringResponse(200, h, resp)); | 5963 return new async.Future.value(stringResponse(200, h, resp)); |
| 5964 }), true); | 5964 }), true); |
| 5965 res.insert(arg_request, arg_enterpriseId, arg_pageId).then(unittest.expect
Async(((api.StoreCluster response) { | 5965 res.insert(arg_request, arg_enterpriseId, arg_pageId).then(unittest.expect
Async1(((api.StoreCluster response) { |
| 5966 checkStoreCluster(response); | 5966 checkStoreCluster(response); |
| 5967 }))); | 5967 }))); |
| 5968 }); | 5968 }); |
| 5969 | 5969 |
| 5970 unittest.test("method--list", () { | 5970 unittest.test("method--list", () { |
| 5971 | 5971 |
| 5972 var mock = new HttpServerMock(); | 5972 var mock = new HttpServerMock(); |
| 5973 api.StorelayoutclustersResourceApi res = new api.AndroidenterpriseApi(mock
).storelayoutclusters; | 5973 api.StorelayoutclustersResourceApi res = new api.AndroidenterpriseApi(mock
).storelayoutclusters; |
| 5974 var arg_enterpriseId = "foo"; | 5974 var arg_enterpriseId = "foo"; |
| 5975 var arg_pageId = "foo"; | 5975 var arg_pageId = "foo"; |
| 5976 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 5976 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 5977 var path = (req.url).path; | 5977 var path = (req.url).path; |
| 5978 var pathOffset = 0; | 5978 var pathOffset = 0; |
| 5979 var index; | 5979 var index; |
| 5980 var subPart; | 5980 var subPart; |
| 5981 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 5981 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 5982 pathOffset += 1; | 5982 pathOffset += 1; |
| 5983 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq
uals("androidenterprise/v1/")); | 5983 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq
uals("androidenterprise/v1/")); |
| 5984 pathOffset += 21; | 5984 pathOffset += 21; |
| 5985 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("enterprises/")); | 5985 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("enterprises/")); |
| 5986 pathOffset += 12; | 5986 pathOffset += 12; |
| (...skipping 29 matching lines...) Expand all Loading... |
| 6016 } | 6016 } |
| 6017 } | 6017 } |
| 6018 | 6018 |
| 6019 | 6019 |
| 6020 var h = { | 6020 var h = { |
| 6021 "content-type" : "application/json; charset=utf-8", | 6021 "content-type" : "application/json; charset=utf-8", |
| 6022 }; | 6022 }; |
| 6023 var resp = convert.JSON.encode(buildStoreLayoutClustersListResponse()); | 6023 var resp = convert.JSON.encode(buildStoreLayoutClustersListResponse()); |
| 6024 return new async.Future.value(stringResponse(200, h, resp)); | 6024 return new async.Future.value(stringResponse(200, h, resp)); |
| 6025 }), true); | 6025 }), true); |
| 6026 res.list(arg_enterpriseId, arg_pageId).then(unittest.expectAsync(((api.Sto
reLayoutClustersListResponse response) { | 6026 res.list(arg_enterpriseId, arg_pageId).then(unittest.expectAsync1(((api.St
oreLayoutClustersListResponse response) { |
| 6027 checkStoreLayoutClustersListResponse(response); | 6027 checkStoreLayoutClustersListResponse(response); |
| 6028 }))); | 6028 }))); |
| 6029 }); | 6029 }); |
| 6030 | 6030 |
| 6031 unittest.test("method--patch", () { | 6031 unittest.test("method--patch", () { |
| 6032 | 6032 |
| 6033 var mock = new HttpServerMock(); | 6033 var mock = new HttpServerMock(); |
| 6034 api.StorelayoutclustersResourceApi res = new api.AndroidenterpriseApi(mock
).storelayoutclusters; | 6034 api.StorelayoutclustersResourceApi res = new api.AndroidenterpriseApi(mock
).storelayoutclusters; |
| 6035 var arg_request = buildStoreCluster(); | 6035 var arg_request = buildStoreCluster(); |
| 6036 var arg_enterpriseId = "foo"; | 6036 var arg_enterpriseId = "foo"; |
| 6037 var arg_pageId = "foo"; | 6037 var arg_pageId = "foo"; |
| 6038 var arg_clusterId = "foo"; | 6038 var arg_clusterId = "foo"; |
| 6039 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 6039 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 6040 var obj = new api.StoreCluster.fromJson(json); | 6040 var obj = new api.StoreCluster.fromJson(json); |
| 6041 checkStoreCluster(obj); | 6041 checkStoreCluster(obj); |
| 6042 | 6042 |
| 6043 var path = (req.url).path; | 6043 var path = (req.url).path; |
| 6044 var pathOffset = 0; | 6044 var pathOffset = 0; |
| 6045 var index; | 6045 var index; |
| 6046 var subPart; | 6046 var subPart; |
| 6047 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 6047 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 6048 pathOffset += 1; | 6048 pathOffset += 1; |
| 6049 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq
uals("androidenterprise/v1/")); | 6049 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq
uals("androidenterprise/v1/")); |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6085 } | 6085 } |
| 6086 } | 6086 } |
| 6087 | 6087 |
| 6088 | 6088 |
| 6089 var h = { | 6089 var h = { |
| 6090 "content-type" : "application/json; charset=utf-8", | 6090 "content-type" : "application/json; charset=utf-8", |
| 6091 }; | 6091 }; |
| 6092 var resp = convert.JSON.encode(buildStoreCluster()); | 6092 var resp = convert.JSON.encode(buildStoreCluster()); |
| 6093 return new async.Future.value(stringResponse(200, h, resp)); | 6093 return new async.Future.value(stringResponse(200, h, resp)); |
| 6094 }), true); | 6094 }), true); |
| 6095 res.patch(arg_request, arg_enterpriseId, arg_pageId, arg_clusterId).then(u
nittest.expectAsync(((api.StoreCluster response) { | 6095 res.patch(arg_request, arg_enterpriseId, arg_pageId, arg_clusterId).then(u
nittest.expectAsync1(((api.StoreCluster response) { |
| 6096 checkStoreCluster(response); | 6096 checkStoreCluster(response); |
| 6097 }))); | 6097 }))); |
| 6098 }); | 6098 }); |
| 6099 | 6099 |
| 6100 unittest.test("method--update", () { | 6100 unittest.test("method--update", () { |
| 6101 | 6101 |
| 6102 var mock = new HttpServerMock(); | 6102 var mock = new HttpServerMock(); |
| 6103 api.StorelayoutclustersResourceApi res = new api.AndroidenterpriseApi(mock
).storelayoutclusters; | 6103 api.StorelayoutclustersResourceApi res = new api.AndroidenterpriseApi(mock
).storelayoutclusters; |
| 6104 var arg_request = buildStoreCluster(); | 6104 var arg_request = buildStoreCluster(); |
| 6105 var arg_enterpriseId = "foo"; | 6105 var arg_enterpriseId = "foo"; |
| 6106 var arg_pageId = "foo"; | 6106 var arg_pageId = "foo"; |
| 6107 var arg_clusterId = "foo"; | 6107 var arg_clusterId = "foo"; |
| 6108 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 6108 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 6109 var obj = new api.StoreCluster.fromJson(json); | 6109 var obj = new api.StoreCluster.fromJson(json); |
| 6110 checkStoreCluster(obj); | 6110 checkStoreCluster(obj); |
| 6111 | 6111 |
| 6112 var path = (req.url).path; | 6112 var path = (req.url).path; |
| 6113 var pathOffset = 0; | 6113 var pathOffset = 0; |
| 6114 var index; | 6114 var index; |
| 6115 var subPart; | 6115 var subPart; |
| 6116 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 6116 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 6117 pathOffset += 1; | 6117 pathOffset += 1; |
| 6118 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq
uals("androidenterprise/v1/")); | 6118 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq
uals("androidenterprise/v1/")); |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6154 } | 6154 } |
| 6155 } | 6155 } |
| 6156 | 6156 |
| 6157 | 6157 |
| 6158 var h = { | 6158 var h = { |
| 6159 "content-type" : "application/json; charset=utf-8", | 6159 "content-type" : "application/json; charset=utf-8", |
| 6160 }; | 6160 }; |
| 6161 var resp = convert.JSON.encode(buildStoreCluster()); | 6161 var resp = convert.JSON.encode(buildStoreCluster()); |
| 6162 return new async.Future.value(stringResponse(200, h, resp)); | 6162 return new async.Future.value(stringResponse(200, h, resp)); |
| 6163 }), true); | 6163 }), true); |
| 6164 res.update(arg_request, arg_enterpriseId, arg_pageId, arg_clusterId).then(
unittest.expectAsync(((api.StoreCluster response) { | 6164 res.update(arg_request, arg_enterpriseId, arg_pageId, arg_clusterId).then(
unittest.expectAsync1(((api.StoreCluster response) { |
| 6165 checkStoreCluster(response); | 6165 checkStoreCluster(response); |
| 6166 }))); | 6166 }))); |
| 6167 }); | 6167 }); |
| 6168 | 6168 |
| 6169 }); | 6169 }); |
| 6170 | 6170 |
| 6171 | 6171 |
| 6172 unittest.group("resource-StorelayoutpagesResourceApi", () { | 6172 unittest.group("resource-StorelayoutpagesResourceApi", () { |
| 6173 unittest.test("method--delete", () { | 6173 unittest.test("method--delete", () { |
| 6174 | 6174 |
| 6175 var mock = new HttpServerMock(); | 6175 var mock = new HttpServerMock(); |
| 6176 api.StorelayoutpagesResourceApi res = new api.AndroidenterpriseApi(mock).s
torelayoutpages; | 6176 api.StorelayoutpagesResourceApi res = new api.AndroidenterpriseApi(mock).s
torelayoutpages; |
| 6177 var arg_enterpriseId = "foo"; | 6177 var arg_enterpriseId = "foo"; |
| 6178 var arg_pageId = "foo"; | 6178 var arg_pageId = "foo"; |
| 6179 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 6179 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 6180 var path = (req.url).path; | 6180 var path = (req.url).path; |
| 6181 var pathOffset = 0; | 6181 var pathOffset = 0; |
| 6182 var index; | 6182 var index; |
| 6183 var subPart; | 6183 var subPart; |
| 6184 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 6184 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 6185 pathOffset += 1; | 6185 pathOffset += 1; |
| 6186 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq
uals("androidenterprise/v1/")); | 6186 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq
uals("androidenterprise/v1/")); |
| 6187 pathOffset += 21; | 6187 pathOffset += 21; |
| 6188 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("enterprises/")); | 6188 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("enterprises/")); |
| 6189 pathOffset += 12; | 6189 pathOffset += 12; |
| (...skipping 25 matching lines...) Expand all Loading... |
| 6215 } | 6215 } |
| 6216 } | 6216 } |
| 6217 | 6217 |
| 6218 | 6218 |
| 6219 var h = { | 6219 var h = { |
| 6220 "content-type" : "application/json; charset=utf-8", | 6220 "content-type" : "application/json; charset=utf-8", |
| 6221 }; | 6221 }; |
| 6222 var resp = ""; | 6222 var resp = ""; |
| 6223 return new async.Future.value(stringResponse(200, h, resp)); | 6223 return new async.Future.value(stringResponse(200, h, resp)); |
| 6224 }), true); | 6224 }), true); |
| 6225 res.delete(arg_enterpriseId, arg_pageId).then(unittest.expectAsync((_) {})
); | 6225 res.delete(arg_enterpriseId, arg_pageId).then(unittest.expectAsync1((_) {}
)); |
| 6226 }); | 6226 }); |
| 6227 | 6227 |
| 6228 unittest.test("method--get", () { | 6228 unittest.test("method--get", () { |
| 6229 | 6229 |
| 6230 var mock = new HttpServerMock(); | 6230 var mock = new HttpServerMock(); |
| 6231 api.StorelayoutpagesResourceApi res = new api.AndroidenterpriseApi(mock).s
torelayoutpages; | 6231 api.StorelayoutpagesResourceApi res = new api.AndroidenterpriseApi(mock).s
torelayoutpages; |
| 6232 var arg_enterpriseId = "foo"; | 6232 var arg_enterpriseId = "foo"; |
| 6233 var arg_pageId = "foo"; | 6233 var arg_pageId = "foo"; |
| 6234 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 6234 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 6235 var path = (req.url).path; | 6235 var path = (req.url).path; |
| 6236 var pathOffset = 0; | 6236 var pathOffset = 0; |
| 6237 var index; | 6237 var index; |
| 6238 var subPart; | 6238 var subPart; |
| 6239 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 6239 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 6240 pathOffset += 1; | 6240 pathOffset += 1; |
| 6241 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq
uals("androidenterprise/v1/")); | 6241 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq
uals("androidenterprise/v1/")); |
| 6242 pathOffset += 21; | 6242 pathOffset += 21; |
| 6243 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("enterprises/")); | 6243 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("enterprises/")); |
| 6244 pathOffset += 12; | 6244 pathOffset += 12; |
| (...skipping 25 matching lines...) Expand all Loading... |
| 6270 } | 6270 } |
| 6271 } | 6271 } |
| 6272 | 6272 |
| 6273 | 6273 |
| 6274 var h = { | 6274 var h = { |
| 6275 "content-type" : "application/json; charset=utf-8", | 6275 "content-type" : "application/json; charset=utf-8", |
| 6276 }; | 6276 }; |
| 6277 var resp = convert.JSON.encode(buildStorePage()); | 6277 var resp = convert.JSON.encode(buildStorePage()); |
| 6278 return new async.Future.value(stringResponse(200, h, resp)); | 6278 return new async.Future.value(stringResponse(200, h, resp)); |
| 6279 }), true); | 6279 }), true); |
| 6280 res.get(arg_enterpriseId, arg_pageId).then(unittest.expectAsync(((api.Stor
ePage response) { | 6280 res.get(arg_enterpriseId, arg_pageId).then(unittest.expectAsync1(((api.Sto
rePage response) { |
| 6281 checkStorePage(response); | 6281 checkStorePage(response); |
| 6282 }))); | 6282 }))); |
| 6283 }); | 6283 }); |
| 6284 | 6284 |
| 6285 unittest.test("method--insert", () { | 6285 unittest.test("method--insert", () { |
| 6286 | 6286 |
| 6287 var mock = new HttpServerMock(); | 6287 var mock = new HttpServerMock(); |
| 6288 api.StorelayoutpagesResourceApi res = new api.AndroidenterpriseApi(mock).s
torelayoutpages; | 6288 api.StorelayoutpagesResourceApi res = new api.AndroidenterpriseApi(mock).s
torelayoutpages; |
| 6289 var arg_request = buildStorePage(); | 6289 var arg_request = buildStorePage(); |
| 6290 var arg_enterpriseId = "foo"; | 6290 var arg_enterpriseId = "foo"; |
| 6291 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 6291 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 6292 var obj = new api.StorePage.fromJson(json); | 6292 var obj = new api.StorePage.fromJson(json); |
| 6293 checkStorePage(obj); | 6293 checkStorePage(obj); |
| 6294 | 6294 |
| 6295 var path = (req.url).path; | 6295 var path = (req.url).path; |
| 6296 var pathOffset = 0; | 6296 var pathOffset = 0; |
| 6297 var index; | 6297 var index; |
| 6298 var subPart; | 6298 var subPart; |
| 6299 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 6299 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 6300 pathOffset += 1; | 6300 pathOffset += 1; |
| 6301 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq
uals("androidenterprise/v1/")); | 6301 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq
uals("androidenterprise/v1/")); |
| (...skipping 25 matching lines...) Expand all Loading... |
| 6327 } | 6327 } |
| 6328 } | 6328 } |
| 6329 | 6329 |
| 6330 | 6330 |
| 6331 var h = { | 6331 var h = { |
| 6332 "content-type" : "application/json; charset=utf-8", | 6332 "content-type" : "application/json; charset=utf-8", |
| 6333 }; | 6333 }; |
| 6334 var resp = convert.JSON.encode(buildStorePage()); | 6334 var resp = convert.JSON.encode(buildStorePage()); |
| 6335 return new async.Future.value(stringResponse(200, h, resp)); | 6335 return new async.Future.value(stringResponse(200, h, resp)); |
| 6336 }), true); | 6336 }), true); |
| 6337 res.insert(arg_request, arg_enterpriseId).then(unittest.expectAsync(((api.
StorePage response) { | 6337 res.insert(arg_request, arg_enterpriseId).then(unittest.expectAsync1(((api
.StorePage response) { |
| 6338 checkStorePage(response); | 6338 checkStorePage(response); |
| 6339 }))); | 6339 }))); |
| 6340 }); | 6340 }); |
| 6341 | 6341 |
| 6342 unittest.test("method--list", () { | 6342 unittest.test("method--list", () { |
| 6343 | 6343 |
| 6344 var mock = new HttpServerMock(); | 6344 var mock = new HttpServerMock(); |
| 6345 api.StorelayoutpagesResourceApi res = new api.AndroidenterpriseApi(mock).s
torelayoutpages; | 6345 api.StorelayoutpagesResourceApi res = new api.AndroidenterpriseApi(mock).s
torelayoutpages; |
| 6346 var arg_enterpriseId = "foo"; | 6346 var arg_enterpriseId = "foo"; |
| 6347 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 6347 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 6348 var path = (req.url).path; | 6348 var path = (req.url).path; |
| 6349 var pathOffset = 0; | 6349 var pathOffset = 0; |
| 6350 var index; | 6350 var index; |
| 6351 var subPart; | 6351 var subPart; |
| 6352 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 6352 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 6353 pathOffset += 1; | 6353 pathOffset += 1; |
| 6354 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq
uals("androidenterprise/v1/")); | 6354 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq
uals("androidenterprise/v1/")); |
| 6355 pathOffset += 21; | 6355 pathOffset += 21; |
| 6356 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("enterprises/")); | 6356 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("enterprises/")); |
| 6357 pathOffset += 12; | 6357 pathOffset += 12; |
| (...skipping 22 matching lines...) Expand all Loading... |
| 6380 } | 6380 } |
| 6381 } | 6381 } |
| 6382 | 6382 |
| 6383 | 6383 |
| 6384 var h = { | 6384 var h = { |
| 6385 "content-type" : "application/json; charset=utf-8", | 6385 "content-type" : "application/json; charset=utf-8", |
| 6386 }; | 6386 }; |
| 6387 var resp = convert.JSON.encode(buildStoreLayoutPagesListResponse()); | 6387 var resp = convert.JSON.encode(buildStoreLayoutPagesListResponse()); |
| 6388 return new async.Future.value(stringResponse(200, h, resp)); | 6388 return new async.Future.value(stringResponse(200, h, resp)); |
| 6389 }), true); | 6389 }), true); |
| 6390 res.list(arg_enterpriseId).then(unittest.expectAsync(((api.StoreLayoutPage
sListResponse response) { | 6390 res.list(arg_enterpriseId).then(unittest.expectAsync1(((api.StoreLayoutPag
esListResponse response) { |
| 6391 checkStoreLayoutPagesListResponse(response); | 6391 checkStoreLayoutPagesListResponse(response); |
| 6392 }))); | 6392 }))); |
| 6393 }); | 6393 }); |
| 6394 | 6394 |
| 6395 unittest.test("method--patch", () { | 6395 unittest.test("method--patch", () { |
| 6396 | 6396 |
| 6397 var mock = new HttpServerMock(); | 6397 var mock = new HttpServerMock(); |
| 6398 api.StorelayoutpagesResourceApi res = new api.AndroidenterpriseApi(mock).s
torelayoutpages; | 6398 api.StorelayoutpagesResourceApi res = new api.AndroidenterpriseApi(mock).s
torelayoutpages; |
| 6399 var arg_request = buildStorePage(); | 6399 var arg_request = buildStorePage(); |
| 6400 var arg_enterpriseId = "foo"; | 6400 var arg_enterpriseId = "foo"; |
| 6401 var arg_pageId = "foo"; | 6401 var arg_pageId = "foo"; |
| 6402 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 6402 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 6403 var obj = new api.StorePage.fromJson(json); | 6403 var obj = new api.StorePage.fromJson(json); |
| 6404 checkStorePage(obj); | 6404 checkStorePage(obj); |
| 6405 | 6405 |
| 6406 var path = (req.url).path; | 6406 var path = (req.url).path; |
| 6407 var pathOffset = 0; | 6407 var pathOffset = 0; |
| 6408 var index; | 6408 var index; |
| 6409 var subPart; | 6409 var subPart; |
| 6410 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 6410 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 6411 pathOffset += 1; | 6411 pathOffset += 1; |
| 6412 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq
uals("androidenterprise/v1/")); | 6412 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq
uals("androidenterprise/v1/")); |
| (...skipping 28 matching lines...) Expand all Loading... |
| 6441 } | 6441 } |
| 6442 } | 6442 } |
| 6443 | 6443 |
| 6444 | 6444 |
| 6445 var h = { | 6445 var h = { |
| 6446 "content-type" : "application/json; charset=utf-8", | 6446 "content-type" : "application/json; charset=utf-8", |
| 6447 }; | 6447 }; |
| 6448 var resp = convert.JSON.encode(buildStorePage()); | 6448 var resp = convert.JSON.encode(buildStorePage()); |
| 6449 return new async.Future.value(stringResponse(200, h, resp)); | 6449 return new async.Future.value(stringResponse(200, h, resp)); |
| 6450 }), true); | 6450 }), true); |
| 6451 res.patch(arg_request, arg_enterpriseId, arg_pageId).then(unittest.expectA
sync(((api.StorePage response) { | 6451 res.patch(arg_request, arg_enterpriseId, arg_pageId).then(unittest.expectA
sync1(((api.StorePage response) { |
| 6452 checkStorePage(response); | 6452 checkStorePage(response); |
| 6453 }))); | 6453 }))); |
| 6454 }); | 6454 }); |
| 6455 | 6455 |
| 6456 unittest.test("method--update", () { | 6456 unittest.test("method--update", () { |
| 6457 | 6457 |
| 6458 var mock = new HttpServerMock(); | 6458 var mock = new HttpServerMock(); |
| 6459 api.StorelayoutpagesResourceApi res = new api.AndroidenterpriseApi(mock).s
torelayoutpages; | 6459 api.StorelayoutpagesResourceApi res = new api.AndroidenterpriseApi(mock).s
torelayoutpages; |
| 6460 var arg_request = buildStorePage(); | 6460 var arg_request = buildStorePage(); |
| 6461 var arg_enterpriseId = "foo"; | 6461 var arg_enterpriseId = "foo"; |
| 6462 var arg_pageId = "foo"; | 6462 var arg_pageId = "foo"; |
| 6463 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 6463 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 6464 var obj = new api.StorePage.fromJson(json); | 6464 var obj = new api.StorePage.fromJson(json); |
| 6465 checkStorePage(obj); | 6465 checkStorePage(obj); |
| 6466 | 6466 |
| 6467 var path = (req.url).path; | 6467 var path = (req.url).path; |
| 6468 var pathOffset = 0; | 6468 var pathOffset = 0; |
| 6469 var index; | 6469 var index; |
| 6470 var subPart; | 6470 var subPart; |
| 6471 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 6471 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 6472 pathOffset += 1; | 6472 pathOffset += 1; |
| 6473 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq
uals("androidenterprise/v1/")); | 6473 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq
uals("androidenterprise/v1/")); |
| (...skipping 28 matching lines...) Expand all Loading... |
| 6502 } | 6502 } |
| 6503 } | 6503 } |
| 6504 | 6504 |
| 6505 | 6505 |
| 6506 var h = { | 6506 var h = { |
| 6507 "content-type" : "application/json; charset=utf-8", | 6507 "content-type" : "application/json; charset=utf-8", |
| 6508 }; | 6508 }; |
| 6509 var resp = convert.JSON.encode(buildStorePage()); | 6509 var resp = convert.JSON.encode(buildStorePage()); |
| 6510 return new async.Future.value(stringResponse(200, h, resp)); | 6510 return new async.Future.value(stringResponse(200, h, resp)); |
| 6511 }), true); | 6511 }), true); |
| 6512 res.update(arg_request, arg_enterpriseId, arg_pageId).then(unittest.expect
Async(((api.StorePage response) { | 6512 res.update(arg_request, arg_enterpriseId, arg_pageId).then(unittest.expect
Async1(((api.StorePage response) { |
| 6513 checkStorePage(response); | 6513 checkStorePage(response); |
| 6514 }))); | 6514 }))); |
| 6515 }); | 6515 }); |
| 6516 | 6516 |
| 6517 }); | 6517 }); |
| 6518 | 6518 |
| 6519 | 6519 |
| 6520 unittest.group("resource-UsersResourceApi", () { | 6520 unittest.group("resource-UsersResourceApi", () { |
| 6521 unittest.test("method--delete", () { | 6521 unittest.test("method--delete", () { |
| 6522 | 6522 |
| 6523 var mock = new HttpServerMock(); | 6523 var mock = new HttpServerMock(); |
| 6524 api.UsersResourceApi res = new api.AndroidenterpriseApi(mock).users; | 6524 api.UsersResourceApi res = new api.AndroidenterpriseApi(mock).users; |
| 6525 var arg_enterpriseId = "foo"; | 6525 var arg_enterpriseId = "foo"; |
| 6526 var arg_userId = "foo"; | 6526 var arg_userId = "foo"; |
| 6527 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 6527 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 6528 var path = (req.url).path; | 6528 var path = (req.url).path; |
| 6529 var pathOffset = 0; | 6529 var pathOffset = 0; |
| 6530 var index; | 6530 var index; |
| 6531 var subPart; | 6531 var subPart; |
| 6532 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 6532 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 6533 pathOffset += 1; | 6533 pathOffset += 1; |
| 6534 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq
uals("androidenterprise/v1/")); | 6534 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq
uals("androidenterprise/v1/")); |
| 6535 pathOffset += 21; | 6535 pathOffset += 21; |
| 6536 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("enterprises/")); | 6536 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("enterprises/")); |
| 6537 pathOffset += 12; | 6537 pathOffset += 12; |
| (...skipping 25 matching lines...) Expand all Loading... |
| 6563 } | 6563 } |
| 6564 } | 6564 } |
| 6565 | 6565 |
| 6566 | 6566 |
| 6567 var h = { | 6567 var h = { |
| 6568 "content-type" : "application/json; charset=utf-8", | 6568 "content-type" : "application/json; charset=utf-8", |
| 6569 }; | 6569 }; |
| 6570 var resp = ""; | 6570 var resp = ""; |
| 6571 return new async.Future.value(stringResponse(200, h, resp)); | 6571 return new async.Future.value(stringResponse(200, h, resp)); |
| 6572 }), true); | 6572 }), true); |
| 6573 res.delete(arg_enterpriseId, arg_userId).then(unittest.expectAsync((_) {})
); | 6573 res.delete(arg_enterpriseId, arg_userId).then(unittest.expectAsync1((_) {}
)); |
| 6574 }); | 6574 }); |
| 6575 | 6575 |
| 6576 unittest.test("method--generateAuthenticationToken", () { | 6576 unittest.test("method--generateAuthenticationToken", () { |
| 6577 | 6577 |
| 6578 var mock = new HttpServerMock(); | 6578 var mock = new HttpServerMock(); |
| 6579 api.UsersResourceApi res = new api.AndroidenterpriseApi(mock).users; | 6579 api.UsersResourceApi res = new api.AndroidenterpriseApi(mock).users; |
| 6580 var arg_enterpriseId = "foo"; | 6580 var arg_enterpriseId = "foo"; |
| 6581 var arg_userId = "foo"; | 6581 var arg_userId = "foo"; |
| 6582 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 6582 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 6583 var path = (req.url).path; | 6583 var path = (req.url).path; |
| 6584 var pathOffset = 0; | 6584 var pathOffset = 0; |
| 6585 var index; | 6585 var index; |
| 6586 var subPart; | 6586 var subPart; |
| 6587 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 6587 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 6588 pathOffset += 1; | 6588 pathOffset += 1; |
| 6589 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq
uals("androidenterprise/v1/")); | 6589 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq
uals("androidenterprise/v1/")); |
| 6590 pathOffset += 21; | 6590 pathOffset += 21; |
| 6591 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("enterprises/")); | 6591 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("enterprises/")); |
| 6592 pathOffset += 12; | 6592 pathOffset += 12; |
| (...skipping 29 matching lines...) Expand all Loading... |
| 6622 } | 6622 } |
| 6623 } | 6623 } |
| 6624 | 6624 |
| 6625 | 6625 |
| 6626 var h = { | 6626 var h = { |
| 6627 "content-type" : "application/json; charset=utf-8", | 6627 "content-type" : "application/json; charset=utf-8", |
| 6628 }; | 6628 }; |
| 6629 var resp = convert.JSON.encode(buildAuthenticationToken()); | 6629 var resp = convert.JSON.encode(buildAuthenticationToken()); |
| 6630 return new async.Future.value(stringResponse(200, h, resp)); | 6630 return new async.Future.value(stringResponse(200, h, resp)); |
| 6631 }), true); | 6631 }), true); |
| 6632 res.generateAuthenticationToken(arg_enterpriseId, arg_userId).then(unittes
t.expectAsync(((api.AuthenticationToken response) { | 6632 res.generateAuthenticationToken(arg_enterpriseId, arg_userId).then(unittes
t.expectAsync1(((api.AuthenticationToken response) { |
| 6633 checkAuthenticationToken(response); | 6633 checkAuthenticationToken(response); |
| 6634 }))); | 6634 }))); |
| 6635 }); | 6635 }); |
| 6636 | 6636 |
| 6637 unittest.test("method--generateToken", () { | 6637 unittest.test("method--generateToken", () { |
| 6638 | 6638 |
| 6639 var mock = new HttpServerMock(); | 6639 var mock = new HttpServerMock(); |
| 6640 api.UsersResourceApi res = new api.AndroidenterpriseApi(mock).users; | 6640 api.UsersResourceApi res = new api.AndroidenterpriseApi(mock).users; |
| 6641 var arg_enterpriseId = "foo"; | 6641 var arg_enterpriseId = "foo"; |
| 6642 var arg_userId = "foo"; | 6642 var arg_userId = "foo"; |
| 6643 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 6643 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 6644 var path = (req.url).path; | 6644 var path = (req.url).path; |
| 6645 var pathOffset = 0; | 6645 var pathOffset = 0; |
| 6646 var index; | 6646 var index; |
| 6647 var subPart; | 6647 var subPart; |
| 6648 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 6648 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 6649 pathOffset += 1; | 6649 pathOffset += 1; |
| 6650 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq
uals("androidenterprise/v1/")); | 6650 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq
uals("androidenterprise/v1/")); |
| 6651 pathOffset += 21; | 6651 pathOffset += 21; |
| 6652 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("enterprises/")); | 6652 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("enterprises/")); |
| 6653 pathOffset += 12; | 6653 pathOffset += 12; |
| (...skipping 29 matching lines...) Expand all Loading... |
| 6683 } | 6683 } |
| 6684 } | 6684 } |
| 6685 | 6685 |
| 6686 | 6686 |
| 6687 var h = { | 6687 var h = { |
| 6688 "content-type" : "application/json; charset=utf-8", | 6688 "content-type" : "application/json; charset=utf-8", |
| 6689 }; | 6689 }; |
| 6690 var resp = convert.JSON.encode(buildUserToken()); | 6690 var resp = convert.JSON.encode(buildUserToken()); |
| 6691 return new async.Future.value(stringResponse(200, h, resp)); | 6691 return new async.Future.value(stringResponse(200, h, resp)); |
| 6692 }), true); | 6692 }), true); |
| 6693 res.generateToken(arg_enterpriseId, arg_userId).then(unittest.expectAsync(
((api.UserToken response) { | 6693 res.generateToken(arg_enterpriseId, arg_userId).then(unittest.expectAsync1
(((api.UserToken response) { |
| 6694 checkUserToken(response); | 6694 checkUserToken(response); |
| 6695 }))); | 6695 }))); |
| 6696 }); | 6696 }); |
| 6697 | 6697 |
| 6698 unittest.test("method--get", () { | 6698 unittest.test("method--get", () { |
| 6699 | 6699 |
| 6700 var mock = new HttpServerMock(); | 6700 var mock = new HttpServerMock(); |
| 6701 api.UsersResourceApi res = new api.AndroidenterpriseApi(mock).users; | 6701 api.UsersResourceApi res = new api.AndroidenterpriseApi(mock).users; |
| 6702 var arg_enterpriseId = "foo"; | 6702 var arg_enterpriseId = "foo"; |
| 6703 var arg_userId = "foo"; | 6703 var arg_userId = "foo"; |
| 6704 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 6704 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 6705 var path = (req.url).path; | 6705 var path = (req.url).path; |
| 6706 var pathOffset = 0; | 6706 var pathOffset = 0; |
| 6707 var index; | 6707 var index; |
| 6708 var subPart; | 6708 var subPart; |
| 6709 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 6709 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 6710 pathOffset += 1; | 6710 pathOffset += 1; |
| 6711 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq
uals("androidenterprise/v1/")); | 6711 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq
uals("androidenterprise/v1/")); |
| 6712 pathOffset += 21; | 6712 pathOffset += 21; |
| 6713 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("enterprises/")); | 6713 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("enterprises/")); |
| 6714 pathOffset += 12; | 6714 pathOffset += 12; |
| (...skipping 25 matching lines...) Expand all Loading... |
| 6740 } | 6740 } |
| 6741 } | 6741 } |
| 6742 | 6742 |
| 6743 | 6743 |
| 6744 var h = { | 6744 var h = { |
| 6745 "content-type" : "application/json; charset=utf-8", | 6745 "content-type" : "application/json; charset=utf-8", |
| 6746 }; | 6746 }; |
| 6747 var resp = convert.JSON.encode(buildUser()); | 6747 var resp = convert.JSON.encode(buildUser()); |
| 6748 return new async.Future.value(stringResponse(200, h, resp)); | 6748 return new async.Future.value(stringResponse(200, h, resp)); |
| 6749 }), true); | 6749 }), true); |
| 6750 res.get(arg_enterpriseId, arg_userId).then(unittest.expectAsync(((api.User
response) { | 6750 res.get(arg_enterpriseId, arg_userId).then(unittest.expectAsync1(((api.Use
r response) { |
| 6751 checkUser(response); | 6751 checkUser(response); |
| 6752 }))); | 6752 }))); |
| 6753 }); | 6753 }); |
| 6754 | 6754 |
| 6755 unittest.test("method--getAvailableProductSet", () { | 6755 unittest.test("method--getAvailableProductSet", () { |
| 6756 | 6756 |
| 6757 var mock = new HttpServerMock(); | 6757 var mock = new HttpServerMock(); |
| 6758 api.UsersResourceApi res = new api.AndroidenterpriseApi(mock).users; | 6758 api.UsersResourceApi res = new api.AndroidenterpriseApi(mock).users; |
| 6759 var arg_enterpriseId = "foo"; | 6759 var arg_enterpriseId = "foo"; |
| 6760 var arg_userId = "foo"; | 6760 var arg_userId = "foo"; |
| 6761 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 6761 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 6762 var path = (req.url).path; | 6762 var path = (req.url).path; |
| 6763 var pathOffset = 0; | 6763 var pathOffset = 0; |
| 6764 var index; | 6764 var index; |
| 6765 var subPart; | 6765 var subPart; |
| 6766 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 6766 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 6767 pathOffset += 1; | 6767 pathOffset += 1; |
| 6768 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq
uals("androidenterprise/v1/")); | 6768 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq
uals("androidenterprise/v1/")); |
| 6769 pathOffset += 21; | 6769 pathOffset += 21; |
| 6770 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("enterprises/")); | 6770 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("enterprises/")); |
| 6771 pathOffset += 12; | 6771 pathOffset += 12; |
| (...skipping 29 matching lines...) Expand all Loading... |
| 6801 } | 6801 } |
| 6802 } | 6802 } |
| 6803 | 6803 |
| 6804 | 6804 |
| 6805 var h = { | 6805 var h = { |
| 6806 "content-type" : "application/json; charset=utf-8", | 6806 "content-type" : "application/json; charset=utf-8", |
| 6807 }; | 6807 }; |
| 6808 var resp = convert.JSON.encode(buildProductSet()); | 6808 var resp = convert.JSON.encode(buildProductSet()); |
| 6809 return new async.Future.value(stringResponse(200, h, resp)); | 6809 return new async.Future.value(stringResponse(200, h, resp)); |
| 6810 }), true); | 6810 }), true); |
| 6811 res.getAvailableProductSet(arg_enterpriseId, arg_userId).then(unittest.exp
ectAsync(((api.ProductSet response) { | 6811 res.getAvailableProductSet(arg_enterpriseId, arg_userId).then(unittest.exp
ectAsync1(((api.ProductSet response) { |
| 6812 checkProductSet(response); | 6812 checkProductSet(response); |
| 6813 }))); | 6813 }))); |
| 6814 }); | 6814 }); |
| 6815 | 6815 |
| 6816 unittest.test("method--insert", () { | 6816 unittest.test("method--insert", () { |
| 6817 | 6817 |
| 6818 var mock = new HttpServerMock(); | 6818 var mock = new HttpServerMock(); |
| 6819 api.UsersResourceApi res = new api.AndroidenterpriseApi(mock).users; | 6819 api.UsersResourceApi res = new api.AndroidenterpriseApi(mock).users; |
| 6820 var arg_request = buildUser(); | 6820 var arg_request = buildUser(); |
| 6821 var arg_enterpriseId = "foo"; | 6821 var arg_enterpriseId = "foo"; |
| 6822 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 6822 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 6823 var obj = new api.User.fromJson(json); | 6823 var obj = new api.User.fromJson(json); |
| 6824 checkUser(obj); | 6824 checkUser(obj); |
| 6825 | 6825 |
| 6826 var path = (req.url).path; | 6826 var path = (req.url).path; |
| 6827 var pathOffset = 0; | 6827 var pathOffset = 0; |
| 6828 var index; | 6828 var index; |
| 6829 var subPart; | 6829 var subPart; |
| 6830 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 6830 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 6831 pathOffset += 1; | 6831 pathOffset += 1; |
| 6832 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq
uals("androidenterprise/v1/")); | 6832 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq
uals("androidenterprise/v1/")); |
| (...skipping 25 matching lines...) Expand all Loading... |
| 6858 } | 6858 } |
| 6859 } | 6859 } |
| 6860 | 6860 |
| 6861 | 6861 |
| 6862 var h = { | 6862 var h = { |
| 6863 "content-type" : "application/json; charset=utf-8", | 6863 "content-type" : "application/json; charset=utf-8", |
| 6864 }; | 6864 }; |
| 6865 var resp = convert.JSON.encode(buildUser()); | 6865 var resp = convert.JSON.encode(buildUser()); |
| 6866 return new async.Future.value(stringResponse(200, h, resp)); | 6866 return new async.Future.value(stringResponse(200, h, resp)); |
| 6867 }), true); | 6867 }), true); |
| 6868 res.insert(arg_request, arg_enterpriseId).then(unittest.expectAsync(((api.
User response) { | 6868 res.insert(arg_request, arg_enterpriseId).then(unittest.expectAsync1(((api
.User response) { |
| 6869 checkUser(response); | 6869 checkUser(response); |
| 6870 }))); | 6870 }))); |
| 6871 }); | 6871 }); |
| 6872 | 6872 |
| 6873 unittest.test("method--list", () { | 6873 unittest.test("method--list", () { |
| 6874 | 6874 |
| 6875 var mock = new HttpServerMock(); | 6875 var mock = new HttpServerMock(); |
| 6876 api.UsersResourceApi res = new api.AndroidenterpriseApi(mock).users; | 6876 api.UsersResourceApi res = new api.AndroidenterpriseApi(mock).users; |
| 6877 var arg_enterpriseId = "foo"; | 6877 var arg_enterpriseId = "foo"; |
| 6878 var arg_email = "foo"; | 6878 var arg_email = "foo"; |
| 6879 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 6879 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 6880 var path = (req.url).path; | 6880 var path = (req.url).path; |
| 6881 var pathOffset = 0; | 6881 var pathOffset = 0; |
| 6882 var index; | 6882 var index; |
| 6883 var subPart; | 6883 var subPart; |
| 6884 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 6884 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 6885 pathOffset += 1; | 6885 pathOffset += 1; |
| 6886 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq
uals("androidenterprise/v1/")); | 6886 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq
uals("androidenterprise/v1/")); |
| 6887 pathOffset += 21; | 6887 pathOffset += 21; |
| 6888 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("enterprises/")); | 6888 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("enterprises/")); |
| 6889 pathOffset += 12; | 6889 pathOffset += 12; |
| (...skipping 23 matching lines...) Expand all Loading... |
| 6913 } | 6913 } |
| 6914 unittest.expect(queryMap["email"].first, unittest.equals(arg_email)); | 6914 unittest.expect(queryMap["email"].first, unittest.equals(arg_email)); |
| 6915 | 6915 |
| 6916 | 6916 |
| 6917 var h = { | 6917 var h = { |
| 6918 "content-type" : "application/json; charset=utf-8", | 6918 "content-type" : "application/json; charset=utf-8", |
| 6919 }; | 6919 }; |
| 6920 var resp = convert.JSON.encode(buildUsersListResponse()); | 6920 var resp = convert.JSON.encode(buildUsersListResponse()); |
| 6921 return new async.Future.value(stringResponse(200, h, resp)); | 6921 return new async.Future.value(stringResponse(200, h, resp)); |
| 6922 }), true); | 6922 }), true); |
| 6923 res.list(arg_enterpriseId, arg_email).then(unittest.expectAsync(((api.User
sListResponse response) { | 6923 res.list(arg_enterpriseId, arg_email).then(unittest.expectAsync1(((api.Use
rsListResponse response) { |
| 6924 checkUsersListResponse(response); | 6924 checkUsersListResponse(response); |
| 6925 }))); | 6925 }))); |
| 6926 }); | 6926 }); |
| 6927 | 6927 |
| 6928 unittest.test("method--patch", () { | 6928 unittest.test("method--patch", () { |
| 6929 | 6929 |
| 6930 var mock = new HttpServerMock(); | 6930 var mock = new HttpServerMock(); |
| 6931 api.UsersResourceApi res = new api.AndroidenterpriseApi(mock).users; | 6931 api.UsersResourceApi res = new api.AndroidenterpriseApi(mock).users; |
| 6932 var arg_request = buildUser(); | 6932 var arg_request = buildUser(); |
| 6933 var arg_enterpriseId = "foo"; | 6933 var arg_enterpriseId = "foo"; |
| 6934 var arg_userId = "foo"; | 6934 var arg_userId = "foo"; |
| 6935 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 6935 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 6936 var obj = new api.User.fromJson(json); | 6936 var obj = new api.User.fromJson(json); |
| 6937 checkUser(obj); | 6937 checkUser(obj); |
| 6938 | 6938 |
| 6939 var path = (req.url).path; | 6939 var path = (req.url).path; |
| 6940 var pathOffset = 0; | 6940 var pathOffset = 0; |
| 6941 var index; | 6941 var index; |
| 6942 var subPart; | 6942 var subPart; |
| 6943 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 6943 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 6944 pathOffset += 1; | 6944 pathOffset += 1; |
| 6945 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq
uals("androidenterprise/v1/")); | 6945 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq
uals("androidenterprise/v1/")); |
| (...skipping 28 matching lines...) Expand all Loading... |
| 6974 } | 6974 } |
| 6975 } | 6975 } |
| 6976 | 6976 |
| 6977 | 6977 |
| 6978 var h = { | 6978 var h = { |
| 6979 "content-type" : "application/json; charset=utf-8", | 6979 "content-type" : "application/json; charset=utf-8", |
| 6980 }; | 6980 }; |
| 6981 var resp = convert.JSON.encode(buildUser()); | 6981 var resp = convert.JSON.encode(buildUser()); |
| 6982 return new async.Future.value(stringResponse(200, h, resp)); | 6982 return new async.Future.value(stringResponse(200, h, resp)); |
| 6983 }), true); | 6983 }), true); |
| 6984 res.patch(arg_request, arg_enterpriseId, arg_userId).then(unittest.expectA
sync(((api.User response) { | 6984 res.patch(arg_request, arg_enterpriseId, arg_userId).then(unittest.expectA
sync1(((api.User response) { |
| 6985 checkUser(response); | 6985 checkUser(response); |
| 6986 }))); | 6986 }))); |
| 6987 }); | 6987 }); |
| 6988 | 6988 |
| 6989 unittest.test("method--revokeToken", () { | 6989 unittest.test("method--revokeToken", () { |
| 6990 | 6990 |
| 6991 var mock = new HttpServerMock(); | 6991 var mock = new HttpServerMock(); |
| 6992 api.UsersResourceApi res = new api.AndroidenterpriseApi(mock).users; | 6992 api.UsersResourceApi res = new api.AndroidenterpriseApi(mock).users; |
| 6993 var arg_enterpriseId = "foo"; | 6993 var arg_enterpriseId = "foo"; |
| 6994 var arg_userId = "foo"; | 6994 var arg_userId = "foo"; |
| 6995 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 6995 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 6996 var path = (req.url).path; | 6996 var path = (req.url).path; |
| 6997 var pathOffset = 0; | 6997 var pathOffset = 0; |
| 6998 var index; | 6998 var index; |
| 6999 var subPart; | 6999 var subPart; |
| 7000 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 7000 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 7001 pathOffset += 1; | 7001 pathOffset += 1; |
| 7002 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq
uals("androidenterprise/v1/")); | 7002 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq
uals("androidenterprise/v1/")); |
| 7003 pathOffset += 21; | 7003 pathOffset += 21; |
| 7004 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("enterprises/")); | 7004 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("enterprises/")); |
| 7005 pathOffset += 12; | 7005 pathOffset += 12; |
| (...skipping 29 matching lines...) Expand all Loading... |
| 7035 } | 7035 } |
| 7036 } | 7036 } |
| 7037 | 7037 |
| 7038 | 7038 |
| 7039 var h = { | 7039 var h = { |
| 7040 "content-type" : "application/json; charset=utf-8", | 7040 "content-type" : "application/json; charset=utf-8", |
| 7041 }; | 7041 }; |
| 7042 var resp = ""; | 7042 var resp = ""; |
| 7043 return new async.Future.value(stringResponse(200, h, resp)); | 7043 return new async.Future.value(stringResponse(200, h, resp)); |
| 7044 }), true); | 7044 }), true); |
| 7045 res.revokeToken(arg_enterpriseId, arg_userId).then(unittest.expectAsync((_
) {})); | 7045 res.revokeToken(arg_enterpriseId, arg_userId).then(unittest.expectAsync1((
_) {})); |
| 7046 }); | 7046 }); |
| 7047 | 7047 |
| 7048 unittest.test("method--setAvailableProductSet", () { | 7048 unittest.test("method--setAvailableProductSet", () { |
| 7049 | 7049 |
| 7050 var mock = new HttpServerMock(); | 7050 var mock = new HttpServerMock(); |
| 7051 api.UsersResourceApi res = new api.AndroidenterpriseApi(mock).users; | 7051 api.UsersResourceApi res = new api.AndroidenterpriseApi(mock).users; |
| 7052 var arg_request = buildProductSet(); | 7052 var arg_request = buildProductSet(); |
| 7053 var arg_enterpriseId = "foo"; | 7053 var arg_enterpriseId = "foo"; |
| 7054 var arg_userId = "foo"; | 7054 var arg_userId = "foo"; |
| 7055 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 7055 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 7056 var obj = new api.ProductSet.fromJson(json); | 7056 var obj = new api.ProductSet.fromJson(json); |
| 7057 checkProductSet(obj); | 7057 checkProductSet(obj); |
| 7058 | 7058 |
| 7059 var path = (req.url).path; | 7059 var path = (req.url).path; |
| 7060 var pathOffset = 0; | 7060 var pathOffset = 0; |
| 7061 var index; | 7061 var index; |
| 7062 var subPart; | 7062 var subPart; |
| 7063 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 7063 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 7064 pathOffset += 1; | 7064 pathOffset += 1; |
| 7065 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq
uals("androidenterprise/v1/")); | 7065 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq
uals("androidenterprise/v1/")); |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7098 } | 7098 } |
| 7099 } | 7099 } |
| 7100 | 7100 |
| 7101 | 7101 |
| 7102 var h = { | 7102 var h = { |
| 7103 "content-type" : "application/json; charset=utf-8", | 7103 "content-type" : "application/json; charset=utf-8", |
| 7104 }; | 7104 }; |
| 7105 var resp = convert.JSON.encode(buildProductSet()); | 7105 var resp = convert.JSON.encode(buildProductSet()); |
| 7106 return new async.Future.value(stringResponse(200, h, resp)); | 7106 return new async.Future.value(stringResponse(200, h, resp)); |
| 7107 }), true); | 7107 }), true); |
| 7108 res.setAvailableProductSet(arg_request, arg_enterpriseId, arg_userId).then
(unittest.expectAsync(((api.ProductSet response) { | 7108 res.setAvailableProductSet(arg_request, arg_enterpriseId, arg_userId).then
(unittest.expectAsync1(((api.ProductSet response) { |
| 7109 checkProductSet(response); | 7109 checkProductSet(response); |
| 7110 }))); | 7110 }))); |
| 7111 }); | 7111 }); |
| 7112 | 7112 |
| 7113 unittest.test("method--update", () { | 7113 unittest.test("method--update", () { |
| 7114 | 7114 |
| 7115 var mock = new HttpServerMock(); | 7115 var mock = new HttpServerMock(); |
| 7116 api.UsersResourceApi res = new api.AndroidenterpriseApi(mock).users; | 7116 api.UsersResourceApi res = new api.AndroidenterpriseApi(mock).users; |
| 7117 var arg_request = buildUser(); | 7117 var arg_request = buildUser(); |
| 7118 var arg_enterpriseId = "foo"; | 7118 var arg_enterpriseId = "foo"; |
| 7119 var arg_userId = "foo"; | 7119 var arg_userId = "foo"; |
| 7120 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 7120 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 7121 var obj = new api.User.fromJson(json); | 7121 var obj = new api.User.fromJson(json); |
| 7122 checkUser(obj); | 7122 checkUser(obj); |
| 7123 | 7123 |
| 7124 var path = (req.url).path; | 7124 var path = (req.url).path; |
| 7125 var pathOffset = 0; | 7125 var pathOffset = 0; |
| 7126 var index; | 7126 var index; |
| 7127 var subPart; | 7127 var subPart; |
| 7128 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 7128 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 7129 pathOffset += 1; | 7129 pathOffset += 1; |
| 7130 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq
uals("androidenterprise/v1/")); | 7130 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq
uals("androidenterprise/v1/")); |
| (...skipping 28 matching lines...) Expand all Loading... |
| 7159 } | 7159 } |
| 7160 } | 7160 } |
| 7161 | 7161 |
| 7162 | 7162 |
| 7163 var h = { | 7163 var h = { |
| 7164 "content-type" : "application/json; charset=utf-8", | 7164 "content-type" : "application/json; charset=utf-8", |
| 7165 }; | 7165 }; |
| 7166 var resp = convert.JSON.encode(buildUser()); | 7166 var resp = convert.JSON.encode(buildUser()); |
| 7167 return new async.Future.value(stringResponse(200, h, resp)); | 7167 return new async.Future.value(stringResponse(200, h, resp)); |
| 7168 }), true); | 7168 }), true); |
| 7169 res.update(arg_request, arg_enterpriseId, arg_userId).then(unittest.expect
Async(((api.User response) { | 7169 res.update(arg_request, arg_enterpriseId, arg_userId).then(unittest.expect
Async1(((api.User response) { |
| 7170 checkUser(response); | 7170 checkUser(response); |
| 7171 }))); | 7171 }))); |
| 7172 }); | 7172 }); |
| 7173 | 7173 |
| 7174 }); | 7174 }); |
| 7175 | 7175 |
| 7176 | 7176 |
| 7177 } | 7177 } |
| 7178 | 7178 |
| OLD | NEW |