コード例 #1
0
 public static void cleanTestEnvironment(IStatsManager statsManager) {
   try {
     Calendar start = CalendarConverter.getCalendarDay("01/01/2008", 0, 0, 0, 0);
     Calendar end = Calendar.getInstance();
     end.add(Calendar.DAY_OF_YEAR, 1);
     statsManager.deleteStatsRecord(start.getTime(), end.getTime());
   } catch (Throwable t) {
     throw new RuntimeException("Error cleaning test environment", t);
   }
 }
コード例 #2
0
 private void deleteStatsRecord() throws ApsSystemException {
   String today = DateConverter.getFormattedDate(new Date(), "dd/MM/yyyy");
   Calendar start = CalendarConverter.getCalendarDay(today, 0, 0, 0, 0);
   Calendar end = CalendarConverter.getCalendarDay(today, 23, 59, 59, 999);
   _statsManager.deleteStatsRecord(start.getTime(), end.getTime());
 }