Package org.jboss.seam.wiki.core.action

Examples of org.jboss.seam.wiki.core.action.CommentQuery


            protected void renderResponse() throws Exception {
                WikiDocument doc = (WikiDocument)getValue("#{currentDocument}");
                assert doc != null;
                assert doc.getId().equals(6l);

                CommentQuery commentQuery = (CommentQuery)getInstance(CommentQuery.class);
                assert commentQuery.getComments().size() == 6;

                assert commentQuery.getComments().get(0).getId().equals(10l);
                assert commentQuery.getComments().get(1).getId().equals(11l);
                assert commentQuery.getComments().get(2).getId().equals(12l);
                assert commentQuery.getComments().get(3).getId().equals(13l);
                assert commentQuery.getComments().get(4).getId().equals(14l);
                assert commentQuery.getComments().get(5).getId().equals(15l);
            }

        }.run();
    }
View Full Code Here


                commentHome.getInstance().setSubject("Some Subject");
                commentHome.getTextEditor().setValue("Some Content");

                invokeMethod("#{commentHome.persist}");

                CommentQuery commentQuery = (CommentQuery)getInstance(CommentQuery.class);
                assert commentQuery.getComments().size() == 7;

                assert commentQuery.getComments().get(0).getId().equals(10l);
                assert commentQuery.getComments().get(1).getId().equals(11l);
                assert commentQuery.getComments().get(2).getId().equals(12l);
                assert commentQuery.getComments().get(3).getId().equals(13l);
                assert commentQuery.getComments().get(4).getId().equals(14l);
                assert commentQuery.getComments().get(5).getId().equals(15l);

                assert commentQuery.getComments().get(6).getCreatedBy().getUsername().equals(MEMBER_USERNAME);
                assert commentQuery.getComments().get(6).getFromUserName().equals("Foo");
                assert commentQuery.getComments().get(6).getFromUserHomepage().equals("http://foo.bar");
                assert commentQuery.getComments().get(6).getFromUserEmail().equals("foo@bar.tld");
                assert commentQuery.getComments().get(6).getSubject().equals("Some Subject");
                assertEquals(commentQuery.getComments().get(6).getContent(), "Some Content");

                assert commentQuery.getComments().get(6).getName().matches("One\\.Comment[0-9]+");
                assert !commentQuery.getComments().get(6).getWikiname().contains(" ");
            }

        }.run();
    }
View Full Code Here

                commentHome.getInstance().setSubject("Some Subject");
                commentHome.getTextEditor().setValue("Some Content");

                invokeMethod("#{commentHome.persist}");

                CommentQuery commentQuery = (CommentQuery)getInstance(CommentQuery.class);
                assert commentQuery.getComments().size() == 7;

                assert commentQuery.getComments().get(0).getId().equals(10l);
                assert commentQuery.getComments().get(1).getId().equals(11l);
                assert commentQuery.getComments().get(2).getId().equals(12l);
                assert commentQuery.getComments().get(3).getId().equals(13l);
                assert commentQuery.getComments().get(4).getId().equals(14l);
                assert commentQuery.getComments().get(5).getId().equals(15l);

                assert commentQuery.getComments().get(6).getCreatedBy().getUsername().equals(MEMBER_USERNAME);
                assert commentQuery.getComments().get(6).getFromUserName().equals("Foo");
                assert commentQuery.getComments().get(6).getFromUserHomepage().equals("http://foo.bar");
                assert commentQuery.getComments().get(6).getFromUserEmail().equals("foo@bar.tld");
                assertEquals(commentQuery.getComments().get(6).getSubject(), "Some Subject");
                assertEquals(commentQuery.getComments().get(6).getContent(), "Some Content");
                assertEquals(commentQuery.getComments().get(6).getParent().getId(), new Long(6));

                assert commentQuery.getComments().get(6).getName().matches("One\\.Comment[0-9]+");
                assert !commentQuery.getComments().get(6).getWikiname().contains(" ");
            }
           
        }.run();
    }
View Full Code Here

            }

            protected void invokeApplication() throws Exception {
                invokeMethod("#{commentHome.remove(14)}");

                CommentQuery commentQuery = (CommentQuery)getInstance(CommentQuery.class);
                assert commentQuery.getComments().size() == 5;
                assert commentQuery.getComments().get(0).getId().equals(10l);
                assert commentQuery.getComments().get(1).getId().equals(11l);
                assert commentQuery.getComments().get(2).getId().equals(12l);
                assert commentQuery.getComments().get(3).getId().equals(13l);
                assert commentQuery.getComments().get(4).getId().equals(15l);
            }

        }.run();
    }
View Full Code Here

TOP

Related Classes of org.jboss.seam.wiki.core.action.CommentQuery

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.