Package net.sf.pmr.messageBoards.domain

Examples of net.sf.pmr.messageBoards.domain.Board


     *
     * @see com.pm.core.data.EntityMapperForRootAgregate#add(com.pm.core.domain.Entity)
     */
    public void add(final Object entity) {

        Board board = (Board) entity;
        // version is set to one
        board.setPersistanceVersion(1);
        getHibernateTemplate().save(board);

    }
View Full Code Here


    public final void testAddWithoutConcurrencyFailureException()
            throws Exception {

        // create board
        Board board = new BoardImpl();

        board.setBasicProject(basicProject);
        board.setName("Formula one");
        board.setDescription("Discussion about latest news from formula One");

        // add
        boadMapper.addOrUpdate(board);

        //check
View Full Code Here

    }

    public final void testFindByIdWithboardFound() {

        // find a board
        Board board = (Board) boadMapper.findById(1);

        assertEquals("name", "Discuss about latest movies", board.getName());
        assertEquals("description",
                "Board where we discuss about latest movies", board
                        .getDescription());
        assertTrue("project", board.getBasicProject() instanceof BasicProject);
        assertEquals("version", 1, board.getPersistanceVersion());

    }
View Full Code Here

    }

    public final void testFindByIdWithoutboardFound() {

        // find a board
        Board board = (Board) boadMapper.findById(999);

        assertEquals("board", null, board);

    }
View Full Code Here

TOP

Related Classes of net.sf.pmr.messageBoards.domain.Board

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.