Class HtmlCompressorMojoTest
java.lang.Object
com.tunyk.mvn.plugins.htmlcompressor.HtmlCompressorMojoTest
The Class HtmlCompressorMojoTest.
-
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 execute with default settings produces output files and statistics.(package private) voidtestExecuteDisabled(Path tempDir) Test execute when enabled is false produces no output.(package private) voidtestExecuteNonExistentSrcFolder(Path tempDir) Test execute when src folder does not exist produces no output and no exception.(package private) voidtestExecuteSkip(Path tempDir) Test execute when skip is true produces no output.(package private) voidTest execute with custom preserve patterns.(package private) voidtestExecuteWithDeprecatedFileExt(Path tempDir) Test execute with deprecated fileExt parameter.(package private) voidTest execute with invalid preserve pattern throws MojoExecutionException.(package private) voidTest execute with javascript html sprite disabled.(package private) voidTest execute with predefined preserve patterns (PHP_TAG_PATTERN).(package private) voidTest HtmlCompressorMojo getters and setters for all configurable parameters.
-
Field Details
-
LOG
private static final org.slf4j.Logger LOGThe Constant LOG.
-
-
Constructor Details
-
HtmlCompressorMojoTest
HtmlCompressorMojoTest()
-
-
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. -
testExecute
@Test void testExecute() throws org.apache.maven.plugin.MojoExecutionExceptionTest execute with default settings produces output files and statistics.- Throws:
org.apache.maven.plugin.MojoExecutionException- the mojo execution exception
-
testExecuteSkip
@Test void testExecuteSkip(@TempDir Path tempDir) throws org.apache.maven.plugin.MojoExecutionException Test execute when skip is true produces no output.- Parameters:
tempDir- the temp dir provided by JUnit- Throws:
org.apache.maven.plugin.MojoExecutionException- the mojo execution exception
-
testExecuteDisabled
@Test void testExecuteDisabled(@TempDir Path tempDir) throws org.apache.maven.plugin.MojoExecutionException Test execute when enabled is false produces no output.- Parameters:
tempDir- the temp dir provided by JUnit- Throws:
org.apache.maven.plugin.MojoExecutionException- the mojo execution exception
-
testExecuteNonExistentSrcFolder
@Test void testExecuteNonExistentSrcFolder(@TempDir Path tempDir) throws org.apache.maven.plugin.MojoExecutionException Test execute when src folder does not exist produces no output and no exception.- Parameters:
tempDir- the temp dir provided by JUnit- Throws:
org.apache.maven.plugin.MojoExecutionException- the mojo execution exception
-
testExecuteWithDeprecatedFileExt
@Test void testExecuteWithDeprecatedFileExt(@TempDir Path tempDir) throws org.apache.maven.plugin.MojoExecutionException Test execute with deprecated fileExt parameter.- Parameters:
tempDir- the temp dir provided by JUnit- Throws:
org.apache.maven.plugin.MojoExecutionException- the mojo execution exception
-
testExecuteWithJavascriptSpriteDisabled
@Test void testExecuteWithJavascriptSpriteDisabled(@TempDir Path tempDir) throws org.apache.maven.plugin.MojoExecutionException Test execute with javascript html sprite disabled.- Parameters:
tempDir- the temp dir provided by JUnit- Throws:
org.apache.maven.plugin.MojoExecutionException- the mojo execution exception
-
testHtmlMojoGettersSetters
@Test void testHtmlMojoGettersSetters()Test HtmlCompressorMojo getters and setters for all configurable parameters. -
testExecuteWithPredefinedPreservePatterns
@Test void testExecuteWithPredefinedPreservePatterns(@TempDir Path tempDir) throws org.apache.maven.plugin.MojoExecutionException Test execute with predefined preserve patterns (PHP_TAG_PATTERN).- Parameters:
tempDir- the temp dir provided by JUnit- Throws:
org.apache.maven.plugin.MojoExecutionException- the mojo execution exception
-
testExecuteWithCustomPreservePatterns
@Test void testExecuteWithCustomPreservePatterns(@TempDir Path tempDir) throws org.apache.maven.plugin.MojoExecutionException Test execute with custom preserve patterns.- Parameters:
tempDir- the temp dir provided by JUnit- Throws:
org.apache.maven.plugin.MojoExecutionException- the mojo execution exception
-
testExecuteWithInvalidPreservePatternThrows
@Test void testExecuteWithInvalidPreservePatternThrows()Test execute with invalid preserve pattern throws MojoExecutionException.
-