Index: generated/googleapis/test/androidenterprise/v1_test.dart |
diff --git a/generated/googleapis/test/androidenterprise/v1_test.dart b/generated/googleapis/test/androidenterprise/v1_test.dart |
index 7523f8caa9f361101222f161bda3ad18819bcb8b..5b0c9adcc6411511d9d6cb8ed358298dd2cc88d2 100644 |
--- a/generated/googleapis/test/androidenterprise/v1_test.dart |
+++ b/generated/googleapis/test/androidenterprise/v1_test.dart |
@@ -91,14 +91,14 @@ checkAdministratorWebToken(api.AdministratorWebToken o) { |
buildCounterAdministratorWebToken--; |
} |
-buildUnnamed2106() { |
+buildUnnamed2140() { |
var o = new core.List<core.String>(); |
o.add("foo"); |
o.add("foo"); |
return o; |
} |
-checkUnnamed2106(core.List<core.String> o) { |
+checkUnnamed2140(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')); |
@@ -111,7 +111,7 @@ buildAdministratorWebTokenSpec() { |
if (buildCounterAdministratorWebTokenSpec < 3) { |
o.kind = "foo"; |
o.parent = "foo"; |
- o.permission = buildUnnamed2106(); |
+ o.permission = buildUnnamed2140(); |
} |
buildCounterAdministratorWebTokenSpec--; |
return o; |
@@ -122,19 +122,40 @@ checkAdministratorWebTokenSpec(api.AdministratorWebTokenSpec o) { |
if (buildCounterAdministratorWebTokenSpec < 3) { |
unittest.expect(o.kind, unittest.equals('foo')); |
unittest.expect(o.parent, unittest.equals('foo')); |
- checkUnnamed2106(o.permission); |
+ checkUnnamed2140(o.permission); |
} |
buildCounterAdministratorWebTokenSpec--; |
} |
-buildUnnamed2107() { |
+core.int buildCounterAndroidDevicePolicyConfig = 0; |
+buildAndroidDevicePolicyConfig() { |
+ var o = new api.AndroidDevicePolicyConfig(); |
+ buildCounterAndroidDevicePolicyConfig++; |
+ if (buildCounterAndroidDevicePolicyConfig < 3) { |
+ o.kind = "foo"; |
+ o.state = "foo"; |
+ } |
+ buildCounterAndroidDevicePolicyConfig--; |
+ return o; |
+} |
+ |
+checkAndroidDevicePolicyConfig(api.AndroidDevicePolicyConfig o) { |
+ buildCounterAndroidDevicePolicyConfig++; |
+ if (buildCounterAndroidDevicePolicyConfig < 3) { |
+ unittest.expect(o.kind, unittest.equals('foo')); |
+ unittest.expect(o.state, unittest.equals('foo')); |
+ } |
+ buildCounterAndroidDevicePolicyConfig--; |
+} |
+ |
+buildUnnamed2141() { |
var o = new core.List<api.AppRestrictionsSchemaRestriction>(); |
o.add(buildAppRestrictionsSchemaRestriction()); |
o.add(buildAppRestrictionsSchemaRestriction()); |
return o; |
} |
-checkUnnamed2107(core.List<api.AppRestrictionsSchemaRestriction> o) { |
+checkUnnamed2141(core.List<api.AppRestrictionsSchemaRestriction> o) { |
unittest.expect(o, unittest.hasLength(2)); |
checkAppRestrictionsSchemaRestriction(o[0]); |
checkAppRestrictionsSchemaRestriction(o[1]); |
@@ -146,7 +167,7 @@ buildAppRestrictionsSchema() { |
buildCounterAppRestrictionsSchema++; |
if (buildCounterAppRestrictionsSchema < 3) { |
o.kind = "foo"; |
- o.restrictions = buildUnnamed2107(); |
+ o.restrictions = buildUnnamed2141(); |
} |
buildCounterAppRestrictionsSchema--; |
return o; |
@@ -156,7 +177,7 @@ checkAppRestrictionsSchema(api.AppRestrictionsSchema o) { |
buildCounterAppRestrictionsSchema++; |
if (buildCounterAppRestrictionsSchema < 3) { |
unittest.expect(o.kind, unittest.equals('foo')); |
- checkUnnamed2107(o.restrictions); |
+ checkUnnamed2141(o.restrictions); |
} |
buildCounterAppRestrictionsSchema--; |
} |
@@ -180,40 +201,40 @@ checkAppRestrictionsSchemaChangeEvent(api.AppRestrictionsSchemaChangeEvent o) { |
buildCounterAppRestrictionsSchemaChangeEvent--; |
} |
-buildUnnamed2108() { |
+buildUnnamed2142() { |
var o = new core.List<core.String>(); |
o.add("foo"); |
o.add("foo"); |
return o; |
} |
-checkUnnamed2108(core.List<core.String> o) { |
+checkUnnamed2142(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')); |
} |
-buildUnnamed2109() { |
+buildUnnamed2143() { |
var o = new core.List<core.String>(); |
o.add("foo"); |
o.add("foo"); |
return o; |
} |
-checkUnnamed2109(core.List<core.String> o) { |
+checkUnnamed2143(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')); |
} |
-buildUnnamed2110() { |
+buildUnnamed2144() { |
var o = new core.List<api.AppRestrictionsSchemaRestriction>(); |
o.add(buildAppRestrictionsSchemaRestriction()); |
o.add(buildAppRestrictionsSchemaRestriction()); |
return o; |
} |
-checkUnnamed2110(core.List<api.AppRestrictionsSchemaRestriction> o) { |
+checkUnnamed2144(core.List<api.AppRestrictionsSchemaRestriction> o) { |
unittest.expect(o, unittest.hasLength(2)); |
checkAppRestrictionsSchemaRestriction(o[0]); |
checkAppRestrictionsSchemaRestriction(o[1]); |
@@ -226,10 +247,10 @@ buildAppRestrictionsSchemaRestriction() { |
if (buildCounterAppRestrictionsSchemaRestriction < 3) { |
o.defaultValue = buildAppRestrictionsSchemaRestrictionRestrictionValue(); |
o.description = "foo"; |
- o.entry = buildUnnamed2108(); |
- o.entryValue = buildUnnamed2109(); |
+ o.entry = buildUnnamed2142(); |
+ o.entryValue = buildUnnamed2143(); |
o.key = "foo"; |
- o.nestedRestriction = buildUnnamed2110(); |
+ o.nestedRestriction = buildUnnamed2144(); |
o.restrictionType = "foo"; |
o.title = "foo"; |
} |
@@ -242,24 +263,24 @@ checkAppRestrictionsSchemaRestriction(api.AppRestrictionsSchemaRestriction o) { |
if (buildCounterAppRestrictionsSchemaRestriction < 3) { |
checkAppRestrictionsSchemaRestrictionRestrictionValue(o.defaultValue); |
unittest.expect(o.description, unittest.equals('foo')); |
- checkUnnamed2108(o.entry); |
- checkUnnamed2109(o.entryValue); |
+ checkUnnamed2142(o.entry); |
+ checkUnnamed2143(o.entryValue); |
unittest.expect(o.key, unittest.equals('foo')); |
- checkUnnamed2110(o.nestedRestriction); |
+ checkUnnamed2144(o.nestedRestriction); |
unittest.expect(o.restrictionType, unittest.equals('foo')); |
unittest.expect(o.title, unittest.equals('foo')); |
} |
buildCounterAppRestrictionsSchemaRestriction--; |
} |
-buildUnnamed2111() { |
+buildUnnamed2145() { |
var o = new core.List<core.String>(); |
o.add("foo"); |
o.add("foo"); |
return o; |
} |
-checkUnnamed2111(core.List<core.String> o) { |
+checkUnnamed2145(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')); |
@@ -273,7 +294,7 @@ buildAppRestrictionsSchemaRestrictionRestrictionValue() { |
o.type = "foo"; |
o.valueBool = true; |
o.valueInteger = 42; |
- o.valueMultiselect = buildUnnamed2111(); |
+ o.valueMultiselect = buildUnnamed2145(); |
o.valueString = "foo"; |
} |
buildCounterAppRestrictionsSchemaRestrictionRestrictionValue--; |
@@ -286,7 +307,7 @@ checkAppRestrictionsSchemaRestrictionRestrictionValue(api.AppRestrictionsSchemaR |
unittest.expect(o.type, unittest.equals('foo')); |
unittest.expect(o.valueBool, unittest.isTrue); |
unittest.expect(o.valueInteger, unittest.equals(42)); |
- checkUnnamed2111(o.valueMultiselect); |
+ checkUnnamed2145(o.valueMultiselect); |
unittest.expect(o.valueString, unittest.equals('foo')); |
} |
buildCounterAppRestrictionsSchemaRestrictionRestrictionValue--; |
@@ -418,14 +439,14 @@ checkDeviceState(api.DeviceState o) { |
buildCounterDeviceState--; |
} |
-buildUnnamed2112() { |
+buildUnnamed2146() { |
var o = new core.List<api.Device>(); |
o.add(buildDevice()); |
o.add(buildDevice()); |
return o; |
} |
-checkUnnamed2112(core.List<api.Device> o) { |
+checkUnnamed2146(core.List<api.Device> o) { |
unittest.expect(o, unittest.hasLength(2)); |
checkDevice(o[0]); |
checkDevice(o[1]); |
@@ -436,7 +457,7 @@ buildDevicesListResponse() { |
var o = new api.DevicesListResponse(); |
buildCounterDevicesListResponse++; |
if (buildCounterDevicesListResponse < 3) { |
- o.device = buildUnnamed2112(); |
+ o.device = buildUnnamed2146(); |
o.kind = "foo"; |
} |
buildCounterDevicesListResponse--; |
@@ -446,20 +467,20 @@ buildDevicesListResponse() { |
checkDevicesListResponse(api.DevicesListResponse o) { |
buildCounterDevicesListResponse++; |
if (buildCounterDevicesListResponse < 3) { |
- checkUnnamed2112(o.device); |
+ checkUnnamed2146(o.device); |
unittest.expect(o.kind, unittest.equals('foo')); |
} |
buildCounterDevicesListResponse--; |
} |
-buildUnnamed2113() { |
+buildUnnamed2147() { |
var o = new core.List<api.Administrator>(); |
o.add(buildAdministrator()); |
o.add(buildAdministrator()); |
return o; |
} |
-checkUnnamed2113(core.List<api.Administrator> o) { |
+checkUnnamed2147(core.List<api.Administrator> o) { |
unittest.expect(o, unittest.hasLength(2)); |
checkAdministrator(o[0]); |
checkAdministrator(o[1]); |
@@ -470,7 +491,7 @@ buildEnterprise() { |
var o = new api.Enterprise(); |
buildCounterEnterprise++; |
if (buildCounterEnterprise < 3) { |
- o.administrator = buildUnnamed2113(); |
+ o.administrator = buildUnnamed2147(); |
o.id = "foo"; |
o.kind = "foo"; |
o.name = "foo"; |
@@ -483,7 +504,7 @@ buildEnterprise() { |
checkEnterprise(api.Enterprise o) { |
buildCounterEnterprise++; |
if (buildCounterEnterprise < 3) { |
- checkUnnamed2113(o.administrator); |
+ checkUnnamed2147(o.administrator); |
unittest.expect(o.id, unittest.equals('foo')); |
unittest.expect(o.kind, unittest.equals('foo')); |
unittest.expect(o.name, unittest.equals('foo')); |
@@ -513,14 +534,14 @@ checkEnterpriseAccount(api.EnterpriseAccount o) { |
buildCounterEnterpriseAccount--; |
} |
-buildUnnamed2114() { |
+buildUnnamed2148() { |
var o = new core.List<api.Enterprise>(); |
o.add(buildEnterprise()); |
o.add(buildEnterprise()); |
return o; |
} |
-checkUnnamed2114(core.List<api.Enterprise> o) { |
+checkUnnamed2148(core.List<api.Enterprise> o) { |
unittest.expect(o, unittest.hasLength(2)); |
checkEnterprise(o[0]); |
checkEnterprise(o[1]); |
@@ -531,7 +552,7 @@ buildEnterprisesListResponse() { |
var o = new api.EnterprisesListResponse(); |
buildCounterEnterprisesListResponse++; |
if (buildCounterEnterprisesListResponse < 3) { |
- o.enterprise = buildUnnamed2114(); |
+ o.enterprise = buildUnnamed2148(); |
o.kind = "foo"; |
} |
buildCounterEnterprisesListResponse--; |
@@ -541,7 +562,7 @@ buildEnterprisesListResponse() { |
checkEnterprisesListResponse(api.EnterprisesListResponse o) { |
buildCounterEnterprisesListResponse++; |
if (buildCounterEnterprisesListResponse < 3) { |
- checkUnnamed2114(o.enterprise); |
+ checkUnnamed2148(o.enterprise); |
unittest.expect(o.kind, unittest.equals('foo')); |
} |
buildCounterEnterprisesListResponse--; |
@@ -591,14 +612,14 @@ checkEntitlement(api.Entitlement o) { |
buildCounterEntitlement--; |
} |
-buildUnnamed2115() { |
+buildUnnamed2149() { |
var o = new core.List<api.Entitlement>(); |
o.add(buildEntitlement()); |
o.add(buildEntitlement()); |
return o; |
} |
-checkUnnamed2115(core.List<api.Entitlement> o) { |
+checkUnnamed2149(core.List<api.Entitlement> o) { |
unittest.expect(o, unittest.hasLength(2)); |
checkEntitlement(o[0]); |
checkEntitlement(o[1]); |
@@ -609,7 +630,7 @@ buildEntitlementsListResponse() { |
var o = new api.EntitlementsListResponse(); |
buildCounterEntitlementsListResponse++; |
if (buildCounterEntitlementsListResponse < 3) { |
- o.entitlement = buildUnnamed2115(); |
+ o.entitlement = buildUnnamed2149(); |
o.kind = "foo"; |
} |
buildCounterEntitlementsListResponse--; |
@@ -619,7 +640,7 @@ buildEntitlementsListResponse() { |
checkEntitlementsListResponse(api.EntitlementsListResponse o) { |
buildCounterEntitlementsListResponse++; |
if (buildCounterEntitlementsListResponse < 3) { |
- checkUnnamed2115(o.entitlement); |
+ checkUnnamed2149(o.entitlement); |
unittest.expect(o.kind, unittest.equals('foo')); |
} |
buildCounterEntitlementsListResponse--; |
@@ -656,14 +677,14 @@ checkGroupLicense(api.GroupLicense o) { |
buildCounterGroupLicense--; |
} |
-buildUnnamed2116() { |
+buildUnnamed2150() { |
var o = new core.List<api.User>(); |
o.add(buildUser()); |
o.add(buildUser()); |
return o; |
} |
-checkUnnamed2116(core.List<api.User> o) { |
+checkUnnamed2150(core.List<api.User> o) { |
unittest.expect(o, unittest.hasLength(2)); |
checkUser(o[0]); |
checkUser(o[1]); |
@@ -675,7 +696,7 @@ buildGroupLicenseUsersListResponse() { |
buildCounterGroupLicenseUsersListResponse++; |
if (buildCounterGroupLicenseUsersListResponse < 3) { |
o.kind = "foo"; |
- o.user = buildUnnamed2116(); |
+ o.user = buildUnnamed2150(); |
} |
buildCounterGroupLicenseUsersListResponse--; |
return o; |
@@ -685,19 +706,19 @@ checkGroupLicenseUsersListResponse(api.GroupLicenseUsersListResponse o) { |
buildCounterGroupLicenseUsersListResponse++; |
if (buildCounterGroupLicenseUsersListResponse < 3) { |
unittest.expect(o.kind, unittest.equals('foo')); |
- checkUnnamed2116(o.user); |
+ checkUnnamed2150(o.user); |
} |
buildCounterGroupLicenseUsersListResponse--; |
} |
-buildUnnamed2117() { |
+buildUnnamed2151() { |
var o = new core.List<api.GroupLicense>(); |
o.add(buildGroupLicense()); |
o.add(buildGroupLicense()); |
return o; |
} |
-checkUnnamed2117(core.List<api.GroupLicense> o) { |
+checkUnnamed2151(core.List<api.GroupLicense> o) { |
unittest.expect(o, unittest.hasLength(2)); |
checkGroupLicense(o[0]); |
checkGroupLicense(o[1]); |
@@ -708,7 +729,7 @@ buildGroupLicensesListResponse() { |
var o = new api.GroupLicensesListResponse(); |
buildCounterGroupLicensesListResponse++; |
if (buildCounterGroupLicensesListResponse < 3) { |
- o.groupLicense = buildUnnamed2117(); |
+ o.groupLicense = buildUnnamed2151(); |
o.kind = "foo"; |
} |
buildCounterGroupLicensesListResponse--; |
@@ -718,7 +739,7 @@ buildGroupLicensesListResponse() { |
checkGroupLicensesListResponse(api.GroupLicensesListResponse o) { |
buildCounterGroupLicensesListResponse++; |
if (buildCounterGroupLicensesListResponse < 3) { |
- checkUnnamed2117(o.groupLicense); |
+ checkUnnamed2151(o.groupLicense); |
unittest.expect(o.kind, unittest.equals('foo')); |
} |
buildCounterGroupLicensesListResponse--; |
@@ -776,14 +797,14 @@ checkInstallFailureEvent(api.InstallFailureEvent o) { |
buildCounterInstallFailureEvent--; |
} |
-buildUnnamed2118() { |
+buildUnnamed2152() { |
var o = new core.List<api.Install>(); |
o.add(buildInstall()); |
o.add(buildInstall()); |
return o; |
} |
-checkUnnamed2118(core.List<api.Install> o) { |
+checkUnnamed2152(core.List<api.Install> o) { |
unittest.expect(o, unittest.hasLength(2)); |
checkInstall(o[0]); |
checkInstall(o[1]); |
@@ -794,7 +815,7 @@ buildInstallsListResponse() { |
var o = new api.InstallsListResponse(); |
buildCounterInstallsListResponse++; |
if (buildCounterInstallsListResponse < 3) { |
- o.install = buildUnnamed2118(); |
+ o.install = buildUnnamed2152(); |
o.kind = "foo"; |
} |
buildCounterInstallsListResponse--; |
@@ -804,7 +825,7 @@ buildInstallsListResponse() { |
checkInstallsListResponse(api.InstallsListResponse o) { |
buildCounterInstallsListResponse++; |
if (buildCounterInstallsListResponse < 3) { |
- checkUnnamed2118(o.install); |
+ checkUnnamed2152(o.install); |
unittest.expect(o.kind, unittest.equals('foo')); |
} |
buildCounterInstallsListResponse--; |
@@ -831,14 +852,14 @@ checkLocalizedText(api.LocalizedText o) { |
buildCounterLocalizedText--; |
} |
-buildUnnamed2119() { |
+buildUnnamed2153() { |
var o = new core.List<api.ManagedProperty>(); |
o.add(buildManagedProperty()); |
o.add(buildManagedProperty()); |
return o; |
} |
-checkUnnamed2119(core.List<api.ManagedProperty> o) { |
+checkUnnamed2153(core.List<api.ManagedProperty> o) { |
unittest.expect(o, unittest.hasLength(2)); |
checkManagedProperty(o[0]); |
checkManagedProperty(o[1]); |
@@ -850,7 +871,7 @@ buildManagedConfiguration() { |
buildCounterManagedConfiguration++; |
if (buildCounterManagedConfiguration < 3) { |
o.kind = "foo"; |
- o.managedProperty = buildUnnamed2119(); |
+ o.managedProperty = buildUnnamed2153(); |
o.productId = "foo"; |
} |
buildCounterManagedConfiguration--; |
@@ -861,20 +882,20 @@ checkManagedConfiguration(api.ManagedConfiguration o) { |
buildCounterManagedConfiguration++; |
if (buildCounterManagedConfiguration < 3) { |
unittest.expect(o.kind, unittest.equals('foo')); |
- checkUnnamed2119(o.managedProperty); |
+ checkUnnamed2153(o.managedProperty); |
unittest.expect(o.productId, unittest.equals('foo')); |
} |
buildCounterManagedConfiguration--; |
} |
-buildUnnamed2120() { |
+buildUnnamed2154() { |
var o = new core.List<api.ManagedConfiguration>(); |
o.add(buildManagedConfiguration()); |
o.add(buildManagedConfiguration()); |
return o; |
} |
-checkUnnamed2120(core.List<api.ManagedConfiguration> o) { |
+checkUnnamed2154(core.List<api.ManagedConfiguration> o) { |
unittest.expect(o, unittest.hasLength(2)); |
checkManagedConfiguration(o[0]); |
checkManagedConfiguration(o[1]); |
@@ -886,7 +907,7 @@ buildManagedConfigurationsForDeviceListResponse() { |
buildCounterManagedConfigurationsForDeviceListResponse++; |
if (buildCounterManagedConfigurationsForDeviceListResponse < 3) { |
o.kind = "foo"; |
- o.managedConfigurationForDevice = buildUnnamed2120(); |
+ o.managedConfigurationForDevice = buildUnnamed2154(); |
} |
buildCounterManagedConfigurationsForDeviceListResponse--; |
return o; |
@@ -896,19 +917,19 @@ checkManagedConfigurationsForDeviceListResponse(api.ManagedConfigurationsForDevi |
buildCounterManagedConfigurationsForDeviceListResponse++; |
if (buildCounterManagedConfigurationsForDeviceListResponse < 3) { |
unittest.expect(o.kind, unittest.equals('foo')); |
- checkUnnamed2120(o.managedConfigurationForDevice); |
+ checkUnnamed2154(o.managedConfigurationForDevice); |
} |
buildCounterManagedConfigurationsForDeviceListResponse--; |
} |
-buildUnnamed2121() { |
+buildUnnamed2155() { |
var o = new core.List<api.ManagedConfiguration>(); |
o.add(buildManagedConfiguration()); |
o.add(buildManagedConfiguration()); |
return o; |
} |
-checkUnnamed2121(core.List<api.ManagedConfiguration> o) { |
+checkUnnamed2155(core.List<api.ManagedConfiguration> o) { |
unittest.expect(o, unittest.hasLength(2)); |
checkManagedConfiguration(o[0]); |
checkManagedConfiguration(o[1]); |
@@ -920,7 +941,7 @@ buildManagedConfigurationsForUserListResponse() { |
buildCounterManagedConfigurationsForUserListResponse++; |
if (buildCounterManagedConfigurationsForUserListResponse < 3) { |
o.kind = "foo"; |
- o.managedConfigurationForUser = buildUnnamed2121(); |
+ o.managedConfigurationForUser = buildUnnamed2155(); |
} |
buildCounterManagedConfigurationsForUserListResponse--; |
return o; |
@@ -930,32 +951,32 @@ checkManagedConfigurationsForUserListResponse(api.ManagedConfigurationsForUserLi |
buildCounterManagedConfigurationsForUserListResponse++; |
if (buildCounterManagedConfigurationsForUserListResponse < 3) { |
unittest.expect(o.kind, unittest.equals('foo')); |
- checkUnnamed2121(o.managedConfigurationForUser); |
+ checkUnnamed2155(o.managedConfigurationForUser); |
} |
buildCounterManagedConfigurationsForUserListResponse--; |
} |
-buildUnnamed2122() { |
+buildUnnamed2156() { |
var o = new core.List<api.ManagedPropertyBundle>(); |
o.add(buildManagedPropertyBundle()); |
o.add(buildManagedPropertyBundle()); |
return o; |
} |
-checkUnnamed2122(core.List<api.ManagedPropertyBundle> o) { |
+checkUnnamed2156(core.List<api.ManagedPropertyBundle> o) { |
unittest.expect(o, unittest.hasLength(2)); |
checkManagedPropertyBundle(o[0]); |
checkManagedPropertyBundle(o[1]); |
} |
-buildUnnamed2123() { |
+buildUnnamed2157() { |
var o = new core.List<core.String>(); |
o.add("foo"); |
o.add("foo"); |
return o; |
} |
-checkUnnamed2123(core.List<core.String> o) { |
+checkUnnamed2157(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')); |
@@ -969,10 +990,10 @@ buildManagedProperty() { |
o.key = "foo"; |
o.valueBool = true; |
o.valueBundle = buildManagedPropertyBundle(); |
- o.valueBundleArray = buildUnnamed2122(); |
+ o.valueBundleArray = buildUnnamed2156(); |
o.valueInteger = 42; |
o.valueString = "foo"; |
- o.valueStringArray = buildUnnamed2123(); |
+ o.valueStringArray = buildUnnamed2157(); |
} |
buildCounterManagedProperty--; |
return o; |
@@ -984,22 +1005,22 @@ checkManagedProperty(api.ManagedProperty o) { |
unittest.expect(o.key, unittest.equals('foo')); |
unittest.expect(o.valueBool, unittest.isTrue); |
checkManagedPropertyBundle(o.valueBundle); |
- checkUnnamed2122(o.valueBundleArray); |
+ checkUnnamed2156(o.valueBundleArray); |
unittest.expect(o.valueInteger, unittest.equals(42)); |
unittest.expect(o.valueString, unittest.equals('foo')); |
- checkUnnamed2123(o.valueStringArray); |
+ checkUnnamed2157(o.valueStringArray); |
} |
buildCounterManagedProperty--; |
} |
-buildUnnamed2124() { |
+buildUnnamed2158() { |
var o = new core.List<api.ManagedProperty>(); |
o.add(buildManagedProperty()); |
o.add(buildManagedProperty()); |
return o; |
} |
-checkUnnamed2124(core.List<api.ManagedProperty> o) { |
+checkUnnamed2158(core.List<api.ManagedProperty> o) { |
unittest.expect(o, unittest.hasLength(2)); |
checkManagedProperty(o[0]); |
checkManagedProperty(o[1]); |
@@ -1010,7 +1031,7 @@ buildManagedPropertyBundle() { |
var o = new api.ManagedPropertyBundle(); |
buildCounterManagedPropertyBundle++; |
if (buildCounterManagedPropertyBundle < 3) { |
- o.managedProperty = buildUnnamed2124(); |
+ o.managedProperty = buildUnnamed2158(); |
} |
buildCounterManagedPropertyBundle--; |
return o; |
@@ -1019,7 +1040,7 @@ buildManagedPropertyBundle() { |
checkManagedPropertyBundle(api.ManagedPropertyBundle o) { |
buildCounterManagedPropertyBundle++; |
if (buildCounterManagedPropertyBundle < 3) { |
- checkUnnamed2124(o.managedProperty); |
+ checkUnnamed2158(o.managedProperty); |
} |
buildCounterManagedPropertyBundle--; |
} |
@@ -1047,27 +1068,27 @@ checkNewDeviceEvent(api.NewDeviceEvent o) { |
buildCounterNewDeviceEvent--; |
} |
-buildUnnamed2125() { |
+buildUnnamed2159() { |
var o = new core.List<core.String>(); |
o.add("foo"); |
o.add("foo"); |
return o; |
} |
-checkUnnamed2125(core.List<core.String> o) { |
+checkUnnamed2159(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')); |
} |
-buildUnnamed2126() { |
+buildUnnamed2160() { |
var o = new core.List<core.String>(); |
o.add("foo"); |
o.add("foo"); |
return o; |
} |
-checkUnnamed2126(core.List<core.String> o) { |
+checkUnnamed2160(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')); |
@@ -1078,9 +1099,9 @@ buildNewPermissionsEvent() { |
var o = new api.NewPermissionsEvent(); |
buildCounterNewPermissionsEvent++; |
if (buildCounterNewPermissionsEvent < 3) { |
- o.approvedPermissions = buildUnnamed2125(); |
+ o.approvedPermissions = buildUnnamed2159(); |
o.productId = "foo"; |
- o.requestedPermissions = buildUnnamed2126(); |
+ o.requestedPermissions = buildUnnamed2160(); |
} |
buildCounterNewPermissionsEvent--; |
return o; |
@@ -1089,9 +1110,9 @@ buildNewPermissionsEvent() { |
checkNewPermissionsEvent(api.NewPermissionsEvent o) { |
buildCounterNewPermissionsEvent++; |
if (buildCounterNewPermissionsEvent < 3) { |
- checkUnnamed2125(o.approvedPermissions); |
+ checkUnnamed2159(o.approvedPermissions); |
unittest.expect(o.productId, unittest.equals('foo')); |
- checkUnnamed2126(o.requestedPermissions); |
+ checkUnnamed2160(o.requestedPermissions); |
} |
buildCounterNewPermissionsEvent--; |
} |
@@ -1133,14 +1154,14 @@ checkNotification(api.Notification o) { |
buildCounterNotification--; |
} |
-buildUnnamed2127() { |
+buildUnnamed2161() { |
var o = new core.List<api.Notification>(); |
o.add(buildNotification()); |
o.add(buildNotification()); |
return o; |
} |
-checkUnnamed2127(core.List<api.Notification> o) { |
+checkUnnamed2161(core.List<api.Notification> o) { |
unittest.expect(o, unittest.hasLength(2)); |
checkNotification(o[0]); |
checkNotification(o[1]); |
@@ -1152,7 +1173,7 @@ buildNotificationSet() { |
buildCounterNotificationSet++; |
if (buildCounterNotificationSet < 3) { |
o.kind = "foo"; |
- o.notification = buildUnnamed2127(); |
+ o.notification = buildUnnamed2161(); |
o.notificationSetId = "foo"; |
} |
buildCounterNotificationSet--; |
@@ -1163,7 +1184,7 @@ checkNotificationSet(api.NotificationSet o) { |
buildCounterNotificationSet++; |
if (buildCounterNotificationSet < 3) { |
unittest.expect(o.kind, unittest.equals('foo')); |
- checkUnnamed2127(o.notification); |
+ checkUnnamed2161(o.notification); |
unittest.expect(o.notificationSetId, unittest.equals('foo')); |
} |
buildCounterNotificationSet--; |
@@ -1217,14 +1238,14 @@ checkPermission(api.Permission o) { |
buildCounterPermission--; |
} |
-buildUnnamed2128() { |
+buildUnnamed2162() { |
var o = new core.List<api.AppVersion>(); |
o.add(buildAppVersion()); |
o.add(buildAppVersion()); |
return o; |
} |
-checkUnnamed2128(core.List<api.AppVersion> o) { |
+checkUnnamed2162(core.List<api.AppVersion> o) { |
unittest.expect(o, unittest.hasLength(2)); |
checkAppVersion(o[0]); |
checkAppVersion(o[1]); |
@@ -1235,7 +1256,7 @@ buildProduct() { |
var o = new api.Product(); |
buildCounterProduct++; |
if (buildCounterProduct < 3) { |
- o.appVersion = buildUnnamed2128(); |
+ o.appVersion = buildUnnamed2162(); |
o.authorName = "foo"; |
o.detailsUrl = "foo"; |
o.distributionChannel = "foo"; |
@@ -1255,7 +1276,7 @@ buildProduct() { |
checkProduct(api.Product o) { |
buildCounterProduct++; |
if (buildCounterProduct < 3) { |
- checkUnnamed2128(o.appVersion); |
+ checkUnnamed2162(o.appVersion); |
unittest.expect(o.authorName, unittest.equals('foo')); |
unittest.expect(o.detailsUrl, unittest.equals('foo')); |
unittest.expect(o.distributionChannel, unittest.equals('foo')); |
@@ -1334,14 +1355,14 @@ checkProductPermission(api.ProductPermission o) { |
buildCounterProductPermission--; |
} |
-buildUnnamed2129() { |
+buildUnnamed2163() { |
var o = new core.List<api.ProductPermission>(); |
o.add(buildProductPermission()); |
o.add(buildProductPermission()); |
return o; |
} |
-checkUnnamed2129(core.List<api.ProductPermission> o) { |
+checkUnnamed2163(core.List<api.ProductPermission> o) { |
unittest.expect(o, unittest.hasLength(2)); |
checkProductPermission(o[0]); |
checkProductPermission(o[1]); |
@@ -1353,7 +1374,7 @@ buildProductPermissions() { |
buildCounterProductPermissions++; |
if (buildCounterProductPermissions < 3) { |
o.kind = "foo"; |
- o.permission = buildUnnamed2129(); |
+ o.permission = buildUnnamed2163(); |
o.productId = "foo"; |
} |
buildCounterProductPermissions--; |
@@ -1364,20 +1385,20 @@ checkProductPermissions(api.ProductPermissions o) { |
buildCounterProductPermissions++; |
if (buildCounterProductPermissions < 3) { |
unittest.expect(o.kind, unittest.equals('foo')); |
- checkUnnamed2129(o.permission); |
+ checkUnnamed2163(o.permission); |
unittest.expect(o.productId, unittest.equals('foo')); |
} |
buildCounterProductPermissions--; |
} |
-buildUnnamed2130() { |
+buildUnnamed2164() { |
var o = new core.List<core.String>(); |
o.add("foo"); |
o.add("foo"); |
return o; |
} |
-checkUnnamed2130(core.List<core.String> o) { |
+checkUnnamed2164(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')); |
@@ -1389,7 +1410,7 @@ buildProductSet() { |
buildCounterProductSet++; |
if (buildCounterProductSet < 3) { |
o.kind = "foo"; |
- o.productId = buildUnnamed2130(); |
+ o.productId = buildUnnamed2164(); |
o.productSetBehavior = "foo"; |
} |
buildCounterProductSet--; |
@@ -1400,7 +1421,7 @@ checkProductSet(api.ProductSet o) { |
buildCounterProductSet++; |
if (buildCounterProductSet < 3) { |
unittest.expect(o.kind, unittest.equals('foo')); |
- checkUnnamed2130(o.productId); |
+ checkUnnamed2164(o.productId); |
unittest.expect(o.productSetBehavior, unittest.equals('foo')); |
} |
buildCounterProductSet--; |
@@ -1446,14 +1467,14 @@ checkProductsGenerateApprovalUrlResponse(api.ProductsGenerateApprovalUrlResponse |
buildCounterProductsGenerateApprovalUrlResponse--; |
} |
-buildUnnamed2131() { |
+buildUnnamed2165() { |
var o = new core.List<api.Product>(); |
o.add(buildProduct()); |
o.add(buildProduct()); |
return o; |
} |
-checkUnnamed2131(core.List<api.Product> o) { |
+checkUnnamed2165(core.List<api.Product> o) { |
unittest.expect(o, unittest.hasLength(2)); |
checkProduct(o[0]); |
checkProduct(o[1]); |
@@ -1466,7 +1487,7 @@ buildProductsListResponse() { |
if (buildCounterProductsListResponse < 3) { |
o.kind = "foo"; |
o.pageInfo = buildPageInfo(); |
- o.product = buildUnnamed2131(); |
+ o.product = buildUnnamed2165(); |
o.tokenPagination = buildTokenPagination(); |
} |
buildCounterProductsListResponse--; |
@@ -1478,7 +1499,7 @@ checkProductsListResponse(api.ProductsListResponse o) { |
if (buildCounterProductsListResponse < 3) { |
unittest.expect(o.kind, unittest.equals('foo')); |
checkPageInfo(o.pageInfo); |
- checkUnnamed2131(o.product); |
+ checkUnnamed2165(o.product); |
checkTokenPagination(o.tokenPagination); |
} |
buildCounterProductsListResponse--; |
@@ -1534,14 +1555,14 @@ checkServiceAccountKey(api.ServiceAccountKey o) { |
buildCounterServiceAccountKey--; |
} |
-buildUnnamed2132() { |
+buildUnnamed2166() { |
var o = new core.List<api.ServiceAccountKey>(); |
o.add(buildServiceAccountKey()); |
o.add(buildServiceAccountKey()); |
return o; |
} |
-checkUnnamed2132(core.List<api.ServiceAccountKey> o) { |
+checkUnnamed2166(core.List<api.ServiceAccountKey> o) { |
unittest.expect(o, unittest.hasLength(2)); |
checkServiceAccountKey(o[0]); |
checkServiceAccountKey(o[1]); |
@@ -1552,7 +1573,7 @@ buildServiceAccountKeysListResponse() { |
var o = new api.ServiceAccountKeysListResponse(); |
buildCounterServiceAccountKeysListResponse++; |
if (buildCounterServiceAccountKeysListResponse < 3) { |
- o.serviceAccountKey = buildUnnamed2132(); |
+ o.serviceAccountKey = buildUnnamed2166(); |
} |
buildCounterServiceAccountKeysListResponse--; |
return o; |
@@ -1561,7 +1582,7 @@ buildServiceAccountKeysListResponse() { |
checkServiceAccountKeysListResponse(api.ServiceAccountKeysListResponse o) { |
buildCounterServiceAccountKeysListResponse++; |
if (buildCounterServiceAccountKeysListResponse < 3) { |
- checkUnnamed2132(o.serviceAccountKey); |
+ checkUnnamed2166(o.serviceAccountKey); |
} |
buildCounterServiceAccountKeysListResponse--; |
} |
@@ -1589,27 +1610,27 @@ checkSignupInfo(api.SignupInfo o) { |
buildCounterSignupInfo--; |
} |
-buildUnnamed2133() { |
+buildUnnamed2167() { |
var o = new core.List<api.LocalizedText>(); |
o.add(buildLocalizedText()); |
o.add(buildLocalizedText()); |
return o; |
} |
-checkUnnamed2133(core.List<api.LocalizedText> o) { |
+checkUnnamed2167(core.List<api.LocalizedText> o) { |
unittest.expect(o, unittest.hasLength(2)); |
checkLocalizedText(o[0]); |
checkLocalizedText(o[1]); |
} |
-buildUnnamed2134() { |
+buildUnnamed2168() { |
var o = new core.List<core.String>(); |
o.add("foo"); |
o.add("foo"); |
return o; |
} |
-checkUnnamed2134(core.List<core.String> o) { |
+checkUnnamed2168(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')); |
@@ -1622,9 +1643,9 @@ buildStoreCluster() { |
if (buildCounterStoreCluster < 3) { |
o.id = "foo"; |
o.kind = "foo"; |
- o.name = buildUnnamed2133(); |
+ o.name = buildUnnamed2167(); |
o.orderInPage = "foo"; |
- o.productId = buildUnnamed2134(); |
+ o.productId = buildUnnamed2168(); |
} |
buildCounterStoreCluster--; |
return o; |
@@ -1635,9 +1656,9 @@ checkStoreCluster(api.StoreCluster o) { |
if (buildCounterStoreCluster < 3) { |
unittest.expect(o.id, unittest.equals('foo')); |
unittest.expect(o.kind, unittest.equals('foo')); |
- checkUnnamed2133(o.name); |
+ checkUnnamed2167(o.name); |
unittest.expect(o.orderInPage, unittest.equals('foo')); |
- checkUnnamed2134(o.productId); |
+ checkUnnamed2168(o.productId); |
} |
buildCounterStoreCluster--; |
} |
@@ -1665,14 +1686,14 @@ checkStoreLayout(api.StoreLayout o) { |
buildCounterStoreLayout--; |
} |
-buildUnnamed2135() { |
+buildUnnamed2169() { |
var o = new core.List<api.StoreCluster>(); |
o.add(buildStoreCluster()); |
o.add(buildStoreCluster()); |
return o; |
} |
-checkUnnamed2135(core.List<api.StoreCluster> o) { |
+checkUnnamed2169(core.List<api.StoreCluster> o) { |
unittest.expect(o, unittest.hasLength(2)); |
checkStoreCluster(o[0]); |
checkStoreCluster(o[1]); |
@@ -1683,7 +1704,7 @@ buildStoreLayoutClustersListResponse() { |
var o = new api.StoreLayoutClustersListResponse(); |
buildCounterStoreLayoutClustersListResponse++; |
if (buildCounterStoreLayoutClustersListResponse < 3) { |
- o.cluster = buildUnnamed2135(); |
+ o.cluster = buildUnnamed2169(); |
o.kind = "foo"; |
} |
buildCounterStoreLayoutClustersListResponse--; |
@@ -1693,20 +1714,20 @@ buildStoreLayoutClustersListResponse() { |
checkStoreLayoutClustersListResponse(api.StoreLayoutClustersListResponse o) { |
buildCounterStoreLayoutClustersListResponse++; |
if (buildCounterStoreLayoutClustersListResponse < 3) { |
- checkUnnamed2135(o.cluster); |
+ checkUnnamed2169(o.cluster); |
unittest.expect(o.kind, unittest.equals('foo')); |
} |
buildCounterStoreLayoutClustersListResponse--; |
} |
-buildUnnamed2136() { |
+buildUnnamed2170() { |
var o = new core.List<api.StorePage>(); |
o.add(buildStorePage()); |
o.add(buildStorePage()); |
return o; |
} |
-checkUnnamed2136(core.List<api.StorePage> o) { |
+checkUnnamed2170(core.List<api.StorePage> o) { |
unittest.expect(o, unittest.hasLength(2)); |
checkStorePage(o[0]); |
checkStorePage(o[1]); |
@@ -1718,7 +1739,7 @@ buildStoreLayoutPagesListResponse() { |
buildCounterStoreLayoutPagesListResponse++; |
if (buildCounterStoreLayoutPagesListResponse < 3) { |
o.kind = "foo"; |
- o.page = buildUnnamed2136(); |
+ o.page = buildUnnamed2170(); |
} |
buildCounterStoreLayoutPagesListResponse--; |
return o; |
@@ -1728,32 +1749,32 @@ checkStoreLayoutPagesListResponse(api.StoreLayoutPagesListResponse o) { |
buildCounterStoreLayoutPagesListResponse++; |
if (buildCounterStoreLayoutPagesListResponse < 3) { |
unittest.expect(o.kind, unittest.equals('foo')); |
- checkUnnamed2136(o.page); |
+ checkUnnamed2170(o.page); |
} |
buildCounterStoreLayoutPagesListResponse--; |
} |
-buildUnnamed2137() { |
+buildUnnamed2171() { |
var o = new core.List<core.String>(); |
o.add("foo"); |
o.add("foo"); |
return o; |
} |
-checkUnnamed2137(core.List<core.String> o) { |
+checkUnnamed2171(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')); |
} |
-buildUnnamed2138() { |
+buildUnnamed2172() { |
var o = new core.List<api.LocalizedText>(); |
o.add(buildLocalizedText()); |
o.add(buildLocalizedText()); |
return o; |
} |
-checkUnnamed2138(core.List<api.LocalizedText> o) { |
+checkUnnamed2172(core.List<api.LocalizedText> o) { |
unittest.expect(o, unittest.hasLength(2)); |
checkLocalizedText(o[0]); |
checkLocalizedText(o[1]); |
@@ -1766,8 +1787,8 @@ buildStorePage() { |
if (buildCounterStorePage < 3) { |
o.id = "foo"; |
o.kind = "foo"; |
- o.link = buildUnnamed2137(); |
- o.name = buildUnnamed2138(); |
+ o.link = buildUnnamed2171(); |
+ o.name = buildUnnamed2172(); |
} |
buildCounterStorePage--; |
return o; |
@@ -1778,8 +1799,8 @@ checkStorePage(api.StorePage o) { |
if (buildCounterStorePage < 3) { |
unittest.expect(o.id, unittest.equals('foo')); |
unittest.expect(o.kind, unittest.equals('foo')); |
- checkUnnamed2137(o.link); |
- checkUnnamed2138(o.name); |
+ checkUnnamed2171(o.link); |
+ checkUnnamed2172(o.name); |
} |
buildCounterStorePage--; |
} |
@@ -1859,14 +1880,14 @@ checkUserToken(api.UserToken o) { |
buildCounterUserToken--; |
} |
-buildUnnamed2139() { |
+buildUnnamed2173() { |
var o = new core.List<api.User>(); |
o.add(buildUser()); |
o.add(buildUser()); |
return o; |
} |
-checkUnnamed2139(core.List<api.User> o) { |
+checkUnnamed2173(core.List<api.User> o) { |
unittest.expect(o, unittest.hasLength(2)); |
checkUser(o[0]); |
checkUser(o[1]); |
@@ -1878,7 +1899,7 @@ buildUsersListResponse() { |
buildCounterUsersListResponse++; |
if (buildCounterUsersListResponse < 3) { |
o.kind = "foo"; |
- o.user = buildUnnamed2139(); |
+ o.user = buildUnnamed2173(); |
} |
buildCounterUsersListResponse--; |
return o; |
@@ -1888,7 +1909,7 @@ checkUsersListResponse(api.UsersListResponse o) { |
buildCounterUsersListResponse++; |
if (buildCounterUsersListResponse < 3) { |
unittest.expect(o.kind, unittest.equals('foo')); |
- checkUnnamed2139(o.user); |
+ checkUnnamed2173(o.user); |
} |
buildCounterUsersListResponse--; |
} |
@@ -1922,6 +1943,15 @@ main() { |
}); |
+ unittest.group("obj-schema-AndroidDevicePolicyConfig", () { |
+ unittest.test("to-json--from-json", () { |
+ var o = buildAndroidDevicePolicyConfig(); |
+ var od = new api.AndroidDevicePolicyConfig.fromJson(o.toJson()); |
+ checkAndroidDevicePolicyConfig(od); |
+ }); |
+ }); |
+ |
+ |
unittest.group("obj-schema-AppRestrictionsSchema", () { |
unittest.test("to-json--from-json", () { |
var o = buildAppRestrictionsSchema(); |
@@ -3053,6 +3083,59 @@ main() { |
}))); |
}); |
+ unittest.test("method--getAndroidDevicePolicyConfig", () { |
+ |
+ var mock = new HttpServerMock(); |
+ api.EnterprisesResourceApi res = new api.AndroidenterpriseApi(mock).enterprises; |
+ var arg_enterpriseId = "foo"; |
+ mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
+ var path = (req.url).path; |
+ var pathOffset = 0; |
+ var index; |
+ var subPart; |
+ unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
+ pathOffset += 1; |
+ unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.equals("androidenterprise/v1/")); |
+ pathOffset += 21; |
+ unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.equals("enterprises/")); |
+ pathOffset += 12; |
+ index = path.indexOf("/androidDevicePolicyConfig", pathOffset); |
+ unittest.expect(index >= 0, unittest.isTrue); |
+ subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
+ pathOffset = index; |
+ unittest.expect(subPart, unittest.equals("$arg_enterpriseId")); |
+ unittest.expect(path.substring(pathOffset, pathOffset + 26), unittest.equals("/androidDevicePolicyConfig")); |
+ pathOffset += 26; |
+ |
+ var query = (req.url).query; |
+ var queryOffset = 0; |
+ var queryMap = {}; |
+ addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
+ parseBool(n) { |
+ if (n == "true") return true; |
+ if (n == "false") return false; |
+ if (n == null) return null; |
+ throw new core.ArgumentError("Invalid boolean: $n"); |
+ } |
+ if (query.length > 0) { |
+ for (var part in query.split("&")) { |
+ var keyvalue = part.split("="); |
+ addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.decodeQueryComponent(keyvalue[1])); |
+ } |
+ } |
+ |
+ |
+ var h = { |
+ "content-type" : "application/json; charset=utf-8", |
+ }; |
+ var resp = convert.JSON.encode(buildAndroidDevicePolicyConfig()); |
+ return new async.Future.value(stringResponse(200, h, resp)); |
+ }), true); |
+ res.getAndroidDevicePolicyConfig(arg_enterpriseId).then(unittest.expectAsync1(((api.AndroidDevicePolicyConfig response) { |
+ checkAndroidDevicePolicyConfig(response); |
+ }))); |
+ }); |
+ |
unittest.test("method--getServiceAccount", () { |
var mock = new HttpServerMock(); |
@@ -3416,6 +3499,63 @@ main() { |
}))); |
}); |
+ unittest.test("method--setAndroidDevicePolicyConfig", () { |
+ |
+ var mock = new HttpServerMock(); |
+ api.EnterprisesResourceApi res = new api.AndroidenterpriseApi(mock).enterprises; |
+ var arg_request = buildAndroidDevicePolicyConfig(); |
+ var arg_enterpriseId = "foo"; |
+ mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
+ var obj = new api.AndroidDevicePolicyConfig.fromJson(json); |
+ checkAndroidDevicePolicyConfig(obj); |
+ |
+ var path = (req.url).path; |
+ var pathOffset = 0; |
+ var index; |
+ var subPart; |
+ unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
+ pathOffset += 1; |
+ unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.equals("androidenterprise/v1/")); |
+ pathOffset += 21; |
+ unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.equals("enterprises/")); |
+ pathOffset += 12; |
+ index = path.indexOf("/androidDevicePolicyConfig", pathOffset); |
+ unittest.expect(index >= 0, unittest.isTrue); |
+ subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
+ pathOffset = index; |
+ unittest.expect(subPart, unittest.equals("$arg_enterpriseId")); |
+ unittest.expect(path.substring(pathOffset, pathOffset + 26), unittest.equals("/androidDevicePolicyConfig")); |
+ pathOffset += 26; |
+ |
+ var query = (req.url).query; |
+ var queryOffset = 0; |
+ var queryMap = {}; |
+ addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
+ parseBool(n) { |
+ if (n == "true") return true; |
+ if (n == "false") return false; |
+ if (n == null) return null; |
+ throw new core.ArgumentError("Invalid boolean: $n"); |
+ } |
+ if (query.length > 0) { |
+ for (var part in query.split("&")) { |
+ var keyvalue = part.split("="); |
+ addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.decodeQueryComponent(keyvalue[1])); |
+ } |
+ } |
+ |
+ |
+ var h = { |
+ "content-type" : "application/json; charset=utf-8", |
+ }; |
+ var resp = convert.JSON.encode(buildAndroidDevicePolicyConfig()); |
+ return new async.Future.value(stringResponse(200, h, resp)); |
+ }), true); |
+ res.setAndroidDevicePolicyConfig(arg_request, arg_enterpriseId).then(unittest.expectAsync1(((api.AndroidDevicePolicyConfig response) { |
+ checkAndroidDevicePolicyConfig(response); |
+ }))); |
+ }); |
+ |
unittest.test("method--setStoreLayout", () { |
var mock = new HttpServerMock(); |