diff --git a/arc-ws/src/main/java/fr/insee/arc/ws/services/importServlet/bo/ExportFormat.java b/arc-ws/src/main/java/fr/insee/arc/ws/services/importServlet/bo/ExportFormat.java index 987dfb252..4f455f9b8 100644 --- a/arc-ws/src/main/java/fr/insee/arc/ws/services/importServlet/bo/ExportFormat.java +++ b/arc-ws/src/main/java/fr/insee/arc/ws/services/importServlet/bo/ExportFormat.java @@ -16,7 +16,7 @@ public String getFormat() { } public static boolean isCsv(String clientFormat) { - return clientFormat.equals(CSV_GZIP.toString()); + return clientFormat.equals(CSV_GZIP.getFormat()); } } diff --git a/arc-ws/src/test/java/fr/insee/arc/ws/services/importServlet/bo/ExportFormatTest.java b/arc-ws/src/test/java/fr/insee/arc/ws/services/importServlet/bo/ExportFormatTest.java index 44e7a74ee..a8bed32fb 100644 --- a/arc-ws/src/test/java/fr/insee/arc/ws/services/importServlet/bo/ExportFormatTest.java +++ b/arc-ws/src/test/java/fr/insee/arc/ws/services/importServlet/bo/ExportFormatTest.java @@ -8,8 +8,9 @@ public class ExportFormatTest { @Test public void isCsv() { - assertFalse(ExportFormat.isCsv(ExportFormat.BINARY.toString())); - assertTrue(ExportFormat.isCsv(ExportFormat.CSV_GZIP.toString())); + assertFalse(ExportFormat.isCsv("any")); + assertFalse(ExportFormat.isCsv("binary")); + assertTrue(ExportFormat.isCsv("csv_gzip")); } }