|
|
@ -4,10 +4,10 @@ import androidx.test.runner.AndroidJUnit4;
|
|
|
|
import com.todoroo.astrid.dao.TaskDao;
|
|
|
|
import com.todoroo.astrid.dao.TaskDao;
|
|
|
|
import com.todoroo.astrid.data.Task;
|
|
|
|
import com.todoroo.astrid.data.Task;
|
|
|
|
import javax.inject.Inject;
|
|
|
|
import javax.inject.Inject;
|
|
|
|
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.data.TaskListMetadata;
|
|
|
|
import org.tasks.data.TaskListMetadata;
|
|
|
|
|
|
|
|
import org.tasks.injection.TestComponent;
|
|
|
|
|
|
|
|
|
|
|
|
@RunWith(AndroidJUnit4.class)
|
|
|
|
@RunWith(AndroidJUnit4.class)
|
|
|
|
public class SubtasksMovingTest extends SubtasksTestCase {
|
|
|
|
public class SubtasksMovingTest extends SubtasksTestCase {
|
|
|
@ -16,8 +16,8 @@ public class SubtasksMovingTest extends SubtasksTestCase {
|
|
|
|
|
|
|
|
|
|
|
|
private Task A, B, C, D, E, F;
|
|
|
|
private Task A, B, C, D, E, F;
|
|
|
|
|
|
|
|
|
|
|
|
// @Override
|
|
|
|
@Override
|
|
|
|
protected void disabled_setUp() {
|
|
|
|
public void setUp() {
|
|
|
|
super.setUp();
|
|
|
|
super.setUp();
|
|
|
|
createTasks();
|
|
|
|
createTasks();
|
|
|
|
TaskListMetadata m = new TaskListMetadata();
|
|
|
|
TaskListMetadata m = new TaskListMetadata();
|
|
|
@ -34,6 +34,11 @@ public class SubtasksMovingTest extends SubtasksTestCase {
|
|
|
|
expectParentAndPosition(F, null, 2);
|
|
|
|
expectParentAndPosition(F, null, 2);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
|
|
|
protected void inject(TestComponent component) {
|
|
|
|
|
|
|
|
component.inject(this);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private void createTasks() {
|
|
|
|
private void createTasks() {
|
|
|
|
A = createTask("A");
|
|
|
|
A = createTask("A");
|
|
|
|
B = createTask("B");
|
|
|
|
B = createTask("B");
|
|
|
@ -65,7 +70,6 @@ public class SubtasksMovingTest extends SubtasksTestCase {
|
|
|
|
* F
|
|
|
|
* F
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
@Ignore
|
|
|
|
|
|
|
|
@Test
|
|
|
|
@Test
|
|
|
|
public void testMoveBeforeIntoSelf() { // Should have no effect
|
|
|
|
public void testMoveBeforeIntoSelf() { // Should have no effect
|
|
|
|
whenTriggerMoveBefore(A, B);
|
|
|
|
whenTriggerMoveBefore(A, B);
|
|
|
@ -78,7 +82,6 @@ public class SubtasksMovingTest extends SubtasksTestCase {
|
|
|
|
expectParentAndPosition(F, null, 2);
|
|
|
|
expectParentAndPosition(F, null, 2);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Ignore
|
|
|
|
|
|
|
|
@Test
|
|
|
|
@Test
|
|
|
|
public void testMoveIntoDescendant() { // Should have no effect
|
|
|
|
public void testMoveIntoDescendant() { // Should have no effect
|
|
|
|
whenTriggerMoveBefore(A, C);
|
|
|
|
whenTriggerMoveBefore(A, C);
|
|
|
@ -91,7 +94,6 @@ public class SubtasksMovingTest extends SubtasksTestCase {
|
|
|
|
expectParentAndPosition(F, null, 2);
|
|
|
|
expectParentAndPosition(F, null, 2);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Ignore
|
|
|
|
|
|
|
|
@Test
|
|
|
|
@Test
|
|
|
|
public void testMoveToEndOfChildren() { // Should have no effect
|
|
|
|
public void testMoveToEndOfChildren() { // Should have no effect
|
|
|
|
whenTriggerMoveBefore(A, E);
|
|
|
|
whenTriggerMoveBefore(A, E);
|
|
|
@ -104,7 +106,6 @@ public class SubtasksMovingTest extends SubtasksTestCase {
|
|
|
|
expectParentAndPosition(F, null, 2);
|
|
|
|
expectParentAndPosition(F, null, 2);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Ignore
|
|
|
|
|
|
|
|
@Test
|
|
|
|
@Test
|
|
|
|
public void testStandardMove() {
|
|
|
|
public void testStandardMove() {
|
|
|
|
whenTriggerMoveBefore(A, F);
|
|
|
|
whenTriggerMoveBefore(A, F);
|
|
|
@ -117,7 +118,6 @@ public class SubtasksMovingTest extends SubtasksTestCase {
|
|
|
|
expectParentAndPosition(F, null, 2);
|
|
|
|
expectParentAndPosition(F, null, 2);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Ignore
|
|
|
|
|
|
|
|
@Test
|
|
|
|
@Test
|
|
|
|
public void testMoveToEndOfList() {
|
|
|
|
public void testMoveToEndOfList() {
|
|
|
|
whenTriggerMoveBefore(A, null);
|
|
|
|
whenTriggerMoveBefore(A, null);
|
|
|
|