public abstract class TestObject extends JavaTestFrameworkRunnableState<JUnitConfiguration> implements PossiblyDumbAware
Modifier and Type | Field and Description |
---|---|
protected static Logger |
LOG |
protected java.io.File |
myListenersFile |
myServerSocket, myTempFile, myWorkingDirsFile
Modifier | Constructor and Description |
---|---|
protected |
TestObject(JUnitConfiguration configuration,
ExecutionEnvironment environment) |
Modifier and Type | Method and Description |
---|---|
protected <T> void |
addClassesListToJavaParameters(java.util.Collection<? extends T> elements,
Function<? super T,java.lang.String> nameFunction,
java.lang.String packageName,
boolean createTempFile,
JavaParameters javaParameters) |
protected <T> void |
addClassesListToJavaParameters(java.util.Collection<? extends T> elements,
Function<? super T,java.lang.String> nameFunction,
java.lang.String packageName,
boolean createTempFile,
JavaParameters javaParameters,
java.lang.String filters) |
void |
appendJUnit5LauncherClasses(JavaParameters javaParameters,
Project project,
GlobalSearchScope globalSearchScope,
boolean ensureOnModulePath) |
void |
appendRepeatMode() |
void |
checkConfiguration() |
protected static java.util.List<java.lang.String> |
composeDirectoryFilter(Module module)
Junit 5 searches for tests in the classpath.
|
protected void |
configureRTClasspath(JavaParameters javaParameters,
Module module) |
protected JavaParameters |
createJavaParameters() |
JavaParameters |
createJavaParameters4Tests() |
protected void |
deleteTempFiles() |
protected void |
fillForkModule(java.util.Map<Module,java.util.List<java.lang.String>> perModule,
Module module,
java.lang.String name) |
static TestObject |
fromString(java.lang.String id,
JUnitConfiguration configuration,
ExecutionEnvironment environment) |
JUnitConfiguration |
getConfiguration() |
protected java.lang.String |
getForkMode() |
protected java.lang.String |
getFrameworkId() |
protected java.lang.String |
getFrameworkName() |
static java.io.File |
getJUnit5RtFile() |
abstract RefactoringElementListener |
getListener(PsiElement element,
JUnitConfiguration configuration) |
Module[] |
getModulesToCompile() |
protected java.lang.String |
getRunner() |
protected TestSearchScope |
getScope() |
static GlobalSearchScope |
getScopeForJUnit(JUnitConfiguration configuration) |
SourceScope |
getSourceScope() |
static boolean |
hasJUnit5EnginesAPI(GlobalSearchScope globalSearchScope,
JavaPsiFacade psiFacade) |
abstract boolean |
isConfiguredByElement(JUnitConfiguration configuration,
PsiClass testClass,
PsiMethod testMethod,
PsiPackage testPackage,
PsiDirectory testDir) |
boolean |
isDumbAware() |
protected boolean |
isIdBasedTestTree() |
protected void |
passForkMode(java.lang.String forkMode,
java.io.File tempFile,
JavaParameters parameters) |
protected void |
passTempFile(ParametersList parametersList,
java.lang.String tempFilePath) |
protected PsiElement |
retrievePsiElement(java.lang.Object element) |
abstract java.lang.String |
suggestActionName() |
protected boolean |
useModulePath() |
appendForkInfo, collectListeners, collectPackagesToOpen, collectSubPackages, configureByModule, configureClasspath, createHandler, createRemoteConnection, createSearchingForTestsTask, createServerSocket, createTargetedCommandLine, createTempFiles, execute, findJavaModule, forkPerModule, getForkSocket, getJdk, getJigsawOptions, getNamedParams, isPollConnection, putDependenciesOnModulePath, setRemoteConnectionCreator, spansMultipleModules, writeClassesPerModule
ansiColoringEnabled, clear, createCommandLine, getJavaParameters, shouldAddJavaProgramRunnerActions, startProcess
addConsoleFilters, createActions, createActions, createConsole, getConsoleBuilder, getEnvironment, getExecutionTarget, getRunnerSettings, setConsoleBuilder
protected static final Logger LOG
protected java.io.File myListenersFile
protected TestObject(JUnitConfiguration configuration, ExecutionEnvironment environment)
protected <T> void addClassesListToJavaParameters(java.util.Collection<? extends T> elements, Function<? super T,java.lang.String> nameFunction, java.lang.String packageName, boolean createTempFile, JavaParameters javaParameters) throws CantRunException
CantRunException
protected <T> void addClassesListToJavaParameters(java.util.Collection<? extends T> elements, Function<? super T,java.lang.String> nameFunction, java.lang.String packageName, boolean createTempFile, JavaParameters javaParameters, java.lang.String filters) throws CantRunException
CantRunException
protected void fillForkModule(java.util.Map<Module,java.util.List<java.lang.String>> perModule, Module module, java.lang.String name)
public Module[] getModulesToCompile()
public abstract java.lang.String suggestActionName()
public abstract RefactoringElementListener getListener(PsiElement element, JUnitConfiguration configuration)
public abstract boolean isConfiguredByElement(JUnitConfiguration configuration, PsiClass testClass, PsiMethod testMethod, PsiPackage testPackage, PsiDirectory testDir)
public void checkConfiguration() throws RuntimeConfigurationException
RuntimeConfigurationException
public SourceScope getSourceScope()
protected void configureRTClasspath(JavaParameters javaParameters, Module module) throws CantRunException
configureRTClasspath
in class JavaTestFrameworkRunnableState<JUnitConfiguration>
CantRunException
public static java.io.File getJUnit5RtFile()
protected static java.util.List<java.lang.String> composeDirectoryFilter(Module module)
protected JavaParameters createJavaParameters() throws ExecutionException
createJavaParameters
in class JavaTestFrameworkRunnableState<JUnitConfiguration>
ExecutionException
public JavaParameters createJavaParameters4Tests() throws ExecutionException
ExecutionException
public void appendJUnit5LauncherClasses(JavaParameters javaParameters, Project project, GlobalSearchScope globalSearchScope, boolean ensureOnModulePath) throws CantRunException
CantRunException
public static boolean hasJUnit5EnginesAPI(GlobalSearchScope globalSearchScope, JavaPsiFacade psiFacade)
public static GlobalSearchScope getScopeForJUnit(JUnitConfiguration configuration)
public void appendRepeatMode() throws ExecutionException
appendRepeatMode
in class JavaTestFrameworkRunnableState<JUnitConfiguration>
ExecutionException
protected boolean useModulePath()
useModulePath
in class JavaTestFrameworkRunnableState<JUnitConfiguration>
protected boolean isIdBasedTestTree()
isIdBasedTestTree
in class JavaTestFrameworkRunnableState<JUnitConfiguration>
protected java.lang.String getForkMode()
getForkMode
in class JavaTestFrameworkRunnableState<JUnitConfiguration>
public static TestObject fromString(java.lang.String id, JUnitConfiguration configuration, ExecutionEnvironment environment)
protected PsiElement retrievePsiElement(java.lang.Object element)
protected void deleteTempFiles()
deleteTempFiles
in class JavaTestFrameworkRunnableState<JUnitConfiguration>
protected java.lang.String getFrameworkName()
getFrameworkName
in class JavaTestFrameworkRunnableState<JUnitConfiguration>
protected java.lang.String getFrameworkId()
getFrameworkId
in class JavaTestFrameworkRunnableState<JUnitConfiguration>
protected void passTempFile(ParametersList parametersList, java.lang.String tempFilePath)
passTempFile
in class JavaTestFrameworkRunnableState<JUnitConfiguration>
public JUnitConfiguration getConfiguration()
getConfiguration
in class JavaTestFrameworkRunnableState<JUnitConfiguration>
protected TestSearchScope getScope()
getScope
in class JavaTestFrameworkRunnableState<JUnitConfiguration>
protected void passForkMode(java.lang.String forkMode, java.io.File tempFile, JavaParameters parameters)
passForkMode
in class JavaTestFrameworkRunnableState<JUnitConfiguration>
protected java.lang.String getRunner()
public boolean isDumbAware()
isDumbAware
in interface PossiblyDumbAware