예제 #1
0
 public void test_990_DeleteTask()
     throws InterruptedException, ExecutionException, TimeoutException {
   try {
     TaskList taskList = searchTaskList(UPD_TASKLIST_NAME);
     assertNotNull(taskList);
     Task task = searchTask(taskList.getId(), UPD_TASK_NAME);
     assertNotNull(task);
     LocalTask localTask = dbHandler.getTaskByGoogleId(task.getId());
     dbHandler.deleteTaskFinal(localTask.getInternalId());
     apiManager.deleteTask(taskList.getId(), task.getId());
   } catch (GoogleSyncException e) {
     fail("No remote connection.");
   }
 }
예제 #2
0
 public void test_201_AddTaskForSync()
     throws InterruptedException, ExecutionException, TimeoutException {
   try {
     TaskList taskList = searchTaskList(UPD_TASKLIST_NAME);
     assertNotNull(taskList);
     Task task = new Task();
     task.setTitle(NEW_TASK_NAME);
     task = apiManager.insertTask(taskList.getId(), task);
     syncManager.execute();
     syncManager.get(1000, TimeUnit.DAYS);
     LocalTask localTask = dbHandler.getTaskByGoogleId(task.getId());
     assertNotNull(localTask);
   } catch (GoogleSyncException e) {
     fail("No remote connection.");
   }
 }