forked from mockito/mockito
-
Notifications
You must be signed in to change notification settings - Fork 1
Mockito Idea's
Christian Schwarz edited this page Aug 9, 2016
·
2 revisions
org.mockito.internal.configuration.SpyAnnotationEngine.assertNoIncompatibleAnnotations(Class, Field, Class...) org.mockito.internal.configuration.injection.scanner.InjectMocksScanner.assertNoAnnotations(Field, Class...)
-
use Arrays.equals(Object[],Object[]) here -> InvocationMatcher.hasSameMethod(..)
-
replace MockUtil.isMockitoMock() with MockUtil.isMock()
-
JUnitFailureHacker.isEmtpy() shozuld use String.isEmpty()
Should find common errors while coding.
create an error marker at line when...
- a class annotated with
@Mock
is final - a when clausle contains only the mock but no method call ->
when(mock).then(..)
instead ofwhen(mock.call()).then(..)