dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #00447
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 137: Updated unit tests related to ReportTable.
------------------------------------------------------------
revno: 137
committer: Lars Helge Oeverland larshelge@xxxxxxxxx
branch nick: trunk
timestamp: Tue 2009-03-31 14:04:28 +0200
message:
Updated unit tests related to ReportTable.
modified:
dhis-2/dhis-services/dhis-service-reporting/src/test/java/org/hisp/dhis/reporttable/ReportTableCreatorTest.java
dhis-2/dhis-services/dhis-service-reporting/src/test/java/org/hisp/dhis/reporttable/ReportTableManagerTest.java
dhis-2/dhis-services/dhis-service-reporting/src/test/java/org/hisp/dhis/reporttable/ReportTableStatementTest.java
dhis-2/dhis-services/dhis-service-reporting/src/test/java/org/hisp/dhis/reporttable/ReportTableTest.java
=== modified file 'dhis-2/dhis-services/dhis-service-reporting/src/test/java/org/hisp/dhis/reporttable/ReportTableCreatorTest.java'
--- dhis-2/dhis-services/dhis-service-reporting/src/test/java/org/hisp/dhis/reporttable/ReportTableCreatorTest.java 2009-03-03 16:46:36 +0000
+++ dhis-2/dhis-services/dhis-service-reporting/src/test/java/org/hisp/dhis/reporttable/ReportTableCreatorTest.java 2009-03-31 12:04:28 +0000
@@ -337,6 +337,8 @@
ReportTable reportTable = new ReportTable( "Prescriptions", ReportTable.MODE_DATAELEMENTS, false,
dataElements, new ArrayList<Indicator>(), new ArrayList<DataSet>(), new ArrayList<DataElementCategoryOptionCombo>(), periods, relativePeriods, units,
true, false, true, false, relatives, null, i18nFormat, "january_2000" );
+
+ reportTable.init();
reportTableCreator.createReportTable( reportTable, false );
}
@@ -346,6 +348,8 @@
ReportTable reportTable = new ReportTable( "Prescriptions", ReportTable.MODE_DATAELEMENTS, false,
dataElements, new ArrayList<Indicator>(), new ArrayList<DataSet>(), new ArrayList<DataElementCategoryOptionCombo>(), periods, relativePeriods, units,
false, false, false, true, relatives, null, i18nFormat, "january_2000" );
+
+ reportTable.init();
reportTableCreator.createReportTable( reportTable, false );
}
@@ -355,6 +359,8 @@
ReportTable reportTable = new ReportTable( "Prescriptions", ReportTable.MODE_DATAELEMENTS, false,
dataElements, new ArrayList<Indicator>(), new ArrayList<DataSet>(), new ArrayList<DataElementCategoryOptionCombo>(), periods, relativePeriods, units,
true, false, false, true, relatives, null, i18nFormat, "january_2000" );
+
+ reportTable.init();
reportTableCreator.createReportTable( reportTable, false );
}
@@ -364,6 +370,8 @@
ReportTable reportTable = new ReportTable( "Prescriptions", ReportTable.MODE_DATAELEMENTS, false,
dataElements, new ArrayList<Indicator>(), new ArrayList<DataSet>(), categoryOptionCombos, periods, relativePeriods, units,
true, true, true, false, relatives, null, i18nFormat, "january_2000" );
+
+ reportTable.init();
reportTableCreator.createReportTable( reportTable, false );
}
@@ -374,6 +382,8 @@
ReportTable reportTable = new ReportTable( "Prescriptions", ReportTable.MODE_DATAELEMENTS, false,
dataElements, new ArrayList<Indicator>(), new ArrayList<DataSet>(), categoryOptionCombos, periods, relativePeriods, units,
false, true, false, true, relatives, null, i18nFormat, "january_2000" );
+
+ reportTable.init();
reportTableCreator.createReportTable( reportTable, false );
}
@@ -383,6 +393,8 @@
ReportTable reportTable = new ReportTable( "Prescriptions", ReportTable.MODE_DATAELEMENTS, false,
dataElements, new ArrayList<Indicator>(), new ArrayList<DataSet>(), categoryOptionCombos, periods, relativePeriods, units,
true, false, false, true, relatives, null, i18nFormat, "january_2000" );
+
+ reportTable.init();
reportTableCreator.createReportTable( reportTable, false );
}
@@ -392,6 +404,8 @@
ReportTable reportTable = new ReportTable( "Prescriptions", ReportTable.MODE_INDICATORS, false,
new ArrayList<DataElement>(), indicators, new ArrayList<DataSet>(), new ArrayList<DataElementCategoryOptionCombo>(), periods, relativePeriods, units,
true, false, true, false, relatives, null, i18nFormat, "january_2000" );
+
+ reportTable.init();
reportTableCreator.createReportTable( reportTable, false );
}
@@ -401,6 +415,8 @@
ReportTable reportTable = new ReportTable( "Prescriptions", ReportTable.MODE_INDICATORS, false,
new ArrayList<DataElement>(), indicators, new ArrayList<DataSet>(), new ArrayList<DataElementCategoryOptionCombo>(), periods, relativePeriods, units,
false, false, false, true, relatives, null, i18nFormat, "january_2000" );
+
+ reportTable.init();
reportTableCreator.createReportTable( reportTable, false );
}
@@ -410,6 +426,8 @@
ReportTable reportTable = new ReportTable( "Prescriptions", ReportTable.MODE_INDICATORS, false,
new ArrayList<DataElement>(), indicators, new ArrayList<DataSet>(), new ArrayList<DataElementCategoryOptionCombo>(), periods, relativePeriods, units,
true, false, false, true, relatives, null, i18nFormat, "january_2000" );
+
+ reportTable.init();
reportTableCreator.createReportTable( reportTable, false );
}
@@ -419,6 +437,8 @@
ReportTable reportTable = new ReportTable( "Prescriptions", ReportTable.MODE_DATASETS, false,
new ArrayList<DataElement>(), new ArrayList<Indicator>(), dataSets, new ArrayList<DataElementCategoryOptionCombo>(), periods, relativePeriods, units,
true, false, true, false, relatives, null, i18nFormat, "january_2000" );
+
+ reportTable.init();
reportTableCreator.createReportTable( reportTable, false );
}
@@ -428,6 +448,8 @@
ReportTable reportTable = new ReportTable( "Prescriptions", ReportTable.MODE_DATASETS, false,
new ArrayList<DataElement>(), new ArrayList<Indicator>(), dataSets, new ArrayList<DataElementCategoryOptionCombo>(), periods, relativePeriods, units,
false, false, false, true, relatives, null, i18nFormat, "january_2000" );
+
+ reportTable.init();
reportTableCreator.createReportTable( reportTable, false );
}
@@ -437,6 +459,8 @@
ReportTable reportTable = new ReportTable( "Prescriptions", ReportTable.MODE_DATASETS, false,
new ArrayList<DataElement>(), new ArrayList<Indicator>(), dataSets, new ArrayList<DataElementCategoryOptionCombo>(), periods, relativePeriods, units,
true, false, false, true, relatives, null, i18nFormat, "january_2000" );
+
+ reportTable.init();
reportTableCreator.createReportTable( reportTable, false );
}
=== modified file 'dhis-2/dhis-services/dhis-service-reporting/src/test/java/org/hisp/dhis/reporttable/ReportTableManagerTest.java'
--- dhis-2/dhis-services/dhis-service-reporting/src/test/java/org/hisp/dhis/reporttable/ReportTableManagerTest.java 2009-03-03 16:46:36 +0000
+++ dhis-2/dhis-services/dhis-service-reporting/src/test/java/org/hisp/dhis/reporttable/ReportTableManagerTest.java 2009-03-31 12:04:28 +0000
@@ -210,6 +210,8 @@
ReportTable reportTable = new ReportTable( "Immunization", ReportTable.MODE_INDICATORS, false,
new ArrayList<DataElement>(), indicators, new ArrayList<DataSet>(), new ArrayList<DataElementCategoryOptionCombo>(), periods, relativePeriods, units,
true, false, true, false, relatives, null, i18nFormat, "january_2000" );
+
+ reportTable.init();
reportTableManager.createReportTable( reportTable );
@@ -217,11 +219,15 @@
dataElements, new ArrayList<Indicator>(), new ArrayList<DataSet>(), new ArrayList<DataElementCategoryOptionCombo>(), periods, relativePeriods, units,
true, false, true, false, relatives, null, i18nFormat, "january_2000" );
+ reportTable.init();
+
reportTableManager.createReportTable( reportTable );
reportTable = new ReportTable( "Immunization", ReportTable.MODE_DATAELEMENTS, false,
new ArrayList<DataElement>(), new ArrayList<Indicator>(), dataSets, new ArrayList<DataElementCategoryOptionCombo>(), periods, relativePeriods, units,
true, false, true, false, relatives, null, i18nFormat, "january_2000" );
+
+ reportTable.init();
reportTableManager.createReportTable( reportTable );
}
@@ -231,18 +237,24 @@
ReportTable reportTable = new ReportTable( "Immunization", ReportTable.MODE_INDICATORS, false,
new ArrayList<DataElement>(), indicators, new ArrayList<DataSet>(), new ArrayList<DataElementCategoryOptionCombo>(), periods, relativePeriods, units,
true, false, true, false, relatives, null, i18nFormat, "january_2000" );
+
+ reportTable.init();
reportTableManager.removeReportTable( reportTable );
reportTable = new ReportTable( "Immunization", ReportTable.MODE_DATAELEMENTS, false,
dataElements, new ArrayList<Indicator>(), new ArrayList<DataSet>(), new ArrayList<DataElementCategoryOptionCombo>(), periods, relativePeriods, units,
true, false, true, false, relatives, null, i18nFormat, "january_2000" );
+
+ reportTable.init();
reportTableManager.removeReportTable( reportTable );
reportTable = new ReportTable( "Immunization", ReportTable.MODE_DATAELEMENTS, false,
new ArrayList<DataElement>(), new ArrayList<Indicator>(), dataSets, new ArrayList<DataElementCategoryOptionCombo>(), periods, relativePeriods, units,
true, false, true, false, relatives, null, i18nFormat, "january_2000" );
+
+ reportTable.init();
reportTableManager.removeReportTable( reportTable );
}
@@ -267,6 +279,8 @@
ReportTable reportTable = new ReportTable( "Immunization", ReportTable.MODE_INDICATORS, false,
new ArrayList<DataElement>(), indicators, new ArrayList<DataSet>(), new ArrayList<DataElementCategoryOptionCombo>(), periods, relativePeriods, units,
true, false, true, false, relatives, null, i18nFormat, "january_2000" );
+
+ reportTable.init();
Map<String, Double> map = reportTableManager.getAggregatedValueMap( reportTable, null, null, null, unitA );
@@ -303,6 +317,8 @@
ReportTable reportTable = new ReportTable( "Immunization", ReportTable.MODE_DATAELEMENTS, false,
dataElements, new ArrayList<Indicator>(), new ArrayList<DataSet>(), new ArrayList<DataElementCategoryOptionCombo>(), periods, relativePeriods, units,
true, false, true, false, relatives, null, i18nFormat, "january_2000" );
+
+ reportTable.init();
Map<String, Double> map = reportTableManager.getAggregatedValueMap( reportTable, null, null, null, unitA );
@@ -339,6 +355,8 @@
ReportTable reportTable = new ReportTable( "Immunization", ReportTable.MODE_DATAELEMENTS, false,
dataElements, new ArrayList<Indicator>(), new ArrayList<DataSet>(), categoryOptionCombos, periods, relativePeriods, units,
true, true, true, false, relatives, null, i18nFormat, "january_2000" );
+
+ reportTable.init();
Map<String, Double> map = reportTableManager.getAggregatedValueMap( reportTable, null, null, null, unitA );
@@ -375,6 +393,8 @@
ReportTable reportTable = new ReportTable( "Immunization", ReportTable.MODE_DATASETS, false,
new ArrayList<DataElement>(), new ArrayList<Indicator>(), dataSets, new ArrayList<DataElementCategoryOptionCombo>(), periods, relativePeriods, units,
true, false, true, false, relatives, null, i18nFormat, "january_2000" );
+
+ reportTable.init();
Map<String, Double> map = reportTableManager.getAggregatedValueMap( reportTable, null, null, null, unitA );
=== modified file 'dhis-2/dhis-services/dhis-service-reporting/src/test/java/org/hisp/dhis/reporttable/ReportTableStatementTest.java'
--- dhis-2/dhis-services/dhis-service-reporting/src/test/java/org/hisp/dhis/reporttable/ReportTableStatementTest.java 2009-03-03 16:46:36 +0000
+++ dhis-2/dhis-services/dhis-service-reporting/src/test/java/org/hisp/dhis/reporttable/ReportTableStatementTest.java 2009-03-31 12:04:28 +0000
@@ -145,6 +145,8 @@
new ArrayList<DataElement>(), indicators, new ArrayList<DataSet>(), new ArrayList<DataElementCategoryOptionCombo>(), periods, relativePeriods, units,
true, false, true, false, relatives, null, i18nFormat, "january_2000" );
+ reportTable.init();
+
ReportTableStatement statement = new CreateReportTableStatement( reportTable, dialect );
assertNotNull( statement.getStatement() );
@@ -152,6 +154,8 @@
reportTable = new ReportTable( "Immunization", ReportTable.MODE_DATAELEMENTS, false,
dataElements, new ArrayList<Indicator>(), new ArrayList<DataSet>(), new ArrayList<DataElementCategoryOptionCombo>(), periods, relativePeriods, units,
true, false, true, false, relatives, null, i18nFormat, "january_2000" );
+
+ reportTable.init();
statement = new CreateReportTableStatement( reportTable, dialect );
@@ -160,6 +164,8 @@
reportTable = new ReportTable( "Immunization", ReportTable.MODE_INDICATORS, false,
new ArrayList<DataElement>(), new ArrayList<Indicator>(), dataSets, new ArrayList<DataElementCategoryOptionCombo>(), periods, relativePeriods, units,
true, false, true, false, relatives, null, i18nFormat, "january_2000" );
+
+ reportTable.init();
statement = new CreateReportTableStatement( reportTable, dialect );
@@ -171,6 +177,8 @@
ReportTable reportTable = new ReportTable( "Immunization", ReportTable.MODE_INDICATORS, false,
new ArrayList<DataElement>(), indicators, new ArrayList<DataSet>(), new ArrayList<DataElementCategoryOptionCombo>(), periods, relativePeriods, units,
true, false ,true, false, relatives, null, i18nFormat, "january_2000" );
+
+ reportTable.init();
ReportTableStatement statement = new GetReportTableDataStatement( reportTable );
@@ -186,6 +194,8 @@
ReportTable reportTable = new ReportTable( "Immunization", ReportTable.MODE_DATAELEMENTS, false,
dataElements, new ArrayList<Indicator>(), new ArrayList<DataSet>(), categoryOptionCombos, periods, relativePeriods, units,
true, true, false, false, relatives, null, i18nFormat, "january_2000" );
+
+ reportTable.init();
ReportTableStatement statement = new GetReportTableDataStatement( reportTable );
@@ -201,6 +211,8 @@
ReportTable reportTable = new ReportTable( "Immunization", ReportTable.MODE_DATAELEMENTS, false,
dataElements, new ArrayList<Indicator>(), new ArrayList<DataSet>(), new ArrayList<DataElementCategoryOptionCombo>(), periods, relativePeriods, units,
true, false, true, false, relatives, null, i18nFormat, "january_2000" );
+
+ reportTable.init();
ReportTableStatement statement = new GetReportTableDataStatement( reportTable );
@@ -216,6 +228,8 @@
ReportTable reportTable = new ReportTable( "Immunization", ReportTable.MODE_DATASETS, false,
new ArrayList<DataElement>(), new ArrayList<Indicator>(), dataSets, new ArrayList<DataElementCategoryOptionCombo>(), periods, relativePeriods, units,
true, false, true, false, relatives, null, i18nFormat, "january_2000" );
+
+ reportTable.init();
ReportTableStatement statement = new GetReportTableDataStatement( reportTable );
@@ -231,6 +245,8 @@
ReportTable reportTable = new ReportTable( "Immunization", ReportTable.MODE_INDICATORS, false,
new ArrayList<DataElement>(), indicators, new ArrayList<DataSet>(), new ArrayList<DataElementCategoryOptionCombo>(), periods, relativePeriods, units,
true, false, true, false, relatives, null, i18nFormat, "january_2000" );
+
+ reportTable.init();
ReportTableStatement statement = new RemoveReportTableStatement( reportTable );
=== modified file 'dhis-2/dhis-services/dhis-service-reporting/src/test/java/org/hisp/dhis/reporttable/ReportTableTest.java'
--- dhis-2/dhis-services/dhis-service-reporting/src/test/java/org/hisp/dhis/reporttable/ReportTableTest.java 2009-03-03 16:46:36 +0000
+++ dhis-2/dhis-services/dhis-service-reporting/src/test/java/org/hisp/dhis/reporttable/ReportTableTest.java 2009-03-31 12:04:28 +0000
@@ -191,6 +191,8 @@
ReportTable reportTable = new ReportTable( "Embezzlement", ReportTable.MODE_INDICATORS, false,
new ArrayList<DataElement>(), indicators, new ArrayList<DataSet>(), new ArrayList<DataElementCategoryOptionCombo>(), periods, relativePeriods, units,
true, false, true, false, relatives, null, i18nFormat, "january_2000" );
+
+ reportTable.init();
List<String> indexColumns = reportTable.getIndexColumns();
@@ -246,6 +248,8 @@
new ArrayList<DataElement>(), indicators, new ArrayList<DataSet>(), new ArrayList<DataElementCategoryOptionCombo>(), periods, relativePeriods, units,
false, false, false, true, relatives, null, i18nFormat, "january_2000" );
+ reportTable.init();
+
List<String> indexColumns = reportTable.getIndexColumns();
assertNotNull( indexColumns );
@@ -292,6 +296,8 @@
new ArrayList<DataElement>(), indicators, new ArrayList<DataSet>(), new ArrayList<DataElementCategoryOptionCombo>(), periods, relativePeriods, units,
true, false, false, true, relatives, null, i18nFormat, "january_2000" );
+ reportTable.init();
+
List<String> indexColumns = reportTable.getIndexColumns();
assertNotNull( indexColumns );
@@ -341,6 +347,8 @@
ReportTable reportTable = new ReportTable( "Embezzlement", ReportTable.MODE_DATAELEMENTS, false,
dataElements, new ArrayList<Indicator>(), new ArrayList<DataSet>(), new ArrayList<DataElementCategoryOptionCombo>(), periods, relativePeriods, units,
true, false, true, false, relatives, null, i18nFormat, "january_2000" );
+
+ reportTable.init();
List<String> indexColumns = reportTable.getIndexColumns();
@@ -396,6 +404,8 @@
dataElements, new ArrayList<Indicator>(), new ArrayList<DataSet>(), new ArrayList<DataElementCategoryOptionCombo>(), periods, relativePeriods, units,
false, false, false, true, relatives, null, i18nFormat, "january_2000" );
+ reportTable.init();
+
List<String> indexColumns = reportTable.getIndexColumns();
assertNotNull( indexColumns );
@@ -443,6 +453,8 @@
dataElements, new ArrayList<Indicator>(), new ArrayList<DataSet>(), new ArrayList<DataElementCategoryOptionCombo>(), periods, relativePeriods, units,
true, false, false, true, relatives, null, i18nFormat, "january_2000" );
+ reportTable.init();
+
List<String> indexColumns = reportTable.getIndexColumns();
assertNotNull( indexColumns );
@@ -492,6 +504,8 @@
ReportTable reportTable = new ReportTable( "Embezzlement", ReportTable.MODE_DATAELEMENTS, false,
dataElements, new ArrayList<Indicator>(), new ArrayList<DataSet>(), categoryOptionCombos, periods, relativePeriods, units,
true, true, true, false, relatives, null, i18nFormat, "january_2000" );
+
+ reportTable.init();
List<String> indexColumns = reportTable.getIndexColumns();
@@ -561,6 +575,8 @@
dataElements, new ArrayList<Indicator>(), new ArrayList<DataSet>(), categoryOptionCombos, periods, relativePeriods, units,
false, true, false, true, relatives, null, i18nFormat, "january_2000" );
+ reportTable.init();
+
List<String> indexColumns = reportTable.getIndexColumns();
assertNotNull( indexColumns );
@@ -613,6 +629,8 @@
dataElements, new ArrayList<Indicator>(), new ArrayList<DataSet>(), categoryOptionCombos, periods, relativePeriods, units,
true, false, false, true, relatives, null, i18nFormat, "january_2000" );
+ reportTable.init();
+
List<String> indexColumns = reportTable.getIndexColumns();
assertNotNull( indexColumns );
@@ -664,6 +682,8 @@
ReportTable reportTable = new ReportTable( "Embezzlement", ReportTable.MODE_DATASETS, false,
new ArrayList<DataElement>(), new ArrayList<Indicator>(), dataSets, new ArrayList<DataElementCategoryOptionCombo>(), periods, relativePeriods, units,
true, false, true, false, relatives, null, i18nFormat, "january_2000" );
+
+ reportTable.init();
List<String> indexColumns = reportTable.getIndexColumns();
@@ -718,6 +738,8 @@
new ArrayList<DataElement>(), new ArrayList<Indicator>(), dataSets, new ArrayList<DataElementCategoryOptionCombo>(), periods, relativePeriods, units,
false, false, false, true, relatives, null, i18nFormat, "january_2000" );
+ reportTable.init();
+
List<String> indexColumns = reportTable.getIndexColumns();
assertNotNull( indexColumns );
@@ -764,6 +786,8 @@
new ArrayList<DataElement>(), new ArrayList<Indicator>(), dataSets, new ArrayList<DataElementCategoryOptionCombo>(), periods, relativePeriods, units,
true, false, false, true, relatives, null, i18nFormat, "january_2000" );
+ reportTable.init();
+
List<String> indexColumns = reportTable.getIndexColumns();
assertNotNull( indexColumns );
--
Trunk
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk
Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription.