Skip to content

Latest commit

 

History

History
24 lines (16 loc) · 881 Bytes

README.md

File metadata and controls

24 lines (16 loc) · 881 Bytes

mockito-static-mockmaker ci

This is a naive mockito mockmaker to support mockStatic globally.

mockStatic stubbing in mockito-core has no effects if the stub method is invoked in new threads.

This extension makes it work in multiple threads context and supports both mockito3 & mockito5.

Setup

Include the dependence in your project, the plugin is enabled by default.

<dependency>
  <groupId>me.yceel.mockito</groupId>
  <artifactId>mockito-static-mockmaker</artifactId>
  <version>1.0.0-SNAPSHOT</version>
  <scope>test</scope>
</dependency>

Usage

It's a plugin, no any change to the original mockito api, check the unit test for examples.