Package io.quarkus.panache.mock
Class PanacheMock
- java.lang.Object
-
- io.quarkus.panache.mock.PanacheMock
-
public class PanacheMock extends Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
PanacheMock.InvokeRealMethodException
static class
PanacheMock.MyRealMethod
-
Field Summary
Fields Modifier and Type Field Description static boolean
IsMockEnabled
-
Constructor Summary
Constructors Constructor Description PanacheMock()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static PanacheStubber
doAnswer(org.mockito.stubbing.Answer answer)
static PanacheStubber
doCallRealMethod()
static PanacheStubber
doNothing()
static PanacheStubber
doReturn(Object objectToBeReturned)
static PanacheStubber
doReturn(Object objectToBeReturned, Object... toBeReturnedNext)
static PanacheStubber
doThrow(Class<? extends Throwable> toBeThrown)
static PanacheStubber
doThrow(Class<? extends Throwable> toBeThrown, Class<? extends Throwable>... toBeThrownNext)
static PanacheStubber
doThrow(Throwable... toBeThrown)
static <T> T
getMock(Class<T> klass)
static Object[]
getMocks(Class<?>... classes)
static boolean
isMocked(Class<?> klass)
static void
mock(Class<?>... classes)
static Object
mockMethod(Class<?> klass, String methodName, Class<?>[] parameterTypes, Object[] args)
static void
reset()
static <T> T
verify(Class<T> klass)
static <T> T
verify(Class<T> klass, org.mockito.verification.VerificationMode verificationMode)
static void
verifyNoInteractions(Class<?>... classes)
static void
verifyNoMoreInteractions(Class<?>... classes)
-
-
-
Method Detail
-
getMock
public static <T> T getMock(Class<T> klass)
-
mock
public static void mock(Class<?>... classes)
-
reset
public static void reset()
-
isMocked
public static boolean isMocked(Class<?> klass)
-
mockMethod
public static Object mockMethod(Class<?> klass, String methodName, Class<?>[] parameterTypes, Object[] args) throws PanacheMock.InvokeRealMethodException
-
verify
public static <T> T verify(Class<T> klass)
-
verify
public static <T> T verify(Class<T> klass, org.mockito.verification.VerificationMode verificationMode)
-
verifyNoMoreInteractions
public static void verifyNoMoreInteractions(Class<?>... classes)
-
verifyNoInteractions
public static void verifyNoInteractions(Class<?>... classes)
-
doAnswer
public static PanacheStubber doAnswer(org.mockito.stubbing.Answer answer)
-
doCallRealMethod
public static PanacheStubber doCallRealMethod()
-
doNothing
public static PanacheStubber doNothing()
-
doReturn
public static PanacheStubber doReturn(Object objectToBeReturned)
-
doReturn
public static PanacheStubber doReturn(Object objectToBeReturned, Object... toBeReturnedNext)
-
doThrow
public static PanacheStubber doThrow(Class<? extends Throwable> toBeThrown)
-
doThrow
public static PanacheStubber doThrow(Class<? extends Throwable> toBeThrown, Class<? extends Throwable>... toBeThrownNext)
-
doThrow
public static PanacheStubber doThrow(Throwable... toBeThrown)
-
-