Class SelectorServletTest

  • All Implemented Interfaces:
    junit.framework.Test

    public class SelectorServletTest
    extends org.apache.sling.commons.testing.integration.HttpTestBase
    Test the SelectorServlet
    • Nested Class Summary

      • Nested classes/interfaces inherited from class org.apache.sling.commons.testing.integration.HttpTestBase

        org.apache.sling.commons.testing.integration.HttpTestBase.TestNode
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      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 Properties getTestServletProperties​(String content)  
      protected void setUp()  
      protected void tearDown()  
      void testPostWithSelector()  
      void testSelectorOne()  
      void testSelectorOther()  
      void testSelectorTwo()  
      • Methods inherited from class org.apache.sling.commons.testing.integration.HttpTestBase

        assertHttpStatus, assertHttpStatus, assertJavascript, assertJavascript, assertPostStatus, executeScript, executeScript, getContent, getContent, getContent, getContent, getDefaultCredentials, getResponseBodyAsStream, isBundleVersionAtLeast, removeEndingSlash, setReadinessContentType, slingServerReady, uploadTestScript, waitForSlingStartup
      • Methods inherited from class junit.framework.TestCase

        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, countTestCases, createResult, fail, fail, failNotEquals, failNotSame, failSame, format, getName, run, run, runBare, runTest, setName, toString
    • Constructor Detail

      • SelectorServletTest

        public SelectorServletTest()
    • Method Detail

      • testPostWithSelector

        public void testPostWithSelector()
                                  throws Exception
        Throws:
        Exception
      • setUp

        protected void setUp()
                      throws Exception
        Overrides:
        setUp in class org.apache.sling.commons.testing.integration.HttpTestBase
        Throws:
        Exception
      • tearDown

        protected void tearDown()
                         throws Exception
        Overrides:
        tearDown in class org.apache.sling.commons.testing.integration.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