use of org.jabref.logic.bibtex.FieldContentParserPreferences in project jabref by JabRef.
the class XMPSchemaBibtexTest method testSetBibtexEntry.
@Test
public void testSetBibtexEntry() throws IOException {
when(prefs.getFieldContentParserPreferences()).thenReturn(new FieldContentParserPreferences());
XMPMetadata xmp = new XMPMetadata();
XMPSchemaBibtex bibtex = new XMPSchemaBibtex(xmp);
BibEntry e = BibtexTestData.getBibtexEntry(prefs);
bibtex.setBibtexEntry(e, null);
BibEntry e2 = bibtex.getBibtexEntry();
assertEqualsBibtexEntry(e, e2);
}
use of org.jabref.logic.bibtex.FieldContentParserPreferences in project jabref by JabRef.
the class CiteKeyBasedFileFinderTest method setUp.
@Before
public void setUp() throws IOException {
when(prefs.getFieldContentParserPreferences()).thenReturn(new FieldContentParserPreferences());
BibDatabase database = BibtexTestData.getBibtexDatabase(prefs);
entry = database.getEntries().iterator().next();
rootDir = temporaryFolder.getRoot().toPath();
Path subDir = Files.createDirectory(rootDir.resolve("Organization Science"));
Path pdfSubDir = Files.createDirectory(rootDir.resolve("pdfs"));
Files.createFile(subDir.resolve("HipKro03 - Hello.pdf"));
Files.createFile(rootDir.resolve("HipKro03 - Hello.pdf"));
Path pdfSubSubDir = Files.createDirectory(pdfSubDir.resolve("sub"));
Files.createFile(pdfSubSubDir.resolve("HipKro03-sub.pdf"));
Files.createDirectory(rootDir.resolve("2002"));
Path dir2003 = Files.createDirectory(rootDir.resolve("2003"));
Files.createFile(dir2003.resolve("Paper by HipKro03.pdf"));
Path dirTest = Files.createDirectory(rootDir.resolve("test"));
Files.createFile(dirTest.resolve(".TEST"));
Files.createFile(dirTest.resolve("TEST["));
Files.createFile(dirTest.resolve("TE.ST"));
Files.createFile(dirTest.resolve("foo.dat"));
Path graphicsDir = Files.createDirectory(rootDir.resolve("graphicsDir"));
Path graphicsSubDir = Files.createDirectories(graphicsDir.resolve("subDir"));
Files.createFile(graphicsSubDir.resolve("HipKro03test.jpg"));
Files.createFile(graphicsSubDir.resolve("HipKro03test.png"));
}
Aggregations