|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjunit.framework.Assert
junit.framework.TestCase
org.codehaus.plexus.PlexusTestCase
org.apache.maven.wagon.WagonTestCase
public abstract class WagonTestCase
Field Summary | |
---|---|
protected java.io.File |
artifactDestFile
|
protected java.io.File |
artifactSourceFile
|
protected org.apache.maven.wagon.observers.ChecksumObserver |
checksumObserver
|
protected java.io.File |
destFile
|
protected org.apache.maven.wagon.repository.Repository |
localRepository
|
protected java.lang.String |
localRepositoryPath
|
protected static java.lang.String |
POM
|
protected java.lang.String |
resource
|
protected java.io.File |
sourceFile
|
protected org.apache.maven.wagon.repository.Repository |
testRepository
|
Fields inherited from class org.codehaus.plexus.PlexusTestCase |
---|
basedir, container |
Constructor Summary | |
---|---|
WagonTestCase()
|
Method Summary | |
---|---|
protected void |
assertNotExists(org.apache.maven.wagon.Wagon wagon,
java.lang.String resourceName)
Assert that a resource does not exist in the remote wagon system |
protected void |
assertResourcesAreInRemoteSide(org.apache.maven.wagon.Wagon wagon,
java.util.List resourceNames)
|
protected void |
createDirectory(org.apache.maven.wagon.Wagon wagon,
java.lang.String resourceToCreate,
java.lang.String dirName)
Create a directory with a resource and check that the other ones don't exist |
protected org.apache.maven.wagon.repository.Repository |
createFileRepository(java.lang.String url)
|
protected void |
customizeContext()
|
protected void |
fileRoundTripTesting()
|
protected org.apache.maven.wagon.authentication.AuthenticationInfo |
getAuthInfo()
|
protected void |
getFile()
|
protected org.apache.maven.wagon.repository.RepositoryPermissions |
getPermissions()
|
protected abstract java.lang.String |
getProtocol()
Protocol id of the Wagon to use, eg. |
protected abstract java.lang.String |
getTestRepositoryUrl()
URL of the repository. |
protected org.apache.maven.wagon.Wagon |
getWagon()
|
private void |
message(java.lang.String message)
|
protected void |
putFile()
|
protected void |
putFile(java.lang.String resourceName,
java.lang.String testFileName,
java.lang.String content)
|
protected void |
setUp()
|
protected void |
setupRepositories()
|
protected void |
setupWagonTestingFixtures()
|
protected void |
tearDownWagonTestingFixtures()
|
void |
testFailedGet()
|
void |
testWagon()
|
void |
testWagonGetFileList()
Test Wagon.getFileList(String) . |
void |
testWagonGetFileListWhenDirectoryDoesNotExist()
Test Wagon.getFileList(String) when the directory does not exist. |
void |
testWagonPutDirectory()
|
void |
testWagonPutDirectoryDeepDestination()
Test for putting a directory with a destination that multiple directories deep, all of which haven't been created. |
void |
testWagonPutDirectoryWhenDirectoryAlreadyExists()
Test that when putting a directory that already exists new files get also copied |
void |
testWagonResourceExists()
Test for an existing resource. |
void |
testWagonResourceNotExists()
Test for an invalid resource. |
private void |
writeTestFile(java.lang.String child)
|
Methods inherited from class org.codehaus.plexus.PlexusTestCase |
---|
createContainerInstance, 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, failNotEquals, failNotSame, failSame |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected static java.lang.String POM
protected org.apache.maven.wagon.repository.Repository localRepository
protected org.apache.maven.wagon.repository.Repository testRepository
protected java.lang.String localRepositoryPath
protected java.io.File sourceFile
protected java.io.File destFile
protected java.lang.String resource
protected java.io.File artifactSourceFile
protected java.io.File artifactDestFile
protected org.apache.maven.wagon.observers.ChecksumObserver checksumObserver
Constructor Detail |
---|
public WagonTestCase()
Method Detail |
---|
protected void setUp() throws java.lang.Exception
setUp
in class org.codehaus.plexus.PlexusTestCase
java.lang.Exception
protected abstract java.lang.String getTestRepositoryUrl() throws java.io.IOException
java.io.IOException
protected abstract java.lang.String getProtocol()
scp
, ftp
protected void setupRepositories() throws java.lang.Exception
java.lang.Exception
protected void customizeContext() throws java.lang.Exception
customizeContext
in class org.codehaus.plexus.PlexusTestCase
java.lang.Exception
protected void setupWagonTestingFixtures() throws java.lang.Exception
java.lang.Exception
protected void tearDownWagonTestingFixtures() throws java.lang.Exception
java.lang.Exception
protected org.apache.maven.wagon.authentication.AuthenticationInfo getAuthInfo()
protected org.apache.maven.wagon.repository.RepositoryPermissions getPermissions()
protected org.apache.maven.wagon.Wagon getWagon() throws java.lang.Exception
java.lang.Exception
private void message(java.lang.String message)
public void testWagon() throws java.lang.Exception
java.lang.Exception
public void testWagonPutDirectory() throws java.lang.Exception
java.lang.Exception
public void testWagonPutDirectoryDeepDestination() throws java.lang.Exception
java.lang.Exception
public void testWagonPutDirectoryWhenDirectoryAlreadyExists() throws java.lang.Exception
java.lang.Exception
protected void createDirectory(org.apache.maven.wagon.Wagon wagon, java.lang.String resourceToCreate, java.lang.String dirName) throws java.lang.Exception
wagon
- resourceToCreate
- name of the resource to be createddirName
- directory name to create
java.lang.Exception
protected void assertResourcesAreInRemoteSide(org.apache.maven.wagon.Wagon wagon, java.util.List resourceNames) throws java.io.IOException, org.apache.maven.wagon.TransferFailedException, org.apache.maven.wagon.ResourceDoesNotExistException, org.apache.maven.wagon.authorization.AuthorizationException
java.io.IOException
org.apache.maven.wagon.TransferFailedException
org.apache.maven.wagon.ResourceDoesNotExistException
org.apache.maven.wagon.authorization.AuthorizationException
protected void assertNotExists(org.apache.maven.wagon.Wagon wagon, java.lang.String resourceName) throws java.io.IOException, org.apache.maven.wagon.TransferFailedException, org.apache.maven.wagon.authorization.AuthorizationException
wagon
- wagon to get the resource fromresourceName
- name of the resource
java.io.IOException
- if a temp file can't be created
org.apache.maven.wagon.authorization.AuthorizationException
TransferFailedException
private void writeTestFile(java.lang.String child) throws java.io.IOException
java.io.IOException
public void testFailedGet() throws java.lang.Exception
java.lang.Exception
public void testWagonGetFileList() throws java.lang.Exception
Wagon.getFileList(String)
.
java.lang.Exception
public void testWagonGetFileListWhenDirectoryDoesNotExist() throws java.lang.Exception
Wagon.getFileList(String)
when the directory does not exist.
java.lang.Exception
public void testWagonResourceExists() throws java.lang.Exception
java.lang.Exception
public void testWagonResourceNotExists() throws java.lang.Exception
java.lang.Exception
protected void putFile(java.lang.String resourceName, java.lang.String testFileName, java.lang.String content) throws java.lang.Exception
java.lang.Exception
protected void putFile() throws java.lang.Exception
java.lang.Exception
protected void getFile() throws java.lang.Exception
java.lang.Exception
protected void fileRoundTripTesting() throws java.lang.Exception
java.lang.Exception
protected org.apache.maven.wagon.repository.Repository createFileRepository(java.lang.String url)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |