Revision 80639870
Added by Andreas Müller about 3 years ago
cdmlib-services/src/test/java/eu/etaxonomy/cdm/api/service/StatisticsServiceImplTest.java | ||
---|---|---|
20 | 20 |
|
21 | 21 |
import org.apache.commons.lang.RandomStringUtils; |
22 | 22 |
import org.apache.log4j.Logger; |
23 |
import org.junit.After; |
|
24 | 23 |
import org.junit.Before; |
25 | 24 |
import org.junit.Test; |
26 | 25 |
import org.unitils.spring.annotation.SpringBeanByType; |
... | ... | |
550 | 549 |
} |
551 | 550 |
} |
552 | 551 |
|
553 |
/** |
|
554 |
* @throws java.lang.Exception |
|
555 |
*/ |
|
556 |
@After |
|
557 |
public void tearDown() throws Exception { |
|
558 |
} |
|
559 |
|
|
560 | 552 |
// ****************** tests ***************** |
561 | 553 |
|
562 | 554 |
@Test |
... | ... | |
611 | 603 |
if (PRINTOUT) { |
612 | 604 |
print(); |
613 | 605 |
} |
614 |
|
|
615 | 606 |
} |
616 | 607 |
|
617 |
/** |
|
618 |
* |
|
619 |
*/ |
|
620 | 608 |
private void print() { |
621 | 609 |
for (Classification classification : classifications) { |
622 | 610 |
System.out.println("Classification:" + classification.toString()); |
... | ... | |
650 | 638 |
|
651 | 639 |
// ************************** private methods ****************************+ |
652 | 640 |
|
653 |
/** |
|
654 |
* @param no_of_sth |
|
655 |
* @param inClassification |
|
656 |
* @param increase |
|
657 |
*/ |
|
658 | 641 |
private void increment(List<Long> no_of_sth, int inClassification, |
659 | 642 |
int increase) { |
660 | 643 |
no_of_sth.set(inClassification, (no_of_sth.get(inClassification)) |
... | ... | |
694 | 677 |
return mapList; |
695 | 678 |
} |
696 | 679 |
|
697 |
/** |
|
698 |
* |
|
699 |
*/ |
|
700 | 680 |
private void createMap_ALL() { |
701 | 681 |
typeMap_ALL = new HashMap<String, Long>() { |
702 |
{ |
|
682 |
private static final long serialVersionUID = 8955874371885801943L; |
|
683 |
|
|
684 |
{ |
|
703 | 685 |
put(StatisticsTypeEnum.CLASSIFICATION.getLabel(), |
704 | 686 |
Long.valueOf(NO_OF_CLASSIFICATIONS)); |
705 | 687 |
put(StatisticsTypeEnum.ALL_TAXA.getLabel(), |
... | ... | |
727 | 709 |
private List<StatisticsConfigurator> createConfiguratorList(String[] part, |
728 | 710 |
List<StatisticsTypeEnum> types) { |
729 | 711 |
|
730 |
ArrayList<StatisticsConfigurator> configuratorList = new ArrayList<StatisticsConfigurator>();
|
|
712 |
ArrayList<StatisticsConfigurator> configuratorList = new ArrayList<>(); |
|
731 | 713 |
|
732 | 714 |
// 1. get types for configurators: |
733 | 715 |
// in our case all the configurators will have the same types |
... | ... | |
772 | 754 |
} |
773 | 755 |
} |
774 | 756 |
} |
775 |
|
|
776 | 757 |
} |
777 | 758 |
|
778 | 759 |
return configuratorList; |
... | ... | |
825 | 806 |
} |
826 | 807 |
} |
827 | 808 |
|
828 |
/* (non-Javadoc) |
|
829 |
* @see eu.etaxonomy.cdm.test.integration.CdmIntegrationTest#createTestData() |
|
830 |
*/ |
|
831 | 809 |
@Override |
832 |
public void createTestDataSet() throws FileNotFoundException { |
|
833 |
// TODO Auto-generated method stub |
|
834 |
|
|
835 |
} |
|
810 |
public void createTestDataSet() throws FileNotFoundException {} |
|
836 | 811 |
|
837 | 812 |
} |
Also available in: Unified diff
cleanup