|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object junit.framework.Assert junit.framework.TestCase org.codehaus.plexus.PlexusTestCase org.apache.maven.plugin.testing.AbstractMojoTestCase org.apache.maven.plugin.war.AbstractWarMojoTest org.apache.maven.plugin.war.AbstractWarExplodedMojoTest
public abstract class AbstractWarExplodedMojoTest
Field Summary | |
---|---|
protected WarExplodedMojo |
mojo
|
Fields inherited from class org.apache.maven.plugin.war.AbstractWarMojoTest |
---|
MANIFEST_PATH, OVERLAYS_ROOT_DIR, OVERLAYS_TEMP_DIR |
Fields inherited from class org.codehaus.plexus.PlexusTestCase |
---|
basedir, container |
Constructor Summary | |
---|---|
AbstractWarExplodedMojoTest()
|
Method Summary | |
---|---|
protected List |
assertCustomContent(File webAppDirectory,
String[] filePaths,
String customMessage)
Asserts custom content of the war based on the specified webapp directory. |
protected List |
assertDefaultContent(File webAppDirectory)
Asserts the default content of the war based on the specified webapp directory. |
protected void |
assertWebAppContent(File webAppDirectory,
List expectedFiles,
FileFilter filter)
Asserts that the webapp contains only the specified files. |
protected List |
assertWebXml(File webAppDirectory)
Asserts the web.xml file of the war based on the specified webapp directory. |
protected void |
cleanDirectory(File directory)
Cleans up a directory. |
protected abstract File |
getPomFile()
Returns the pom configuration to use. |
protected abstract File |
getTestDirectory()
Returns the test directory to use. |
void |
setUp()
|
protected File |
setUpMojo(String testId,
ArtifactStub[] artifactStubs)
Configures the exploded mojo for the specified test. |
protected File |
setUpMojo(String testId,
ArtifactStub[] artifactStubs,
String[] sourceFiles)
Configures the exploded mojo for the specified test. |
Methods inherited from class org.apache.maven.plugin.war.AbstractWarMojoTest |
---|
buildWarOverlayStub, configureMojo, createArchive, createClassesDir, createDir, createFile, createFile, createWebAppSource, createWebAppSource, createXMLConfigDir, generateFullOverlayWar, getOverlayFile, getWebAppSource |
Methods inherited from class org.apache.maven.plugin.testing.AbstractMojoTestCase |
---|
configureMojo, configureMojo, extractPluginConfiguration, extractPluginConfiguration, getVariablesAndValuesFromObject, getVariablesAndValuesFromObject, getVariableValueFromObject, lookupEmptyMojo, lookupEmptyMojo, lookupMojo, lookupMojo, lookupMojo, setVariableValueToObject |
Methods inherited from class org.codehaus.plexus.PlexusTestCase |
---|
createContainerInstance, customizeContext, customizeContext, getBasedir, getClassLoader, getConfiguration, getConfiguration, getContainer, getCustomConfiguration, getResourceAsStream, getTestFile, getTestFile, getTestPath, getTestPath, lookup, lookup, release, tearDown |
Methods 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 |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected WarExplodedMojo mojo
Constructor Detail |
---|
public AbstractWarExplodedMojoTest()
Method Detail |
---|
public void setUp() throws Exception
setUp
in class AbstractMojoTestCase
Exception
protected abstract File getPomFile()
protected abstract File getTestDirectory()
getTestDirectory
in class AbstractWarMojoTest
protected File setUpMojo(String testId, ArtifactStub[] artifactStubs, String[] sourceFiles) throws Exception
testId
- the id of the testartifactStubs
- the dependencies (may be null)sourceFiles
- the source files to create (may be null)
Exception
- if an error occurs while configuring the mojoprotected File setUpMojo(String testId, ArtifactStub[] artifactStubs) throws Exception
testId
- the id of the testartifactStubs
- the dependencies (may be null)
Exception
- if an error occurs while configuring the mojoprotected void cleanDirectory(File directory) throws IOException
directory
- the directory to remove
IOException
- if an error occurred while removing the directoryprotected List assertDefaultContent(File webAppDirectory)
webAppDirectory
- the webapp directory
protected List assertWebXml(File webAppDirectory)
webAppDirectory
- the webapp directory
protected List assertCustomContent(File webAppDirectory, String[] filePaths, String customMessage)
webAppDirectory
- the webapp directoryfilePaths
- an array of file paths relative to the webapp directorycustomMessage
- a custom message if an assertion fails
protected void assertWebAppContent(File webAppDirectory, List expectedFiles, FileFilter filter)
webAppDirectory
- the webapp directoryexpectedFiles
- the expected filesfilter
- an optional filter to ignore some resources
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |