use of com.google.gct.testrecorder.run.TestRecorderRunConfigurationProxy 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