public class


extends TestWatcher
   ↳ 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!


Public Constructors
InitMockitoMocks(Object test)
Protected Methods
void finished(Description description)
void starting(Description description)
Inherited Methods
From class org.junit.rules.TestWatcher
From class java.lang.Object
From interface org.junit.rules.TestRule

Public Constructors

public InitMockitoMocks (Object test)

Protected Methods

protected void finished (Description description)

protected void starting (Description description)