Search in sources :

Example 1 with TestMethods

use of com.intellij.execution.junit.TestMethods in project intellij-community by JetBrains.

the class RerunFailedTestsAction method getRunProfile.

@Override
protected MyRunProfile getRunProfile(@NotNull ExecutionEnvironment environment) {
    //noinspection ConstantConditions
    final JUnitConfiguration configuration = (JUnitConfiguration) myConsoleProperties.getConfiguration();
    final TestMethods testMethods = new TestMethods(configuration, environment, getFailedTests(configuration.getProject()));
    return new MyRunProfile(configuration) {

        @Override
        @NotNull
        public Module[] getModules() {
            return testMethods.getModulesToCompile();
        }

        @Override
        public RunProfileState getState(@NotNull Executor executor, @NotNull ExecutionEnvironment env) {
            testMethods.clear();
            return testMethods;
        }
    };
}
Also used : ExecutionEnvironment(com.intellij.execution.runners.ExecutionEnvironment) Executor(com.intellij.execution.Executor) JUnitConfiguration(com.intellij.execution.junit.JUnitConfiguration) TestMethods(com.intellij.execution.junit.TestMethods) Module(com.intellij.openapi.module.Module) NotNull(org.jetbrains.annotations.NotNull)

Aggregations

Executor (com.intellij.execution.Executor)1 JUnitConfiguration (com.intellij.execution.junit.JUnitConfiguration)1 TestMethods (com.intellij.execution.junit.TestMethods)1 ExecutionEnvironment (com.intellij.execution.runners.ExecutionEnvironment)1 Module (com.intellij.openapi.module.Module)1 NotNull (org.jetbrains.annotations.NotNull)1