org.apache.maven.artifact
Class AbstractArtifactComponentTestCase

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by org.codehaus.plexus.PlexusTestCase
              extended by org.apache.maven.artifact.AbstractArtifactComponentTestCase
All Implemented Interfaces:
junit.framework.Test
Direct Known Subclasses:
ArtifactDeployerTest, ArtifactInstallerTest, ArtifactResolverTest, DefaultArtifactResolverTest, DefaultUpdateCheckManagerTest

public abstract class AbstractArtifactComponentTestCase
extends org.codehaus.plexus.PlexusTestCase

Author:
Jason van Zyl

Field Summary
protected  org.apache.maven.artifact.factory.ArtifactFactory artifactFactory
           
protected  ArtifactRepositoryFactory artifactRepositoryFactory
           
 
Constructor Summary
AbstractArtifactComponentTestCase()
           
 
Method Summary
protected  void assertLocalArtifactNotPresent(Artifact artifact)
           
protected  void assertLocalArtifactPresent(Artifact artifact)
           
protected  void assertRemoteArtifactNotPresent(Artifact artifact)
           
protected  void assertRemoteArtifactPresent(Artifact artifact)
           
protected  ArtifactRepository badLocalRepository()
          Return an existing file, not a directory - causes creation to fail.
protected  ArtifactRepository badRemoteRepository()
           
protected abstract  String component()
           
protected  void createArtifact(Artifact artifact, ArtifactRepository repository)
           
protected  Artifact createArtifact(String artifactId, String version)
           
protected  Artifact createArtifact(String artifactId, String version, String type)
           
protected  Artifact createArtifact(String groupId, String artifactId, String version, String type)
           
protected  void createLocalArtifact(Artifact artifact)
           
protected  Artifact createLocalArtifact(String artifactId, String version)
           
protected  void createRemoteArtifact(Artifact artifact)
           
protected  Artifact createRemoteArtifact(String artifactId, String version)
           
protected  void deleteArtifact(Artifact artifact, ArtifactRepository repository)
           
protected  void deleteLocalArtifact(Artifact artifact)
           
protected  String getRepositoryLayout()
           
protected  RepositorySystemSession initRepoSession()
           
protected  ArtifactRepository localRepository()
           
protected  List<ArtifactRepository> remoteRepositories()
           
protected  ArtifactRepository remoteRepository()
           
protected  void setUp()
           
protected  void tearDown()
           
 
Methods inherited from class org.codehaus.plexus.PlexusTestCase
customizeComponentConfiguration, customizeContainerConfiguration, customizeContext, getBasedir, getClassLoader, getConfiguration, getConfiguration, getConfigurationName, getContainer, getCustomConfigurationName, getResourceAsStream, getTestConfiguration, getTestConfiguration, getTestFile, getTestFile, getTestPath, getTestPath, lookup, lookup, lookup, lookup, release, setupContainer
 
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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

artifactFactory

protected org.apache.maven.artifact.factory.ArtifactFactory artifactFactory

artifactRepositoryFactory

protected ArtifactRepositoryFactory artifactRepositoryFactory
Constructor Detail

AbstractArtifactComponentTestCase

public AbstractArtifactComponentTestCase()
Method Detail

setUp

protected void setUp()
              throws Exception
Overrides:
setUp in class org.codehaus.plexus.PlexusTestCase
Throws:
Exception

tearDown

protected void tearDown()
                 throws Exception
Overrides:
tearDown in class org.codehaus.plexus.PlexusTestCase
Throws:
Exception

component

protected abstract String component()

badLocalRepository

protected ArtifactRepository badLocalRepository()
                                         throws Exception
Return an existing file, not a directory - causes creation to fail.

Throws:
Exception

getRepositoryLayout

protected String getRepositoryLayout()

localRepository

protected ArtifactRepository localRepository()
                                      throws Exception
Throws:
Exception

remoteRepository

protected ArtifactRepository remoteRepository()
                                       throws Exception
Throws:
Exception

badRemoteRepository

protected ArtifactRepository badRemoteRepository()
                                          throws Exception
Throws:
Exception

assertRemoteArtifactPresent

protected void assertRemoteArtifactPresent(Artifact artifact)
                                    throws Exception
Throws:
Exception

assertLocalArtifactPresent

protected void assertLocalArtifactPresent(Artifact artifact)
                                   throws Exception
Throws:
Exception

assertRemoteArtifactNotPresent

protected void assertRemoteArtifactNotPresent(Artifact artifact)
                                       throws Exception
Throws:
Exception

assertLocalArtifactNotPresent

protected void assertLocalArtifactNotPresent(Artifact artifact)
                                      throws Exception
Throws:
Exception

remoteRepositories

protected List<ArtifactRepository> remoteRepositories()
                                               throws Exception
Throws:
Exception

createLocalArtifact

protected Artifact createLocalArtifact(String artifactId,
                                       String version)
                                throws Exception
Throws:
Exception

createRemoteArtifact

protected Artifact createRemoteArtifact(String artifactId,
                                        String version)
                                 throws Exception
Throws:
Exception

createLocalArtifact

protected void createLocalArtifact(Artifact artifact)
                            throws Exception
Throws:
Exception

createRemoteArtifact

protected void createRemoteArtifact(Artifact artifact)
                             throws Exception
Throws:
Exception

createArtifact

protected void createArtifact(Artifact artifact,
                              ArtifactRepository repository)
                       throws Exception
Throws:
Exception

createArtifact

protected Artifact createArtifact(String artifactId,
                                  String version)
                           throws Exception
Throws:
Exception

createArtifact

protected Artifact createArtifact(String artifactId,
                                  String version,
                                  String type)
                           throws Exception
Throws:
Exception

createArtifact

protected Artifact createArtifact(String groupId,
                                  String artifactId,
                                  String version,
                                  String type)
                           throws Exception
Throws:
Exception

deleteLocalArtifact

protected void deleteLocalArtifact(Artifact artifact)
                            throws Exception
Throws:
Exception

deleteArtifact

protected void deleteArtifact(Artifact artifact,
                              ArtifactRepository repository)
                       throws Exception
Throws:
Exception

initRepoSession

protected RepositorySystemSession initRepoSession()
                                           throws Exception
Throws:
Exception


Copyright © 2001-2013 The Apache Software Foundation. All Rights Reserved.