use of org.jabref.gui.exporter.RtfTransferable in project jabref by JabRef.
the class CitationStyleToClipboardWorkerTest method processRtf.
@Test
public void processRtf() throws Exception {
String expected = "{\\rtf" + OS.NEWLINE + "[1]\\tab B. Smith, B. Jones, and J. Williams, \\uc0\\u8220{}Title of the test entry,\\uc0\\u8221{} {\\i{}BibTeX Journal}, vol. 34, no. 3, pp. 45\\uc0\\u8211{}67, Jul. 2016." + OS.NEWLINE + "\\line" + OS.NEWLINE + "[1]\\tab B. Smith, B. Jones, and J. Williams, \\uc0\\u8220{}Title of the test entry,\\uc0\\u8221{} {\\i{}BibTeX Journal}, vol. 34, no. 3, pp. 45\\uc0\\u8211{}67, Jul. 2016." + OS.NEWLINE + "}";
String citation = "[1]\\tab B. Smith, B. Jones, and J. Williams, \\uc0\\u8220{}Title of the test entry,\\uc0\\u8221{} {\\i{}BibTeX Journal}, vol. 34, no. 3, pp. 45\\uc0\\u8211{}67, Jul. 2016." + OS.NEWLINE;
RtfTransferable rtfTransferable = CitationStyleToClipboardWorker.processRtf(Arrays.asList(citation, citation));
Object actual = rtfTransferable.getTransferData(DataFlavor.stringFlavor);
Assert.assertEquals(expected, actual);
}
Aggregations