Merge branch 'master' into feat/credential-provider-refresh

This commit is contained in:
Marcos Cela López
2021-01-07 12:03:27 +01:00
committed by GitHub
37 changed files with 77 additions and 31 deletions

View 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());
}
}