incubator-sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bdelacre...@apache.org
Subject svn commit: r599494 - /incubator/sling/trunk/microsling/microsling-core/src/test/java/org/apache/sling/microsling/integration/microjax/PostServletCreateTest.java
Date Thu, 29 Nov 2007 15:53:18 GMT
Author: bdelacretaz
Date: Thu Nov 29 07:53:17 2007
New Revision: 599494

URL: http://svn.apache.org/viewvc?rev=599494&view=rev
Log:
SLING-102, added test to demonstrate deep-creation of nodes

Modified:
    incubator/sling/trunk/microsling/microsling-core/src/test/java/org/apache/sling/microsling/integration/microjax/PostServletCreateTest.java

Modified: incubator/sling/trunk/microsling/microsling-core/src/test/java/org/apache/sling/microsling/integration/microjax/PostServletCreateTest.java
URL: http://svn.apache.org/viewvc/incubator/sling/trunk/microsling/microsling-core/src/test/java/org/apache/sling/microsling/integration/microjax/PostServletCreateTest.java?rev=599494&r1=599493&r2=599494&view=diff
==============================================================================
--- incubator/sling/trunk/microsling/microsling-core/src/test/java/org/apache/sling/microsling/integration/microjax/PostServletCreateTest.java
(original)
+++ incubator/sling/trunk/microsling/microsling-core/src/test/java/org/apache/sling/microsling/integration/microjax/PostServletCreateTest.java
Thu Nov 29 07:53:17 2007
@@ -55,7 +55,17 @@
         final String location = testClient.createNode(specifiedLocation, null);
         assertHttpStatus(location, HttpServletResponse.SC_OK,
                 "POST must redirect to created resource (" + location + ")");
-        assertTrue("Node (" + location + ") must created at given URL (" + specifiedLocation
+ ")",
+        assertTrue("Node (" + location + ") must be created at given URL (" + specifiedLocation
+ ")",
+                location.equals(specifiedLocation));
+    }
+    
+    public void testCreateNodeAtDeepUrl() throws IOException {
+        final long id = System.currentTimeMillis();
+        final String specifiedLocation = postUrl + "/specified-location" + id + "/deepA/deepB/"
+ id;
+        final String location = testClient.createNode(specifiedLocation, null);
+        assertHttpStatus(location, HttpServletResponse.SC_OK,
+                "POST must redirect to created resource (" + location + ")");
+        assertTrue("Node (" + location + ") must be created (deep) at given URL (" + specifiedLocation
+ ")",
                 location.equals(specifiedLocation));
     }
     



Mime
View raw message