Class FileToolTest
java.lang.Object
com.tunyk.mvn.plugins.htmlcompressor.FileToolTest
The Class FileToolTest.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) voidsetUp()Sets the up.(package private) static voidSets the up class.(package private) static voidTear down class.(package private) voidTest FileTool getters and setters.(package private) voidTest get elapsed HMS time for various durations.(package private) voidTest get files finds the correct HTML files.(package private) voidTest get files content verification.(package private) voidTest get files extension filtering excludes non-matching files.(package private) voidTest human readable byte count with binary units (base 1024).(package private) voidTest human readable byte count with SI units (base 1000).(package private) voidTest setRootDirPath normalizes paths correctly.(package private) voidtestWriteFiles(Path tempDir) Test write files.(package private) voidtestWriteFilesContentVerification(Path tempDir) Test write files content verification - checks that written content can be read back correctly.(package private) voidTest write to json file creates the file with expected structure.(package private) voidtestWriteToJsonFileJsonContent(Path tempDir) Test write to json file produces parseable JSON content.(package private) voidtestWriteToJsonFileNoPlaceholder(Path tempDir) Test write to json file without placeholder appends it automatically.(package private) voidTest write to json file with null integration code uses default pattern.
-
Field Details
-
LOG
private static final org.slf4j.Logger LOGThe 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 get files finds the correct HTML files.- Throws:
IOException- Signals that an I/O exception has occurred.
-
testGetFilesContent
Test get files content verification.- Throws:
IOException- Signals that an I/O exception has occurred.
-
testGetFilesExtensionFiltering
Test get files extension filtering excludes non-matching files.- Throws:
IOException- Signals that an I/O exception has occurred.
-
testWriteFiles
Test write files.- Parameters:
tempDir- the temp dir provided by JUnit- Throws:
IOException- Signals that an I/O exception has occurred.
-
testWriteFilesContentVerification
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 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 FileTool getters and setters.- Throws:
IOException- Signals that an I/O exception has occurred.
-
testSetRootDirPathNormalization
Test setRootDirPath normalizes paths correctly.- Throws:
IOException- Signals that an I/O exception has occurred.
-