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.HttpTestBase
Test node creation via the SlingPostServlet
-
-
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 Summary
Constructors Constructor Description PostServletCreateTest()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
setUp()
void
testCreateNode()
void
testCreateNodeAtDeepUrl()
void
testCreateNodeAtSpecificUrl()
void
testCreateNodeWithAlreadyUsedExactName()
SLING-1091: test error reporting when attempting to create a node with an already used node name.void
testCreateNodeWithExactName()
SLING-1091: test create node with an exact node name (no filtering)void
testCreateNodeWithExtension()
void
testCreateNodeWithInvalidExactName()
SLING-1091: test error reporting when attempting to create a node with an invalid exact node name.void
testCreateNodeWithStarAndExtension()
void
testCreateSubnodeProperty()
Create a node with a propery in a subnode, and check (SLING-223)void
testCreateWithData()
Create a node with some data, and check that datavoid
testCreatingNodeUnderFile()
void
testCustomSavePrefix()
SLING-394 removed :saveParamPrefix support.void
testDefaultSavePrefix()
Use the default "save prefix" on some parameters, and check that only those who have the prefix are saved.void
testPostPathIsUnique()
void
testPostWithExtensionNoStar()
void
testPostWithExtensionSlashNoStar()
-
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:
setUp
in 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 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
-
testCreatingNodeUnderFile
public void testCreatingNodeUnderFile() throws IOException
- Throws:
IOException
-
-