public class TestResources
extends org.junit.rules.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 |
assertFileContents(String expectedContents,
File basedir,
String path) |
static void |
assertFilesNotPresent(File basedir,
String... paths) |
static void |
assertFilesPresent(File basedir,
String... paths) |
static void |
cp(File basedir,
String from,
String to) |
static void |
create(File basedir,
String... paths) |
File |
getBasedir()
Creates new clean test work directory.
|
File |
getBasedir(String project)
Creates new clean copy of test project directory structure.
|
static Map<String,String> |
readProperties(File basedir,
String path) |
static void |
rm(File basedir,
String path) |
protected void |
starting(org.junit.runner.Description d) |
static void |
touch(File file) |
static void |
touch(File basedir,
String path) |
protected void starting(org.junit.runner.Description d)
starting in class org.junit.rules.TestWatcherpublic File getBasedir(String project) throws IOException
IOExceptionpublic File getBasedir() 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 assertFileContents(String expectedContents, File basedir, String path) 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
IOExceptionpublic static Map<String,String> readProperties(File basedir, String path) throws IOException
IOExceptionCopyright © 2024. All rights reserved.