|
29 | 29 | import org.mockito.invocation.InvocationOnMock; |
30 | 30 | import org.mockito.stubbing.Answer; |
31 | 31 |
|
32 | | -import com.atlassian.bitbucket.event.pull.PullRequestCommentAddedEvent; |
33 | | -import com.atlassian.bitbucket.event.pull.PullRequestEvent; |
34 | | -import com.atlassian.bitbucket.project.Project; |
35 | | -import com.atlassian.bitbucket.pull.PullRequest; |
36 | | -import com.atlassian.bitbucket.pull.PullRequestRef; |
37 | | -import com.atlassian.bitbucket.pull.PullRequestService; |
38 | | -import com.atlassian.bitbucket.repository.Repository; |
39 | | -import com.google.common.base.Function; |
40 | | - |
41 | 32 | import se.bjurr.prnfb.http.ClientKeyStore; |
42 | 33 | import se.bjurr.prnfb.http.HttpResponse; |
43 | 34 | import se.bjurr.prnfb.http.Invoker; |
44 | 35 | import se.bjurr.prnfb.http.UrlInvoker; |
45 | 36 | import se.bjurr.prnfb.service.PrnfbRenderer; |
46 | 37 | import se.bjurr.prnfb.service.PrnfbRendererFactory; |
47 | 38 | import se.bjurr.prnfb.service.SettingsService; |
| 39 | +import se.bjurr.prnfb.service.VariablesContext; |
48 | 40 | import se.bjurr.prnfb.settings.PrnfbNotification; |
49 | 41 | import se.bjurr.prnfb.settings.PrnfbSettingsData; |
50 | 42 | import se.bjurr.prnfb.settings.ValidationException; |
51 | 43 |
|
| 44 | +import com.atlassian.bitbucket.event.pull.PullRequestCommentAddedEvent; |
| 45 | +import com.atlassian.bitbucket.event.pull.PullRequestEvent; |
| 46 | +import com.atlassian.bitbucket.project.Project; |
| 47 | +import com.atlassian.bitbucket.pull.PullRequest; |
| 48 | +import com.atlassian.bitbucket.pull.PullRequestRef; |
| 49 | +import com.atlassian.bitbucket.pull.PullRequestService; |
| 50 | +import com.atlassian.bitbucket.repository.Repository; |
| 51 | +import com.atlassian.bitbucket.user.ApplicationUser; |
| 52 | +import com.google.common.base.Function; |
| 53 | + |
52 | 54 | public class PrnfbPullRequestEventListenerTest { |
53 | 55 |
|
54 | 56 | private final ClientKeyStore clientKeyStore = null; |
@@ -144,7 +146,12 @@ public HttpResponse invoke(UrlInvoker urlInvoker) { |
144 | 146 | when(settingsService.getNotifications()) // |
145 | 147 | .thenReturn(notifications); |
146 | 148 |
|
147 | | - when(prnfbRendererFactory.create(any(), any(), any(), any(), any())) // |
| 149 | + when(prnfbRendererFactory.create( |
| 150 | + any(PullRequest.class), |
| 151 | + any(PrnfbPullRequestAction.class), |
| 152 | + any(PrnfbNotification.class), |
| 153 | + any(VariablesContext.class), |
| 154 | + any(ApplicationUser.class))) // |
148 | 155 | .thenReturn(renderer); |
149 | 156 | when(renderer.render(any(), any(), any(), any())) // |
150 | 157 | .thenAnswer( |
|
0 commit comments