From 7495c48f1581dcf98a05ab1f2405650d79277db6 Mon Sep 17 00:00:00 2001 From: Siedlerchr Date: Thu, 11 Aug 2022 22:30:08 +0200 Subject: [PATCH] TODO test --- .../java/org/jabref/model/util/FileHelperTest.java | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/test/java/org/jabref/model/util/FileHelperTest.java b/src/test/java/org/jabref/model/util/FileHelperTest.java index 9584a7b53f8..c7bfe2460c0 100644 --- a/src/test/java/org/jabref/model/util/FileHelperTest.java +++ b/src/test/java/org/jabref/model/util/FileHelperTest.java @@ -4,12 +4,14 @@ import java.util.Optional; import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.io.TempDir; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.ValueSource; import static org.junit.jupiter.api.Assertions.assertEquals; class FileHelperTest { + @Test public void extractFileExtension() { final String filePath = FileHelperTest.class.getResource("pdffile.pdf").getPath(); @@ -24,14 +26,19 @@ public void fileExtensionFromUrl() { @Test public void testFileNameEmpty() { - Path path = Path.of("/"); - assertEquals(Optional.of(path), FileHelper.find("", path)); + Path path = Path.of("/"); + assertEquals(Optional.of(path), FileHelper.find("", path)); } @ParameterizedTest - @ValueSource(strings = { "*", "?", ">", "\"" }) + @ValueSource(strings = {"*", "?", ">", "\""}) public void testFileNameIllegal(String fileName) { Path path = Path.of("/"); assertEquals(Optional.empty(), FileHelper.find(fileName, path)); } + + @Test + public void testPathWithSubDirectories(@TempDir Path temp) throws Exception { + // TODO + } }