@@ -0,0 +1,2504 @@
+/*%0A * Copyright (c) 2014 Lucas Holt%0A * All rights reserved.%0A *%0A * Redistribution and use in source and binary forms, with or without%0A * modification, are permitted provided that the following conditions%0A * are met:%0A * 1. Redistributions of source code must retain the above copyright%0A *    notice, this list of conditions and the following disclaimer.%0A * 2. Redistributions in binary form must reproduce the above copyright%0A *    notice, this list of conditions and the following disclaimer in the%0A *    documentation and/or other materials provided with the distribution.%0A *%0A * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS %60%60AS IS'' AND%0A * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE%0A * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE%0A * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE%0A * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL%0A * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS%0A * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)%0A * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT%0A * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY%0A * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF%0A * SUCH DAMAGE.%0A */%0A%0Apackage com.justjournal.rss;%0A%0Aimport com.justjournal.Util;%0Aimport com.justjournal.db.EntryDAO;%0Aimport com.justjournal.db.EntryTo;%0Aimport org.junit.BeforeClass;%0Aimport org.junit.Test;%0A%0Aimport java.util.Collection;%0A%0Aimport static org.junit.Assert.*;%0A%0A/**%0A * @author Lucas Holt%0A */%0Apublic class RssTests %7B%0A    private final static String TEST_USER = %22jjsite%22;%0A%0A    @BeforeClass%0A    public static void setup() throws Exception %7B%0A        Util.setupDb();%0A    %7D%0A%0A    @Test%0A    public void testPopulate() %7B%0A        Rss rss = new Rss();%0A%0A        final java.util.GregorianCalendar calendar = new java.util.GregorianCalendar();%0A        calendar.setTime(new java.util.Date());%0A        Collection%3CEntryTo%3E entries = EntryDAO.view(TEST_USER, false);%0A        assertTrue(entries.size() %3E 0);%0A        rss.populate(entries);%0A%0A        assertTrue(rss.size() %3E 0);%0A%0A        String xml = rss.toXml();%0A        assertTrue(xml.contains(%22%3Citem%22));%0A    %7D%0A%0A    @Test%0A    public void testWebmaster() %7B%0A        String webmaster = %22test@test.com (test)%22;%0A        Rss rss = new Rss();%0A        rss.setWebMaster(webmaster);%0A        assertEquals(webmaster, rss.getWebMaster());%0A    %7D%0A%0A%7D%0A

add unit tests for rss