| // ignore_for_file: camel_case_types |
| // ignore_for_file: comment_references |
| // ignore_for_file: directives_ordering |
| // ignore_for_file: file_names |
| // ignore_for_file: library_names |
| // ignore_for_file: lines_longer_than_80_chars |
| // ignore_for_file: non_constant_identifier_names |
| // ignore_for_file: prefer_expression_function_bodies |
| // ignore_for_file: prefer_final_locals |
| // ignore_for_file: prefer_interpolation_to_compose_strings |
| // ignore_for_file: unnecessary_brace_in_string_interps |
| // ignore_for_file: unnecessary_cast |
| // ignore_for_file: unnecessary_lambdas |
| // ignore_for_file: unnecessary_parenthesis |
| // ignore_for_file: unnecessary_string_interpolations |
| // ignore_for_file: avoid_returning_null |
| // ignore_for_file: cascade_invocations |
| // ignore_for_file: prefer_single_quotes |
| // ignore_for_file: unused_local_variable |
| |
| library googleapis.androidmanagement.v1.test; |
| |
| import "dart:core" as core; |
| import "dart:async" as async; |
| import "dart:convert" as convert; |
| |
| import 'package:http/http.dart' as http; |
| import 'package:test/test.dart' as unittest; |
| |
| import 'package:googleapis/androidmanagement/v1.dart' as api; |
| |
| class HttpServerMock extends http.BaseClient { |
| core.Function _callback; |
| core.bool _expectJson; |
| |
| void register(core.Function callback, core.bool expectJson) { |
| _callback = callback; |
| _expectJson = expectJson; |
| } |
| |
| @core.override |
| async.Future<http.StreamedResponse> send(http.BaseRequest request) async { |
| if (_expectJson) { |
| final jsonString = |
| await request.finalize().transform(convert.utf8.decoder).join(''); |
| if (jsonString.isEmpty) { |
| return _callback(request, null); |
| } else { |
| return _callback(request, convert.json.decode(jsonString)); |
| } |
| } else { |
| var stream = request.finalize(); |
| if (stream == null) { |
| return _callback(request, []); |
| } else { |
| final data = await stream.toBytes(); |
| return _callback(request, data); |
| } |
| } |
| } |
| } |
| |
| http.StreamedResponse stringResponse(core.int status, |
| core.Map<core.String, core.String> headers, core.String body) { |
| var stream = async.Stream.fromIterable([convert.utf8.encode(body)]); |
| return http.StreamedResponse(stream, status, headers: headers); |
| } |
| |
| core.int buildCounterAdvancedSecurityOverrides = 0; |
| api.AdvancedSecurityOverrides buildAdvancedSecurityOverrides() { |
| var o = api.AdvancedSecurityOverrides(); |
| buildCounterAdvancedSecurityOverrides++; |
| if (buildCounterAdvancedSecurityOverrides < 3) { |
| o.untrustedAppsPolicy = 'foo'; |
| } |
| buildCounterAdvancedSecurityOverrides--; |
| return o; |
| } |
| |
| void checkAdvancedSecurityOverrides(api.AdvancedSecurityOverrides o) { |
| buildCounterAdvancedSecurityOverrides++; |
| if (buildCounterAdvancedSecurityOverrides < 3) { |
| unittest.expect(o.untrustedAppsPolicy, unittest.equals('foo')); |
| } |
| buildCounterAdvancedSecurityOverrides--; |
| } |
| |
| core.int buildCounterAlwaysOnVpnPackage = 0; |
| api.AlwaysOnVpnPackage buildAlwaysOnVpnPackage() { |
| var o = api.AlwaysOnVpnPackage(); |
| buildCounterAlwaysOnVpnPackage++; |
| if (buildCounterAlwaysOnVpnPackage < 3) { |
| o.lockdownEnabled = true; |
| o.packageName = 'foo'; |
| } |
| buildCounterAlwaysOnVpnPackage--; |
| return o; |
| } |
| |
| void checkAlwaysOnVpnPackage(api.AlwaysOnVpnPackage o) { |
| buildCounterAlwaysOnVpnPackage++; |
| if (buildCounterAlwaysOnVpnPackage < 3) { |
| unittest.expect(o.lockdownEnabled, unittest.isTrue); |
| unittest.expect(o.packageName, unittest.equals('foo')); |
| } |
| buildCounterAlwaysOnVpnPackage--; |
| } |
| |
| core.int buildCounterApiLevelCondition = 0; |
| api.ApiLevelCondition buildApiLevelCondition() { |
| var o = api.ApiLevelCondition(); |
| buildCounterApiLevelCondition++; |
| if (buildCounterApiLevelCondition < 3) { |
| o.minApiLevel = 42; |
| } |
| buildCounterApiLevelCondition--; |
| return o; |
| } |
| |
| void checkApiLevelCondition(api.ApiLevelCondition o) { |
| buildCounterApiLevelCondition++; |
| if (buildCounterApiLevelCondition < 3) { |
| unittest.expect(o.minApiLevel, unittest.equals(42)); |
| } |
| buildCounterApiLevelCondition--; |
| } |
| |
| core.int buildCounterAppTrackInfo = 0; |
| api.AppTrackInfo buildAppTrackInfo() { |
| var o = api.AppTrackInfo(); |
| buildCounterAppTrackInfo++; |
| if (buildCounterAppTrackInfo < 3) { |
| o.trackAlias = 'foo'; |
| o.trackId = 'foo'; |
| } |
| buildCounterAppTrackInfo--; |
| return o; |
| } |
| |
| void checkAppTrackInfo(api.AppTrackInfo o) { |
| buildCounterAppTrackInfo++; |
| if (buildCounterAppTrackInfo < 3) { |
| unittest.expect(o.trackAlias, unittest.equals('foo')); |
| unittest.expect(o.trackId, unittest.equals('foo')); |
| } |
| buildCounterAppTrackInfo--; |
| } |
| |
| core.List<api.AppTrackInfo> buildUnnamed5209() { |
| var o = <api.AppTrackInfo>[]; |
| o.add(buildAppTrackInfo()); |
| o.add(buildAppTrackInfo()); |
| return o; |
| } |
| |
| void checkUnnamed5209(core.List<api.AppTrackInfo> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkAppTrackInfo(o[0]); |
| checkAppTrackInfo(o[1]); |
| } |
| |
| core.List<api.ManagedProperty> buildUnnamed5210() { |
| var o = <api.ManagedProperty>[]; |
| o.add(buildManagedProperty()); |
| o.add(buildManagedProperty()); |
| return o; |
| } |
| |
| void checkUnnamed5210(core.List<api.ManagedProperty> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkManagedProperty(o[0]); |
| checkManagedProperty(o[1]); |
| } |
| |
| core.List<api.ApplicationPermission> buildUnnamed5211() { |
| var o = <api.ApplicationPermission>[]; |
| o.add(buildApplicationPermission()); |
| o.add(buildApplicationPermission()); |
| return o; |
| } |
| |
| void checkUnnamed5211(core.List<api.ApplicationPermission> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkApplicationPermission(o[0]); |
| checkApplicationPermission(o[1]); |
| } |
| |
| core.int buildCounterApplication = 0; |
| api.Application buildApplication() { |
| var o = api.Application(); |
| buildCounterApplication++; |
| if (buildCounterApplication < 3) { |
| o.appTracks = buildUnnamed5209(); |
| o.managedProperties = buildUnnamed5210(); |
| o.name = 'foo'; |
| o.permissions = buildUnnamed5211(); |
| o.title = 'foo'; |
| } |
| buildCounterApplication--; |
| return o; |
| } |
| |
| void checkApplication(api.Application o) { |
| buildCounterApplication++; |
| if (buildCounterApplication < 3) { |
| checkUnnamed5209(o.appTracks); |
| checkUnnamed5210(o.managedProperties); |
| unittest.expect(o.name, unittest.equals('foo')); |
| checkUnnamed5211(o.permissions); |
| unittest.expect(o.title, unittest.equals('foo')); |
| } |
| buildCounterApplication--; |
| } |
| |
| core.int buildCounterApplicationEvent = 0; |
| api.ApplicationEvent buildApplicationEvent() { |
| var o = api.ApplicationEvent(); |
| buildCounterApplicationEvent++; |
| if (buildCounterApplicationEvent < 3) { |
| o.createTime = 'foo'; |
| o.eventType = 'foo'; |
| } |
| buildCounterApplicationEvent--; |
| return o; |
| } |
| |
| void checkApplicationEvent(api.ApplicationEvent o) { |
| buildCounterApplicationEvent++; |
| if (buildCounterApplicationEvent < 3) { |
| unittest.expect(o.createTime, unittest.equals('foo')); |
| unittest.expect(o.eventType, unittest.equals('foo')); |
| } |
| buildCounterApplicationEvent--; |
| } |
| |
| core.int buildCounterApplicationPermission = 0; |
| api.ApplicationPermission buildApplicationPermission() { |
| var o = api.ApplicationPermission(); |
| buildCounterApplicationPermission++; |
| if (buildCounterApplicationPermission < 3) { |
| o.description = 'foo'; |
| o.name = 'foo'; |
| o.permissionId = 'foo'; |
| } |
| buildCounterApplicationPermission--; |
| return o; |
| } |
| |
| void checkApplicationPermission(api.ApplicationPermission o) { |
| buildCounterApplicationPermission++; |
| if (buildCounterApplicationPermission < 3) { |
| unittest.expect(o.description, unittest.equals('foo')); |
| unittest.expect(o.name, unittest.equals('foo')); |
| unittest.expect(o.permissionId, unittest.equals('foo')); |
| } |
| buildCounterApplicationPermission--; |
| } |
| |
| core.List<core.String> buildUnnamed5212() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed5212(core.List<core.String> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| unittest.expect(o[0], unittest.equals('foo')); |
| unittest.expect(o[1], unittest.equals('foo')); |
| } |
| |
| core.List<core.String> buildUnnamed5213() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed5213(core.List<core.String> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| unittest.expect(o[0], unittest.equals('foo')); |
| unittest.expect(o[1], unittest.equals('foo')); |
| } |
| |
| core.Map<core.String, core.Object> buildUnnamed5214() { |
| var o = <core.String, core.Object>{}; |
| o['x'] = { |
| 'list': [1, 2, 3], |
| 'bool': true, |
| 'string': 'foo' |
| }; |
| o['y'] = { |
| 'list': [1, 2, 3], |
| 'bool': true, |
| 'string': 'foo' |
| }; |
| return o; |
| } |
| |
| void checkUnnamed5214(core.Map<core.String, core.Object> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| var casted1 = (o['x']) as core.Map; |
| unittest.expect(casted1, unittest.hasLength(3)); |
| unittest.expect(casted1['list'], unittest.equals([1, 2, 3])); |
| unittest.expect(casted1['bool'], unittest.equals(true)); |
| unittest.expect(casted1['string'], unittest.equals('foo')); |
| var casted2 = (o['y']) as core.Map; |
| unittest.expect(casted2, unittest.hasLength(3)); |
| unittest.expect(casted2['list'], unittest.equals([1, 2, 3])); |
| unittest.expect(casted2['bool'], unittest.equals(true)); |
| unittest.expect(casted2['string'], unittest.equals('foo')); |
| } |
| |
| core.List<api.PermissionGrant> buildUnnamed5215() { |
| var o = <api.PermissionGrant>[]; |
| o.add(buildPermissionGrant()); |
| o.add(buildPermissionGrant()); |
| return o; |
| } |
| |
| void checkUnnamed5215(core.List<api.PermissionGrant> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkPermissionGrant(o[0]); |
| checkPermissionGrant(o[1]); |
| } |
| |
| core.int buildCounterApplicationPolicy = 0; |
| api.ApplicationPolicy buildApplicationPolicy() { |
| var o = api.ApplicationPolicy(); |
| buildCounterApplicationPolicy++; |
| if (buildCounterApplicationPolicy < 3) { |
| o.accessibleTrackIds = buildUnnamed5212(); |
| o.connectedWorkAndPersonalApp = 'foo'; |
| o.defaultPermissionPolicy = 'foo'; |
| o.delegatedScopes = buildUnnamed5213(); |
| o.disabled = true; |
| o.installType = 'foo'; |
| o.lockTaskAllowed = true; |
| o.managedConfiguration = buildUnnamed5214(); |
| o.managedConfigurationTemplate = buildManagedConfigurationTemplate(); |
| o.minimumVersionCode = 42; |
| o.packageName = 'foo'; |
| o.permissionGrants = buildUnnamed5215(); |
| } |
| buildCounterApplicationPolicy--; |
| return o; |
| } |
| |
| void checkApplicationPolicy(api.ApplicationPolicy o) { |
| buildCounterApplicationPolicy++; |
| if (buildCounterApplicationPolicy < 3) { |
| checkUnnamed5212(o.accessibleTrackIds); |
| unittest.expect(o.connectedWorkAndPersonalApp, unittest.equals('foo')); |
| unittest.expect(o.defaultPermissionPolicy, unittest.equals('foo')); |
| checkUnnamed5213(o.delegatedScopes); |
| unittest.expect(o.disabled, unittest.isTrue); |
| unittest.expect(o.installType, unittest.equals('foo')); |
| unittest.expect(o.lockTaskAllowed, unittest.isTrue); |
| checkUnnamed5214(o.managedConfiguration); |
| checkManagedConfigurationTemplate(o.managedConfigurationTemplate); |
| unittest.expect(o.minimumVersionCode, unittest.equals(42)); |
| unittest.expect(o.packageName, unittest.equals('foo')); |
| checkUnnamed5215(o.permissionGrants); |
| } |
| buildCounterApplicationPolicy--; |
| } |
| |
| core.List<api.ApplicationEvent> buildUnnamed5216() { |
| var o = <api.ApplicationEvent>[]; |
| o.add(buildApplicationEvent()); |
| o.add(buildApplicationEvent()); |
| return o; |
| } |
| |
| void checkUnnamed5216(core.List<api.ApplicationEvent> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkApplicationEvent(o[0]); |
| checkApplicationEvent(o[1]); |
| } |
| |
| core.List<api.KeyedAppState> buildUnnamed5217() { |
| var o = <api.KeyedAppState>[]; |
| o.add(buildKeyedAppState()); |
| o.add(buildKeyedAppState()); |
| return o; |
| } |
| |
| void checkUnnamed5217(core.List<api.KeyedAppState> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkKeyedAppState(o[0]); |
| checkKeyedAppState(o[1]); |
| } |
| |
| core.List<core.String> buildUnnamed5218() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed5218(core.List<core.String> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| unittest.expect(o[0], unittest.equals('foo')); |
| unittest.expect(o[1], unittest.equals('foo')); |
| } |
| |
| core.int buildCounterApplicationReport = 0; |
| api.ApplicationReport buildApplicationReport() { |
| var o = api.ApplicationReport(); |
| buildCounterApplicationReport++; |
| if (buildCounterApplicationReport < 3) { |
| o.applicationSource = 'foo'; |
| o.displayName = 'foo'; |
| o.events = buildUnnamed5216(); |
| o.installerPackageName = 'foo'; |
| o.keyedAppStates = buildUnnamed5217(); |
| o.packageName = 'foo'; |
| o.packageSha256Hash = 'foo'; |
| o.signingKeyCertFingerprints = buildUnnamed5218(); |
| o.state = 'foo'; |
| o.versionCode = 42; |
| o.versionName = 'foo'; |
| } |
| buildCounterApplicationReport--; |
| return o; |
| } |
| |
| void checkApplicationReport(api.ApplicationReport o) { |
| buildCounterApplicationReport++; |
| if (buildCounterApplicationReport < 3) { |
| unittest.expect(o.applicationSource, unittest.equals('foo')); |
| unittest.expect(o.displayName, unittest.equals('foo')); |
| checkUnnamed5216(o.events); |
| unittest.expect(o.installerPackageName, unittest.equals('foo')); |
| checkUnnamed5217(o.keyedAppStates); |
| unittest.expect(o.packageName, unittest.equals('foo')); |
| unittest.expect(o.packageSha256Hash, unittest.equals('foo')); |
| checkUnnamed5218(o.signingKeyCertFingerprints); |
| unittest.expect(o.state, unittest.equals('foo')); |
| unittest.expect(o.versionCode, unittest.equals(42)); |
| unittest.expect(o.versionName, unittest.equals('foo')); |
| } |
| buildCounterApplicationReport--; |
| } |
| |
| core.int buildCounterApplicationReportingSettings = 0; |
| api.ApplicationReportingSettings buildApplicationReportingSettings() { |
| var o = api.ApplicationReportingSettings(); |
| buildCounterApplicationReportingSettings++; |
| if (buildCounterApplicationReportingSettings < 3) { |
| o.includeRemovedApps = true; |
| } |
| buildCounterApplicationReportingSettings--; |
| return o; |
| } |
| |
| void checkApplicationReportingSettings(api.ApplicationReportingSettings o) { |
| buildCounterApplicationReportingSettings++; |
| if (buildCounterApplicationReportingSettings < 3) { |
| unittest.expect(o.includeRemovedApps, unittest.isTrue); |
| } |
| buildCounterApplicationReportingSettings--; |
| } |
| |
| core.int buildCounterBlockAction = 0; |
| api.BlockAction buildBlockAction() { |
| var o = api.BlockAction(); |
| buildCounterBlockAction++; |
| if (buildCounterBlockAction < 3) { |
| o.blockAfterDays = 42; |
| o.blockScope = 'foo'; |
| } |
| buildCounterBlockAction--; |
| return o; |
| } |
| |
| void checkBlockAction(api.BlockAction o) { |
| buildCounterBlockAction++; |
| if (buildCounterBlockAction < 3) { |
| unittest.expect(o.blockAfterDays, unittest.equals(42)); |
| unittest.expect(o.blockScope, unittest.equals('foo')); |
| } |
| buildCounterBlockAction--; |
| } |
| |
| core.List<core.String> buildUnnamed5219() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed5219(core.List<core.String> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| unittest.expect(o[0], unittest.equals('foo')); |
| unittest.expect(o[1], unittest.equals('foo')); |
| } |
| |
| core.int buildCounterChoosePrivateKeyRule = 0; |
| api.ChoosePrivateKeyRule buildChoosePrivateKeyRule() { |
| var o = api.ChoosePrivateKeyRule(); |
| buildCounterChoosePrivateKeyRule++; |
| if (buildCounterChoosePrivateKeyRule < 3) { |
| o.packageNames = buildUnnamed5219(); |
| o.privateKeyAlias = 'foo'; |
| o.urlPattern = 'foo'; |
| } |
| buildCounterChoosePrivateKeyRule--; |
| return o; |
| } |
| |
| void checkChoosePrivateKeyRule(api.ChoosePrivateKeyRule o) { |
| buildCounterChoosePrivateKeyRule++; |
| if (buildCounterChoosePrivateKeyRule < 3) { |
| checkUnnamed5219(o.packageNames); |
| unittest.expect(o.privateKeyAlias, unittest.equals('foo')); |
| unittest.expect(o.urlPattern, unittest.equals('foo')); |
| } |
| buildCounterChoosePrivateKeyRule--; |
| } |
| |
| core.List<core.String> buildUnnamed5220() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed5220(core.List<core.String> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| unittest.expect(o[0], unittest.equals('foo')); |
| unittest.expect(o[1], unittest.equals('foo')); |
| } |
| |
| core.int buildCounterCommand = 0; |
| api.Command buildCommand() { |
| var o = api.Command(); |
| buildCounterCommand++; |
| if (buildCounterCommand < 3) { |
| o.createTime = 'foo'; |
| o.duration = 'foo'; |
| o.errorCode = 'foo'; |
| o.newPassword = 'foo'; |
| o.resetPasswordFlags = buildUnnamed5220(); |
| o.type = 'foo'; |
| o.userName = 'foo'; |
| } |
| buildCounterCommand--; |
| return o; |
| } |
| |
| void checkCommand(api.Command o) { |
| buildCounterCommand++; |
| if (buildCounterCommand < 3) { |
| unittest.expect(o.createTime, unittest.equals('foo')); |
| unittest.expect(o.duration, unittest.equals('foo')); |
| unittest.expect(o.errorCode, unittest.equals('foo')); |
| unittest.expect(o.newPassword, unittest.equals('foo')); |
| checkUnnamed5220(o.resetPasswordFlags); |
| unittest.expect(o.type, unittest.equals('foo')); |
| unittest.expect(o.userName, unittest.equals('foo')); |
| } |
| buildCounterCommand--; |
| } |
| |
| core.List<core.String> buildUnnamed5221() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed5221(core.List<core.String> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| unittest.expect(o[0], unittest.equals('foo')); |
| unittest.expect(o[1], unittest.equals('foo')); |
| } |
| |
| core.int buildCounterComplianceRule = 0; |
| api.ComplianceRule buildComplianceRule() { |
| var o = api.ComplianceRule(); |
| buildCounterComplianceRule++; |
| if (buildCounterComplianceRule < 3) { |
| o.apiLevelCondition = buildApiLevelCondition(); |
| o.disableApps = true; |
| o.nonComplianceDetailCondition = buildNonComplianceDetailCondition(); |
| o.packageNamesToDisable = buildUnnamed5221(); |
| } |
| buildCounterComplianceRule--; |
| return o; |
| } |
| |
| void checkComplianceRule(api.ComplianceRule o) { |
| buildCounterComplianceRule++; |
| if (buildCounterComplianceRule < 3) { |
| checkApiLevelCondition(o.apiLevelCondition); |
| unittest.expect(o.disableApps, unittest.isTrue); |
| checkNonComplianceDetailCondition(o.nonComplianceDetailCondition); |
| checkUnnamed5221(o.packageNamesToDisable); |
| } |
| buildCounterComplianceRule--; |
| } |
| |
| core.int buildCounterDate = 0; |
| api.Date buildDate() { |
| var o = api.Date(); |
| buildCounterDate++; |
| if (buildCounterDate < 3) { |
| o.day = 42; |
| o.month = 42; |
| o.year = 42; |
| } |
| buildCounterDate--; |
| return o; |
| } |
| |
| void checkDate(api.Date o) { |
| buildCounterDate++; |
| if (buildCounterDate < 3) { |
| unittest.expect(o.day, unittest.equals(42)); |
| unittest.expect(o.month, unittest.equals(42)); |
| unittest.expect(o.year, unittest.equals(42)); |
| } |
| buildCounterDate--; |
| } |
| |
| core.List<api.ApplicationReport> buildUnnamed5222() { |
| var o = <api.ApplicationReport>[]; |
| o.add(buildApplicationReport()); |
| o.add(buildApplicationReport()); |
| return o; |
| } |
| |
| void checkUnnamed5222(core.List<api.ApplicationReport> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkApplicationReport(o[0]); |
| checkApplicationReport(o[1]); |
| } |
| |
| core.List<api.Display> buildUnnamed5223() { |
| var o = <api.Display>[]; |
| o.add(buildDisplay()); |
| o.add(buildDisplay()); |
| return o; |
| } |
| |
| void checkUnnamed5223(core.List<api.Display> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkDisplay(o[0]); |
| checkDisplay(o[1]); |
| } |
| |
| core.List<api.HardwareStatus> buildUnnamed5224() { |
| var o = <api.HardwareStatus>[]; |
| o.add(buildHardwareStatus()); |
| o.add(buildHardwareStatus()); |
| return o; |
| } |
| |
| void checkUnnamed5224(core.List<api.HardwareStatus> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkHardwareStatus(o[0]); |
| checkHardwareStatus(o[1]); |
| } |
| |
| core.List<api.MemoryEvent> buildUnnamed5225() { |
| var o = <api.MemoryEvent>[]; |
| o.add(buildMemoryEvent()); |
| o.add(buildMemoryEvent()); |
| return o; |
| } |
| |
| void checkUnnamed5225(core.List<api.MemoryEvent> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkMemoryEvent(o[0]); |
| checkMemoryEvent(o[1]); |
| } |
| |
| core.List<api.NonComplianceDetail> buildUnnamed5226() { |
| var o = <api.NonComplianceDetail>[]; |
| o.add(buildNonComplianceDetail()); |
| o.add(buildNonComplianceDetail()); |
| return o; |
| } |
| |
| void checkUnnamed5226(core.List<api.NonComplianceDetail> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkNonComplianceDetail(o[0]); |
| checkNonComplianceDetail(o[1]); |
| } |
| |
| core.List<api.PowerManagementEvent> buildUnnamed5227() { |
| var o = <api.PowerManagementEvent>[]; |
| o.add(buildPowerManagementEvent()); |
| o.add(buildPowerManagementEvent()); |
| return o; |
| } |
| |
| void checkUnnamed5227(core.List<api.PowerManagementEvent> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkPowerManagementEvent(o[0]); |
| checkPowerManagementEvent(o[1]); |
| } |
| |
| core.List<core.String> buildUnnamed5228() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed5228(core.List<core.String> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| unittest.expect(o[0], unittest.equals('foo')); |
| unittest.expect(o[1], unittest.equals('foo')); |
| } |
| |
| core.Map<core.String, core.String> buildUnnamed5229() { |
| var o = <core.String, core.String>{}; |
| o['x'] = 'foo'; |
| o['y'] = 'foo'; |
| return o; |
| } |
| |
| void checkUnnamed5229(core.Map<core.String, core.String> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| unittest.expect(o['x'], unittest.equals('foo')); |
| unittest.expect(o['y'], unittest.equals('foo')); |
| } |
| |
| core.int buildCounterDevice = 0; |
| api.Device buildDevice() { |
| var o = api.Device(); |
| buildCounterDevice++; |
| if (buildCounterDevice < 3) { |
| o.apiLevel = 42; |
| o.applicationReports = buildUnnamed5222(); |
| o.appliedPolicyName = 'foo'; |
| o.appliedPolicyVersion = 'foo'; |
| o.appliedState = 'foo'; |
| o.deviceSettings = buildDeviceSettings(); |
| o.disabledReason = buildUserFacingMessage(); |
| o.displays = buildUnnamed5223(); |
| o.enrollmentTime = 'foo'; |
| o.enrollmentTokenData = 'foo'; |
| o.enrollmentTokenName = 'foo'; |
| o.hardwareInfo = buildHardwareInfo(); |
| o.hardwareStatusSamples = buildUnnamed5224(); |
| o.lastPolicyComplianceReportTime = 'foo'; |
| o.lastPolicySyncTime = 'foo'; |
| o.lastStatusReportTime = 'foo'; |
| o.managementMode = 'foo'; |
| o.memoryEvents = buildUnnamed5225(); |
| o.memoryInfo = buildMemoryInfo(); |
| o.name = 'foo'; |
| o.networkInfo = buildNetworkInfo(); |
| o.nonComplianceDetails = buildUnnamed5226(); |
| o.ownership = 'foo'; |
| o.policyCompliant = true; |
| o.policyName = 'foo'; |
| o.powerManagementEvents = buildUnnamed5227(); |
| o.previousDeviceNames = buildUnnamed5228(); |
| o.securityPosture = buildSecurityPosture(); |
| o.softwareInfo = buildSoftwareInfo(); |
| o.state = 'foo'; |
| o.systemProperties = buildUnnamed5229(); |
| o.user = buildUser(); |
| o.userName = 'foo'; |
| } |
| buildCounterDevice--; |
| return o; |
| } |
| |
| void checkDevice(api.Device o) { |
| buildCounterDevice++; |
| if (buildCounterDevice < 3) { |
| unittest.expect(o.apiLevel, unittest.equals(42)); |
| checkUnnamed5222(o.applicationReports); |
| unittest.expect(o.appliedPolicyName, unittest.equals('foo')); |
| unittest.expect(o.appliedPolicyVersion, unittest.equals('foo')); |
| unittest.expect(o.appliedState, unittest.equals('foo')); |
| checkDeviceSettings(o.deviceSettings); |
| checkUserFacingMessage(o.disabledReason); |
| checkUnnamed5223(o.displays); |
| unittest.expect(o.enrollmentTime, unittest.equals('foo')); |
| unittest.expect(o.enrollmentTokenData, unittest.equals('foo')); |
| unittest.expect(o.enrollmentTokenName, unittest.equals('foo')); |
| checkHardwareInfo(o.hardwareInfo); |
| checkUnnamed5224(o.hardwareStatusSamples); |
| unittest.expect(o.lastPolicyComplianceReportTime, unittest.equals('foo')); |
| unittest.expect(o.lastPolicySyncTime, unittest.equals('foo')); |
| unittest.expect(o.lastStatusReportTime, unittest.equals('foo')); |
| unittest.expect(o.managementMode, unittest.equals('foo')); |
| checkUnnamed5225(o.memoryEvents); |
| checkMemoryInfo(o.memoryInfo); |
| unittest.expect(o.name, unittest.equals('foo')); |
| checkNetworkInfo(o.networkInfo); |
| checkUnnamed5226(o.nonComplianceDetails); |
| unittest.expect(o.ownership, unittest.equals('foo')); |
| unittest.expect(o.policyCompliant, unittest.isTrue); |
| unittest.expect(o.policyName, unittest.equals('foo')); |
| checkUnnamed5227(o.powerManagementEvents); |
| checkUnnamed5228(o.previousDeviceNames); |
| checkSecurityPosture(o.securityPosture); |
| checkSoftwareInfo(o.softwareInfo); |
| unittest.expect(o.state, unittest.equals('foo')); |
| checkUnnamed5229(o.systemProperties); |
| checkUser(o.user); |
| unittest.expect(o.userName, unittest.equals('foo')); |
| } |
| buildCounterDevice--; |
| } |
| |
| core.int buildCounterDeviceSettings = 0; |
| api.DeviceSettings buildDeviceSettings() { |
| var o = api.DeviceSettings(); |
| buildCounterDeviceSettings++; |
| if (buildCounterDeviceSettings < 3) { |
| o.adbEnabled = true; |
| o.developmentSettingsEnabled = true; |
| o.encryptionStatus = 'foo'; |
| o.isDeviceSecure = true; |
| o.isEncrypted = true; |
| o.unknownSourcesEnabled = true; |
| o.verifyAppsEnabled = true; |
| } |
| buildCounterDeviceSettings--; |
| return o; |
| } |
| |
| void checkDeviceSettings(api.DeviceSettings o) { |
| buildCounterDeviceSettings++; |
| if (buildCounterDeviceSettings < 3) { |
| unittest.expect(o.adbEnabled, unittest.isTrue); |
| unittest.expect(o.developmentSettingsEnabled, unittest.isTrue); |
| unittest.expect(o.encryptionStatus, unittest.equals('foo')); |
| unittest.expect(o.isDeviceSecure, unittest.isTrue); |
| unittest.expect(o.isEncrypted, unittest.isTrue); |
| unittest.expect(o.unknownSourcesEnabled, unittest.isTrue); |
| unittest.expect(o.verifyAppsEnabled, unittest.isTrue); |
| } |
| buildCounterDeviceSettings--; |
| } |
| |
| core.int buildCounterDisplay = 0; |
| api.Display buildDisplay() { |
| var o = api.Display(); |
| buildCounterDisplay++; |
| if (buildCounterDisplay < 3) { |
| o.density = 42; |
| o.displayId = 42; |
| o.height = 42; |
| o.name = 'foo'; |
| o.refreshRate = 42; |
| o.state = 'foo'; |
| o.width = 42; |
| } |
| buildCounterDisplay--; |
| return o; |
| } |
| |
| void checkDisplay(api.Display o) { |
| buildCounterDisplay++; |
| if (buildCounterDisplay < 3) { |
| unittest.expect(o.density, unittest.equals(42)); |
| unittest.expect(o.displayId, unittest.equals(42)); |
| unittest.expect(o.height, unittest.equals(42)); |
| unittest.expect(o.name, unittest.equals('foo')); |
| unittest.expect(o.refreshRate, unittest.equals(42)); |
| unittest.expect(o.state, unittest.equals('foo')); |
| unittest.expect(o.width, unittest.equals(42)); |
| } |
| buildCounterDisplay--; |
| } |
| |
| core.int buildCounterEmpty = 0; |
| api.Empty buildEmpty() { |
| var o = api.Empty(); |
| buildCounterEmpty++; |
| if (buildCounterEmpty < 3) {} |
| buildCounterEmpty--; |
| return o; |
| } |
| |
| void checkEmpty(api.Empty o) { |
| buildCounterEmpty++; |
| if (buildCounterEmpty < 3) {} |
| buildCounterEmpty--; |
| } |
| |
| core.int buildCounterEnrollmentToken = 0; |
| api.EnrollmentToken buildEnrollmentToken() { |
| var o = api.EnrollmentToken(); |
| buildCounterEnrollmentToken++; |
| if (buildCounterEnrollmentToken < 3) { |
| o.additionalData = 'foo'; |
| o.allowPersonalUsage = 'foo'; |
| o.duration = 'foo'; |
| o.expirationTimestamp = 'foo'; |
| o.name = 'foo'; |
| o.oneTimeOnly = true; |
| o.policyName = 'foo'; |
| o.qrCode = 'foo'; |
| o.user = buildUser(); |
| o.value = 'foo'; |
| } |
| buildCounterEnrollmentToken--; |
| return o; |
| } |
| |
| void checkEnrollmentToken(api.EnrollmentToken o) { |
| buildCounterEnrollmentToken++; |
| if (buildCounterEnrollmentToken < 3) { |
| unittest.expect(o.additionalData, unittest.equals('foo')); |
| unittest.expect(o.allowPersonalUsage, unittest.equals('foo')); |
| unittest.expect(o.duration, unittest.equals('foo')); |
| unittest.expect(o.expirationTimestamp, unittest.equals('foo')); |
| unittest.expect(o.name, unittest.equals('foo')); |
| unittest.expect(o.oneTimeOnly, unittest.isTrue); |
| unittest.expect(o.policyName, unittest.equals('foo')); |
| unittest.expect(o.qrCode, unittest.equals('foo')); |
| checkUser(o.user); |
| unittest.expect(o.value, unittest.equals('foo')); |
| } |
| buildCounterEnrollmentToken--; |
| } |
| |
| core.List<core.String> buildUnnamed5230() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed5230(core.List<core.String> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| unittest.expect(o[0], unittest.equals('foo')); |
| unittest.expect(o[1], unittest.equals('foo')); |
| } |
| |
| core.List<api.SigninDetail> buildUnnamed5231() { |
| var o = <api.SigninDetail>[]; |
| o.add(buildSigninDetail()); |
| o.add(buildSigninDetail()); |
| return o; |
| } |
| |
| void checkUnnamed5231(core.List<api.SigninDetail> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkSigninDetail(o[0]); |
| checkSigninDetail(o[1]); |
| } |
| |
| core.List<api.TermsAndConditions> buildUnnamed5232() { |
| var o = <api.TermsAndConditions>[]; |
| o.add(buildTermsAndConditions()); |
| o.add(buildTermsAndConditions()); |
| return o; |
| } |
| |
| void checkUnnamed5232(core.List<api.TermsAndConditions> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkTermsAndConditions(o[0]); |
| checkTermsAndConditions(o[1]); |
| } |
| |
| core.int buildCounterEnterprise = 0; |
| api.Enterprise buildEnterprise() { |
| var o = api.Enterprise(); |
| buildCounterEnterprise++; |
| if (buildCounterEnterprise < 3) { |
| o.appAutoApprovalEnabled = true; |
| o.enabledNotificationTypes = buildUnnamed5230(); |
| o.enterpriseDisplayName = 'foo'; |
| o.logo = buildExternalData(); |
| o.name = 'foo'; |
| o.primaryColor = 42; |
| o.pubsubTopic = 'foo'; |
| o.signinDetails = buildUnnamed5231(); |
| o.termsAndConditions = buildUnnamed5232(); |
| } |
| buildCounterEnterprise--; |
| return o; |
| } |
| |
| void checkEnterprise(api.Enterprise o) { |
| buildCounterEnterprise++; |
| if (buildCounterEnterprise < 3) { |
| unittest.expect(o.appAutoApprovalEnabled, unittest.isTrue); |
| checkUnnamed5230(o.enabledNotificationTypes); |
| unittest.expect(o.enterpriseDisplayName, unittest.equals('foo')); |
| checkExternalData(o.logo); |
| unittest.expect(o.name, unittest.equals('foo')); |
| unittest.expect(o.primaryColor, unittest.equals(42)); |
| unittest.expect(o.pubsubTopic, unittest.equals('foo')); |
| checkUnnamed5231(o.signinDetails); |
| checkUnnamed5232(o.termsAndConditions); |
| } |
| buildCounterEnterprise--; |
| } |
| |
| core.int buildCounterExternalData = 0; |
| api.ExternalData buildExternalData() { |
| var o = api.ExternalData(); |
| buildCounterExternalData++; |
| if (buildCounterExternalData < 3) { |
| o.sha256Hash = 'foo'; |
| o.url = 'foo'; |
| } |
| buildCounterExternalData--; |
| return o; |
| } |
| |
| void checkExternalData(api.ExternalData o) { |
| buildCounterExternalData++; |
| if (buildCounterExternalData < 3) { |
| unittest.expect(o.sha256Hash, unittest.equals('foo')); |
| unittest.expect(o.url, unittest.equals('foo')); |
| } |
| buildCounterExternalData--; |
| } |
| |
| core.int buildCounterFreezePeriod = 0; |
| api.FreezePeriod buildFreezePeriod() { |
| var o = api.FreezePeriod(); |
| buildCounterFreezePeriod++; |
| if (buildCounterFreezePeriod < 3) { |
| o.endDate = buildDate(); |
| o.startDate = buildDate(); |
| } |
| buildCounterFreezePeriod--; |
| return o; |
| } |
| |
| void checkFreezePeriod(api.FreezePeriod o) { |
| buildCounterFreezePeriod++; |
| if (buildCounterFreezePeriod < 3) { |
| checkDate(o.endDate); |
| checkDate(o.startDate); |
| } |
| buildCounterFreezePeriod--; |
| } |
| |
| core.List<core.double> buildUnnamed5233() { |
| var o = <core.double>[]; |
| o.add(42.0); |
| o.add(42.0); |
| return o; |
| } |
| |
| void checkUnnamed5233(core.List<core.double> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| unittest.expect(o[0], unittest.equals(42.0)); |
| unittest.expect(o[1], unittest.equals(42.0)); |
| } |
| |
| core.List<core.double> buildUnnamed5234() { |
| var o = <core.double>[]; |
| o.add(42.0); |
| o.add(42.0); |
| return o; |
| } |
| |
| void checkUnnamed5234(core.List<core.double> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| unittest.expect(o[0], unittest.equals(42.0)); |
| unittest.expect(o[1], unittest.equals(42.0)); |
| } |
| |
| core.List<core.double> buildUnnamed5235() { |
| var o = <core.double>[]; |
| o.add(42.0); |
| o.add(42.0); |
| return o; |
| } |
| |
| void checkUnnamed5235(core.List<core.double> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| unittest.expect(o[0], unittest.equals(42.0)); |
| unittest.expect(o[1], unittest.equals(42.0)); |
| } |
| |
| core.List<core.double> buildUnnamed5236() { |
| var o = <core.double>[]; |
| o.add(42.0); |
| o.add(42.0); |
| return o; |
| } |
| |
| void checkUnnamed5236(core.List<core.double> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| unittest.expect(o[0], unittest.equals(42.0)); |
| unittest.expect(o[1], unittest.equals(42.0)); |
| } |
| |
| core.List<core.double> buildUnnamed5237() { |
| var o = <core.double>[]; |
| o.add(42.0); |
| o.add(42.0); |
| return o; |
| } |
| |
| void checkUnnamed5237(core.List<core.double> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| unittest.expect(o[0], unittest.equals(42.0)); |
| unittest.expect(o[1], unittest.equals(42.0)); |
| } |
| |
| core.List<core.double> buildUnnamed5238() { |
| var o = <core.double>[]; |
| o.add(42.0); |
| o.add(42.0); |
| return o; |
| } |
| |
| void checkUnnamed5238(core.List<core.double> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| unittest.expect(o[0], unittest.equals(42.0)); |
| unittest.expect(o[1], unittest.equals(42.0)); |
| } |
| |
| core.List<core.double> buildUnnamed5239() { |
| var o = <core.double>[]; |
| o.add(42.0); |
| o.add(42.0); |
| return o; |
| } |
| |
| void checkUnnamed5239(core.List<core.double> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| unittest.expect(o[0], unittest.equals(42.0)); |
| unittest.expect(o[1], unittest.equals(42.0)); |
| } |
| |
| core.List<core.double> buildUnnamed5240() { |
| var o = <core.double>[]; |
| o.add(42.0); |
| o.add(42.0); |
| return o; |
| } |
| |
| void checkUnnamed5240(core.List<core.double> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| unittest.expect(o[0], unittest.equals(42.0)); |
| unittest.expect(o[1], unittest.equals(42.0)); |
| } |
| |
| core.int buildCounterHardwareInfo = 0; |
| api.HardwareInfo buildHardwareInfo() { |
| var o = api.HardwareInfo(); |
| buildCounterHardwareInfo++; |
| if (buildCounterHardwareInfo < 3) { |
| o.batteryShutdownTemperatures = buildUnnamed5233(); |
| o.batteryThrottlingTemperatures = buildUnnamed5234(); |
| o.brand = 'foo'; |
| o.cpuShutdownTemperatures = buildUnnamed5235(); |
| o.cpuThrottlingTemperatures = buildUnnamed5236(); |
| o.deviceBasebandVersion = 'foo'; |
| o.gpuShutdownTemperatures = buildUnnamed5237(); |
| o.gpuThrottlingTemperatures = buildUnnamed5238(); |
| o.hardware = 'foo'; |
| o.manufacturer = 'foo'; |
| o.model = 'foo'; |
| o.serialNumber = 'foo'; |
| o.skinShutdownTemperatures = buildUnnamed5239(); |
| o.skinThrottlingTemperatures = buildUnnamed5240(); |
| } |
| buildCounterHardwareInfo--; |
| return o; |
| } |
| |
| void checkHardwareInfo(api.HardwareInfo o) { |
| buildCounterHardwareInfo++; |
| if (buildCounterHardwareInfo < 3) { |
| checkUnnamed5233(o.batteryShutdownTemperatures); |
| checkUnnamed5234(o.batteryThrottlingTemperatures); |
| unittest.expect(o.brand, unittest.equals('foo')); |
| checkUnnamed5235(o.cpuShutdownTemperatures); |
| checkUnnamed5236(o.cpuThrottlingTemperatures); |
| unittest.expect(o.deviceBasebandVersion, unittest.equals('foo')); |
| checkUnnamed5237(o.gpuShutdownTemperatures); |
| checkUnnamed5238(o.gpuThrottlingTemperatures); |
| unittest.expect(o.hardware, unittest.equals('foo')); |
| unittest.expect(o.manufacturer, unittest.equals('foo')); |
| unittest.expect(o.model, unittest.equals('foo')); |
| unittest.expect(o.serialNumber, unittest.equals('foo')); |
| checkUnnamed5239(o.skinShutdownTemperatures); |
| checkUnnamed5240(o.skinThrottlingTemperatures); |
| } |
| buildCounterHardwareInfo--; |
| } |
| |
| core.List<core.double> buildUnnamed5241() { |
| var o = <core.double>[]; |
| o.add(42.0); |
| o.add(42.0); |
| return o; |
| } |
| |
| void checkUnnamed5241(core.List<core.double> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| unittest.expect(o[0], unittest.equals(42.0)); |
| unittest.expect(o[1], unittest.equals(42.0)); |
| } |
| |
| core.List<core.double> buildUnnamed5242() { |
| var o = <core.double>[]; |
| o.add(42.0); |
| o.add(42.0); |
| return o; |
| } |
| |
| void checkUnnamed5242(core.List<core.double> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| unittest.expect(o[0], unittest.equals(42.0)); |
| unittest.expect(o[1], unittest.equals(42.0)); |
| } |
| |
| core.List<core.double> buildUnnamed5243() { |
| var o = <core.double>[]; |
| o.add(42.0); |
| o.add(42.0); |
| return o; |
| } |
| |
| void checkUnnamed5243(core.List<core.double> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| unittest.expect(o[0], unittest.equals(42.0)); |
| unittest.expect(o[1], unittest.equals(42.0)); |
| } |
| |
| core.List<core.double> buildUnnamed5244() { |
| var o = <core.double>[]; |
| o.add(42.0); |
| o.add(42.0); |
| return o; |
| } |
| |
| void checkUnnamed5244(core.List<core.double> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| unittest.expect(o[0], unittest.equals(42.0)); |
| unittest.expect(o[1], unittest.equals(42.0)); |
| } |
| |
| core.List<core.double> buildUnnamed5245() { |
| var o = <core.double>[]; |
| o.add(42.0); |
| o.add(42.0); |
| return o; |
| } |
| |
| void checkUnnamed5245(core.List<core.double> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| unittest.expect(o[0], unittest.equals(42.0)); |
| unittest.expect(o[1], unittest.equals(42.0)); |
| } |
| |
| core.List<core.double> buildUnnamed5246() { |
| var o = <core.double>[]; |
| o.add(42.0); |
| o.add(42.0); |
| return o; |
| } |
| |
| void checkUnnamed5246(core.List<core.double> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| unittest.expect(o[0], unittest.equals(42.0)); |
| unittest.expect(o[1], unittest.equals(42.0)); |
| } |
| |
| core.int buildCounterHardwareStatus = 0; |
| api.HardwareStatus buildHardwareStatus() { |
| var o = api.HardwareStatus(); |
| buildCounterHardwareStatus++; |
| if (buildCounterHardwareStatus < 3) { |
| o.batteryTemperatures = buildUnnamed5241(); |
| o.cpuTemperatures = buildUnnamed5242(); |
| o.cpuUsages = buildUnnamed5243(); |
| o.createTime = 'foo'; |
| o.fanSpeeds = buildUnnamed5244(); |
| o.gpuTemperatures = buildUnnamed5245(); |
| o.skinTemperatures = buildUnnamed5246(); |
| } |
| buildCounterHardwareStatus--; |
| return o; |
| } |
| |
| void checkHardwareStatus(api.HardwareStatus o) { |
| buildCounterHardwareStatus++; |
| if (buildCounterHardwareStatus < 3) { |
| checkUnnamed5241(o.batteryTemperatures); |
| checkUnnamed5242(o.cpuTemperatures); |
| checkUnnamed5243(o.cpuUsages); |
| unittest.expect(o.createTime, unittest.equals('foo')); |
| checkUnnamed5244(o.fanSpeeds); |
| checkUnnamed5245(o.gpuTemperatures); |
| checkUnnamed5246(o.skinTemperatures); |
| } |
| buildCounterHardwareStatus--; |
| } |
| |
| core.int buildCounterKeyedAppState = 0; |
| api.KeyedAppState buildKeyedAppState() { |
| var o = api.KeyedAppState(); |
| buildCounterKeyedAppState++; |
| if (buildCounterKeyedAppState < 3) { |
| o.createTime = 'foo'; |
| o.data = 'foo'; |
| o.key = 'foo'; |
| o.lastUpdateTime = 'foo'; |
| o.message = 'foo'; |
| o.severity = 'foo'; |
| } |
| buildCounterKeyedAppState--; |
| return o; |
| } |
| |
| void checkKeyedAppState(api.KeyedAppState o) { |
| buildCounterKeyedAppState++; |
| if (buildCounterKeyedAppState < 3) { |
| unittest.expect(o.createTime, unittest.equals('foo')); |
| unittest.expect(o.data, unittest.equals('foo')); |
| unittest.expect(o.key, unittest.equals('foo')); |
| unittest.expect(o.lastUpdateTime, unittest.equals('foo')); |
| unittest.expect(o.message, unittest.equals('foo')); |
| unittest.expect(o.severity, unittest.equals('foo')); |
| } |
| buildCounterKeyedAppState--; |
| } |
| |
| core.int buildCounterKioskCustomization = 0; |
| api.KioskCustomization buildKioskCustomization() { |
| var o = api.KioskCustomization(); |
| buildCounterKioskCustomization++; |
| if (buildCounterKioskCustomization < 3) { |
| o.deviceSettings = 'foo'; |
| o.powerButtonActions = 'foo'; |
| o.statusBar = 'foo'; |
| o.systemErrorWarnings = 'foo'; |
| o.systemNavigation = 'foo'; |
| } |
| buildCounterKioskCustomization--; |
| return o; |
| } |
| |
| void checkKioskCustomization(api.KioskCustomization o) { |
| buildCounterKioskCustomization++; |
| if (buildCounterKioskCustomization < 3) { |
| unittest.expect(o.deviceSettings, unittest.equals('foo')); |
| unittest.expect(o.powerButtonActions, unittest.equals('foo')); |
| unittest.expect(o.statusBar, unittest.equals('foo')); |
| unittest.expect(o.systemErrorWarnings, unittest.equals('foo')); |
| unittest.expect(o.systemNavigation, unittest.equals('foo')); |
| } |
| buildCounterKioskCustomization--; |
| } |
| |
| core.int buildCounterLaunchAppAction = 0; |
| api.LaunchAppAction buildLaunchAppAction() { |
| var o = api.LaunchAppAction(); |
| buildCounterLaunchAppAction++; |
| if (buildCounterLaunchAppAction < 3) { |
| o.packageName = 'foo'; |
| } |
| buildCounterLaunchAppAction--; |
| return o; |
| } |
| |
| void checkLaunchAppAction(api.LaunchAppAction o) { |
| buildCounterLaunchAppAction++; |
| if (buildCounterLaunchAppAction < 3) { |
| unittest.expect(o.packageName, unittest.equals('foo')); |
| } |
| buildCounterLaunchAppAction--; |
| } |
| |
| core.List<api.Device> buildUnnamed5247() { |
| var o = <api.Device>[]; |
| o.add(buildDevice()); |
| o.add(buildDevice()); |
| return o; |
| } |
| |
| void checkUnnamed5247(core.List<api.Device> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkDevice(o[0]); |
| checkDevice(o[1]); |
| } |
| |
| core.int buildCounterListDevicesResponse = 0; |
| api.ListDevicesResponse buildListDevicesResponse() { |
| var o = api.ListDevicesResponse(); |
| buildCounterListDevicesResponse++; |
| if (buildCounterListDevicesResponse < 3) { |
| o.devices = buildUnnamed5247(); |
| o.nextPageToken = 'foo'; |
| } |
| buildCounterListDevicesResponse--; |
| return o; |
| } |
| |
| void checkListDevicesResponse(api.ListDevicesResponse o) { |
| buildCounterListDevicesResponse++; |
| if (buildCounterListDevicesResponse < 3) { |
| checkUnnamed5247(o.devices); |
| unittest.expect(o.nextPageToken, unittest.equals('foo')); |
| } |
| buildCounterListDevicesResponse--; |
| } |
| |
| core.List<api.Operation> buildUnnamed5248() { |
| var o = <api.Operation>[]; |
| o.add(buildOperation()); |
| o.add(buildOperation()); |
| return o; |
| } |
| |
| void checkUnnamed5248(core.List<api.Operation> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkOperation(o[0]); |
| checkOperation(o[1]); |
| } |
| |
| core.int buildCounterListOperationsResponse = 0; |
| api.ListOperationsResponse buildListOperationsResponse() { |
| var o = api.ListOperationsResponse(); |
| buildCounterListOperationsResponse++; |
| if (buildCounterListOperationsResponse < 3) { |
| o.nextPageToken = 'foo'; |
| o.operations = buildUnnamed5248(); |
| } |
| buildCounterListOperationsResponse--; |
| return o; |
| } |
| |
| void checkListOperationsResponse(api.ListOperationsResponse o) { |
| buildCounterListOperationsResponse++; |
| if (buildCounterListOperationsResponse < 3) { |
| unittest.expect(o.nextPageToken, unittest.equals('foo')); |
| checkUnnamed5248(o.operations); |
| } |
| buildCounterListOperationsResponse--; |
| } |
| |
| core.List<api.Policy> buildUnnamed5249() { |
| var o = <api.Policy>[]; |
| o.add(buildPolicy()); |
| o.add(buildPolicy()); |
| return o; |
| } |
| |
| void checkUnnamed5249(core.List<api.Policy> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkPolicy(o[0]); |
| checkPolicy(o[1]); |
| } |
| |
| core.int buildCounterListPoliciesResponse = 0; |
| api.ListPoliciesResponse buildListPoliciesResponse() { |
| var o = api.ListPoliciesResponse(); |
| buildCounterListPoliciesResponse++; |
| if (buildCounterListPoliciesResponse < 3) { |
| o.nextPageToken = 'foo'; |
| o.policies = buildUnnamed5249(); |
| } |
| buildCounterListPoliciesResponse--; |
| return o; |
| } |
| |
| void checkListPoliciesResponse(api.ListPoliciesResponse o) { |
| buildCounterListPoliciesResponse++; |
| if (buildCounterListPoliciesResponse < 3) { |
| unittest.expect(o.nextPageToken, unittest.equals('foo')); |
| checkUnnamed5249(o.policies); |
| } |
| buildCounterListPoliciesResponse--; |
| } |
| |
| core.List<api.WebApp> buildUnnamed5250() { |
| var o = <api.WebApp>[]; |
| o.add(buildWebApp()); |
| o.add(buildWebApp()); |
| return o; |
| } |
| |
| void checkUnnamed5250(core.List<api.WebApp> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkWebApp(o[0]); |
| checkWebApp(o[1]); |
| } |
| |
| core.int buildCounterListWebAppsResponse = 0; |
| api.ListWebAppsResponse buildListWebAppsResponse() { |
| var o = api.ListWebAppsResponse(); |
| buildCounterListWebAppsResponse++; |
| if (buildCounterListWebAppsResponse < 3) { |
| o.nextPageToken = 'foo'; |
| o.webApps = buildUnnamed5250(); |
| } |
| buildCounterListWebAppsResponse--; |
| return o; |
| } |
| |
| void checkListWebAppsResponse(api.ListWebAppsResponse o) { |
| buildCounterListWebAppsResponse++; |
| if (buildCounterListWebAppsResponse < 3) { |
| unittest.expect(o.nextPageToken, unittest.equals('foo')); |
| checkUnnamed5250(o.webApps); |
| } |
| buildCounterListWebAppsResponse--; |
| } |
| |
| core.Map<core.String, core.String> buildUnnamed5251() { |
| var o = <core.String, core.String>{}; |
| o['x'] = 'foo'; |
| o['y'] = 'foo'; |
| return o; |
| } |
| |
| void checkUnnamed5251(core.Map<core.String, core.String> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| unittest.expect(o['x'], unittest.equals('foo')); |
| unittest.expect(o['y'], unittest.equals('foo')); |
| } |
| |
| core.int buildCounterManagedConfigurationTemplate = 0; |
| api.ManagedConfigurationTemplate buildManagedConfigurationTemplate() { |
| var o = api.ManagedConfigurationTemplate(); |
| buildCounterManagedConfigurationTemplate++; |
| if (buildCounterManagedConfigurationTemplate < 3) { |
| o.configurationVariables = buildUnnamed5251(); |
| o.templateId = 'foo'; |
| } |
| buildCounterManagedConfigurationTemplate--; |
| return o; |
| } |
| |
| void checkManagedConfigurationTemplate(api.ManagedConfigurationTemplate o) { |
| buildCounterManagedConfigurationTemplate++; |
| if (buildCounterManagedConfigurationTemplate < 3) { |
| checkUnnamed5251(o.configurationVariables); |
| unittest.expect(o.templateId, unittest.equals('foo')); |
| } |
| buildCounterManagedConfigurationTemplate--; |
| } |
| |
| core.List<api.ManagedPropertyEntry> buildUnnamed5252() { |
| var o = <api.ManagedPropertyEntry>[]; |
| o.add(buildManagedPropertyEntry()); |
| o.add(buildManagedPropertyEntry()); |
| return o; |
| } |
| |
| void checkUnnamed5252(core.List<api.ManagedPropertyEntry> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkManagedPropertyEntry(o[0]); |
| checkManagedPropertyEntry(o[1]); |
| } |
| |
| core.List<api.ManagedProperty> buildUnnamed5253() { |
| var o = <api.ManagedProperty>[]; |
| o.add(buildManagedProperty()); |
| o.add(buildManagedProperty()); |
| return o; |
| } |
| |
| void checkUnnamed5253(core.List<api.ManagedProperty> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkManagedProperty(o[0]); |
| checkManagedProperty(o[1]); |
| } |
| |
| core.int buildCounterManagedProperty = 0; |
| api.ManagedProperty buildManagedProperty() { |
| var o = api.ManagedProperty(); |
| buildCounterManagedProperty++; |
| if (buildCounterManagedProperty < 3) { |
| o.defaultValue = { |
| 'list': [1, 2, 3], |
| 'bool': true, |
| 'string': 'foo' |
| }; |
| o.description = 'foo'; |
| o.entries = buildUnnamed5252(); |
| o.key = 'foo'; |
| o.nestedProperties = buildUnnamed5253(); |
| o.title = 'foo'; |
| o.type = 'foo'; |
| } |
| buildCounterManagedProperty--; |
| return o; |
| } |
| |
| void checkManagedProperty(api.ManagedProperty o) { |
| buildCounterManagedProperty++; |
| if (buildCounterManagedProperty < 3) { |
| var casted3 = (o.defaultValue) as core.Map; |
| unittest.expect(casted3, unittest.hasLength(3)); |
| unittest.expect(casted3['list'], unittest.equals([1, 2, 3])); |
| unittest.expect(casted3['bool'], unittest.equals(true)); |
| unittest.expect(casted3['string'], unittest.equals('foo')); |
| unittest.expect(o.description, unittest.equals('foo')); |
| checkUnnamed5252(o.entries); |
| unittest.expect(o.key, unittest.equals('foo')); |
| checkUnnamed5253(o.nestedProperties); |
| unittest.expect(o.title, unittest.equals('foo')); |
| unittest.expect(o.type, unittest.equals('foo')); |
| } |
| buildCounterManagedProperty--; |
| } |
| |
| core.int buildCounterManagedPropertyEntry = 0; |
| api.ManagedPropertyEntry buildManagedPropertyEntry() { |
| var o = api.ManagedPropertyEntry(); |
| buildCounterManagedPropertyEntry++; |
| if (buildCounterManagedPropertyEntry < 3) { |
| o.name = 'foo'; |
| o.value = 'foo'; |
| } |
| buildCounterManagedPropertyEntry--; |
| return o; |
| } |
| |
| void checkManagedPropertyEntry(api.ManagedPropertyEntry o) { |
| buildCounterManagedPropertyEntry++; |
| if (buildCounterManagedPropertyEntry < 3) { |
| unittest.expect(o.name, unittest.equals('foo')); |
| unittest.expect(o.value, unittest.equals('foo')); |
| } |
| buildCounterManagedPropertyEntry--; |
| } |
| |
| core.int buildCounterMemoryEvent = 0; |
| api.MemoryEvent buildMemoryEvent() { |
| var o = api.MemoryEvent(); |
| buildCounterMemoryEvent++; |
| if (buildCounterMemoryEvent < 3) { |
| o.byteCount = 'foo'; |
| o.createTime = 'foo'; |
| o.eventType = 'foo'; |
| } |
| buildCounterMemoryEvent--; |
| return o; |
| } |
| |
| void checkMemoryEvent(api.MemoryEvent o) { |
| buildCounterMemoryEvent++; |
| if (buildCounterMemoryEvent < 3) { |
| unittest.expect(o.byteCount, unittest.equals('foo')); |
| unittest.expect(o.createTime, unittest.equals('foo')); |
| unittest.expect(o.eventType, unittest.equals('foo')); |
| } |
| buildCounterMemoryEvent--; |
| } |
| |
| core.int buildCounterMemoryInfo = 0; |
| api.MemoryInfo buildMemoryInfo() { |
| var o = api.MemoryInfo(); |
| buildCounterMemoryInfo++; |
| if (buildCounterMemoryInfo < 3) { |
| o.totalInternalStorage = 'foo'; |
| o.totalRam = 'foo'; |
| } |
| buildCounterMemoryInfo--; |
| return o; |
| } |
| |
| void checkMemoryInfo(api.MemoryInfo o) { |
| buildCounterMemoryInfo++; |
| if (buildCounterMemoryInfo < 3) { |
| unittest.expect(o.totalInternalStorage, unittest.equals('foo')); |
| unittest.expect(o.totalRam, unittest.equals('foo')); |
| } |
| buildCounterMemoryInfo--; |
| } |
| |
| core.int buildCounterNetworkInfo = 0; |
| api.NetworkInfo buildNetworkInfo() { |
| var o = api.NetworkInfo(); |
| buildCounterNetworkInfo++; |
| if (buildCounterNetworkInfo < 3) { |
| o.imei = 'foo'; |
| o.meid = 'foo'; |
| o.networkOperatorName = 'foo'; |
| o.wifiMacAddress = 'foo'; |
| } |
| buildCounterNetworkInfo--; |
| return o; |
| } |
| |
| void checkNetworkInfo(api.NetworkInfo o) { |
| buildCounterNetworkInfo++; |
| if (buildCounterNetworkInfo < 3) { |
| unittest.expect(o.imei, unittest.equals('foo')); |
| unittest.expect(o.meid, unittest.equals('foo')); |
| unittest.expect(o.networkOperatorName, unittest.equals('foo')); |
| unittest.expect(o.wifiMacAddress, unittest.equals('foo')); |
| } |
| buildCounterNetworkInfo--; |
| } |
| |
| core.int buildCounterNonComplianceDetail = 0; |
| api.NonComplianceDetail buildNonComplianceDetail() { |
| var o = api.NonComplianceDetail(); |
| buildCounterNonComplianceDetail++; |
| if (buildCounterNonComplianceDetail < 3) { |
| o.currentValue = { |
| 'list': [1, 2, 3], |
| 'bool': true, |
| 'string': 'foo' |
| }; |
| o.fieldPath = 'foo'; |
| o.installationFailureReason = 'foo'; |
| o.nonComplianceReason = 'foo'; |
| o.packageName = 'foo'; |
| o.settingName = 'foo'; |
| } |
| buildCounterNonComplianceDetail--; |
| return o; |
| } |
| |
| void checkNonComplianceDetail(api.NonComplianceDetail o) { |
| buildCounterNonComplianceDetail++; |
| if (buildCounterNonComplianceDetail < 3) { |
| var casted4 = (o.currentValue) as core.Map; |
| unittest.expect(casted4, unittest.hasLength(3)); |
| unittest.expect(casted4['list'], unittest.equals([1, 2, 3])); |
| unittest.expect(casted4['bool'], unittest.equals(true)); |
| unittest.expect(casted4['string'], unittest.equals('foo')); |
| unittest.expect(o.fieldPath, unittest.equals('foo')); |
| unittest.expect(o.installationFailureReason, unittest.equals('foo')); |
| unittest.expect(o.nonComplianceReason, unittest.equals('foo')); |
| unittest.expect(o.packageName, unittest.equals('foo')); |
| unittest.expect(o.settingName, unittest.equals('foo')); |
| } |
| buildCounterNonComplianceDetail--; |
| } |
| |
| core.int buildCounterNonComplianceDetailCondition = 0; |
| api.NonComplianceDetailCondition buildNonComplianceDetailCondition() { |
| var o = api.NonComplianceDetailCondition(); |
| buildCounterNonComplianceDetailCondition++; |
| if (buildCounterNonComplianceDetailCondition < 3) { |
| o.nonComplianceReason = 'foo'; |
| o.packageName = 'foo'; |
| o.settingName = 'foo'; |
| } |
| buildCounterNonComplianceDetailCondition--; |
| return o; |
| } |
| |
| void checkNonComplianceDetailCondition(api.NonComplianceDetailCondition o) { |
| buildCounterNonComplianceDetailCondition++; |
| if (buildCounterNonComplianceDetailCondition < 3) { |
| unittest.expect(o.nonComplianceReason, unittest.equals('foo')); |
| unittest.expect(o.packageName, unittest.equals('foo')); |
| unittest.expect(o.settingName, unittest.equals('foo')); |
| } |
| buildCounterNonComplianceDetailCondition--; |
| } |
| |
| core.Map<core.String, core.Object> buildUnnamed5254() { |
| var o = <core.String, core.Object>{}; |
| o['x'] = { |
| 'list': [1, 2, 3], |
| 'bool': true, |
| 'string': 'foo' |
| }; |
| o['y'] = { |
| 'list': [1, 2, 3], |
| 'bool': true, |
| 'string': 'foo' |
| }; |
| return o; |
| } |
| |
| void checkUnnamed5254(core.Map<core.String, core.Object> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| var casted5 = (o['x']) as core.Map; |
| unittest.expect(casted5, unittest.hasLength(3)); |
| unittest.expect(casted5['list'], unittest.equals([1, 2, 3])); |
| unittest.expect(casted5['bool'], unittest.equals(true)); |
| unittest.expect(casted5['string'], unittest.equals('foo')); |
| var casted6 = (o['y']) as core.Map; |
| unittest.expect(casted6, unittest.hasLength(3)); |
| unittest.expect(casted6['list'], unittest.equals([1, 2, 3])); |
| unittest.expect(casted6['bool'], unittest.equals(true)); |
| unittest.expect(casted6['string'], unittest.equals('foo')); |
| } |
| |
| core.Map<core.String, core.Object> buildUnnamed5255() { |
| var o = <core.String, core.Object>{}; |
| o['x'] = { |
| 'list': [1, 2, 3], |
| 'bool': true, |
| 'string': 'foo' |
| }; |
| o['y'] = { |
| 'list': [1, 2, 3], |
| 'bool': true, |
| 'string': 'foo' |
| }; |
| return o; |
| } |
| |
| void checkUnnamed5255(core.Map<core.String, core.Object> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| var casted7 = (o['x']) as core.Map; |
| unittest.expect(casted7, unittest.hasLength(3)); |
| unittest.expect(casted7['list'], unittest.equals([1, 2, 3])); |
| unittest.expect(casted7['bool'], unittest.equals(true)); |
| unittest.expect(casted7['string'], unittest.equals('foo')); |
| var casted8 = (o['y']) as core.Map; |
| unittest.expect(casted8, unittest.hasLength(3)); |
| unittest.expect(casted8['list'], unittest.equals([1, 2, 3])); |
| unittest.expect(casted8['bool'], unittest.equals(true)); |
| unittest.expect(casted8['string'], unittest.equals('foo')); |
| } |
| |
| core.int buildCounterOperation = 0; |
| api.Operation buildOperation() { |
| var o = api.Operation(); |
| buildCounterOperation++; |
| if (buildCounterOperation < 3) { |
| o.done = true; |
| o.error = buildStatus(); |
| o.metadata = buildUnnamed5254(); |
| o.name = 'foo'; |
| o.response = buildUnnamed5255(); |
| } |
| buildCounterOperation--; |
| return o; |
| } |
| |
| void checkOperation(api.Operation o) { |
| buildCounterOperation++; |
| if (buildCounterOperation < 3) { |
| unittest.expect(o.done, unittest.isTrue); |
| checkStatus(o.error); |
| checkUnnamed5254(o.metadata); |
| unittest.expect(o.name, unittest.equals('foo')); |
| checkUnnamed5255(o.response); |
| } |
| buildCounterOperation--; |
| } |
| |
| core.List<core.String> buildUnnamed5256() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed5256(core.List<core.String> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| unittest.expect(o[0], unittest.equals('foo')); |
| unittest.expect(o[1], unittest.equals('foo')); |
| } |
| |
| core.int buildCounterPackageNameList = 0; |
| api.PackageNameList buildPackageNameList() { |
| var o = api.PackageNameList(); |
| buildCounterPackageNameList++; |
| if (buildCounterPackageNameList < 3) { |
| o.packageNames = buildUnnamed5256(); |
| } |
| buildCounterPackageNameList--; |
| return o; |
| } |
| |
| void checkPackageNameList(api.PackageNameList o) { |
| buildCounterPackageNameList++; |
| if (buildCounterPackageNameList < 3) { |
| checkUnnamed5256(o.packageNames); |
| } |
| buildCounterPackageNameList--; |
| } |
| |
| core.int buildCounterPasswordRequirements = 0; |
| api.PasswordRequirements buildPasswordRequirements() { |
| var o = api.PasswordRequirements(); |
| buildCounterPasswordRequirements++; |
| if (buildCounterPasswordRequirements < 3) { |
| o.maximumFailedPasswordsForWipe = 42; |
| o.passwordExpirationTimeout = 'foo'; |
| o.passwordHistoryLength = 42; |
| o.passwordMinimumLength = 42; |
| o.passwordMinimumLetters = 42; |
| o.passwordMinimumLowerCase = 42; |
| o.passwordMinimumNonLetter = 42; |
| o.passwordMinimumNumeric = 42; |
| o.passwordMinimumSymbols = 42; |
| o.passwordMinimumUpperCase = 42; |
| o.passwordQuality = 'foo'; |
| o.passwordScope = 'foo'; |
| o.requirePasswordUnlock = 'foo'; |
| } |
| buildCounterPasswordRequirements--; |
| return o; |
| } |
| |
| void checkPasswordRequirements(api.PasswordRequirements o) { |
| buildCounterPasswordRequirements++; |
| if (buildCounterPasswordRequirements < 3) { |
| unittest.expect(o.maximumFailedPasswordsForWipe, unittest.equals(42)); |
| unittest.expect(o.passwordExpirationTimeout, unittest.equals('foo')); |
| unittest.expect(o.passwordHistoryLength, unittest.equals(42)); |
| unittest.expect(o.passwordMinimumLength, unittest.equals(42)); |
| unittest.expect(o.passwordMinimumLetters, unittest.equals(42)); |
| unittest.expect(o.passwordMinimumLowerCase, unittest.equals(42)); |
| unittest.expect(o.passwordMinimumNonLetter, unittest.equals(42)); |
| unittest.expect(o.passwordMinimumNumeric, unittest.equals(42)); |
| unittest.expect(o.passwordMinimumSymbols, unittest.equals(42)); |
| unittest.expect(o.passwordMinimumUpperCase, unittest.equals(42)); |
| unittest.expect(o.passwordQuality, unittest.equals('foo')); |
| unittest.expect(o.passwordScope, unittest.equals('foo')); |
| unittest.expect(o.requirePasswordUnlock, unittest.equals('foo')); |
| } |
| buildCounterPasswordRequirements--; |
| } |
| |
| core.int buildCounterPermissionGrant = 0; |
| api.PermissionGrant buildPermissionGrant() { |
| var o = api.PermissionGrant(); |
| buildCounterPermissionGrant++; |
| if (buildCounterPermissionGrant < 3) { |
| o.permission = 'foo'; |
| o.policy = 'foo'; |
| } |
| buildCounterPermissionGrant--; |
| return o; |
| } |
| |
| void checkPermissionGrant(api.PermissionGrant o) { |
| buildCounterPermissionGrant++; |
| if (buildCounterPermissionGrant < 3) { |
| unittest.expect(o.permission, unittest.equals('foo')); |
| unittest.expect(o.policy, unittest.equals('foo')); |
| } |
| buildCounterPermissionGrant--; |
| } |
| |
| core.List<core.String> buildUnnamed5257() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed5257(core.List<core.String> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| unittest.expect(o[0], unittest.equals('foo')); |
| unittest.expect(o[1], unittest.equals('foo')); |
| } |
| |
| core.List<core.String> buildUnnamed5258() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed5258(core.List<core.String> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| unittest.expect(o[0], unittest.equals('foo')); |
| unittest.expect(o[1], unittest.equals('foo')); |
| } |
| |
| core.int buildCounterPersistentPreferredActivity = 0; |
| api.PersistentPreferredActivity buildPersistentPreferredActivity() { |
| var o = api.PersistentPreferredActivity(); |
| buildCounterPersistentPreferredActivity++; |
| if (buildCounterPersistentPreferredActivity < 3) { |
| o.actions = buildUnnamed5257(); |
| o.categories = buildUnnamed5258(); |
| o.receiverActivity = 'foo'; |
| } |
| buildCounterPersistentPreferredActivity--; |
| return o; |
| } |
| |
| void checkPersistentPreferredActivity(api.PersistentPreferredActivity o) { |
| buildCounterPersistentPreferredActivity++; |
| if (buildCounterPersistentPreferredActivity < 3) { |
| checkUnnamed5257(o.actions); |
| checkUnnamed5258(o.categories); |
| unittest.expect(o.receiverActivity, unittest.equals('foo')); |
| } |
| buildCounterPersistentPreferredActivity--; |
| } |
| |
| core.int buildCounterPersonalApplicationPolicy = 0; |
| api.PersonalApplicationPolicy buildPersonalApplicationPolicy() { |
| var o = api.PersonalApplicationPolicy(); |
| buildCounterPersonalApplicationPolicy++; |
| if (buildCounterPersonalApplicationPolicy < 3) { |
| o.installType = 'foo'; |
| o.packageName = 'foo'; |
| } |
| buildCounterPersonalApplicationPolicy--; |
| return o; |
| } |
| |
| void checkPersonalApplicationPolicy(api.PersonalApplicationPolicy o) { |
| buildCounterPersonalApplicationPolicy++; |
| if (buildCounterPersonalApplicationPolicy < 3) { |
| unittest.expect(o.installType, unittest.equals('foo')); |
| unittest.expect(o.packageName, unittest.equals('foo')); |
| } |
| buildCounterPersonalApplicationPolicy--; |
| } |
| |
| core.List<core.String> buildUnnamed5259() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed5259(core.List<core.String> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| unittest.expect(o[0], unittest.equals('foo')); |
| unittest.expect(o[1], unittest.equals('foo')); |
| } |
| |
| core.List<api.PersonalApplicationPolicy> buildUnnamed5260() { |
| var o = <api.PersonalApplicationPolicy>[]; |
| o.add(buildPersonalApplicationPolicy()); |
| o.add(buildPersonalApplicationPolicy()); |
| return o; |
| } |
| |
| void checkUnnamed5260(core.List<api.PersonalApplicationPolicy> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkPersonalApplicationPolicy(o[0]); |
| checkPersonalApplicationPolicy(o[1]); |
| } |
| |
| core.int buildCounterPersonalUsagePolicies = 0; |
| api.PersonalUsagePolicies buildPersonalUsagePolicies() { |
| var o = api.PersonalUsagePolicies(); |
| buildCounterPersonalUsagePolicies++; |
| if (buildCounterPersonalUsagePolicies < 3) { |
| o.accountTypesWithManagementDisabled = buildUnnamed5259(); |
| o.cameraDisabled = true; |
| o.maxDaysWithWorkOff = 42; |
| o.personalApplications = buildUnnamed5260(); |
| o.personalPlayStoreMode = 'foo'; |
| o.screenCaptureDisabled = true; |
| } |
| buildCounterPersonalUsagePolicies--; |
| return o; |
| } |
| |
| void checkPersonalUsagePolicies(api.PersonalUsagePolicies o) { |
| buildCounterPersonalUsagePolicies++; |
| if (buildCounterPersonalUsagePolicies < 3) { |
| checkUnnamed5259(o.accountTypesWithManagementDisabled); |
| unittest.expect(o.cameraDisabled, unittest.isTrue); |
| unittest.expect(o.maxDaysWithWorkOff, unittest.equals(42)); |
| checkUnnamed5260(o.personalApplications); |
| unittest.expect(o.personalPlayStoreMode, unittest.equals('foo')); |
| unittest.expect(o.screenCaptureDisabled, unittest.isTrue); |
| } |
| buildCounterPersonalUsagePolicies--; |
| } |
| |
| core.List<core.String> buildUnnamed5261() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed5261(core.List<core.String> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| unittest.expect(o[0], unittest.equals('foo')); |
| unittest.expect(o[1], unittest.equals('foo')); |
| } |
| |
| core.List<core.String> buildUnnamed5262() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed5262(core.List<core.String> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| unittest.expect(o[0], unittest.equals('foo')); |
| unittest.expect(o[1], unittest.equals('foo')); |
| } |
| |
| core.List<api.ApplicationPolicy> buildUnnamed5263() { |
| var o = <api.ApplicationPolicy>[]; |
| o.add(buildApplicationPolicy()); |
| o.add(buildApplicationPolicy()); |
| return o; |
| } |
| |
| void checkUnnamed5263(core.List<api.ApplicationPolicy> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkApplicationPolicy(o[0]); |
| checkApplicationPolicy(o[1]); |
| } |
| |
| core.List<api.ChoosePrivateKeyRule> buildUnnamed5264() { |
| var o = <api.ChoosePrivateKeyRule>[]; |
| o.add(buildChoosePrivateKeyRule()); |
| o.add(buildChoosePrivateKeyRule()); |
| return o; |
| } |
| |
| void checkUnnamed5264(core.List<api.ChoosePrivateKeyRule> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkChoosePrivateKeyRule(o[0]); |
| checkChoosePrivateKeyRule(o[1]); |
| } |
| |
| core.List<api.ComplianceRule> buildUnnamed5265() { |
| var o = <api.ComplianceRule>[]; |
| o.add(buildComplianceRule()); |
| o.add(buildComplianceRule()); |
| return o; |
| } |
| |
| void checkUnnamed5265(core.List<api.ComplianceRule> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkComplianceRule(o[0]); |
| checkComplianceRule(o[1]); |
| } |
| |
| core.List<core.String> buildUnnamed5266() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed5266(core.List<core.String> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| unittest.expect(o[0], unittest.equals('foo')); |
| unittest.expect(o[1], unittest.equals('foo')); |
| } |
| |
| core.List<core.String> buildUnnamed5267() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed5267(core.List<core.String> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| unittest.expect(o[0], unittest.equals('foo')); |
| unittest.expect(o[1], unittest.equals('foo')); |
| } |
| |
| core.Map<core.String, core.Object> buildUnnamed5268() { |
| var o = <core.String, core.Object>{}; |
| o['x'] = { |
| 'list': [1, 2, 3], |
| 'bool': true, |
| 'string': 'foo' |
| }; |
| o['y'] = { |
| 'list': [1, 2, 3], |
| 'bool': true, |
| 'string': 'foo' |
| }; |
| return o; |
| } |
| |
| void checkUnnamed5268(core.Map<core.String, core.Object> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| var casted9 = (o['x']) as core.Map; |
| unittest.expect(casted9, unittest.hasLength(3)); |
| unittest.expect(casted9['list'], unittest.equals([1, 2, 3])); |
| unittest.expect(casted9['bool'], unittest.equals(true)); |
| unittest.expect(casted9['string'], unittest.equals('foo')); |
| var casted10 = (o['y']) as core.Map; |
| unittest.expect(casted10, unittest.hasLength(3)); |
| unittest.expect(casted10['list'], unittest.equals([1, 2, 3])); |
| unittest.expect(casted10['bool'], unittest.equals(true)); |
| unittest.expect(casted10['string'], unittest.equals('foo')); |
| } |
| |
| core.List<api.PasswordRequirements> buildUnnamed5269() { |
| var o = <api.PasswordRequirements>[]; |
| o.add(buildPasswordRequirements()); |
| o.add(buildPasswordRequirements()); |
| return o; |
| } |
| |
| void checkUnnamed5269(core.List<api.PasswordRequirements> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkPasswordRequirements(o[0]); |
| checkPasswordRequirements(o[1]); |
| } |
| |
| core.List<api.PermissionGrant> buildUnnamed5270() { |
| var o = <api.PermissionGrant>[]; |
| o.add(buildPermissionGrant()); |
| o.add(buildPermissionGrant()); |
| return o; |
| } |
| |
| void checkUnnamed5270(core.List<api.PermissionGrant> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkPermissionGrant(o[0]); |
| checkPermissionGrant(o[1]); |
| } |
| |
| core.List<api.PersistentPreferredActivity> buildUnnamed5271() { |
| var o = <api.PersistentPreferredActivity>[]; |
| o.add(buildPersistentPreferredActivity()); |
| o.add(buildPersistentPreferredActivity()); |
| return o; |
| } |
| |
| void checkUnnamed5271(core.List<api.PersistentPreferredActivity> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkPersistentPreferredActivity(o[0]); |
| checkPersistentPreferredActivity(o[1]); |
| } |
| |
| core.List<api.PolicyEnforcementRule> buildUnnamed5272() { |
| var o = <api.PolicyEnforcementRule>[]; |
| o.add(buildPolicyEnforcementRule()); |
| o.add(buildPolicyEnforcementRule()); |
| return o; |
| } |
| |
| void checkUnnamed5272(core.List<api.PolicyEnforcementRule> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkPolicyEnforcementRule(o[0]); |
| checkPolicyEnforcementRule(o[1]); |
| } |
| |
| core.List<api.SetupAction> buildUnnamed5273() { |
| var o = <api.SetupAction>[]; |
| o.add(buildSetupAction()); |
| o.add(buildSetupAction()); |
| return o; |
| } |
| |
| void checkUnnamed5273(core.List<api.SetupAction> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkSetupAction(o[0]); |
| checkSetupAction(o[1]); |
| } |
| |
| core.List<core.String> buildUnnamed5274() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed5274(core.List<core.String> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| unittest.expect(o[0], unittest.equals('foo')); |
| unittest.expect(o[1], unittest.equals('foo')); |
| } |
| |
| core.int buildCounterPolicy = 0; |
| api.Policy buildPolicy() { |
| var o = api.Policy(); |
| buildCounterPolicy++; |
| if (buildCounterPolicy < 3) { |
| o.accountTypesWithManagementDisabled = buildUnnamed5261(); |
| o.addUserDisabled = true; |
| o.adjustVolumeDisabled = true; |
| o.advancedSecurityOverrides = buildAdvancedSecurityOverrides(); |
| o.alwaysOnVpnPackage = buildAlwaysOnVpnPackage(); |
| o.androidDevicePolicyTracks = buildUnnamed5262(); |
| o.appAutoUpdatePolicy = 'foo'; |
| o.applications = buildUnnamed5263(); |
| o.autoTimeRequired = true; |
| o.blockApplicationsEnabled = true; |
| o.bluetoothConfigDisabled = true; |
| o.bluetoothContactSharingDisabled = true; |
| o.bluetoothDisabled = true; |
| o.cameraDisabled = true; |
| o.cellBroadcastsConfigDisabled = true; |
| o.choosePrivateKeyRules = buildUnnamed5264(); |
| o.complianceRules = buildUnnamed5265(); |
| o.createWindowsDisabled = true; |
| o.credentialsConfigDisabled = true; |
| o.dataRoamingDisabled = true; |
| o.debuggingFeaturesAllowed = true; |
| o.defaultPermissionPolicy = 'foo'; |
| o.deviceOwnerLockScreenInfo = buildUserFacingMessage(); |
| o.encryptionPolicy = 'foo'; |
| o.ensureVerifyAppsEnabled = true; |
| o.factoryResetDisabled = true; |
| o.frpAdminEmails = buildUnnamed5266(); |
| o.funDisabled = true; |
| o.installAppsDisabled = true; |
| o.installUnknownSourcesAllowed = true; |
| o.keyguardDisabled = true; |
| o.keyguardDisabledFeatures = buildUnnamed5267(); |
| o.kioskCustomLauncherEnabled = true; |
| o.kioskCustomization = buildKioskCustomization(); |
| o.locationMode = 'foo'; |
| o.longSupportMessage = buildUserFacingMessage(); |
| o.maximumTimeToLock = 'foo'; |
| o.minimumApiLevel = 42; |
| o.mobileNetworksConfigDisabled = true; |
| o.modifyAccountsDisabled = true; |
| o.mountPhysicalMediaDisabled = true; |
| o.name = 'foo'; |
| o.networkEscapeHatchEnabled = true; |
| o.networkResetDisabled = true; |
| o.openNetworkConfiguration = buildUnnamed5268(); |
| o.outgoingBeamDisabled = true; |
| o.outgoingCallsDisabled = true; |
| o.passwordPolicies = buildUnnamed5269(); |
| o.passwordRequirements = buildPasswordRequirements(); |
| o.permissionGrants = buildUnnamed5270(); |
| o.permittedAccessibilityServices = buildPackageNameList(); |
| o.permittedInputMethods = buildPackageNameList(); |
| o.persistentPreferredActivities = buildUnnamed5271(); |
| o.personalUsagePolicies = buildPersonalUsagePolicies(); |
| o.playStoreMode = 'foo'; |
| o.policyEnforcementRules = buildUnnamed5272(); |
| o.privateKeySelectionEnabled = true; |
| o.recommendedGlobalProxy = buildProxyInfo(); |
| o.removeUserDisabled = true; |
| o.safeBootDisabled = true; |
| o.screenCaptureDisabled = true; |
| o.setUserIconDisabled = true; |
| o.setWallpaperDisabled = true; |
| o.setupActions = buildUnnamed5273(); |
| o.shareLocationDisabled = true; |
| o.shortSupportMessage = buildUserFacingMessage(); |
| o.skipFirstUseHintsEnabled = true; |
| o.smsDisabled = true; |
| o.statusBarDisabled = true; |
| o.statusReportingSettings = buildStatusReportingSettings(); |
| o.stayOnPluggedModes = buildUnnamed5274(); |
| o.systemUpdate = buildSystemUpdate(); |
| o.tetheringConfigDisabled = true; |
| o.uninstallAppsDisabled = true; |
| o.unmuteMicrophoneDisabled = true; |
| o.usbFileTransferDisabled = true; |
| o.usbMassStorageEnabled = true; |
| o.version = 'foo'; |
| o.vpnConfigDisabled = true; |
| o.wifiConfigDisabled = true; |
| o.wifiConfigsLockdownEnabled = true; |
| } |
| buildCounterPolicy--; |
| return o; |
| } |
| |
| void checkPolicy(api.Policy o) { |
| buildCounterPolicy++; |
| if (buildCounterPolicy < 3) { |
| checkUnnamed5261(o.accountTypesWithManagementDisabled); |
| unittest.expect(o.addUserDisabled, unittest.isTrue); |
| unittest.expect(o.adjustVolumeDisabled, unittest.isTrue); |
| checkAdvancedSecurityOverrides(o.advancedSecurityOverrides); |
| checkAlwaysOnVpnPackage(o.alwaysOnVpnPackage); |
| checkUnnamed5262(o.androidDevicePolicyTracks); |
| unittest.expect(o.appAutoUpdatePolicy, unittest.equals('foo')); |
| checkUnnamed5263(o.applications); |
| unittest.expect(o.autoTimeRequired, unittest.isTrue); |
| unittest.expect(o.blockApplicationsEnabled, unittest.isTrue); |
| unittest.expect(o.bluetoothConfigDisabled, unittest.isTrue); |
| unittest.expect(o.bluetoothContactSharingDisabled, unittest.isTrue); |
| unittest.expect(o.bluetoothDisabled, unittest.isTrue); |
| unittest.expect(o.cameraDisabled, unittest.isTrue); |
| unittest.expect(o.cellBroadcastsConfigDisabled, unittest.isTrue); |
| checkUnnamed5264(o.choosePrivateKeyRules); |
| checkUnnamed5265(o.complianceRules); |
| unittest.expect(o.createWindowsDisabled, unittest.isTrue); |
| unittest.expect(o.credentialsConfigDisabled, unittest.isTrue); |
| unittest.expect(o.dataRoamingDisabled, unittest.isTrue); |
| unittest.expect(o.debuggingFeaturesAllowed, unittest.isTrue); |
| unittest.expect(o.defaultPermissionPolicy, unittest.equals('foo')); |
| checkUserFacingMessage(o.deviceOwnerLockScreenInfo); |
| unittest.expect(o.encryptionPolicy, unittest.equals('foo')); |
| unittest.expect(o.ensureVerifyAppsEnabled, unittest.isTrue); |
| unittest.expect(o.factoryResetDisabled, unittest.isTrue); |
| checkUnnamed5266(o.frpAdminEmails); |
| unittest.expect(o.funDisabled, unittest.isTrue); |
| unittest.expect(o.installAppsDisabled, unittest.isTrue); |
| unittest.expect(o.installUnknownSourcesAllowed, unittest.isTrue); |
| unittest.expect(o.keyguardDisabled, unittest.isTrue); |
| checkUnnamed5267(o.keyguardDisabledFeatures); |
| unittest.expect(o.kioskCustomLauncherEnabled, unittest.isTrue); |
| checkKioskCustomization(o.kioskCustomization); |
| unittest.expect(o.locationMode, unittest.equals('foo')); |
| checkUserFacingMessage(o.longSupportMessage); |
| unittest.expect(o.maximumTimeToLock, unittest.equals('foo')); |
| unittest.expect(o.minimumApiLevel, unittest.equals(42)); |
| unittest.expect(o.mobileNetworksConfigDisabled, unittest.isTrue); |
| unittest.expect(o.modifyAccountsDisabled, unittest.isTrue); |
| unittest.expect(o.mountPhysicalMediaDisabled, unittest.isTrue); |
| unittest.expect(o.name, unittest.equals('foo')); |
| unittest.expect(o.networkEscapeHatchEnabled, unittest.isTrue); |
| unittest.expect(o.networkResetDisabled, unittest.isTrue); |
| checkUnnamed5268(o.openNetworkConfiguration); |
| unittest.expect(o.outgoingBeamDisabled, unittest.isTrue); |
| unittest.expect(o.outgoingCallsDisabled, unittest.isTrue); |
| checkUnnamed5269(o.passwordPolicies); |
| checkPasswordRequirements(o.passwordRequirements); |
| checkUnnamed5270(o.permissionGrants); |
| checkPackageNameList(o.permittedAccessibilityServices); |
| checkPackageNameList(o.permittedInputMethods); |
| checkUnnamed5271(o.persistentPreferredActivities); |
| checkPersonalUsagePolicies(o.personalUsagePolicies); |
| unittest.expect(o.playStoreMode, unittest.equals('foo')); |
| checkUnnamed5272(o.policyEnforcementRules); |
| unittest.expect(o.privateKeySelectionEnabled, unittest.isTrue); |
| checkProxyInfo(o.recommendedGlobalProxy); |
| unittest.expect(o.removeUserDisabled, unittest.isTrue); |
| unittest.expect(o.safeBootDisabled, unittest.isTrue); |
| unittest.expect(o.screenCaptureDisabled, unittest.isTrue); |
| unittest.expect(o.setUserIconDisabled, unittest.isTrue); |
| unittest.expect(o.setWallpaperDisabled, unittest.isTrue); |
| checkUnnamed5273(o.setupActions); |
| unittest.expect(o.shareLocationDisabled, unittest.isTrue); |
| checkUserFacingMessage(o.shortSupportMessage); |
| unittest.expect(o.skipFirstUseHintsEnabled, unittest.isTrue); |
| unittest.expect(o.smsDisabled, unittest.isTrue); |
| unittest.expect(o.statusBarDisabled, unittest.isTrue); |
| checkStatusReportingSettings(o.statusReportingSettings); |
| checkUnnamed5274(o.stayOnPluggedModes); |
| checkSystemUpdate(o.systemUpdate); |
| unittest.expect(o.tetheringConfigDisabled, unittest.isTrue); |
| unittest.expect(o.uninstallAppsDisabled, unittest.isTrue); |
| unittest.expect(o.unmuteMicrophoneDisabled, unittest.isTrue); |
| unittest.expect(o.usbFileTransferDisabled, unittest.isTrue); |
| unittest.expect(o.usbMassStorageEnabled, unittest.isTrue); |
| unittest.expect(o.version, unittest.equals('foo')); |
| unittest.expect(o.vpnConfigDisabled, unittest.isTrue); |
| unittest.expect(o.wifiConfigDisabled, unittest.isTrue); |
| unittest.expect(o.wifiConfigsLockdownEnabled, unittest.isTrue); |
| } |
| buildCounterPolicy--; |
| } |
| |
| core.int buildCounterPolicyEnforcementRule = 0; |
| api.PolicyEnforcementRule buildPolicyEnforcementRule() { |
| var o = api.PolicyEnforcementRule(); |
| buildCounterPolicyEnforcementRule++; |
| if (buildCounterPolicyEnforcementRule < 3) { |
| o.blockAction = buildBlockAction(); |
| o.settingName = 'foo'; |
| o.wipeAction = buildWipeAction(); |
| } |
| buildCounterPolicyEnforcementRule--; |
| return o; |
| } |
| |
| void checkPolicyEnforcementRule(api.PolicyEnforcementRule o) { |
| buildCounterPolicyEnforcementRule++; |
| if (buildCounterPolicyEnforcementRule < 3) { |
| checkBlockAction(o.blockAction); |
| unittest.expect(o.settingName, unittest.equals('foo')); |
| checkWipeAction(o.wipeAction); |
| } |
| buildCounterPolicyEnforcementRule--; |
| } |
| |
| core.List<api.UserFacingMessage> buildUnnamed5275() { |
| var o = <api.UserFacingMessage>[]; |
| o.add(buildUserFacingMessage()); |
| o.add(buildUserFacingMessage()); |
| return o; |
| } |
| |
| void checkUnnamed5275(core.List<api.UserFacingMessage> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkUserFacingMessage(o[0]); |
| checkUserFacingMessage(o[1]); |
| } |
| |
| core.int buildCounterPostureDetail = 0; |
| api.PostureDetail buildPostureDetail() { |
| var o = api.PostureDetail(); |
| buildCounterPostureDetail++; |
| if (buildCounterPostureDetail < 3) { |
| o.advice = buildUnnamed5275(); |
| o.securityRisk = 'foo'; |
| } |
| buildCounterPostureDetail--; |
| return o; |
| } |
| |
| void checkPostureDetail(api.PostureDetail o) { |
| buildCounterPostureDetail++; |
| if (buildCounterPostureDetail < 3) { |
| checkUnnamed5275(o.advice); |
| unittest.expect(o.securityRisk, unittest.equals('foo')); |
| } |
| buildCounterPostureDetail--; |
| } |
| |
| core.int buildCounterPowerManagementEvent = 0; |
| api.PowerManagementEvent buildPowerManagementEvent() { |
| var o = api.PowerManagementEvent(); |
| buildCounterPowerManagementEvent++; |
| if (buildCounterPowerManagementEvent < 3) { |
| o.batteryLevel = 42.0; |
| o.createTime = 'foo'; |
| o.eventType = 'foo'; |
| } |
| buildCounterPowerManagementEvent--; |
| return o; |
| } |
| |
| void checkPowerManagementEvent(api.PowerManagementEvent o) { |
| buildCounterPowerManagementEvent++; |
| if (buildCounterPowerManagementEvent < 3) { |
| unittest.expect(o.batteryLevel, unittest.equals(42.0)); |
| unittest.expect(o.createTime, unittest.equals('foo')); |
| unittest.expect(o.eventType, unittest.equals('foo')); |
| } |
| buildCounterPowerManagementEvent--; |
| } |
| |
| core.List<core.String> buildUnnamed5276() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed5276(core.List<core.String> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| unittest.expect(o[0], unittest.equals('foo')); |
| unittest.expect(o[1], unittest.equals('foo')); |
| } |
| |
| core.int buildCounterProxyInfo = 0; |
| api.ProxyInfo buildProxyInfo() { |
| var o = api.ProxyInfo(); |
| buildCounterProxyInfo++; |
| if (buildCounterProxyInfo < 3) { |
| o.excludedHosts = buildUnnamed5276(); |
| o.host = 'foo'; |
| o.pacUri = 'foo'; |
| o.port = 42; |
| } |
| buildCounterProxyInfo--; |
| return o; |
| } |
| |
| void checkProxyInfo(api.ProxyInfo o) { |
| buildCounterProxyInfo++; |
| if (buildCounterProxyInfo < 3) { |
| checkUnnamed5276(o.excludedHosts); |
| unittest.expect(o.host, unittest.equals('foo')); |
| unittest.expect(o.pacUri, unittest.equals('foo')); |
| unittest.expect(o.port, unittest.equals(42)); |
| } |
| buildCounterProxyInfo--; |
| } |
| |
| core.List<api.PostureDetail> buildUnnamed5277() { |
| var o = <api.PostureDetail>[]; |
| o.add(buildPostureDetail()); |
| o.add(buildPostureDetail()); |
| return o; |
| } |
| |
| void checkUnnamed5277(core.List<api.PostureDetail> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkPostureDetail(o[0]); |
| checkPostureDetail(o[1]); |
| } |
| |
| core.int buildCounterSecurityPosture = 0; |
| api.SecurityPosture buildSecurityPosture() { |
| var o = api.SecurityPosture(); |
| buildCounterSecurityPosture++; |
| if (buildCounterSecurityPosture < 3) { |
| o.devicePosture = 'foo'; |
| o.postureDetails = buildUnnamed5277(); |
| } |
| buildCounterSecurityPosture--; |
| return o; |
| } |
| |
| void checkSecurityPosture(api.SecurityPosture o) { |
| buildCounterSecurityPosture++; |
| if (buildCounterSecurityPosture < 3) { |
| unittest.expect(o.devicePosture, unittest.equals('foo')); |
| checkUnnamed5277(o.postureDetails); |
| } |
| buildCounterSecurityPosture--; |
| } |
| |
| core.int buildCounterSetupAction = 0; |
| api.SetupAction buildSetupAction() { |
| var o = api.SetupAction(); |
| buildCounterSetupAction++; |
| if (buildCounterSetupAction < 3) { |
| o.description = buildUserFacingMessage(); |
| o.launchApp = buildLaunchAppAction(); |
| o.title = buildUserFacingMessage(); |
| } |
| buildCounterSetupAction--; |
| return o; |
| } |
| |
| void checkSetupAction(api.SetupAction o) { |
| buildCounterSetupAction++; |
| if (buildCounterSetupAction < 3) { |
| checkUserFacingMessage(o.description); |
| checkLaunchAppAction(o.launchApp); |
| checkUserFacingMessage(o.title); |
| } |
| buildCounterSetupAction--; |
| } |
| |
| core.int buildCounterSigninDetail = 0; |
| api.SigninDetail buildSigninDetail() { |
| var o = api.SigninDetail(); |
| buildCounterSigninDetail++; |
| if (buildCounterSigninDetail < 3) { |
| o.allowPersonalUsage = 'foo'; |
| o.qrCode = 'foo'; |
| o.signinEnrollmentToken = 'foo'; |
| o.signinUrl = 'foo'; |
| } |
| buildCounterSigninDetail--; |
| return o; |
| } |
| |
| void checkSigninDetail(api.SigninDetail o) { |
| buildCounterSigninDetail++; |
| if (buildCounterSigninDetail < 3) { |
| unittest.expect(o.allowPersonalUsage, unittest.equals('foo')); |
| unittest.expect(o.qrCode, unittest.equals('foo')); |
| unittest.expect(o.signinEnrollmentToken, unittest.equals('foo')); |
| unittest.expect(o.signinUrl, unittest.equals('foo')); |
| } |
| buildCounterSigninDetail--; |
| } |
| |
| core.int buildCounterSignupUrl = 0; |
| api.SignupUrl buildSignupUrl() { |
| var o = api.SignupUrl(); |
| buildCounterSignupUrl++; |
| if (buildCounterSignupUrl < 3) { |
| o.name = 'foo'; |
| o.url = 'foo'; |
| } |
| buildCounterSignupUrl--; |
| return o; |
| } |
| |
| void checkSignupUrl(api.SignupUrl o) { |
| buildCounterSignupUrl++; |
| if (buildCounterSignupUrl < 3) { |
| unittest.expect(o.name, unittest.equals('foo')); |
| unittest.expect(o.url, unittest.equals('foo')); |
| } |
| buildCounterSignupUrl--; |
| } |
| |
| core.int buildCounterSoftwareInfo = 0; |
| api.SoftwareInfo buildSoftwareInfo() { |
| var o = api.SoftwareInfo(); |
| buildCounterSoftwareInfo++; |
| if (buildCounterSoftwareInfo < 3) { |
| o.androidBuildNumber = 'foo'; |
| o.androidBuildTime = 'foo'; |
| o.androidDevicePolicyVersionCode = 42; |
| o.androidDevicePolicyVersionName = 'foo'; |
| o.androidVersion = 'foo'; |
| o.bootloaderVersion = 'foo'; |
| o.deviceBuildSignature = 'foo'; |
| o.deviceKernelVersion = 'foo'; |
| o.primaryLanguageCode = 'foo'; |
| o.securityPatchLevel = 'foo'; |
| o.systemUpdateInfo = buildSystemUpdateInfo(); |
| } |
| buildCounterSoftwareInfo--; |
| return o; |
| } |
| |
| void checkSoftwareInfo(api.SoftwareInfo o) { |
| buildCounterSoftwareInfo++; |
| if (buildCounterSoftwareInfo < 3) { |
| unittest.expect(o.androidBuildNumber, unittest.equals('foo')); |
| unittest.expect(o.androidBuildTime, unittest.equals('foo')); |
| unittest.expect(o.androidDevicePolicyVersionCode, unittest.equals(42)); |
| unittest.expect(o.androidDevicePolicyVersionName, unittest.equals('foo')); |
| unittest.expect(o.androidVersion, unittest.equals('foo')); |
| unittest.expect(o.bootloaderVersion, unittest.equals('foo')); |
| unittest.expect(o.deviceBuildSignature, unittest.equals('foo')); |
| unittest.expect(o.deviceKernelVersion, unittest.equals('foo')); |
| unittest.expect(o.primaryLanguageCode, unittest.equals('foo')); |
| unittest.expect(o.securityPatchLevel, unittest.equals('foo')); |
| checkSystemUpdateInfo(o.systemUpdateInfo); |
| } |
| buildCounterSoftwareInfo--; |
| } |
| |
| core.Map<core.String, core.Object> buildUnnamed5278() { |
| var o = <core.String, core.Object>{}; |
| o['x'] = { |
| 'list': [1, 2, 3], |
| 'bool': true, |
| 'string': 'foo' |
| }; |
| o['y'] = { |
| 'list': [1, 2, 3], |
| 'bool': true, |
| 'string': 'foo' |
| }; |
| return o; |
| } |
| |
| void checkUnnamed5278(core.Map<core.String, core.Object> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| var casted11 = (o['x']) as core.Map; |
| unittest.expect(casted11, unittest.hasLength(3)); |
| unittest.expect(casted11['list'], unittest.equals([1, 2, 3])); |
| unittest.expect(casted11['bool'], unittest.equals(true)); |
| unittest.expect(casted11['string'], unittest.equals('foo')); |
| var casted12 = (o['y']) as core.Map; |
| unittest.expect(casted12, unittest.hasLength(3)); |
| unittest.expect(casted12['list'], unittest.equals([1, 2, 3])); |
| unittest.expect(casted12['bool'], unittest.equals(true)); |
| unittest.expect(casted12['string'], unittest.equals('foo')); |
| } |
| |
| core.List<core.Map<core.String, core.Object>> buildUnnamed5279() { |
| var o = <core.Map<core.String, core.Object>>[]; |
| o.add(buildUnnamed5278()); |
| o.add(buildUnnamed5278()); |
| return o; |
| } |
| |
| void checkUnnamed5279(core.List<core.Map<core.String, core.Object>> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkUnnamed5278(o[0]); |
| checkUnnamed5278(o[1]); |
| } |
| |
| core.int buildCounterStatus = 0; |
| api.Status buildStatus() { |
| var o = api.Status(); |
| buildCounterStatus++; |
| if (buildCounterStatus < 3) { |
| o.code = 42; |
| o.details = buildUnnamed5279(); |
| o.message = 'foo'; |
| } |
| buildCounterStatus--; |
| return o; |
| } |
| |
| void checkStatus(api.Status o) { |
| buildCounterStatus++; |
| if (buildCounterStatus < 3) { |
| unittest.expect(o.code, unittest.equals(42)); |
| checkUnnamed5279(o.details); |
| unittest.expect(o.message, unittest.equals('foo')); |
| } |
| buildCounterStatus--; |
| } |
| |
| core.int buildCounterStatusReportingSettings = 0; |
| api.StatusReportingSettings buildStatusReportingSettings() { |
| var o = api.StatusReportingSettings(); |
| buildCounterStatusReportingSettings++; |
| if (buildCounterStatusReportingSettings < 3) { |
| o.applicationReportingSettings = buildApplicationReportingSettings(); |
| o.applicationReportsEnabled = true; |
| o.deviceSettingsEnabled = true; |
| o.displayInfoEnabled = true; |
| o.hardwareStatusEnabled = true; |
| o.memoryInfoEnabled = true; |
| o.networkInfoEnabled = true; |
| o.powerManagementEventsEnabled = true; |
| o.softwareInfoEnabled = true; |
| o.systemPropertiesEnabled = true; |
| } |
| buildCounterStatusReportingSettings--; |
| return o; |
| } |
| |
| void checkStatusReportingSettings(api.StatusReportingSettings o) { |
| buildCounterStatusReportingSettings++; |
| if (buildCounterStatusReportingSettings < 3) { |
| checkApplicationReportingSettings(o.applicationReportingSettings); |
| unittest.expect(o.applicationReportsEnabled, unittest.isTrue); |
| unittest.expect(o.deviceSettingsEnabled, unittest.isTrue); |
| unittest.expect(o.displayInfoEnabled, unittest.isTrue); |
| unittest.expect(o.hardwareStatusEnabled, unittest.isTrue); |
| unittest.expect(o.memoryInfoEnabled, unittest.isTrue); |
| unittest.expect(o.networkInfoEnabled, unittest.isTrue); |
| unittest.expect(o.powerManagementEventsEnabled, unittest.isTrue); |
| unittest.expect(o.softwareInfoEnabled, unittest.isTrue); |
| unittest.expect(o.systemPropertiesEnabled, unittest.isTrue); |
| } |
| buildCounterStatusReportingSettings--; |
| } |
| |
| core.List<api.FreezePeriod> buildUnnamed5280() { |
| var o = <api.FreezePeriod>[]; |
| o.add(buildFreezePeriod()); |
| o.add(buildFreezePeriod()); |
| return o; |
| } |
| |
| void checkUnnamed5280(core.List<api.FreezePeriod> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkFreezePeriod(o[0]); |
| checkFreezePeriod(o[1]); |
| } |
| |
| core.int buildCounterSystemUpdate = 0; |
| api.SystemUpdate buildSystemUpdate() { |
| var o = api.SystemUpdate(); |
| buildCounterSystemUpdate++; |
| if (buildCounterSystemUpdate < 3) { |
| o.endMinutes = 42; |
| o.freezePeriods = buildUnnamed5280(); |
| o.startMinutes = 42; |
| o.type = 'foo'; |
| } |
| buildCounterSystemUpdate--; |
| return o; |
| } |
| |
| void checkSystemUpdate(api.SystemUpdate o) { |
| buildCounterSystemUpdate++; |
| if (buildCounterSystemUpdate < 3) { |
| unittest.expect(o.endMinutes, unittest.equals(42)); |
| checkUnnamed5280(o.freezePeriods); |
| unittest.expect(o.startMinutes, unittest.equals(42)); |
| unittest.expect(o.type, unittest.equals('foo')); |
| } |
| buildCounterSystemUpdate--; |
| } |
| |
| core.int buildCounterSystemUpdateInfo = 0; |
| api.SystemUpdateInfo buildSystemUpdateInfo() { |
| var o = api.SystemUpdateInfo(); |
| buildCounterSystemUpdateInfo++; |
| if (buildCounterSystemUpdateInfo < 3) { |
| o.updateReceivedTime = 'foo'; |
| o.updateStatus = 'foo'; |
| } |
| buildCounterSystemUpdateInfo--; |
| return o; |
| } |
| |
| void checkSystemUpdateInfo(api.SystemUpdateInfo o) { |
| buildCounterSystemUpdateInfo++; |
| if (buildCounterSystemUpdateInfo < 3) { |
| unittest.expect(o.updateReceivedTime, unittest.equals('foo')); |
| unittest.expect(o.updateStatus, unittest.equals('foo')); |
| } |
| buildCounterSystemUpdateInfo--; |
| } |
| |
| core.int buildCounterTermsAndConditions = 0; |
| api.TermsAndConditions buildTermsAndConditions() { |
| var o = api.TermsAndConditions(); |
| buildCounterTermsAndConditions++; |
| if (buildCounterTermsAndConditions < 3) { |
| o.content = buildUserFacingMessage(); |
| o.header = buildUserFacingMessage(); |
| } |
| buildCounterTermsAndConditions--; |
| return o; |
| } |
| |
| void checkTermsAndConditions(api.TermsAndConditions o) { |
| buildCounterTermsAndConditions++; |
| if (buildCounterTermsAndConditions < 3) { |
| checkUserFacingMessage(o.content); |
| checkUserFacingMessage(o.header); |
| } |
| buildCounterTermsAndConditions--; |
| } |
| |
| core.int buildCounterUser = 0; |
| api.User buildUser() { |
| var o = api.User(); |
| buildCounterUser++; |
| if (buildCounterUser < 3) { |
| o.accountIdentifier = 'foo'; |
| } |
| buildCounterUser--; |
| return o; |
| } |
| |
| void checkUser(api.User o) { |
| buildCounterUser++; |
| if (buildCounterUser < 3) { |
| unittest.expect(o.accountIdentifier, unittest.equals('foo')); |
| } |
| buildCounterUser--; |
| } |
| |
| core.Map<core.String, core.String> buildUnnamed5281() { |
| var o = <core.String, core.String>{}; |
| o['x'] = 'foo'; |
| o['y'] = 'foo'; |
| return o; |
| } |
| |
| void checkUnnamed5281(core.Map<core.String, core.String> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| unittest.expect(o['x'], unittest.equals('foo')); |
| unittest.expect(o['y'], unittest.equals('foo')); |
| } |
| |
| core.int buildCounterUserFacingMessage = 0; |
| api.UserFacingMessage buildUserFacingMessage() { |
| var o = api.UserFacingMessage(); |
| buildCounterUserFacingMessage++; |
| if (buildCounterUserFacingMessage < 3) { |
| o.defaultMessage = 'foo'; |
| o.localizedMessages = buildUnnamed5281(); |
| } |
| buildCounterUserFacingMessage--; |
| return o; |
| } |
| |
| void checkUserFacingMessage(api.UserFacingMessage o) { |
| buildCounterUserFacingMessage++; |
| if (buildCounterUserFacingMessage < 3) { |
| unittest.expect(o.defaultMessage, unittest.equals('foo')); |
| checkUnnamed5281(o.localizedMessages); |
| } |
| buildCounterUserFacingMessage--; |
| } |
| |
| core.List<api.WebAppIcon> buildUnnamed5282() { |
| var o = <api.WebAppIcon>[]; |
| o.add(buildWebAppIcon()); |
| o.add(buildWebAppIcon()); |
| return o; |
| } |
| |
| void checkUnnamed5282(core.List<api.WebAppIcon> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkWebAppIcon(o[0]); |
| checkWebAppIcon(o[1]); |
| } |
| |
| core.int buildCounterWebApp = 0; |
| api.WebApp buildWebApp() { |
| var o = api.WebApp(); |
| buildCounterWebApp++; |
| if (buildCounterWebApp < 3) { |
| o.displayMode = 'foo'; |
| o.icons = buildUnnamed5282(); |
| o.name = 'foo'; |
| o.startUrl = 'foo'; |
| o.title = 'foo'; |
| o.versionCode = 'foo'; |
| } |
| buildCounterWebApp--; |
| return o; |
| } |
| |
| void checkWebApp(api.WebApp o) { |
| buildCounterWebApp++; |
| if (buildCounterWebApp < 3) { |
| unittest.expect(o.displayMode, unittest.equals('foo')); |
| checkUnnamed5282(o.icons); |
| unittest.expect(o.name, unittest.equals('foo')); |
| unittest.expect(o.startUrl, unittest.equals('foo')); |
| unittest.expect(o.title, unittest.equals('foo')); |
| unittest.expect(o.versionCode, unittest.equals('foo')); |
| } |
| buildCounterWebApp--; |
| } |
| |
| core.int buildCounterWebAppIcon = 0; |
| api.WebAppIcon buildWebAppIcon() { |
| var o = api.WebAppIcon(); |
| buildCounterWebAppIcon++; |
| if (buildCounterWebAppIcon < 3) { |
| o.imageData = 'foo'; |
| } |
| buildCounterWebAppIcon--; |
| return o; |
| } |
| |
| void checkWebAppIcon(api.WebAppIcon o) { |
| buildCounterWebAppIcon++; |
| if (buildCounterWebAppIcon < 3) { |
| unittest.expect(o.imageData, unittest.equals('foo')); |
| } |
| buildCounterWebAppIcon--; |
| } |
| |
| core.List<core.String> buildUnnamed5283() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed5283(core.List<core.String> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| unittest.expect(o[0], unittest.equals('foo')); |
| unittest.expect(o[1], unittest.equals('foo')); |
| } |
| |
| core.List<core.String> buildUnnamed5284() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed5284(core.List<core.String> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| unittest.expect(o[0], unittest.equals('foo')); |
| unittest.expect(o[1], unittest.equals('foo')); |
| } |
| |
| core.int buildCounterWebToken = 0; |
| api.WebToken buildWebToken() { |
| var o = api.WebToken(); |
| buildCounterWebToken++; |
| if (buildCounterWebToken < 3) { |
| o.enabledFeatures = buildUnnamed5283(); |
| o.name = 'foo'; |
| o.parentFrameUrl = 'foo'; |
| o.permissions = buildUnnamed5284(); |
| o.value = 'foo'; |
| } |
| buildCounterWebToken--; |
| return o; |
| } |
| |
| void checkWebToken(api.WebToken o) { |
| buildCounterWebToken++; |
| if (buildCounterWebToken < 3) { |
| checkUnnamed5283(o.enabledFeatures); |
| unittest.expect(o.name, unittest.equals('foo')); |
| unittest.expect(o.parentFrameUrl, unittest.equals('foo')); |
| checkUnnamed5284(o.permissions); |
| unittest.expect(o.value, unittest.equals('foo')); |
| } |
| buildCounterWebToken--; |
| } |
| |
| core.int buildCounterWipeAction = 0; |
| api.WipeAction buildWipeAction() { |
| var o = api.WipeAction(); |
| buildCounterWipeAction++; |
| if (buildCounterWipeAction < 3) { |
| o.preserveFrp = true; |
| o.wipeAfterDays = 42; |
| } |
| buildCounterWipeAction--; |
| return o; |
| } |
| |
| void checkWipeAction(api.WipeAction o) { |
| buildCounterWipeAction++; |
| if (buildCounterWipeAction < 3) { |
| unittest.expect(o.preserveFrp, unittest.isTrue); |
| unittest.expect(o.wipeAfterDays, unittest.equals(42)); |
| } |
| buildCounterWipeAction--; |
| } |
| |
| core.List<core.String> buildUnnamed5285() { |
| var o = <core.String>[]; |
| o.add('foo'); |
| o.add('foo'); |
| return o; |
| } |
| |
| void checkUnnamed5285(core.List<core.String> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| unittest.expect(o[0], unittest.equals('foo')); |
| unittest.expect(o[1], unittest.equals('foo')); |
| } |
| |
| void main() { |
| unittest.group('obj-schema-AdvancedSecurityOverrides', () { |
| unittest.test('to-json--from-json', () { |
| var o = buildAdvancedSecurityOverrides(); |
| var od = api.AdvancedSecurityOverrides.fromJson(o.toJson()); |
| checkAdvancedSecurityOverrides(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-AlwaysOnVpnPackage', () { |
| unittest.test('to-json--from-json', () { |
| var o = buildAlwaysOnVpnPackage(); |
| var od = api.AlwaysOnVpnPackage.fromJson(o.toJson()); |
| checkAlwaysOnVpnPackage(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-ApiLevelCondition', () { |
| unittest.test('to-json--from-json', () { |
| var o = buildApiLevelCondition(); |
| var od = api.ApiLevelCondition.fromJson(o.toJson()); |
| checkApiLevelCondition(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-AppTrackInfo', () { |
| unittest.test('to-json--from-json', () { |
| var o = buildAppTrackInfo(); |
| var od = api.AppTrackInfo.fromJson(o.toJson()); |
| checkAppTrackInfo(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-Application', () { |
| unittest.test('to-json--from-json', () { |
| var o = buildApplication(); |
| var od = api.Application.fromJson(o.toJson()); |
| checkApplication(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-ApplicationEvent', () { |
| unittest.test('to-json--from-json', () { |
| var o = buildApplicationEvent(); |
| var od = api.ApplicationEvent.fromJson(o.toJson()); |
| checkApplicationEvent(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-ApplicationPermission', () { |
| unittest.test('to-json--from-json', () { |
| var o = buildApplicationPermission(); |
| var od = api.ApplicationPermission.fromJson(o.toJson()); |
| checkApplicationPermission(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-ApplicationPolicy', () { |
| unittest.test('to-json--from-json', () { |
| var o = buildApplicationPolicy(); |
| var od = api.ApplicationPolicy.fromJson(o.toJson()); |
| checkApplicationPolicy(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-ApplicationReport', () { |
| unittest.test('to-json--from-json', () { |
| var o = buildApplicationReport(); |
| var od = api.ApplicationReport.fromJson(o.toJson()); |
| checkApplicationReport(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-ApplicationReportingSettings', () { |
| unittest.test('to-json--from-json', () { |
| var o = buildApplicationReportingSettings(); |
| var od = api.ApplicationReportingSettings.fromJson(o.toJson()); |
| checkApplicationReportingSettings(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-BlockAction', () { |
| unittest.test('to-json--from-json', () { |
| var o = buildBlockAction(); |
| var od = api.BlockAction.fromJson(o.toJson()); |
| checkBlockAction(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-ChoosePrivateKeyRule', () { |
| unittest.test('to-json--from-json', () { |
| var o = buildChoosePrivateKeyRule(); |
| var od = api.ChoosePrivateKeyRule.fromJson(o.toJson()); |
| checkChoosePrivateKeyRule(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-Command', () { |
| unittest.test('to-json--from-json', () { |
| var o = buildCommand(); |
| var od = api.Command.fromJson(o.toJson()); |
| checkCommand(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-ComplianceRule', () { |
| unittest.test('to-json--from-json', () { |
| var o = buildComplianceRule(); |
| var od = api.ComplianceRule.fromJson(o.toJson()); |
| checkComplianceRule(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-Date', () { |
| unittest.test('to-json--from-json', () { |
| var o = buildDate(); |
| var od = api.Date.fromJson(o.toJson()); |
| checkDate(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-Device', () { |
| unittest.test('to-json--from-json', () { |
| var o = buildDevice(); |
| var od = api.Device.fromJson(o.toJson()); |
| checkDevice(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-DeviceSettings', () { |
| unittest.test('to-json--from-json', () { |
| var o = buildDeviceSettings(); |
| var od = api.DeviceSettings.fromJson(o.toJson()); |
| checkDeviceSettings(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-Display', () { |
| unittest.test('to-json--from-json', () { |
| var o = buildDisplay(); |
| var od = api.Display.fromJson(o.toJson()); |
| checkDisplay(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-Empty', () { |
| unittest.test('to-json--from-json', () { |
| var o = buildEmpty(); |
| var od = api.Empty.fromJson(o.toJson()); |
| checkEmpty(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-EnrollmentToken', () { |
| unittest.test('to-json--from-json', () { |
| var o = buildEnrollmentToken(); |
| var od = api.EnrollmentToken.fromJson(o.toJson()); |
| checkEnrollmentToken(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-Enterprise', () { |
| unittest.test('to-json--from-json', () { |
| var o = buildEnterprise(); |
| var od = api.Enterprise.fromJson(o.toJson()); |
| checkEnterprise(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-ExternalData', () { |
| unittest.test('to-json--from-json', () { |
| var o = buildExternalData(); |
| var od = api.ExternalData.fromJson(o.toJson()); |
| checkExternalData(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-FreezePeriod', () { |
| unittest.test('to-json--from-json', () { |
| var o = buildFreezePeriod(); |
| var od = api.FreezePeriod.fromJson(o.toJson()); |
| checkFreezePeriod(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-HardwareInfo', () { |
| unittest.test('to-json--from-json', () { |
| var o = buildHardwareInfo(); |
| var od = api.HardwareInfo.fromJson(o.toJson()); |
| checkHardwareInfo(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-HardwareStatus', () { |
| unittest.test('to-json--from-json', () { |
| var o = buildHardwareStatus(); |
| var od = api.HardwareStatus.fromJson(o.toJson()); |
| checkHardwareStatus(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-KeyedAppState', () { |
| unittest.test('to-json--from-json', () { |
| var o = buildKeyedAppState(); |
| var od = api.KeyedAppState.fromJson(o.toJson()); |
| checkKeyedAppState(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-KioskCustomization', () { |
| unittest.test('to-json--from-json', () { |
| var o = buildKioskCustomization(); |
| var od = api.KioskCustomization.fromJson(o.toJson()); |
| checkKioskCustomization(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-LaunchAppAction', () { |
| unittest.test('to-json--from-json', () { |
| var o = buildLaunchAppAction(); |
| var od = api.LaunchAppAction.fromJson(o.toJson()); |
| checkLaunchAppAction(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-ListDevicesResponse', () { |
| unittest.test('to-json--from-json', () { |
| var o = buildListDevicesResponse(); |
| var od = api.ListDevicesResponse.fromJson(o.toJson()); |
| checkListDevicesResponse(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-ListOperationsResponse', () { |
| unittest.test('to-json--from-json', () { |
| var o = buildListOperationsResponse(); |
| var od = api.ListOperationsResponse.fromJson(o.toJson()); |
| checkListOperationsResponse(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-ListPoliciesResponse', () { |
| unittest.test('to-json--from-json', () { |
| var o = buildListPoliciesResponse(); |
| var od = api.ListPoliciesResponse.fromJson(o.toJson()); |
| checkListPoliciesResponse(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-ListWebAppsResponse', () { |
| unittest.test('to-json--from-json', () { |
| var o = buildListWebAppsResponse(); |
| var od = api.ListWebAppsResponse.fromJson(o.toJson()); |
| checkListWebAppsResponse(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-ManagedConfigurationTemplate', () { |
| unittest.test('to-json--from-json', () { |
| var o = buildManagedConfigurationTemplate(); |
| var od = api.ManagedConfigurationTemplate.fromJson(o.toJson()); |
| checkManagedConfigurationTemplate(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-ManagedProperty', () { |
| unittest.test('to-json--from-json', () { |
| var o = buildManagedProperty(); |
| var od = api.ManagedProperty.fromJson(o.toJson()); |
| checkManagedProperty(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-ManagedPropertyEntry', () { |
| unittest.test('to-json--from-json', () { |
| var o = buildManagedPropertyEntry(); |
| var od = api.ManagedPropertyEntry.fromJson(o.toJson()); |
| checkManagedPropertyEntry(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-MemoryEvent', () { |
| unittest.test('to-json--from-json', () { |
| var o = buildMemoryEvent(); |
| var od = api.MemoryEvent.fromJson(o.toJson()); |
| checkMemoryEvent(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-MemoryInfo', () { |
| unittest.test('to-json--from-json', () { |
| var o = buildMemoryInfo(); |
| var od = api.MemoryInfo.fromJson(o.toJson()); |
| checkMemoryInfo(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-NetworkInfo', () { |
| unittest.test('to-json--from-json', () { |
| var o = buildNetworkInfo(); |
| var od = api.NetworkInfo.fromJson(o.toJson()); |
| checkNetworkInfo(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-NonComplianceDetail', () { |
| unittest.test('to-json--from-json', () { |
| var o = buildNonComplianceDetail(); |
| var od = api.NonComplianceDetail.fromJson(o.toJson()); |
| checkNonComplianceDetail(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-NonComplianceDetailCondition', () { |
| unittest.test('to-json--from-json', () { |
| var o = buildNonComplianceDetailCondition(); |
| var od = api.NonComplianceDetailCondition.fromJson(o.toJson()); |
| checkNonComplianceDetailCondition(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-Operation', () { |
| unittest.test('to-json--from-json', () { |
| var o = buildOperation(); |
| var od = api.Operation.fromJson(o.toJson()); |
| checkOperation(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-PackageNameList', () { |
| unittest.test('to-json--from-json', () { |
| var o = buildPackageNameList(); |
| var od = api.PackageNameList.fromJson(o.toJson()); |
| checkPackageNameList(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-PasswordRequirements', () { |
| unittest.test('to-json--from-json', () { |
| var o = buildPasswordRequirements(); |
| var od = api.PasswordRequirements.fromJson(o.toJson()); |
| checkPasswordRequirements(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-PermissionGrant', () { |
| unittest.test('to-json--from-json', () { |
| var o = buildPermissionGrant(); |
| var od = api.PermissionGrant.fromJson(o.toJson()); |
| checkPermissionGrant(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-PersistentPreferredActivity', () { |
| unittest.test('to-json--from-json', () { |
| var o = buildPersistentPreferredActivity(); |
| var od = api.PersistentPreferredActivity.fromJson(o.toJson()); |
| checkPersistentPreferredActivity(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-PersonalApplicationPolicy', () { |
| unittest.test('to-json--from-json', () { |
| var o = buildPersonalApplicationPolicy(); |
| var od = api.PersonalApplicationPolicy.fromJson(o.toJson()); |
| checkPersonalApplicationPolicy(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-PersonalUsagePolicies', () { |
| unittest.test('to-json--from-json', () { |
| var o = buildPersonalUsagePolicies(); |
| var od = api.PersonalUsagePolicies.fromJson(o.toJson()); |
| checkPersonalUsagePolicies(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-Policy', () { |
| unittest.test('to-json--from-json', () { |
| var o = buildPolicy(); |
| var od = api.Policy.fromJson(o.toJson()); |
| checkPolicy(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-PolicyEnforcementRule', () { |
| unittest.test('to-json--from-json', () { |
| var o = buildPolicyEnforcementRule(); |
| var od = api.PolicyEnforcementRule.fromJson(o.toJson()); |
| checkPolicyEnforcementRule(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-PostureDetail', () { |
| unittest.test('to-json--from-json', () { |
| var o = buildPostureDetail(); |
| var od = api.PostureDetail.fromJson(o.toJson()); |
| checkPostureDetail(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-PowerManagementEvent', () { |
| unittest.test('to-json--from-json', () { |
| var o = buildPowerManagementEvent(); |
| var od = api.PowerManagementEvent.fromJson(o.toJson()); |
| checkPowerManagementEvent(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-ProxyInfo', () { |
| unittest.test('to-json--from-json', () { |
| var o = buildProxyInfo(); |
| var od = api.ProxyInfo.fromJson(o.toJson()); |
| checkProxyInfo(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-SecurityPosture', () { |
| unittest.test('to-json--from-json', () { |
| var o = buildSecurityPosture(); |
| var od = api.SecurityPosture.fromJson(o.toJson()); |
| checkSecurityPosture(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-SetupAction', () { |
| unittest.test('to-json--from-json', () { |
| var o = buildSetupAction(); |
| var od = api.SetupAction.fromJson(o.toJson()); |
| checkSetupAction(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-SigninDetail', () { |
| unittest.test('to-json--from-json', () { |
| var o = buildSigninDetail(); |
| var od = api.SigninDetail.fromJson(o.toJson()); |
| checkSigninDetail(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-SignupUrl', () { |
| unittest.test('to-json--from-json', () { |
| var o = buildSignupUrl(); |
| var od = api.SignupUrl.fromJson(o.toJson()); |
| checkSignupUrl(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-SoftwareInfo', () { |
| unittest.test('to-json--from-json', () { |
| var o = buildSoftwareInfo(); |
| var od = api.SoftwareInfo.fromJson(o.toJson()); |
| checkSoftwareInfo(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-Status', () { |
| unittest.test('to-json--from-json', () { |
| var o = buildStatus(); |
| var od = api.Status.fromJson(o.toJson()); |
| checkStatus(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-StatusReportingSettings', () { |
| unittest.test('to-json--from-json', () { |
| var o = buildStatusReportingSettings(); |
| var od = api.StatusReportingSettings.fromJson(o.toJson()); |
| checkStatusReportingSettings(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-SystemUpdate', () { |
| unittest.test('to-json--from-json', () { |
| var o = buildSystemUpdate(); |
| var od = api.SystemUpdate.fromJson(o.toJson()); |
| checkSystemUpdate(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-SystemUpdateInfo', () { |
| unittest.test('to-json--from-json', () { |
| var o = buildSystemUpdateInfo(); |
| var od = api.SystemUpdateInfo.fromJson(o.toJson()); |
| checkSystemUpdateInfo(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-TermsAndConditions', () { |
| unittest.test('to-json--from-json', () { |
| var o = buildTermsAndConditions(); |
| var od = api.TermsAndConditions.fromJson(o.toJson()); |
| checkTermsAndConditions(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-User', () { |
| unittest.test('to-json--from-json', () { |
| var o = buildUser(); |
| var od = api.User.fromJson(o.toJson()); |
| checkUser(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-UserFacingMessage', () { |
| unittest.test('to-json--from-json', () { |
| var o = buildUserFacingMessage(); |
| var od = api.UserFacingMessage.fromJson(o.toJson()); |
| checkUserFacingMessage(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-WebApp', () { |
| unittest.test('to-json--from-json', () { |
| var o = buildWebApp(); |
| var od = api.WebApp.fromJson(o.toJson()); |
| checkWebApp(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-WebAppIcon', () { |
| unittest.test('to-json--from-json', () { |
| var o = buildWebAppIcon(); |
| var od = api.WebAppIcon.fromJson(o.toJson()); |
| checkWebAppIcon(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-WebToken', () { |
| unittest.test('to-json--from-json', () { |
| var o = buildWebToken(); |
| var od = api.WebToken.fromJson(o.toJson()); |
| checkWebToken(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-WipeAction', () { |
| unittest.test('to-json--from-json', () { |
| var o = buildWipeAction(); |
| var od = api.WipeAction.fromJson(o.toJson()); |
| checkWipeAction(od); |
| }); |
| }); |
| |
| unittest.group('resource-EnterprisesResourceApi', () { |
| unittest.test('method--create', () { |
| var mock = HttpServerMock(); |
| var res = api.AndroidmanagementApi(mock).enterprises; |
| var arg_request = buildEnterprise(); |
| var arg_enterpriseToken = 'foo'; |
| var arg_projectId = 'foo'; |
| var arg_signupUrlName = 'foo'; |
| var arg_$fields = 'foo'; |
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| var obj = api.Enterprise.fromJson(json); |
| checkEnterprise(obj); |
| |
| var path = (req.url).path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| pathOffset += 1; |
| unittest.expect(path.substring(pathOffset, pathOffset + 14), |
| unittest.equals("v1/enterprises")); |
| pathOffset += 14; |
| |
| var query = (req.url).query; |
| var queryOffset = 0; |
| var queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| var keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect(queryMap["enterpriseToken"].first, |
| unittest.equals(arg_enterpriseToken)); |
| unittest.expect( |
| queryMap["projectId"].first, unittest.equals(arg_projectId)); |
| unittest.expect(queryMap["signupUrlName"].first, |
| unittest.equals(arg_signupUrlName)); |
| unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); |
| |
| var h = { |
| 'content-type': 'application/json; charset=utf-8', |
| }; |
| var resp = convert.json.encode(buildEnterprise()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), true); |
| res |
| .create(arg_request, |
| enterpriseToken: arg_enterpriseToken, |
| projectId: arg_projectId, |
| signupUrlName: arg_signupUrlName, |
| $fields: arg_$fields) |
| .then(unittest.expectAsync1(((response) { |
| checkEnterprise(response); |
| }))); |
| }); |
| |
| unittest.test('method--get', () { |
| var mock = HttpServerMock(); |
| var res = api.AndroidmanagementApi(mock).enterprises; |
| var arg_name = 'foo'; |
| var arg_$fields = 'foo'; |
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| var path = (req.url).path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), unittest.equals("v1/")); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| var query = (req.url).query; |
| var queryOffset = 0; |
| var queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| var keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); |
| |
| var h = { |
| 'content-type': 'application/json; charset=utf-8', |
| }; |
| var resp = convert.json.encode(buildEnterprise()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), true); |
| res |
| .get(arg_name, $fields: arg_$fields) |
| .then(unittest.expectAsync1(((response) { |
| checkEnterprise(response); |
| }))); |
| }); |
| |
| unittest.test('method--patch', () { |
| var mock = HttpServerMock(); |
| var res = api.AndroidmanagementApi(mock).enterprises; |
| var arg_request = buildEnterprise(); |
| var arg_name = 'foo'; |
| var arg_updateMask = 'foo'; |
| var arg_$fields = 'foo'; |
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| var obj = api.Enterprise.fromJson(json); |
| checkEnterprise(obj); |
| |
| var path = (req.url).path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), unittest.equals("v1/")); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| var query = (req.url).query; |
| var queryOffset = 0; |
| var queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| var keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap["updateMask"].first, unittest.equals(arg_updateMask)); |
| unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); |
| |
| var h = { |
| 'content-type': 'application/json; charset=utf-8', |
| }; |
| var resp = convert.json.encode(buildEnterprise()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), true); |
| res |
| .patch(arg_request, arg_name, |
| updateMask: arg_updateMask, $fields: arg_$fields) |
| .then(unittest.expectAsync1(((response) { |
| checkEnterprise(response); |
| }))); |
| }); |
| }); |
| |
| unittest.group('resource-EnterprisesApplicationsResourceApi', () { |
| unittest.test('method--get', () { |
| var mock = HttpServerMock(); |
| var res = api.AndroidmanagementApi(mock).enterprises.applications; |
| var arg_name = 'foo'; |
| var arg_languageCode = 'foo'; |
| var arg_$fields = 'foo'; |
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| var path = (req.url).path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), unittest.equals("v1/")); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| var query = (req.url).query; |
| var queryOffset = 0; |
| var queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| var keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap["languageCode"].first, unittest.equals(arg_languageCode)); |
| unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); |
| |
| var h = { |
| 'content-type': 'application/json; charset=utf-8', |
| }; |
| var resp = convert.json.encode(buildApplication()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), true); |
| res |
| .get(arg_name, languageCode: arg_languageCode, $fields: arg_$fields) |
| .then(unittest.expectAsync1(((response) { |
| checkApplication(response); |
| }))); |
| }); |
| }); |
| |
| unittest.group('resource-EnterprisesDevicesResourceApi', () { |
| unittest.test('method--delete', () { |
| var mock = HttpServerMock(); |
| var res = api.AndroidmanagementApi(mock).enterprises.devices; |
| var arg_name = 'foo'; |
| var arg_wipeDataFlags = buildUnnamed5285(); |
| var arg_wipeReasonMessage = 'foo'; |
| var arg_$fields = 'foo'; |
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| var path = (req.url).path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), unittest.equals("v1/")); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| var query = (req.url).query; |
| var queryOffset = 0; |
| var queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| var keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap["wipeDataFlags"], unittest.equals(arg_wipeDataFlags)); |
| unittest.expect(queryMap["wipeReasonMessage"].first, |
| unittest.equals(arg_wipeReasonMessage)); |
| unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); |
| |
| var h = { |
| 'content-type': 'application/json; charset=utf-8', |
| }; |
| var resp = convert.json.encode(buildEmpty()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), true); |
| res |
| .delete(arg_name, |
| wipeDataFlags: arg_wipeDataFlags, |
| wipeReasonMessage: arg_wipeReasonMessage, |
| $fields: arg_$fields) |
| .then(unittest.expectAsync1(((response) { |
| checkEmpty(response); |
| }))); |
| }); |
| |
| unittest.test('method--get', () { |
| var mock = HttpServerMock(); |
| var res = api.AndroidmanagementApi(mock).enterprises.devices; |
| var arg_name = 'foo'; |
| var arg_$fields = 'foo'; |
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| var path = (req.url).path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), unittest.equals("v1/")); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| var query = (req.url).query; |
| var queryOffset = 0; |
| var queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| var keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); |
| |
| var h = { |
| 'content-type': 'application/json; charset=utf-8', |
| }; |
| var resp = convert.json.encode(buildDevice()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), true); |
| res |
| .get(arg_name, $fields: arg_$fields) |
| .then(unittest.expectAsync1(((response) { |
| checkDevice(response); |
| }))); |
| }); |
| |
| unittest.test('method--issueCommand', () { |
| var mock = HttpServerMock(); |
| var res = api.AndroidmanagementApi(mock).enterprises.devices; |
| var arg_request = buildCommand(); |
| var arg_name = 'foo'; |
| var arg_$fields = 'foo'; |
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| var obj = api.Command.fromJson(json); |
| checkCommand(obj); |
| |
| var path = (req.url).path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), unittest.equals("v1/")); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| var query = (req.url).query; |
| var queryOffset = 0; |
| var queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| var keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); |
| |
| var h = { |
| 'content-type': 'application/json; charset=utf-8', |
| }; |
| var resp = convert.json.encode(buildOperation()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), true); |
| res |
| .issueCommand(arg_request, arg_name, $fields: arg_$fields) |
| .then(unittest.expectAsync1(((response) { |
| checkOperation(response); |
| }))); |
| }); |
| |
| unittest.test('method--list', () { |
| var mock = HttpServerMock(); |
| var res = api.AndroidmanagementApi(mock).enterprises.devices; |
| var arg_parent = 'foo'; |
| var arg_pageSize = 42; |
| var arg_pageToken = 'foo'; |
| var arg_$fields = 'foo'; |
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| var path = (req.url).path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), unittest.equals("v1/")); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| var query = (req.url).query; |
| var queryOffset = 0; |
| var queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| var keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect(core.int.parse(queryMap["pageSize"].first), |
| unittest.equals(arg_pageSize)); |
| unittest.expect( |
| queryMap["pageToken"].first, unittest.equals(arg_pageToken)); |
| unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); |
| |
| var h = { |
| 'content-type': 'application/json; charset=utf-8', |
| }; |
| var resp = convert.json.encode(buildListDevicesResponse()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), true); |
| res |
| .list(arg_parent, |
| pageSize: arg_pageSize, |
| pageToken: arg_pageToken, |
| $fields: arg_$fields) |
| .then(unittest.expectAsync1(((response) { |
| checkListDevicesResponse(response); |
| }))); |
| }); |
| |
| unittest.test('method--patch', () { |
| var mock = HttpServerMock(); |
| var res = api.AndroidmanagementApi(mock).enterprises.devices; |
| var arg_request = buildDevice(); |
| var arg_name = 'foo'; |
| var arg_updateMask = 'foo'; |
| var arg_$fields = 'foo'; |
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| var obj = api.Device.fromJson(json); |
| checkDevice(obj); |
| |
| var path = (req.url).path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), unittest.equals("v1/")); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| var query = (req.url).query; |
| var queryOffset = 0; |
| var queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| var keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap["updateMask"].first, unittest.equals(arg_updateMask)); |
| unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); |
| |
| var h = { |
| 'content-type': 'application/json; charset=utf-8', |
| }; |
| var resp = convert.json.encode(buildDevice()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), true); |
| res |
| .patch(arg_request, arg_name, |
| updateMask: arg_updateMask, $fields: arg_$fields) |
| .then(unittest.expectAsync1(((response) { |
| checkDevice(response); |
| }))); |
| }); |
| }); |
| |
| unittest.group('resource-EnterprisesDevicesOperationsResourceApi', () { |
| unittest.test('method--cancel', () { |
| var mock = HttpServerMock(); |
| var res = api.AndroidmanagementApi(mock).enterprises.devices.operations; |
| var arg_name = 'foo'; |
| var arg_$fields = 'foo'; |
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| var path = (req.url).path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), unittest.equals("v1/")); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| var query = (req.url).query; |
| var queryOffset = 0; |
| var queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| var keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); |
| |
| var h = { |
| 'content-type': 'application/json; charset=utf-8', |
| }; |
| var resp = convert.json.encode(buildEmpty()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), true); |
| res |
| .cancel(arg_name, $fields: arg_$fields) |
| .then(unittest.expectAsync1(((response) { |
| checkEmpty(response); |
| }))); |
| }); |
| |
| unittest.test('method--delete', () { |
| var mock = HttpServerMock(); |
| var res = api.AndroidmanagementApi(mock).enterprises.devices.operations; |
| var arg_name = 'foo'; |
| var arg_$fields = 'foo'; |
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| var path = (req.url).path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), unittest.equals("v1/")); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| var query = (req.url).query; |
| var queryOffset = 0; |
| var queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| var keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); |
| |
| var h = { |
| 'content-type': 'application/json; charset=utf-8', |
| }; |
| var resp = convert.json.encode(buildEmpty()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), true); |
| res |
| .delete(arg_name, $fields: arg_$fields) |
| .then(unittest.expectAsync1(((response) { |
| checkEmpty(response); |
| }))); |
| }); |
| |
| unittest.test('method--get', () { |
| var mock = HttpServerMock(); |
| var res = api.AndroidmanagementApi(mock).enterprises.devices.operations; |
| var arg_name = 'foo'; |
| var arg_$fields = 'foo'; |
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| var path = (req.url).path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), unittest.equals("v1/")); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| var query = (req.url).query; |
| var queryOffset = 0; |
| var queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| var keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); |
| |
| var h = { |
| 'content-type': 'application/json; charset=utf-8', |
| }; |
| var resp = convert.json.encode(buildOperation()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), true); |
| res |
| .get(arg_name, $fields: arg_$fields) |
| .then(unittest.expectAsync1(((response) { |
| checkOperation(response); |
| }))); |
| }); |
| |
| unittest.test('method--list', () { |
| var mock = HttpServerMock(); |
| var res = api.AndroidmanagementApi(mock).enterprises.devices.operations; |
| var arg_name = 'foo'; |
| var arg_filter = 'foo'; |
| var arg_pageSize = 42; |
| var arg_pageToken = 'foo'; |
| var arg_$fields = 'foo'; |
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| var path = (req.url).path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), unittest.equals("v1/")); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| var query = (req.url).query; |
| var queryOffset = 0; |
| var queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| var keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect(queryMap["filter"].first, unittest.equals(arg_filter)); |
| unittest.expect(core.int.parse(queryMap["pageSize"].first), |
| unittest.equals(arg_pageSize)); |
| unittest.expect( |
| queryMap["pageToken"].first, unittest.equals(arg_pageToken)); |
| unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); |
| |
| var h = { |
| 'content-type': 'application/json; charset=utf-8', |
| }; |
| var resp = convert.json.encode(buildListOperationsResponse()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), true); |
| res |
| .list(arg_name, |
| filter: arg_filter, |
| pageSize: arg_pageSize, |
| pageToken: arg_pageToken, |
| $fields: arg_$fields) |
| .then(unittest.expectAsync1(((response) { |
| checkListOperationsResponse(response); |
| }))); |
| }); |
| }); |
| |
| unittest.group('resource-EnterprisesEnrollmentTokensResourceApi', () { |
| unittest.test('method--create', () { |
| var mock = HttpServerMock(); |
| var res = api.AndroidmanagementApi(mock).enterprises.enrollmentTokens; |
| var arg_request = buildEnrollmentToken(); |
| var arg_parent = 'foo'; |
| var arg_$fields = 'foo'; |
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| var obj = api.EnrollmentToken.fromJson(json); |
| checkEnrollmentToken(obj); |
| |
| var path = (req.url).path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), unittest.equals("v1/")); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| var query = (req.url).query; |
| var queryOffset = 0; |
| var queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| var keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); |
| |
| var h = { |
| 'content-type': 'application/json; charset=utf-8', |
| }; |
| var resp = convert.json.encode(buildEnrollmentToken()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), true); |
| res |
| .create(arg_request, arg_parent, $fields: arg_$fields) |
| .then(unittest.expectAsync1(((response) { |
| checkEnrollmentToken(response); |
| }))); |
| }); |
| |
| unittest.test('method--delete', () { |
| var mock = HttpServerMock(); |
| var res = api.AndroidmanagementApi(mock).enterprises.enrollmentTokens; |
| var arg_name = 'foo'; |
| var arg_$fields = 'foo'; |
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| var path = (req.url).path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), unittest.equals("v1/")); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| var query = (req.url).query; |
| var queryOffset = 0; |
| var queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| var keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); |
| |
| var h = { |
| 'content-type': 'application/json; charset=utf-8', |
| }; |
| var resp = convert.json.encode(buildEmpty()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), true); |
| res |
| .delete(arg_name, $fields: arg_$fields) |
| .then(unittest.expectAsync1(((response) { |
| checkEmpty(response); |
| }))); |
| }); |
| }); |
| |
| unittest.group('resource-EnterprisesPoliciesResourceApi', () { |
| unittest.test('method--delete', () { |
| var mock = HttpServerMock(); |
| var res = api.AndroidmanagementApi(mock).enterprises.policies; |
| var arg_name = 'foo'; |
| var arg_$fields = 'foo'; |
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| var path = (req.url).path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), unittest.equals("v1/")); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| var query = (req.url).query; |
| var queryOffset = 0; |
| var queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| var keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); |
| |
| var h = { |
| 'content-type': 'application/json; charset=utf-8', |
| }; |
| var resp = convert.json.encode(buildEmpty()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), true); |
| res |
| .delete(arg_name, $fields: arg_$fields) |
| .then(unittest.expectAsync1(((response) { |
| checkEmpty(response); |
| }))); |
| }); |
| |
| unittest.test('method--get', () { |
| var mock = HttpServerMock(); |
| var res = api.AndroidmanagementApi(mock).enterprises.policies; |
| var arg_name = 'foo'; |
| var arg_$fields = 'foo'; |
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| var path = (req.url).path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), unittest.equals("v1/")); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| var query = (req.url).query; |
| var queryOffset = 0; |
| var queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| var keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); |
| |
| var h = { |
| 'content-type': 'application/json; charset=utf-8', |
| }; |
| var resp = convert.json.encode(buildPolicy()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), true); |
| res |
| .get(arg_name, $fields: arg_$fields) |
| .then(unittest.expectAsync1(((response) { |
| checkPolicy(response); |
| }))); |
| }); |
| |
| unittest.test('method--list', () { |
| var mock = HttpServerMock(); |
| var res = api.AndroidmanagementApi(mock).enterprises.policies; |
| var arg_parent = 'foo'; |
| var arg_pageSize = 42; |
| var arg_pageToken = 'foo'; |
| var arg_$fields = 'foo'; |
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| var path = (req.url).path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), unittest.equals("v1/")); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| var query = (req.url).query; |
| var queryOffset = 0; |
| var queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| var keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect(core.int.parse(queryMap["pageSize"].first), |
| unittest.equals(arg_pageSize)); |
| unittest.expect( |
| queryMap["pageToken"].first, unittest.equals(arg_pageToken)); |
| unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); |
| |
| var h = { |
| 'content-type': 'application/json; charset=utf-8', |
| }; |
| var resp = convert.json.encode(buildListPoliciesResponse()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), true); |
| res |
| .list(arg_parent, |
| pageSize: arg_pageSize, |
| pageToken: arg_pageToken, |
| $fields: arg_$fields) |
| .then(unittest.expectAsync1(((response) { |
| checkListPoliciesResponse(response); |
| }))); |
| }); |
| |
| unittest.test('method--patch', () { |
| var mock = HttpServerMock(); |
| var res = api.AndroidmanagementApi(mock).enterprises.policies; |
| var arg_request = buildPolicy(); |
| var arg_name = 'foo'; |
| var arg_updateMask = 'foo'; |
| var arg_$fields = 'foo'; |
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| var obj = api.Policy.fromJson(json); |
| checkPolicy(obj); |
| |
| var path = (req.url).path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), unittest.equals("v1/")); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| var query = (req.url).query; |
| var queryOffset = 0; |
| var queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| var keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap["updateMask"].first, unittest.equals(arg_updateMask)); |
| unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); |
| |
| var h = { |
| 'content-type': 'application/json; charset=utf-8', |
| }; |
| var resp = convert.json.encode(buildPolicy()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), true); |
| res |
| .patch(arg_request, arg_name, |
| updateMask: arg_updateMask, $fields: arg_$fields) |
| .then(unittest.expectAsync1(((response) { |
| checkPolicy(response); |
| }))); |
| }); |
| }); |
| |
| unittest.group('resource-EnterprisesWebAppsResourceApi', () { |
| unittest.test('method--create', () { |
| var mock = HttpServerMock(); |
| var res = api.AndroidmanagementApi(mock).enterprises.webApps; |
| var arg_request = buildWebApp(); |
| var arg_parent = 'foo'; |
| var arg_$fields = 'foo'; |
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| var obj = api.WebApp.fromJson(json); |
| checkWebApp(obj); |
| |
| var path = (req.url).path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), unittest.equals("v1/")); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| var query = (req.url).query; |
| var queryOffset = 0; |
| var queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| var keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); |
| |
| var h = { |
| 'content-type': 'application/json; charset=utf-8', |
| }; |
| var resp = convert.json.encode(buildWebApp()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), true); |
| res |
| .create(arg_request, arg_parent, $fields: arg_$fields) |
| .then(unittest.expectAsync1(((response) { |
| checkWebApp(response); |
| }))); |
| }); |
| |
| unittest.test('method--delete', () { |
| var mock = HttpServerMock(); |
| var res = api.AndroidmanagementApi(mock).enterprises.webApps; |
| var arg_name = 'foo'; |
| var arg_$fields = 'foo'; |
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| var path = (req.url).path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), unittest.equals("v1/")); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| var query = (req.url).query; |
| var queryOffset = 0; |
| var queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| var keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); |
| |
| var h = { |
| 'content-type': 'application/json; charset=utf-8', |
| }; |
| var resp = convert.json.encode(buildEmpty()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), true); |
| res |
| .delete(arg_name, $fields: arg_$fields) |
| .then(unittest.expectAsync1(((response) { |
| checkEmpty(response); |
| }))); |
| }); |
| |
| unittest.test('method--get', () { |
| var mock = HttpServerMock(); |
| var res = api.AndroidmanagementApi(mock).enterprises.webApps; |
| var arg_name = 'foo'; |
| var arg_$fields = 'foo'; |
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| var path = (req.url).path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), unittest.equals("v1/")); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| var query = (req.url).query; |
| var queryOffset = 0; |
| var queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| var keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); |
| |
| var h = { |
| 'content-type': 'application/json; charset=utf-8', |
| }; |
| var resp = convert.json.encode(buildWebApp()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), true); |
| res |
| .get(arg_name, $fields: arg_$fields) |
| .then(unittest.expectAsync1(((response) { |
| checkWebApp(response); |
| }))); |
| }); |
| |
| unittest.test('method--list', () { |
| var mock = HttpServerMock(); |
| var res = api.AndroidmanagementApi(mock).enterprises.webApps; |
| var arg_parent = 'foo'; |
| var arg_pageSize = 42; |
| var arg_pageToken = 'foo'; |
| var arg_$fields = 'foo'; |
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| var path = (req.url).path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), unittest.equals("v1/")); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| var query = (req.url).query; |
| var queryOffset = 0; |
| var queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| var keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect(core.int.parse(queryMap["pageSize"].first), |
| unittest.equals(arg_pageSize)); |
| unittest.expect( |
| queryMap["pageToken"].first, unittest.equals(arg_pageToken)); |
| unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); |
| |
| var h = { |
| 'content-type': 'application/json; charset=utf-8', |
| }; |
| var resp = convert.json.encode(buildListWebAppsResponse()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), true); |
| res |
| .list(arg_parent, |
| pageSize: arg_pageSize, |
| pageToken: arg_pageToken, |
| $fields: arg_$fields) |
| .then(unittest.expectAsync1(((response) { |
| checkListWebAppsResponse(response); |
| }))); |
| }); |
| |
| unittest.test('method--patch', () { |
| var mock = HttpServerMock(); |
| var res = api.AndroidmanagementApi(mock).enterprises.webApps; |
| var arg_request = buildWebApp(); |
| var arg_name = 'foo'; |
| var arg_updateMask = 'foo'; |
| var arg_$fields = 'foo'; |
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| var obj = api.WebApp.fromJson(json); |
| checkWebApp(obj); |
| |
| var path = (req.url).path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), unittest.equals("v1/")); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| var query = (req.url).query; |
| var queryOffset = 0; |
| var queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| var keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap["updateMask"].first, unittest.equals(arg_updateMask)); |
| unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); |
| |
| var h = { |
| 'content-type': 'application/json; charset=utf-8', |
| }; |
| var resp = convert.json.encode(buildWebApp()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), true); |
| res |
| .patch(arg_request, arg_name, |
| updateMask: arg_updateMask, $fields: arg_$fields) |
| .then(unittest.expectAsync1(((response) { |
| checkWebApp(response); |
| }))); |
| }); |
| }); |
| |
| unittest.group('resource-EnterprisesWebTokensResourceApi', () { |
| unittest.test('method--create', () { |
| var mock = HttpServerMock(); |
| var res = api.AndroidmanagementApi(mock).enterprises.webTokens; |
| var arg_request = buildWebToken(); |
| var arg_parent = 'foo'; |
| var arg_$fields = 'foo'; |
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| var obj = api.WebToken.fromJson(json); |
| checkWebToken(obj); |
| |
| var path = (req.url).path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), unittest.equals("v1/")); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| var query = (req.url).query; |
| var queryOffset = 0; |
| var queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| var keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); |
| |
| var h = { |
| 'content-type': 'application/json; charset=utf-8', |
| }; |
| var resp = convert.json.encode(buildWebToken()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), true); |
| res |
| .create(arg_request, arg_parent, $fields: arg_$fields) |
| .then(unittest.expectAsync1(((response) { |
| checkWebToken(response); |
| }))); |
| }); |
| }); |
| |
| unittest.group('resource-SignupUrlsResourceApi', () { |
| unittest.test('method--create', () { |
| var mock = HttpServerMock(); |
| var res = api.AndroidmanagementApi(mock).signupUrls; |
| var arg_callbackUrl = 'foo'; |
| var arg_projectId = 'foo'; |
| var arg_$fields = 'foo'; |
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| var path = (req.url).path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| pathOffset += 1; |
| unittest.expect(path.substring(pathOffset, pathOffset + 13), |
| unittest.equals("v1/signupUrls")); |
| pathOffset += 13; |
| |
| var query = (req.url).query; |
| var queryOffset = 0; |
| var queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| var keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap["callbackUrl"].first, unittest.equals(arg_callbackUrl)); |
| unittest.expect( |
| queryMap["projectId"].first, unittest.equals(arg_projectId)); |
| unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); |
| |
| var h = { |
| 'content-type': 'application/json; charset=utf-8', |
| }; |
| var resp = convert.json.encode(buildSignupUrl()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), true); |
| res |
| .create( |
| callbackUrl: arg_callbackUrl, |
| projectId: arg_projectId, |
| $fields: arg_$fields) |
| .then(unittest.expectAsync1(((response) { |
| checkSignupUrl(response); |
| }))); |
| }); |
| }); |
| } |