From e55f51d74a8a22038fcd6c5ce1dabc740a42d0a9 Mon Sep 17 00:00:00 2001 From: Manuel Soulier Date: Fri, 15 Nov 2024 10:07:08 +0100 Subject: [PATCH] fix: DirectoryPath unit tests --- .../provider/DirectoryPathTest.java | 48 +++++++++---------- 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/arc-core/src/test/java/fr/insee/arc/core/service/p1reception/provider/DirectoryPathTest.java b/arc-core/src/test/java/fr/insee/arc/core/service/p1reception/provider/DirectoryPathTest.java index c0812f43..bafe3187 100644 --- a/arc-core/src/test/java/fr/insee/arc/core/service/p1reception/provider/DirectoryPathTest.java +++ b/arc-core/src/test/java/fr/insee/arc/core/service/p1reception/provider/DirectoryPathTest.java @@ -13,40 +13,40 @@ public class DirectoryPathTest { @Test - public void testDirectoryPathIsUtilityClass() throws NoSuchMethodException, InvocationTargetException, InstantiationException, IllegalAccessException { + public void testDirectoryPathIsUtilityClass() + throws NoSuchMethodException, InvocationTargetException, InstantiationException, IllegalAccessException { PrivateConstructorTest.testConstructorIsPrivate(DirectoryPath.class); } - + @Test - public void directoryReceptionRootTest() - { - assertEquals(new File("/root/ARC_BAS1/RECEPTION").toPath(),new File(DirectoryPath.directoryReceptionRoot("/root","arc_bas1")).toPath()); + public void directoryReceptionRootTest() { + assertEquals(new File("/root/ARC_BAS1/RECEPTION").toPath(), + new File(DirectoryPath.directoryReceptionRoot("/root", "arc_bas1")).toPath()); } - + @Test - public void s3ReceptionEntrepotArchiveTest() - { - assertEquals(new File("/root/RECEPTION_ENTREPOT_ARCHIVE").toPath(),new File(DirectoryPath.s3ReceptionEntrepotArchive("root","ENTREPOT")).toPath()); + public void s3ReceptionEntrepotArchiveTest() { + assertEquals(new File("/ROOT/RECEPTION_ENTREPOT_ARCHIVE").toPath(), + new File(DirectoryPath.s3ReceptionEntrepotArchive("root", "ENTREPOT")).toPath()); } - + @Test - public void s3ReceptionEntrepotKOTest() - { - assertEquals(new File("/root/RECEPTION_ENTREPOT_KO").toPath(),new File(DirectoryPath.s3ReceptionEntrepotKO("root","ENTREPOT")).toPath()); + public void s3ReceptionEntrepotKOTest() { + assertEquals(new File("/ROOT/RECEPTION_ENTREPOT_KO").toPath(), + new File(DirectoryPath.s3ReceptionEntrepotKO("root", "ENTREPOT")).toPath()); } - + @Test - public void directoryReceptionEntrepotArchiveOldTest() - { - assertEquals(new File("/root/ARC_BAS1/RECEPTION_ENTREPOT_ARCHIVE/OLD").toPath(),new File(DirectoryPath.directoryReceptionEntrepotArchiveOld("/root","arc_bas1", "ENTREPOT")).toPath()); + public void directoryReceptionEntrepotArchiveOldTest() { + assertEquals(new File("/root/ARC_BAS1/RECEPTION_ENTREPOT_ARCHIVE/OLD").toPath(), + new File(DirectoryPath.directoryReceptionEntrepotArchiveOld("/root", "arc_bas1", "ENTREPOT")).toPath()); } - + @Test - public void directoryReceptionEntrepotArchiveOldYearStampedTest() - { - assertEquals(new File(("/root/ARC_BAS1/RECEPTION_ENTREPOT_ARCHIVE/OLD/"+Year.now().getValue())).toPath(),new File(DirectoryPath.directoryReceptionEntrepotArchiveOldYearStamped("/root","arc_bas1", "ENTREPOT")).toPath()); + public void directoryReceptionEntrepotArchiveOldYearStampedTest() { + assertEquals(new File(("/root/ARC_BAS1/RECEPTION_ENTREPOT_ARCHIVE/OLD/" + Year.now().getValue())).toPath(), + new File(DirectoryPath.directoryReceptionEntrepotArchiveOldYearStamped("/root", "arc_bas1", "ENTREPOT")) + .toPath()); } - - - + }