jspwiki-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jalka...@apache.org
Subject svn commit: r775451 - in /incubator/jspwiki/trunk: ChangeLog src/java/org/apache/wiki/Release.java src/java/org/apache/wiki/content/ContentManager.java tests/java/org/apache/wiki/content/PageRenamerTest.java
Date Sat, 16 May 2009 12:09:20 GMT
Author: jalkanen
Date: Sat May 16 12:09:19 2009
New Revision: 775451

URL: http://svn.apache.org/viewvc?rev=775451&view=rev
Log:
Page renaming now works, but tests still need to be fixed.

Modified:
    incubator/jspwiki/trunk/ChangeLog
    incubator/jspwiki/trunk/src/java/org/apache/wiki/Release.java
    incubator/jspwiki/trunk/src/java/org/apache/wiki/content/ContentManager.java
    incubator/jspwiki/trunk/tests/java/org/apache/wiki/content/PageRenamerTest.java

Modified: incubator/jspwiki/trunk/ChangeLog
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/ChangeLog?rev=775451&r1=775450&r2=775451&view=diff
==============================================================================
--- incubator/jspwiki/trunk/ChangeLog (original)
+++ incubator/jspwiki/trunk/ChangeLog Sat May 16 12:09:19 2009
@@ -1,9 +1,18 @@
+2009-05-15  Janne Jalkanen <jalkanen@apache.org>
+
+        * 3.0.0-svn-116
+        
+        * Fixed the first PageRenamerTest, which was both expecting page
+        names in old format, as well as checking assertNull() on getPage()
+        instead of catching PageNotFoundException.  Page renaming
+        now actually works, though the tests still need to be fixed.
+
 2009-05-10  Andrew Jaquith <ajaquith AT apache DOT org>
 
         * 3.0.0-svn-115
 
         * Reviewed and partially applied the remainder of Greg Kable's patches
-        [JSPWIKI-528]. The changes to ComtentManager, WikiEngine and several
+        [JSPWIKI-528]. The changes to ContentManager, WikiEngine and several
         plugins go further than those specified in the patch, and eliminate the
         wrapping/unwrapping in AbstractFilteredPlugin.filterCollection. Notable
         changes include use of Lists in preference to SortedSets, plus the use

Modified: incubator/jspwiki/trunk/src/java/org/apache/wiki/Release.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/java/org/apache/wiki/Release.java?rev=775451&r1=775450&r2=775451&view=diff
==============================================================================
--- incubator/jspwiki/trunk/src/java/org/apache/wiki/Release.java (original)
+++ incubator/jspwiki/trunk/src/java/org/apache/wiki/Release.java Sat May 16 12:09:19 2009
@@ -77,7 +77,7 @@
      *  <p>
      *  If the build identifier is empty, it is not added.
      */
-    public static final String     BUILD         = "115";
+    public static final String     BUILD         = "116";
     
     /**
      *  This is the generic version string you should use

Modified: incubator/jspwiki/trunk/src/java/org/apache/wiki/content/ContentManager.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/java/org/apache/wiki/content/ContentManager.java?rev=775451&r1=775450&r2=775451&view=diff
==============================================================================
--- incubator/jspwiki/trunk/src/java/org/apache/wiki/content/ContentManager.java (original)
+++ incubator/jspwiki/trunk/src/java/org/apache/wiki/content/ContentManager.java Sat May 16
12:09:19 2009
@@ -1233,7 +1233,8 @@
         try
         {
             w = getCurrentSession().getWorkspace();
-            w.move( getJCRPath( fromPage ), getJCRPath( toPage ) );
+            getCurrentSession().move( getJCRPath( fromPage ), getJCRPath( toPage ) );
+            getCurrentSession().save();
         }
         catch( RepositoryException e )
         {

Modified: incubator/jspwiki/trunk/tests/java/org/apache/wiki/content/PageRenamerTest.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/tests/java/org/apache/wiki/content/PageRenamerTest.java?rev=775451&r1=775450&r2=775451&view=diff
==============================================================================
--- incubator/jspwiki/trunk/tests/java/org/apache/wiki/content/PageRenamerTest.java (original)
+++ incubator/jspwiki/trunk/tests/java/org/apache/wiki/content/PageRenamerTest.java Sat May
16 12:09:19 2009
@@ -103,14 +103,20 @@
         WikiPage newpage = m_engine.getPage("FooTest");
         
         assertNotNull( "no new page", newpage );
-        assertNull( "old page not gone", m_engine.getPage("TestPage") );
+        try
+        {
+            m_engine.getPage("TestPage");
+        
+            fail( "old page not gone" );
+        }
+        catch( PageNotFoundException e ) {} // Expected 
         
         // Refmgr
         
         Collection<String> refs = m_engine.getReferenceManager().findCreated();
         
-        assertTrue( "FooTest does not exist", refs.contains("FooTest") );
-        assertFalse( "TestPage exists", refs.contains("TestPage") );
+        assertTrue( "FooTest does not exist", refs.contains("Main:FooTest") );
+        assertFalse( "TestPage exists", refs.contains("Main:TestPage") );
         assertEquals( "wrong list size", refCount+1, refs.size() );
     }
     



Mime
View raw message