use of com.intellij.execution.application.ApplicationConfigurable in project intellij-community by JetBrains.
the class ConfigurationsTest method testCreatingApplicationConfiguration.
public void testCreatingApplicationConfiguration() throws ConfigurationException {
if (PlatformTestUtil.COVERAGE_ENABLED_BUILD)
return;
ApplicationConfiguration configuration = new ApplicationConfiguration(null, myProject, ApplicationConfigurationType.getInstance());
ApplicationConfigurable editor = new ApplicationConfigurable(myProject);
try {
// To get all the watchers installed.
editor.getComponent();
Configurable configurable = new RunConfigurationConfigurableAdapter(editor, configuration);
configurable.reset();
CommonJavaParametersPanel javaParameters = editor.getCommonProgramParameters();
javaParameters.setProgramParameters("prg");
javaParameters.setVMParameters("vm");
javaParameters.setWorkingDirectory("dir");
assertTrue(configurable.isModified());
configurable.apply();
assertEquals("prg", configuration.getProgramParameters());
assertEquals("vm", configuration.getVMParameters());
assertEquals("dir", configuration.getWorkingDirectory());
} finally {
Disposer.dispose(editor);
}
}
Aggregations