|
|
|
@ -5,6 +5,7 @@ import com.todoroo.astrid.dao.TagDataDao;
|
|
|
|
|
import com.todoroo.astrid.dao.TagOutstandingDao;
|
|
|
|
|
import com.todoroo.astrid.dao.TaskDao;
|
|
|
|
|
import com.todoroo.astrid.dao.TaskOutstandingDao;
|
|
|
|
|
import com.todoroo.astrid.data.SyncFlags;
|
|
|
|
|
import com.todoroo.astrid.data.TagData;
|
|
|
|
|
import com.todoroo.astrid.data.Task;
|
|
|
|
|
import com.todoroo.astrid.test.DatabaseTestCase;
|
|
|
|
@ -21,19 +22,25 @@ public class NewSyncTestCase extends DatabaseTestCase {
|
|
|
|
|
protected
|
|
|
|
|
TagOutstandingDao tagOutstandingDao;
|
|
|
|
|
|
|
|
|
|
protected Task createTask(String title) {
|
|
|
|
|
protected Task createTask(String title, boolean suppress) {
|
|
|
|
|
Task task = new Task();
|
|
|
|
|
task.setValue(Task.TITLE, title);
|
|
|
|
|
|
|
|
|
|
if (suppress)
|
|
|
|
|
task.putTransitory(SyncFlags.ACTFM_SUPPRESS_OUTSTANDING_ENTRIES, true);
|
|
|
|
|
taskDao.createNew(task);
|
|
|
|
|
return task;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
protected Task createTask() {
|
|
|
|
|
return createTask("new title");
|
|
|
|
|
return createTask(false);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
protected TagData createTagData(String name) {
|
|
|
|
|
protected Task createTask(boolean suppress) {
|
|
|
|
|
return createTask("new title", suppress);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
protected TagData createTagData(String name, boolean suppress) {
|
|
|
|
|
TagData tag = new TagData();
|
|
|
|
|
tag.setValue(TagData.NAME, name);
|
|
|
|
|
|
|
|
|
@ -42,6 +49,10 @@ public class NewSyncTestCase extends DatabaseTestCase {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
protected TagData createTagData() {
|
|
|
|
|
return createTagData("new tag");
|
|
|
|
|
return createTagData(false);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
protected TagData createTagData(boolean suppress) {
|
|
|
|
|
return createTagData("new tag", suppress);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|