public abstract class AbstractSourcePluginTestCase extends AbstractMojoTestCase
Modifier and Type | Field and Description |
---|---|
protected static String |
FINAL_NAME_PREFIX |
protected static String |
FINAL_NAME_SUFFIX |
Constructor and Description |
---|
AbstractSourcePluginTestCase() |
Modifier and Type | Method and Description |
---|---|
protected void |
assertJarContent(File jarFile,
String[] expectedFiles) |
protected void |
assertSourceArchive(File testTargetDir,
String projectName) |
protected void |
assertTestSourceArchive(File testTargetDir,
String projectName) |
protected String |
buildFinalSourceName(String projectName) |
protected String |
buildFinalTestSourceName(String projectName) |
protected File |
doTestProject(String projectName,
boolean expectSourceArchive,
boolean expectTestSourceArchive,
String[] expectedSourceFiles,
String[] expectedTestSourceFiles,
String classifier)
Executes the specified projects and asserts the given artifacts.
|
protected File |
doTestProjectWithSourceArchive(String projectName,
String[] expectedSourceFiles,
String classifier)
Executes the specified projects and asserts the given artifacts for a source archive.
|
protected File |
doTestProjectWithTestSourceArchive(String projectName,
String[] expectedTestSourceFiles,
String classifier)
Executes the specified projects and asserts the given artifacts for a test source archive.
|
protected void |
executeMojo(String projectName,
String classifier)
Execute the source plugin for the specified project.
|
protected abstract String |
getGoal() |
protected File |
getSourceArchive(File testTargetDir,
String projectName) |
protected File |
getTestDir(String projectName) |
protected File |
getTestSourceArchive(File testTargetDir,
String projectName) |
protected File |
getTestTargetDir(String projectName) |
configureMojo, configureMojo, extractPluginConfiguration, extractPluginConfiguration, getVariablesAndValuesFromObject, getVariablesAndValuesFromObject, getVariableValueFromObject, lookupEmptyMojo, lookupEmptyMojo, lookupMojo, lookupMojo, lookupMojo, setUp, setVariableValueToObject
createContainerInstance, customizeContext, customizeContext, getBasedir, getClassLoader, getConfiguration, getConfiguration, getContainer, getCustomConfiguration, getResourceAsStream, getTestFile, getTestFile, getTestPath, getTestPath, lookup, lookup, release, tearDown
countTestCases, createResult, getName, run, run, runBare, runTest, setName, toString
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, fail, fail, failNotEquals, failNotSame, failSame, format
protected static final String FINAL_NAME_PREFIX
protected static final String FINAL_NAME_SUFFIX
protected abstract String getGoal()
protected void executeMojo(String projectName, String classifier) throws Exception
projectName
- the name of the projectException
- if an error occurredprotected File doTestProject(String projectName, boolean expectSourceArchive, boolean expectTestSourceArchive, String[] expectedSourceFiles, String[] expectedTestSourceFiles, String classifier) throws Exception
projectName
- the project to testexpectSourceArchive
- if a source archive is expectedexpectTestSourceArchive
- if a test source archive is expectedexpectedSourceFiles
- the expected files in the source archive, if anyexpectedTestSourceFiles
- the expected files in the test source archive, if anyException
- if any error occursprotected File doTestProjectWithSourceArchive(String projectName, String[] expectedSourceFiles, String classifier) throws Exception
projectName
- the project to testexpectedSourceFiles
- the expected files in the source archive, if anyException
- if any error occursprotected File doTestProjectWithTestSourceArchive(String projectName, String[] expectedTestSourceFiles, String classifier) throws Exception
projectName
- the project to testexpectedTestSourceFiles
- the expected files in the test source archive, if anyException
- if any error occursprotected void assertTestSourceArchive(File testTargetDir, String projectName)
protected File getTestDir(String projectName) throws IOException
IOException
protected void assertJarContent(File jarFile, String[] expectedFiles) throws IOException
IOException
Copyright © 2002–2014 The Apache Software Foundation. All rights reserved.