Author: athimel Date: 2014-05-16 15:45:06 +0200 (Fri, 16 May 2014) New Revision: 3801 Url: http://forge.chorem.org/projects/lima/repository/revisions/3801 Log: Migrate test compilation Modified: trunk/lima-business/src/test/java/org/chorem/lima/business/FinancialPeriodServiceImplTest.java Modified: trunk/lima-business/src/test/java/org/chorem/lima/business/FinancialPeriodServiceImplTest.java =================================================================== --- trunk/lima-business/src/test/java/org/chorem/lima/business/FinancialPeriodServiceImplTest.java 2014-05-16 13:43:25 UTC (rev 3800) +++ trunk/lima-business/src/test/java/org/chorem/lima/business/FinancialPeriodServiceImplTest.java 2014-05-16 13:45:06 UTC (rev 3801) @@ -26,12 +26,11 @@ package org.chorem.lima.business; import org.chorem.lima.entity.ClosedPeriodicEntryBook; -import org.chorem.lima.entity.ClosedPeriodicEntryBookDAO; -import org.chorem.lima.entity.LimaCallaoDAOHelper; +import org.chorem.lima.entity.ClosedPeriodicEntryBookTopiaDao; +import org.chorem.lima.entity.LimaCallaoTopiaPersistenceContext; import org.junit.Assert; import org.junit.Before; import org.junit.Test; -import org.nuiton.topia.TopiaContext; /** * Tests pour la gestion des timespans @@ -61,8 +60,8 @@ public void blockClosedPeriodicEntryBookTest() throws Exception { // find one closed to close - TopiaContext context = getTestContext().beginTransaction(); - ClosedPeriodicEntryBookDAO dao = LimaCallaoDAOHelper.getClosedPeriodicEntryBookDAO(context); + LimaCallaoTopiaPersistenceContext context = getTestContext().newPersistenceContext(); + ClosedPeriodicEntryBookTopiaDao dao = context.getClosedPeriodicEntryBookDao(); ClosedPeriodicEntryBook closedPeriodic = dao.findAll().get(0); context.closeContext(); @@ -71,8 +70,8 @@ closedPeriodic = financialPeriodService.blockClosedPeriodicEntryBook(closedPeriodic); // check it's blocked - context = getTestContext().beginTransaction(); - dao = LimaCallaoDAOHelper.getClosedPeriodicEntryBookDAO(context); + context = getTestContext().newPersistenceContext(); + dao = context.getClosedPeriodicEntryBookDao(); closedPeriodic = dao.findAll().get(0); context.closeContext(); Assert.assertFalse(closedPeriodic.isLocked());