public abstract class AbstractAndroidMojoTestCase<T extends AbstractAndroidMojo>
extends org.apache.maven.plugin.testing.AbstractMojoTestCase
Modifier and Type | Field and Description |
---|---|
protected org.apache.maven.plugin.MojoExecution |
execution |
protected org.apache.maven.execution.MavenSession |
session |
Constructor and Description |
---|
AbstractAndroidMojoTestCase() |
Modifier and Type | Method and Description |
---|---|
protected T |
createMojo(String resourceProject)
Copy the project specified into a temporary testing directory.
|
abstract String |
getPluginGoalName()
The Goal Name of the Plugin being tested.
|
File |
getProjectDir(AbstractAndroidMojo mojo)
Get the project directory used for this mojo.
|
addGuiceModules, configureMojo, configureMojo, extractPluginConfiguration, extractPluginConfiguration, getContainer, getPluginDescriptorLocation, getPluginDescriptorPath, getPublicDescriptorStream, getVariablesAndValuesFromObject, getVariablesAndValuesFromObject, getVariableValueFromObject, lookupConfiguredMojo, lookupConfiguredMojo, lookupEmptyMojo, lookupEmptyMojo, lookupMojo, lookupMojo, lookupMojo, newMavenSession, newMojoExecution, setUp, setupContainer, setupContainerConfiguration, setVariableValueToObject
createContainerInstance, customizeContext, customizeContext, getBasedir, getClassLoader, getConfiguration, getConfiguration, getCustomConfiguration, getResourceAsStream, getTestFile, getTestFile, getTestPath, getTestPath, lookup, lookup, release, tearDown
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, countTestCases, createResult, fail, fail, failNotEquals, failNotSame, failSame, format, getName, run, run, runBare, runTest, setName, toString
protected org.apache.maven.execution.MavenSession session
protected org.apache.maven.plugin.MojoExecution execution
public abstract String getPluginGoalName()
Used to look for <configuration>
section in the plugin-config.xml
that will be used to configure the mojo from.
protected T createMojo(String resourceProject) throws Exception
MavenProject
and
ManifestUpdateMojo
, configure it from the plugin-config.xml
and return the created Mojo.
Note: only configuration entries supplied in the plugin-config.xml are presently configured in the mojo returned. That means and 'default-value' settings are not automatically injected by this testing framework (or plexus underneath that is suppling this functionality)
resourceProject
- the name of the goal to look for in the plugin-config.xml
that the configuration will be
pulled from.resourceProject
- the resourceProject path (in src/test/resources) to find the example/test project.Exception
- if there was a problem creating the mojo.public File getProjectDir(AbstractAndroidMojo mojo) throws IllegalAccessException
mojo
- the mojo to query.IllegalAccessException
- if unable to get the project directory.Copyright © 2008–2019 simpligility technologies inc.. All rights reserved.