public class TestableAbstractParentMojo extends AbstractParentMojo
AbstractParentMojo for testing purposes.DEFAULT_SOURCE_FILE_EXTENSION| Constructor and Description |
|---|
TestableAbstractParentMojo() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
doExecute()
A test implementation of that method that verifies that the method is indeed called during the plugin execution.
|
Charset |
getCurrentCharsetForTesting()
Exposes the
AbstractParentMojo.getCurrentCharset() method. |
List<Path> |
getEveryFileFromProcessOutputDirectoryFiles()
An implementation of the
AbstractParentMojo.processOutputDirectoryFiles(java.util.function.Consumer) to
allow its testing, that excludes IT directories. |
List<Path> |
getEveryFileFromProcessOutputDirectoryFiles(boolean excludeItDirectories)
An implementation of the
AbstractParentMojo.processOutputDirectoryFiles(java.util.function.Consumer) to
allow its testing. |
org.apache.maven.plugin.logging.Log |
getLog()
Returns a SLF4J based instance of
Log. |
String |
getSourceFileExtensionForTesting()
Exposes the
AbstractParentMojo.getSourceFileExtension() method for testing purposes. |
boolean |
isDoExecuteCalled()
Checks whether or not the
AbstractParentMojo.doExecute() is called during the MOJO execution. |
void |
validateSourceFileExtensionForTesting()
Exposes the
AbstractParentMojo.validateSourceFileExtension() method for testing purposes. |
execute, getCurrentCharset, getOutputDirectory, getProject, getSourceFileExtension, processOutputDirectoryFiles, validateSourceFileExtensionpublic Charset getCurrentCharsetForTesting()
AbstractParentMojo.getCurrentCharset() method.Charset.public List<Path> getEveryFileFromProcessOutputDirectoryFiles() throws IOException
AbstractParentMojo.processOutputDirectoryFiles(java.util.function.Consumer) to
allow its testing, that excludes IT directories.IOException - if any I/O error happened while trying to access a path.public List<Path> getEveryFileFromProcessOutputDirectoryFiles(boolean excludeItDirectories) throws IOException
AbstractParentMojo.processOutputDirectoryFiles(java.util.function.Consumer) to
allow its testing.excludeItDirectories - a flag to tell to exclude IT directories.IOException - if any I/O error happened while trying to access a path.public org.apache.maven.plugin.logging.Log getLog()
Log.
getLog in interface org.apache.maven.plugin.MojogetLog in class org.apache.maven.plugin.AbstractMojopublic String getSourceFileExtensionForTesting()
AbstractParentMojo.getSourceFileExtension() method for testing purposes.public boolean isDoExecuteCalled()
AbstractParentMojo.doExecute() is called during the MOJO execution.true if the AbstractParentMojo.doExecute() is called during execution, false
else.public void validateSourceFileExtensionForTesting()
AbstractParentMojo.validateSourceFileExtension() method for testing purposes.protected void doExecute()
throws org.apache.maven.plugin.MojoExecutionException,
org.apache.maven.plugin.MojoFailureException
doExecute in class AbstractParentMojoorg.apache.maven.plugin.MojoExecutionExceptionorg.apache.maven.plugin.MojoFailureExceptionCopyright © 2020. All rights reserved.