Search in sources :

Example 16 with Comment

use of com.cloudogu.scm.review.comment.service.Comment in project scm-review-plugin by scm-manager.

the class MyOpenReviewsTest method createComment.

private static Comment createComment(CommentType type) {
    Comment comment = new Comment();
    comment.setType(type);
    return comment;
}
Also used : Comment(com.cloudogu.scm.review.comment.service.Comment)

Example 17 with Comment

use of com.cloudogu.scm.review.comment.service.Comment in project scm-review-plugin by scm-manager.

the class MailTextResolverTest method shouldRenderEmailOnCommentTransition.

@Test
void shouldRenderEmailOnCommentTransition() {
    Comment taskComment = oldComment.clone();
    taskComment.addCommentTransition(new ExecutedTransition<>("new", CommentTransition.MAKE_TASK, System.currentTimeMillis(), "dent"));
    CommentEvent event = new CommentEvent(repository, pullRequest, comment, oldComment, HandlerEventType.MODIFY);
    CommentEventMailTextResolver renderer = new CommentEventMailTextResolver(event);
    assertEmail(renderer, "changed");
}
Also used : Comment(com.cloudogu.scm.review.comment.service.Comment) CommentEvent(com.cloudogu.scm.review.comment.service.CommentEvent) Test(org.junit.jupiter.api.Test)

Example 18 with Comment

use of com.cloudogu.scm.review.comment.service.Comment in project scm-review-plugin by scm-manager.

the class MyOpenTasksTest method createComment.

private static Comment createComment(CommentType type) {
    Comment comment = new Comment();
    comment.setType(type);
    return comment;
}
Also used : Comment(com.cloudogu.scm.review.comment.service.Comment)

Aggregations

Comment (com.cloudogu.scm.review.comment.service.Comment)18 Repository (sonia.scm.repository.Repository)7 Comment.createComment (com.cloudogu.scm.review.comment.service.Comment.createComment)6 BranchRevisionResolver (com.cloudogu.scm.review.pullrequest.dto.BranchRevisionResolver)6 MockHttpRequest (org.jboss.resteasy.mock.MockHttpRequest)6 Test (org.junit.Test)6 Location (com.cloudogu.scm.review.comment.service.Location)5 Reply (com.cloudogu.scm.review.comment.service.Reply)5 PullRequest (com.cloudogu.scm.review.pullrequest.service.PullRequest)5 Operation (io.swagger.v3.oas.annotations.Operation)5 ApiResponse (io.swagger.v3.oas.annotations.responses.ApiResponse)5 Path (javax.ws.rs.Path)5 NamespaceAndName (sonia.scm.repository.NamespaceAndName)5 RepositoryResolver (com.cloudogu.scm.review.RepositoryResolver)4 CommentService (com.cloudogu.scm.review.comment.service.CommentService)4 PullRequestService (com.cloudogu.scm.review.pullrequest.service.PullRequestService)4 GET (javax.ws.rs.GET)4 Produces (javax.ws.rs.Produces)4 MediaType (javax.ws.rs.core.MediaType)4 UriBuilder (javax.ws.rs.core.UriBuilder)4