java.lang.Object |
↳ |
org.junit.rules.TestWatcher |
|
↳ |
com.atlassian.jira.junit.rules.InitMockitoMocks |
Class Overview
Initializes Mocktio mocks before the tests.
Just add this to your test:
@Rule InitMockitoMocks initMocks = new InitMockitoMocks(this);
@Mock private UserService mockUserService;
@Mock private JiraAuthenticationContext jiraAuthenticationContext;
and all your mocks annotated with @Mock will be automatically initialized. No
need for runners, or before/after methods!
Summary
Protected Methods |
void
|
finished(Description description)
|
void
|
starting(Description description)
|
[Expand]
Inherited Methods |
From class
org.junit.rules.TestWatcher
Statement
|
apply(Statement arg0, Description arg1)
|
void
|
failed(Throwable arg0, Description arg1)
|
void
|
finished(Description arg0)
|
void
|
starting(Description arg0)
|
void
|
succeeded(Description arg0)
|
|
From class
java.lang.Object
Object
|
clone()
|
boolean
|
equals(Object arg0)
|
void
|
finalize()
|
final
Class<?>
|
getClass()
|
int
|
hashCode()
|
final
void
|
notify()
|
final
void
|
notifyAll()
|
String
|
toString()
|
final
void
|
wait()
|
final
void
|
wait(long arg0, int arg1)
|
final
void
|
wait(long arg0)
|
|
From interface
org.junit.rules.TestRule
Statement
|
apply(Statement arg0, Description arg1)
|
|
Public Constructors
public
InitMockitoMocks
(Object test)
Protected Methods
protected
void
finished
(Description description)
protected
void
starting
(Description description)