use of com.android.tools.idea.testartifacts.junit.AndroidJUnitConfigurationConverter in project android by JetBrains.
the class AndroidJUnitConfigurationConverterTest method testConfigurationsAreNotConvertedInIdea.
public void testConfigurationsAreNotConvertedInIdea() {
mockIdeInfo = IdeComponents.replaceServiceWithMock(IdeInfo.class);
when(mockIdeInfo.isAndroidStudio()).thenReturn(false);
ConversionProcessor<RunManagerSettings> converter = new AndroidJUnitConfigurationConverter().createRunConfigurationsConverter();
RunManagerSettings runManagerSettings = getStubRunManagerSettings();
assertFalse(converter.isConversionNeeded(runManagerSettings));
}
use of com.android.tools.idea.testartifacts.junit.AndroidJUnitConfigurationConverter in project android by JetBrains.
the class AndroidJUnitConfigurationConverterTest method testConfigurationsAreConvertedInStudio.
public void testConfigurationsAreConvertedInStudio() throws Exception {
mockIdeInfo = IdeComponents.replaceServiceWithMock(IdeInfo.class);
when(mockIdeInfo.isAndroidStudio()).thenReturn(true);
ConversionProcessor<RunManagerSettings> converter = new AndroidJUnitConfigurationConverter().createRunConfigurationsConverter();
RunManagerSettings runManagerSettings = getStubRunManagerSettings();
Collection<? extends Element> runConfigurations = runManagerSettings.getRunConfigurations();
assertTrue(converter.isConversionNeeded(runManagerSettings));
assertSize(2, getJUnitConfigurations(runConfigurations));
assertEmpty(getAndroidJUnitConfigurations(runConfigurations));
converter.process(runManagerSettings);
assertEmpty(getJUnitConfigurations(runConfigurations));
assertSize(2, getAndroidJUnitConfigurations(runConfigurations));
}
Aggregations