Class FileToolTest

java.lang.Object
com.tunyk.mvn.plugins.htmlcompressor.FileToolTest

class FileToolTest extends Object
The Class FileToolTest.
  • Field Details

    • LOG

      private static final org.slf4j.Logger LOG
      The Constant LOG.
  • Constructor Details

    • FileToolTest

      FileToolTest()
  • Method Details

    • setUpClass

      @BeforeAll static void setUpClass()
      Sets the up class.
    • tearDownClass

      @AfterAll static void tearDownClass()
      Tear down class.
    • setUp

      @BeforeEach void setUp()
      Sets the up.
    • testGetFiles

      @Test void testGetFiles() throws IOException
      Test get files finds the correct HTML files.
      Throws:
      IOException - Signals that an I/O exception has occurred.
    • testGetFilesContent

      @Test void testGetFilesContent() throws IOException
      Test get files content verification.
      Throws:
      IOException - Signals that an I/O exception has occurred.
    • testGetFilesExtensionFiltering

      @Test void testGetFilesExtensionFiltering() throws IOException
      Test get files extension filtering excludes non-matching files.
      Throws:
      IOException - Signals that an I/O exception has occurred.
    • testWriteFiles

      @Test void testWriteFiles(@TempDir Path tempDir) throws IOException
      Test write files.
      Parameters:
      tempDir - the temp dir provided by JUnit
      Throws:
      IOException - Signals that an I/O exception has occurred.
    • testWriteFilesContentVerification

      @Test void testWriteFilesContentVerification(@TempDir Path tempDir) throws IOException
      Test write files content verification - checks that written content can be read back correctly.
      Parameters:
      tempDir - the temp dir provided by JUnit
      Throws:
      IOException - Signals that an I/O exception has occurred.
    • testWriteToJsonFile

      @Test void testWriteToJsonFile() throws IOException, org.json.JSONException
      Test write to json file creates the file with expected structure.
      Throws:
      IOException - Signals that an I/O exception has occurred.
      org.json.JSONException - the JSON exception
    • testWriteToJsonFileNullIntegrationCode

      @Test void testWriteToJsonFileNullIntegrationCode(@TempDir Path tempDir) throws IOException, org.json.JSONException
      Test write to json file with null integration code uses default pattern.
      Parameters:
      tempDir - the temp dir provided by JUnit
      Throws:
      IOException - Signals that an I/O exception has occurred.
      org.json.JSONException - the JSON exception
    • testWriteToJsonFileNoPlaceholder

      @Test void testWriteToJsonFileNoPlaceholder(@TempDir Path tempDir) throws IOException, org.json.JSONException
      Test write to json file without placeholder appends it automatically.
      Parameters:
      tempDir - the temp dir provided by JUnit
      Throws:
      IOException - Signals that an I/O exception has occurred.
      org.json.JSONException - the JSON exception
    • testWriteToJsonFileJsonContent

      @Test void testWriteToJsonFileJsonContent(@TempDir Path tempDir) throws IOException, org.json.JSONException
      Test write to json file produces parseable JSON content.
      Parameters:
      tempDir - the temp dir provided by JUnit
      Throws:
      IOException - Signals that an I/O exception has occurred.
      org.json.JSONException - the JSON exception
    • testHumanReadableByteCountSI

      @Test void testHumanReadableByteCountSI()
      Test human readable byte count with SI units (base 1000).
    • testHumanReadableByteCountBinary

      @Test void testHumanReadableByteCountBinary()
      Test human readable byte count with binary units (base 1024).
    • testGetElapsedHMSTime

      @Test void testGetElapsedHMSTime()
      Test get elapsed HMS time for various durations.
    • testFileToolGettersSetters

      @Test void testFileToolGettersSetters() throws IOException
      Test FileTool getters and setters.
      Throws:
      IOException - Signals that an I/O exception has occurred.
    • testSetRootDirPathNormalization

      @Test void testSetRootDirPathNormalization() throws IOException
      Test setRootDirPath normalizes paths correctly.
      Throws:
      IOException - Signals that an I/O exception has occurred.