WeblogEntry entry4 = TestUtils.setupWeblogEntry("entry4",
testWeblog.getDefaultCategory(), blog2, user1);
WeblogEntry entry5 = TestUtils.setupWeblogEntry("entry5",
testWeblog.getDefaultCategory(), blog2, user1);
WeblogEntryComment comment1 = TestUtils.setupComment("comment1", entry1);
WeblogEntryComment comment2 = TestUtils.setupComment("comment2", entry1);
WeblogEntryComment comment3 = TestUtils.setupComment("comment3", entry3);
WeblogEntryComment comment4 = TestUtils.setupComment("comment4", entry3);
WeblogEntryComment comment5 = TestUtils.setupComment("comment5", entry3);
TestUtils.endSession(true);
try {
blog1 = umgr.getWebsite(blog1.getId());
blog2 = umgr.getWebsite(blog2.getId());
assertEquals(2L, blog1.getEntryCount());
assertEquals(3L, blog2.getEntryCount());
assertEquals(5L, wmgr.getEntryCount());
assertEquals(2L, blog1.getCommentCount());
assertEquals(3L, blog2.getCommentCount());
assertEquals(5L, wmgr.getCommentCount());
assertEquals(4L, umgr.getWeblogCount());
assertEquals(2L, umgr.getUserCount());
} finally {
TestUtils.teardownComment(comment1.getId());
TestUtils.teardownComment(comment2.getId());
TestUtils.teardownComment(comment3.getId());
TestUtils.teardownComment(comment4.getId());
TestUtils.teardownComment(comment5.getId());
TestUtils.teardownWeblogEntry(entry1.getId());
TestUtils.teardownWeblogEntry(entry2.getId());
TestUtils.teardownWeblogEntry(entry3.getId());
TestUtils.teardownWeblogEntry(entry4.getId());