Class FileUtilsTest

java.lang.Object
FileUtilsTest

public class FileUtilsTest extends Object
Unit tests for the FileUtils class. These tests exercise directory copy/delete and integrity helpers.
  • Field Details

    • TEST_SOURCE_DIR

      private static final Path TEST_SOURCE_DIR
      Path used as the source directory for test copies.
    • TEST_DEST_DIR

      private static final Path TEST_DEST_DIR
      Path used as the destination directory for test copies.
  • Constructor Details

    • FileUtilsTest

      public FileUtilsTest()
      Public no-arg constructor required by the test framework.
  • Method Details

    • setUp

      @BeforeEach public void setUp() throws IOException
      Prepare test fixtures before each test.
      Throws:
      IOException - when creating test directories or files fails
    • tearDown

      @AfterEach public void tearDown() throws IOException
      Clean up test fixtures after each test.
      Throws:
      IOException - when removing test directories fails
    • testCopyDirectoryWithConflictHandling

      @Test public void testCopyDirectoryWithConflictHandling() throws IOException
      Test copying a directory where destination contains conflicting files.
      Throws:
      IOException - when file operations fail
    • testHasEnoughDiskSpace

      @Test public void testHasEnoughDiskSpace() throws IOException
      Test disk space estimation for copying small test data.
      Throws:
      IOException - when checking disk space fails
    • testVerifyIntegrity

      @Test public void testVerifyIntegrity() throws IOException
      Test verification of file integrity after copying.
      Throws:
      IOException - when copying or reading files fails
    • testDeleteDirectory

      @Test public void testDeleteDirectory() throws IOException
      Test recursive deletion of directories.
      Throws:
      IOException - when deletion fails