org.silverpeas.persistence.dao
Class DAOBasedTest

java.lang.Object
  extended by org.silverpeas.DataSetTest
      extended by org.silverpeas.persistence.dao.DAOBasedTest

public abstract class DAOBasedTest
extends DataSetTest

Abstract class for tests that are based on the behavior of a JPA repository. These tests are not about the repository itself but on the persistence characteristics of a business object using a JPA repository.


Nested Class Summary
protected static interface DAOBasedTest.DAOTest
          Interface that must be implemented to perform a DAO test.
 
Nested classes/interfaces inherited from class org.silverpeas.DataSetTest
DataSetTest.TableRow
 
Constructor Summary
DAOBasedTest()
           
 
Method Summary
protected  String getDataSourceInjectionBeanId()
          Gets the identifier which permits to retrieve the instance of the data source in the injection context.
protected  void performDAOTest(DAOBasedTest.DAOTest daoTest)
          Calling this method to perform a DAO test without handling the connection opening and closing.
 
Methods inherited from class org.silverpeas.DataSetTest
getActualDataSet, getApplicationContext, getApplicationContextPath, getConnection, getDataSet, getDataSetPath, getDataSource, getTableIndexFor, getTableIndexForId, getTableRowFor, getTableRowsFor, setUp, tearDown
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DAOBasedTest

public DAOBasedTest()
Method Detail

getDataSourceInjectionBeanId

protected String getDataSourceInjectionBeanId()
Description copied from class: DataSetTest
Gets the identifier which permits to retrieve the instance of the data source in the injection context.

Specified by:
getDataSourceInjectionBeanId in class DataSetTest
Returns:

performDAOTest

protected void performDAOTest(DAOBasedTest.DAOTest daoTest)
                       throws Exception
Calling this method to perform a DAO test without handling the connection opening and closing.

Parameters:
daoTest -
Throws:
Exception


Copyright © 2016 Silverpeas. All Rights Reserved.