예제 #1
0
 private void dispatchIssueCommentEditedEvent(Comment comment, Map<String, Object> parameters) {
   IssueEventBundle issueCommentBundle =
       issueEventBundleFactory.createCommentEditedBundle(
           comment.getIssue(), comment.getUpdateAuthorApplicationUser(), comment, parameters);
   issueEventManager.dispatchEvent(issueCommentBundle);
   dispatchEvent(EventType.ISSUE_COMMENT_EDITED_ID, comment, parameters);
 }
예제 #2
0
 // TODO: the event generation should live in the service
 // This is mostly here for testing purposes so we do not really need to dispatch the event to know
 // it was called correctly
 void dispatchEvent(Long eventTypeId, Comment comment, Map<String, Object> parameters) {
   issueEventManager.dispatchRedundantEvent(
       eventTypeId,
       comment.getIssue(),
       comment.getUpdateAuthorUser(),
       comment,
       null,
       null,
       parameters);
 }
 private void stubEventManager() {
   issueEventManager.dispatchEvent(
       eq(EventDispatchOption.ISSUE_DELETED.getEventTypeId()),
       eq(issue),
       anyMap(String.class, Object.class),
       nullArg(User.class),
       anyBoolean());
   expectLastCall()
       .andAnswer(
           new IAnswer<Void>() {
             @Override
             public Void answer() throws Throwable {
               capturedEventParams = (Map) getCurrentArguments()[2];
               capturedSendMailFlag = (Boolean) getCurrentArguments()[4];
               return null;
             }
           });
 }