You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by bd...@apache.org on 2011/02/28 11:36:59 UTC
svn commit: r1075270 -
/sling/trunk/testing/junit/core/src/main/java/org/apache/sling/junit/RequestParser.java
Author: bdelacretaz
Date: Mon Feb 28 10:36:59 2011
New Revision: 1075270
URL: http://svn.apache.org/viewvc?rev=1075270&view=rev
Log:
SLING-1963 - add alternate constructor
Modified:
sling/trunk/testing/junit/core/src/main/java/org/apache/sling/junit/RequestParser.java
Modified: sling/trunk/testing/junit/core/src/main/java/org/apache/sling/junit/RequestParser.java
URL: http://svn.apache.org/viewvc/sling/trunk/testing/junit/core/src/main/java/org/apache/sling/junit/RequestParser.java?rev=1075270&r1=1075269&r2=1075270&view=diff
==============================================================================
--- sling/trunk/testing/junit/core/src/main/java/org/apache/sling/junit/RequestParser.java (original)
+++ sling/trunk/testing/junit/core/src/main/java/org/apache/sling/junit/RequestParser.java Mon Feb 28 10:36:59 2011
@@ -32,10 +32,19 @@ public class RequestParser {
private final HttpServletRequest request;
private static final String EMPTY_STRING = "";
+ /** Build from a request using standard parsing */
public RequestParser(HttpServletRequest request) {
this(parsePathInfo(request.getPathInfo()), request);
}
+ /** Build from pre-parsed values */
+ public RequestParser(HttpServletRequest request, String testSelector, String outputExtension, String testMethodName) {
+ this.request = request;
+ this.testSelector = testSelector;
+ this.extension = outputExtension;
+ this.methodName = testMethodName;
+ }
+
RequestParser(String [] s, HttpServletRequest request) {
this.request = request;
testSelector = s[0];