use of com.android.tools.build.bundletool.model.manifestelements.Activity in project bundletool by google.
the class ManifestEditorTest method addActivity.
@Test
public void addActivity() throws Exception {
Activity activity = Activity.builder().setName("activityName").build();
XmlNode activityXmlNode = XmlNode.newBuilder().setElement(activity.asXmlProtoElement().getProto()).build();
AndroidManifest androidManifest = AndroidManifest.create(androidManifest("com.test.app"));
AndroidManifest editedManifest = androidManifest.toEditor().addActivity(activity).save();
assertThat(getApplicationElement(editedManifest).getChildList()).containsExactly(activityXmlNode);
}
Aggregations