Package org.mockito.runners
Class MockitoJUnit44Runner
- java.lang.Object
-
- org.junit.runner.Runner
-
- org.mockito.runners.MockitoJUnitRunner
-
- org.mockito.runners.MockitoJUnit44Runner
-
- All Implemented Interfaces:
org.junit.runner.Describable,org.junit.runner.manipulation.Filterable
@Deprecated public class MockitoJUnit44Runner extends MockitoJUnitRunner
Deprecated.Deprecated: Simply useMockitoJUnitRunnerCompatible only with JUnit 4.4, this runner adds following behavior:
-
Initializes mocks annotated with
Mock, so that explicit usage ofMockitoAnnotations.initMocks(Object)is not necessary. Mocks are initialized before each test method. -
validates framework usage after each test method. See javadoc for
Mockito.validateMockitoUsage().
Mockito.validateMockitoUsage().Read more about @Mock annotation in javadoc for
MockitoAnnotationsExample:
@RunWith(MockitoJUnitRunner.class) public class ExampleTest { @Mock private List list; @Test public void shouldDoSomething() { list.add(100); } }
-
-
Constructor Summary
Constructors Constructor Description MockitoJUnit44Runner(java.lang.Class<?> klass)Deprecated.
-
Method Summary
-
Methods inherited from class org.mockito.runners.MockitoJUnitRunner
filter, getDescription, run
-
-