Project

General

Profile

Revision f3755e6f

IDf3755e6fc7f133fbb54ba6316ebe53233205d1ef
Parent 6d3f64b8
Child 9fc0e990

Added by Patrick Plitzner about 4 years ago

ref #6045 some comments and clean up

View differences:

cdmlib-services/src/test/java/eu/etaxonomy/cdm/api/service/TaxonNodeServiceImplTest.java
538 538
    	 * Classification
539 539
    	 *  * Abies
540 540
    	 *  `- Abies alba
541
    	 *   - Abies balsamea
541 542
    	 *  * Pinus
542 543
    	 *  `- Pinus pampa
543 544
    	 */
......
565 566

  
566 567
    	classification.addChildTaxon(abies, null, null);
567 568
    	TaxonNode abiesAlbaNode = classification.addParentChild(abies, abiesAlba, null, null);
569
    	TaxonNode balsameaNode = classification.addParentChild(abies, abiesBalsamea, null, null);
568 570
    	classification.addChildTaxon(pinus, null, null);
569 571
    	classification.addParentChild(pinus, pinusPampa, null, null);
570
    	TaxonNode balsameaNode = classification.addParentChild(abies, abiesBalsamea, null, null);
571 572
    	classificationService.save(classification);
572 573

  
573 574
    	TaxonNaturalComparator comparator = new TaxonNaturalComparator();
574 575
    	List<TaxonNode> allNodes = new ArrayList<>(classification.getAllNodes());
575 576
    	Collections.sort(allNodes, comparator);
577
    	System.out.println("---Before sorting---");
576 578
    	for (TaxonNode node: allNodes){
577 579
    	    System.out.println(node.getTaxon().getTitleCache());
578 580
    	}
......
585 587

  
586 588
       allNodes = new ArrayList<>(classification.getAllNodes());
587 589
        Collections.sort(allNodes, comparator);
590
        System.out.println("\n---After sorting---");
588 591
        for (TaxonNode node: allNodes){
589 592
            System.out.println(node.getTaxon().getTitleCache());
590 593
        }

Also available in: Unified diff

Add picture from clipboard (Maximum size: 40 MB)