Class H2TestCase

  • All Implemented Interfaces:
    junit.framework.Test
    Direct Known Subclasses:
    BaseH2TestCase

    @Deprecated
    public abstract class H2TestCase
    extends CayenneTestCase
    Deprecated.
    Provides an in-memory H2 Test Case.
    Since:
    4.3.4
    • Constructor Summary

      Constructors 
      Constructor Description
      H2TestCase()
      Deprecated.
       
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      protected abstract String[] getDataSourceJndiNames()
      Deprecated.
       
      protected abstract String getDataSourcePassword()
      Deprecated.
       
      protected abstract String getDataSourceUrl()
      Deprecated.
       
      protected abstract String getDataSourceUser()
      Deprecated.
       
      protected void initDatabaseSchema​(org.apache.cayenne.access.DataNode dataNode, org.apache.cayenne.map.DataMap dataMap)
      Deprecated.
      Create the demonstration database schema using the given Cayenne DataNode and DataMap.
      protected abstract void loadTestData()
      Deprecated.
       
      protected void setUp()
      Deprecated.
      This method is called before a test is executed, creating a DataContext and associating it to the current Thread.
      protected void setupDataSource()
      Deprecated.
      Set up the test case data source.
      protected void tearDown()
      Deprecated.
      This method is called after a test is executed, removing the DataContext from the Thread.
      • Methods inherited from class junit.framework.TestCase

        assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, countTestCases, createResult, fail, fail, failNotEquals, failNotSame, failSame, format, getName, run, run, runBare, runTest, setName, toString
    • Constructor Detail

      • H2TestCase

        public H2TestCase()
        Deprecated.
    • Method Detail

      • setUp

        protected void setUp()
                      throws Exception
        Deprecated.
        This method is called before a test is executed, creating a DataContext and associating it to the current Thread.
        Overrides:
        setUp in class CayenneTestCase
        Throws:
        Exception
        See Also:
        TestCase.setUp()
      • tearDown

        protected void tearDown()
                         throws Exception
        Deprecated.
        Description copied from class: CayenneTestCase
        This method is called after a test is executed, removing the DataContext from the Thread.
        Overrides:
        tearDown in class CayenneTestCase
        Throws:
        Exception
        See Also:
        TestCase.tearDown()
      • setupDataSource

        protected void setupDataSource()
                                throws Exception
        Deprecated.
        Set up the test case data source.
        Throws:
        Exception - if an error occurs
      • initDatabaseSchema

        protected void initDatabaseSchema​(org.apache.cayenne.access.DataNode dataNode,
                                          org.apache.cayenne.map.DataMap dataMap)
                                   throws Exception
        Deprecated.
        Create the demonstration database schema using the given Cayenne DataNode and DataMap.
        Parameters:
        dataNode - the Cayenne DataNode
        dataMap - the Cayenne DataMap
        Throws:
        Exception
      • loadTestData

        protected abstract void loadTestData()
                                      throws Exception
        Deprecated.
        Throws:
        Exception
      • getDataSourcePassword

        protected abstract String getDataSourcePassword()
                                                 throws Exception
        Deprecated.
        Throws:
        Exception
      • getDataSourceJndiNames

        protected abstract String[] getDataSourceJndiNames()
                                                    throws Exception
        Deprecated.
        Throws:
        Exception