Search in sources :

Example 1 with BibtexImporter

use of org.jabref.logic.importer.fileformat.BibtexImporter in project jabref by JabRef.

the class BibTeXMLExporterTestFiles method setUp.

@Before
public void setUp() throws Exception {
    resourceDir = Paths.get(BibTeXMLExporterTestFiles.class.getResource("").toURI());
    databaseContext = new BibDatabaseContext();
    charset = StandardCharsets.UTF_8;
    bibtexmlExportFormat = new BibTeXMLExportFormat();
    tempFile = testFolder.newFile();
    testImporter = new BibtexImporter(mock(ImportFormatPreferences.class, Answers.RETURNS_DEEP_STUBS));
}
Also used : BibtexImporter(org.jabref.logic.importer.fileformat.BibtexImporter) BibDatabaseContext(org.jabref.model.database.BibDatabaseContext) Before(org.junit.Before)

Example 2 with BibtexImporter

use of org.jabref.logic.importer.fileformat.BibtexImporter in project jabref by JabRef.

the class ImporterTest method instancesToTest.

@Parameters(name = "{index}: {0}")
public static Collection<Object[]> instancesToTest() {
    // all classes implementing {@link Importer}
    // sorted alphabetically
    ImportFormatPreferences importFormatPreferences = mock(ImportFormatPreferences.class);
    XMPPreferences xmpPreferences = mock(XMPPreferences.class);
    // @formatter:off
    return Arrays.asList(new Object[] { new BiblioscapeImporter() }, new Object[] { new BibtexImporter(importFormatPreferences) }, new Object[] { new BibTeXMLImporter() }, new Object[] { new CopacImporter() }, new Object[] { new EndnoteImporter(importFormatPreferences) }, new Object[] { new FreeCiteImporter(importFormatPreferences) }, new Object[] { new InspecImporter() }, new Object[] { new IsiImporter() }, new Object[] { new MedlineImporter() }, new Object[] { new MedlinePlainImporter() }, new Object[] { new ModsImporter() }, new Object[] { new MsBibImporter() }, new Object[] { new OvidImporter() }, new Object[] { new PdfContentImporter(importFormatPreferences) }, new Object[] { new PdfXmpImporter(xmpPreferences) }, new Object[] { new RepecNepImporter(importFormatPreferences) }, new Object[] { new RisImporter() }, new Object[] { new SilverPlatterImporter() });
// @formatter:on
}
Also used : BiblioscapeImporter(org.jabref.logic.importer.fileformat.BiblioscapeImporter) IsiImporter(org.jabref.logic.importer.fileformat.IsiImporter) RisImporter(org.jabref.logic.importer.fileformat.RisImporter) MsBibImporter(org.jabref.logic.importer.fileformat.MsBibImporter) RepecNepImporter(org.jabref.logic.importer.fileformat.RepecNepImporter) EndnoteImporter(org.jabref.logic.importer.fileformat.EndnoteImporter) SilverPlatterImporter(org.jabref.logic.importer.fileformat.SilverPlatterImporter) CopacImporter(org.jabref.logic.importer.fileformat.CopacImporter) ModsImporter(org.jabref.logic.importer.fileformat.ModsImporter) OvidImporter(org.jabref.logic.importer.fileformat.OvidImporter) PdfContentImporter(org.jabref.logic.importer.fileformat.PdfContentImporter) XMPPreferences(org.jabref.logic.xmp.XMPPreferences) MedlinePlainImporter(org.jabref.logic.importer.fileformat.MedlinePlainImporter) BibTeXMLImporter(org.jabref.logic.importer.fileformat.BibTeXMLImporter) InspecImporter(org.jabref.logic.importer.fileformat.InspecImporter) BibtexImporter(org.jabref.logic.importer.fileformat.BibtexImporter) MedlineImporter(org.jabref.logic.importer.fileformat.MedlineImporter) PdfXmpImporter(org.jabref.logic.importer.fileformat.PdfXmpImporter) FreeCiteImporter(org.jabref.logic.importer.fileformat.FreeCiteImporter) Parameters(org.junit.runners.Parameterized.Parameters)

Example 3 with BibtexImporter

use of org.jabref.logic.importer.fileformat.BibtexImporter in project jabref by JabRef.

the class MSBibExportFormatTestFiles method setUp.

@Before
public void setUp() throws Exception {
    resourceDir = Paths.get(MSBibExportFormatTestFiles.class.getResource("").toURI());
    databaseContext = new BibDatabaseContext();
    charset = StandardCharsets.UTF_8;
    msBibExportFormat = new MSBibExportFormat();
    tempFile = testFolder.newFile();
    testImporter = new BibtexImporter(mock(ImportFormatPreferences.class, Answers.RETURNS_DEEP_STUBS));
}
Also used : BibtexImporter(org.jabref.logic.importer.fileformat.BibtexImporter) BibDatabaseContext(org.jabref.model.database.BibDatabaseContext) Before(org.junit.Before)

Example 4 with BibtexImporter

use of org.jabref.logic.importer.fileformat.BibtexImporter in project jabref by JabRef.

the class ModsExportFormatTest method setUp.

@Before
public void setUp() throws Exception {
    databaseContext = new BibDatabaseContext();
    charset = StandardCharsets.UTF_8;
    modsExportFormat = new ModsExportFormat();
    bibtexImporter = new BibtexImporter(mock(ImportFormatPreferences.class, Answers.RETURNS_DEEP_STUBS));
    tempFile = testFolder.newFile();
    importFile = Paths.get(ModsExportFormatTest.class.getResource("ModsExportFormatTestAllFields.bib").toURI());
}
Also used : BibtexImporter(org.jabref.logic.importer.fileformat.BibtexImporter) BibDatabaseContext(org.jabref.model.database.BibDatabaseContext) Before(org.junit.Before)

Example 5 with BibtexImporter

use of org.jabref.logic.importer.fileformat.BibtexImporter in project jabref by JabRef.

the class ModsExportFormatTestFiles method setUp.

@Before
public void setUp() throws Exception {
    databaseContext = new BibDatabaseContext();
    importFile = Paths.get(ModsExportFormatTestFiles.class.getResource(filename).toURI());
    charset = StandardCharsets.UTF_8;
    modsExportFormat = new ModsExportFormat();
    tempFile = testFolder.newFile();
    bibtexImporter = new BibtexImporter(mock(ImportFormatPreferences.class, Answers.RETURNS_DEEP_STUBS));
    modsImporter = new ModsImporter();
}
Also used : ModsImporter(org.jabref.logic.importer.fileformat.ModsImporter) BibtexImporter(org.jabref.logic.importer.fileformat.BibtexImporter) BibDatabaseContext(org.jabref.model.database.BibDatabaseContext) Before(org.junit.Before)

Aggregations

BibtexImporter (org.jabref.logic.importer.fileformat.BibtexImporter)7 BibDatabaseContext (org.jabref.model.database.BibDatabaseContext)4 Before (org.junit.Before)4 ModsImporter (org.jabref.logic.importer.fileformat.ModsImporter)3 BibTeXMLImporter (org.jabref.logic.importer.fileformat.BibTeXMLImporter)2 BiblioscapeImporter (org.jabref.logic.importer.fileformat.BiblioscapeImporter)2 CopacImporter (org.jabref.logic.importer.fileformat.CopacImporter)2 EndnoteImporter (org.jabref.logic.importer.fileformat.EndnoteImporter)2 FreeCiteImporter (org.jabref.logic.importer.fileformat.FreeCiteImporter)2 InspecImporter (org.jabref.logic.importer.fileformat.InspecImporter)2 IsiImporter (org.jabref.logic.importer.fileformat.IsiImporter)2 MedlineImporter (org.jabref.logic.importer.fileformat.MedlineImporter)2 MedlinePlainImporter (org.jabref.logic.importer.fileformat.MedlinePlainImporter)2 MsBibImporter (org.jabref.logic.importer.fileformat.MsBibImporter)2 OvidImporter (org.jabref.logic.importer.fileformat.OvidImporter)2 PdfContentImporter (org.jabref.logic.importer.fileformat.PdfContentImporter)2 PdfXmpImporter (org.jabref.logic.importer.fileformat.PdfXmpImporter)2 RepecNepImporter (org.jabref.logic.importer.fileformat.RepecNepImporter)2 RisImporter (org.jabref.logic.importer.fileformat.RisImporter)2 SilverPlatterImporter (org.jabref.logic.importer.fileformat.SilverPlatterImporter)2