public abstract class TemporaryDirectoryBasedRuleSupport<T extends TemporaryDirectoryBasedRuleSupport<T>> extends Object implements org.junit.rules.TestRule
| Constructor and Description |
|---|
TemporaryDirectoryBasedRuleSupport() |
| Modifier and Type | Method and Description |
|---|---|
org.junit.runners.model.Statement |
apply(org.junit.runners.model.Statement base,
org.junit.runner.Description description) |
protected Path |
baseDirectory() |
protected void |
deleteDirectory(Path what) |
protected void |
evaluate(org.junit.runners.model.Statement base,
org.junit.runner.Description description) |
protected abstract void |
evaluate(org.junit.runners.model.Statement base,
org.junit.runner.Description description,
Path baseDirectory) |
protected String |
folderNameFor(org.junit.runner.Description description) |
protected Path |
generateTemporaryFolderFor(org.junit.runner.Description description) |
protected void |
handleExceptionIfRequired(IOException e) |
boolean |
isFailOnProblemsWhileCleanup() |
protected String |
normalizeFolderName(String input) |
T |
setFailOnProblemsWhileCleanup(boolean failOnProblemsWhileCleanup) |
public boolean isFailOnProblemsWhileCleanup()
@Nonnull public T setFailOnProblemsWhileCleanup(boolean failOnProblemsWhileCleanup)
public org.junit.runners.model.Statement apply(@Nonnull org.junit.runners.model.Statement base, @Nonnull org.junit.runner.Description description)
apply in interface org.junit.rules.TestRuleprotected void evaluate(@Nonnull org.junit.runners.model.Statement base, @Nonnull org.junit.runner.Description description) throws Throwable
Throwableprotected abstract void evaluate(@Nonnull org.junit.runners.model.Statement base, @Nonnull org.junit.runner.Description description, @Nonnull Path baseDirectory) throws Throwable
Throwable@Nonnull protected Path generateTemporaryFolderFor(@Nonnull org.junit.runner.Description description) throws Exception
Exception@Nonnull protected String folderNameFor(@Nonnull org.junit.runner.Description description)
protected void deleteDirectory(@Nonnull Path what) throws Exception
Exceptionprotected void handleExceptionIfRequired(@Nonnull IOException e) throws IOException
IOExceptionCopyright © 2017 echocat. All rights reserved.