Package htsjdk.samtools.util
Class TestUtil
- java.lang.Object
-
- htsjdk.samtools.util.TestUtil
-
public class TestUtil extends Object
-
-
Field Summary
Fields Modifier and Type Field Description static StringBASE_URL_FOR_HTTP_TESTSBase url where all test files for http tests are foundstatic intRANDOM_SEED
-
Constructor Summary
Constructors Constructor Description TestUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static FilegetTempDirecory(String prefix, String suffix)Deprecated.Use properly spelled method.static FilegetTempDirectory(String prefix, String suffix)static voidrecursiveDelete(File directory)Little test utility to help tests that create multiple levels of subdirectories clean up after themselves.static <T extends Serializable>
TserializeAndDeserialize(T input)Serialize and Deserialize an object Useful for testing if serialization is correctly handled for a class.
-
-
-
Field Detail
-
RANDOM_SEED
public static int RANDOM_SEED
-
BASE_URL_FOR_HTTP_TESTS
public static final String BASE_URL_FOR_HTTP_TESTS
Base url where all test files for http tests are found- See Also:
- Constant Field Values
-
-
Method Detail
-
getTempDirecory
@Deprecated public static File getTempDirecory(String prefix, String suffix)
Deprecated.Use properly spelled method.getTempDirectory(java.lang.String, java.lang.String)
-
recursiveDelete
public static void recursiveDelete(File directory)
Little test utility to help tests that create multiple levels of subdirectories clean up after themselves.- Parameters:
directory- The directory to be deleted (along with its subdirectories)
-
serializeAndDeserialize
public static <T extends Serializable> T serializeAndDeserialize(T input) throws IOException, ClassNotFoundException
Serialize and Deserialize an object Useful for testing if serialization is correctly handled for a class.- Type Parameters:
T- any Serializable type- Parameters:
input- an object to serialize and then deserialize- Returns:
- a copy of the initial object
- Throws:
IOExceptionClassNotFoundException
-
-