/**
* Tests getting the number of days in a date range.
*/
public void testGetNumberOfDays() {
DataQuery dataQuery1 = TestUtil.getNewDataQuery();
dataQuery1.setStartDate("2010-01-01");
dataQuery1.setEndDate("2010-01-15");
int numDays = DataQueryUtil.getNumberOfDays(dataQuery1);
assertEquals(15, numDays);
DataQuery dataQuery2 = TestUtil.getNewDataQuery();
dataQuery2.setStartDate("2010-02-01");
dataQuery2.setEndDate("2010-04-02");
numDays = DataQueryUtil.getNumberOfDays(dataQuery2);
assertEquals(61, numDays);
DataQuery dataQuery3 = TestUtil.getNewDataQuery();
dataQuery3.setStartDate("2010-01-01");
dataQuery3.setEndDate("2010-06-01");
numDays = DataQueryUtil.getNumberOfDays(dataQuery3);
assertEquals(152, numDays);
}