Project

General

Profile

« Previous | Next » 

Revision 20a1adcb

Added by Andreas Müller over 12 years ago

update NameService tests

View differences:

cdmlib-services/src/test/java/eu/etaxonomy/cdm/api/service/NameServiceImplTest.java
629 629
		//TaxonNameDescription
630 630
		name1 = BotanicalName.NewInstance(getSpeciesRank());
631 631
		TaxonNameDescription.NewInstance(name1);
632
		nameService.save(name1);
632
		nameService.saveOrUpdate(name1);
633 633
		commitAndStartNewTransaction(tableNames);
634 634
		
635 635
		name1 = (NonViralName<?>)nameService.find(name1.getUuid());
......
647 647
		NomenclaturalStatusType nomStatusType = (NomenclaturalStatusType)termService.find(NomenclaturalStatusType.ILLEGITIMATE().getUuid());
648 648
		NomenclaturalStatus status = NomenclaturalStatus.NewInstance(nomStatusType);
649 649
		name1.addStatus(status);
650
		nameService.save(name1);
650
		nameService.saveOrUpdate(name1);
651 651
		commitAndStartNewTransaction(tableNames);
652 652
		
653 653
		name1 = (NonViralName<?>)nameService.find(name1.getUuid());
......
706 706
		
707 707
		boolean addToAllNames = true;
708 708
		name1.addTypeDesignation(typeDesignation, addToAllNames);
709
		nameService.save(name1);
709
		nameService.saveOrUpdate(name1);
710 710
		commitAndStartNewTransaction(tableNames);
711 711
		
712 712
		name1 = (NonViralName<?>)nameService.find(name1.getUuid());
cdmlib-services/src/test/resources/eu/etaxonomy/cdm/api/service/NameServiceImplTest.xml
1 1
<?xml version='1.0' encoding='UTF-8'?>
2 2
<dataset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="dataset.xsd">
3
  <TAXONNAMEBASE DTYPE="BotanicalName" ID="10" CREATED="2011-10-06 12:10:14.0" UUID="6dbd41d1-fe13-4d9c-bb58-31f051c2c384" PROTECTEDTITLECACHE="false" TITLECACHE="Name1" FULLTITLECACHE="" PARSINGPROBLEM="0" PROBLEMENDS="-1" PROBLEMSTARTS="-1" PROTECTEDFULLTITLECACHE="false" AUTHORSHIPCACHE="" BINOMHYBRID="false" HYBRIDFORMULA="false" MONOMHYBRID="false" NAMECACHE="" PROTECTEDAUTHORSHIPCACHE="false" PROTECTEDNAMECACHE="false" TRINOMHYBRID="false" ANAMORPHIC="false" HOMOTYPICALGROUP_ID="10" RANK_ID="777"/>
4
  <TAXONNAMEBASE DTYPE="BotanicalName" ID="11" CREATED="2011-10-06 12:10:14.0" UUID="f9e9c13f-5fa5-48d3-88cf-712c921a099e" PROTECTEDTITLECACHE="false" TITLECACHE="Name2" FULLTITLECACHE="" PARSINGPROBLEM="0" PROBLEMENDS="-1" PROBLEMSTARTS="-1" PROTECTEDFULLTITLECACHE="false" AUTHORSHIPCACHE="" BINOMHYBRID="false" HYBRIDFORMULA="false" MONOMHYBRID="false" NAMECACHE="" PROTECTEDAUTHORSHIPCACHE="false" PROTECTEDNAMECACHE="false" TRINOMHYBRID="false" ANAMORPHIC="false" HOMOTYPICALGROUP_ID="11" RANK_ID="777"/>
5
  <TAXONNAMEBASE DTYPE="BotanicalName" ID="12" CREATED="2011-10-06 12:10:14.0" UUID="e1e66264-f16a-4df9-80fd-6ab5028a3c28" PROTECTEDTITLECACHE="false" TITLECACHE="Name3" FULLTITLECACHE="" PARSINGPROBLEM="0" PROBLEMENDS="-1" PROBLEMSTARTS="-1" PROTECTEDFULLTITLECACHE="false" AUTHORSHIPCACHE="" BINOMHYBRID="false" HYBRIDFORMULA="false" MONOMHYBRID="false" NAMECACHE="" PROTECTEDAUTHORSHIPCACHE="false" PROTECTEDNAMECACHE="false" TRINOMHYBRID="false" ANAMORPHIC="false" HOMOTYPICALGROUP_ID="12" RANK_ID="787"/>
3
  <TAXONNAMEBASE DTYPE="BotanicalName" ID="10" CREATED="2011-10-06 12:10:14.0" UUID="6dbd41d1-fe13-4d9c-bb58-31f051c2c384" PROTECTEDTITLECACHE="false" TITLECACHE="Name1" FULLTITLECACHE="" PARSINGPROBLEM="0" PROBLEMENDS="-1" PROBLEMSTARTS="-1" PROTECTEDFULLTITLECACHE="false" AUTHORSHIPCACHE="" BINOMHYBRID="false" HYBRIDFORMULA="false" MONOMHYBRID="false" NAMECACHE="" PROTECTEDAUTHORSHIPCACHE="false" PROTECTEDNAMECACHE="false" TRINOMHYBRID="false" ANAMORPHIC="false" HOMOTYPICALGROUP_ID="1" RANK_ID="777"/>
4
  <TAXONNAMEBASE DTYPE="BotanicalName" ID="11" CREATED="2011-10-06 12:10:14.0" UUID="f9e9c13f-5fa5-48d3-88cf-712c921a099e" PROTECTEDTITLECACHE="false" TITLECACHE="Name2" FULLTITLECACHE="" PARSINGPROBLEM="0" PROBLEMENDS="-1" PROBLEMSTARTS="-1" PROTECTEDFULLTITLECACHE="false" AUTHORSHIPCACHE="" BINOMHYBRID="false" HYBRIDFORMULA="false" MONOMHYBRID="false" NAMECACHE="" PROTECTEDAUTHORSHIPCACHE="false" PROTECTEDNAMECACHE="false" TRINOMHYBRID="false" ANAMORPHIC="false" HOMOTYPICALGROUP_ID="2" RANK_ID="777"/>
5
  <TAXONNAMEBASE DTYPE="BotanicalName" ID="12" CREATED="2011-10-06 12:10:14.0" UUID="e1e66264-f16a-4df9-80fd-6ab5028a3c28" PROTECTEDTITLECACHE="false" TITLECACHE="Name3" FULLTITLECACHE="" PARSINGPROBLEM="0" PROBLEMENDS="-1" PROBLEMSTARTS="-1" PROTECTEDFULLTITLECACHE="false" AUTHORSHIPCACHE="" BINOMHYBRID="false" HYBRIDFORMULA="false" MONOMHYBRID="false" NAMECACHE="" PROTECTEDAUTHORSHIPCACHE="false" PROTECTEDNAMECACHE="false" TRINOMHYBRID="false" ANAMORPHIC="false" HOMOTYPICALGROUP_ID="3" RANK_ID="787"/>
6 6
  <TYPEDESIGNATIONBASE DTYPE="SpecimenTypeDesignation" ID="10" CREATED="2011-10-06 12:10:14.0" UUID="9bbda70b-7272-4e65-a807-852a3f2eba63" NOTDESIGNATED="false" TYPESPECIMEN_ID="10"/>
7 7
  <TYPEDESIGNATIONBASE DTYPE="SpecimenTypeDesignation" ID="11" CREATED="2011-10-06 12:10:14.0" UUID="1357c307-00c3-499c-8e20-0849d4706125" NOTDESIGNATED="false" TYPESPECIMEN_ID="11"/>
8 8
  <TYPEDESIGNATIONBASE DTYPE="NameTypeDesignation" ID="12" CREATED="2011-10-06 12:10:14.0" UUID="0b67b4e1-3183-4272-ace8-7b533f2cc2e5" NOTDESIGNATED="false" CONSERVEDTYPE="false" REJECTEDTYPE="false" TYPENAME_ID="10"/>
......
12 12
  <TAXONNAMEBASE_TYPEDESIGNATIONBASE TYPEDESIGNATIONS_ID="12" TAXONNAMEBASE_ID="12"/>
13 13
  <SPECIMENOROBSERVATIONBASE DTYPE="Fossil" ID="10" CREATED="2011-10-06 12:10:14.0" UUID="4c48b7c8-4c8d-4e48-b083-0837fe51a0a9" PROTECTEDTITLECACHE="false" TITLECACHE="-title cache generation not implemented-"/>
14 14
  <SPECIMENOROBSERVATIONBASE DTYPE="Specimen" ID="11" CREATED="2011-10-06 12:10:14.0" UUID="0d19a9ca-21a7-4adb-8640-8d6719e15eea" PROTECTEDTITLECACHE="false" TITLECACHE="-title cache generation not implemented-"/>
15
  <HOMOTYPICALGROUP ID="1" CREATED="2011-10-12 19:57:31.0" UUID="d8652fa0-eff9-460d-8990-aed0ebf1322e"/>
16
  <HOMOTYPICALGROUP ID="2" CREATED="2011-10-12 19:57:31.0" UUID="2a1b0776-b4b5-462a-9be7-f88378ebd732"/>
17
  <HOMOTYPICALGROUP ID="3" CREATED="2011-10-12 19:57:31.0" UUID="3ac4e376-31cd-47fd-9dd6-eaff415ff0e7"/>
18
 
15 19
</dataset>

Also available in: Unified diff