本文整理汇总了Java中org.unitils.orm.jpa.JpaUnitils类的典型用法代码示例。如果您正苦于以下问题:Java JpaUnitils类的具体用法?Java JpaUnitils怎么用?Java JpaUnitils使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
JpaUnitils类属于org.unitils.orm.jpa包,在下文中一共展示了JpaUnitils类的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: testToplinkJpa_Commit
import org.unitils.orm.jpa.JpaUnitils; //导入依赖的package包/类
@Test
public void testToplinkJpa_Commit() throws Exception {
setPersistenceProvider("toplink");
setTransactionMode(TransactionMode.COMMIT);
Unitils.initSingletonInstance();
runTestFindById(ToplinkJpaTest.class);
assertPersonRecordAvailable();
runTestPersist(ToplinkJpaTest.class);
assertPersonRecordAvailable();
// TODO is this needed?
JpaUnitils.getEntityManagerFactory().close();
}
示例2: testToplinkJpa_Rollback
import org.unitils.orm.jpa.JpaUnitils; //导入依赖的package包/类
@Test
public void testToplinkJpa_Rollback() throws Exception {
setPersistenceProvider("toplink");
setTransactionMode(TransactionMode.ROLLBACK);
Unitils.initSingletonInstance();
runTestFindById(ToplinkJpaTest.class);
assertPersonTableEmpty();
runTestPersist(ToplinkJpaTest.class);
assertPersonTableEmpty();
JpaUnitils.getEntityManagerFactory().close();
}
示例3: preTest
import org.unitils.orm.jpa.JpaUnitils; //导入依赖的package包/类
@Before
public void preTest() {
setService(new ReportingServiceImpl());
setDao(new ReportingDaoImpl());
getService().setReportingDao(getDao());
JpaUnitils.injectEntityManagerInto(getDao());
}
示例4: preTest
import org.unitils.orm.jpa.JpaUnitils; //导入依赖的package包/类
@Before
public void preTest() {
setService(new FileServiceImpl());
setDao(new FileDaoImpl());
getService().setFileDao(getDao());
JpaUnitils.injectEntityManagerInto(getDao());
}
示例5: preTest
import org.unitils.orm.jpa.JpaUnitils; //导入依赖的package包/类
@Before
public void preTest() {
setService(new NotificationServiceImpl());
setDao(new NotificationDaoImpl());
getService().setNotificationDao(getDao());
JpaUnitils.injectEntityManagerInto(getDao());
}
示例6: testMapping
import org.unitils.orm.jpa.JpaUnitils; //导入依赖的package包/类
@Test
public void testMapping() {
JpaUnitils.assertMappingWithDatabaseConsistent();
}
示例7: preTest
import org.unitils.orm.jpa.JpaUnitils; //导入依赖的package包/类
@Before
public void preTest() {
setDao(new ReportingDaoImpl());
JpaUnitils.injectEntityManagerInto(getDao());
}
示例8: preTest
import org.unitils.orm.jpa.JpaUnitils; //导入依赖的package包/类
@Before
public void preTest() {
setDao(new AdminDaoImpl());
JpaUnitils.injectEntityManagerInto(getDao());
}
示例9: preTest
import org.unitils.orm.jpa.JpaUnitils; //导入依赖的package包/类
@Before
public void preTest() {
setDao(new FileDaoImpl());
JpaUnitils.injectEntityManagerInto(getDao());
}
示例10: preTest
import org.unitils.orm.jpa.JpaUnitils; //导入依赖的package包/类
@Before
public void preTest() {
setDao(new NotificationDaoImpl());
JpaUnitils.injectEntityManagerInto(getDao());
}
示例11: preTest
import org.unitils.orm.jpa.JpaUnitils; //导入依赖的package包/类
@Before
public void preTest() {
setDao(new XslDaoImpl());
JpaUnitils.injectEntityManagerInto(getDao());
}