org.apache.maven.plugin.testing
public abstract class AbstractMojoTestCase extends PlexusTestCase
Method Summary | |
---|---|
protected Mojo | configureMojo(Mojo mojo, String artifactId, File pom) |
protected Mojo | configureMojo(Mojo mojo, PlexusConfiguration pluginConfiguration)
configure the mojo with the given plexus configuration
|
protected PlexusConfiguration | extractPluginConfiguration(String artifactId, File pom) |
protected PlexusConfiguration | extractPluginConfiguration(String artifactId, Xpp3Dom pomDom) |
protected Map | getVariablesAndValuesFromObject(Object object)
convience method to obtain all variables and values from the mojo (including its superclasses)
Note: the values in the map are of type Object so the caller is responsible for casting to desired types.
|
protected Map | getVariablesAndValuesFromObject(Class clazz, Object object)
convience method to obtain all variables and values from the mojo (including its superclasses)
Note: the values in the map are of type Object so the caller is responsible for casting to desired types.
|
protected Object | getVariableValueFromObject(Object object, String variable)
convience method to obtain the value of a variable on a mojo that might not have a getter.
|
protected Mojo | lookupEmptyMojo(String goal, String pluginPom)
lookup an empty mojo |
protected Mojo | lookupEmptyMojo(String goal, File pom)
lookup the mojo leveraging the actual subprojects pom
|
protected Mojo | lookupMojo(String goal, String pluginPom)
lookup the mojo leveraging the subproject pom
|
protected Mojo | lookupMojo(String goal, File pom)
lookup the mojo leveraging the actual subprojects pom
|
protected Mojo | lookupMojo(String groupId, String artifactId, String version, String goal, PlexusConfiguration pluginConfiguration)
lookup the mojo while we have all of the relavent information
|
protected void | setUp() |
protected void | setVariableValueToObject(Object object, String variable, Object value)
convience method to set values to variables in objects that don't have setters |
Parameters: mojo pluginConfiguration
Returns:
Throws: Exception
Parameters: object
Returns: map of variable names and values
Parameters: clazz object
Returns: map of variable names and values
Parameters: object variable
Returns: object value of variable
Throws: IllegalArgumentException
Parameters: goal pom
Returns:
Throws: Exception
Parameters: goal pom
Returns:
Throws: Exception
Parameters: groupId artifactId version goal pluginConfiguration
Returns:
Throws: Exception
Parameters: object variable value
Throws: IllegalAccessException