Search in sources :

Example 1 with ApplicationConfigurable

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);
    }
}
Also used : JUnitConfigurable(com.intellij.execution.junit2.configuration.JUnitConfigurable) Configurable(com.intellij.openapi.options.Configurable) ApplicationConfigurable(com.intellij.execution.application.ApplicationConfigurable) ApplicationConfiguration(com.intellij.execution.application.ApplicationConfiguration) CommonJavaParametersPanel(com.intellij.execution.ui.CommonJavaParametersPanel) ApplicationConfigurable(com.intellij.execution.application.ApplicationConfigurable)

Aggregations

ApplicationConfigurable (com.intellij.execution.application.ApplicationConfigurable)1 ApplicationConfiguration (com.intellij.execution.application.ApplicationConfiguration)1 JUnitConfigurable (com.intellij.execution.junit2.configuration.JUnitConfigurable)1 CommonJavaParametersPanel (com.intellij.execution.ui.CommonJavaParametersPanel)1 Configurable (com.intellij.openapi.options.Configurable)1