public class TestDirectoryManager
extends java.lang.Object
Constructor and Description |
---|
TestDirectoryManager(junit.framework.TestCase testCase) |
Modifier and Type | Method and Description |
---|---|
java.io.File |
makeDirectory(java.lang.String name)
Creates a temporary directory for use by a test.
|
java.io.File |
writeFile(java.lang.String relativePath,
java.lang.String contents)
Overwrites a text file with the UTF-8 encoding of a String.
|
public TestDirectoryManager(junit.framework.TestCase testCase) throws java.io.IOException
java.io.IOException
public final java.io.File makeDirectory(java.lang.String name) throws java.io.IOException
java.io.IOException
public final java.io.File writeFile(java.lang.String relativePath, java.lang.String contents) throws java.io.IOException
relativePath
- path to the file to overwrite, relative to the
temporary directory for this test case. Paths containing '.' or
'..' may have surprising results and should be avoided.java.io.IOException