Class AbstractTableTest

java.lang.Object
org.dbunit.dataset.AbstractTableTest
Direct Known Subclasses:
CachedResultSetTableIT, DefaultTableTest, ScrollableResultSetTableIT, SortedTableTest, XlsTableTest, XmlTableTest, YmlTableTest

public abstract class AbstractTableTest extends Object
Since:
Feb 17, 2002
Version:
$Revision$
Author:
Manuel Laflamme
  • Field Details

    • ROW_COUNT

      protected static final int ROW_COUNT
      See Also:
    • COLUMN_COUNT

      protected static final int COLUMN_COUNT
      See Also:
    • logger

      protected final org.slf4j.Logger logger
  • Constructor Details

    • AbstractTableTest

      public AbstractTableTest()
  • Method Details

    • createTable

      protected abstract ITable createTable() throws Exception
      Creates a table having 6 row and 4 column where columns are named "COLUMN1, COLUMN2, COLUMN3, COLUMN4" and values are string follwing this template "row ? col ?"
      Throws:
      Exception
    • convertString

      protected String convertString(String str) throws Exception
      Returns the string converted as an identifier according to the metadata rules of the database environment. Most databases convert all metadata identifiers to uppercase. PostgreSQL converts identifiers to lowercase. MySQL preserves case.
      Parameters:
      str - The identifier.
      Returns:
      The identifier converted according to database rules.
      Throws:
      Exception
    • testGetValue_withValidRowAndColumn_returnsExpectedValue

      @Test protected void testGetValue_withValidRowAndColumn_returnsExpectedValue() throws Exception
      Throws:
      Exception
    • testGetMissingValue_withMissingCells_returnsExpectedValues

      public abstract void testGetMissingValue_withMissingCells_returnsExpectedValues() throws Exception
      Throws:
      Exception
    • runTest

      protected boolean runTest(String testName)
      This method is used so sub-classes can disable the tests according to some characteristics of the environment
      Parameters:
      testName - name of the test to be checked
      Returns:
      flag indicating if the test should be executed or not