Project

General

Profile

« Previous | Next » 

Revision 648b5192

Added by Andreas Kohlbecker over 15 years ago

additional DAO methods for new REST service

View differences:

cdmlib-persistence/src/test/java/eu/etaxonomy/cdm/persistence/dao/hibernate/taxon/TaxonDaoHibernateImplTest.java
114 114
		assertFalse("The list should not be empty",rootTaxa.isEmpty());
115 115
		assertEquals("There should be one root taxon",1, rootTaxa.size());
116 116
		
117
		rootTaxa = taxonDao.getRootTaxa(Rank.GENUS(), sec1, CdmFetch.FETCH_CHILDTAXA(), true, false);
117
		rootTaxa = taxonDao.getRootTaxa(Rank.GENUS(), sec1, CdmFetch.FETCH_CHILDTAXA(), true, false, null);
118 118
		assertNotNull("getRootTaxa should return a List",rootTaxa);
119 119
		assertFalse("The list should not be empty",rootTaxa.isEmpty());
120 120
		assertEquals("There should be one root taxon",1, rootTaxa.size());
121 121
		
122
		rootTaxa = taxonDao.getRootTaxa(Rank.FAMILY(), sec2, CdmFetch.FETCH_CHILDTAXA(), true, false);
122
		rootTaxa = taxonDao.getRootTaxa(Rank.FAMILY(), sec2, CdmFetch.FETCH_CHILDTAXA(), true, false, null);
123 123
		if (logger.isDebugEnabled()) {
124 124
		logger.debug("Root taxa rank Family (" + rootTaxa.size() + "):");
125 125
		for (Taxon taxon: rootTaxa) {
......
127 127
		}
128 128
	}
129 129
		assertEquals("There should be one root taxon rank Family",1, rootTaxa.size());
130
		rootTaxa = taxonDao.getRootTaxa(Rank.GENUS(), sec2, CdmFetch.FETCH_CHILDTAXA(), true, false);
130
		rootTaxa = taxonDao.getRootTaxa(Rank.GENUS(), sec2, CdmFetch.FETCH_CHILDTAXA(), true, false, null);
131 131
		assertNotNull("getRootTaxa should return a List",rootTaxa);
132 132
		assertFalse("The list should not be empty",rootTaxa.isEmpty());
133 133
		if (logger.isDebugEnabled()) {
......
138 138
	}
139 139
		assertEquals("There should be 22 root taxa rank Genus",22, rootTaxa.size());
140 140
		
141
		rootTaxa = taxonDao.getRootTaxa(Rank.SPECIES(), sec2, CdmFetch.FETCH_CHILDTAXA(), true, false);
141
		rootTaxa = taxonDao.getRootTaxa(Rank.SPECIES(), sec2, CdmFetch.FETCH_CHILDTAXA(), true, false, null);
142 142
		if (logger.isDebugEnabled()) {
143 143
		logger.debug("Root taxa rank Species (" + rootTaxa.size() + "):");
144 144
		for (Taxon taxon: rootTaxa) {

Also available in: Unified diff