Revision 4c2ad250
Added by Andreas Müller over 1 year ago
cdmlib-model/src/test/java/eu/etaxonomy/cdm/model/taxon/ClassificationTest.java | ||
---|---|---|
25 | 25 |
import java.util.Set; |
26 | 26 |
|
27 | 27 |
import org.apache.commons.lang3.StringUtils; |
28 |
import org.apache.logging.log4j.LogManager;import org.apache.logging.log4j.Logger; |
|
28 |
import org.apache.logging.log4j.LogManager; |
|
29 |
import org.apache.logging.log4j.Logger; |
|
29 | 30 |
import org.junit.Assert; |
30 | 31 |
import org.junit.Before; |
31 | 32 |
import org.junit.Test; |
... | ... | |
46 | 47 |
* @since 01.04.2009 |
47 | 48 |
*/ |
48 | 49 |
public class ClassificationTest { |
49 |
private static final Logger logger = LogManager.getLogger(ClassificationTest.class); |
|
50 |
|
|
51 |
private static final Logger logger = LogManager.getLogger(); |
|
50 | 52 |
|
51 | 53 |
private static String treeName1; |
52 | 54 |
private static Classification classification1; |
53 | 55 |
private static TaxonNode taxonNode1; |
54 | 56 |
private static TaxonNode taxonNode2; |
55 |
private static TaxonNode taxonNode3; |
|
56 | 57 |
private static TaxonNode taxonNode12; |
57 |
private static TaxonNode taxonNode121; |
|
58 | 58 |
private static Taxon taxon1; |
59 | 59 |
private static Taxon taxon2; |
60 | 60 |
private static Taxon taxon3; |
... | ... | |
262 | 262 |
|
263 | 263 |
} |
264 | 264 |
|
265 |
private boolean handleSingleClass(Class<?> classToBeSearchedFor, Class<?> type, Field field, Class<?> cdmClass, Set<CdmBase> result, CdmBase value){ |
|
265 |
@SuppressWarnings("unused") |
|
266 |
private boolean handleSingleClass(Class<?> classToBeSearchedFor, Class<?> type, Field field, Class<?> cdmClass, Set<CdmBase> result, CdmBase value){ |
|
266 | 267 |
if (! Modifier.isStatic(field.getModifiers())){ |
267 | 268 |
String methodName = StringUtils.rightPad(field.getName(), 30); |
268 | 269 |
String className = StringUtils.rightPad(cdmClass.getSimpleName(), 30); |
269 | 270 |
String returnTypeName = StringUtils.rightPad(type.getSimpleName(), 30); |
270 | 271 |
|
271 |
System.out.println(methodName + "\t\t" + className + "\t\t" + returnTypeName); |
|
272 |
// System.out.println(methodName + "\t\t" + className + "\t\t" + returnTypeName);
|
|
272 | 273 |
// result_old.add(method); |
273 | 274 |
result.addAll(getCdmBasesByFieldAndClass(field, cdmClass, value)); |
274 | 275 |
} |
... | ... | |
367 | 368 |
taxonName3.setTitleCache("name3", true); |
368 | 369 |
|
369 | 370 |
taxonNode12 = taxonNode1.addChildTaxon(taxon12, null, null); |
370 |
taxonNode121 = taxonNode12.addChildTaxon(taxon121, null, null);
|
|
371 |
taxonNode12.addChildTaxon(taxon121, null, null); |
|
371 | 372 |
taxonNode2 = classification1.addChildTaxon(taxon2, null, null); |
372 | 373 |
taxonNode2.addChildTaxon(taxon3, null, null); |
373 | 374 |
Classification clone = classification1.clone(); |
Also available in: Unified diff
cleanup