use of org.jabref.logic.importer.ParserResult in project jabref by JabRef.
the class MrDLibImporterTest method testImportDatabaseIsTitleSetCorrectly.
@Test
public void testImportDatabaseIsTitleSetCorrectly() throws IOException {
ParserResult parserResult = importer.importDatabase(inputMax);
List<BibEntry> resultList = parserResult.getDatabase().getEntries();
assertEquals("Gesundheit von Arbeitslosen fördern!: ein Handbuch für Wissenschaft und Praxis", resultList.get(0).getLatexFreeField(FieldName.TITLE).get());
}
use of org.jabref.logic.importer.ParserResult in project jabref by JabRef.
the class MrDLibImporterTest method testImportDatabaseIsYearSetCorrectly.
@Test
public void testImportDatabaseIsYearSetCorrectly() throws IOException {
ParserResult parserResult = importer.importDatabase(inputMax);
List<BibEntry> resultList = parserResult.getDatabase().getEntries();
assertEquals("2009", resultList.get(0).getLatexFreeField(FieldName.YEAR).get());
}
use of org.jabref.logic.importer.ParserResult in project jabref by JabRef.
the class PdfXmpImporterTest method importEncryptedFileReturnsError.
@Test
public void importEncryptedFileReturnsError() throws URISyntaxException {
Path file = Paths.get(PdfXmpImporterTest.class.getResource("/pdfs/encrypted.pdf").toURI());
ParserResult result = importer.importDatabase(file, StandardCharsets.UTF_8);
Assert.assertTrue(result.hasWarnings());
}
use of org.jabref.logic.importer.ParserResult in project jabref by JabRef.
the class ConvertLegacyExplicitGroupsTest method generateParserResult.
private ParserResult generateParserResult(GroupTreeNode groupRoot) {
ParserResult parserResult = new ParserResult(Collections.singletonList(entry));
parserResult.getMetaData().setGroups(groupRoot);
return parserResult;
}
use of org.jabref.logic.importer.ParserResult in project jabref by JabRef.
the class ConvertLegacyExplicitGroupsTest method performActionClearsLegacyKeys.
@Test
public void performActionClearsLegacyKeys() throws Exception {
ParserResult parserResult = generateParserResult(GroupTreeNode.fromGroup(group));
action.performAction(parserResult);
assertEquals(Collections.emptyList(), group.getLegacyEntryKeys());
}
Aggregations