Revision ec3ff238
Added by Andreas Müller almost 8 years ago
cdmlib-persistence/src/test/java/eu/etaxonomy/cdm/persistence/dao/hibernate/description/DescriptionDaoHibernateImplTest.java | ||
---|---|---|
29 | 29 |
import org.junit.Before; |
30 | 30 |
import org.junit.Test; |
31 | 31 |
import org.unitils.dbunit.annotation.DataSet; |
32 |
import org.unitils.dbunit.annotation.DataSets; |
|
32 | 33 |
import org.unitils.spring.annotation.SpringBeanByType; |
33 | 34 |
|
34 | 35 |
import eu.etaxonomy.cdm.model.common.DefinedTerm; |
... | ... | |
55 | 56 |
import eu.etaxonomy.cdm.persistence.query.OrderHint; |
56 | 57 |
import eu.etaxonomy.cdm.persistence.query.OrderHint.SortOrder; |
57 | 58 |
import eu.etaxonomy.cdm.test.integration.CdmTransactionalIntegrationTest; |
59 |
import eu.etaxonomy.cdm.test.unitils.CleanSweepInsertLoadStrategy; |
|
58 | 60 |
|
59 | 61 |
@DataSet |
60 | 62 |
public class DescriptionDaoHibernateImplTest extends CdmTransactionalIntegrationTest { |
... | ... | |
79 | 81 |
|
80 | 82 |
private UUID taxonSphingidaeUuid; |
81 | 83 |
|
84 |
@SuppressWarnings("unused") |
|
82 | 85 |
private static final String[] TABLE_NAMES = new String[] {"DESCRIPTIONBASE", "DESCRIPTIONELEMENTBASE", "DESCRIPTIONELEMENTBASE_LANGUAGESTRING", "HOMOTYPICALGROUP","LANGUAGESTRING" |
83 | 86 |
, "ORIGINALSOURCEBASE", "REFERENCE", "TAXONBASE", "TAXONNAMEBASE", "HIBERNATE_SEQUENCES" }; |
84 | 87 |
|
... | ... | |
617 | 620 |
} |
618 | 621 |
|
619 | 622 |
@Test |
620 |
@DataSet |
|
623 |
// @DataSet |
|
624 |
@DataSets({ |
|
625 |
@DataSet(loadStrategy=CleanSweepInsertLoadStrategy.class, value="/eu/etaxonomy/cdm/database/ClearDB_with_Terms_DataSet.xml"), |
|
626 |
@DataSet(value="/eu/etaxonomy/cdm/database/TermsDataSet-with_auditing_info.xml"), |
|
627 |
@DataSet(value="DescriptionDaoHibernateImplTest.xml") |
|
628 |
}) |
|
621 | 629 |
public void testListNamedAreasInUse(){ |
622 | 630 |
|
623 | 631 |
Collection<TermDto> list = null; |
624 | 632 |
|
625 |
DefinedTermBase antarctica = definedTermDao.load(antarcticaUuid); |
|
633 |
DefinedTermBase<?> antarctica = definedTermDao.load(antarcticaUuid);
|
|
626 | 634 |
antarctica.getRepresentations().add(Representation.NewInstance("Antarktis", "Antarktis", "An", Language.GERMAN())); |
627 | 635 |
definedTermDao.saveOrUpdate(antarctica); |
628 | 636 |
commitAndStartNewTransaction(null); |
... | ... | |
645 | 653 |
} |
646 | 654 |
|
647 | 655 |
|
648 |
/* (non-Javadoc) |
|
649 |
* @see eu.etaxonomy.cdm.test.integration.CdmIntegrationTest#createTestData() |
|
650 |
*/ |
|
651 | 656 |
@Override |
652 |
public void createTestDataSet() throws FileNotFoundException { |
|
653 |
// TODO Auto-generated method stub |
|
654 |
|
|
655 |
} |
|
657 |
public void createTestDataSet() throws FileNotFoundException {} |
|
656 | 658 |
|
657 | 659 |
|
658 | 660 |
} |
Also available in: Unified diff
Fix dataset issue in persistence test and clean up