public class ReplacementDataSetLoader extends Object implements DataSetLoader
data set loader
that uses a ReplacementDataSet
to replace specific objects or
sub-strings. By default will replace "[null]" with null
.Modifier and Type | Field and Description |
---|---|
static Map<String,Object> |
DEFAULT_OBJECT_REPLACEMENTS |
Constructor and Description |
---|
ReplacementDataSetLoader()
Create a new
ReplacementDataSetLoader using a FlatXmlDataSetLoader to load the source data and
with DEFAULT_OBJECT_REPLACEMENTS . |
ReplacementDataSetLoader(DataSetLoader dataSetLoader)
Create a new
ReplacementDataSetLoader with DEFAULT_OBJECT_REPLACEMENTS . |
ReplacementDataSetLoader(DataSetLoader dataSetLoader,
Map<?,?> objectReplacements)
Create a new
ReplacementDataSetLoader . |
ReplacementDataSetLoader(DataSetLoader dataSetLoader,
Map<?,?> objectReplacements,
Map<String,String> subStringReplacements)
Create a new
ReplacementDataSetLoader . |
Modifier and Type | Method and Description |
---|---|
org.dbunit.dataset.IDataSet |
loadDataSet(Class<?> testClass,
String location)
Load and return
dataset from the specified. |
public ReplacementDataSetLoader()
ReplacementDataSetLoader
using a FlatXmlDataSetLoader
to load the source data and
with DEFAULT_OBJECT_REPLACEMENTS
.public ReplacementDataSetLoader(DataSetLoader dataSetLoader)
ReplacementDataSetLoader
with DEFAULT_OBJECT_REPLACEMENTS
.dataSetLoader
- the source data set loaderpublic ReplacementDataSetLoader(DataSetLoader dataSetLoader, Map<?,?> objectReplacements)
ReplacementDataSetLoader
.dataSetLoader
- the source data set loaderobjectReplacements
- the object replacements or null
if no object replacements are requiredpublic ReplacementDataSetLoader(DataSetLoader dataSetLoader, Map<?,?> objectReplacements, Map<String,String> subStringReplacements)
ReplacementDataSetLoader
.dataSetLoader
- the source data set loaderobjectReplacements
- the object replacements or null
if no object replacements are requiredsubStringReplacements
- the sub-string replacements or null
if no sub-string replacements are
requiredpublic org.dbunit.dataset.IDataSet loadDataSet(Class<?> testClass, String location) throws Exception
DataSetLoader
dataset
from the specified. If the dataset cannot be found null may be
returned.loadDataSet
in interface DataSetLoader
testClass
- The class under testlocation
- The location to loaddataset
or nullException
- If the dataset
cannot be loadedCopyright © 2016. All rights reserved.