public class TestUtil extends Object
Constructor and Description |
---|
TestUtil() |
Modifier and Type | Method and Description |
---|---|
static File |
getTempDirecory(String prefix,
String suffix)
Deprecated.
Use properly spelled method.
|
static File |
getTempDirectory(String prefix,
String suffix) |
static void |
recursiveDelete(File directory)
Little test utility to help tests that create multiple levels of subdirectories
clean up after themselves.
|
static <T extends Serializable> |
serializeAndDeserialize(T input)
Serialize and Deserialize an object
Useful for testing if serialization is correctly handled for a class.
|
public static File getTempDirecory(String prefix, String suffix)
public static void recursiveDelete(File directory)
directory
- The directory to be deleted (along with its subdirectories)public static <T extends Serializable> T serializeAndDeserialize(T input) throws IOException, ClassNotFoundException
T
- any Serializable typeinput
- an object to serialize and then deserializeIOException
ClassNotFoundException