org.javaseis.tests
Class TestUtil

java.lang.Object
  extended by org.javaseis.tests.TestUtil

public class TestUtil
extends java.lang.Object

Utility functions for facilitating unit tests.

Author:
Steve Angelovich

Field Summary
static java.lang.String CONTAINER
           
static java.lang.String DATASETS_FOLDER
           
static java.lang.String SCRATCH_FOLDER
           
static java.lang.String SECONDARY_FOLDER
           
static java.lang.String[] VIRTUAL_FOLDERS
           
 
Constructor Summary
TestUtil()
           
 
Method Summary
static java.lang.String getDatasetContainer()
          Get a folder for storing javaseis datasets
static java.lang.String getDatasetPath(java.lang.String name)
          Using the name specified return a fully qualified path to a dataset.
static java.lang.String getScratchFolder()
          Get the scratch folder.
static java.lang.String getScratchPath(java.lang.String path)
          Using the name specified return the path and ensure the folder exists
static java.lang.String getVirtualContainer()
          Get the folder where unit tests results are stored, including log files, scratch files, datasets and virtual datasets
static java.lang.String[] getVirtualFolders()
          Returns an array of secondary folder locations.
static java.lang.String[] getVirtualFolders(java.lang.String dsName)
          Returns an array of fully qualified paths to secondary storage locations that will be made unique by appending the dsName parameter to the end of the path.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CONTAINER

public static final java.lang.String CONTAINER
See Also:
Constant Field Values

DATASETS_FOLDER

public static final java.lang.String DATASETS_FOLDER
See Also:
Constant Field Values

SCRATCH_FOLDER

public static final java.lang.String SCRATCH_FOLDER
See Also:
Constant Field Values

SECONDARY_FOLDER

public static final java.lang.String SECONDARY_FOLDER
See Also:
Constant Field Values

VIRTUAL_FOLDERS

public static final java.lang.String[] VIRTUAL_FOLDERS
Constructor Detail

TestUtil

public TestUtil()
Method Detail

getDatasetContainer

public static java.lang.String getDatasetContainer()
                                            throws SeisException
Get a folder for storing javaseis datasets

Throws:
SeisException

getDatasetPath

public static java.lang.String getDatasetPath(java.lang.String name)
                                       throws SeisException
Using the name specified return a fully qualified path to a dataset. This will ensure that the path up to the dataset exists.

Throws:
SeisException

getScratchFolder

public static java.lang.String getScratchFolder()
                                         throws SeisException
Get the scratch folder. The folder will be created if necessary.

Throws:
SeisException

getScratchPath

public static java.lang.String getScratchPath(java.lang.String path)
                                       throws SeisException
Using the name specified return the path and ensure the folder exists

Throws:
SeisException

getVirtualContainer

public static java.lang.String getVirtualContainer()
                                            throws SeisException
Get the folder where unit tests results are stored, including log files, scratch files, datasets and virtual datasets

Throws:
SeisException

getVirtualFolders

public static java.lang.String[] getVirtualFolders()
                                            throws SeisException
Returns an array of secondary folder locations. The folders will be created if necessary.

Throws:
SeisException

getVirtualFolders

public static java.lang.String[] getVirtualFolders(java.lang.String dsName)
                                            throws SeisException
Returns an array of fully qualified paths to secondary storage locations that will be made unique by appending the dsName parameter to the end of the path. This behavior is very similar to how SeisSpace handles secondary storage folders.

Parameters:
dsName - - the name of a dataset
Throws:
SeisException