public class TestResources extends TestWatcher
Rule to extract and assert test resources.| Constructor and Description |
|---|
TestResources() |
TestResources(String projectsDir,
String workDir) |
| Modifier and Type | Method and Description |
|---|---|
static void |
assertDirectoryContents(File dir,
String... expectedPaths) |
static void |
assertFileContents(File basedir,
String expectedPath,
String actualPath) |
static void |
cp(File basedir,
String from,
String to) |
static void |
create(File basedir,
String... paths) |
File |
getBasedir(String project)
Creates new clean copy of test project directory structure.
|
static void |
rm(File basedir,
String path) |
protected void |
starting(Description d) |
static void |
touch(File file) |
static void |
touch(File basedir,
String path) |
protected void starting(Description d)
starting in class TestWatcherpublic File getBasedir(String project) throws IOException
IOExceptionpublic static void cp(File basedir, String from, String to) throws IOException
IOExceptionpublic static void assertFileContents(File basedir, String expectedPath, String actualPath) throws IOException
IOExceptionpublic static void assertDirectoryContents(File dir, String... expectedPaths)
public static void touch(File basedir, String path) throws InterruptedException
InterruptedExceptionpublic static void touch(File file) throws InterruptedException
InterruptedExceptionpublic static void create(File basedir, String... paths) throws IOException
IOExceptionCopyright © 2008–2014 The Apache Software Foundation. All rights reserved.