diff --git a/README.md b/README.md index 55bfb2f36..30335755d 100644 --- a/README.md +++ b/README.md @@ -134,7 +134,7 @@ Stirling-PDF currently supports 40 languages! | Hungarian (Magyar) (hu_HU) | ![88%](https://geps.dev/progress/88) | | Indonesian (Bahasa Indonesia) (id_ID) | ![72%](https://geps.dev/progress/72) | | Irish (Gaeilge) (ga_IE) | ![82%](https://geps.dev/progress/82) | -| Italian (Italiano) (it_IT) | ![88%](https://geps.dev/progress/88) | +| Italian (Italiano) (it_IT) | ![96%](https://geps.dev/progress/96) | | Japanese (日本語) (ja_JP) | ![84%](https://geps.dev/progress/84) | | Korean (한국어) (ko_KR) | ![82%](https://geps.dev/progress/82) | | Norwegian (Norsk) (no_NB) | ![77%](https://geps.dev/progress/77) | diff --git a/common/src/test/java/stirling/software/common/util/CheckProgramInstallTest.java b/common/src/test/java/stirling/software/common/util/CheckProgramInstallTest.java index 22ebeb240..ae8132618 100644 --- a/common/src/test/java/stirling/software/common/util/CheckProgramInstallTest.java +++ b/common/src/test/java/stirling/software/common/util/CheckProgramInstallTest.java @@ -1,24 +1,26 @@ package stirling.software.common.util; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertNull; +import static org.junit.jupiter.api.Assertions.assertTrue; +import static org.mockito.ArgumentMatchers.anyList; +import static org.mockito.Mockito.mockStatic; +import static org.mockito.Mockito.times; +import static org.mockito.Mockito.verify; +import static org.mockito.Mockito.when; + import java.io.IOException; import java.lang.reflect.Field; import java.util.Arrays; -import java.util.List; + import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.mockito.MockedStatic; import org.mockito.Mockito; + import stirling.software.common.util.ProcessExecutor.ProcessExecutorResult; -import static org.junit.jupiter.api.Assertions.assertEquals; -import static org.junit.jupiter.api.Assertions.assertFalse; -import static org.junit.jupiter.api.Assertions.assertNull; -import static org.junit.jupiter.api.Assertions.assertTrue; -import static org.mockito.ArgumentMatchers.any; -import static org.mockito.Mockito.mockStatic; -import static org.mockito.Mockito.times; -import static org.mockito.Mockito.verify; -import static org.mockito.Mockito.when; class CheckProgramInstallTest { @@ -140,7 +142,7 @@ class CheckProgramInstallTest { void testGetAvailablePythonCommand_WhenNoPythonIsAvailable() throws IOException, InterruptedException { // Arrange - when(mockExecutor.runCommandWithOutputHandling(any(List.class))) + when(mockExecutor.runCommandWithOutputHandling(anyList())) .thenThrow(new IOException("Command not found")); // Act @@ -168,7 +170,7 @@ class CheckProgramInstallTest { String firstCall = CheckProgramInstall.getAvailablePythonCommand(); // Change the mock to simulate a change in the environment - when(mockExecutor.runCommandWithOutputHandling(any(List.class))) + when(mockExecutor.runCommandWithOutputHandling(anyList())) .thenThrow(new IOException("Command not found")); String secondCall = CheckProgramInstall.getAvailablePythonCommand(); diff --git a/common/src/test/java/stirling/software/common/util/PDFToFileTest.java b/common/src/test/java/stirling/software/common/util/PDFToFileTest.java index 39cdbf913..6f4b4af92 100644 --- a/common/src/test/java/stirling/software/common/util/PDFToFileTest.java +++ b/common/src/test/java/stirling/software/common/util/PDFToFileTest.java @@ -4,6 +4,7 @@ import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertNotNull; import static org.junit.jupiter.api.Assertions.assertTrue; import static org.mockito.ArgumentMatchers.any; +import static org.mockito.ArgumentMatchers.anyList; import static org.mockito.ArgumentMatchers.argThat; import static org.mockito.Mockito.mockStatic; import static org.mockito.Mockito.when; @@ -132,7 +133,7 @@ class PDFToFileTest { .when(() -> ProcessExecutor.getInstance(ProcessExecutor.Processes.PDFTOHTML)) .thenReturn(mockProcessExecutor); - when(mockProcessExecutor.runCommandWithOutputHandling(any(List.class), any(File.class))) + when(mockProcessExecutor.runCommandWithOutputHandling(anyList(), any(File.class))) .thenAnswer( invocation -> { // When command is executed, simulate creation of output files @@ -175,7 +176,7 @@ class PDFToFileTest { .when(() -> ProcessExecutor.getInstance(ProcessExecutor.Processes.PDFTOHTML)) .thenReturn(mockProcessExecutor); - when(mockProcessExecutor.runCommandWithOutputHandling(any(List.class), any(File.class))) + when(mockProcessExecutor.runCommandWithOutputHandling(anyList(), any(File.class))) .thenAnswer( invocation -> { // When command is executed, simulate creation of output files @@ -251,7 +252,7 @@ class PDFToFileTest { .when(() -> ProcessExecutor.getInstance(ProcessExecutor.Processes.PDFTOHTML)) .thenReturn(mockProcessExecutor); - when(mockProcessExecutor.runCommandWithOutputHandling(any(List.class), any(File.class))) + when(mockProcessExecutor.runCommandWithOutputHandling(anyList(), any(File.class))) .thenAnswer( invocation -> { // When command is executed, simulate creation of output files @@ -537,7 +538,7 @@ class PDFToFileTest { .when(() -> ProcessExecutor.getInstance(ProcessExecutor.Processes.LIBRE_OFFICE)) .thenReturn(mockProcessExecutor); - when(mockProcessExecutor.runCommandWithOutputHandling(any(List.class))) + when(mockProcessExecutor.runCommandWithOutputHandling(anyList())) .thenAnswer( invocation -> { // When command is executed, find the output directory argument