org.apache.sling.launchpad.webapp.integrationtest.servlets.resolution
Class PathsServletTest

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by org.apache.sling.commons.testing.integration.HttpTestBase
              extended by org.apache.sling.launchpad.webapp.integrationtest.servlets.resolution.PathsServletTest
All Implemented Interfaces:
junit.framework.Test

public class PathsServletTest
extends HttpTestBase


Nested Class Summary
 
Nested classes/interfaces inherited from class org.apache.sling.commons.testing.integration.HttpTestBase
HttpTestBase.TestNode
 
Field Summary
static String CLASS_PROP
           
static String EXT_SERVLET_SUFFIX
           
static String HTML_DEFAULT_SERVLET_SUFFIX
           
static String NONEXISTING_RESOURCE_URL
           
static String PATHS_SERVLET_SUFFIX
           
static String PREFIX_0_SERVLET_SUFFIX
           
static String PREFIX_M1_SERVLET_SUFFIX
           
static String PUT_SERVLET_SUFFIX
           
static String REQUEST_URI_OPTING_SERVLET_SUFFIX
           
static String SEL_SERVLET_SUFFIX
           
static String TEST_RESOURCE_TYPE
           
static String TEST_SERVLET_MARKER
           
protected  HttpTestBase.TestNode testNodeNORT
           
protected  HttpTestBase.TestNode testNodeRT
           
static String WAR_SEL_SERVLET_SUFFIX
           
 
Fields inherited from class org.apache.sling.commons.testing.integration.HttpTestBase
CONTENT_TYPE_CSS, CONTENT_TYPE_DONTCARE, CONTENT_TYPE_HTML, CONTENT_TYPE_JS, CONTENT_TYPE_JSON, CONTENT_TYPE_PLAIN, CONTENT_TYPE_XML, DEFAULT_EXT, EXECUTE_RESOURCE_TYPE, HTTP_BASE_URL, httpClient, READY_TIMEOUT_SECONDS, SERVLET_CONTEXT, SLING_POST_SERVLET_CREATE_SUFFIX, SLING_RESOURCE_TYPE, testClient, urlsToDelete, WEBDAV_BASE_URL
 
Constructor Summary
PathsServletTest()
           
 
Method Summary
protected  void assertNotTestServlet(String content)
          Assert that content does not contain TEST_SERVLET_MARKER
protected  void assertServlet(String content, String expectedSuffix)
          Asserts that the given content is in Properties format and contains a property named CLASS_PROP that ends with expected suffix
protected  void setUp()
           
protected  void tearDown()
           
 void testGetCorrectPaths()
           
 void testSubpath()
           
 
Methods inherited from class org.apache.sling.commons.testing.integration.HttpTestBase
assertHttpStatus, assertHttpStatus, assertJavascript, assertJavascript, assertPostStatus, executeScript, executeScript, getContent, getContent, getContent, getResponseBodyAsStream, removeEndingSlash, slingServerReady, uploadTestScript, waitForSlingStartup
 
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
 

Field Detail

CLASS_PROP

public static final String CLASS_PROP
See Also:
Constant Field Values

TEST_SERVLET_MARKER

public static final String TEST_SERVLET_MARKER
See Also:
Constant Field Values

TEST_RESOURCE_TYPE

public static final String TEST_RESOURCE_TYPE
See Also:
Constant Field Values

NONEXISTING_RESOURCE_URL

public static final String NONEXISTING_RESOURCE_URL

EXT_SERVLET_SUFFIX

public static final String EXT_SERVLET_SUFFIX
See Also:
Constant Field Values

SEL_SERVLET_SUFFIX

public static final String SEL_SERVLET_SUFFIX
See Also:
Constant Field Values

WAR_SEL_SERVLET_SUFFIX

public static final String WAR_SEL_SERVLET_SUFFIX
See Also:
Constant Field Values

PREFIX_0_SERVLET_SUFFIX

public static final String PREFIX_0_SERVLET_SUFFIX
See Also:
Constant Field Values

PREFIX_M1_SERVLET_SUFFIX

public static final String PREFIX_M1_SERVLET_SUFFIX
See Also:
Constant Field Values

PUT_SERVLET_SUFFIX

public static final String PUT_SERVLET_SUFFIX
See Also:
Constant Field Values

HTML_DEFAULT_SERVLET_SUFFIX

public static final String HTML_DEFAULT_SERVLET_SUFFIX
See Also:
Constant Field Values

REQUEST_URI_OPTING_SERVLET_SUFFIX

public static final String REQUEST_URI_OPTING_SERVLET_SUFFIX
See Also:
Constant Field Values

PATHS_SERVLET_SUFFIX

public static final String PATHS_SERVLET_SUFFIX
See Also:
Constant Field Values

testNodeNORT

protected HttpTestBase.TestNode testNodeNORT

testNodeRT

protected HttpTestBase.TestNode testNodeRT
Constructor Detail

PathsServletTest

public PathsServletTest()
Method Detail

testGetCorrectPaths

public void testGetCorrectPaths()
                         throws Exception
Throws:
Exception

testSubpath

public void testSubpath()
                 throws Exception
Throws:
Exception

setUp

protected void setUp()
              throws Exception
Overrides:
setUp in class HttpTestBase
Throws:
Exception

tearDown

protected void tearDown()
                 throws Exception
Overrides:
tearDown in class HttpTestBase
Throws:
Exception

assertServlet

protected void assertServlet(String content,
                             String expectedSuffix)
                      throws IOException
Asserts that the given content is in Properties format and contains a property named CLASS_PROP that ends with expected suffix

Throws:
IOException

assertNotTestServlet

protected void assertNotTestServlet(String content)
Assert that content does not contain TEST_SERVLET_MARKER



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