You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@roller.apache.org by sn...@apache.org on 2005/06/09 05:19:20 UTC

svn commit: r189695 [46/67] - in /incubator/roller/trunk: ./ contrib/ contrib/lib/ contrib/plugins/ contrib/plugins/src/ contrib/plugins/src/org/ contrib/plugins/src/org/roller/ contrib/plugins/src/org/roller/presentation/ contrib/plugins/src/org/roller/presentation/velocity/ contrib/plugins/src/org/roller/presentation/velocity/plugins/ contrib/plugins/src/org/roller/presentation/velocity/plugins/acronyms/ contrib/plugins/src/org/roller/presentation/velocity/plugins/bookmarks/ contrib/plugins/src/org/roller/presentation/velocity/plugins/email/ contrib/plugins/src/org/roller/presentation/velocity/plugins/jspwiki/ contrib/plugins/src/org/roller/presentation/velocity/plugins/radeox/ contrib/plugins/src/org/roller/presentation/velocity/plugins/readmore/ contrib/plugins/src/org/roller/presentation/velocity/plugins/smileys/ contrib/plugins/src/org/roller/presentation/velocity/plugins/textile/ contrib/plugins/src/org/roller/presentation/velocity/plugins/topictag/ custom/ custom/src/ custom/web/ docs/ docs/images/ docs/installguide/ docs/installguide/old/ docs/userguide/ docs/userguide/images/ docs/userguide/old/ metadata/ metadata/database/ metadata/database/hibernate/ metadata/xdoclet/ nbproject/ personal/ personal/eclipse/ personal/testing/ sandbox/ sandbox/planetroller/ sandbox/planetroller/metadata/ sandbox/planetroller/metadata/database/ sandbox/planetroller/src/ sandbox/planetroller/src/org/ sandbox/planetroller/src/org/roller/ sandbox/planetroller/src/org/roller/tools/ sandbox/planetroller/src/org/roller/tools/planet/ sandbox/planetroller/templates/ sandbox/planetroller/test/ sandbox/planetroller/test/org/ sandbox/planetroller/test/org/roller/ sandbox/planetroller/test/org/roller/model/ sandbox/planetroller/test/org/roller/tools/ sandbox/planetroller/test/org/roller/tools/planet/ sandbox/planetroller/testdata/ sandbox/planetroller/testdata/cache/ sandbox/planetroller/testdata/output/ sandbox/standalone/ sandbox/standalone/jspwiki/ sandbox/standalone/jspwiki/default/ sandbox/standalone/jspwiki/default/images/ sandbox/standalone/lib/ sandbox/standalone/src/ sandbox/standalone/src/org/ sandbox/standalone/src/org/roller/ sandbox/standalone/src/org/roller/jspwiki/ sandbox/standalone/src/org/roller/tomcat/ sandbox/standalone/src/org/roller/util/ sandbox/standalone/tests/ sandbox/standalone/tests/org/ sandbox/standalone/tests/org/roller/ sandbox/standalone/tests/org/roller/util/ sandbox/standalone/tomcat/ src/ src/org/ src/org/roller/ src/org/roller/business/ src/org/roller/business/hibernate/ src/org/roller/business/search/ src/org/roller/business/search/operations/ src/org/roller/business/utils/ src/org/roller/config/ src/org/roller/config/runtime/ src/org/roller/model/ src/org/roller/pojos/ src/org/roller/presentation/ src/org/roller/presentation/atomapi/ src/org/roller/presentation/bookmarks/ src/org/roller/presentation/bookmarks/actions/ src/org/roller/presentation/bookmarks/formbeans/ src/org/roller/presentation/bookmarks/tags/ src/org/roller/presentation/filters/ src/org/roller/presentation/forms/ src/org/roller/presentation/newsfeeds/ src/org/roller/presentation/pagecache/ src/org/roller/presentation/pagecache/rollercache/ src/org/roller/presentation/pings/ src/org/roller/presentation/planet/ src/org/roller/presentation/tags/ src/org/roller/presentation/tags/calendar/ src/org/roller/presentation/tags/menu/ src/org/roller/presentation/util/ src/org/roller/presentation/velocity/ src/org/roller/presentation/weblog/ src/org/roller/presentation/weblog/actions/ src/org/roller/presentation/weblog/formbeans/ src/org/roller/presentation/weblog/tags/ src/org/roller/presentation/website/ src/org/roller/presentation/website/actions/ src/org/roller/presentation/website/formbeans/ src/org/roller/presentation/website/tags/ src/org/roller/presentation/xmlrpc/ src/org/roller/util/ src/org/roller/util/rome/ tests/ tests/org/ tests/org/roller/ tests/org/roller/ant/ tests/org/roller/business/ tests/org/roller/presentation/ tests/org/roller/presentation/atomapi/ tests/org/roller/presentation/bookmarks/ tests/org/roller/presentation/filters/ tests/org/roller/presentation/velocity/ tests/org/roller/presentation/velocity/plugins/ tests/org/roller/presentation/velocity/plugins/smileys/ tests/org/roller/presentation/velocity/plugins/textile/ tests/org/roller/presentation/weblog/ tests/org/roller/presentation/xmlrpc/ tests/org/roller/util/ tests/org/roller/util/rome/ tools/ tools/buildtime/ tools/buildtime/ant-1.6.2/ tools/buildtime/findbugs/ tools/buildtime/findbugs/lib/ tools/buildtime/findbugs/plugin/ tools/buildtime/mockrunner-0.3/ tools/buildtime/mockrunner-0.3/lib/ tools/buildtime/mockrunner-0.35/ tools/buildtime/mockrunner-0.35/lib/ tools/buildtime/tomcat-4.1.24/ tools/buildtime/xdoclet-1.2/ tools/buildtime/xdoclet-1.2/lib/ tools/hibernate-2.1/ tools/hibernate-2.1/lib/ tools/lib/ tools/standard-1.0.3/ tools/standard-1.0.3/lib/ tools/standard-1.0.3/tld/ tools/struts-1.2.4/ tools/struts-1.2.4/lib/ web/ web/WEB-INF/ web/WEB-INF/classes/ web/WEB-INF/classes/flavors/ web/WEB-INF/classes/themes/ web/bookmarks/ web/editor/ web/editor/images/ web/images/ web/images/editor/ web/images/midas/ web/images/preview/ web/images/smileys/ web/planet/ web/tags/ web/templates/ web/theme/ web/theme/images/ web/theme/lavender/ web/theme/scripts/ web/theme/scripts/classes/ web/themes/ web/themes/basic/ web/themes/berkley/ web/themes/berkley/images/ web/themes/brushedmetal/ web/themes/brushedmetal/images/ web/themes/cheb/ web/themes/cheb/images/ web/themes/cheb/scripts/ web/themes/clean/ web/themes/currency-i18n/ web/themes/currency-i18n/images/ web/themes/currency/ web/themes/currency/images/ web/themes/grey2/ web/themes/moonshine/ web/themes/movablemanila/ web/themes/movablemanila/images/ web/themes/pacifica/ web/themes/robot/ web/themes/rolling/ web/themes/rolling/images/ web/themes/sotto/ web/themes/sotto/images/ web/themes/sotto/styles/ web/themes/sunsets/ web/themes/sunsets/images/ web/themes/sunsets/scripts/ web/themes/sunsets/styles/ web/themes/werner/ web/themes/x2/ web/themes/x2/images/ web/themes/x2/scripts/ web/themes/x2/styles/ web/weblog/ web/website/

Added: incubator/roller/trunk/tests/org/roller/presentation/atomapi/AtomServletTest.java
URL: http://svn.apache.org/viewcvs/incubator/roller/trunk/tests/org/roller/presentation/atomapi/AtomServletTest.java?rev=189695&view=auto
==============================================================================
--- incubator/roller/trunk/tests/org/roller/presentation/atomapi/AtomServletTest.java (added)
+++ incubator/roller/trunk/tests/org/roller/presentation/atomapi/AtomServletTest.java Wed Jun  8 20:18:46 2005
@@ -0,0 +1,443 @@
+package org.roller.presentation.atomapi;
+
+import java.io.ByteArrayOutputStream;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.StringReader;
+import java.io.StringWriter;
+import java.text.SimpleDateFormat;
+import java.util.ArrayList;
+import java.util.Calendar;
+import java.util.Date;
+import java.util.List;
+
+import javax.servlet.http.HttpServletResponse;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+import org.jdom.Document;
+import org.jdom.input.SAXBuilder;
+import org.roller.RollerTestBase;
+import org.roller.model.WeblogManager;
+import org.roller.pojos.UserData;
+import org.roller.pojos.WeblogEntryData;
+import org.roller.pojos.WebsiteData;
+import org.roller.presentation.MockRollerContext;
+import org.roller.util.Utilities;
+
+import com.mockrunner.mock.web.ActionMockObjectFactory;
+import com.mockrunner.mock.web.MockHttpServletRequest;
+import com.mockrunner.mock.web.MockHttpServletResponse;
+import com.mockrunner.mock.web.MockServletContext;
+import com.mockrunner.mock.web.WebMockObjectFactory;
+import com.mockrunner.servlet.ServletTestModule;
+import com.mockrunner.struts.ActionTestModule;
+import com.sun.syndication.feed.atom.Content;
+import com.sun.syndication.feed.atom.Entry;
+
+/**
+ * Test new Rome based Atom API implementation.
+ * @author David M Johnson
+ */
+public class AtomServletTest extends RollerTestBase
+{    
+    private ActionMockObjectFactory mockFactory;
+    protected MockRollerContext rollerContext;
+    protected ActionTestModule strutsModule;
+    private ServletTestModule servletModule;
+    private static SimpleDateFormat df =
+        new SimpleDateFormat( "yyyy-MM-dd'T'HH:mm:ssZ" );
+
+    protected WebMockObjectFactory getMockFactory()
+    {
+        if (mockFactory == null) 
+        {
+            mockFactory = new ActionMockObjectFactory();
+        }
+        return mockFactory;
+    }
+    
+    //------------------------------------------------------------------------------
+    /** 
+     * Test get of introspection URI
+     */
+    public void testGetIntrospection() throws Exception
+    {
+        UserData user = (UserData)mUsersCreated.get(0);        
+                
+        MockHttpServletRequest mockRequest = getMockFactory().getMockRequest();
+        mockRequest.addHeader("X-WSSE", 
+                generateWSSEHeader(user.getUserName(), user.getPassword()));
+        mockRequest.setContextPath("/atom");
+        mockRequest.setPathInfo("/" + user.getUserName());
+        getServletModule().doGet();
+
+        String output = getServletModule().getOutput();
+        SAXBuilder builder = new SAXBuilder();
+        Document doc = builder.build(new StringReader(output));
+        
+        AtomService service = AtomService.documentToService(doc);
+        assertEquals(1, service.getWorkspaces().size());
+    }
+
+    //------------------------------------------------------------------------------
+    /** 
+     * Test get of entries collection URI
+     */
+    public void testGetEntriesCollection() throws Exception
+    {
+        UserData user = (UserData)mUsersCreated.get(0);        
+                
+        // get entries collection
+        MockHttpServletRequest mockRequest = getMockFactory().getMockRequest();
+        mockRequest.addHeader("X-WSSE", 
+                generateWSSEHeader(user.getUserName(), user.getPassword()));
+        mockRequest.setContextPath("/atom");
+        mockRequest.setPathInfo("/" + user.getUserName() + "/entries");
+        getServletModule().doGet();
+        
+        // assert that we got 20 entries
+        String output = getServletModule().getOutput();
+        SAXBuilder builder = new SAXBuilder();
+        Document doc = builder.build(new StringReader(output));
+        AtomCollection col = AtomCollection.documentToCollection(doc);
+        assertEquals(20, col.getMembers().size());
+        
+        // use collection next URI to get next batch of entries
+        resetMocks();
+        String[] next = Utilities.stringToStringArray(col.getNext(), "/");
+        
+        mockRequest = getMockFactory().getMockRequest();
+        mockRequest.addHeader("X-WSSE", 
+            generateWSSEHeader(user.getUserName(), user.getPassword()));
+        mockRequest.setContextPath("/atom");
+        mockRequest.setPathInfo(
+            "/" + user.getUserName() + "/entries/" + next[next.length-1]);
+        getServletModule().doGet();
+
+        // assert that we got another 20 entries
+        output = getServletModule().getOutput();
+        doc = builder.build(new StringReader(output));
+        col = AtomCollection.documentToCollection(doc);
+        assertEquals(10, col.getMembers().size());   
+    }
+
+    //------------------------------------------------------------------------------
+    /** 
+     * Test get of entries collection URI with a range
+     */
+    public void testGetEntriesCollectionRange() throws Exception
+    {
+        UserData user = (UserData)mUsersCreated.get(0);     
+        
+        Date end = new Date(); // now 
+        Calendar cal = Calendar.getInstance();
+        cal.setTime(end);
+        cal.add(Calendar.DATE, -30);
+        Date start = cal.getTime(); // one day ago
+        String startString = df.format(start);
+        String endString = df.format(end);
+        
+        // get entries collection
+        MockHttpServletRequest mockRequest = getMockFactory().getMockRequest();
+        mockRequest.addHeader("X-WSSE", 
+            generateWSSEHeader(user.getUserName(), user.getPassword()));
+        mockRequest.addHeader("Range",
+            "updated=" + startString + "/" + endString);
+        mockRequest.setContextPath("/atom");
+        mockRequest.setPathInfo("/" + user.getUserName() + "/entries");
+        getServletModule().doGet();
+        
+        // assert that we got 20 entries
+        String output = getServletModule().getOutput();
+        SAXBuilder builder = new SAXBuilder();
+        Document doc = builder.build(new StringReader(output));
+        AtomCollection col = AtomCollection.documentToCollection(doc);
+        assertEquals(20, col.getMembers().size());
+        
+        // use collection next URI to get next batch of entries
+        resetMocks();
+        String[] next = Utilities.stringToStringArray(col.getNext(), "/");
+        
+        mockRequest = getMockFactory().getMockRequest();
+        mockRequest.addHeader("X-WSSE", 
+            generateWSSEHeader(user.getUserName(), user.getPassword()));
+        mockRequest.setContextPath("/atom");
+        mockRequest.setPathInfo("/" + user.getUserName() + "/entries");
+        mockRequest.setQueryString("Range=updated="+startString+"/"+endString);
+        getServletModule().doGet();
+
+        // assert that we got another 20 entries
+        output = getServletModule().getOutput();
+        doc = builder.build(new StringReader(output));
+        col = AtomCollection.documentToCollection(doc);
+        assertEquals(20, col.getMembers().size());   
+    }
+
+    //------------------------------------------------------------------------------
+    /** 
+     * Test that GET on the EditURI returns an entry.
+     */
+    public void testGetEntry() throws Exception
+    {
+        UserData user = (UserData)mUsersCreated.get(0);
+        WebsiteData website = 
+            getRoller().getUserManager().getWebsite(user.getUserName());
+        WeblogEntryData entry = (WeblogEntryData) 
+            getRoller().getWeblogManager().getWeblogEntries(
+                website, null, null, null, WeblogManager.ALL, new Integer(1)).get(0);
+
+        Entry fetchedEntry = getEntry(user, entry.getId());
+        assertEquals(entry.getId(), fetchedEntry.getId());
+    }
+    
+    //------------------------------------------------------------------------------
+    /** 
+     * Test that POST to the PostURI returns an entry.
+     */
+    public void testPostEntry() throws Exception
+    {
+        UserData user = (UserData)mUsersCreated.get(0);        
+        
+        // Create an entry in a feed, so Rome can handle it
+        Content content = new Content();
+        content.setMode(Content.ESCAPED);
+        content.setValue("test entry text");
+        List contents = new ArrayList();
+        contents.add(content);
+
+        Entry entry = new Entry();
+        entry.setTitle("test entry title");
+        entry.setContents(contents);
+        
+        StringWriter entryWriter = new StringWriter();
+        AtomServlet.serializeEntry(entry, entryWriter);
+        
+        MockHttpServletRequest mockRequest = getMockFactory().getMockRequest();
+        mockRequest.setContextPath("/atom");
+        mockRequest.setPathInfo(user.getUserName() + "/entries/");
+        mockRequest.addHeader("X-WSSE", 
+                generateWSSEHeader(user.getUserName(), user.getPassword()));
+        mockRequest.setBodyContent(entryWriter.toString());
+        getServletModule().doPost();
+
+        String output = getServletModule().getOutput();
+        Entry returnedEntry = AtomServlet.parseEntry(new StringReader(output));        
+        assertEquals(returnedEntry.getTitle(), entry.getTitle());
+        
+        MockHttpServletResponse mockResponse = getMockFactory().getMockResponse();
+        assertEquals(HttpServletResponse.SC_CREATED, mockResponse.getStatusCode());
+        assertTrue(mockResponse.containsHeader("Location"));
+       
+        getRoller().release();
+        resetMocks();
+
+        Entry fetchedEntry = getEntry(user, returnedEntry.getId());
+        assertEquals(returnedEntry.getId(), fetchedEntry.getId());
+    }
+    
+    //------------------------------------------------------------------------------
+    /** 
+     * Test that PUT on the EditURI updates an entry.
+     */
+    public void testPutEntry() throws Exception
+    {
+        UserData user = (UserData)mUsersCreated.get(0);        
+
+        WebsiteData website = 
+            getRoller().getUserManager().getWebsite(user.getUserName());       
+        WeblogEntryData entry = (WeblogEntryData) 
+            getRoller().getWeblogManager().getWeblogEntries(
+                website, null, null, null, WeblogManager.ALL, new Integer(1)).get(0);
+        
+        // Fetch that entry using Atom
+        Entry fetchedEntry = getEntry(user, entry.getId());
+        assertEquals(entry.getId(), fetchedEntry.getId());
+        
+        // Make a change to the fetched entry
+        fetchedEntry.setTitle("TEST TITLE");
+        
+        // Use Atom PUT to update the entry
+        StringWriter entryWriter = new StringWriter();
+        AtomServlet.serializeEntry(fetchedEntry, entryWriter);
+        MockHttpServletRequest mockRequest2 = getMockFactory().getMockRequest();
+        mockRequest2.setContextPath("/atom");
+        mockRequest2.setPathInfo(user.getUserName() + "/entry/" + entry.getId());
+        mockRequest2.addHeader("X-WSSE", 
+           generateWSSEHeader(user.getUserName(), user.getPassword()));
+        mockRequest2.setBodyContent(entryWriter.toString());
+        getServletModule().doPut();      
+        
+        getRoller().release();
+        resetMocks();
+
+        // Get the entry again to make sure the update was made
+        Entry fetchedEntry2 = getEntry(user, entry.getId());
+        assertEquals(fetchedEntry.getTitle(), fetchedEntry2.getTitle());
+    }
+    
+    //------------------------------------------------------------------------------
+    /** 
+     * Test that DELETE on EditURI deletes entry. 
+     */
+    public void testDeleteEntry() throws Exception
+    {
+        UserData user = (UserData)mUsersCreated.get(0);
+        WebsiteData website = 
+            getRoller().getUserManager().getWebsite(user.getUserName());
+        WeblogEntryData entry = (WeblogEntryData) 
+            getRoller().getWeblogManager().getWeblogEntries(
+                website, null, null, null, WeblogManager.ALL, new Integer(1)).get(0);
+
+        Entry fetchedEntry = getEntry(user, entry.getId());
+        assertEquals(entry.getId(), fetchedEntry.getId());
+
+        // Use Atom DELETE to delete the entry
+        MockHttpServletRequest mockRequest2 = getMockFactory().getMockRequest();
+        mockRequest2.setContextPath("/atom");
+        mockRequest2.setPathInfo(user.getUserName() + "/entry/" + entry.getId());
+        mockRequest2.addHeader("X-WSSE", 
+                generateWSSEHeader(user.getUserName(), user.getPassword()));
+        getServletModule().doDelete();      
+        getRoller().release();
+        resetMocks();
+        try 
+        {
+            getEntry(user, entry.getId()).getId();
+            fail(); // no exception was thrown!
+        }
+        catch (Exception expected) {}
+    }
+
+     //------------------------------------------------------------------------------
+    private Entry getEntry(UserData user, String id) throws Exception
+    {
+        MockHttpServletRequest mockRequest = getMockFactory().getMockRequest();
+        mockRequest.setContextPath("/atom");
+        mockRequest.setPathInfo(user.getUserName() + "/entry/" + id);
+        mockRequest.addHeader("X-WSSE", 
+                generateWSSEHeader(user.getUserName(), user.getPassword()));
+        getServletModule().doGet();
+
+        String output = getServletModule().getOutput();
+        return AtomServlet.parseEntry(new StringReader(output));        
+    }
+    
+    //------------------------------------------------------------------------------
+    public void testPostResource() throws Exception 
+    {    
+        UserData user = (UserData)mUsersCreated.get(0);      
+        
+        // read test file into byte array
+        String fileName = "rssbadge.gif";
+        File testFile = new File(fileName);
+        FileInputStream fis = new FileInputStream(testFile);
+        ByteArrayOutputStream baos = new ByteArrayOutputStream();
+        Utilities.copyInputToOutput(fis, baos);
+        
+        // post file as resource
+        MockHttpServletRequest mockRequest = getMockFactory().getMockRequest();
+        mockRequest.setContextPath("/atom");
+        mockRequest.setPathInfo(user.getUserName() + "/resources/");
+        mockRequest.addHeader("Name", fileName); 
+        mockRequest.addHeader("X-WSSE", 
+                generateWSSEHeader(user.getUserName(), user.getPassword()));        
+        mockRequest.setBodyContent(baos.toByteArray());
+        getServletModule().doPost();
+        
+        MockHttpServletResponse mockResponse = getMockFactory().getMockResponse();
+        assertEquals(HttpServletResponse.SC_CREATED, mockResponse.getStatusCode());
+        assertTrue(mockResponse.containsHeader("Location"));
+        
+        getRoller().release();
+        resetMocks();
+    }
+
+    //------------------------------------------------------------------------------
+    public void setUp() throws Exception
+    {
+        super.setUp();       
+        super.setUpTestWeblogs();        
+        resetMocks();
+        MockServletContext ctx = getMockFactory().getMockServletContext();
+        ctx.setRealPath("/", "");
+        rollerContext = new MockRollerContext();
+        rollerContext.init(ctx);
+    }
+
+    //------------------------------------------------------------------------------
+    /** 
+     * Really really reset mocks.
+     */
+    private void resetMocks() 
+    {
+        mockFactory = null;
+        getMockFactory().refresh();
+        getMockFactory().getMockRequest().clearParameters();
+        getMockFactory().getMockRequest().clearAttributes();
+        setServletModule(new ServletTestModule(getMockFactory()));        
+        getServletModule().setServlet(
+            getServletModule().createServlet(AtomServlet.class));
+        getServletModule().clearOutput();
+    }
+    
+    //------------------------------------------------------------------------------
+    /**
+     * @param servletModule The servletModule to set.
+     */
+    protected void setServletModule(ServletTestModule servletModule)
+    {
+        this.servletModule = servletModule;
+    }
+
+    //------------------------------------------------------------------------------
+    /**
+     * @return Returns the servletModule.
+     */
+    protected ServletTestModule getServletModule()
+    {
+        return servletModule;
+    }   
+
+    //------------------------------------------------------------------------------
+    public void tearDown() throws Exception
+    {
+        super.tearDown();
+        super.tearDownTestWeblogs();
+    }   
+    
+    //------------------------------------------------------------------------
+    public static Test suite()
+    {
+        return new TestSuite(AtomServletTest.class);
+    }
+
+    //------------------------------------------------------------------------------
+    public static String generateWSSEHeader(String username, String password)
+        throws Exception
+    {  
+        byte[] nonceBytes = Long.toString(new Date().getTime()).getBytes();
+        String nonce = new String(WSSEUtilities.base64Encode(nonceBytes));
+        
+        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss'Z'");
+        String created = sdf.format(new Date());
+        
+        String digest = WSSEUtilities.generateDigest(
+                nonceBytes, created.getBytes("UTF-8"), password.getBytes("UTF-8"));
+        
+        StringBuffer header = new StringBuffer("UsernameToken Username=\"");
+        header.append(username);
+        header.append("\", ");
+        header.append("PasswordDigest=\"");
+        header.append(digest);
+        header.append("\", ");
+        header.append("Nonce=\"");
+        header.append(nonce);
+        header.append("\", ");
+        header.append("Created=\"");
+        header.append(created);
+        header.append("\"");
+        return header.toString();
+    }
+}

Added: incubator/roller/trunk/tests/org/roller/presentation/bookmarks/BookmarksActionTest.java
URL: http://svn.apache.org/viewcvs/incubator/roller/trunk/tests/org/roller/presentation/bookmarks/BookmarksActionTest.java?rev=189695&view=auto
==============================================================================
--- incubator/roller/trunk/tests/org/roller/presentation/bookmarks/BookmarksActionTest.java (added)
+++ incubator/roller/trunk/tests/org/roller/presentation/bookmarks/BookmarksActionTest.java Wed Jun  8 20:18:46 2005
@@ -0,0 +1,72 @@
+/*
+ * Created on Oct 27, 2003
+ */
+package org.roller.presentation.bookmarks;
+
+import java.util.List;
+import java.util.Set;
+
+import javax.servlet.http.HttpServletRequest;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+import org.roller.pojos.FolderData;
+import org.roller.presentation.StrutsActionTestBase;
+import org.roller.presentation.bookmarks.actions.BookmarksAction;
+import org.roller.presentation.bookmarks.formbeans.BookmarksForm;
+
+import com.mockrunner.mock.web.MockActionMapping;
+import com.mockrunner.mock.web.MockHttpServletRequest;
+import com.mockrunner.mock.web.MockServletContext;
+
+/**
+ * Test BookmarkAction (proof-of-concept for Mockrunner Struts testing)
+ * @author Dave Johnson
+ */
+public class BookmarksActionTest extends StrutsActionTestBase
+{
+    public void testSelectFolder() 
+    {       
+        MockServletContext ctx = getMockFactory().getMockServletContext();
+        ctx.setServletContextName("/roller");        
+        MockHttpServletRequest request = getMockFactory().getMockRequest();
+        request.setContextPath("/roller");
+
+        authenticateUser(mWebsite.getUser().getUserName(), "editor");
+        doFilters();
+
+        // Setup form bean
+        BookmarksForm form = (BookmarksForm)
+            strutsModule.createActionForm(BookmarksForm.class);
+
+        // Setup mapping and request parameters
+        MockActionMapping mapping = strutsModule.getMockActionMapping();
+        mapping.setupForwards(new String[] {"access-denied","BookmarksForm"});
+        mapping.setParameter("method");        
+        strutsModule.addRequestParameter("method","selectFolder"); 
+        
+        strutsModule.actionPerform(BookmarksAction.class, form);        
+        
+        // Test for success
+        strutsModule.verifyNoActionMessages();
+        strutsModule.verifyForward("BookmarksForm");
+        
+        // Verify objects we put in context for JSP page
+        verifyPageContext();
+    }
+    
+    protected void verifyPageContext() 
+    {
+        HttpServletRequest req = (HttpServletRequest)
+        servletModule.getFilteredRequest();
+        assertTrue(req.getAttribute("folder") instanceof FolderData);
+        assertTrue(req.getAttribute("folders") instanceof List);
+        assertTrue(req.getAttribute("bookmarks") instanceof Set);
+    }
+
+    public static Test suite() 
+    {
+        return new TestSuite(BookmarksActionTest.class);
+    }
+}

Added: incubator/roller/trunk/tests/org/roller/presentation/filters/RequestFilterTest.java
URL: http://svn.apache.org/viewcvs/incubator/roller/trunk/tests/org/roller/presentation/filters/RequestFilterTest.java?rev=189695&view=auto
==============================================================================
--- incubator/roller/trunk/tests/org/roller/presentation/filters/RequestFilterTest.java (added)
+++ incubator/roller/trunk/tests/org/roller/presentation/filters/RequestFilterTest.java Wed Jun  8 20:18:46 2005
@@ -0,0 +1,49 @@
+package org.roller.presentation.filters;
+
+import javax.servlet.http.HttpServletRequest;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+import org.roller.presentation.RollerRequest;
+import org.roller.presentation.VelocityServletTestBase;
+import org.roller.presentation.velocity.PageServlet;
+
+import com.mockrunner.mock.web.MockHttpServletRequest;
+
+/** 
+ * @author Dave Johnson
+ */
+public class RequestFilterTest extends VelocityServletTestBase {
+    public void setUp() throws Exception
+    {
+        super.setUp();       
+    }
+    public RequestFilterTest() {
+    }
+    public void testRequestFilter() throws Exception {        
+        
+        servletModule.setServlet(
+           servletModule.createServlet(PageServlet.class));       
+
+        MockHttpServletRequest mockRequest = getMockFactory().getMockRequest();
+        mockRequest.setContextPath("/roller/page");
+        mockRequest.setPathInfo("/testuser/20050101");
+        mockRequest.setRequestURL("http://localost:8080");
+
+        servletModule.createFilter(PersistenceSessionFilter.class);
+        servletModule.createFilter(RequestFilter.class);
+        servletModule.setDoChain(true);
+
+        servletModule.doFilter();   
+        
+        HttpServletRequest req = (HttpServletRequest)
+            servletModule.getFilteredRequest();
+        RollerRequest rreq = RollerRequest.getRollerRequest(req);
+        assertNotNull(rreq);    
+    }
+    public static Test suite() 
+    {
+        return new TestSuite(RequestFilterTest.class);
+    }
+}

Added: incubator/roller/trunk/tests/org/roller/presentation/velocity/ExportRssTest.java
URL: http://svn.apache.org/viewcvs/incubator/roller/trunk/tests/org/roller/presentation/velocity/ExportRssTest.java?rev=189695&view=auto
==============================================================================
--- incubator/roller/trunk/tests/org/roller/presentation/velocity/ExportRssTest.java (added)
+++ incubator/roller/trunk/tests/org/roller/presentation/velocity/ExportRssTest.java Wed Jun  8 20:18:46 2005
@@ -0,0 +1,146 @@
+/*
+ * Created on Mar 25, 2004
+ */
+package org.roller.presentation.velocity;
+
+import java.io.BufferedInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.Date;
+import java.util.List;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+import org.roller.model.WeblogManager;
+import org.roller.pojos.UserData;
+import org.roller.presentation.StrutsActionTestBase;
+
+import com.mockrunner.mock.web.MockServletContext;
+
+/**
+ * Not really a servlet test, the ExportRss class does require
+ * that RollerContext has been loaded and initialized.
+ * 
+ * @author lance.lavandowska
+ */
+public class ExportRssTest extends StrutsActionTestBase
+{    
+    private String oldUploadPath;
+    
+    /**
+     * Not sure how to test that the file was generated, so if
+     * there was no Exception we passed.
+     */
+    public void testExportRecent() throws Exception
+    {      
+        getRoller().begin(UserData.SYSTEM_USER);
+        ExportRss exporter = new ExportRss(mWebsite);
+        
+        //List entries = getRoller().getWeblogManager().getAllRecentWeblogEntries(new Date(), 5);
+        
+        List entries = getRoller().getWeblogManager().getWeblogEntries(
+                        null,               // userName
+                        null,               // startDate
+                        new Date(),         // endDate
+                        null,               // catName
+                        WeblogManager.ALL,  // status
+                        new Integer(5));   // maxEntries
+        
+        try
+        {
+            // test RSS output
+            exporter.exportEntries(entries, "export-test.rss.xml");
+
+            // test Atom output
+            exporter.setExportAtom(true);
+            exporter.exportEntries(entries, "export-test.atom.xml");
+        }
+        catch (Exception e)
+        {
+            mLogger.error(e);
+            // I'm not sure how best to test the output!
+            // I guess no exceptions will have to do.
+            fail("Find a better way to test than checking Exceptions, bozo!");
+        }
+        finally 
+        {
+            getRoller().begin(UserData.SYSTEM_USER);
+        }
+    }
+    
+    /*
+     * Need to change the UploadPath location for testing. 
+     * @see junit.framework.TestCase#setUp()
+     */
+    public void setUp() throws Exception
+    {
+        super.setUp();
+
+        getRoller().begin(UserData.SYSTEM_USER);
+        //RollerConfigData  rollerConfig = rollerContext.getRollerConfig();
+        //oldUploadPath = rollerConfig.getUploadPath();
+        //rollerConfig.setUploadPath("build/junk");
+        //rollerConfig.save();
+        getRoller().commit();        
+
+        MockServletContext mContext = getMockFactory().getMockServletContext();
+        mContext.setRealPath("build/junk", "./build/junk");
+        
+        setupVelocityProperties(mContext);
+    }
+    
+    /**
+     * ExportRss needs to load velocity.properties from ServletContext.
+     * For the mock implementation we need to set the 'resource stream'.
+     * @param mContext
+     * @throws IOException
+     */
+    private void setupVelocityProperties(MockServletContext mContext) throws IOException
+    {
+        InputStream is = this.getClass().getClassLoader().getResourceAsStream("velocity.properties");
+        if (is == null) fail("Unable to find velocity.properties");
+        BufferedInputStream bis = new BufferedInputStream(is, 1);
+        ByteArrayOutputStream bos = new ByteArrayOutputStream();
+        int buf = bis.read();
+        do
+        {
+            bos.write(buf);
+            buf = bis.read();
+        }
+        while(buf != -1);
+        
+        byte[] bytes = bos.toByteArray();
+        mContext.setResourceAsStream("/WEB-INF/velocity.properties", bytes);
+        try
+        {
+            bos.close();
+            bis.close();
+        }
+        catch (IOException e)
+        {
+            e.printStackTrace();
+        }
+    }
+
+    /*
+     * Need to reset the UploadPath after testing. 
+     * @see junit.framework.TestCase#tearDown()
+     */
+    public void tearDown() throws Exception
+    {
+        //getRoller().begin(UserData.SYSTEM_USER);
+        //RollerConfigData  rollerConfig = rollerContext.getRollerConfig();
+        //rollerConfig.setUploadPath(oldUploadPath);
+        //rollerConfig.save();
+        //getRoller().commit();
+        
+        super.tearDown();
+    }
+
+    public static Test suite() 
+    {
+        return new TestSuite(ExportRssTest.class);
+    }
+}

Added: incubator/roller/trunk/tests/org/roller/presentation/velocity/plugins/smileys/SmileysTest.java
URL: http://svn.apache.org/viewcvs/incubator/roller/trunk/tests/org/roller/presentation/velocity/plugins/smileys/SmileysTest.java?rev=189695&view=auto
==============================================================================
--- incubator/roller/trunk/tests/org/roller/presentation/velocity/plugins/smileys/SmileysTest.java (added)
+++ incubator/roller/trunk/tests/org/roller/presentation/velocity/plugins/smileys/SmileysTest.java Wed Jun  8 20:18:46 2005
@@ -0,0 +1,52 @@
+/*
+ * Created on Jun 8, 2004
+ */
+package org.roller.presentation.velocity.plugins.smileys;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+import org.roller.presentation.MockRollerRequest;
+import org.roller.presentation.VelocityServletTestBase;
+
+import com.mockrunner.mock.web.MockHttpServletRequest;
+import com.mockrunner.mock.web.MockServletContext;
+
+/**
+ * @author lance.lavandowska
+ */
+public class SmileysTest extends VelocityServletTestBase
+{
+    public void testSmileEmoticon() throws Exception
+    {
+        MockServletContext ctx = getMockFactory().getMockServletContext();
+        ctx.setServletContextName("/roller"); 
+        
+        MockHttpServletRequest request = getMockFactory().getMockRequest();
+        request.setContextPath("/roller");
+       
+        doFilters();
+
+        SmileysPlugin plugin = new SmileysPlugin();
+        plugin.init(new MockRollerRequest(request, ctx), null);
+        assertTrue( SmileysPlugin.smileyPatterns.length > 0 );
+
+        String test = "put on a happy :-) face";
+        String expected = 
+            "put on a happy <img src=\"/roller/images/smileys/smile.gif" +
+            "\" class=\"smiley\" alt=\":-)\" title=\":-)\"> face";
+        String result = plugin.render(test);
+        //System.out.println(result);
+        assertEquals(expected, result);
+    }
+        
+    public SmileysTest()
+    {
+        super();
+    }
+
+    public static Test suite() 
+    {
+        return new TestSuite(SmileysTest.class);
+    }
+}

Added: incubator/roller/trunk/tests/org/roller/presentation/velocity/plugins/textile/TextileTest.java
URL: http://svn.apache.org/viewcvs/incubator/roller/trunk/tests/org/roller/presentation/velocity/plugins/textile/TextileTest.java?rev=189695&view=auto
==============================================================================
--- incubator/roller/trunk/tests/org/roller/presentation/velocity/plugins/textile/TextileTest.java (added)
+++ incubator/roller/trunk/tests/org/roller/presentation/velocity/plugins/textile/TextileTest.java Wed Jun  8 20:18:46 2005
@@ -0,0 +1,20 @@
+/*
+ * Created on Oct 31, 2003
+ */
package org.roller.presentation.velocity.plugins.textile;

import junit.framework.Test;
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
+
+import org.roller.presentation.bookmarks.BookmarksActionTest;
+import org.roller.presentation.velocity.PagePlugin;
+import org.roller.presentation.velocity.plugins.textile.TextilePlugin;
+
/**
 * We really need to solve webtesting to adequately test our Presentation classes.
 * 
 * @author lance
 */
public class TextileTest extends TestCase
{
    String textileStr = "*strong* plain _emphasis_ * _emphaticStrong_ * ";
    String expected = "<p><strong>strong</strong> plain <em>emphasis</em> <strong> <em>emphaticStrong</em> </strong></p>";
  
    /* 
+     * This fails because Textile4J appears to place a tab (\t)
+     * at the beginning of the result.  If the result is .trim()'ed
+     * then it passes.
     */
    public void testTextile()
    {
        PagePlugin textile = new TextilePlugin();
        
        String result = textile.render(textileStr);
+        //System.out.println(expected);
+        //System.out.println(result);
        assertEquals("this will fail until Textile4J is fixed.", expected, result);         
    }
    
	/* (non-Javadoc)
	 * @see junit.framework.TestCase#setUp()
	 */
	protected void setUp() throws Exception
	{
        super.setUp();	       
	}

	/* (non-Javadoc)
	 * @see junit.framework.TestCase#tearDown()
	 */
	protected void tearDown() throws Exception
	{
	   super.tearDown();
	}
+
+    public static Test suite() 
+    {
+        return new TestSuite(TextileTest.class);
+    }

}
\ No newline at end of file

Added: incubator/roller/trunk/tests/org/roller/presentation/weblog/WeblogEntryActionTest.java
URL: http://svn.apache.org/viewcvs/incubator/roller/trunk/tests/org/roller/presentation/weblog/WeblogEntryActionTest.java?rev=189695&view=auto
==============================================================================
--- incubator/roller/trunk/tests/org/roller/presentation/weblog/WeblogEntryActionTest.java (added)
+++ incubator/roller/trunk/tests/org/roller/presentation/weblog/WeblogEntryActionTest.java Wed Jun  8 20:18:46 2005
@@ -0,0 +1,64 @@
+package org.roller.presentation.weblog;
+
+import javax.servlet.http.HttpServletRequest;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+import org.roller.presentation.StrutsActionTestBase;
+import org.roller.presentation.weblog.actions.WeblogEntryFormAction;
+import org.roller.presentation.weblog.formbeans.WeblogEntryFormEx;
+
+import com.mockrunner.mock.web.MockActionMapping;
+import com.mockrunner.mock.web.MockHttpServletRequest;
+
+/**
+ * @author dave
+ */
+public class WeblogEntryActionTest extends StrutsActionTestBase
+{
+    public void testCreateWeblogEntry() 
+    {
+        authenticateUser(mWebsite.getUser().getUserName(), "editor");
+        
+        MockHttpServletRequest mockRequest = getMockFactory().getMockRequest();
+        mockRequest.setContextPath("/dummy");
+        
+        doFilters();
+
+        // Setup mapping and request parameters
+        MockActionMapping mapping = strutsModule.getMockActionMapping();
+        mapping.setupForwards(new String[] {
+            "access-denied","weblogEdit.page","weblogEntryRemove.page"});
+        mapping.setParameter("method");        
+        strutsModule.addRequestParameter("method","create"); 
+        
+        // Setup form bean
+        WeblogEntryFormEx form = (WeblogEntryFormEx)
+            strutsModule.createActionForm(WeblogEntryFormEx.class);
+        form.setTitle("test_title");
+        form.setText("Test blog text");
+
+        strutsModule.actionPerform(WeblogEntryFormAction.class, form);        
+        
+        // Test for success
+        strutsModule.verifyNoActionMessages();
+        strutsModule.verifyForward("weblogEdit.page");
+        
+        // Verify objects we put in context for JSP page
+        verifyPageContext();
+    }
+    
+    protected void verifyPageContext() 
+    {
+        HttpServletRequest req = (HttpServletRequest)
+            servletModule.getFilteredRequest();
+        assertNotNull(req.getAttribute("model"));
+    }
+
+    public static Test suite() 
+    {
+        return new TestSuite(WeblogEntryActionTest.class);
+    }
+
+}

Added: incubator/roller/trunk/tests/org/roller/presentation/xmlrpc/RollerXmlRpcServerTest.java
URL: http://svn.apache.org/viewcvs/incubator/roller/trunk/tests/org/roller/presentation/xmlrpc/RollerXmlRpcServerTest.java?rev=189695&view=auto
==============================================================================
--- incubator/roller/trunk/tests/org/roller/presentation/xmlrpc/RollerXmlRpcServerTest.java (added)
+++ incubator/roller/trunk/tests/org/roller/presentation/xmlrpc/RollerXmlRpcServerTest.java Wed Jun  8 20:18:46 2005
@@ -0,0 +1,162 @@
+/*
+ * Created on Jun 15, 2004
+ */
+package org.roller.presentation.xmlrpc;
+
+import com.mockrunner.mock.web.MockHttpServletRequest;
+import com.mockrunner.mock.web.MockHttpServletResponse;
+import com.mockrunner.mock.web.MockServletContext;
+import com.mockrunner.mock.web.WebMockObjectFactory;
+import com.mockrunner.servlet.ServletTestModule;
+
+import org.roller.RollerTestBase;
+import org.roller.presentation.MockRollerContext;
+import org.roller.presentation.RollerRequest;
+import org.roller.util.RegexUtil;
+ 
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.regex.Pattern;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+/**
+ * Makes calls to the RollerXmlRpcServer, which should handle a
+ * post just as it would with a real XML-RPC call.
+ * 
+ * @author lance.lavandowska
+ */
+public class RollerXmlRpcServerTest extends RollerTestBase
+{
+    private static HashMap typeMap = new HashMap();
+    static {
+        typeMap.put(Boolean.class, "boolean");
+        typeMap.put(Double.class, "double");
+        typeMap.put(Date.class, "dateTime.iso8601");
+        typeMap.put(Integer.class, "int");
+    }
+
+    protected WebMockObjectFactory mockFactory;
+    protected MockRollerContext rollerContext;
+    protected MockHttpServletRequest mockRequest;
+    protected ServletTestModule servletTestModule;
+
+    public void testBloggerGetRecentPosts()
+    {
+        ArrayList params = new ArrayList();
+        params.add("roller"); // appkey
+        params.add("roller"); // blogid
+        params.add("testuser0"); // userid
+        params.add("password"); // password
+        params.add(new Integer(5)); // numposts
+        String message = buildXmlRpcString("blogger.getRecentPosts", params);
+
+        mockRequest.setBodyContent(message);
+        servletTestModule.doPost();
+        MockHttpServletResponse response = mockFactory.getMockResponse();
+        String responseBody = response.getOutputStreamContent();
+
+        // assert no fault code
+        assertTrue(responseBody, 
+                responseBody.indexOf("<name>faultCode</name>") == -1);
+        
+        // make sure all/any userids returned belong to our test user
+        Pattern userPattern = 
+                Pattern.compile("<name>userid</name><value>(.*?)</value>");
+        ArrayList users = RegexUtil.getMatches(userPattern, responseBody, 1);
+        Iterator it = users.iterator();
+        while (it.hasNext()) 
+        {
+            String user = (String)it.next();
+            //System.out.println(user);
+            if (user.equals("testuser0"))
+            {
+                continue;
+            }
+            else
+            {
+                fail("getRecentPosts() returned entry for a user [" 
+                        + user + "] other than " + testUsername);
+            }
+        }
+    }
+    
+    /**
+     * Build an XML-RPC message from methodName and params.
+     * 
+     * @param methodName
+     * @param params
+     * @return
+     */
+    private String buildXmlRpcString(String methodName, ArrayList params)
+    {
+        StringBuffer buf = new StringBuffer("<?xml version=\"1.0\"?>");
+        buf.append("<methodCall>");
+        buf.append("<methodName>").append(methodName).append("</methodName>");
+        buf.append("<params>");
+        Iterator it = params.iterator();
+        while (it.hasNext()) {
+            buf.append("<param><value>");
+            Object param = it.next();
+            String paramType = (String)typeMap.get(param.getClass());
+            if (paramType != null)
+            {
+                buf.append("<").append(paramType).append(">")
+                   .append(param)
+                   .append("</").append(paramType).append(">");                    
+            }
+            else
+            {    
+                buf.append("<string>").append(param).append("</string>");
+            }
+            buf.append("</value></param>");
+        }
+        buf.append("</params> ");
+        buf.append("</methodCall>");
+        return buf.toString();
+    }
+    
+    //-----------------------------------------------------------------------
+    public void setUp() throws Exception
+    {
+        // must do super.setup() before creating MockRollerContext
+        super.setUp();
+        setUpTestWeblogs();
+
+        mockFactory = new WebMockObjectFactory();
+
+        // create mock RollerContext
+        MockServletContext ctx = mockFactory.getMockServletContext();
+        ctx.setRealPath("/", ".");
+        rollerContext = new MockRollerContext();
+        rollerContext.init(ctx);
+
+        mockRequest = mockFactory.getMockRequest();
+        mockRequest.setContextPath("/roller");
+        RollerRequest.getRollerRequest(
+                mockRequest, mockFactory.getMockServletContext());
+
+        servletTestModule = new ServletTestModule(mockFactory);
+        servletTestModule.createServlet(RollerXMLRPCServlet.class);
+    }
+
+    //-----------------------------------------------------------------------
+    public void tearDown() throws Exception
+    {
+        super.tearDown();
+        mockRequest = null;
+        servletTestModule.clearOutput();
+        servletTestModule.releaseFilters();
+        servletTestModule = null;
+        rollerContext = null;
+        mockFactory = null;
+    }
+
+    public static Test suite() 
+    {
+        return new TestSuite(RollerXmlRpcServerTest.class);
+    }
+}
\ No newline at end of file

Added: incubator/roller/trunk/tests/org/roller/util/LRUCache2Test.java
URL: http://svn.apache.org/viewcvs/incubator/roller/trunk/tests/org/roller/util/LRUCache2Test.java?rev=189695&view=auto
==============================================================================
--- incubator/roller/trunk/tests/org/roller/util/LRUCache2Test.java (added)
+++ incubator/roller/trunk/tests/org/roller/util/LRUCache2Test.java Wed Jun  8 20:18:46 2005
@@ -0,0 +1,114 @@
+/*
+ * Created on Jun 15, 2004
+ */
+package org.roller.util;
+
+import org.roller.presentation.bookmarks.BookmarksActionTest;
+
+import junit.framework.Test;
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
+
+/**
+ * @author dmj
+ */
+public class LRUCache2Test extends TestCase
+{
+    /** 
+     * @see junit.framework.TestCase#setUp()
+     */
+    protected void setUp() throws Exception
+    {
+        // TODO Auto-generated method stub
+        super.setUp();
+    }
+    
+    public void testTimeout() 
+    {
+        // Create cache with 100 item limit and 15 second timeout
+        TestEnvironment env = new TestEnvironment();
+        LRUCache2 cache = new LRUCache2(env, 100, 15000);
+            
+        env.time = 1000;
+        cache.put("key1", "string1");
+        cache.put("key2", "string2");
+        cache.put("key3", "string3");
+        assertNotNull(cache.get("key1"));
+        assertNotNull(cache.get("key2"));
+        assertNotNull(cache.get("key3"));
+
+        env.time = 16000;
+        assertNull(cache.get("key1"));
+        assertNull(cache.get("key2"));
+        assertNull(cache.get("key3"));
+    }
+    
+    public void testLRU() 
+    {
+        // Create cache with 3 item limit and 15 second timeout
+        TestEnvironment env = new TestEnvironment();
+        LRUCache2 cache = new LRUCache2(env, 3, 15000);
+            
+        env.time = 1000;
+        cache.put("key1", "string1");
+        cache.put("key2", "string2");
+        cache.put("key3", "string3");
+        assertNotNull(cache.get("key1"));
+        assertNotNull(cache.get("key2"));
+        assertNotNull(cache.get("key3"));
+        
+        try { Thread.sleep(200); } catch (InterruptedException ignored) {}
+        
+        // accessing key1 and key2 will make key3 LRU
+        cache.get("key1");
+        cache.get("key2");
+        
+        // adding a forth key will push out the LRU entry
+        cache.put("key4", "string4");    
+        assertNull(cache.get("key3"));     
+    }
+    
+    public void testPurge() 
+    {
+        // Create cache with 100 item limit and 15 second timeout
+        TestEnvironment env = new TestEnvironment();
+        LRUCache2 cache = new LRUCache2(env, 100, 15000);
+            
+        env.time = 1000;
+        cache.put("key1", "string1");
+        cache.put("key2", "string2");
+        cache.put("key3", "string3");
+        assertNotNull(cache.get("key1"));
+        assertNotNull(cache.get("key2"));
+        assertNotNull(cache.get("key3"));
+        
+        cache.purge(new String[] {"key1", "key2"});
+        assertEquals(1, cache.size());
+        
+        cache.purge();
+        assertEquals(0, cache.size());
+    }
+    
+    /** 
+     * @see junit.framework.TestCase#tearDown()
+     */
+    protected void tearDown() throws Exception
+    {
+        // TODO Auto-generated method stub
+        super.tearDown();
+    }
+    
+    public static class TestEnvironment implements LRUCache2.Environment 
+	{
+    	public long time = 0;
+		public long getCurrentTimeInMillis() 
+		{
+			return time;
+		}
+	}
+
+    public static Test suite() 
+    {
+        return new TestSuite(LRUCache2Test.class);
+    }
+}

Added: incubator/roller/trunk/tests/org/roller/util/LinkbackExtractorTest.java
URL: http://svn.apache.org/viewcvs/incubator/roller/trunk/tests/org/roller/util/LinkbackExtractorTest.java?rev=189695&view=auto
==============================================================================
--- incubator/roller/trunk/tests/org/roller/util/LinkbackExtractorTest.java (added)
+++ incubator/roller/trunk/tests/org/roller/util/LinkbackExtractorTest.java Wed Jun  8 20:18:46 2005
@@ -0,0 +1,73 @@
+
+package org.roller.util;
+
+import org.roller.presentation.bookmarks.BookmarksActionTest;
+
+import junit.framework.Test;
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
+
+/**
+ * @author davidj
+ */
+public class LinkbackExtractorTest extends TestCase
+{
+    /**
+     * Constructor for LinkbackExtractorTest.
+     * @param arg0
+     */
+    public LinkbackExtractorTest(String arg0)
+    {
+        super(arg0);
+    }
+
+    public static void main(String[] args)
+    {
+    }
+
+    /**
+     * @see TestCase#setUp()
+     */
+    protected void setUp() throws Exception
+    {
+        super.setUp();
+    }
+
+    /**
+     * @see TestCase#tearDown()
+     */
+    protected void tearDown() throws Exception
+    {
+        super.tearDown();
+    }
+
+    public void testLinkbackExtractor() throws Exception
+    {
+		String[][] testrefs = new String[][] 
+		{
+            { 
+                "http://www.rollerweblogger.org/page/roller", 
+                "http://staff.develop.com/halloway/weblog/2003/01/23.html" 
+            },
+            { 
+                "http://postneo.com/", 
+                "http://www.rollerweblogger.org/page/roller/20030125" 
+            }
+		};
+		
+		for ( int i=0; i<testrefs.length; i++ )
+		{
+			String refurl = testrefs[i][0];
+			String requrl = testrefs[i][1];
+			LinkbackExtractor le = new LinkbackExtractor(refurl,requrl);
+			System.out.println(le.getTitle());
+			System.out.println(le.getPermalink());
+			System.out.println(le.getExcerpt());
+		}		
+    }
+
+    public static Test suite() 
+    {
+        return new TestSuite(LinkbackExtractorTest.class);
+    }
+}

Added: incubator/roller/trunk/tests/org/roller/util/RegexUtilTest.java
URL: http://svn.apache.org/viewcvs/incubator/roller/trunk/tests/org/roller/util/RegexUtilTest.java?rev=189695&view=auto
==============================================================================
--- incubator/roller/trunk/tests/org/roller/util/RegexUtilTest.java (added)
+++ incubator/roller/trunk/tests/org/roller/util/RegexUtilTest.java Wed Jun  8 20:18:46 2005
@@ -0,0 +1,82 @@
+/*
+ * Created on Nov 8, 2003
+ */
+package org.roller.util;
+
+import org.roller.presentation.bookmarks.BookmarksActionTest;
+
+import junit.framework.Test;
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
+
+/**
+ * @author lance
+ */
+public class RegexUtilTest extends TestCase
+{
+
+	/**
+	 * 
+	 */
+	public RegexUtilTest()
+	{
+		super();
+	}
+
+	/**
+	 * @param arg0
+	 */
+	public RegexUtilTest(String arg0)
+	{
+		super(arg0);
+	}
+
+    /**
+     * @see TestCase#setUp()
+     */
+    protected void setUp() throws Exception
+    {
+        super.setUp();
+    }
+
+    /**
+     * @see TestCase#tearDown()
+     */
+    protected void tearDown() throws Exception
+    {
+        super.tearDown();
+    }
+    
+    public void testEncodingEmail()
+    {
+        // test mailto: escaping
+        String test = "test <a href='mailto:this@email.com'>email</a> string";
+        String expect = "test <a href='mailto:%74%68%69%73%40%65%6d%61%69%6c%2e%63%6f%6d'>email</a> string";
+        String result = RegexUtil.encodeEmail(test) ;
+        //System.out.println(result);
+        assertEquals(expect, result);        
+    }
+    
+    public void testObfuscateEmail()
+    {
+        // test "plaintext" escaping
+        String test = "this@email.com";
+        String expect = "this-AT-email-DOT-com";
+        String result = RegexUtil.encodeEmail(test);
+        assertEquals(expect, result);        
+    }
+    
+    public void testHexEmail()
+    {
+        // test hex & obfuscate together
+        String test = "test <a href='mailto:this@email.com'>this@email.com</a> string, and this@email.com";
+        String expect = "test <a href='mailto:%74%68%69%73%40%65%6d%61%69%6c%2e%63%6f%6d'>this-AT-email-DOT-com</a> string, and this-AT-email-DOT-com";
+        String result = RegexUtil.encodeEmail(test);
+        //System.out.println(result);
+        assertEquals(expect, result);
+    }
+
+    public static Test suite() 
+    {
+        return new TestSuite(RegexUtilTest.class);
+    }}

Added: incubator/roller/trunk/tests/org/roller/util/UtilitiesTest.java
URL: http://svn.apache.org/viewcvs/incubator/roller/trunk/tests/org/roller/util/UtilitiesTest.java?rev=189695&view=auto
==============================================================================
--- incubator/roller/trunk/tests/org/roller/util/UtilitiesTest.java (added)
+++ incubator/roller/trunk/tests/org/roller/util/UtilitiesTest.java Wed Jun  8 20:18:46 2005
@@ -0,0 +1,96 @@
+/*
+ * Created on Nov 2, 2003
+ */
+package org.roller.util;
+
+import org.roller.presentation.bookmarks.BookmarksActionTest;
+
+import junit.framework.Test;
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
+
+/**
+ * @author lance
+ */
+public class UtilitiesTest extends TestCase
+{
+    /**
+     * Constructor for LinkbackExtractorTest.
+     * @param arg0
+     */
+    public UtilitiesTest(String arg0)
+    {
+        super(arg0);
+    }
+
+    public static void main(String[] args)
+    {
+    }
+
+    /**
+     * @see TestCase#setUp()
+     */
+    protected void setUp() throws Exception
+    {
+        super.setUp();
+    }
+
+    /**
+     * @see TestCase#tearDown()
+     */
+    protected void tearDown() throws Exception
+    {
+        super.tearDown();
+    }
+    
+    public void testExtractHTML()
+    {
+        String test = "<a>keep me</a>";
+        String expect = "<a></a>";
+        String result = Utilities.extractHTML(test);
+        assertEquals(expect, result);
+    }
+    
+    public void testRemoveHTML()
+    {
+        String test = "<br><br><p>a <b>bold</b> sentence with a <a href=\"http://example.com\">link</a></p>";
+        String expect = "a bold sentence with a link";
+        String result = Utilities.removeHTML(test, false);
+        assertEquals(expect, result);
+    }
+        
+    public void testTruncateNicely1()
+    {
+        String test = "blah blah blah blah blah";
+        String expect = "blah blah blah";
+        String result = Utilities.truncateNicely(test, 11, 15, "");
+        assertEquals(expect, result);
+    }
+    
+    public void testTruncateNicely2()
+    {
+        String test = "<p><b>blah1 blah2</b> <i>blah3 blah4 blah5</i></p>";
+        String expect = "<p><b>blah1 blah2</b> <i>blah3</i></p>";
+        String result = Utilities.truncateNicely(test, 15, 20, "");
+        //System.out.println(result);
+        assertEquals(expect, result);
+    }
+
+    public void testAddNoFollow() {
+        String test1 = "<p>this some text with a <a href=\"http://example.com\">link</a>";
+        String expect1 = "<p>this some text with a <a href=\"http://example.com\" rel=\"nofollow\">link</a>";
+        String result1 = Utilities.addNofollow(test1);
+        assertEquals(expect1, result1);
+
+        String test2 = "<p>this some text with a <A href=\"http://example.com\">link</a>";
+        String expect2 = "<p>this some text with a <A href=\"http://example.com\" rel=\"nofollow\">link</a>";
+        String result2 = Utilities.addNofollow(test2);
+        assertEquals(expect2, result2);
+
+    }
+
+    public static Test suite() 
+    {
+        return new TestSuite(UtilitiesTest.class);
+    }
+}

Added: incubator/roller/trunk/tests/org/roller/util/rome/DiskFeedInfoCacheTest.java
URL: http://svn.apache.org/viewcvs/incubator/roller/trunk/tests/org/roller/util/rome/DiskFeedInfoCacheTest.java?rev=189695&view=auto
==============================================================================
--- incubator/roller/trunk/tests/org/roller/util/rome/DiskFeedInfoCacheTest.java (added)
+++ incubator/roller/trunk/tests/org/roller/util/rome/DiskFeedInfoCacheTest.java Wed Jun  8 20:18:46 2005
@@ -0,0 +1,58 @@
+/*
+ * Copyright 2005 Sun Microsystems, Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.roller.util.rome;
+
+import java.net.URL;
+
+import junit.framework.Test;
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
+
+import org.roller.business.FileManagerTest;
+import org.roller.util.rome.DiskFeedInfoCache;
+import com.sun.syndication.fetcher.impl.SyndFeedInfo;
+
+/**
+ * @author David M Johnson
+ */
+public class DiskFeedInfoCacheTest extends TestCase
+{
+    public static void main(String[] args)
+    {
+        junit.textui.TestRunner.run(DiskFeedInfoCacheTest.class);
+    }
+
+    public void testCache() throws Exception  
+    {
+        URL url = new URL("http://cnn.com");
+        SyndFeedInfo info = new SyndFeedInfo();
+        info.setUrl(url);
+        
+        DiskFeedInfoCache cache = new DiskFeedInfoCache("./cache");
+        cache.setFeedInfo(info.getUrl(), info);
+        
+        SyndFeedInfo info2 = cache.getFeedInfo(url);
+        assertNotNull(info2);
+        assertEquals(url, info2.getUrl());
+    }
+
+    public static Test suite()
+    {
+        return new TestSuite(DiskFeedInfoCacheTest.class);
+
+    }
+}

Added: incubator/roller/trunk/tools/buildtime/ant-1.6.2/ant-commons-net.jar
URL: http://svn.apache.org/viewcvs/incubator/roller/trunk/tools/buildtime/ant-1.6.2/ant-commons-net.jar?rev=189695&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/roller/trunk/tools/buildtime/ant-1.6.2/ant-commons-net.jar
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/roller/trunk/tools/buildtime/ant-1.6.2/ant-junit.jar
URL: http://svn.apache.org/viewcvs/incubator/roller/trunk/tools/buildtime/ant-1.6.2/ant-junit.jar?rev=189695&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/roller/trunk/tools/buildtime/ant-1.6.2/ant-junit.jar
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/roller/trunk/tools/buildtime/ant-1.6.2/ant-launcher.jar
URL: http://svn.apache.org/viewcvs/incubator/roller/trunk/tools/buildtime/ant-1.6.2/ant-launcher.jar?rev=189695&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/roller/trunk/tools/buildtime/ant-1.6.2/ant-launcher.jar
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/roller/trunk/tools/buildtime/ant-1.6.2/ant.jar
URL: http://svn.apache.org/viewcvs/incubator/roller/trunk/tools/buildtime/ant-1.6.2/ant.jar?rev=189695&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/roller/trunk/tools/buildtime/ant-1.6.2/ant.jar
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/roller/trunk/tools/buildtime/ant-1.6.2/commons-net-1.2.2.jar
URL: http://svn.apache.org/viewcvs/incubator/roller/trunk/tools/buildtime/ant-1.6.2/commons-net-1.2.2.jar?rev=189695&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/roller/trunk/tools/buildtime/ant-1.6.2/commons-net-1.2.2.jar
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/roller/trunk/tools/buildtime/ant-1.6.2/jakarta-oro-2.0.8.jar
URL: http://svn.apache.org/viewcvs/incubator/roller/trunk/tools/buildtime/ant-1.6.2/jakarta-oro-2.0.8.jar?rev=189695&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/roller/trunk/tools/buildtime/ant-1.6.2/jakarta-oro-2.0.8.jar
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/roller/trunk/tools/buildtime/ejb-1.1.jar
URL: http://svn.apache.org/viewcvs/incubator/roller/trunk/tools/buildtime/ejb-1.1.jar?rev=189695&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/roller/trunk/tools/buildtime/ejb-1.1.jar
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/roller/trunk/tools/buildtime/findbugs/findbugs.bat
URL: http://svn.apache.org/viewcvs/incubator/roller/trunk/tools/buildtime/findbugs/findbugs.bat?rev=189695&view=auto
==============================================================================
--- incubator/roller/trunk/tools/buildtime/findbugs/findbugs.bat (added)
+++ incubator/roller/trunk/tools/buildtime/findbugs/findbugs.bat Wed Jun  8 20:18:46 2005
@@ -0,0 +1,146 @@
+@echo off
+:: Launch FindBugs on a Windows system.
+:: Adapted from scripts found at http://www.ericphelps.com/batch/
+:: This will only work on Windows NT or later!
+
+:: Don't affect environment outside of this invocation
+setlocal
+
+:: ----------------------------------------------------------------------
+:: Set up default values
+:: ----------------------------------------------------------------------
+set appjar=findbugsGUI.jar
+set javahome=
+set launcher=javaw.exe
+set start=start "FindBugs"
+set jvmargs=
+set debugArg=
+set conserveSpaceArg=
+set workHardArg=
+set args=
+set javaProps=
+set maxheap=256
+
+:: Try finding the default FINDBUGS_HOME directory
+:: from the directory path of this script
+set default_findbugs_home=%~dp0../findbugs
+echo %default_findbugs_home%
+
+:: Honor JAVA_HOME environment variable if it is set
+if "%JAVA_HOME%"=="" goto nojavahome
+if not exist "%JAVA_HOME%\bin\javaw.exe" goto nojavahome
+set javahome=%JAVA_HOME%\bin\
+:nojavahome
+
+goto loop
+
+:: ----------------------------------------------------------------------
+:: Process command-line arguments
+:: ----------------------------------------------------------------------
+
+:shift2
+shift
+:shift1
+shift
+
+:loop
+
+:: Remove surrounding quotes from %1 and %2
+set firstArg=%~1
+set secondArg=%~2
+
+if not "%firstArg%"=="-gui" goto notGui
+set appjar=findbugsGUI.jar
+set launcher=javaw.exe
+goto shift1
+:notGui
+
+if not "%firstArg%"=="-textui" goto notTextui
+set appjar=findbugs.jar
+set launcher=java.exe
+set start=
+goto shift1
+:notTextui
+
+if not "%firstArg%"=="-debug" goto notDebug
+set launcher=java.exe
+set start=
+set debugArg=-Dfindbugs.debug=true
+goto shift1
+:notDebug
+
+if "%firstArg%"=="-home" set FINDBUGS_HOME=%secondArg%
+if "%firstArg%"=="-home" goto shift2
+
+if "%firstArg%"=="-jvmArgs" set jvmargs=%secondArg%
+if "%firstArg%"=="-jvmArgs" goto shift2
+
+if "%firstArg%"=="-maxHeap" set maxheap=%secondArg%
+if "%firstArg%"=="-maxHeap" goto shift2
+
+if "%firstArg%"=="-conserveSpace" set conserveSpaceArg=-Dfindbugs.conserveSpace=true
+if "%firstArg%"=="-conserveSpace" goto shift1
+
+if "%firstArg%"=="-workHard" set workHardArg=-Dfindbugs.workHard=true
+if "%firstArg%"=="-workHard" goto shift1
+
+if "%firstArg%"=="-javahome" set javahome=%secondArg%\bin\
+if "%firstArg%"=="-javahome" goto shift2
+
+if "%firstArg%"=="-property" set javaProps=-D%secondArg% %javaProps%
+if "%firstArg%"=="-property" goto shift2
+
+if "%firstArg%"=="-help" goto help
+
+if "%firstArg%"=="" goto launch
+
+set args=%args% "%firstArg%"
+goto shift1
+
+:: ----------------------------------------------------------------------
+:: Launch FindBugs
+:: ----------------------------------------------------------------------
+:launch
+:: Make sure FINDBUGS_HOME is set.
+:: If it isn't, try using the default value based on the
+:: directory path of the invoked script.
+:: Note that this will fail miserably if the value of FINDBUGS_HOME
+:: has quote characters in it.
+if not "%FINDBUGS_HOME%"=="" goto checkHomeValid
+set FINDBUGS_HOME=%default_findbugs_home%
+
+:checkHomeValid
+if not exist "%FINDBUGS_HOME%\lib\%appjar%" goto homeNotSet
+
+:found_home
+echo Launch FindBugs!
+%start% "%javahome%%launcher%" %debugArg% %conserveSpaceArg% %workHardArg% %javaProps% "-Dfindbugs.home=%FINDBUGS_HOME%" -Xmx%maxheap%m %jvmargs% -jar "%FINDBUGS_HOME%\lib\%appjar%" %args%
+goto end
+
+:: ----------------------------------------------------------------------
+:: Display usage information
+:: ----------------------------------------------------------------------
+:help
+echo Usage: findbugs [options]
+echo    -home dir       Use dir as FINDBUGS_HOME
+echo    -gui            Use the Graphical UI (default behavior)
+echo    -textui         Use the Text UI
+echo    -jvmArgs args   Pass args to JVM
+echo    -maxHeap size   Set maximum Java heap size in megabytes (default %maxheap%)
+echo    -javahome dir   Specify location of JRE
+echo    -help           Display this message
+echo    -debug          Enable debug tracing in FindBugs
+echo    -conserveSpace  Conserve memory at the expense of precision
+echo All other options are passed to the FindBugs application
+goto end
+
+:: ----------------------------------------------------------------------
+:: Report that FINDBUGS_HOME is not set (and was not specified)
+:: ----------------------------------------------------------------------
+:homeNotSet
+echo Could not find FindBugs home directory.  There may be a problem
+echo with the FindBugs installation.  Try setting FINDBUGS_HOME, or
+echo re-installing.
+goto end
+
+:end

Added: incubator/roller/trunk/tools/buildtime/findbugs/lib/bcel.jar
URL: http://svn.apache.org/viewcvs/incubator/roller/trunk/tools/buildtime/findbugs/lib/bcel.jar?rev=189695&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/roller/trunk/tools/buildtime/findbugs/lib/bcel.jar
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/roller/trunk/tools/buildtime/findbugs/lib/dom4j-full.jar
URL: http://svn.apache.org/viewcvs/incubator/roller/trunk/tools/buildtime/findbugs/lib/dom4j-full.jar?rev=189695&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/roller/trunk/tools/buildtime/findbugs/lib/dom4j-full.jar
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/roller/trunk/tools/buildtime/findbugs/lib/findbugs-ant.jar
URL: http://svn.apache.org/viewcvs/incubator/roller/trunk/tools/buildtime/findbugs/lib/findbugs-ant.jar?rev=189695&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/roller/trunk/tools/buildtime/findbugs/lib/findbugs-ant.jar
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/roller/trunk/tools/buildtime/findbugs/lib/findbugs.jar
URL: http://svn.apache.org/viewcvs/incubator/roller/trunk/tools/buildtime/findbugs/lib/findbugs.jar?rev=189695&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/roller/trunk/tools/buildtime/findbugs/lib/findbugs.jar
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/roller/trunk/tools/buildtime/findbugs/lib/findbugsGUI.jar
URL: http://svn.apache.org/viewcvs/incubator/roller/trunk/tools/buildtime/findbugs/lib/findbugsGUI.jar?rev=189695&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/roller/trunk/tools/buildtime/findbugs/lib/findbugsGUI.jar
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/roller/trunk/tools/buildtime/findbugs/plugin/coreplugin.jar
URL: http://svn.apache.org/viewcvs/incubator/roller/trunk/tools/buildtime/findbugs/plugin/coreplugin.jar?rev=189695&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/roller/trunk/tools/buildtime/findbugs/plugin/coreplugin.jar
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/roller/trunk/tools/buildtime/findbugs/roller.fb
URL: http://svn.apache.org/viewcvs/incubator/roller/trunk/tools/buildtime/findbugs/roller.fb?rev=189695&view=auto
==============================================================================
--- incubator/roller/trunk/tools/buildtime/findbugs/roller.fb (added)
+++ incubator/roller/trunk/tools/buildtime/findbugs/roller.fb Wed Jun  8 20:18:46 2005
@@ -0,0 +1,66 @@
+[Jar files]
+..\..\..\build\roller\web-inf\lib\rollerbeans.jar
+..\..\..\build\roller\web-inf\lib\rollerweb.jar
+..\..\..\build\roller\web-inf\lib\rollercontrib.jar
+[Source dirs]
+..\..\..\src
+..\..\..\contrib\plugins\src
+..\..\..\tests
+[Aux classpath entries]
+..\xercesimpl-2.3.0.jar
+..\xmlparserapis-2.3.0.jar
+..\..\hibernate-2.1\lib\dom4j-1.4.jar
+..\..\hibernate-2.1\lib\jdom.jar
+..\..\lib\activation.jar
+..\..\lib\commons-betwixt-1.0-beta-1.jar
+..\..\lib\commons-cache.jar
+..\..\lib\commons-codec-1.1.jar
+..\..\lib\concurrent-1.3.2.jar
+..\..\lib\informa.jar
+..\..\lib\jazzy-core.jar
+..\..\lib\log4j-1.2.4.jar
+..\..\lib\lucene-1.4-final.jar
+..\..\lib\mail.jar
+..\..\struts-1.1\lib\commons-beanutils.jar
+..\..\struts-1.1\lib\commons-collections.jar
+..\..\struts-1.1\lib\commons-digester.jar
+..\..\struts-1.1\lib\commons-fileupload.jar
+..\..\struts-1.1\lib\commons-lang.jar
+..\..\struts-1.1\lib\commons-logging.jar
+..\..\struts-1.1\lib\commons-validator.jar
+..\..\struts-1.1\lib\jakarta-oro.jar
+..\..\struts-1.1\lib\struts-legacy.jar
+..\..\struts-1.1\lib\struts.jar
+..\tomcat-4.1.24\servlet-api.jar
+..\..\lib\atom4j.jar
+..\..\lib\oscache.jar
+..\..\lib\velocity-1.3.1.jar
+..\..\lib\velocity-dep-1.3.1.jar
+..\..\lib\velocity-tools-1.1-rc1.jar
+..\..\lib\xmlrpc-1.1.jar
+..\..\standard-1.0.3\lib\jstl.jar
+..\..\standard-1.0.3\lib\standard.jar
+..\..\..\build\compile_beans
+..\..\hibernate-2.1\hibernate2.jar
+..\..\hibernate-2.1\lib\c3p0-0.8.4.5.jar
+..\..\hibernate-2.1\lib\cglib-full-2.0.1.jar
+..\..\hibernate-2.1\lib\ehcache-0.7.jar
+..\..\hibernate-2.1\lib\jta.jar
+..\..\hibernate-2.1\lib\odmg-3.0.jar
+..\..\hibernate-2.1\lib\proxool-0.8.3.jar
+..\..\hibernate-2.1\lib\xalan-2.4.0.jar
+..\..\..\build\tests
+..\junit-3.8.1.jar
+..\strutstest-2.0.0.jar
+..\mockrunner-0.2.6\lib\mockrunner.jar
+..\..\..\contrib\lib\jspwiki.jar
+..\..\..\contrib\lib\jython.jar
+..\..\..\contrib\lib\radeox.jar
+..\..\..\contrib\lib\textile4j-1.20.jar
+.\lib\bcel.jar
+.\lib\dom4j-full.jar
+.\lib\findbugs-ant.jar
+.\lib\findbugs.jar
+.\lib\findbugsgui.jar
+[Options]
+relative_paths=true

Added: incubator/roller/trunk/tools/buildtime/hsqldb.jar
URL: http://svn.apache.org/viewcvs/incubator/roller/trunk/tools/buildtime/hsqldb.jar?rev=189695&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/roller/trunk/tools/buildtime/hsqldb.jar
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/roller/trunk/tools/buildtime/junit-3.8.1.jar
URL: http://svn.apache.org/viewcvs/incubator/roller/trunk/tools/buildtime/junit-3.8.1.jar?rev=189695&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/roller/trunk/tools/buildtime/junit-3.8.1.jar
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/roller/trunk/tools/buildtime/mockrunner-0.3/lib/mockrunner.jar
URL: http://svn.apache.org/viewcvs/incubator/roller/trunk/tools/buildtime/mockrunner-0.3/lib/mockrunner.jar?rev=189695&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/roller/trunk/tools/buildtime/mockrunner-0.3/lib/mockrunner.jar
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/roller/trunk/tools/buildtime/mockrunner-0.35/lib/mockrunner-servlet.jar
URL: http://svn.apache.org/viewcvs/incubator/roller/trunk/tools/buildtime/mockrunner-0.35/lib/mockrunner-servlet.jar?rev=189695&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/roller/trunk/tools/buildtime/mockrunner-0.35/lib/mockrunner-servlet.jar
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/roller/trunk/tools/buildtime/mockrunner-0.35/lib/mockrunner-struts.jar
URL: http://svn.apache.org/viewcvs/incubator/roller/trunk/tools/buildtime/mockrunner-0.35/lib/mockrunner-struts.jar?rev=189695&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/roller/trunk/tools/buildtime/mockrunner-0.35/lib/mockrunner-struts.jar
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/roller/trunk/tools/buildtime/mockrunner-0.35/lib/mockrunner.jar
URL: http://svn.apache.org/viewcvs/incubator/roller/trunk/tools/buildtime/mockrunner-0.35/lib/mockrunner.jar?rev=189695&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/roller/trunk/tools/buildtime/mockrunner-0.35/lib/mockrunner.jar
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/roller/trunk/tools/buildtime/mockrunner-0.35/lib/nekohtml.jar
URL: http://svn.apache.org/viewcvs/incubator/roller/trunk/tools/buildtime/mockrunner-0.35/lib/nekohtml.jar?rev=189695&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/roller/trunk/tools/buildtime/mockrunner-0.35/lib/nekohtml.jar
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/roller/trunk/tools/buildtime/strutstest-2.0.0.jar
URL: http://svn.apache.org/viewcvs/incubator/roller/trunk/tools/buildtime/strutstest-2.0.0.jar?rev=189695&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/roller/trunk/tools/buildtime/strutstest-2.0.0.jar
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/roller/trunk/tools/buildtime/tomcat-4.1.24/jasper-compiler.jar
URL: http://svn.apache.org/viewcvs/incubator/roller/trunk/tools/buildtime/tomcat-4.1.24/jasper-compiler.jar?rev=189695&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/roller/trunk/tools/buildtime/tomcat-4.1.24/jasper-compiler.jar
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/roller/trunk/tools/buildtime/tomcat-4.1.24/jasper-runtime.jar
URL: http://svn.apache.org/viewcvs/incubator/roller/trunk/tools/buildtime/tomcat-4.1.24/jasper-runtime.jar?rev=189695&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/roller/trunk/tools/buildtime/tomcat-4.1.24/jasper-runtime.jar
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/roller/trunk/tools/buildtime/tomcat-4.1.24/servlet-api.jar
URL: http://svn.apache.org/viewcvs/incubator/roller/trunk/tools/buildtime/tomcat-4.1.24/servlet-api.jar?rev=189695&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/roller/trunk/tools/buildtime/tomcat-4.1.24/servlet-api.jar
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/roller/trunk/tools/buildtime/velocidoc-app.jar
URL: http://svn.apache.org/viewcvs/incubator/roller/trunk/tools/buildtime/velocidoc-app.jar?rev=189695&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/roller/trunk/tools/buildtime/velocidoc-app.jar
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/roller/trunk/tools/buildtime/xdoclet-1.2/lib/xdoclet-1.2b4.jar
URL: http://svn.apache.org/viewcvs/incubator/roller/trunk/tools/buildtime/xdoclet-1.2/lib/xdoclet-1.2b4.jar?rev=189695&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/roller/trunk/tools/buildtime/xdoclet-1.2/lib/xdoclet-1.2b4.jar
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/roller/trunk/tools/buildtime/xdoclet-1.2/lib/xdoclet-apache-module-1.2b4.jar
URL: http://svn.apache.org/viewcvs/incubator/roller/trunk/tools/buildtime/xdoclet-1.2/lib/xdoclet-apache-module-1.2b4.jar?rev=189695&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/roller/trunk/tools/buildtime/xdoclet-1.2/lib/xdoclet-apache-module-1.2b4.jar
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/roller/trunk/tools/buildtime/xdoclet-1.2/lib/xdoclet-ejb-module-1.2b4.jar
URL: http://svn.apache.org/viewcvs/incubator/roller/trunk/tools/buildtime/xdoclet-1.2/lib/xdoclet-ejb-module-1.2b4.jar?rev=189695&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/roller/trunk/tools/buildtime/xdoclet-1.2/lib/xdoclet-ejb-module-1.2b4.jar
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/roller/trunk/tools/buildtime/xdoclet-1.2/lib/xdoclet-exolab-module-1.2b4.jar
URL: http://svn.apache.org/viewcvs/incubator/roller/trunk/tools/buildtime/xdoclet-1.2/lib/xdoclet-exolab-module-1.2b4.jar?rev=189695&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/roller/trunk/tools/buildtime/xdoclet-1.2/lib/xdoclet-exolab-module-1.2b4.jar
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/roller/trunk/tools/buildtime/xdoclet-1.2/lib/xdoclet-hibernate-module-1.2b4.jar
URL: http://svn.apache.org/viewcvs/incubator/roller/trunk/tools/buildtime/xdoclet-1.2/lib/xdoclet-hibernate-module-1.2b4.jar?rev=189695&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/roller/trunk/tools/buildtime/xdoclet-1.2/lib/xdoclet-hibernate-module-1.2b4.jar
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/roller/trunk/tools/buildtime/xdoclet-1.2/lib/xdoclet-java-module-1.2b4.jar
URL: http://svn.apache.org/viewcvs/incubator/roller/trunk/tools/buildtime/xdoclet-1.2/lib/xdoclet-java-module-1.2b4.jar?rev=189695&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/roller/trunk/tools/buildtime/xdoclet-1.2/lib/xdoclet-java-module-1.2b4.jar
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/roller/trunk/tools/buildtime/xdoclet-1.2/lib/xdoclet-web-module-1.2b4.jar
URL: http://svn.apache.org/viewcvs/incubator/roller/trunk/tools/buildtime/xdoclet-1.2/lib/xdoclet-web-module-1.2b4.jar?rev=189695&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/roller/trunk/tools/buildtime/xdoclet-1.2/lib/xdoclet-web-module-1.2b4.jar
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/roller/trunk/tools/buildtime/xdoclet-1.2/lib/xdoclet-webwork-module-1.2b4.jar
URL: http://svn.apache.org/viewcvs/incubator/roller/trunk/tools/buildtime/xdoclet-1.2/lib/xdoclet-webwork-module-1.2b4.jar?rev=189695&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/roller/trunk/tools/buildtime/xdoclet-1.2/lib/xdoclet-webwork-module-1.2b4.jar
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/roller/trunk/tools/buildtime/xdoclet-1.2/lib/xdoclet-xdoclet-module-1.2b4.jar
URL: http://svn.apache.org/viewcvs/incubator/roller/trunk/tools/buildtime/xdoclet-1.2/lib/xdoclet-xdoclet-module-1.2b4.jar?rev=189695&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/roller/trunk/tools/buildtime/xdoclet-1.2/lib/xdoclet-xdoclet-module-1.2b4.jar
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/roller/trunk/tools/buildtime/xdoclet-1.2/lib/xjavadoc-1.0.jar
URL: http://svn.apache.org/viewcvs/incubator/roller/trunk/tools/buildtime/xdoclet-1.2/lib/xjavadoc-1.0.jar?rev=189695&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/roller/trunk/tools/buildtime/xdoclet-1.2/lib/xjavadoc-1.0.jar
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/roller/trunk/tools/buildtime/xercesImpl-2.3.0.jar
URL: http://svn.apache.org/viewcvs/incubator/roller/trunk/tools/buildtime/xercesImpl-2.3.0.jar?rev=189695&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/roller/trunk/tools/buildtime/xercesImpl-2.3.0.jar
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/roller/trunk/tools/buildtime/xmlParserAPIs-2.3.0.jar
URL: http://svn.apache.org/viewcvs/incubator/roller/trunk/tools/buildtime/xmlParserAPIs-2.3.0.jar?rev=189695&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/roller/trunk/tools/buildtime/xmlParserAPIs-2.3.0.jar
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream