Class GHEventPayloadSpyDefaultAnswer
java.lang.Object
io.quarkiverse.githubapp.testing.mockito.internal.GHEventPayloadSpyDefaultAnswer
- All Implemented Interfaces:
Serializable,org.mockito.stubbing.Answer<Object>
public final class GHEventPayloadSpyDefaultAnswer
extends Object
implements org.mockito.stubbing.Answer<Object>, Serializable
The default answer for all
GHEventPayload spies.
The purpose of this default answer is to retrieve information from the event payload if possible (e.g. for getters),
or failing that apply whatever default behavior is configured globally (e.g. return null, ...).
This will call the real method,
and potentially wrap the return value with a spy using GHObjectSpyDefaultAnswer,
if that return value is a GHObject.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionGHEventPayloadSpyDefaultAnswer(org.kohsuke.github.GitHub clientSpy, Function<org.kohsuke.github.GHObject, DefaultableMocking<? extends org.kohsuke.github.GHObject>> defaultableMockingProvider) -
Method Summary
-
Constructor Details
-
GHEventPayloadSpyDefaultAnswer
public GHEventPayloadSpyDefaultAnswer(org.kohsuke.github.GitHub clientSpy, Function<org.kohsuke.github.GHObject, DefaultableMocking<? extends org.kohsuke.github.GHObject>> defaultableMockingProvider)
-
-
Method Details