|
||||||||||
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 File |
artifactDestFile
|
protected File |
artifactSourceFile
|
protected org.apache.maven.wagon.observers.ChecksumObserver |
checksumObserver
|
protected File |
destFile
|
protected org.apache.maven.wagon.repository.Repository |
localRepository
|
protected String |
localRepositoryPath
|
protected org.apache.maven.wagon.events.TransferListener |
mockTransferListener
|
protected org.easymock.MockControl |
mockTransferListenerControl
|
protected static String |
POM
|
protected String |
resource
|
protected 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 |
assertGetIfNewerTest(org.apache.maven.wagon.WagonTestCase.ProgressArgumentMatcher progressArgumentMatcher,
boolean expectedResult,
int expectedSize)
|
protected void |
assertNotExists(org.apache.maven.wagon.Wagon wagon,
String resourceName)
Assert that a resource does not exist in the remote wagon system |
protected void |
assertResourcesAreInRemoteSide(org.apache.maven.wagon.Wagon wagon,
List resourceNames)
|
protected void |
connectWagon(org.apache.maven.wagon.Wagon wagon)
|
protected void |
createDirectory(org.apache.maven.wagon.Wagon wagon,
String resourceToCreate,
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(String url)
|
protected org.apache.maven.wagon.events.TransferEvent |
createTransferEvent(org.apache.maven.wagon.Wagon wagon,
org.apache.maven.wagon.resource.Resource resource,
int eventType,
int requestType,
File file)
|
protected void |
customizeContext()
|
protected void |
disconnectWagon(org.apache.maven.wagon.Wagon wagon)
|
protected void |
fileRoundTripTesting()
|
protected org.apache.maven.wagon.authentication.AuthenticationInfo |
getAuthInfo()
|
protected int |
getExpectedContentLengthOnGet(int expectedSize)
|
protected long |
getExpectedLastModifiedOnGet(org.apache.maven.wagon.repository.Repository repository,
org.apache.maven.wagon.resource.Resource resource)
|
protected void |
getFile(int expectedSize)
|
protected org.apache.maven.wagon.repository.RepositoryPermissions |
getPermissions()
|
protected abstract String |
getProtocol()
Protocol id of the Wagon to use, eg. |
protected abstract String |
getTestRepositoryUrl()
URL of the repository. |
protected org.apache.maven.wagon.Wagon |
getWagon()
|
protected void |
message(String message)
|
protected int |
putFile()
|
protected void |
putFile(String resourceName,
String testFileName,
String content)
|
protected org.apache.maven.wagon.WagonTestCase.ProgressArgumentMatcher |
replaceMockForGet(org.apache.maven.wagon.Wagon wagon,
int expectedSize)
|
protected org.apache.maven.wagon.WagonTestCase.ProgressArgumentMatcher |
replayMockForPut(String resourceName,
String content,
org.apache.maven.wagon.Wagon wagon)
|
protected void |
setUp()
|
protected org.apache.maven.wagon.WagonTestCase.ProgressArgumentMatcher |
setupGetIfNewerTest(org.apache.maven.wagon.Wagon wagon,
boolean expectedResult,
int expectedSize)
|
protected void |
setupRepositories()
|
protected void |
setupWagonTestingFixtures()
|
protected boolean |
supportsGetIfNewer()
|
protected void |
tearDownWagonTestingFixtures()
|
void |
testFailedGet()
|
void |
testFailedGetIfNewer()
|
void |
testWagon()
|
void |
testWagonGetFileList()
Test Wagon.getFileList(String) . |
void |
testWagonGetFileListWhenDirectoryDoesNotExist()
Test Wagon.getFileList(String) when the directory does not exist. |
void |
testWagonGetIfNewerIsNewer()
|
void |
testWagonGetIfNewerIsOlder()
|
void |
testWagonGetIfNewerIsSame()
|
void |
testWagonPutDirectory()
|
void |
testWagonPutDirectoryDeepDestination()
Test for putting a directory with a destination that multiple directories deep, all of which haven't been created. |
void |
testWagonPutDirectoryForDot()
Test that when putting a directory that already exists new files get also copied and destination is "." |
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. |
protected void |
verifyMock(org.apache.maven.wagon.WagonTestCase.ProgressArgumentMatcher progressArgumentMatcher,
int length)
|
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 |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected static String POM
protected org.apache.maven.wagon.repository.Repository localRepository
protected org.apache.maven.wagon.repository.Repository testRepository
protected String localRepositoryPath
protected File sourceFile
protected File destFile
protected String resource
protected File artifactSourceFile
protected File artifactDestFile
protected org.apache.maven.wagon.observers.ChecksumObserver checksumObserver
protected org.apache.maven.wagon.events.TransferListener mockTransferListener
protected org.easymock.MockControl mockTransferListenerControl
Constructor Detail |
---|
public WagonTestCase()
Method Detail |
---|
protected void setUp() throws Exception
setUp
in class org.codehaus.plexus.PlexusTestCase
Exception
protected abstract String getTestRepositoryUrl() throws IOException
IOException
protected abstract String getProtocol()
scp
, ftp
protected void setupRepositories() throws Exception
Exception
protected void customizeContext() throws Exception
customizeContext
in class org.codehaus.plexus.PlexusTestCase
Exception
protected void setupWagonTestingFixtures() throws Exception
Exception
protected void tearDownWagonTestingFixtures() throws Exception
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 Exception
Exception
protected void message(String message)
public void testWagon() throws Exception
Exception
public void testWagonGetIfNewerIsNewer() throws Exception
Exception
protected boolean supportsGetIfNewer()
public void testWagonGetIfNewerIsOlder() throws Exception
Exception
public void testWagonGetIfNewerIsSame() throws Exception
Exception
protected void assertGetIfNewerTest(org.apache.maven.wagon.WagonTestCase.ProgressArgumentMatcher progressArgumentMatcher, boolean expectedResult, int expectedSize) throws IOException
IOException
protected org.apache.maven.wagon.WagonTestCase.ProgressArgumentMatcher setupGetIfNewerTest(org.apache.maven.wagon.Wagon wagon, boolean expectedResult, int expectedSize) throws NoSuchAlgorithmException, IOException
NoSuchAlgorithmException
IOException
public void testWagonPutDirectory() throws Exception
Exception
public void testWagonPutDirectoryDeepDestination() throws Exception
Exception
public void testWagonPutDirectoryWhenDirectoryAlreadyExists() throws Exception
Exception
public void testWagonPutDirectoryForDot() throws Exception
Exception
protected void createDirectory(org.apache.maven.wagon.Wagon wagon, String resourceToCreate, String dirName) throws Exception
wagon
- resourceToCreate
- name of the resource to be createddirName
- directory name to create
Exception
protected void assertResourcesAreInRemoteSide(org.apache.maven.wagon.Wagon wagon, List resourceNames) throws IOException, org.apache.maven.wagon.TransferFailedException, org.apache.maven.wagon.ResourceDoesNotExistException, org.apache.maven.wagon.authorization.AuthorizationException
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, String resourceName) throws IOException, org.apache.maven.wagon.TransferFailedException, org.apache.maven.wagon.authorization.AuthorizationException
wagon
- wagon to get the resource fromresourceName
- name of the resource
IOException
- if a temp file can't be created
org.apache.maven.wagon.authorization.AuthorizationException
TransferFailedException
public void testFailedGet() throws Exception
Exception
public void testFailedGetIfNewer() throws Exception
Exception
public void testWagonGetFileList() throws Exception
Wagon.getFileList(String)
.
Exception
public void testWagonGetFileListWhenDirectoryDoesNotExist() throws Exception
Wagon.getFileList(String)
when the directory does not exist.
Exception
public void testWagonResourceExists() throws Exception
Exception
public void testWagonResourceNotExists() throws Exception
Exception
protected void putFile(String resourceName, String testFileName, String content) throws Exception
Exception
protected org.apache.maven.wagon.WagonTestCase.ProgressArgumentMatcher replayMockForPut(String resourceName, String content, org.apache.maven.wagon.Wagon wagon)
protected org.apache.maven.wagon.events.TransferEvent createTransferEvent(org.apache.maven.wagon.Wagon wagon, org.apache.maven.wagon.resource.Resource resource, int eventType, int requestType, File file)
protected int putFile() throws Exception
Exception
protected void getFile(int expectedSize) throws Exception
Exception
protected void verifyMock(org.apache.maven.wagon.WagonTestCase.ProgressArgumentMatcher progressArgumentMatcher, int length)
protected void disconnectWagon(org.apache.maven.wagon.Wagon wagon) throws org.apache.maven.wagon.ConnectionException
org.apache.maven.wagon.ConnectionException
protected void connectWagon(org.apache.maven.wagon.Wagon wagon) throws org.apache.maven.wagon.ConnectionException, org.apache.maven.wagon.authentication.AuthenticationException
org.apache.maven.wagon.ConnectionException
org.apache.maven.wagon.authentication.AuthenticationException
protected org.apache.maven.wagon.WagonTestCase.ProgressArgumentMatcher replaceMockForGet(org.apache.maven.wagon.Wagon wagon, int expectedSize)
protected int getExpectedContentLengthOnGet(int expectedSize)
protected long getExpectedLastModifiedOnGet(org.apache.maven.wagon.repository.Repository repository, org.apache.maven.wagon.resource.Resource resource)
protected void fileRoundTripTesting() throws Exception
Exception
protected org.apache.maven.wagon.repository.Repository createFileRepository(String url)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |