use of org.eclipse.text.edits.CopySourceEdit in project eclipse.platform.text by eclipse.
the class TextEditTests method testCopyUp.
@Test
public void testCopyUp() throws Exception {
CopySourceEdit s1 = new CopySourceEdit(7, 2);
CopyTargetEdit t1 = new CopyTargetEdit(3, s1);
fRoot.addChild(s1);
fRoot.addChild(t1);
UndoEdit undo = fRoot.apply(fDocument);
assertEquals(s1, 9, 2);
assertEquals(t1, 3, 2);
String result = "012783456789";
Assert.assertEquals("Buffer content", result, fDocument.get());
doUndoRedo(undo, result);
}
Aggregations