[DS-643] New testing framework (GSoC 2010)

git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@5252 9c30dcfa-912a-0410-8fc2-9e0234be79fd
This commit is contained in:
Pere Villega
2010-08-10 09:10:00 +00:00
parent b779342fdd
commit 5b83e188c0
127 changed files with 36011 additions and 86 deletions

View File

@@ -148,19 +148,26 @@ public class DCDate
public DCDate(Date date)
{
super();
if(date != null)
{
setTime(date);
if (!(calendar.get(Calendar.HOUR_OF_DAY) == 0 &&
calendar.get(Calendar.MINUTE) == 0 &&
calendar.get(Calendar.SECOND) == 0))
{
granularity = DateGran.TIME;
}
// if date is 1-jan, assume it's because this was set for year
else if (calendar.get(Calendar.DAY_OF_MONTH) == 1 && calendar.get(Calendar.MONTH) == 0)
{
granularity = DateGran.YEAR;
}
// otherwise day
else
{
granularity = DateGran.DAY;
}
}
}
/**