Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
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: v5.0.0
Choose a base ref
Loading
...
head repository: mockito/mockito
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v5.1.0
Choose a head ref
Loading
  • 12 commits
  • 46 files changed
  • 6 contributors

Commits on Jan 14, 2023

  1. Annotate Mockito#{mock,spy}(T... reified) with @SafeVarargs (#2866)

    This avoids "Unchecked generics array creation for varargs parameter"
    warnings at the call site.
    Stephan202 authored Jan 14, 2023
    Configuration menu
    Copy the full SHA
    acddbbc View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    0aba0d5 View commit details
    Browse the repository at this point in the history

Commits on Jan 15, 2023

  1. Configuration menu
    Copy the full SHA
    484de45 View commit details
    Browse the repository at this point in the history
  2. Improve examples for InOrder (#2843)

    Include some context in InOrder examples and add an example that uses
    a static mock as well.
    ascopes authored Jan 15, 2023
    Configuration menu
    Copy the full SHA
    f2a47c3 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    23e344e View commit details
    Browse the repository at this point in the history

Commits on Jan 16, 2023

  1. Bump com.diffplug.spotless from 6.12.1 to 6.13.0 (#2871)

    Bumps com.diffplug.spotless from 6.12.1 to 6.13.0.
    
    ---
    updated-dependencies:
    - dependency-name: com.diffplug.spotless
      dependency-type: direct:production
      update-type: version-update:semver-minor
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    
    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Jan 16, 2023
    Configuration menu
    Copy the full SHA
    f4d7c34 View commit details
    Browse the repository at this point in the history

Commits on Jan 18, 2023

  1. Bump assertj-core from 3.24.1 to 3.24.2 (#2875)

    Bumps assertj-core from 3.24.1 to 3.24.2.
    
    ---
    updated-dependencies:
    - dependency-name: org.assertj:assertj-core
      dependency-type: direct:production
      update-type: version-update:semver-patch
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    
    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Jan 18, 2023
    Configuration menu
    Copy the full SHA
    1418769 View commit details
    Browse the repository at this point in the history

Commits on Jan 19, 2023

  1. Make sure the tests use mock maker with intended member accessor (#2872)

    Fixes #2855
    
    Signed-off-by: Andriy Redko <drreta@gmail.com>
    reta authored Jan 19, 2023
    Configuration menu
    Copy the full SHA
    96452fa View commit details
    Browse the repository at this point in the history

Commits on Jan 21, 2023

  1. Feat: reified mock overloads (#2882)

    Added reified mock overload methods to match the methods
    that consume an explicit Class<T> object.
    
    The following methods have been added:
    
    - Mockito.<T>mock(String, T...) - Sets the mock name.
    - Mockito.<T>mock(Answer, T...) - Sets the default answer.
    - Mockito.<T>mock(WithSettings, T...) - Provides custom settings.
    
    I have also added a case where passing null varargs in would
    result in a NullPointerException previously. Now, it will tell
    the user that they should not be providing these varargs at all.
    
    These overloads should not conflict with any existing usages of
    this API in the intended way, as the assumption is that a user
    probably isn't going to want to be mocking Mockito internals,
    Strings, or WithSettings objects anyway. If they do need to
    achieve this, then this is still accessible via the existing
    Mockito.<T>mock(Class<T>) methods anyway.
    ascopes authored Jan 21, 2023
    Configuration menu
    Copy the full SHA
    91223f8 View commit details
    Browse the repository at this point in the history

Commits on Jan 24, 2023

  1. Clean up JDK-8 related code (#2883)

    Fixes #2879 
    
    Signed-off-by: Andriy Redko <drreta@gmail.com>
    reta authored Jan 24, 2023
    Configuration menu
    Copy the full SHA
    4775c67 View commit details
    Browse the repository at this point in the history

Commits on Jan 27, 2023

  1. Bump com.diffplug.spotless from 6.13.0 to 6.14.0 (#2888)

    Bumps com.diffplug.spotless from 6.13.0 to 6.14.0.
    
    ---
    updated-dependencies:
    - dependency-name: com.diffplug.spotless
      dependency-type: direct:production
      update-type: version-update:semver-minor
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Jan 27, 2023
    Configuration menu
    Copy the full SHA
    b47bab2 View commit details
    Browse the repository at this point in the history

Commits on Jan 29, 2023

  1. Fixes some mistakes and missing details in documentation (#2889)

    - Makes static mock verification and construction initialisers into
      functional interfaces, and adds some missing documentation notes.
    - Fixes a number of grammar/spelling typos.
    - Replaces an instance of a JavaDoc comment suggesting to use a
      deprecated method with a reference to the suggested replacement.
    - Adds a note about supporting chaining of Spy with InjectMocks into
      the InjectMocks documentation
    ascopes authored Jan 29, 2023
    Configuration menu
    Copy the full SHA
    19ab3ea View commit details
    Browse the repository at this point in the history
Loading
Morty Proxy This is a proxified and sanitized view of the page, visit original site.