Revision ad3ad9e0
Added by Andreas Kohlbecker over 12 years ago
- ID ad3ad9e0f0560d0bb782836297c4ffe39b2625c8
- Parent 55d84577
cdmlib-persistence/src/test/java/eu/etaxonomy/cdm/persistence/dao/hibernate/common/CdmGenericDaoImplTest.java | ||
---|---|---|
655 | 655 |
|
656 | 656 |
TaxonDescription taxDesc = TaxonDescription.NewInstance(taxon1); |
657 | 657 |
taxDesc.setTitleCache("taxDesc", true); |
658 |
taxDesc.addDescriptionSource(article2);
|
|
658 |
taxDesc.addSource(null, null, article2, null);
|
|
659 | 659 |
|
660 | 660 |
taxonDao.save(taxon1); |
661 | 661 |
|
... | ... | |
686 | 686 |
Assert.assertEquals("Media number should be 2 (1 from each of the merged objects)", 2, article1.getMedia().size()); |
687 | 687 |
|
688 | 688 |
//Description sources |
689 |
Assert.assertEquals("Number of sources for taxon description must be 1", 1, taxDesc.getDescriptionSources().size());
|
|
690 |
Assert.assertTrue("Taxon description must have article1 as source", taxDesc.getDescriptionSources().contains(article1));
|
|
689 |
Assert.assertEquals("Number of sources for taxon description must be 1", 1, taxDesc.getSources().size()); |
|
690 |
Assert.assertEquals("Taxon description must have article1 as source", taxDesc.getSources().iterator().next().getCitation(),article1);
|
|
691 | 691 |
|
692 | 692 |
//test exceptions |
693 | 693 |
testMergeExceptions(name1, name2, taxon1, zooName1); |
Also available in: Unified diff
Merging r13295 through r13325 from trunk