use of com.cloudogu.scm.review.pullrequest.service.PullRequestStore in project scm-review-plugin by scm-manager.
the class CommentStoreTest method init.
@BeforeEach
void init() {
PullRequestStore prStore = mock(PullRequestStore.class);
when(prStore.get(any())).thenReturn(TestData.createPullRequest());
store = new CommentStore(dataStore, keyGenerator);
// delegate store methods to backing map
when(dataStore.getAll()).thenReturn(backingMap);
doAnswer(invocationOnMock -> {
String id = invocationOnMock.getArgument(0);
PullRequestComments pullRequestComments = invocationOnMock.getArgument(1);
backingMap.put(id, pullRequestComments);
return null;
}).when(dataStore).put(anyString(), any(PullRequestComments.class));
}
Aggregations