Author: bdelacretaz
Date: Tue Sep  2 01:41:03 2008
New Revision: 691153

URL: http://svn.apache.org/viewvc?rev=691153&view=rev
Log:
simplify tests using assertContains()

Modified:
    
incubator/sling/trunk/launchpad/testing/src/test/java/org/apache/sling/launchpad/webapp/integrationtest/GetStarTest.java

Modified: 
incubator/sling/trunk/launchpad/testing/src/test/java/org/apache/sling/launchpad/webapp/integrationtest/GetStarTest.java
URL: 
http://svn.apache.org/viewvc/incubator/sling/trunk/launchpad/testing/src/test/java/org/apache/sling/launchpad/webapp/integrationtest/GetStarTest.java?rev=691153&r1=691152&r2=691153&view=diff
==============================================================================
--- 
incubator/sling/trunk/launchpad/testing/src/test/java/org/apache/sling/launchpad/webapp/integrationtest/GetStarTest.java
 (original)
+++ 
incubator/sling/trunk/launchpad/testing/src/test/java/org/apache/sling/launchpad/webapp/integrationtest/GetStarTest.java
 Tue Sep  2 01:41:03 2008
@@ -18,12 +18,10 @@
 
 import java.io.IOException;
 
-import org.apache.sling.commons.testing.integration.HttpTestBase;
-
 /** A GET to *.html and *.json must work even if there is no Node
  *  at the specified path (SLING-344)
  */
-public class GetStarTest extends HttpTestBase {
+public class GetStarTest extends RenderingTestBase {
     private final String random = getClass().getSimpleName() + 
String.valueOf(System.currentTimeMillis());
 
     public void testGetStarHtml() throws IOException {
@@ -47,15 +45,13 @@
 
         {
             final String content = getContent(fakeNodePath, CONTENT_TYPE_HTML);
-            assertTrue("Without script, default renderer marker must be 
present (" + content + ")",
-                    content.contains("Resource dumped by 
HtmlRendererServlet"));
+            assertContains(content, "dumped by HtmlRendererServlet");
         }
 
         final String urlToDelete = uploadTestScript(scriptPath, 
"rendering-test.esp", "html.esp");
         try {
             final String content = getContent(fakeNodePath, CONTENT_TYPE_HTML);
-            assertTrue("With script, test script marker must be present (" + 
content + ")",
-                    content.contains("ESP template"));
+            assertContains(content, "ESP template");
         } finally {
             testClient.delete(urlToDelete);
         }


Reply via email to