Revision 22b93d67
Added by Andreas Müller about 3 years ago
cdmlib-io/src/test/java/eu/etaxonomy/cdm/io/specimen/abcd206/in/AbcdGgbnImportTest.java | ||
---|---|---|
166 | 166 |
*/ |
167 | 167 |
@Test |
168 | 168 |
@DataSet( value="/eu/etaxonomy/cdm/database/ClearDBDataSet.xml", loadStrategy=CleanSweepInsertLoadStrategy.class) |
169 |
@Ignore |
|
170 |
public void testImport59Units() { |
|
169 |
@Ignore //TODO this test takes very long therefore I keep it on ignore, also it fails as the |
|
170 |
//derived unit count returns 117 not 118 as assumed; this needs to be fixed and we have to check |
|
171 |
//why importing 59 units takes so long |
|
172 |
public void testImport59Units() { |
|
171 | 173 |
String inputFile = "/eu/etaxonomy/cdm/io/specimen/abcd206/in/Campanula_59taxa.xml"; |
172 | 174 |
URL url = this.getClass().getResource(inputFile); |
173 | 175 |
assertNotNull("URL for the test file '" + inputFile + "' does not exist", url); |
... | ... | |
186 | 188 |
// assertTrue("Return value for import.invoke should be true", result); |
187 | 189 |
assertEquals("Number of derived units is incorrect", 118, occurrenceService.count(DerivedUnit.class)); |
188 | 190 |
assertEquals("Number of dna samples is incorrect", 59, occurrenceService.count(DnaSample.class)); |
189 |
|
|
190 | 191 |
} |
191 | 192 |
|
192 | 193 |
/** |
... | ... | |
392 | 393 |
/** |
393 | 394 |
* Tests import of DNA unit which is associated to a specimen being its sibling |
394 | 395 |
* by having the same field unit |
395 |
* @throws ParseException |
|
396 | 396 |
*/ |
397 | 397 |
@Test |
398 | 398 |
@DataSet( value="/eu/etaxonomy/cdm/database/ClearDBDataSet.xml", loadStrategy=CleanSweepInsertLoadStrategy.class) |
... | ... | |
422 | 422 |
config.setSignificantIdentifier("B 10 0066577"); |
423 | 423 |
List<SpecimenOrObservationBase> records = occurrenceService.findByTitle(config).getRecords(); |
424 | 424 |
assertEquals(1, records.size()); |
425 |
SpecimenOrObservationBase derivedUnitSpecimen = records.iterator().next(); |
|
425 |
SpecimenOrObservationBase<?> derivedUnitSpecimen = records.iterator().next();
|
|
426 | 426 |
assertEquals(DerivedUnit.class, derivedUnitSpecimen.getClass()); |
427 | 427 |
DerivedUnit specimen = (DerivedUnit) derivedUnitSpecimen; |
428 | 428 |
assertEquals("Herbarium Berolinense", specimen.getCollection().getCode()); |
... | ... | |
433 | 433 |
dnaConfig.setSignificantIdentifier("DB 6"); |
434 | 434 |
List<SpecimenOrObservationBase> dnaRecords = occurrenceService.findByTitle(dnaConfig).getRecords(); |
435 | 435 |
assertEquals(1, dnaRecords.size()); |
436 |
SpecimenOrObservationBase dnaSpecimen = dnaRecords.iterator().next(); |
|
436 |
SpecimenOrObservationBase<?> dnaSpecimen = dnaRecords.iterator().next();
|
|
437 | 437 |
assertEquals(DnaSample.class, dnaSpecimen.getClass()); |
438 | 438 |
DnaSample dnaSample = (DnaSample) dnaSpecimen; |
439 | 439 |
DerivationEvent derivedFrom = dnaSample.getDerivedFrom(); |
... | ... | |
559 | 559 |
FieldUnit dnaSampleFieldUnit = fieldUnits.iterator().next(); |
560 | 560 |
assertEquals(specimenFieldUnit, dnaSampleFieldUnit); |
561 | 561 |
assertEquals("fieldUnit1", dnaSampleFieldUnit.getTitleCache()); |
562 |
|
|
563 | 562 |
} |
564 | 563 |
|
565 | 564 |
@Test |
Also available in: Unified diff
cleanup