use of com.android.tools.build.bundletool.testing.BundleModuleBuilder in project bundletool by google.
the class AndroidManifestValidatorTest method nonBase_withFusingConfigFalse_ok.
@Test
public void nonBase_withFusingConfigFalse_ok() throws Exception {
BundleModule module = new BundleModuleBuilder(FEATURE_MODULE_NAME).setManifest(androidManifest(PKG_NAME, withOnDemandAttribute(true), withFusingAttribute(false))).build();
new AndroidManifestValidator().validateModule(module);
}
use of com.android.tools.build.bundletool.testing.BundleModuleBuilder in project bundletool by google.
the class AndroidManifestValidatorTest method instantFeature_noMaxSdk.
@Test
public void instantFeature_noMaxSdk() throws Exception {
BundleModule module = new BundleModuleBuilder(FEATURE_MODULE_NAME).setManifest(androidManifest(PKG_NAME, withInstant(true), withOnDemandAttribute(false), withFusingAttribute(false))).build();
new AndroidManifestValidator().validateModule(module);
}
use of com.android.tools.build.bundletool.testing.BundleModuleBuilder in project bundletool by google.
the class AndroidManifestValidatorTest method nonBase_withoutFusingConfigAndIsInstant_ok.
@Test
public void nonBase_withoutFusingConfigAndIsInstant_ok() throws Exception {
BundleModule module = new BundleModuleBuilder(FEATURE_MODULE_NAME).setManifest(androidManifest(PKG_NAME, withInstant(true), withOnDemandAttribute(false))).build();
new AndroidManifestValidator().validateModule(module);
}
use of com.android.tools.build.bundletool.testing.BundleModuleBuilder in project bundletool by google.
the class AndroidManifestValidatorTest method installTimeDeliveryAndInstantAttributeSetToTrue_ok.
@Test
public void installTimeDeliveryAndInstantAttributeSetToTrue_ok() throws Exception {
BundleModule module = new BundleModuleBuilder(FEATURE_MODULE_NAME).setManifest(androidManifest(PKG_NAME, withInstallTimeDelivery(), withInstant(true), withFusingAttribute(true))).build();
new AndroidManifestValidator().validateModule(module);
}
use of com.android.tools.build.bundletool.testing.BundleModuleBuilder in project bundletool by google.
the class AndroidManifestValidatorTest method instantAssetModuleWithInstallTimeInstantDelivery_throws.
@Test
public void instantAssetModuleWithInstallTimeInstantDelivery_throws() throws Exception {
BundleModule module = new BundleModuleBuilder("assetmodule").setManifest(androidManifestForAssetModule(PKG_NAME, withOnDemandDelivery(), withInstantInstallTimeDelivery())).build();
InvalidBundleException exception = assertThrows(InvalidBundleException.class, () -> new AndroidManifestValidator().validateModule(module));
assertThat(exception).hasMessageThat().startsWith("Instant delivery cannot be install-time (module 'assetmodule').");
}
Aggregations