use of org.eclipse.egit.core.internal.rebase.RebaseInteractivePlan.PlanElement in project egit by eclipse.
the class RebaseInteractivePlanTest method moveDownTestThreeElementsWithOneComment.
@Test
public void moveDownTestThreeElementsWithOneComment() throws Exception {
PlanElement element1 = createPlanElement(false);
PlanElement element2 = createPlanElement(true);
PlanElement element3 = createPlanElement(false);
toDoElements.add(element1);
toDoElements.add(element2);
toDoElements.add(element3);
moveHelper.moveTodoEntryDown(element1);
assertEquals(element2, toDoElements.get(0));
assertEquals(element3, toDoElements.get(1));
assertEquals(element1, toDoElements.get(2));
}
use of org.eclipse.egit.core.internal.rebase.RebaseInteractivePlan.PlanElement in project egit by eclipse.
the class RebaseInteractivePlanTest method moveUpTestOneElement.
@Test
public void moveUpTestOneElement() throws Exception {
PlanElement element1 = createPlanElement(false);
toDoElements.add(element1);
moveHelper.moveTodoEntryUp(element1);
assertEquals(element1, toDoElements.get(0));
}
use of org.eclipse.egit.core.internal.rebase.RebaseInteractivePlan.PlanElement in project egit by eclipse.
the class RebaseInteractivePlanTest method setUp.
@Override
@Before
public void setUp() throws Exception {
super.setUp();
gitDir = new File(project.getProject().getLocationURI().getPath(), Constants.DOT_GIT);
testRepository = new TestRepository(gitDir);
testRepository.connect(project.getProject());
plan = RebaseInteractivePlan.getPlan(testRepository.getRepository());
toDoElements = new ArrayList<PlanElement>();
moveHelper = new RebaseInteractivePlan.MoveHelper(toDoElements, plan);
}
use of org.eclipse.egit.core.internal.rebase.RebaseInteractivePlan.PlanElement in project egit by eclipse.
the class RebaseInteractivePlanTest method moveDownTestTwoElements.
@Test
public void moveDownTestTwoElements() throws Exception {
PlanElement element1 = createPlanElement(false);
PlanElement element2 = createPlanElement(false);
toDoElements.add(element1);
toDoElements.add(element2);
moveHelper.moveTodoEntryDown(element1);
assertEquals(element2, toDoElements.get(0));
assertEquals(element1, toDoElements.get(1));
moveHelper.moveTodoEntryDown(element1);
assertEquals(element2, toDoElements.get(0));
assertEquals(element1, toDoElements.get(1));
moveHelper.moveTodoEntryDown(element2);
assertEquals(element1, toDoElements.get(0));
assertEquals(element2, toDoElements.get(1));
}
use of org.eclipse.egit.core.internal.rebase.RebaseInteractivePlan.PlanElement in project egit by eclipse.
the class RebaseInteractivePlanTest method moveUpTestThreeElementsWithOneComment.
@Test
public void moveUpTestThreeElementsWithOneComment() throws Exception {
PlanElement element1 = createPlanElement(false);
PlanElement element2 = createPlanElement(true);
PlanElement element3 = createPlanElement(false);
toDoElements.add(element1);
toDoElements.add(element2);
toDoElements.add(element3);
moveHelper.moveTodoEntryUp(element3);
assertEquals(element3, toDoElements.get(0));
assertEquals(element1, toDoElements.get(1));
assertEquals(element2, toDoElements.get(2));
}
Aggregations