incubator-sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bdelacre...@apache.org
Subject svn commit: r1075270 - /sling/trunk/testing/junit/core/src/main/java/org/apache/sling/junit/RequestParser.java
Date Mon, 28 Feb 2011 10:36:59 GMT
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];



Mime
View raw message