public class TestUtil extends Object
| Modifier and Type | Field | Description |
|---|---|---|
static String |
BASE_URL_FOR_HTTP_TESTS |
Base url where all test files for http tests are found
|
static int |
RANDOM_SEED |
| Constructor | Description |
|---|---|
TestUtil() |
| Modifier and Type | Method | 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 int RANDOM_SEED
public static final String BASE_URL_FOR_HTTP_TESTS
@Deprecated public static File getTempDirecory(String prefix, String suffix)
getTempDirectory(java.lang.String, java.lang.String)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 deserializeIOExceptionClassNotFoundException