Package org.encuestame.persistence.domain

Examples of org.encuestame.persistence.domain.Comment


     */
    @Test
    public void testCreateComment() throws EnMeNoResultsFoundException, EnmeNotAllowedException{
        final CommentBean commentBean = createCommentBean("totally Agree", new Date(),
                getSpringSecurityLoggedUserAccount().getUid(), this.tweetPoll.getTweetPollId(), null);
        final Comment comment = getCommentsOperationsService().createComment(commentBean);
        assertNotNull(comment);
    }
View Full Code Here


     * Test get commnet by id.
     */
    @Test
    public void testGetCommentById(){
        assertNotNull(this.comment);
        final Comment comment = getCommentsOperations().getCommentById(this.comment.getCommentId());
        assertEquals("Should be equals", this.comment.getCommentId(), comment.getCommentId());
    }
View Full Code Here

     * Test get comment by id and user.
     */
    @Test
    public void testGetCommentByIdandUser(){
        assertNotNull(this.comment);
        final Comment comment = getCommentsOperations().getCommentByIdandUser(this.comment.getCommentId(), this.user);
        assertEquals("Should be equals", this.comment.getCommentId(), comment.getCommentId());
    }
View Full Code Here

     }

     /** Test Comments **/
     @Test
     public void testComments(){
         final Comment comments = new Comment();
         final UserAccount user = createUserAccount("diana", createAccount());
         final Question question = createQuestion("Who I am?", "");
         final TweetPoll tpoll = createPublishedTweetPoll(user.getAccount(), question);
         comments.setComment("First comment");
         comments.setCreatedAt(new Date());
         comments.setLikeVote(1L);
         comments.setDislikeVote(2L);
         comments.setUser(user);
         comments.setTweetPoll(tpoll);
         comments.setIsSpam(Boolean.FALSE);
         comments.setIsPublished(Boolean.FALSE);
         getCommentsOperations().saveOrUpdate(comments);
     }
View Full Code Here

     public void testRate(){
         final Question question = createQuestion("Who will win the Champions League match today?", "");
         final Account account = createAccount();
         final UserAccount user = createUserAccount("carlos", account);
         final TweetPoll tpoll = createPublishedTweetPoll(account, question);
         final Comment comment = createDefaultTweetPollComment("my first comment", tpoll, user);
         final AccessRate rateItem = new AccessRate();
         rateItem.setRate(Boolean.TRUE);
         rateItem.setUser(user);
         rateItem.setTweetPoll(tpoll);
         rateItem.setPoll(null);
View Full Code Here

TOP

Related Classes of org.encuestame.persistence.domain.Comment

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.