From 65210c4cde80076da374b740844582df7919b9a3 Mon Sep 17 00:00:00 2001 From: Mathieu Soysal <43273304+MathieuSoysal@users.noreply.github.com> Date: Fri, 9 Feb 2024 15:44:15 +0000 Subject: [PATCH] Add assertions for file existence in ArchiveHourTest --- .../github/mathieusoysal/archivers/ArchiveHourTest.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/test/java/io/github/mathieusoysal/archivers/ArchiveHourTest.java b/src/test/java/io/github/mathieusoysal/archivers/ArchiveHourTest.java index 32a093dd9..c9c11798e 100644 --- a/src/test/java/io/github/mathieusoysal/archivers/ArchiveHourTest.java +++ b/src/test/java/io/github/mathieusoysal/archivers/ArchiveHourTest.java @@ -1,6 +1,10 @@ package io.github.mathieusoysal.archivers; import static org.junit.jupiter.api.Assertions.assertDoesNotThrow; +import static org.junit.jupiter.api.Assertions.assertTrue; + +import java.nio.file.Files; +import java.nio.file.Path; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.condition.EnabledIfEnvironmentVariable; @@ -16,6 +20,10 @@ void testArchiveHour() { System.setProperty(Properties.PASSWORD.getName(), System.getenv("TEST_PASSWORD")); assertDoesNotThrow(() -> Archivers.ARCHIVER_HOUR.archive()); + assertTrue(Files.exists(Path.of("archive"))); + assertTrue(Files.exists(Path.of("archive/residences"))); + assertTrue(Files.exists(Path.of("archive/hash_residences"))); + assertTrue(Files.exists(Path.of("archive/available-residences-id"))); } }