public class TestResources
extends org.junit.rules.TestWatcher
Rule
to extract and assert test resources.Constructor | Description |
---|---|
TestResources() |
|
TestResources(java.lang.String projectsDir,
java.lang.String workDir) |
Modifier and Type | Method | Description |
---|---|---|
static void |
assertDirectoryContents(java.io.File dir,
java.lang.String... expectedPaths) |
|
static void |
assertFileContents(java.io.File basedir,
java.lang.String expectedPath,
java.lang.String actualPath) |
|
static void |
cp(java.io.File basedir,
java.lang.String from,
java.lang.String to) |
|
static void |
create(java.io.File basedir,
java.lang.String... paths) |
|
java.io.File |
getBasedir(java.lang.String project) |
Creates new clean copy of test project directory structure.
|
static void |
rm(java.io.File basedir,
java.lang.String path) |
|
protected void |
starting(org.junit.runner.Description d) |
|
static void |
touch(java.io.File file) |
|
static void |
touch(java.io.File basedir,
java.lang.String path) |
public TestResources()
public TestResources(java.lang.String projectsDir, java.lang.String workDir)
protected void starting(org.junit.runner.Description d)
starting
in class org.junit.rules.TestWatcher
public java.io.File getBasedir(java.lang.String project) throws java.io.IOException
java.io.IOException
public static void cp(java.io.File basedir, java.lang.String from, java.lang.String to) throws java.io.IOException
java.io.IOException
public static void assertFileContents(java.io.File basedir, java.lang.String expectedPath, java.lang.String actualPath) throws java.io.IOException
java.io.IOException
public static void assertDirectoryContents(java.io.File dir, java.lang.String... expectedPaths)
public static void touch(java.io.File basedir, java.lang.String path) throws java.lang.InterruptedException
java.lang.InterruptedException
public static void touch(java.io.File file) throws java.lang.InterruptedException
java.lang.InterruptedException
public static void rm(java.io.File basedir, java.lang.String path)
public static void create(java.io.File basedir, java.lang.String... paths) throws java.io.IOException
java.io.IOException