From 63118b1017dcf1fb402b5c5aaea6abf523b51670 Mon Sep 17 00:00:00 2001 From: Siedlerchr Date: Mon, 25 Nov 2024 21:53:09 +0100 Subject: [PATCH] temp dir --- .../exporter/MarkdownTitleExporterTest.java | 34 +++++++++---------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/src/test/java/org/jabref/logic/exporter/MarkdownTitleExporterTest.java b/src/test/java/org/jabref/logic/exporter/MarkdownTitleExporterTest.java index 81d6e028d6f..19ae753ef15 100644 --- a/src/test/java/org/jabref/logic/exporter/MarkdownTitleExporterTest.java +++ b/src/test/java/org/jabref/logic/exporter/MarkdownTitleExporterTest.java @@ -44,15 +44,15 @@ static void setUp() { } @Test - final void exportForNoEntriesWritesNothing(@TempDir Path tempFile) throws Exception { - Path file = tempFile.resolve("ThisIsARandomlyNamedFile"); + final void exportForNoEntriesWritesNothing(@TempDir Path tempDir) throws Exception { + Path file = tempDir.resolve("ThisIsARandomlyNamedFile"); Files.createFile(file); - htmlWebsiteExporter.export(databaseContext, tempFile, Collections.emptyList()); + htmlWebsiteExporter.export(databaseContext, tempDir, Collections.emptyList()); assertEquals(Collections.emptyList(), Files.readAllLines(file)); } @Test - final void exportsCorrectContentArticle(@TempDir Path tempFile) throws Exception { + final void exportsCorrectContentArticle(@TempDir Path tempDir) throws Exception { BibEntry entry = new BibEntry(StandardEntryType.Article) .withCitationKey("test") .withField(StandardField.AUTHOR, "Test Author") @@ -61,7 +61,7 @@ final void exportsCorrectContentArticle(@TempDir Path tempFile) throws Exception .withField(StandardField.PUBLISHER, "THE PRESS") .withField(StandardField.YEAR, "2020"); - Path file = tempFile.resolve("RandomFileName"); + Path file = tempDir.resolve("RandomFileName"); Files.createFile(file); htmlWebsiteExporter.export(databaseContext, file, Collections.singletonList(entry)); @@ -72,7 +72,7 @@ final void exportsCorrectContentArticle(@TempDir Path tempFile) throws Exception } @Test - final void exportsCorrectContentInCollection(@TempDir Path tempFile) throws Exception { + final void exportsCorrectContentInCollection(@TempDir Path tempDir) throws Exception { BibEntry entry = new BibEntry(StandardEntryType.InCollection) .withCitationKey("test") .withField(StandardField.AUTHOR, "Test Author") @@ -81,7 +81,7 @@ final void exportsCorrectContentInCollection(@TempDir Path tempFile) throws Exce .withField(StandardField.PUBLISHER, "PRESS") .withField(StandardField.YEAR, "2020"); - Path file = tempFile.resolve("RandomFileName"); + Path file = tempDir.resolve("RandomFileName"); Files.createFile(file); htmlWebsiteExporter.export(databaseContext, file, Collections.singletonList(entry)); @@ -92,7 +92,7 @@ final void exportsCorrectContentInCollection(@TempDir Path tempFile) throws Exce } @Test - final void exportsCorrectContentBook(@TempDir Path tempFile) throws Exception { + final void exportsCorrectContentBook(@TempDir Path tempDir) throws Exception { BibEntry entry = new BibEntry(StandardEntryType.Book) .withCitationKey("test") .withField(StandardField.AUTHOR, "Test Author") @@ -101,7 +101,7 @@ final void exportsCorrectContentBook(@TempDir Path tempFile) throws Exception { .withField(StandardField.PUBLISHER, "PRESS") .withField(StandardField.YEAR, "2020"); - Path file = tempFile.resolve("RandomFileName"); + Path file = tempDir.resolve("RandomFileName"); Files.createFile(file); htmlWebsiteExporter.export(databaseContext, file, Collections.singletonList(entry)); @@ -112,7 +112,7 @@ final void exportsCorrectContentBook(@TempDir Path tempFile) throws Exception { } @Test - final void exportsCorrectContentInProceeedingsPublisher(@TempDir Path tempFile) throws Exception { + final void exportsCorrectContentInProceeedingsPublisher(@TempDir Path tempDir) throws Exception { BibEntry entry = new BibEntry(StandardEntryType.InProceedings) .withCitationKey("test") .withField(StandardField.AUTHOR, "Test Author") @@ -122,7 +122,7 @@ final void exportsCorrectContentInProceeedingsPublisher(@TempDir Path tempFile) .withField(StandardField.SERIES, "CONF'20") .withField(StandardField.YEAR, "2020"); - Path file = tempFile.resolve("RandomFileName"); + Path file = tempDir.resolve("RandomFileName"); Files.createFile(file); htmlWebsiteExporter.export(databaseContext, file, Collections.singletonList(entry)); @@ -133,7 +133,7 @@ final void exportsCorrectContentInProceeedingsPublisher(@TempDir Path tempFile) } @Test - final void exportsCorrectContentInProceeedingsNoPublisher(@TempDir Path tempFile) throws Exception { + final void exportsCorrectContentInProceeedingsNoPublisher(@TempDir Path tempDir) throws Exception { BibEntry entry = new BibEntry(StandardEntryType.InProceedings) .withCitationKey("test") .withField(StandardField.AUTHOR, "Test Author") @@ -142,7 +142,7 @@ final void exportsCorrectContentInProceeedingsNoPublisher(@TempDir Path tempFile .withField(StandardField.SERIES, "CONF'20") .withField(StandardField.YEAR, "2020"); - Path file = tempFile.resolve("RandomFileName"); + Path file = tempDir.resolve("RandomFileName"); Files.createFile(file); htmlWebsiteExporter.export(databaseContext, file, Collections.singletonList(entry)); @@ -153,7 +153,7 @@ final void exportsCorrectContentInProceeedingsNoPublisher(@TempDir Path tempFile } @Test - final void exportsCorrectContentInProceeedingsNoSeries(@TempDir Path tempFile) throws Exception { + final void exportsCorrectContentInProceeedingsNoSeries(@TempDir Path tempDir) throws Exception { BibEntry entry = new BibEntry(StandardEntryType.InProceedings) .withCitationKey("test") .withField(StandardField.AUTHOR, "Test Author") @@ -161,7 +161,7 @@ final void exportsCorrectContentInProceeedingsNoSeries(@TempDir Path tempFile) t .withField(StandardField.BOOKTITLE, "Test Conference") .withField(StandardField.YEAR, "2020"); - Path file = tempFile.resolve("RandomFileName"); + Path file = tempDir.resolve("RandomFileName"); Files.createFile(file); htmlWebsiteExporter.export(databaseContext, file, Collections.singletonList(entry)); @@ -172,7 +172,7 @@ final void exportsCorrectContentInProceeedingsNoSeries(@TempDir Path tempFile) t } @Test - final void exportsCorrectContentBracketsInTitle(@TempDir Path tempFile) throws Exception { + final void exportsCorrectContentBracketsInTitle(@TempDir Path tempDir) throws Exception { BibEntry entry = new BibEntry(StandardEntryType.Article) .withCitationKey("test") .withField(StandardField.AUTHOR, "Test Author") @@ -180,7 +180,7 @@ final void exportsCorrectContentBracketsInTitle(@TempDir Path tempFile) throws E .withField(StandardField.JOURNAL, "Journal of this \\& that") .withField(StandardField.YEAR, "2020"); - Path file = tempFile.resolve("RandomFileName"); + Path file = tempDir.resolve("RandomFileName"); Files.createFile(file); htmlWebsiteExporter.export(databaseContext, file, Collections.singletonList(entry));