Author: pcraveiro
Date: 2011-12-02 09:55:44 -0500 (Fri, 02 Dec 2011)
New Revision: 1330
Modified:
federation/trunk/picketlink-bindings/src/test/java/org/picketlink/test/identity/federation/bindings/mock/MockCatalinaContext.java
federation/trunk/picketlink-bindings/src/test/java/org/picketlink/test/identity/federation/bindings/mock/MockCatalinaRequest.java
Log:
Changed to allow testcases to check the path when the request is forwarded.
http://community.jboss.org/message/639402
Modified:
federation/trunk/picketlink-bindings/src/test/java/org/picketlink/test/identity/federation/bindings/mock/MockCatalinaContext.java
===================================================================
---
federation/trunk/picketlink-bindings/src/test/java/org/picketlink/test/identity/federation/bindings/mock/MockCatalinaContext.java 2011-12-02
14:53:40 UTC (rev 1329)
+++
federation/trunk/picketlink-bindings/src/test/java/org/picketlink/test/identity/federation/bindings/mock/MockCatalinaContext.java 2011-12-02
14:55:44 UTC (rev 1330)
@@ -879,7 +879,7 @@
return null;
}
- public RequestDispatcher getRequestDispatcher(String arg0)
+ public RequestDispatcher getRequestDispatcher(final String path)
{
return new RequestDispatcher()
{
@@ -890,6 +890,11 @@
public void forward(ServletRequest arg0, ServletResponse arg1) throws
ServletException, IOException
{
+ if (arg0 instanceof MockCatalinaRequest) {
+ MockCatalinaRequest mockRequest = (MockCatalinaRequest) arg0;
+
+ mockRequest.setForwardPath(path);
+ }
}
};
}
Modified:
federation/trunk/picketlink-bindings/src/test/java/org/picketlink/test/identity/federation/bindings/mock/MockCatalinaRequest.java
===================================================================
---
federation/trunk/picketlink-bindings/src/test/java/org/picketlink/test/identity/federation/bindings/mock/MockCatalinaRequest.java 2011-12-02
14:53:40 UTC (rev 1329)
+++
federation/trunk/picketlink-bindings/src/test/java/org/picketlink/test/identity/federation/bindings/mock/MockCatalinaRequest.java 2011-12-02
14:55:44 UTC (rev 1330)
@@ -44,6 +44,7 @@
private String method;
private String remotee;
private String queryString;
+ private String forwardPath;
@Override
@@ -154,4 +155,14 @@
this.params.clear();
this.session = null;
}
+
+ public String getForwardPath()
+ {
+ return this.forwardPath;
+ }
+
+ public void setForwardPath(String path)
+ {
+ this.forwardPath = path;
+ }
}
\ No newline at end of file