@Test public void ignoresGithubComment() { handler = new CreateGithubCommentOnClosedHandler(githubGateway, githubScraper, githubCommentFactory, false, githubUser); handler.createGithubCommentOnRequestClaimed(mock((RequestClaimedEvent.class))); verifyZeroInteractions(githubGateway); }
@TransactionalEventListener(phase = TransactionPhase.AFTER_COMMIT) public void createGithubCommentOnRequestClaimed(final RequestClaimedEvent event) { if (addComment) { final RequestDto request = event.getRequestDto(); final IssueInformationDto issueInformation = request.getIssueInformation(); final ClaimDto claim = event.getClaimDto(); if (issueInformation.getPlatform() == Platform.GITHUB) { placeComment(request, issueInformation, claim); } } }
CreateGithubCommentOnClosedHandler { @TransactionalEventListener(phase = TransactionPhase.AFTER_COMMIT) public void createGithubCommentOnRequestClaimed(final RequestClaimedEvent event) { if (addComment) { final RequestDto request = event.getRequestDto(); final IssueInformationDto issueInformation = request.getIssueInformation(); final ClaimDto claim = event.getClaimDto(); if (issueInformation.getPlatform() == Platform.GITHUB) { placeComment(request, issueInformation, claim); } } } }
CreateGithubCommentOnClosedHandler { @TransactionalEventListener(phase = TransactionPhase.AFTER_COMMIT) public void createGithubCommentOnRequestClaimed(final RequestClaimedEvent event) { if (addComment) { final RequestDto request = event.getRequestDto(); final IssueInformationDto issueInformation = request.getIssueInformation(); final ClaimDto claim = event.getClaimDto(); if (issueInformation.getPlatform() == Platform.GITHUB) { placeComment(request, issueInformation, claim); } } } CreateGithubCommentOnClosedHandler(final GithubGateway githubGateway,
                                              final GithubScraper githubScraper,
                                              final GithubCommentFactory githubCommentFactory,
                                              @Value("${github.add-comments:false}") final Boolean addComment,
                                              @Value("${feign.client.github.username:fundrequest-notifier}") final String githubUser); }
CreateGithubCommentOnClosedHandler { @TransactionalEventListener(phase = TransactionPhase.AFTER_COMMIT) public void createGithubCommentOnRequestClaimed(final RequestClaimedEvent event) { if (addComment) { final RequestDto request = event.getRequestDto(); final IssueInformationDto issueInformation = request.getIssueInformation(); final ClaimDto claim = event.getClaimDto(); if (issueInformation.getPlatform() == Platform.GITHUB) { placeComment(request, issueInformation, claim); } } } CreateGithubCommentOnClosedHandler(final GithubGateway githubGateway,
                                              final GithubScraper githubScraper,
                                              final GithubCommentFactory githubCommentFactory,
                                              @Value("${github.add-comments:false}") final Boolean addComment,
                                              @Value("${feign.client.github.username:fundrequest-notifier}") final String githubUser); @TransactionalEventListener(phase = TransactionPhase.AFTER_COMMIT) void createGithubCommentOnRequestClaimed(final RequestClaimedEvent event); }
CreateGithubCommentOnClosedHandler { @TransactionalEventListener(phase = TransactionPhase.AFTER_COMMIT) public void createGithubCommentOnRequestClaimed(final RequestClaimedEvent event) { if (addComment) { final RequestDto request = event.getRequestDto(); final IssueInformationDto issueInformation = request.getIssueInformation(); final ClaimDto claim = event.getClaimDto(); if (issueInformation.getPlatform() == Platform.GITHUB) { placeComment(request, issueInformation, claim); } } } CreateGithubCommentOnClosedHandler(final GithubGateway githubGateway,
                                              final GithubScraper githubScraper,
                                              final GithubCommentFactory githubCommentFactory,
                                              @Value("${github.add-comments:false}") final Boolean addComment,
                                              @Value("${feign.client.github.username:fundrequest-notifier}") final String githubUser); @TransactionalEventListener(phase = TransactionPhase.AFTER_COMMIT) void createGithubCommentOnRequestClaimed(final RequestClaimedEvent event);  }