Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: mockito/mockito
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v3.2.10
Choose a base ref
...
head repository: mockito/mockito
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v3.2.11
Choose a head ref
  • 2 commits
  • 10 files changed
  • 2 contributors

Commits on Feb 6, 2020

  1. Add TestRule to MockitoJUnit (#1858)

    JUnit has two types of test rules: MethodRule and TestRule. The existing
    MockitoJUnit rule returns a MockitoRule which extends MethodRule.
    However, since this is not a TestRule, some features of JUnit do not
    nicely integrate with Mockito. For example, the RuleChain feature of
    JUnit only works on TestRules.
    
    Therefore, add a separate entrypoint to MockitoJUnit which returns a
    TestRule that can be integrated with RuleChain. It introduces a separate
    interface to make this distinction clear. If we would change the
    existing MockitoRule to also extend TestRule, the JUnit logic would no
    longer run the MethodRule [1] and would thus break existing users.
    
    [1]: https://github.com/junit-team/junit4/blob/2df7e0882128d551565f87f688bbe745d85aacba/src/main/java/org/junit/runners/BlockJUnit4ClassRunner.java#L402
    TimvdLippe authored Feb 6, 2020
    Configuration menu
    Copy the full SHA
    39e5d84 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    2c5a2e8 View commit details
    Browse the repository at this point in the history
Loading