svn commit: r790545 - /lenya/contributions/2_0_X/modules/batch/java/test/org/apache/lenya/modules/batch/BatchUsecaseTest.java

[email protected]
Newsgroups gmane.comp.cms.lenya.cvs
Message-ID <[email protected]>
Author: andreas
Date: Thu Jul  2 10:51:39 2009
New Revision: 790545

URL: http://svn.apache.org/viewvc?rev=790545&view=rev
Log:
Setting usecase permissions for batch usecase test.

Modified:
    lenya/contributions/2_0_X/modules/batch/java/test/org/apache/lenya/modules/batch/BatchUsecaseTest.java

Modified: lenya/contributions/2_0_X/modules/batch/java/test/org/apache/lenya/modules/batch/BatchUsecaseTest.java
URL: http://svn.apache.org/viewvc/lenya/contributions/2_0_X/modules/batch/java/test/org/apache/lenya/modules/batch/BatchUsecaseTest.java?rev=790545&r1=790544&r2=790545&view=diff
==============================================================================
--- lenya/contributions/2_0_X/modules/batch/java/test/org/apache/lenya/modules/batch/BatchUsecaseTest.java (original)
+++ lenya/contributions/2_0_X/modules/batch/java/test/org/apache/lenya/modules/batch/BatchUsecaseTest.java Thu Jul  2 10:51:39 2009
@@ -30,6 +30,8 @@
 public class BatchUsecaseTest extends AbstractUsecaseTest {
     
     protected static final String USECASE_NAME = "batch.batchTest";
+    protected static final String DELEGATE_USECASE_NAME = "batch.test";
+    protected static final String BASE_URL = "/test/authoring";
     protected static final String[] URLS = { "/foo", "/bar", "/baz" };
     protected static final Object[] VALUES = { "foo", "bar", "baz" };
     private Map<String, Object> parameters = new HashMap<String, Object>();
@@ -53,12 +55,14 @@
     @Override
     protected void prepareUsecase() throws Exception {
         super.prepareUsecase();
+        setUsecasePermission(USECASE_NAME, getPublication("test"), "edit", true);
+        setUsecasePermission(DELEGATE_USECASE_NAME, getPublication("test"), "edit", true);
         List<InvocationContext> contexts = new ArrayList<InvocationContext>();
         for (int i = 0; i < URLS.length; i++) {
             Map<String, Object> params = new HashMap<String, Object>();
             params.put(TestUsecase.PARAM_VALUE, VALUES[i]);
             params.put(TestUsecase.PARAM_CHECK_LIST, this.checkList);
-            InvocationContext context = new UsecaseInvocationContext(TestUsecase.NAME, URLS[i], params);
+            InvocationContext context = new UsecaseInvocationContext(TestUsecase.NAME, BASE_URL + URLS[i], params);
             contexts.add(context);
         }
         this.parameters.put(BatchUsecase.PARAM_INVOCATION_CONTEXTS, contexts);
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.