Class RunRunnableAnswer
- java.lang.Object
-
- com.atlassian.confluence.util.test.RunRunnableAnswer
-
- All Implemented Interfaces:
org.mockito.stubbing.Answer<Object>
public class RunRunnableAnswer extends Object implements org.mockito.stubbing.Answer<Object>
Answer for simplified mocking of methods acceptingRunnable
. It will execute the given closure. Example:doAnswer(runRunnable()).when(permissionManager).withExemption(any(Runnable.class));
- Since:
- 5.7
-
-
Constructor Summary
Constructors Constructor Description RunRunnableAnswer()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Object
answer(org.mockito.invocation.InvocationOnMock invocation)
static RunRunnableAnswer
runRunnable()
-
-
-
Method Detail
-
runRunnable
public static RunRunnableAnswer runRunnable()
-
-