@Deprecated public class

InitMockitoMocks

extends TestWatcher
java.lang.Object
   ↳ org.junit.rules.TestWatcher
     ↳ com.atlassian.jira.junit.rules.InitMockitoMocks

This class is deprecated.
use org.mockito.junit.MockitoJUnit#rule() instead

Class Overview

Initializes Mocktio mocks before the tests.

Just add this to your test:

     @Rule public 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

Public Constructors
InitMockitoMocks(Object test)
Protected Methods
void finished(Description description)
void starting(Description description)
[Expand]
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)