use of com.google.idea.blaze.android.run.binary.BlazeAndroidBinaryRunConfigurationHandler in project intellij by bazelbuild.
the class TestRecorderBlazeCommandRunConfigurationTest method testLaunchActivityClass.
@Test
public void testLaunchActivityClass() {
BlazeCommandRunConfiguration blazeConfiguration = BlazeCommandRunConfigurationType.getInstance().getFactory().createTemplateConfiguration(getProject());
blazeConfiguration.setTarget(Label.create("//label:android_binary_rule"));
BlazeAndroidBinaryRunConfigurationState configurationState = ((BlazeAndroidBinaryRunConfigurationHandler) blazeConfiguration.getHandler()).getState();
configurationState.setMode(BlazeAndroidBinaryRunConfigurationState.LAUNCH_SPECIFIC_ACTIVITY);
configurationState.setActivityClass("MyAppMainActivity");
TestRecorderRunConfigurationProxy proxy = TestRecorderRunConfigurationProxy.getInstance(blazeConfiguration);
assertThat(proxy).isNotNull();
assertThat(proxy.getLaunchActivityClass()).isEqualTo("MyAppMainActivity");
}
Aggregations