org.apache.maven.plugin.war
Class WarDependenciesAnalysisTest

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by org.codehaus.plexus.PlexusTestCase
              extended by org.apache.maven.plugin.testing.AbstractMojoTestCase
                  extended by org.apache.maven.plugin.war.AbstractWarMojoTest
                      extended by org.apache.maven.plugin.war.AbstractWarExplodedMojoTest
                          extended by org.apache.maven.plugin.war.WarDependenciesAnalysisTest
All Implemented Interfaces:
junit.framework.Test

public class WarDependenciesAnalysisTest
extends AbstractWarExplodedMojoTest

Author:
Stephane Nicoll

Field Summary
 
Fields inherited from class org.apache.maven.plugin.war.AbstractWarExplodedMojoTest
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
WarDependenciesAnalysisTest()
           
 
Method Summary
protected  void doTestTwiceWithUpdatedDependency(String testId, org.apache.maven.plugin.testing.stubs.ArtifactStub[] firstStubs, org.apache.maven.plugin.testing.stubs.ArtifactStub[] secondStubs, String[] firstCustomContent, String[] secondCustomContent)
           
protected  File getPomFile()
          Returns the pom configuration to use.
protected  File getTestDirectory()
          Returns the test directory to use.
protected  File setUpMojoWithCache(String testId, org.apache.maven.plugin.testing.stubs.ArtifactStub[] artifactStubs)
          Configures the exploded mojo for the specified test.
 void testDependencyNowProvided()
           
 void testDependencyWithUpdatedVersion()
           
 void testNoChange()
           
 void testRemovedDependency()
           
 
Methods inherited from class org.apache.maven.plugin.war.AbstractWarExplodedMojoTest
assertCustomContent, assertDefaultContent, assertWebAppContent, assertWebXml, cleanDirectory, setUp, setUpMojo, setUpMojo
 
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
countTestCases, createResult, getName, run, run, runBare, runTest, setName, toString
 
Methods inherited from class junit.framework.Assert
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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

WarDependenciesAnalysisTest

public WarDependenciesAnalysisTest()
Method Detail

getPomFile

protected File getPomFile()
Description copied from class: AbstractWarExplodedMojoTest
Returns the pom configuration to use.

Specified by:
getPomFile in class AbstractWarExplodedMojoTest
Returns:
the pom configuration

getTestDirectory

protected File getTestDirectory()
Description copied from class: AbstractWarExplodedMojoTest
Returns the test directory to use.

Specified by:
getTestDirectory in class AbstractWarExplodedMojoTest
Returns:
the test directory

testNoChange

public void testNoChange()
                  throws Exception
Throws:
Exception

testRemovedDependency

public void testRemovedDependency()
                           throws Exception
Throws:
Exception

testDependencyWithUpdatedVersion

public void testDependencyWithUpdatedVersion()
                                      throws Exception
Throws:
Exception

testDependencyNowProvided

public void testDependencyNowProvided()
                               throws Exception
Throws:
Exception

doTestTwiceWithUpdatedDependency

protected void doTestTwiceWithUpdatedDependency(String testId,
                                                org.apache.maven.plugin.testing.stubs.ArtifactStub[] firstStubs,
                                                org.apache.maven.plugin.testing.stubs.ArtifactStub[] secondStubs,
                                                String[] firstCustomContent,
                                                String[] secondCustomContent)
                                         throws Exception
Throws:
Exception

setUpMojoWithCache

protected File setUpMojoWithCache(String testId,
                                  org.apache.maven.plugin.testing.stubs.ArtifactStub[] artifactStubs)
                           throws Exception
Configures the exploded mojo for the specified test.

Parameters:
testId - the id of the test
artifactStubs - the dependencies (may be null)
Returns:
the webapp directory
Throws:
Exception - if an error occurs while configuring the mojo


Copyright © 2002-2010 The Apache Software Foundation. All Rights Reserved.