Package org.encuestame.utils.enums

Examples of org.encuestame.utils.enums.CommentsSocialOptions


            @RequestParam(value = "commentId", required = true) Long commentId,
            @PathVariable String option,
            HttpServletRequest request,
            HttpServletResponse response) throws JsonGenerationException, JsonMappingException, IOException {
            try {
                CommentsSocialOptions socialOpt =  CommentsSocialOptions.getCommentsSocialOptions(option);
                getCommentService().voteCommentSocialOption(commentId, socialOpt);
                setSuccesResponse();
            } catch (Exception e) {
                 log.error(e);
                 setError(e.getMessage(), response);
View Full Code Here


    /**
     * Test Comments social options enum.
     */
    @Test
    public void testCommentsSocialOptions(){
        final CommentsSocialOptions likeVoteOpt = CommentsSocialOptions.getCommentsSocialOptions("LIKE_VOTE");
        assertEquals("Should be equals", "LIKE_VOTE", likeVoteOpt.toString());
        final CommentsSocialOptions disLikeVoteOpt = CommentsSocialOptions.getCommentsSocialOptions("DISLIKE_VOTE");
        assertEquals("Should be equals", "DISLIKE_VOTE", disLikeVoteOpt.toString());
    }
View Full Code Here

TOP

Related Classes of org.encuestame.utils.enums.CommentsSocialOptions

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.