cedric 2002/12/27 03:02:09
Modified: src/test/org/apache/struts/mock MockServletContext.java
Log:
Implement getResource() and getResourceAsStream().
The implementation simply use the underlying method of Class.
Revision Changes Path
1.2 +8 -6
jakarta-struts/src/test/org/apache/struts/mock/MockServletContext.java
Index: MockServletContext.java
===================================================================
RCS file:
/home/cvs/jakarta-struts/src/test/org/apache/struts/mock/MockServletContext.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- MockServletContext.java 1 Jul 2002 22:10:35 -0000 1.1
+++ MockServletContext.java 27 Dec 2002 11:02:09 -0000 1.2
@@ -191,12 +191,14 @@
public URL getResource(String path) {
- throw new UnsupportedOperationException();
+ return this.getClass().getResource(path);
+ //throw new UnsupportedOperationException();
}
public InputStream getResourceAsStream(String path) {
- throw new UnsupportedOperationException();
+ return this.getClass().getResourceAsStream(path);
+ //throw new UnsupportedOperationException();
}
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>