stephan 2003/05/04 12:01:59
Modified: src/test/org/apache/cocoon AbstractCompositeTestCase.java src/test/org/apache/cocoon/environment/mock MockEnvironment.java MockRedirector.java MockRequest.java Log: Update mock environment classes. Revision Changes Path 1.3 +5 -1 cocoon-2.1/src/test/org/apache/cocoon/AbstractCompositeTestCase.java Index: AbstractCompositeTestCase.java =================================================================== RCS file: /home/cvs/cocoon-2.1/src/test/org/apache/cocoon/AbstractCompositeTestCase.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- AbstractCompositeTestCase.java 23 Apr 2003 06:20:20 -0000 1.2 +++ AbstractCompositeTestCase.java 4 May 2003 19:01:59 -0000 1.3 @@ -97,6 +97,8 @@ */ public abstract class AbstractCompositeTestCase extends ExcaliburTestCase { + public final static Parameters EMPTY_PARAMS = Parameters.EMPTY_PARAMETERS; + private MockRequest request = new MockRequest(); private MockResponse response = new MockResponse(); private MockContext context = new MockContext(); @@ -143,6 +145,8 @@ context.reset(); objectmodel.put(ObjectModelHelper.CONTEXT_OBJECT, context); + + redirector.reset(); } /** 1.2 +5 -5 cocoon-2.1/src/test/org/apache/cocoon/environment/mock/MockEnvironment.java Index: MockEnvironment.java =================================================================== RCS file: /home/cvs/cocoon-2.1/src/test/org/apache/cocoon/environment/mock/MockEnvironment.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- MockEnvironment.java 16 Apr 2003 10:54:00 -0000 1.1 +++ MockEnvironment.java 4 May 2003 19:01:59 -0000 1.2 @@ -76,8 +76,8 @@ private String uri; private String uriprefix; - private URL rootcontext; - private URL context; + private String rootcontext; + private String context; private String view; private String action; private String contenttype; @@ -99,11 +99,11 @@ return uriprefix; } - public URL getRootContext() { + public String getRootContext() { return rootcontext; } - public URL getContext() { + public String getContext() { return context; } @@ -115,7 +115,7 @@ return action; } - public void setContext(String prefix, String uri) { + public void setContext(String prefix, String uri, String context) { throw new AssertionFailedError("Not implemented"); } 1.2 +5 -0 cocoon-2.1/src/test/org/apache/cocoon/environment/mock/MockRedirector.java Index: MockRedirector.java =================================================================== RCS file: /home/cvs/cocoon-2.1/src/test/org/apache/cocoon/environment/mock/MockRedirector.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- MockRedirector.java 16 Apr 2003 10:54:00 -0000 1.1 +++ MockRedirector.java 4 May 2003 19:01:59 -0000 1.2 @@ -78,5 +78,10 @@ public boolean hasRedirected() { return this.hasRedirected; } + + public void reset() { + redirect = null; + hasRedirected = false; + } } 1.4 +1 -1 cocoon-2.1/src/test/org/apache/cocoon/environment/mock/MockRequest.java Index: MockRequest.java =================================================================== RCS file: /home/cvs/cocoon-2.1/src/test/org/apache/cocoon/environment/mock/MockRequest.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- MockRequest.java 22 Apr 2003 07:38:18 -0000 1.3 +++ MockRequest.java 4 May 2003 19:01:59 -0000 1.4 @@ -294,7 +294,7 @@ } public void setRequestURI(String uri) { - requestURI = uri;; + requestURI = uri; } public String getSitemapURI() {