Class AbstractTableTest

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

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

    Fields
    Modifier and Type
    Field
    Description
    protected static final int
     
    protected final org.slf4j.Logger
     
    protected static final int
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected String
    Returns the string converted as an identifier according to the metadata rules of the database environment.
    protected abstract ITable
    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 ?
    protected boolean
    runTest(String testName)
    This method is used so sub-classes can disable the tests according to some characteristics of the environment
    abstract void
     
    protected void
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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

      @Test protected void testGetValue() throws Exception
      Throws:
      Exception
    • testGetMissingValue

      public abstract void testGetMissingValue() 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