public class InitMockitoMocks
extends org.junit.rules.TestWatcher
@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!
Constructor and Description |
---|
InitMockitoMocks(Object test) |
public InitMockitoMocks(Object test)
Copyright © 2002-2015 Atlassian. All Rights Reserved.