@BeforeClass
public static void connect() throws DatabaseException {
factory = Persistence.createEntityManagerFactory(persistencUnitName);
assertNotNull(factory);
em = factory.createEntityManager();
assertNotNull(em);
tx = em.getTransaction();
assertNotNull(tx);
edao.setEntityManager(em);
tx.begin();
for (int i = 1; i <= 7; i++) {
if (edao.findById(i) == null)
edao.createEnumeration(i);
}
tx.commit();
}
AbstractDAOTest.java 文件源码
java
阅读 27
收藏 0
点赞 0
评论 0
项目:chr-krenn-fhj-ws2017-sd17-pse
作者:
评论列表
文章目录