Class PostServletCreateTest
- java.lang.Object
-
- junit.framework.Assert
-
- junit.framework.TestCase
-
- org.apache.sling.commons.testing.integration.HttpTestBase
-
- org.apache.sling.launchpad.webapp.integrationtest.servlets.post.PostServletCreateTest
-
- All Implemented Interfaces:
junit.framework.Test
public class PostServletCreateTest extends org.apache.sling.commons.testing.integration.HttpTestBaseTest node creation via the SlingPostServlet
-
-
Field Summary
Fields Modifier and Type Field Description static StringSLASHstatic StringTEST_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 Summary
Constructors Constructor Description PostServletCreateTest()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidsetUp()voidtestCreateNode()voidtestCreateNodeAtDeepUrl()voidtestCreateNodeAtSpecificUrl()voidtestCreateNodeWithAlreadyUsedExactName()SLING-1091: test error reporting when attempting to create a node with an already used node name.voidtestCreateNodeWithExactName()SLING-1091: test create node with an exact node name (no filtering)voidtestCreateNodeWithExtension()voidtestCreateNodeWithInvalidExactName()SLING-1091: test error reporting when attempting to create a node with an invalid exact node name.voidtestCreateNodeWithStarAndExtension()voidtestCreateSubnodeProperty()Create a node with a propery in a subnode, and check (SLING-223)voidtestCreateWithData()Create a node with some data, and check that datavoidtestCreatingNodeUnderFile()voidtestCustomSavePrefix()SLING-394 removed :saveParamPrefix support.voidtestDefaultSavePrefix()Use the default "save prefix" on some parameters, and check that only those who have the prefix are saved.voidtestPostPathIsUnique()voidtestPostWithExtensionNoStar()voidtestPostWithExtensionSlashNoStar()-
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, tearDown, 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
-
-
-
-
Field Detail
-
TEST_BASE_PATH
public static final String TEST_BASE_PATH
- See Also:
- Constant Field Values
-
SLASH
public static final String SLASH
- See Also:
- Constant Field Values
-
-
Method Detail
-
setUp
protected void setUp() throws Exception- Overrides:
setUpin classorg.apache.sling.commons.testing.integration.HttpTestBase- Throws:
Exception
-
testPostPathIsUnique
public void testPostPathIsUnique() throws IOException- Throws:
IOException
-
testCreateNode
public void testCreateNode() throws IOException- Throws:
IOException
-
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
-
testCreateNodeAtDeepUrl
public void testCreateNodeAtDeepUrl() throws IOException- Throws:
IOException
-
testCreateWithData
public void testCreateWithData() throws IOExceptionCreate a node with some data, and check that data- Throws:
IOException
-
testCreateSubnodeProperty
public void testCreateSubnodeProperty() throws IOExceptionCreate a node with a propery in a subnode, and check (SLING-223)- Throws:
IOException
-
testDefaultSavePrefix
public void testDefaultSavePrefix() throws IOExceptionUse 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 IOExceptionSLING-394 removed :saveParamPrefix support. We check whether this is really ignored- Throws:
IOException
-
testCreateNodeWithExactName
public void testCreateNodeWithExactName() throws IOExceptionSLING-1091: test create node with an exact node name (no filtering)- Throws:
IOException
-
testCreateNodeWithInvalidExactName
public void testCreateNodeWithInvalidExactName() throws IOExceptionSLING-1091: test error reporting when attempting to create a node with an invalid exact node name.- Throws:
IOException
-
testCreateNodeWithAlreadyUsedExactName
public void testCreateNodeWithAlreadyUsedExactName() throws IOExceptionSLING-1091: test error reporting when attempting to create a node with an already used node name.- Throws:
IOException
-
testCreatingNodeUnderFile
public void testCreatingNodeUnderFile() throws IOException- Throws:
IOException
-
-