Package io.quarkus.panache.mock
Class PanacheStubber
java.lang.Object
io.quarkus.panache.mock.PanacheStubber
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
PanacheStubber
public PanacheStubber(org.mockito.stubbing.Stubber stubber)
-
-
Method Details
-
when
Allows to choose a method when stubbing in doThrow()|doAnswer()|doNothing()|doReturn() styleExample:
Read more about those methods:doThrow(new RuntimeException()) .when(mockedList).clear(); //following throws RuntimeException: mockedList.clear();Mockito.doThrow(Throwable[])Mockito.doAnswer(Answer)Mockito.doNothing()Mockito.doReturn(Object)See examples in javadoc for
Mockito- Parameters:
mock- The mock- Returns:
- select method for stubbing
-