use of com.intellij.ide.util.AppPropertiesComponentImpl 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);
}
Aggregations