Author: markt Date: Mon Nov 3 12:41:20 2014 New Revision: 1636338 URL: http://svn.apache.org/r1636338 Log: Reduce boilerplate code.
Modified: tomcat/trunk/test/org/apache/jasper/runtime/TestJspWriterImpl.java tomcat/trunk/test/org/apache/jasper/runtime/TestPageContextImpl.java tomcat/trunk/test/org/apache/jasper/servlet/TestJspServlet.java Modified: tomcat/trunk/test/org/apache/jasper/runtime/TestJspWriterImpl.java URL: http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/jasper/runtime/TestJspWriterImpl.java?rev=1636338&r1=1636337&r2=1636338&view=diff ============================================================================== --- tomcat/trunk/test/org/apache/jasper/runtime/TestJspWriterImpl.java (original) +++ tomcat/trunk/test/org/apache/jasper/runtime/TestJspWriterImpl.java Mon Nov 3 12:41:20 2014 @@ -16,14 +16,11 @@ */ package org.apache.jasper.runtime; -import java.io.File; - import javax.servlet.http.HttpServletResponse; import org.junit.Assert; import org.junit.Test; -import org.apache.catalina.startup.Tomcat; import org.apache.catalina.startup.TomcatBaseTest; import org.apache.tomcat.util.buf.ByteChunk; @@ -31,12 +28,7 @@ public class TestJspWriterImpl extends T @Test public void bug54241a() throws Exception { - Tomcat tomcat = getTomcatInstance(); - - File appDir = new File("test/webapp"); - tomcat.addWebapp(null, "/test", appDir.getAbsolutePath()); - - tomcat.start(); + getTomcatInstanceTestWebapp(false, true); ByteChunk res = new ByteChunk(); @@ -52,12 +44,7 @@ public class TestJspWriterImpl extends T @Test public void bug54241b() throws Exception { - Tomcat tomcat = getTomcatInstance(); - - File appDir = new File("test/webapp"); - tomcat.addWebapp(null, "/test", appDir.getAbsolutePath()); - - tomcat.start(); + getTomcatInstanceTestWebapp(false, true); ByteChunk res = new ByteChunk(); Modified: tomcat/trunk/test/org/apache/jasper/runtime/TestPageContextImpl.java URL: http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/jasper/runtime/TestPageContextImpl.java?rev=1636338&r1=1636337&r2=1636338&view=diff ============================================================================== --- tomcat/trunk/test/org/apache/jasper/runtime/TestPageContextImpl.java (original) +++ tomcat/trunk/test/org/apache/jasper/runtime/TestPageContextImpl.java Mon Nov 3 12:41:20 2014 @@ -41,12 +41,7 @@ public class TestPageContextImpl extends @Test public void testDoForward() throws Exception { - Tomcat tomcat = getTomcatInstance(); - - File appDir = new File("test/webapp"); - tomcat.addWebapp(null, "/test", appDir.getAbsolutePath()); - - tomcat.start(); + getTomcatInstanceTestWebapp(false, true); ByteChunk res = new ByteChunk(); @@ -82,12 +77,7 @@ public class TestPageContextImpl extends @Test public void testIncludeThrowsIOException() throws Exception { - Tomcat tomcat = getTomcatInstance(); - - File appDir = new File("test/webapp"); - tomcat.addWebapp(null, "/test", appDir.getAbsolutePath()); - - tomcat.start(); + getTomcatInstanceTestWebapp(false, true); ByteChunk res = new ByteChunk(); Modified: tomcat/trunk/test/org/apache/jasper/servlet/TestJspServlet.java URL: http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/jasper/servlet/TestJspServlet.java?rev=1636338&r1=1636337&r2=1636338&view=diff ============================================================================== --- tomcat/trunk/test/org/apache/jasper/servlet/TestJspServlet.java (original) +++ tomcat/trunk/test/org/apache/jasper/servlet/TestJspServlet.java Mon Nov 3 12:41:20 2014 @@ -70,14 +70,7 @@ public class TestJspServlet extends Tom @Test public void testBug56568b() throws Exception { - Tomcat tomcat = getTomcatInstance(); - - // Use the test web application so JSP support is available and the - // default JSP error page can be used. - File appDir = new File("test/webapp"); - tomcat.addWebapp(null, "/test", appDir.getAbsolutePath()); - - tomcat.start(); + getTomcatInstanceTestWebapp(false, true); int rc = methodUrl("http://localhost:" + getPort() + "/test/jsp/error.jsp", new ByteChunk(), 500000, null, null, "PUT"); @@ -91,14 +84,7 @@ public class TestJspServlet extends Tom @Test public void testBug56568c() throws Exception { - Tomcat tomcat = getTomcatInstance(); - - // Use the test web application so JSP support is available and the - // default JSP error page can be used. - File appDir = new File("test/webapp"); - tomcat.addWebapp(null, "/test", appDir.getAbsolutePath()); - - tomcat.start(); + getTomcatInstanceTestWebapp(false, true); int rc = methodUrl("http://localhost:" + getPort() + "/test/jsp/test.jsp", new ByteChunk(), 500000, null, null, "PUT"); --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org