Skip to content

Latest commit

 

History

History
23 lines (17 loc) · 802 Bytes

File metadata and controls

23 lines (17 loc) · 802 Bytes

mockito-extension

Maven Central

A temporary Mockito extension. Will be removed once Mockito creates their own.

  • Supports @Mock, @Spy, and @Captor annotated fields.
  • Supports @Mock and ArgumentCaptor typed parameters.
@ExtendWith(MockitoExtension.class)
public class SomeTest {
  @Mock Function<String, String> stringTransform; // Will be instantiated.

  @Test
  void testTransform(ArgumentCaptor<String> stringCaptor /* Will be instantiated. */) {
  }
}