Пример #1
0
 protected void setUp() throws Exception {
   super.setUp();
   serializer = new NdmSerializer();
   method = new Method();
   deeracTasks = new Tasks();
   UserTaskList userTaskList = new UserTaskList();
   deeracTasks.setUserTaskList(userTaskList);
 }
  private void initData() throws IOException, ParseException {

    ArrayTaskList ud = new ArrayTaskList();
    TaskIO.readBinary(ud, dataFile);

    Calendar c = Calendar.getInstance();
    c.setTime(new Date());
    String forTime = format.format(c.getTime());
    c.add(Calendar.DATE, 7);
    String toTime = format.format(c.getTime());
    LinkedTaskList ud2 = (LinkedTaskList) Tasks.incoming(ud, forTime, toTime);

    for (Task l : ud2) {
      userData2.add(l);
    }
    Collections.sort(userData2, new TaskComparator());
  }