Class PostServletCreateTest

  • All Implemented Interfaces:
    junit.framework.Test

    public class PostServletCreateTest
    extends org.apache.sling.commons.testing.integration.HttpTestBase
    Test node creation via the SlingPostServlet
    • Nested Class Summary

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

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

      Fields 
      Modifier and Type Field Description
      static String SLASH  
      static String TEST_BASE_PATH  
      • 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, DEFAULT_READINESS_MEDIA_TYPE, EXECUTE_RESOURCE_TYPE, HTTP_BASE_URL, HTTP_METHOD_GET, HTTP_METHOD_POST, HTTP_URL, httpClient, MAX_READY_URL_INDEX, PROPERTY_SKIP_STARTUP_CHECK, READINESS_MEDIA_TYPE_PROP, READY_TIMEOUT_SECONDS, READY_URL_PROP_PREFIX, SERVLET_CONTEXT, SLING_POST_SERVLET_CREATE_SUFFIX, SLING_RESOURCE_TYPE, TEST_PATH, testClient, urlsToDelete, WEBDAV_BASE_URL
    • Constructor Detail

      • PostServletCreateTest

        public PostServletCreateTest()
    • Method Detail

      • setUp

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

        public void testCreateNodeWithExtension()
                                         throws IOException
        Throws:
        IOException
      • testCreateNodeWithStarAndExtension

        public void testCreateNodeWithStarAndExtension()
                                                throws IOException
        Throws:
        IOException
      • testPostWithExtensionNoStar

        public void testPostWithExtensionNoStar()
                                         throws IOException
        Throws:
        IOException
      • testPostWithExtensionSlashNoStar

        public void testPostWithExtensionSlashNoStar()
                                              throws IOException
        Throws:
        IOException
      • testCreateNodeAtSpecificUrl

        public void testCreateNodeAtSpecificUrl()
                                         throws IOException
        Throws:
        IOException
      • testCreateWithData

        public void testCreateWithData()
                                throws IOException
        Create a node with some data, and check that data
        Throws:
        IOException
      • testCreateSubnodeProperty

        public void testCreateSubnodeProperty()
                                       throws IOException
        Create a node with a propery in a subnode, and check (SLING-223)
        Throws:
        IOException
      • testDefaultSavePrefix

        public void testDefaultSavePrefix()
                                   throws IOException
        Use the default "save prefix" on some parameters, and check that only those who have the prefix are saved.
        Throws:
        IOException
      • testCustomSavePrefix

        public void testCustomSavePrefix()
                                  throws IOException
        SLING-394 removed :saveParamPrefix support. We check whether this is really ignored
        Throws:
        IOException
      • testCreateNodeWithExactName

        public void testCreateNodeWithExactName()
                                         throws IOException
        SLING-1091: test create node with an exact node name (no filtering)
        Throws:
        IOException
      • testCreateNodeWithInvalidExactName

        public void testCreateNodeWithInvalidExactName()
                                                throws IOException
        SLING-1091: test error reporting when attempting to create a node with an invalid exact node name.
        Throws:
        IOException
      • testCreateNodeWithAlreadyUsedExactName

        public void testCreateNodeWithAlreadyUsedExactName()
                                                    throws IOException
        SLING-1091: test error reporting when attempting to create a node with an already used node name.
        Throws:
        IOException