|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.unitils.dbunit.datasetfactory.impl.DefaultDataSetResolver
public class DefaultDataSetResolver
Resolves the location for a data set with a certain name.
By default, the data set name is prefixed with the package name (. replaced by /).PROPKEY_PREFIX_WITH_PACKAGE_NAME property.PROPKEY_DATA_SET_PATH_PREFIX property it is added to the file name.
| Field Summary | |
|---|---|
protected java.lang.String |
pathPrefix
An optional path prefix for the file name. |
protected boolean |
prefixWithPackageName
True if the file name should be prefixed with the package name of the test class. |
static java.lang.String |
PROPKEY_DATA_SET_PATH_PREFIX
Property key for the path prefix |
static java.lang.String |
PROPKEY_PREFIX_WITH_PACKAGE_NAME
Property key for the path prefix |
| Constructor Summary | |
|---|---|
DefaultDataSetResolver()
|
|
| Method Summary | |
|---|---|
protected java.lang.String |
getDataSetFileName(java.lang.Class<?> testClass,
java.lang.String dataSetName)
Get the file name for the data set. |
void |
init(java.util.Properties configuration)
Initializes the resolver with the given configuration. |
protected java.lang.String |
prefixPackageNameFilePath(java.lang.Class<?> testClass,
java.lang.String dataSetName)
Prefix the package name of the test to the name of the data set (replacing . with /). |
java.io.File |
resolve(java.lang.Class<?> testClass,
java.lang.String dataSetName)
Resolves the location for a data set with a certain name. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String PROPKEY_PREFIX_WITH_PACKAGE_NAME
public static final java.lang.String PROPKEY_DATA_SET_PATH_PREFIX
protected boolean prefixWithPackageName
protected java.lang.String pathPrefix
| Constructor Detail |
|---|
public DefaultDataSetResolver()
| Method Detail |
|---|
public void init(java.util.Properties configuration)
init in interface Configurableconfiguration - The configuration, not null
public java.io.File resolve(java.lang.Class<?> testClass,
java.lang.String dataSetName)
resolve in interface DataSetResolvertestClass - The test class, not nulldataSetName - The name of the data set, not null
protected java.lang.String getDataSetFileName(java.lang.Class<?> testClass,
java.lang.String dataSetName)
testClass - The test class, not nulldataSetName - The data set name, not null
protected java.lang.String prefixPackageNameFilePath(java.lang.Class<?> testClass,
java.lang.String dataSetName)
testClass - The test, not nulldataSetName - The data set name, not null
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||