org.mockito.runners
Class MockitoJUnit44Runner

java.lang.Object
  extended by org.junit.runner.Runner
      extended by org.mockito.runners.MockitoJUnitRunner
          extended by org.mockito.runners.MockitoJUnit44Runner
All Implemented Interfaces:
org.junit.runner.Describable

Deprecated.

@Deprecated
public class MockitoJUnit44Runner
extends MockitoJUnitRunner

Deprecated: Simply use MockitoJUnitRunner

Compatible only with JUnit 4.4, this runner adds following behavior:

Runner is completely optional - there are other ways you can get @Mock working, for example by writing a base class. Explicitly validating framework usage is also optional because it is triggered automatically by Mockito every time you use the framework. See javadoc for 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 Summary
MockitoJUnit44Runner(java.lang.Class<?> klass)
          Deprecated.  
 
Method Summary
 
Methods inherited from class org.mockito.runners.MockitoJUnitRunner
getDescription, run
 
Methods inherited from class org.junit.runner.Runner
testCount
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MockitoJUnit44Runner

public MockitoJUnit44Runner(java.lang.Class<?> klass)
Deprecated.