use of com.intellij.execution.impl.RunnerAndConfigurationSettingsImpl in project intellij-community by JetBrains.
the class ConfigurationsTest method testExternalizeJUnitConfiguration.
public void testExternalizeJUnitConfiguration() {
Module module = getModule1();
JUnitConfiguration oldRc = createConfiguration(findTestA(module));
oldRc.setWorkingDirectory(module.getModuleFilePath());
RunManagerImpl runManager = new RunManagerImpl(myProject, new AppPropertiesComponentImpl());
Element element = new Element("configuration");
new RunnerAndConfigurationSettingsImpl(runManager, oldRc, false).writeExternal(element);
RunnerAndConfigurationSettingsImpl settings = new RunnerAndConfigurationSettingsImpl(runManager);
settings.readExternal(element);
JUnitConfiguration newRc = (JUnitConfiguration) settings.getConfiguration();
checkTestObject(oldRc.getPersistentData().TEST_OBJECT, newRc);
assertThat(newRc.getModules()).containsOnly(module);
checkClassName(oldRc.getPersistentData().getMainClassName(), newRc);
}
use of com.intellij.execution.impl.RunnerAndConfigurationSettingsImpl in project intellij-community by JetBrains.
the class ConfigurationRefactoringsTest method createJUnitConfiguration.
@Override
protected JUnitConfiguration createJUnitConfiguration(@NotNull PsiElement psiElement, @NotNull Class<? extends AbstractJavaTestConfigurationProducer> producerClass, @NotNull MapDataContext dataContext) {
final JUnitConfiguration configuration = super.createJUnitConfiguration(psiElement, producerClass, dataContext);
RunManagerEx.getInstanceEx(myProject).setTemporaryConfiguration(new RunnerAndConfigurationSettingsImpl(null, configuration, false));
return configuration;
}
Aggregations