Revision 4cc9e6d9
Added by Andreas Müller about 3 years ago
cdmlib-services/src/test/java/eu/etaxonomy/cdm/api/application/FirstDataInserterTest.java | ||
---|---|---|
11 | 11 |
import static org.junit.Assert.assertEquals; |
12 | 12 |
|
13 | 13 |
import java.io.FileNotFoundException; |
14 |
import java.util.List; |
|
14 | 15 |
import java.util.Set; |
15 | 16 |
import java.util.UUID; |
16 | 17 |
|
17 | 18 |
import org.apache.log4j.Logger; |
18 |
import org.junit.Ignore; |
|
19 | 19 |
import org.junit.Test; |
20 | 20 |
import org.unitils.dbunit.annotation.DataSet; |
21 | 21 |
import org.unitils.dbunit.annotation.ExpectedDataSet; |
... | ... | |
30 | 30 |
import eu.etaxonomy.cdm.datagenerator.TaxonGenerator; |
31 | 31 |
import eu.etaxonomy.cdm.model.description.TaxonDescription; |
32 | 32 |
import eu.etaxonomy.cdm.model.taxon.Taxon; |
33 |
import eu.etaxonomy.cdm.model.taxon.TaxonNode; |
|
33 | 34 |
import eu.etaxonomy.cdm.test.integration.CdmTransactionalIntegrationTest; |
34 | 35 |
|
35 | 36 |
/** |
... | ... | |
37 | 38 |
* |
38 | 39 |
* @author a.kohlbecker |
39 | 40 |
* @since Oct 12, 2012 |
40 |
* |
|
41 | 41 |
*/ |
42 | 42 |
@DataSet |
43 | 43 |
public class FirstDataInserterTest extends CdmTransactionalIntegrationTest { |
... | ... | |
73 | 73 |
|
74 | 74 |
@Test |
75 | 75 |
@DataSet(value="FirstDataInserterTest.testBlankDB.xml") |
76 |
@Ignore |
|
77 | 76 |
public void testInsertData(){ |
78 | 77 |
commitAndStartNewTransaction(null); |
79 | 78 |
|
80 | 79 |
Taxon newTaxon = TaxonGenerator.getTestTaxon(); |
81 | 80 |
UUID taxonUUID = taxonService.save(newTaxon).getUuid(); |
81 |
nameService.save(newTaxon.getName().getBasionyms()); |
|
82 |
List<TaxonNode> childNodes = newTaxon.getTaxonNodes().iterator().next().getChildNodes(); |
|
83 |
classificationService.saveTaxonNodeAll(childNodes); |
|
84 |
taxonService.saveOrUpdate(childNodes.stream().filter(tn->!tn.getTaxon().getAllMisappliedNames().isEmpty()).findFirst().get().getTaxon().getAllMisappliedNames().iterator().next()); |
|
82 | 85 |
|
83 | 86 |
TaxonDescription description = TaxonGenerator.getTestDescription(1); |
84 | 87 |
newTaxon.addDescription(description); |
Also available in: Unified diff
unignore firstDataInserted test