Package org.jboss.seam.wiki.core.dao

Examples of org.jboss.seam.wiki.core.dao.WikiNodeDAO


    @Test
    public void findDocumentById() throws Exception {
        new FacesRequest() {

            protected void invokeApplication() throws Exception {
                WikiNodeDAO dao = (WikiNodeDAO)getInstance(WikiNodeDAO.class);
                WikiDocument d = dao.findWikiDocument(6l);
                assert d.getName().equals("One");
            }
        }.run();
    }
View Full Code Here


    @Test
    public void findDefaultFile() throws Exception {
        new FacesRequest() {

            protected void invokeApplication() throws Exception {
                WikiNodeDAO dao = (WikiNodeDAO)getInstance(WikiNodeDAO.class);
                WikiDirectory dir = dao.findWikiDirectory(3l);
                WikiFile d = dao.findDefaultWikiFile(dir);
                assert d.getName().equals("One");
            }
        }.run();
    }
View Full Code Here

    @Test
    public void findDefaultDocument() throws Exception {
        new FacesRequest() {

            protected void invokeApplication() throws Exception {
                WikiNodeDAO dao = (WikiNodeDAO)getInstance(WikiNodeDAO.class);
                WikiDirectory dir = dao.findWikiDirectory(3l);
                WikiDocument d = dao.findDefaultDocument(dir);
                assert d.getName().equals("One");
            }
        }.run();
    }
View Full Code Here

    @Test
    public void findDocumentInArea() throws Exception {
        new FacesRequest() {

            protected void invokeApplication() throws Exception {
                WikiNodeDAO dao = (WikiNodeDAO)getInstance(WikiNodeDAO.class);
                WikiDocument d = dao.findWikiDocumentInArea(3l, "Two");
                assert d.getName().equals("Two");
                assert d.getId().equals(7l);
            }
        }.run();
    }
View Full Code Here

    @Test
    public void findDocumentsOrderByLastModified() throws Exception {
        new FacesRequest() {

            protected void invokeApplication() throws Exception {
                WikiNodeDAO dao = (WikiNodeDAO)getInstance(WikiNodeDAO.class);
                List<WikiDocument> result = dao.findWikiDocuments(2, WikiNode.SortableProperty.lastModifiedOn, false);
                assert result.size() == 2;
                assert result.get(0).getId().equals(6l);
                assert result.get(1).getId().equals(7l);
            }
        }.run();
View Full Code Here

    @Test
    public void findDirectoryById() throws Exception {
        new FacesRequest() {

            protected void invokeApplication() throws Exception {
                WikiNodeDAO dao = (WikiNodeDAO)getInstance(WikiNodeDAO.class);
                WikiDirectory d = dao.findWikiDirectory(1l);
                assert d.getName().equals("AAA");
            }
        }.run();
    }
View Full Code Here

    @Test
    public void findDirectoryInArea() throws Exception {
        new FacesRequest() {

            protected void invokeApplication() throws Exception {
                WikiNodeDAO dao = (WikiNodeDAO)getInstance(WikiNodeDAO.class);
                WikiDirectory d = dao.findWikiDirectoryInArea(3l, "DDD");
                assert d.getName().equals("DDD");
                assert d.getId().equals(4l);
            }
        }.run();
    }
View Full Code Here

    @Test
    public void findAreaByWikiname() throws Exception {
        new FacesRequest() {

            protected void invokeApplication() throws Exception {
                WikiNodeDAO dao = (WikiNodeDAO)getInstance(WikiNodeDAO.class);
                WikiDirectory d = dao.findArea("BBB");
                assert d.getName().equals("BBB");
                assert d.getId().equals(2l);
            }
        }.run();
    }
View Full Code Here

    @Test
    public void findAreaByNumber() throws Exception {
        new FacesRequest() {

            protected void invokeApplication() throws Exception {
                WikiNodeDAO dao = (WikiNodeDAO)getInstance(WikiNodeDAO.class);
                WikiDirectory d = dao.findArea(2l);
                assert d.getName().equals("BBB");
                assert d.getId().equals(2l);
            }
        }.run();
    }
View Full Code Here

    @Test
    public void isUniqueWikinameTrue() throws Exception {
        new FacesRequest() {

            protected void invokeApplication() throws Exception {
                WikiNodeDAO dao = (WikiNodeDAO)getInstance(WikiNodeDAO.class);
                Boolean result = dao.isUniqueWikiname(3l, "Foobar");
                assert result;
            }
        }.run();
    }
View Full Code Here

TOP

Related Classes of org.jboss.seam.wiki.core.dao.WikiNodeDAO

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.