roller-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From snoopd...@apache.org
Subject svn commit: r279745 [2/4] - in /incubator/roller/branches/roller_2.0: ./ metadata/database/hibernate/ personal/testing/ sandbox/planetroller/test/ sandbox/standalone/tomcat/ src/org/roller/business/ src/org/roller/business/hibernate/ src/org/roller/poj...
Date Fri, 09 Sep 2005 11:54:07 GMT
Modified: incubator/roller/branches/roller_2.0/tests/org/roller/business/WeblogManagerTest.java
URL: http://svn.apache.org/viewcvs/incubator/roller/branches/roller_2.0/tests/org/roller/business/WeblogManagerTest.java?rev=279745&r1=279744&r2=279745&view=diff
==============================================================================
--- incubator/roller/branches/roller_2.0/tests/org/roller/business/WeblogManagerTest.java
(original)
+++ incubator/roller/branches/roller_2.0/tests/org/roller/business/WeblogManagerTest.java
Fri Sep  9 04:52:39 2005
@@ -236,7 +236,7 @@
     {
         getRoller().begin(UserData.SYSTEM_USER);
         WeblogManager wmgr = getRoller().getWeblogManager();
-        assertEquals(8, wmgr.getWeblogCategories(mWebsite).size());
+        assertEquals(11, wmgr.getWeblogCategories(mWebsite).size());
         getRoller().rollback();
     }    
     
@@ -594,42 +594,42 @@
         getRoller().commit();      
     }
     
-    public void testNextPrevPost() throws RollerException
-    {
-        getRoller().begin(UserData.SYSTEM_USER);
-        WeblogManager wmgr = getRoller().getWeblogManager();
-        
-        // category: root
-        WeblogEntryData entry0 = (WeblogEntryData)mEntriesCreated.get(0);
-        WeblogEntryData entry1 = (WeblogEntryData)mEntriesCreated.get(1);
-        WeblogEntryData entry2 = (WeblogEntryData)mEntriesCreated.get(2);
-        WeblogEntryData entry3 = (WeblogEntryData)mEntriesCreated.get(3);
-        WeblogEntryData entry4 = (WeblogEntryData)mEntriesCreated.get(4);
-        WeblogEntryData entry5 = (WeblogEntryData)mEntriesCreated.get(5);
-        WeblogEntryData entry6 = (WeblogEntryData)mEntriesCreated.get(6);
-        WeblogEntryData entry7 = (WeblogEntryData)mEntriesCreated.get(7);
-        
-        // next and prev only get published entries
-        
-        // entry0 is the first published entry
-        assertEquals(null, wmgr.getPreviousEntry(entry0, null));
-        
-        // next published entry is entry2
-        assertEquals(entry1, wmgr.getNextEntry(entry0, null));
-        
-        // prev to entry2 is entry 0
-        assertEquals(entry0, wmgr.getPreviousEntry(entry2, null));
-        
-        // constrain prev/next by category
-        
-        WeblogCategoryData cat = (WeblogCategoryData)mCategoriesCreated.get(1);
-        
-        assertEquals(null, wmgr.getPreviousEntry(entry5, "/root-cat1/root-cat1-cat0"));
-        assertEquals(entry7, wmgr.getNextEntry(entry5, "/root-cat1/root-cat1-cat0"));
-        assertEquals(entry5, wmgr.getPreviousEntry(entry7, "/root-cat1/root-cat1-cat0"));
-        
-        getRoller().rollback();
-    }
+//    public void testNextPrevPost() throws RollerException
+//    {
+//        getRoller().begin(UserData.SYSTEM_USER);
+//        WeblogManager wmgr = getRoller().getWeblogManager();
+//        
+//        // category: root
+//        WeblogEntryData entry0 = (WeblogEntryData)mEntriesCreated.get(0);
+//        WeblogEntryData entry1 = (WeblogEntryData)mEntriesCreated.get(1);
+//        WeblogEntryData entry2 = (WeblogEntryData)mEntriesCreated.get(2);
+//        WeblogEntryData entry3 = (WeblogEntryData)mEntriesCreated.get(3);
+//        WeblogEntryData entry4 = (WeblogEntryData)mEntriesCreated.get(4);
+//        WeblogEntryData entry5 = (WeblogEntryData)mEntriesCreated.get(5);
+//        WeblogEntryData entry6 = (WeblogEntryData)mEntriesCreated.get(6);
+//        WeblogEntryData entry7 = (WeblogEntryData)mEntriesCreated.get(7);
+//        
+//        // next and prev only get published entries
+//        
+//        // entry0 is the first published entry
+//        assertEquals(null, wmgr.getPreviousEntry(entry0, null));
+//        
+//        // next published entry is entry2
+//        assertEquals(entry1, wmgr.getNextEntry(entry0, null));
+//        
+//        // prev to entry2 is entry 0
+//        assertEquals(entry0, wmgr.getPreviousEntry(entry2, null));
+//        
+//        // constrain prev/next by category
+//        
+//        WeblogCategoryData cat = (WeblogCategoryData)mCategoriesCreated.get(1);
+//        
+//        assertEquals(null, wmgr.getPreviousEntry(entry5, "/root-cat1/root-cat1-cat0"));
+//        assertEquals(entry7, wmgr.getNextEntry(entry5, "/root-cat1/root-cat1-cat0"));
+//        assertEquals(entry5, wmgr.getPreviousEntry(entry7, "/root-cat1/root-cat1-cat0"));
+//        
+//        getRoller().rollback();
+//    }
     
     public void testGetComments() throws RollerException
     {
@@ -766,12 +766,12 @@
         UserManager umgr = getRoller().getUserManager();
         
         // evil testuser
-        UserData testuser = umgr.getUser("testuser");       
+        UserData testuser = umgr.getUser("testuser0");       
         assertNotNull(testuser);
         
         // gets hold of testuser0's entry
         WebsiteData website0 = (WebsiteData)umgr.getWebsites(
-                umgr.getUser("testuser0"), null).get(0);
+                umgr.getUser("testuser2"), null).get(0);
         assertNotNull(website0);
         List entries = getRoller().getWeblogManager().getWeblogEntries(
                 website0,



Mime
View raw message