mirror of
https://github.com/jlengrand/github-api.git
synced 2026-04-04 15:50:52 +00:00
Merge branch 'master' into feat/credential-provider-refresh
This commit is contained in:
21
src/test/java/org/kohsuke/github/GHPullRequestMockTest.java
Normal file
21
src/test/java/org/kohsuke/github/GHPullRequestMockTest.java
Normal file
@@ -0,0 +1,21 @@
|
||||
package org.kohsuke.github;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
import static org.junit.Assert.assertTrue;
|
||||
import static org.mockito.Mockito.mock;
|
||||
import static org.mockito.Mockito.when;
|
||||
|
||||
public class GHPullRequestMockTest {
|
||||
|
||||
@Test
|
||||
public void shouldMockGHPullRequest() throws IOException {
|
||||
GHPullRequest pullRequest = mock(GHPullRequest.class);
|
||||
when(pullRequest.isDraft()).thenReturn(true);
|
||||
|
||||
assertTrue("Mock should return true", pullRequest.isDraft());
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user