Search in sources :

Example 1 with FileDirectoryPreferences

use of org.jabref.model.metadata.FileDirectoryPreferences in project jabref by JabRef.

the class CleanupWorkerTest method setUp.

@Before
public void setUp() throws IOException {
    pdfFolder = bibFolder.newFolder();
    MetaData metaData = new MetaData();
    metaData.setDefaultFileDirectory(pdfFolder.getAbsolutePath());
    BibDatabaseContext context = new BibDatabaseContext(new BibDatabase(), metaData, new Defaults());
    context.setDatabaseFile(bibFolder.newFile("test.bib"));
    FileDirectoryPreferences fileDirPrefs = mock(FileDirectoryPreferences.class);
    //Biblocation as Primary overwrites all other dirs
    when(fileDirPrefs.isBibLocationAsPrimary()).thenReturn(true);
    worker = new CleanupWorker(context, new CleanupPreferences("\\bibtexkey", //empty fileDirPattern for backwards compatibility
    "", mock(LayoutFormatterPreferences.class), fileDirPrefs));
}
Also used : FileDirectoryPreferences(org.jabref.model.metadata.FileDirectoryPreferences) LayoutFormatterPreferences(org.jabref.logic.layout.LayoutFormatterPreferences) Defaults(org.jabref.model.Defaults) MetaData(org.jabref.model.metadata.MetaData) BibDatabaseContext(org.jabref.model.database.BibDatabaseContext) BibDatabase(org.jabref.model.database.BibDatabase) Before(org.junit.Before)

Aggregations

LayoutFormatterPreferences (org.jabref.logic.layout.LayoutFormatterPreferences)1 Defaults (org.jabref.model.Defaults)1 BibDatabase (org.jabref.model.database.BibDatabase)1 BibDatabaseContext (org.jabref.model.database.BibDatabaseContext)1 FileDirectoryPreferences (org.jabref.model.metadata.FileDirectoryPreferences)1 MetaData (org.jabref.model.metadata.MetaData)1 Before (org.junit.Before)1