Package org.olat.core.commons.services.commentAndRating

Examples of org.olat.core.commons.services.commentAndRating.UserCommentsManager.deleteComment()


    ucm.replyTo(comment2, ident2, "Reply 1 with subpath");
    assertEquals(Long.valueOf(3), service.getUserCommentsManager().countComments());
    assertEquals(Long.valueOf(3), serviceWithSubPath.getUserCommentsManager().countComments());
    // Delete first created coment with one reply each
    ucm.deleteComment(comment1, true);
    ucm2.deleteComment(comment2, true);
    assertEquals(Long.valueOf(1), service.getUserCommentsManager().countComments());
    assertEquals(Long.valueOf(1), serviceWithSubPath.getUserCommentsManager().countComments());
    // Create reply to a comment that does not exis anymore -> should not create anything
    assertNull(ucm.replyTo(comment1, ident2, "Reply 1"));
    assertNull(ucm.replyTo(comment2, ident2, "Reply 1 with subpath"));
View Full Code Here


    ucm.replyTo(comment2, ident2, "Reply 1 with subpath");
    assertEquals(Long.valueOf(3), service.getUserCommentsManager().countComments());
    assertEquals(Long.valueOf(3), serviceWithSubPath.getUserCommentsManager().countComments());
    // Delete first created coment without the reply
    ucm.deleteComment(comment1, false);
    ucm2.deleteComment(comment2, false);
    assertEquals(Long.valueOf(2), service.getUserCommentsManager().countComments());
    assertEquals(Long.valueOf(2), serviceWithSubPath.getUserCommentsManager().countComments());
    // Delete all comments
    assertEquals(2, ucm.deleteAllComments());
    assertEquals(Long.valueOf(0), service.getUserCommentsManager().countComments());
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.