svn commit: r743720 - /lenya/trunk/org.apache.lenya.core.impl.tests/src/test/java/org/apache/lenya/cms/rc/RevisionControllerTest.java

[email protected]
Newsgroups gmane.comp.cms.lenya.cvs
Message-ID <[email protected]>
Author: andreas
Date: Thu Feb 12 13:08:39 2009
New Revision: 743720

URL: http://svn.apache.org/viewvc?rev=743720&view=rev
Log:
Don't use service manager in revision controller test.

Modified:
    lenya/trunk/org.apache.lenya.core.impl.tests/src/test/java/org/apache/lenya/cms/rc/RevisionControllerTest.java

Modified: lenya/trunk/org.apache.lenya.core.impl.tests/src/test/java/org/apache/lenya/cms/rc/RevisionControllerTest.java
URL: http://svn.apache.org/viewvc/lenya/trunk/org.apache.lenya.core.impl.tests/src/test/java/org/apache/lenya/cms/rc/RevisionControllerTest.java?rev=743720&r1=743719&r2=743720&view=diff
==============================================================================
--- lenya/trunk/org.apache.lenya.core.impl.tests/src/test/java/org/apache/lenya/cms/rc/RevisionControllerTest.java (original)
+++ lenya/trunk/org.apache.lenya.core.impl.tests/src/test/java/org/apache/lenya/cms/rc/RevisionControllerTest.java Thu Feb 12 13:08:39 2009
@@ -31,26 +31,18 @@
 public class RevisionControllerTest extends AbstractAccessControlTest {
 
     /**
-     * @see <a
-     *      href="http://issues.apache.org/bugzilla/show_bug.cgi?id=41005">Bug
-     *      41005</a>
+     * @see <a href="http://issues.apache.org/bugzilla/show_bug.cgi?id=41005">Bug 41005</a>
      * @throws Exception
      */
     public void testCheckIn() throws Exception {
         login("lenya");
 
         DocumentManager docMgr = null;
-        try {
-            docMgr = (DocumentManager) getManager().lookup(DocumentManager.ROLE);
-            Document source = getSession().getPublication("test").getArea("authoring").getSite().getNode(
-                    "/links").getLink("en").getDocument();
-            Document target = docMgr.addVersion(source, "authoring", "es");
-            target.delete();
-        } finally {
-            if (docMgr != null) {
-                getManager().release(docMgr);
-            }
-        }
+        docMgr = (DocumentManager) getBeanFactory().getBean(DocumentManager.ROLE);
+        Document source = getSession().getPublication("test").getArea("authoring").getSite()
+                .getNode("/links").getLink("en").getDocument();
+        Document target = docMgr.addVersion(source, "authoring", "es");
+        target.delete();
 
         getSession().commit();
     }
@@ -77,8 +69,8 @@
         String source = args[1];
         String identityD = args[2];
         String destination = args[3];
-        //doc1.getRepositoryNode().checkout();
-        //doc2.getRepositoryNode().checkin();
+        // doc1.getRepositoryNode().checkout();
+        // doc2.getRepositoryNode().checkin();
     }
 
 }
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.