Package org.mockito.junit
package org.mockito.junit
Mockito JUnit integration ; rule and runners.
-
ClassDescriptionMockito supports JUnit via: JUnit Rules - see
MockitoRule
JUnit runners - seeMockitoJUnitRunner
JUnit Jupiter extensionMockito JUnit Runner keeps tests clean and improves debugging experience.This Mockito JUnit Runner implementation *ignores* stubbing argument mismatches (MockitoJUnitRunner.StrictStubs
) and *does not detect* unused stubbings.Detects unused stubs and reports them as failures.Improves debugging tests, helps keeping the tests clean.Mockito JUnit Rule helps keeping tests clean.Equivalent toMockitoRule
, but inherits a different JUnit4 base interfaceTestRule
.Use this rule in order to collect multiple verification failures and report at once.