Interface DataFileLoader

All Known Implementing Classes:
AbstractDataFileLoader, CsvDataFileLoader, FlatXmlDataFileLoader, FullXmlDataFileLoader, XlsDataFileLoader

public interface DataFileLoader
Defines a dbUnit data file loader supporting replacement objects and substrings with ReplacementDataSet.
Since:
2.4.8
Version:
$Revision$ $Date$
Author:
Jeff Jensen jeffjensen AT users.sourceforge.net, Last changed by: $Author$
  • Method Details

    • load

      IDataSet load(String fileName)
      Load the specified String filename from the classpath into a dbUnit dataset. If filename == null or "", then returns an empty DefaultDataSet. The type of dbUnit dataset created is delegated to the implementing subclass.
      Parameters:
      filename - The dbUnit file to load, in the format for the loader implementation and fully qualified name with package syntax.
      Returns:
      The dbUnit dataset of the specified file.
      Throws:
      DatabaseUnitRuntimeException - DataSetException wrapped in a DatabaseUnitRuntimeException when file load errors occur.
    • loadDataSet

      IDataSet loadDataSet(URL url) throws DataSetException, IOException
      Load the specified URL file into a dbUnit dataset. The type of dbUnit dataset created is delegated to the implementing subclass.
      Parameters:
      url - The dbUnit data file url.
      Returns:
      dbUnit dataset of the corresponding input file type.
      Throws:
      DataSetException - On data errors.
      IOException - On file errors.
      Since:
      2.4.8
    • addReplacementObjects

      void addReplacementObjects(Map replacementObjects)
      Add the specified replacement objects to existing ones for use with ReplacementDataSet.
      Parameters:
      replacementObjects - The replacement objects to include.
      Since:
      2.4.8
    • addReplacementSubstrings

      void addReplacementSubstrings(Map replacementSubstrings)
      Add the specified replacement substrings to existing ones for use with ReplacementDataSet.
      Parameters:
      replacementSubstrings - The replacement substrings to include.
      Since:
      2.4.8
    • removeAllReplacementObjects

      void removeAllReplacementObjects()
      Remove all existing replacement objects, resetting to none so no object replacements occur.
      Since:
      2.4.8
    • removeAllReplacementSubstrings

      void removeAllReplacementSubstrings()
      Remove all existing replacement substring objects, resetting to none so no substring replacements occur.
      Since:
      2.4.8