@Deprecated public class MockitoJUnit44Runner extends MockitoJUnitRunner
MockitoJUnitRunner
Compatible only with JUnit 4.4, this runner adds following behavior:
Mock
,
so that explicit usage of MockitoAnnotations.initMocks(Object)
is not necessary.
Mocks are initialized before each test method.
Mockito.validateMockitoUsage()
.
Mockito.validateMockitoUsage()
.
Read more about @Mock annotation in javadoc for MockitoAnnotations
Example:
@RunWith(MockitoJUnit44Runner.class) public class ExampleTest { @Mock private List list; @Test public void shouldDoSomething() { list.add(100); } }
Constructor and Description |
---|
MockitoJUnit44Runner(Class<?> klass)
Deprecated.
|
filter, getDescription, run
public MockitoJUnit44Runner(Class<?> klass) throws InvocationTargetException
InvocationTargetException
Copyright © 2018. All rights reserved.