org.apache.maven.shared.release.phase
Class AbstractRewritingReleasePhaseTestCase

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by org.codehaus.plexus.PlexusTestCase
              extended by org.apache.maven.shared.release.phase.AbstractReleaseTestCase
                  extended by org.apache.maven.shared.release.phase.AbstractRewritingReleasePhaseTestCase
All Implemented Interfaces:
Test
Direct Known Subclasses:
AbstractEditModeRewritingReleasePhaseTestCase, GenerateReleasePomsPhaseTest

public abstract class AbstractRewritingReleasePhaseTestCase
extends AbstractReleaseTestCase

Base class with tests for rewriting POMs.

Author:
Brett Porter

Field Summary
 
Fields inherited from class org.apache.maven.shared.release.phase.AbstractReleaseTestCase
localRepository, phase, projectBuilder
 
Fields inherited from class org.codehaus.plexus.PlexusTestCase
basedir, container
 
Constructor Summary
AbstractRewritingReleasePhaseTestCase()
           
 
Method Summary
protected abstract  ReleaseDescriptor createConfigurationForPomWithParentAlternateNextVersion(List<MavenProject> reactorProjects)
           
protected abstract  ReleaseDescriptor createConfigurationForWithParentNextVersion(List<MavenProject> reactorProjects)
           
protected  ReleaseDescriptor createDefaultConfiguration(List<MavenProject> reactorProjects)
           
protected  ReleaseDescriptor createDescriptorFromBasicPom(List<MavenProject> reactorProjects)
           
protected  ReleaseDescriptor createDescriptorFromProjects(List<MavenProject> reactorProjects)
           
protected  ReleaseDescriptor createMappedConfiguration(List<MavenProject> reactorProjects)
           
protected  List<MavenProject> createReactorProjects(String path)
           
protected  List<MavenProject> createReactorProjectsFromBasicPom()
           
protected  ReleaseDescriptor createUnmappedConfiguration(List<MavenProject> reactorProjects)
           
protected abstract  void mapAlternateNextVersion(ReleaseDescriptor config, String projectId)
           
protected abstract  void mapNextVersion(ReleaseDescriptor config, String projectId)
           
protected abstract  List<MavenProject> prepareReactorProjects(String path, boolean copyFiles)
           
protected abstract  String readTestProjectFile(String fileName)
           
 void testCleanNoProjects()
           
 void testRewriteAddSchema()
           
 void testRewriteBasicPom()
           
 void testRewriteBasicPomEntities()
           
 void testRewriteBasicPomNamespace()
           
 void testRewriteBasicPomWithEncoding()
           
 void testRewriteBasicPomWithNoSuchProviderException()
           
 void testRewriteBasicPomWithScmRepoException()
           
 void testRewriteCDataAroundValues()
           
 void testRewriteCommentsAroundValues()
           
 void testRewriteManagedPomDependencies()
           
 void testRewriteManagedPomPlugins()
           
 void testRewriteManagedPomUnmappedDependencies()
           
 void testRewriteManagedPomUnmappedPlugins()
           
 void testRewritePomDependencies()
           
 void testRewritePomDependenciesDifferentVersion()
           
 void testRewritePomDependenciesWithNamespace()
           
 void testRewritePomExtension()
           
 void testRewritePomExtensionDifferentVersion()
           
 void testRewritePomExtensionUndefinedVersion()
           
 void testRewritePomPlugins()
           
 void testRewritePomPluginsDifferentVersion()
           
 void testRewritePomReportPlugins()
           
 void testRewritePomReportPluginsDifferentVersion()
           
 void testRewritePomUnmappedDependencies()
           
 void testRewritePomUnmappedExtension()
           
 void testRewritePomUnmappedPlugins()
           
 void testRewritePomUnmappedReportPlugins()
           
 void testRewritePomWithChangedInheritedVersion()
           
 void testRewritePomWithInheritedVersion()
           
 void testRewritePomWithParent()
           
 void testRewritePomWithReleasedParent()
           
 void testRewritePomWithUnmappedParent()
           
 void testRewriteUnmappedPom()
           
 void testRewriteWhitespaceAroundValues()
           
 void testSimulateRewriteEditModeSkipped()
           
protected abstract  void unmapNextVersion(ReleaseDescriptor config, String projectId)
           
protected  void verifyReactorProjects(String path, boolean copyFiles)
           
 
Methods inherited from class org.apache.maven.shared.release.phase.AbstractReleaseTestCase
comparePomFiles, comparePomFiles, comparePomFiles, comparePomFiles, comparePomFiles, comparePomFiles, comparePomFiles, comparePomFiles, createReactorProjects, createReactorProjects, getPath, getProjectsAsMap, setUp, tearDown
 
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
 
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, failNotEquals, failNotSame, failSame, format
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AbstractRewritingReleasePhaseTestCase

public AbstractRewritingReleasePhaseTestCase()
Method Detail

testRewriteBasicPom

public void testRewriteBasicPom()
                         throws Exception
Throws:
Exception

testRewriteBasicPomEntities

public void testRewriteBasicPomEntities()
                                 throws Exception
Throws:
Exception

testRewriteBasicPomNamespace

public void testRewriteBasicPomNamespace()
                                  throws Exception
Throws:
Exception

testRewriteBasicPomWithEncoding

public void testRewriteBasicPomWithEncoding()
                                     throws Exception
Throws:
Exception

testRewritePomWithParent

public void testRewritePomWithParent()
                              throws Exception
Throws:
Exception

testRewritePomWithUnmappedParent

public void testRewritePomWithUnmappedParent()
                                      throws Exception
Throws:
Exception

testRewritePomWithReleasedParent

public void testRewritePomWithReleasedParent()
                                      throws Exception
Throws:
Exception

mapAlternateNextVersion

protected abstract void mapAlternateNextVersion(ReleaseDescriptor config,
                                                String projectId)

testRewritePomWithInheritedVersion

public void testRewritePomWithInheritedVersion()
                                        throws Exception
Throws:
Exception

testRewritePomWithChangedInheritedVersion

public void testRewritePomWithChangedInheritedVersion()
                                               throws Exception
Throws:
Exception

createConfigurationForPomWithParentAlternateNextVersion

protected abstract ReleaseDescriptor createConfigurationForPomWithParentAlternateNextVersion(List<MavenProject> reactorProjects)
                                                                                      throws Exception
Throws:
Exception

testRewritePomDependencies

public void testRewritePomDependencies()
                                throws Exception
Throws:
Exception

testRewritePomUnmappedDependencies

public void testRewritePomUnmappedDependencies()
                                        throws Exception
Throws:
Exception

testRewritePomDependenciesDifferentVersion

public void testRewritePomDependenciesDifferentVersion()
                                                throws Exception
Throws:
Exception

testRewriteManagedPomDependencies

public void testRewriteManagedPomDependencies()
                                       throws Exception
Throws:
Exception

testRewriteManagedPomUnmappedDependencies

public void testRewriteManagedPomUnmappedDependencies()
                                               throws Exception
Throws:
Exception

testRewritePomPlugins

public void testRewritePomPlugins()
                           throws Exception
Throws:
Exception

testRewritePomUnmappedPlugins

public void testRewritePomUnmappedPlugins()
                                   throws Exception
Throws:
Exception

testRewritePomPluginsDifferentVersion

public void testRewritePomPluginsDifferentVersion()
                                           throws Exception
Throws:
Exception

testRewriteManagedPomPlugins

public void testRewriteManagedPomPlugins()
                                  throws Exception
Throws:
Exception

testRewriteManagedPomUnmappedPlugins

public void testRewriteManagedPomUnmappedPlugins()
                                          throws Exception
Throws:
Exception

testRewritePomReportPlugins

public void testRewritePomReportPlugins()
                                 throws Exception
Throws:
Exception

testRewritePomUnmappedReportPlugins

public void testRewritePomUnmappedReportPlugins()
                                         throws Exception
Throws:
Exception

testRewritePomReportPluginsDifferentVersion

public void testRewritePomReportPluginsDifferentVersion()
                                                 throws Exception
Throws:
Exception

testRewritePomExtension

public void testRewritePomExtension()
                             throws Exception
Throws:
Exception

testRewritePomUnmappedExtension

public void testRewritePomUnmappedExtension()
                                     throws Exception
Throws:
Exception

testRewritePomExtensionDifferentVersion

public void testRewritePomExtensionDifferentVersion()
                                             throws Exception
Throws:
Exception

testRewritePomExtensionUndefinedVersion

public void testRewritePomExtensionUndefinedVersion()
                                             throws Exception
Throws:
Exception

testRewriteAddSchema

public void testRewriteAddSchema()
                          throws Exception
Throws:
Exception

testSimulateRewriteEditModeSkipped

public void testSimulateRewriteEditModeSkipped()
                                        throws Exception
Throws:
Exception

testRewriteUnmappedPom

public void testRewriteUnmappedPom()
                            throws Exception
Throws:
Exception

testRewriteBasicPomWithScmRepoException

public void testRewriteBasicPomWithScmRepoException()
                                             throws Exception
Throws:
Exception

testRewriteBasicPomWithNoSuchProviderException

public void testRewriteBasicPomWithNoSuchProviderException()
                                                    throws Exception
Throws:
Exception

testRewriteWhitespaceAroundValues

public void testRewriteWhitespaceAroundValues()
                                       throws Exception
Throws:
Exception

testRewriteCommentsAroundValues

public void testRewriteCommentsAroundValues()
                                     throws Exception
Throws:
Exception

testRewriteCDataAroundValues

public void testRewriteCDataAroundValues()
                                  throws Exception
Throws:
Exception

testCleanNoProjects

public void testCleanNoProjects()
                         throws Exception
Throws:
Exception

createUnmappedConfiguration

protected ReleaseDescriptor createUnmappedConfiguration(List<MavenProject> reactorProjects)
                                                 throws Exception
Throws:
Exception

createReactorProjects

protected List<MavenProject> createReactorProjects(String path)
                                            throws Exception
Throws:
Exception

createDefaultConfiguration

protected ReleaseDescriptor createDefaultConfiguration(List<MavenProject> reactorProjects)
                                                throws Exception
Throws:
Exception

createMappedConfiguration

protected ReleaseDescriptor createMappedConfiguration(List<MavenProject> reactorProjects)
                                               throws Exception
Throws:
Exception

createReactorProjectsFromBasicPom

protected List<MavenProject> createReactorProjectsFromBasicPom()
                                                        throws Exception
Throws:
Exception

createConfigurationForWithParentNextVersion

protected abstract ReleaseDescriptor createConfigurationForWithParentNextVersion(List<MavenProject> reactorProjects)
                                                                          throws Exception
Throws:
Exception

unmapNextVersion

protected abstract void unmapNextVersion(ReleaseDescriptor config,
                                         String projectId)

mapNextVersion

protected abstract void mapNextVersion(ReleaseDescriptor config,
                                       String projectId)

createDescriptorFromBasicPom

protected ReleaseDescriptor createDescriptorFromBasicPom(List<MavenProject> reactorProjects)
                                                  throws Exception
Throws:
Exception

readTestProjectFile

protected abstract String readTestProjectFile(String fileName)
                                       throws IOException
Throws:
IOException

testRewritePomDependenciesWithNamespace

public void testRewritePomDependenciesWithNamespace()
                                             throws Exception
Throws:
Exception

prepareReactorProjects

protected abstract List<MavenProject> prepareReactorProjects(String path,
                                                             boolean copyFiles)
                                                      throws Exception
Throws:
Exception

verifyReactorProjects

protected void verifyReactorProjects(String path,
                                     boolean copyFiles)
                              throws Exception
Throws:
Exception

createDescriptorFromProjects

protected ReleaseDescriptor createDescriptorFromProjects(List<MavenProject> reactorProjects)


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