Class GitHubMockDefaultAnswer
java.lang.Object
io.quarkiverse.githubapp.testing.mockito.internal.GitHubMockDefaultAnswer
- All Implemented Interfaces:
Serializable,org.mockito.stubbing.Answer<Object>
public final class GitHubMockDefaultAnswer
extends Object
implements org.mockito.stubbing.Answer<Object>, Serializable
The default answer for all
GitHub mocks.
The purpose of this default answer is to control the behavior of a few special methods:
- package-protected methods such as
GitHub#intern(GHUser), whose stubbing would normally require relying on external help such as Powermock. - other methods that need to be stubbed but cannot,
because they are not guaranteed to be called and thus might trigger an
UnnecessaryStubbingExceptioninMock.Strictness.STRICT_STUBSmode. (example:GitHub.isOffline())
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionGitHubMockDefaultAnswer(org.mockito.stubbing.Answer<Object> delegate, Function<String, org.kohsuke.github.GHRepository> repositoryMockProvider) -
Method Summary