Search This Blog

Sunday, November 25, 2018

Mockito notes


to use @Mock and @MockInjects do either of these


@RunWith(MockitoJUnitRunner.class)
public class MockitoAnnotationTest {
    ...
}

@Before
public void init() {
    MockitoAnnotations.initMocks(this);
}


No comments: