org.apache.maven.wagon.http
Class HttpWagonTestCase

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by org.codehaus.plexus.PlexusTestCase
              extended by org.apache.maven.wagon.WagonTestCase
                  extended by org.apache.maven.wagon.StreamingWagonTestCase
                      extended by org.apache.maven.wagon.http.HttpWagonTestCase
All Implemented Interfaces:
junit.framework.Test

public abstract class HttpWagonTestCase
extends StreamingWagonTestCase

Version:
$Id: LightweightHttpWagonTest.java 680764 2008-07-29 16:45:51Z brett $

Field Summary
 
Fields inherited from class org.apache.maven.wagon.WagonTestCase
artifactDestFile, artifactSourceFile, checksumObserver, destFile, localRepository, localRepositoryPath, mockTransferListener, mockTransferListenerControl, POM, resource, sourceFile, testRepository
 
Fields inherited from class org.codehaus.plexus.PlexusTestCase
basedir, container
 
Constructor Summary
HttpWagonTestCase()
           
 
Method Summary
protected  void addConnectors(org.mortbay.jetty.Server server)
           
protected  void createContext(org.mortbay.jetty.Server server, java.io.File repositoryDirectory)
           
protected  org.mortbay.jetty.security.SecurityHandler createSecurityHandler()
           
protected  long getExpectedLastModifiedOnGet(org.apache.maven.wagon.repository.Repository repository, org.apache.maven.wagon.resource.Resource resource)
           
protected  java.io.File getRepositoryDirectory()
           
protected  java.lang.String getRepositoryUrl(org.mortbay.jetty.Server server)
           
 void runTestSecuredGet(org.apache.maven.wagon.authentication.AuthenticationInfo authInfo)
           
 void runTestSecuredPut(org.apache.maven.wagon.authentication.AuthenticationInfo authInfo)
           
 void runTestSecuredResourceExists(org.apache.maven.wagon.authentication.AuthenticationInfo authInfo)
           
protected abstract  void setHttpHeaders(org.apache.maven.wagon.StreamingWagon wagon, java.util.Properties properties)
           
protected  void setupWagonTestingFixtures()
           
protected  void tearDownWagonTestingFixtures()
           
 void testGet404()
           
 void testGet500()
           
 void testGetForbidden()
           
 void testGzipGet()
           
 void testHttpHeaders()
           
 void testProxiedRequest()
           
 void testProxiedRequestWithAuthentication()
           
 void testPut404()
           
 void testPut500()
           
 void testPutForbidden()
           
 void testResourceExists404()
           
 void testResourceExists500()
           
 void testResourceExistsForbidden()
           
 void testSecuredGet()
           
 void testSecuredGetUnauthorized()
           
 void testSecuredGetWrongPassword()
           
 void testSecuredPut()
           
 void testSecuredPutUnauthorized()
           
 void testSecuredPutWrongPassword()
           
 void testSecuredResourceExists()
           
 void testSecuredResourceExistsUnauthorized()
           
 void testSecuredResourceExistsWrongPassword()
           
 void testWagonGetFileList()
          Test Wagon#getFileList(String).
 
Methods inherited from class org.apache.maven.wagon.StreamingWagonTestCase
streamRoundTripTesting, testFailedGetIfNewerToStream, testFailedGetToStream, testStreamingWagon, testWagonGetIfNewerToStreamIsNewer, testWagonGetIfNewerToStreamIsOlder, testWagonGetIfNewerToStreamIsSame
 
Methods inherited from class org.apache.maven.wagon.WagonTestCase
assertGetIfNewerTest, assertNotExists, assertResourcesAreInRemoteSide, connectWagon, createDirectory, createFileRepository, createTransferEvent, customizeContext, disconnectWagon, fileRoundTripTesting, getAuthInfo, getExpectedContentLengthOnGet, getFile, getPermissions, getProtocol, getTestRepositoryUrl, getWagon, message, putFile, putFile, replaceMockForGet, replayMockForPut, setUp, setupGetIfNewerTest, setupRepositories, supportsGetIfNewer, testFailedGet, testFailedGetIfNewer, testWagon, testWagonGetFileListWhenDirectoryDoesNotExist, testWagonGetIfNewerIsNewer, testWagonGetIfNewerIsOlder, testWagonGetIfNewerIsSame, testWagonPutDirectory, testWagonPutDirectoryDeepDestination, testWagonPutDirectoryForDot, testWagonPutDirectoryWhenDirectoryAlreadyExists, testWagonResourceExists, testWagonResourceNotExists, verifyMock
 
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
 

Constructor Detail

HttpWagonTestCase

public HttpWagonTestCase()
Method Detail

setupWagonTestingFixtures

protected void setupWagonTestingFixtures()
                                  throws java.lang.Exception
Overrides:
setupWagonTestingFixtures in class WagonTestCase
Throws:
java.lang.Exception

createContext

protected void createContext(org.mortbay.jetty.Server server,
                             java.io.File repositoryDirectory)
                      throws java.io.IOException
Throws:
java.io.IOException

tearDownWagonTestingFixtures

protected void tearDownWagonTestingFixtures()
                                     throws java.lang.Exception
Overrides:
tearDownWagonTestingFixtures in class WagonTestCase
Throws:
java.lang.Exception

testWagonGetFileList

public void testWagonGetFileList()
                          throws java.lang.Exception
Description copied from class: WagonTestCase
Test Wagon#getFileList(String).

Overrides:
testWagonGetFileList in class WagonTestCase
Throws:
java.lang.Exception

testHttpHeaders

public void testHttpHeaders()
                     throws java.lang.Exception
Throws:
java.lang.Exception

setHttpHeaders

protected abstract void setHttpHeaders(org.apache.maven.wagon.StreamingWagon wagon,
                                       java.util.Properties properties)

addConnectors

protected void addConnectors(org.mortbay.jetty.Server server)

getRepositoryUrl

protected java.lang.String getRepositoryUrl(org.mortbay.jetty.Server server)

testGetForbidden

public void testGetForbidden()
                      throws java.lang.Exception
Throws:
java.lang.Exception

testGet404

public void testGet404()
                throws java.lang.Exception
Throws:
java.lang.Exception

testGet500

public void testGet500()
                throws java.lang.Exception
Throws:
java.lang.Exception

testResourceExistsForbidden

public void testResourceExistsForbidden()
                                 throws java.lang.Exception
Throws:
java.lang.Exception

testResourceExists404

public void testResourceExists404()
                           throws java.lang.Exception
Throws:
java.lang.Exception

testResourceExists500

public void testResourceExists500()
                           throws java.lang.Exception
Throws:
java.lang.Exception

getExpectedLastModifiedOnGet

protected long getExpectedLastModifiedOnGet(org.apache.maven.wagon.repository.Repository repository,
                                            org.apache.maven.wagon.resource.Resource resource)
Overrides:
getExpectedLastModifiedOnGet in class WagonTestCase

getRepositoryDirectory

protected java.io.File getRepositoryDirectory()

testGzipGet

public void testGzipGet()
                 throws java.lang.Exception
Throws:
java.lang.Exception

testProxiedRequest

public void testProxiedRequest()
                        throws java.lang.Exception
Throws:
java.lang.Exception

testProxiedRequestWithAuthentication

public void testProxiedRequestWithAuthentication()
                                          throws java.lang.Exception
Throws:
java.lang.Exception

testSecuredGetUnauthorized

public void testSecuredGetUnauthorized()
                                throws java.lang.Exception
Throws:
java.lang.Exception

testSecuredGetWrongPassword

public void testSecuredGetWrongPassword()
                                 throws java.lang.Exception
Throws:
java.lang.Exception

testSecuredGet

public void testSecuredGet()
                    throws java.lang.Exception
Throws:
java.lang.Exception

runTestSecuredGet

public void runTestSecuredGet(org.apache.maven.wagon.authentication.AuthenticationInfo authInfo)
                       throws java.lang.Exception
Throws:
java.lang.Exception

testSecuredResourceExistsUnauthorized

public void testSecuredResourceExistsUnauthorized()
                                           throws java.lang.Exception
Throws:
java.lang.Exception

testSecuredResourceExistsWrongPassword

public void testSecuredResourceExistsWrongPassword()
                                            throws java.lang.Exception
Throws:
java.lang.Exception

testSecuredResourceExists

public void testSecuredResourceExists()
                               throws java.lang.Exception
Throws:
java.lang.Exception

runTestSecuredResourceExists

public void runTestSecuredResourceExists(org.apache.maven.wagon.authentication.AuthenticationInfo authInfo)
                                  throws java.lang.Exception
Throws:
java.lang.Exception

createSecurityHandler

protected org.mortbay.jetty.security.SecurityHandler createSecurityHandler()

testPutForbidden

public void testPutForbidden()
                      throws java.lang.Exception
Throws:
java.lang.Exception

testPut404

public void testPut404()
                throws java.lang.Exception
Throws:
java.lang.Exception

testPut500

public void testPut500()
                throws java.lang.Exception
Throws:
java.lang.Exception

testSecuredPutUnauthorized

public void testSecuredPutUnauthorized()
                                throws java.lang.Exception
Throws:
java.lang.Exception

testSecuredPutWrongPassword

public void testSecuredPutWrongPassword()
                                 throws java.lang.Exception
Throws:
java.lang.Exception

testSecuredPut

public void testSecuredPut()
                    throws java.lang.Exception
Throws:
java.lang.Exception

runTestSecuredPut

public void runTestSecuredPut(org.apache.maven.wagon.authentication.AuthenticationInfo authInfo)
                       throws java.lang.Exception
Throws:
java.lang.Exception


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