Package net.sf.pmr.messageBoards.domain

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


        board.setDescription("Board where we discuss about latest movies");
        board.setBasicProject(basicProject);
        board.setPersistanceVersion(1);

        // topic
        Topic topic = new TopicImpl();
        topic.setTitle("les cl�s de bagnole");

        // create a message idem to the one in the database
        messageToUpdateOrDelete = new MessageImpl();
        messageToUpdateOrDelete.setId(1);
        messageToUpdateOrDelete.setBoard(board);
View Full Code Here


    public final void testAddWithoutConcurrencyFailureException()
            throws Exception {

        // topic
        Topic topic = new TopicImpl();
        topic.setTitle("my title");

        // create a message idem to the one in the database
        Message message = new MessageImpl();
        message.setBoard(board);
        message.setTopic(topic);
View Full Code Here

    }
   
    public final void testEquals () {
       
        Topic topic1 = new TopicImpl();
        Topic topic2 = new TopicImpl();
       
        assertTrue(topic1.equals(topic2));
       
        topic1.setTitle("titre");
        topic2.setTitle("titre");
       
        assertTrue(topic1.equals(topic2));
       
        topic2.setTitle("super title");
       
        assertFalse(topic1.equals(topic2));
       
    }
View Full Code Here

    }
   
    public final void testHashCode () {
       
       
        Topic topic1 = new TopicImpl();
        Topic topic2 = new TopicImpl();
       
        assertTrue(topic1.hashCode() ==  topic2.hashCode());
       
        topic1.setTitle("titre");
        topic2.setTitle("titre");
       
        assertTrue(topic1.hashCode() ==  topic2.hashCode());
       
        topic2.setTitle("super title");
       
        assertFalse(topic1.hashCode() ==  topic2.hashCode());
       
       
    }
View Full Code Here

        super.tearDown();
    }
   
    public final void testObjectCreation () {
    
        Topic topic = MessageBoardsObjectFactory.getTopic();
      
        assertEquals("title", null, topic.getTitle());
       
    }
View Full Code Here

TOP

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

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.