jspwiki-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mets...@apache.org
Subject svn commit: r768728 - in /incubator/jspwiki/trunk: ./ src/java/org/apache/wiki/ src/java/org/apache/wiki/plugin/ tests/java/org/apache/wiki/ tests/java/org/apache/wiki/plugin/
Date Sun, 26 Apr 2009 17:35:03 GMT
Author: metskem
Date: Sun Apr 26 17:35:03 2009
New Revision: 768728

URL: http://svn.apache.org/viewvc?rev=768728&view=rev
Log:
3.0.0-svn-106
        * fixed IndexPlugin, it no longer uses ReferenceManager.findCreated()
           fixed RecentChangesPluginTest and a few JUnit tests in WikiEngineTest
           JUnit Test success rate now 90.58 % (not committed changes to other plugins yet)

Modified:
    incubator/jspwiki/trunk/ChangeLog
    incubator/jspwiki/trunk/src/java/org/apache/wiki/ReferenceManager.java
    incubator/jspwiki/trunk/src/java/org/apache/wiki/Release.java
    incubator/jspwiki/trunk/src/java/org/apache/wiki/plugin/IndexPlugin.java
    incubator/jspwiki/trunk/tests/java/org/apache/wiki/WikiEngineTest.java
    incubator/jspwiki/trunk/tests/java/org/apache/wiki/plugin/RecentChangesPluginTest.java

Modified: incubator/jspwiki/trunk/ChangeLog
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/ChangeLog?rev=768728&r1=768727&r2=768728&view=diff
==============================================================================
--- incubator/jspwiki/trunk/ChangeLog (original)
+++ incubator/jspwiki/trunk/ChangeLog Sun Apr 26 17:35:03 2009
@@ -1,3 +1,11 @@
+2009-04-26  Harry Metske <metskem@apache.org>
+
+        * 3.0.0-svn-106
+
+        * fixed IndexPlugin, it no longer uses ReferenceManager.findCreated()
+           fixed RecentChangesPluginTest and a few JUnit tests in WikiEngineTest
+           JUnit Test success rate now 90.58 % (not committed changes to other plugins yet)
+
 2009-04-25  Andrew Jaquith <ajaquith AT apache DOT org>
 
         * 3.0.0-svn-105

Modified: incubator/jspwiki/trunk/src/java/org/apache/wiki/ReferenceManager.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/java/org/apache/wiki/ReferenceManager.java?rev=768728&r1=768727&r2=768728&view=diff
==============================================================================
--- incubator/jspwiki/trunk/src/java/org/apache/wiki/ReferenceManager.java (original)
+++ incubator/jspwiki/trunk/src/java/org/apache/wiki/ReferenceManager.java Sun Apr 26 17:35:03
2009
@@ -541,7 +541,7 @@
      * @throws PageNotFoundException 
      * @throws ProviderException 
      * @since 2.2.33
-     * @deprecated Use WikiPage.getRefersTo() instead
+     * @deprecated Use {@link org.apache.wiki.api.WikiPage.getRefersTo()} instead
      */
     public Collection<String> findRefersTo( String pageName ) throws ProviderException,
PageNotFoundException
     {

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=768728&r1=768727&r2=768728&view=diff
==============================================================================
--- incubator/jspwiki/trunk/src/java/org/apache/wiki/Release.java (original)
+++ incubator/jspwiki/trunk/src/java/org/apache/wiki/Release.java Sun Apr 26 17:35:03 2009
@@ -77,7 +77,7 @@
      *  <p>
      *  If the build identifier is empty, it is not added.
      */
-    public static final String     BUILD         = "105";
+    public static final String     BUILD         = "106";
     
     /**
      *  This is the generic version string you should use

Modified: incubator/jspwiki/trunk/src/java/org/apache/wiki/plugin/IndexPlugin.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/java/org/apache/wiki/plugin/IndexPlugin.java?rev=768728&r1=768727&r2=768728&view=diff
==============================================================================
--- incubator/jspwiki/trunk/src/java/org/apache/wiki/plugin/IndexPlugin.java (original)
+++ incubator/jspwiki/trunk/src/java/org/apache/wiki/plugin/IndexPlugin.java Sun Apr 26 17:35:03
2009
@@ -26,6 +26,8 @@
 import org.apache.ecs.xhtml.span;
 import org.apache.wiki.WikiContext;
 import org.apache.wiki.api.PluginException;
+import org.apache.wiki.api.WikiPage;
+import org.apache.wiki.content.ContentManager;
 import org.apache.wiki.log.Logger;
 import org.apache.wiki.log.LoggerFactory;
 import org.apache.wiki.providers.ProviderException;
@@ -121,19 +123,18 @@
      * include/exclude patterns and showAttachments parameter.
      * 
      * @param context
-     * @return A list containing page names
+     * @return A list containing {@link org.apache.wiki.api.WikiPage} Objects
      * @throws ProviderException
      */
     private List<String> listPages( WikiContext context ) throws ProviderException
     {
         ArrayList<String> result = new ArrayList<String>();
-        Collection<String> pages = context.getEngine().getReferenceManager().findCreated();
-
+        Collection<WikiPage> pages = context.getEngine().getContentManager().getAllPages(
ContentManager.DEFAULT_SPACE );
         pages = super.filterCollection( pages );
 
-        for( String page : pages )
+        for( WikiPage page : pages )
         {
-            result.add( page );
+            result.add( page.getName() );
         }
         return result;
     }

Modified: incubator/jspwiki/trunk/tests/java/org/apache/wiki/WikiEngineTest.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/tests/java/org/apache/wiki/WikiEngineTest.java?rev=768728&r1=768727&r2=768728&view=diff
==============================================================================
--- incubator/jspwiki/trunk/tests/java/org/apache/wiki/WikiEngineTest.java (original)
+++ incubator/jspwiki/trunk/tests/java/org/apache/wiki/WikiEngineTest.java Sun Apr 26 17:35:03
2009
@@ -248,7 +248,7 @@
         Object[] result = m_engine.scanWikiLinks( m_engine.createPage( WikiPath.valueOf(
"Test" ) ), src ).toArray();
         
         assertEquals( "item 0", PATH_FOOBAR, result[0] );
-        assertEquals( "item 1", "This is a link", result[1] );
+        assertEquals( "item 1", "Main:This is a link", result[1] );
     }
 
     public void testBeautifyTitle()
@@ -874,7 +874,7 @@
         m_engine.saveText( "OldNameTestPage", "Linked to RenameBugTestPage" );
        
         Collection<WikiPath> pages = m_engine.getReferenceManager().findReferrers(
WikiPath.valueOf("RenameBugTestPage") );
-        assertEquals( "has one", "OldNameTestPage", pages.iterator().next() );
+        assertEquals( "has one", "Main:OldNameTestPage", pages.iterator().next() );
         
         WikiContext ctx = m_engine.getWikiContextFactory().newViewContext( m_engine.getPage("OldNameTestPage")
);
         

Modified: incubator/jspwiki/trunk/tests/java/org/apache/wiki/plugin/RecentChangesPluginTest.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/tests/java/org/apache/wiki/plugin/RecentChangesPluginTest.java?rev=768728&r1=768727&r2=768728&view=diff
==============================================================================
--- incubator/jspwiki/trunk/tests/java/org/apache/wiki/plugin/RecentChangesPluginTest.java
(original)
+++ incubator/jspwiki/trunk/tests/java/org/apache/wiki/plugin/RecentChangesPluginTest.java
Sun Apr 26 17:35:03 2009
@@ -25,6 +25,8 @@
 
 import org.apache.wiki.TestEngine;
 import org.apache.wiki.WikiContext;
+import org.apache.wiki.log.Logger;
+import org.apache.wiki.log.LoggerFactory;
 import org.apache.wiki.plugin.PluginManager;
 
 import junit.framework.Test;
@@ -81,9 +83,9 @@
         // we don't want to compare the complete html returned, but check if certain Strings
are present and other 
         // Strings are not present
         assertTrue(res.contains( "<table cellpadding='4' class='recentchanges'>"));
-        assertTrue(res.contains( "<a href='/Wiki.jsp?page=TestPage01'>Test Page 01</a>"
));
-        assertTrue(res.contains( "<a href='/Wiki.jsp?page=TestPage02'>Test Page 02</a>"
));
-        assertTrue(res.contains( "<a href='/Wiki.jsp?page=TestPage03'>Test Page 03</a>"
));
+        assertTrue(res.contains( "<a href='/Wiki.jsp?page=TestPage01'>TestPage01</a>"
));
+        assertTrue(res.contains( "<a href='/Wiki.jsp?page=TestPage02'>TestPage02</a>"
));
+        assertTrue(res.contains( "<a href='/Wiki.jsp?page=TestPage03'>TestPage03</a>"
));
 
     }
 
@@ -100,9 +102,9 @@
                                       "{INSERT org.apache.wiki.plugin.RecentChangesPlugin
include='TestPage02*'}" );
         
         assertTrue(res.contains( "<table cellpadding='4' class='recentchanges'>"));
-        assertFalse(res.contains( "<a href='/Wiki.jsp?page=TestPage01'>Test Page 01</a>"
));
-        assertTrue(res.contains( "<a href='/Wiki.jsp?page=TestPage02'>Test Page 02</a>"
));
-        assertFalse(res.contains( "<a href='/Wiki.jsp?page=TestPage03'>Test Page 03</a>"
));
+        assertFalse(res.contains( "<a href='/Wiki.jsp?page=TestPage01'>TestPage01</a>"
));
+        assertTrue(res.contains( "<a href='/Wiki.jsp?page=TestPage02'>TestPage02</a>"
));
+        assertFalse(res.contains( "<a href='/Wiki.jsp?page=TestPage03'>TestPage03</a>"
));
 
     }
 
@@ -115,13 +117,12 @@
     {
         context = engine.getWikiContextFactory().newViewContext( null, null, engine.getPage(
 "TestPage03" ) );
 
-        String res = manager.execute( context,
-                                      "{INSERT org.apache.wiki.plugin.RecentChangesPlugin
exclude='TestPage03*'}" );
+        String res = manager.execute( context, "{INSERT RecentChangesPlugin exclude='TestPage03*'}"
);
         
         assertTrue(res.contains( "<table cellpadding='4' class='recentchanges'>"));
-        assertTrue(res.contains( "<a href='/Wiki.jsp?page=TestPage01'>Test Page 01</a>"
));
-        assertTrue(res.contains( "<a href='/Wiki.jsp?page=TestPage02'>Test Page 02</a>"
));
-        assertFalse(res.contains( "<a href='/Wiki.jsp?page=TestPage03'>Test Page 03</a>"
));
+        assertTrue(res.contains( "<a href='/Wiki.jsp?page=TestPage01'>TestPage01</a>"
));
+        assertTrue(res.contains( "<a href='/Wiki.jsp?page=TestPage02'>TestPage02</a>"
));
+        assertFalse(res.contains( "<a href='/Wiki.jsp?page=TestPage03'>TestPage03</a>"
));
 
     }
 



Mime
View raw message