Skip to content

Commit

Permalink
Duplcite test files (to have them in the "right" folder)
Browse files Browse the repository at this point in the history
  • Loading branch information
koppor committed Aug 18, 2024
1 parent 2566f6f commit 83d08f0
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
import org.jabref.logic.importer.Importer;
import org.jabref.logic.importer.ParserResult;
import org.jabref.logic.importer.fileformat.BibtexImporter;
import org.jabref.logic.importer.fileformat.BibtexImporterTest;
import org.jabref.logic.importer.fileformat.BibtexParser;
import org.jabref.logic.util.OS;
import org.jabref.model.database.BibDatabase;
Expand Down Expand Up @@ -462,7 +461,7 @@ void roundtripUtf8EncodingHeaderRemoved() throws Exception {

@Test
void roundtripWin1252HeaderKept(@TempDir Path bibFolder) throws Exception {
Path testFile = Path.of(BibtexImporterTest.class.getResource("encoding-windows-1252-with-header.bib").toURI());
Path testFile = Path.of(BibtexDatabaseWriterTest.class.getResource("encoding-windows-1252-with-header.bib").toURI());
ParserResult result = new BibtexImporter(importFormatPreferences, new DummyFileUpdateMonitor()).importDatabase(testFile);
BibDatabaseContext context = new BibDatabaseContext(result.getDatabase(), result.getMetaData());

Expand All @@ -486,7 +485,7 @@ void roundtripWin1252HeaderKept(@TempDir Path bibFolder) throws Exception {

@Test
void roundtripUtf8HeaderKept(@TempDir Path bibFolder) throws Exception {
Path testFile = Path.of(BibtexImporterTest.class.getResource("encoding-utf-8-with-header-with-databasetypecomment.bib").toURI());
Path testFile = Path.of(BibtexDatabaseWriterTest.class.getResource("encoding-utf-8-with-header-with-databasetypecomment.bib").toURI());
ParserResult result = new BibtexImporter(importFormatPreferences, new DummyFileUpdateMonitor()).importDatabase(testFile);
BibDatabaseContext context = new BibDatabaseContext(result.getDatabase(), result.getMetaData());

Expand All @@ -510,7 +509,7 @@ void roundtripUtf8HeaderKept(@TempDir Path bibFolder) throws Exception {

@Test
void roundtripNotExplicitUtf8HeaderNotInsertedDuringWrite(@TempDir Path bibFolder) throws Exception {
Path testFile = Path.of(BibtexImporterTest.class.getResource("encoding-utf-8-without-header-with-databasetypecomment.bib").toURI());
Path testFile = Path.of(BibtexDatabaseWriterTest.class.getResource("encoding-utf-8-without-header-with-databasetypecomment.bib").toURI());
ParserResult result = new BibtexImporter(importFormatPreferences, new DummyFileUpdateMonitor()).importDatabase(testFile);
BibDatabaseContext context = new BibDatabaseContext(result.getDatabase(), result.getMetaData());

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
import org.jabref.logic.importer.ImportFormatPreferences;
import org.jabref.logic.importer.ParseException;
import org.jabref.logic.importer.fetcher.GrobidPreferences;
import org.jabref.logic.importer.fileformat.PdfGrobidImporterTest;
import org.jabref.model.entry.BibEntry;
import org.jabref.model.entry.field.StandardField;
import org.jabref.model.entry.types.StandardEntryType;
Expand Down Expand Up @@ -93,7 +92,7 @@ void failsWhenGrobidDisabled() {

@Test
void processPdfTest() throws IOException, ParseException, URISyntaxException {
Path file = Path.of(PdfGrobidImporterTest.class.getResource("LNCS-minimal.pdf").toURI());
Path file = Path.of(GrobidServiceTest.class.getResource("LNCS-minimal.pdf").toURI());
List<BibEntry> response = grobidService.processPDF(file, importFormatPreferences);
assertEquals(1, response.size());
BibEntry be0 = response.getFirst();
Expand All @@ -115,7 +114,7 @@ void extractsReferencesFromPdf() throws IOException, ParseException, URISyntaxEx
.withField(StandardField.VOLUME, "8274")
.withField(StandardField.YEAR, "2013");

Path file = Path.of(Objects.requireNonNull(PdfGrobidImporterTest.class.getResource("LNCS-minimal.pdf")).toURI());
Path file = Path.of(Objects.requireNonNull(GrobidServiceTest.class.getResource("LNCS-minimal.pdf")).toURI());
List<BibEntry> extractedReferences = grobidService.processReferences(file, importFormatPreferences);
assertEquals(List.of(ref1), extractedReferences);
}
Expand Down
3 changes: 1 addition & 2 deletions src/test/java/org/jabref/logic/xmp/XmpUtilWriterTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import java.nio.file.Path;
import java.util.List;

import org.jabref.logic.exporter.XmpExporterTest;
import org.jabref.model.entry.BibEntry;
import org.jabref.model.entry.Date;
import org.jabref.model.entry.Month;
Expand All @@ -25,7 +24,7 @@
import static org.mockito.Mockito.when;

/**
* This tests the writing to a PDF. If the creation of the RDF content should be checked, please head to {@link XmpExporterTest}
* This tests the writing to a PDF. If the creation of the RDF content should be checked, please head to {@link org.jabref.logic.exporter.XmpExporterTest}
*/
class XmpUtilWriterTest {

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
% Encoding: UTF-8
@article{,
title = {Ü ist ein Umlaut},
}

@Comment{jabref-meta: databaseType:bibtex;}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
@article{,
title = {Ü ist ein Umlaut},
}

@Comment{jabref-meta: databaseType:bibtex;}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
% Encoding: windows-1252
@Article{,
abstract = {25° C},
}

@Comment{jabref-meta: databaseType:bibtex;}

0 comments on commit 83d08f0

Please sign in to comment.