Fix TypeOfWorkHoursServiceTest due to new configuration field

FEA: ItEr76S28UserDashboard
This commit is contained in:
Manuel Rego Casasnovas 2012-05-28 17:46:03 +02:00
parent 5e5cdeb7ec
commit ae86693d8f

View file

@ -34,12 +34,16 @@ import java.util.ArrayList;
import java.util.List;
import org.hibernate.SessionFactory;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.libreplan.business.common.IAdHocTransactionService;
import org.libreplan.business.common.IOnTransaction;
import org.libreplan.business.common.entities.IConfigurationBootstrap;
import org.libreplan.business.common.entities.IMonthlyTimesheetsTypeOfWorkHoursBootstrap;
import org.libreplan.business.common.exceptions.InstanceNotFoundException;
import org.libreplan.business.costcategories.daos.ITypeOfWorkHoursDAO;
import org.libreplan.business.costcategories.entities.ITypeOfWorkHoursBootstrap;
import org.libreplan.business.costcategories.entities.TypeOfWorkHours;
import org.libreplan.ws.common.api.InstanceConstraintViolationsDTO;
import org.libreplan.ws.typeofworkhours.api.ITypeOfWorkHoursService;
@ -75,6 +79,22 @@ public class TypeOfWorkHoursServiceTest {
@Autowired
private IAdHocTransactionService transactionService;
@Autowired
private IConfigurationBootstrap configurationBootstrap;
@Autowired
private ITypeOfWorkHoursBootstrap typeOfWorkHoursBootstrap;
@Autowired
private IMonthlyTimesheetsTypeOfWorkHoursBootstrap monthlyTimesheetsTypeOfWorkHoursBootstrap;
@Before
public void loadRequiredData() {
configurationBootstrap.loadRequiredData();
typeOfWorkHoursBootstrap.loadRequiredData();
monthlyTimesheetsTypeOfWorkHoursBootstrap.loadRequiredData();
}
@Test
public void testAddAndGetTypeOfWorkHours() {