Fix problems in MaterialDAOTest and MaterialServiceTest
Tests were not passing in Debian Wheezy FEA: ItEr75S04BugFixing
This commit is contained in:
parent
97e2c721d7
commit
ed42756949
2 changed files with 13 additions and 6 deletions
|
|
@ -49,30 +49,32 @@ import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
|
|||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
|
||||
@RunWith(SpringJUnit4ClassRunner.class)
|
||||
@ContextConfiguration(locations = { BUSINESS_SPRING_CONFIG_FILE,
|
||||
BUSINESS_SPRING_CONFIG_TEST_FILE })
|
||||
|
||||
/**
|
||||
* Test for {@MaterialDAO}
|
||||
*
|
||||
* @author Jacobo Aragunde Perez <jaragunde@igalia.com>
|
||||
*
|
||||
*/
|
||||
@RunWith(SpringJUnit4ClassRunner.class)
|
||||
@ContextConfiguration(locations = { BUSINESS_SPRING_CONFIG_FILE,
|
||||
BUSINESS_SPRING_CONFIG_TEST_FILE })
|
||||
@Transactional
|
||||
public class MaterialDAOTest {
|
||||
|
||||
@Autowired
|
||||
IMaterialDAO materialDAO;
|
||||
private IMaterialDAO materialDAO;
|
||||
|
||||
@Autowired
|
||||
IMaterialCategoryDAO materialCategoryDAO;
|
||||
private IMaterialCategoryDAO materialCategoryDAO;
|
||||
|
||||
@Test
|
||||
public void testInSpringContainer() {
|
||||
assertNotNull(materialDAO);
|
||||
}
|
||||
|
||||
@Resource
|
||||
private IDataBootstrap configurationBootstrap;
|
||||
|
||||
@Resource
|
||||
private IDataBootstrap materialCategoryBootstrap;
|
||||
|
||||
|
|
@ -81,6 +83,7 @@ public class MaterialDAOTest {
|
|||
|
||||
@Before
|
||||
public void loadRequiredaData() {
|
||||
configurationBootstrap.loadRequiredData();
|
||||
materialCategoryBootstrap.loadRequiredData();
|
||||
unitTypeBootstrap.loadRequiredData();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -86,6 +86,9 @@ public class MaterialServiceTest {
|
|||
@Autowired
|
||||
private IUnitTypeDAO unitTypeDAO;
|
||||
|
||||
@Resource
|
||||
private IDataBootstrap configurationBootstrap;
|
||||
|
||||
@Resource
|
||||
private IDataBootstrap materialCategoryBootstrap;
|
||||
|
||||
|
|
@ -102,6 +105,7 @@ public class MaterialServiceTest {
|
|||
|
||||
@Override
|
||||
public Void execute() {
|
||||
configurationBootstrap.loadRequiredData();
|
||||
materialCategoryBootstrap.loadRequiredData();
|
||||
unitTypeBootstrap.loadRequiredData();
|
||||
return null;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue