You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lenya.apache.org by an...@apache.org on 2007/01/23 16:08:46 UTC

svn commit: r499045 - /lenya/trunk/src/impl/test/org/apache/lenya/cms/usecase/AbstractUsecaseTest.java

Author: andreas
Date: Tue Jan 23 07:08:45 2007
New Revision: 499045

URL: http://svn.apache.org/viewvc?view=rev&rev=499045
Log:
Make target URL available for usecase tests

Modified:
    lenya/trunk/src/impl/test/org/apache/lenya/cms/usecase/AbstractUsecaseTest.java

Modified: lenya/trunk/src/impl/test/org/apache/lenya/cms/usecase/AbstractUsecaseTest.java
URL: http://svn.apache.org/viewvc/lenya/trunk/src/impl/test/org/apache/lenya/cms/usecase/AbstractUsecaseTest.java?view=diff&rev=499045&r1=499044&r2=499045
==============================================================================
--- lenya/trunk/src/impl/test/org/apache/lenya/cms/usecase/AbstractUsecaseTest.java (original)
+++ lenya/trunk/src/impl/test/org/apache/lenya/cms/usecase/AbstractUsecaseTest.java Tue Jan 23 07:08:45 2007
@@ -44,6 +44,8 @@
         try {
             invoker = (UsecaseInvoker) getManager().lookup(TestUsecaseInvoker.ROLE);
             invoker.invoke(getRequest().getPathInfo(), getUsecaseName(), getParameters());
+            
+            this.targetUrl = invoker.getTargetUrl();
 
             List errorMessages = invoker.getErrorMessages();
             for (Iterator i = errorMessages.iterator(); i.hasNext();) {
@@ -68,6 +70,15 @@
 
         checkPostconditions();
 
+    }
+    
+    private String targetUrl;
+    
+    protected String getTargetUrl() {
+        if (this.targetUrl == null) {
+            throw new IllegalStateException("The usecase has not yet been executed.");
+        }
+        return this.targetUrl;
     }
 
     protected void login() throws AccessControlException {



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@lenya.apache.org
For additional commands, e-mail: commits-help@lenya.apache.org