We can annotate test with:
@Mock
private MyType mock;
@Test(threadPoolSize = 3, invocationCount = 8)
public void testParallel() {
....
}
In this case MockitoTestNGListener will not work as we want.
In current implementation MockitoSession is bind to current test instance, but TestNG create one test instance and run test in multiple thread.
Issue need more investigate how to resolve problem.
We must to check and discover how mocked field should be distinguished on one test instance and multiple thread.
Please like / react on issue to we see how many people are interested this issue.
We can annotate test with:
In this case
MockitoTestNGListenerwill not work as we want.In current implementation
MockitoSessionis bind to current test instance, butTestNGcreate one test instance and run test in multiple thread.Issue need more investigate how to resolve problem.
We must to check and discover how mocked field should be distinguished on one test instance and multiple thread.
Please like / react on issue to we see how many people are interested this issue.