use of org.jabref.model.database.BibDatabase in project jabref by JabRef.
the class OOBibStyleTest method testInstitutionAuthorMarker.
@Test
public void testInstitutionAuthorMarker() throws IOException {
OOBibStyle style = new OOBibStyle(StyleLoader.DEFAULT_NUMERICAL_STYLE_PATH, layoutFormatterPreferences);
Map<BibEntry, BibDatabase> entryDBMap = new HashMap<>();
List<BibEntry> entries = new ArrayList<>();
BibDatabase database = new BibDatabase();
BibEntry entry = new BibEntry();
entry.setType("article");
entry.setField("author", "{JabRef Development Team}");
entry.setField("title", "JabRef Manual");
entry.setField("year", "2016");
database.insertEntry(entry);
entries.add(entry);
entryDBMap.put(entry, database);
assertEquals("[JabRef Development Team, 2016]", style.getCitationMarker(entries, entryDBMap, true, null, null));
}
use of org.jabref.model.database.BibDatabase in project jabref by JabRef.
the class RegExpBasedFileFinderTests method setUp.
@Before
public void setUp() {
entry = new BibEntry();
entry.setType(BibtexEntryTypes.ARTICLE);
entry.setCiteKey("HipKro03");
entry.setField("author", "Eric von Hippel and Georg von Krogh");
entry.setField("title", "Open Source Software and the \"Private-Collective\" Innovation Model: Issues for Organization Science");
entry.setField("journal", "Organization Science");
entry.setField("year", "2003");
entry.setField("volume", "14");
entry.setField("pages", "209--223");
entry.setField("number", "2");
entry.setField("address", "Institute for Operations Research and the Management Sciences (INFORMS), Linthicum, Maryland, USA");
entry.setField("doi", "http://dx.doi.org/10.1287/orsc.14.2.209.14992");
entry.setField("issn", "1526-5455");
entry.setField("publisher", "INFORMS");
database = new BibDatabase();
database.insertEntry(entry);
}
use of org.jabref.model.database.BibDatabase in project jabref by JabRef.
the class BibDatabaseContextTest method testTypeBasedOnInferredModeBiblatex.
@Test
public void testTypeBasedOnInferredModeBiblatex() {
BibDatabase db = new BibDatabase();
BibEntry e1 = new BibEntry("electronic");
db.insertEntry(e1);
BibDatabaseContext bibDatabaseContext = new BibDatabaseContext(db);
assertEquals(BibDatabaseMode.BIBLATEX, bibDatabaseContext.getMode());
}
use of org.jabref.model.database.BibDatabase in project jabref by JabRef.
the class BibDatabaseContextTest method testTypeBasedOnInferredModeBibTeX.
@Test
public void testTypeBasedOnInferredModeBibTeX() {
BibDatabase db = new BibDatabase();
BibEntry e1 = new BibEntry();
db.insertEntry(e1);
BibDatabaseContext bibDatabaseContext = new BibDatabaseContext(db);
assertEquals(BibDatabaseMode.BIBTEX, bibDatabaseContext.getMode());
}
use of org.jabref.model.database.BibDatabase in project jabref by JabRef.
the class BibDatabaseContextTest method testTypeBasedOnDefaultBiblatex.
@Test
public void testTypeBasedOnDefaultBiblatex() {
BibDatabaseContext bibDatabaseContext = new BibDatabaseContext(new BibDatabase(), new MetaData(), new Defaults(BibDatabaseMode.BIBLATEX));
assertEquals(BibDatabaseMode.BIBLATEX, bibDatabaseContext.getMode());
bibDatabaseContext.setMode(BibDatabaseMode.BIBTEX);
assertEquals(BibDatabaseMode.BIBTEX, bibDatabaseContext.getMode());
}
Aggregations