use of org.exbin.utils.binary_data.EditableBinaryData in project deltahex-java by exbin.
the class ExtendedCodeAreaTest method testCopyPasteAtTheEnd.
@Test
public void testCopyPasteAtTheEnd() {
CodeArea codeArea = new CodeArea();
EditableBinaryData sampleData = getSampleData(SAMPLE_ALLBYTES);
codeArea.setData(sampleData);
long dataSize = sampleData.getDataSize();
codeArea.selectAll();
codeArea.copy();
codeArea.clearSelection();
((CaretCapable) codeArea.getWorker()).getCaret().setCaretPosition(dataSize / 2);
codeArea.paste();
Assert.assertTrue(codeArea.getDataSize() == (dataSize / 2 + dataSize));
}
use of org.exbin.utils.binary_data.EditableBinaryData in project deltahex-java by exbin.
the class ExtendedCodeAreaTest method testCopyPasteInOverwriteMode.
@Test
public void testCopyPasteInOverwriteMode() {
CodeArea codeArea = new CodeArea();
EditableBinaryData sampleData = getSampleData(SAMPLE_ALLBYTES);
codeArea.setData(sampleData);
long dataSize = sampleData.getDataSize();
codeArea.selectAll();
codeArea.copy();
codeArea.clearSelection();
codeArea.paste();
Assert.assertTrue(codeArea.getDataSize() == dataSize);
}
Aggregations