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 TestWatcher
public File getBasedir(String project) throws IOException
IOException
public static void cp(File basedir, String from, String to) throws IOException
IOException
public static void assertFileContents(File basedir, String expectedPath, String actualPath) throws IOException
IOException
public static void assertDirectoryContents(File dir, String... expectedPaths)
public static void touch(File basedir, String path) throws InterruptedException
InterruptedException
public static void touch(File file) throws InterruptedException
InterruptedException
public static void create(File basedir, String... paths) throws IOException
IOException
Copyright © 2008–2014 The Apache Software Foundation. All rights reserved.