Package org.eclipse.tycho.testing
Class AbstractTychoMojoTestCase
java.lang.Object
junit.framework.Assert
junit.framework.TestCase
org.codehaus.plexus.PlexusTestCase
org.apache.maven.plugin.testing.AbstractMojoTestCase
org.eclipse.tycho.testing.AbstractTychoMojoTestCase
- All Implemented Interfaces:
junit.framework.Test
public class AbstractTychoMojoTestCase
extends org.apache.maven.plugin.testing.AbstractMojoTestCase
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidconfigureMojoWithDefaultConfiguration(org.apache.maven.plugin.Mojo mojo, org.apache.maven.execution.MavenSession session, String goal) Configures the given mojo according to the specified goal of the given session.protected static FilegetBasedir(String name) protected Stringprotected org.apache.maven.artifact.repository.ArtifactRepositoryprotected org.apache.maven.project.MavenProjectgetProject(List<org.apache.maven.project.MavenProject> projects, String artifactId) protected org.apache.maven.project.MavenProjectgetProjectWithArtifactId(List<org.apache.maven.project.MavenProject> projects, String artifactId) protected org.apache.maven.project.MavenProjectgetProjectWithName(List<org.apache.maven.project.MavenProject> projects, String name) protected List<org.apache.maven.project.MavenProject>getSortedProjects(File basedir) protected List<org.apache.maven.project.MavenProject>getSortedProjects(File basedir, Properties userProperties) protected org.apache.maven.plugin.MojolookupMojo(String goal, File pom) protected org.apache.maven.plugin.MojolookupMojoWithDefaultConfiguration(org.apache.maven.project.MavenProject project, org.apache.maven.execution.MavenSession session, String goal) Returns a mojo configured with the mojo's default configuration.protected org.apache.maven.execution.MavenExecutionRequestprotected org.apache.maven.execution.MavenSessionnewMavenSession(org.apache.maven.project.MavenProject project, List<org.apache.maven.project.MavenProject> projects) protected voidsetUp()protected voidtearDown()Methods inherited from class org.apache.maven.plugin.testing.AbstractMojoTestCase
addGuiceModules, configureMojo, configureMojo, extractPluginConfiguration, extractPluginConfiguration, getContainer, getPluginDescriptorLocation, getPluginDescriptorPath, getPublicDescriptorStream, getVariablesAndValuesFromObject, getVariablesAndValuesFromObject, getVariableValueFromObject, lookupConfiguredMojo, lookupConfiguredMojo, lookupEmptyMojo, lookupEmptyMojo, lookupMojo, lookupMojo, newMavenSession, newMojoExecution, setupContainer, setupContainerConfiguration, setVariableValueToObjectMethods inherited from class org.codehaus.plexus.PlexusTestCase
customizeContainerConfiguration, customizeContext, getBasedir, getClassLoader, getConfigurationName, getResourceAsStream, getTestConfiguration, getTestConfiguration, getTestFile, getTestFile, getTestPath, getTestPath, lookup, lookup, lookup, lookup, release, teardownContainerMethods inherited from class junit.framework.TestCase
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
-
Field Details
-
maven
protected org.apache.maven.Maven maven
-
-
Constructor Details
-
AbstractTychoMojoTestCase
public AbstractTychoMojoTestCase()
-
-
Method Details
-
setUp
- Overrides:
setUpin classorg.apache.maven.plugin.testing.AbstractMojoTestCase- Throws:
Exception
-
tearDown
- Overrides:
tearDownin classorg.codehaus.plexus.PlexusTestCase- Throws:
Exception
-
getCustomConfigurationName
- Overrides:
getCustomConfigurationNamein classorg.codehaus.plexus.PlexusTestCase
-
lookupMojo
- Overrides:
lookupMojoin classorg.apache.maven.plugin.testing.AbstractMojoTestCase- Throws:
Exception
-
getLocalRepository
protected org.apache.maven.artifact.repository.ArtifactRepository getLocalRepository() throws Exception- Throws:
Exception
-
newMavenExecutionRequest
protected org.apache.maven.execution.MavenExecutionRequest newMavenExecutionRequest(File pom) throws Exception - Throws:
Exception
-
getSortedProjects
protected List<org.apache.maven.project.MavenProject> getSortedProjects(File basedir) throws Exception - Throws:
Exception
-
getSortedProjects
protected List<org.apache.maven.project.MavenProject> getSortedProjects(File basedir, Properties userProperties) throws Exception - Throws:
Exception
-
newMavenSession
protected org.apache.maven.execution.MavenSession newMavenSession(org.apache.maven.project.MavenProject project, List<org.apache.maven.project.MavenProject> projects) throws Exception - Throws:
Exception
-
getProject
-
getProjectWithArtifactId
protected org.apache.maven.project.MavenProject getProjectWithArtifactId(List<org.apache.maven.project.MavenProject> projects, String artifactId) throws AssertionError, Exception - Throws:
AssertionErrorException
-
getProjectWithName
protected org.apache.maven.project.MavenProject getProjectWithName(List<org.apache.maven.project.MavenProject> projects, String name) throws AssertionError, Exception - Throws:
AssertionErrorException
-
lookupMojoWithDefaultConfiguration
protected org.apache.maven.plugin.Mojo lookupMojoWithDefaultConfiguration(org.apache.maven.project.MavenProject project, org.apache.maven.execution.MavenSession session, String goal) throws Exception Returns a mojo configured with the mojo's default configuration.- Throws:
Exception
-
configureMojoWithDefaultConfiguration
protected void configureMojoWithDefaultConfiguration(org.apache.maven.plugin.Mojo mojo, org.apache.maven.execution.MavenSession session, String goal) throws Exception Configures the given mojo according to the specified goal of the given session.Especially this also initializes each
Parameterof the mojo with its default values.- Throws:
Exception
-
getBasedir
- Throws:
IOException
-