Clean up Mockito usage

This commit migrates to the MockitoJUnitRunner where sensible, which
will later allow for an easier migration to Mockito's extension for
JUnit Jupiter.

In addition, this commit deletes unnecessary stubbing for various mocks
and polishes test fixture setup in various test classes.
This commit is contained in:
Sam Brannen
2019-05-28 13:56:10 +02:00
parent d495902a9c
commit 141ef9082f
27 changed files with 170 additions and 290 deletions

View File

@@ -167,10 +167,10 @@
<property name="ignoreComments" value="true" />
</module>
<module name="com.puppycrawl.tools.checkstyle.checks.regexp.RegexpSinglelineJavaCheck">
<property name="id" value="bddMockito"/>
<property name="maximum" value="0"/>
<property name="format" value="org\.mockito\.Mockito\.(when|doThrow|doAnswer)" />
<property name="message"
value="Please use BDDMockito imports." />
<property name="message" value="Please use BDDMockito." />
<property name="ignoreComments" value="true" />
</module>
<module name="com.puppycrawl.tools.checkstyle.checks.regexp.RegexpSinglelineJavaCheck">