|
|
@ -14,7 +14,6 @@ import com.todoroo.astrid.tags.TagService;
|
|
|
|
import com.todoroo.astrid.test.DatabaseTestCase;
|
|
|
|
import com.todoroo.astrid.test.DatabaseTestCase;
|
|
|
|
import com.todoroo.astrid.utility.TitleParser;
|
|
|
|
import com.todoroo.astrid.utility.TitleParser;
|
|
|
|
|
|
|
|
|
|
|
|
import org.junit.Ignore;
|
|
|
|
|
|
|
|
import org.junit.Test;
|
|
|
|
import org.junit.Test;
|
|
|
|
import org.junit.runner.RunWith;
|
|
|
|
import org.junit.runner.RunWith;
|
|
|
|
import org.tasks.R;
|
|
|
|
import org.tasks.R;
|
|
|
@ -185,7 +184,6 @@ public class TitleParserTest extends DatabaseTestCase {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// ----------------Days begin----------------//
|
|
|
|
// ----------------Days begin----------------//
|
|
|
|
@Ignore
|
|
|
|
|
|
|
|
@Test
|
|
|
|
@Test
|
|
|
|
public void testDays() {
|
|
|
|
public void testDays() {
|
|
|
|
Calendar today = Calendar.getInstance();
|
|
|
|
Calendar today = Calendar.getInstance();
|
|
|
@ -195,7 +193,7 @@ public class TitleParserTest extends DatabaseTestCase {
|
|
|
|
task.setTitle(title);
|
|
|
|
task.setTitle(title);
|
|
|
|
taskService.createWithValues(task, null, title);
|
|
|
|
taskService.createWithValues(task, null, title);
|
|
|
|
DateTime date = newDateTime(task.getDueDate());
|
|
|
|
DateTime date = newDateTime(task.getDueDate());
|
|
|
|
assertEquals(date.getDayOfMonth(), today.get(Calendar.DAY_OF_WEEK));
|
|
|
|
assertEquals(date.getDayOfWeek(), today.get(Calendar.DAY_OF_WEEK));
|
|
|
|
//Calendar starts 1-6, date.getDay() starts at 0
|
|
|
|
//Calendar starts 1-6, date.getDay() starts at 0
|
|
|
|
|
|
|
|
|
|
|
|
task = new Task();
|
|
|
|
task = new Task();
|
|
|
@ -230,14 +228,14 @@ public class TitleParserTest extends DatabaseTestCase {
|
|
|
|
task.setTitle(title);
|
|
|
|
task.setTitle(title);
|
|
|
|
taskService.createWithValues(task, null, title);
|
|
|
|
taskService.createWithValues(task, null, title);
|
|
|
|
date = newDateTime(task.getDueDate());
|
|
|
|
date = newDateTime(task.getDueDate());
|
|
|
|
assertEquals(date.getDayOfWeek(), i);
|
|
|
|
assertEquals(date.getDayOfWeek(), i + 1);
|
|
|
|
|
|
|
|
|
|
|
|
task = new Task();
|
|
|
|
task = new Task();
|
|
|
|
title = "Jog "+ abrevDays[i];
|
|
|
|
title = "Jog "+ abrevDays[i];
|
|
|
|
task.setTitle(title);
|
|
|
|
task.setTitle(title);
|
|
|
|
taskService.createWithValues(task, null, title);
|
|
|
|
taskService.createWithValues(task, null, title);
|
|
|
|
date = newDateTime(task.getDueDate());
|
|
|
|
date = newDateTime(task.getDueDate());
|
|
|
|
assertEquals(date.getDayOfWeek(), i);
|
|
|
|
assertEquals(date.getDayOfWeek(), i + 1);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|