File tree Expand file tree Collapse file tree 2 files changed +22
-1
lines changed
main/java/org/kohsuke/github
test/java/org/kohsuke/github Expand file tree Collapse file tree 2 files changed +22
-1
lines changed Original file line number Diff line number Diff line change 77 *
88 * @author Kohsuke Kawaguchi
99 */
10- enum Previews {
10+ public enum Previews {
1111
1212 /**
1313 * Check-runs and check-suites
Original file line number Diff line number Diff line change 1+ package org .kohsuke .github ;
2+
3+ import org .junit .Test ;
4+
5+ import java .io .IOException ;
6+
7+ import static org .junit .Assert .assertTrue ;
8+ import static org .mockito .Mockito .mock ;
9+ import static org .mockito .Mockito .when ;
10+
11+ public class GHPullRequestMockTest {
12+
13+ @ Test
14+ public void shouldMockGHPullRequest () throws IOException {
15+ GHPullRequest pullRequest = mock (GHPullRequest .class );
16+ when (pullRequest .isDraft ()).thenReturn (true );
17+
18+ assertTrue ("Mock should return true" , pullRequest .isDraft ());
19+ }
20+
21+ }
You can’t perform that action at this time.
0 commit comments