[jboss-cvs] jboss-seam/examples/wiki/src/test/org/jboss/seam/wiki/test/dao ...
Christian Bauer
christian at hibernate.org
Wed Jan 9 10:59:25 EST 2008
User: cbauer
Date: 08/01/09 10:59:25
Modified: examples/wiki/src/test/org/jboss/seam/wiki/test/dao
WikiNodeDAOTests.java
Log:
JBSEAM-2397 and JBSEAM-1883 - implemented trashcan feature and more reliable update of 2nd level cache and lucene index
Revision Changes Path
1.4 +28 -0 jboss-seam/examples/wiki/src/test/org/jboss/seam/wiki/test/dao/WikiNodeDAOTests.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: WikiNodeDAOTests.java
===================================================================
RCS file: /cvsroot/jboss/jboss-seam/examples/wiki/src/test/org/jboss/seam/wiki/test/dao/WikiNodeDAOTests.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -b -r1.3 -r1.4
--- WikiNodeDAOTests.java 1 Jan 2008 13:09:58 -0000 1.3
+++ WikiNodeDAOTests.java 9 Jan 2008 15:59:25 -0000 1.4
@@ -223,6 +223,34 @@
}
@Test
+ public void findCommentSubthreads() throws Exception {
+ new FacesRequest() {
+
+ protected void invokeApplication() throws Exception {
+ WikiNodeDAO dao = (WikiNodeDAO)getInstance("wikiNodeDAO");
+
+ WikiComment rootOne = dao.findWikiComment(10l);
+ List<WikiComment> commentsOne = dao.findWikiCommentSubtree(rootOne);
+ assert commentsOne.size() == 3;
+ assert commentsOne.get(0).getLevel().equals(1l);
+ assert commentsOne.get(0).getId().equals(11l);
+ assert commentsOne.get(1).getLevel().equals(1l);
+ assert commentsOne.get(1).getId().equals(12l);
+ assert commentsOne.get(2).getLevel().equals(2l);
+ assert commentsOne.get(2).getId().equals(13l);
+
+ WikiComment rootTwo = dao.findWikiComment(14l);
+ List<WikiComment> commentsTwo = dao.findWikiCommentSubtree(rootTwo);
+ assert commentsTwo.size() == 1;
+ assert commentsTwo.get(0).getLevel().equals(1l);
+ assert commentsTwo.get(0).getId().equals(15l);
+
+ }
+ }.run();
+ }
+
+
+ @Test
public void findSiblings() throws Exception {
new FacesRequest() {
More information about the jboss-cvs-commits
mailing list