org.softsmithy.devlib.junit
Class AbstractJPATest<T extends DbInitializer>
java.lang.Object
org.softsmithy.devlib.junit.AbstractJPATest<T>
public abstract class AbstractJPATest<T extends DbInitializer>
- extends Object
- Author:
- puce
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AbstractJPATest
public AbstractJPATest()
setUpClass
public static void setUpClass()
throws Exception
- Throws:
Exception
tearDownClass
public static void tearDownClass()
throws Exception
- Throws:
Exception
setUp
public void setUp()
throws Exception
- Throws:
Exception
setUpBeforeInitDb
protected void setUpBeforeInitDb()
tearDown
public void tearDown()
throws Exception
- Throws:
Exception
tearDownAfterClearDb
protected void tearDownAfterClearDb()
getPersistenceUnitName
protected abstract String getPersistenceUnitName()
createNewDbInitializer
protected abstract T createNewDbInitializer()
initDb
protected void initDb()
clearDb
protected void clearDb()
throws Exception
- Throws:
Exception
getDbInitializer
public T getDbInitializer()
- Returns:
- the dbInitializer
getEntityManager
protected EntityManager getEntityManager()
getEntityManagerFactory
protected EntityManagerFactory getEntityManagerFactory()
newTransaction
protected void newTransaction()
Copyright © 2010-2011 SoftSmithy. All Rights Reserved.