From 8f96d329454c3343d4177364c12c087bf1147a7d Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Sat, 23 Oct 2021 11:10:19 +0300 Subject: Minor code cleanup --- src/test/java/com/juick/server/tests/ServerTests.java | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) (limited to 'src/test/java/com/juick') diff --git a/src/test/java/com/juick/server/tests/ServerTests.java b/src/test/java/com/juick/server/tests/ServerTests.java index 479a1fc6..267ab9f8 100644 --- a/src/test/java/com/juick/server/tests/ServerTests.java +++ b/src/test/java/com/juick/server/tests/ServerTests.java @@ -370,13 +370,7 @@ public class ServerTests { @BeforeEach public void setUp() throws Exception { String imgDir = storageService.getImageDirectory(); - FileSystemUtils.deleteRecursively(Paths.get(imgDir, "p")); - FileSystemUtils.deleteRecursively(Paths.get(imgDir, "photos-1024")); - FileSystemUtils.deleteRecursively(Paths.get(imgDir, "photos-512")); - FileSystemUtils.deleteRecursively(Paths.get(imgDir, "ps")); - FileSystemUtils.deleteRecursively(Paths.get(imgDir, "a")); - FileSystemUtils.deleteRecursively(Paths.get(imgDir, "ao")); - FileSystemUtils.deleteRecursively(Paths.get(imgDir, "as")); + FileSystemUtils.deleteRecursively(Paths.get(imgDir)); Files.createDirectories(Paths.get(imgDir)); Files.createDirectory(Paths.get(imgDir, "p")); Files.createDirectory(Paths.get(imgDir, "photos-1024")); @@ -402,10 +396,7 @@ public class ServerTests { @AfterEach public void teardown() throws IOException { String imgDir = storageService.getImageDirectory(); - FileSystemUtils.deleteRecursively(Paths.get(imgDir, "p")); - FileSystemUtils.deleteRecursively(Paths.get(imgDir, "photos-1024")); - FileSystemUtils.deleteRecursively(Paths.get(imgDir, "photos-512")); - FileSystemUtils.deleteRecursively(Paths.get(imgDir, "ps")); + FileSystemUtils.deleteRecursively(Paths.get(imgDir)); } @Test -- cgit v1.2.3