incubator-sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bdelacre...@apache.org
Subject svn commit: r681366 - in /incubator/sling/trunk/launchpad: content/src/main/resources/content/sling-test/ content/src/main/resources/content/sling-test/sling/ testing/src/test/java/org/apache/sling/launchpad/webapp/integrationtest/
Date Thu, 31 Jul 2008 13:34:53 GMT
Author: bdelacretaz
Date: Thu Jul 31 06:34:51 2008
New Revision: 681366

URL: http://svn.apache.org/viewvc?rev=681366&view=rev
Log:
Add some integration tests for initial content loading

Added:
    incubator/sling/trunk/launchpad/content/src/main/resources/content/sling-test/initial-content-folder.json
  (with props)
    incubator/sling/trunk/launchpad/content/src/main/resources/content/sling-test/sling/initial-content-test.json
  (with props)
Modified:
    incubator/sling/trunk/launchpad/testing/src/test/java/org/apache/sling/launchpad/webapp/integrationtest/InitialContentTest.java

Added: incubator/sling/trunk/launchpad/content/src/main/resources/content/sling-test/initial-content-folder.json
URL: http://svn.apache.org/viewvc/incubator/sling/trunk/launchpad/content/src/main/resources/content/sling-test/initial-content-folder.json?rev=681366&view=auto
==============================================================================
--- incubator/sling/trunk/launchpad/content/src/main/resources/content/sling-test/initial-content-folder.json
(added)
+++ incubator/sling/trunk/launchpad/content/src/main/resources/content/sling-test/initial-content-folder.json
Thu Jul 31 06:34:51 2008
@@ -0,0 +1,6 @@
+{
+	"folder-content-test" : {
+		"text" : "This node is used to test initial content loading",
+		"marker" : "46"
+	}
+}

Propchange: incubator/sling/trunk/launchpad/content/src/main/resources/content/sling-test/initial-content-folder.json
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/sling/trunk/launchpad/content/src/main/resources/content/sling-test/sling/initial-content-test.json
URL: http://svn.apache.org/viewvc/incubator/sling/trunk/launchpad/content/src/main/resources/content/sling-test/sling/initial-content-test.json?rev=681366&view=auto
==============================================================================
--- incubator/sling/trunk/launchpad/content/src/main/resources/content/sling-test/sling/initial-content-test.json
(added)
+++ incubator/sling/trunk/launchpad/content/src/main/resources/content/sling-test/sling/initial-content-test.json
Thu Jul 31 06:34:51 2008
@@ -0,0 +1,4 @@
+{
+	"text" : "This node is used to test initial content loading",
+	"marker" : "42"
+}
\ No newline at end of file

Propchange: incubator/sling/trunk/launchpad/content/src/main/resources/content/sling-test/sling/initial-content-test.json
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/sling/trunk/launchpad/testing/src/test/java/org/apache/sling/launchpad/webapp/integrationtest/InitialContentTest.java
URL: http://svn.apache.org/viewvc/incubator/sling/trunk/launchpad/testing/src/test/java/org/apache/sling/launchpad/webapp/integrationtest/InitialContentTest.java?rev=681366&r1=681365&r2=681366&view=diff
==============================================================================
--- incubator/sling/trunk/launchpad/testing/src/test/java/org/apache/sling/launchpad/webapp/integrationtest/InitialContentTest.java
(original)
+++ incubator/sling/trunk/launchpad/testing/src/test/java/org/apache/sling/launchpad/webapp/integrationtest/InitialContentTest.java
Thu Jul 31 06:34:51 2008
@@ -26,4 +26,24 @@
         final String content = getContent(HTTP_BASE_URL + "/index.html", CONTENT_TYPE_HTML);
         assertTrue("Content contains expected marker (" + content + ")",content.contains(expected));
     }
+    
+    public void testRootRedirectProperty() throws IOException {
+    	final String expected = "\"sling:resourceType\":\"sling:redirect\"";
+    	final String content = getContent(HTTP_BASE_URL + "/.json", CONTENT_TYPE_JSON);
+    	assertTrue("Content contains " + expected + " (" + content + ")", content.contains(expected));
+    }
+    
+    public void testInitialContentA() throws IOException {
+    	final String expected = "42";
+    	final String content = getContent(
+    			HTTP_BASE_URL + "/sling-test/sling/initial-content-test/marker.txt", CONTENT_TYPE_PLAIN);
+    	assertTrue("Content contains " + expected + " (" + content + ")", content.contains(expected));
+    }
+    
+    public void testInitialContentB() throws IOException {
+    	final String expected = "46";
+    	final String content = getContent(
+    			HTTP_BASE_URL + "/sling-test/initial-content-folder/folder-content-test/marker.txt",
CONTENT_TYPE_PLAIN);
+    	assertTrue("Content contains " + expected + " (" + content + ")", content.contains(expected));
+    }
 }



Mime
View raw message