-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Comparing changes
Open a pull request
base repository: mockito/mockito
base: v4.8.1
head repository: mockito/mockito
compare: v4.11.0
- 20 commits
- 45 files changed
- 10 contributors
Commits on Oct 19, 2022
-
Bump junit-platform-launcher from 1.9.0 to 1.9.1 (#2768)
Bumps [junit-platform-launcher](https://github.com/junit-team/junit5) from 1.9.0 to 1.9.1. - [Release notes](https://github.com/junit-team/junit5/releases) - [Commits](https://github.com/junit-team/junit5/commits) --- updated-dependencies: - dependency-name: org.junit.platform:junit-platform-launcher 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>
Configuration menu - View commit details
-
Copy full SHA for fe7dca2 - Browse repository at this point
Copy the full SHA fe7dca2View commit details -
Bump gradle-errorprone-plugin from 2.0.2 to 3.0.1 (#2770)
Bumps gradle-errorprone-plugin from 2.0.2 to 3.0.1. --- updated-dependencies: - dependency-name: net.ltgt.gradle:gradle-errorprone-plugin dependency-type: direct:production update-type: version-update:semver-major ... 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>
Configuration menu - View commit details
-
Copy full SHA for f512a76 - Browse repository at this point
Copy the full SHA f512a76View commit details
Commits on Oct 25, 2022
-
Bump gradle/wrapper-validation-action from 1.0.4 to 1.0.5 (#2775)
Bumps [gradle/wrapper-validation-action](https://github.com/gradle/wrapper-validation-action) from 1.0.4 to 1.0.5. - [Release notes](https://github.com/gradle/wrapper-validation-action/releases) - [Commits](gradle/wrapper-validation-action@v1.0.4...v1.0.5) --- updated-dependencies: - dependency-name: gradle/wrapper-validation-action 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>
Configuration menu - View commit details
-
Copy full SHA for fcb4cf7 - Browse repository at this point
Copy the full SHA fcb4cf7View commit details
Commits on Oct 28, 2022
-
Configuration menu - View commit details
-
Copy full SHA for eb85518 - Browse repository at this point
Copy the full SHA eb85518View commit details
Commits on Nov 3, 2022
-
Configuration menu - View commit details
-
Copy full SHA for 47045cb - Browse repository at this point
Copy the full SHA 47045cbView commit details
Commits on Nov 11, 2022
-
Avoid clearing stale weak entries from critical code segments (#2780)
This reduces the probability of checking for mocked from from the mock-checking code what can lead to infinitive loops.
Configuration menu - View commit details
-
Copy full SHA for 0052e2f - Browse repository at this point
Copy the full SHA 0052e2fView commit details
Commits on Nov 14, 2022
-
Add
Mockito.{mock,spy}
that take noClass
argument (#2779)This commit adds method `Mockito.mock()` as a shorter alternative for `Mockito.mock(Class)`. When the result of this call is assigned to a variable/field with an explicit type, java will detect the needed class automatically. Co-authored-by: Tim van der Lippe <TimvdLippe@users.noreply.github.com>
Configuration menu - View commit details
-
Copy full SHA for 3faa002 - Browse repository at this point
Copy the full SHA 3faa002View commit details
Commits on Nov 22, 2022
-
Configuration menu - View commit details
-
Copy full SHA for 544d0b6 - Browse repository at this point
Copy the full SHA 544d0b6View commit details
Commits on Nov 23, 2022
-
Bump versions.bytebuddy from 1.12.16 to 1.12.19 (#2799)
Bumps `versions.bytebuddy` from 1.12.16 to 1.12.19. Updates `byte-buddy` from 1.12.16 to 1.12.19 - [Release notes](https://github.com/raphw/byte-buddy/releases) - [Changelog](https://github.com/raphw/byte-buddy/blob/master/release-notes.md) - [Commits](raphw/byte-buddy@byte-buddy-1.12.16...byte-buddy-1.12.19) Updates `byte-buddy-agent` from 1.12.16 to 1.12.19 - [Release notes](https://github.com/raphw/byte-buddy/releases) - [Changelog](https://github.com/raphw/byte-buddy/blob/master/release-notes.md) - [Commits](raphw/byte-buddy@byte-buddy-1.12.16...byte-buddy-1.12.19) Updates `byte-buddy-android` from 1.12.16 to 1.12.19 - [Release notes](https://github.com/raphw/byte-buddy/releases) - [Changelog](https://github.com/raphw/byte-buddy/blob/master/release-notes.md) - [Commits](raphw/byte-buddy@byte-buddy-1.12.16...byte-buddy-1.12.19) --- updated-dependencies: - dependency-name: net.bytebuddy:byte-buddy dependency-type: direct:production update-type: version-update:semver-patch - dependency-name: net.bytebuddy:byte-buddy-agent dependency-type: direct:production update-type: version-update:semver-patch - dependency-name: net.bytebuddy:byte-buddy-android 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>
Configuration menu - View commit details
-
Copy full SHA for 4086970 - Browse repository at this point
Copy the full SHA 4086970View commit details
Commits on Nov 24, 2022
-
Bump espresso-core from 3.4.0 to 3.5.0 (#2800)
Bumps espresso-core from 3.4.0 to 3.5.0. --- updated-dependencies: - dependency-name: androidx.test.espresso:espresso-core 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>
Configuration menu - View commit details
-
Copy full SHA for a8af042 - Browse repository at this point
Copy the full SHA a8af042View commit details
Commits on Nov 26, 2022
-
Bump kotlinVersion from 1.7.10 to 1.7.21 (#2801)
Bumps `kotlinVersion` from 1.7.10 to 1.7.21. Updates `kotlin-gradle-plugin` from 1.7.10 to 1.7.21 - [Release notes](https://github.com/JetBrains/kotlin/releases) - [Changelog](https://github.com/JetBrains/kotlin/blob/master/ChangeLog.md) - [Commits](JetBrains/kotlin@v1.7.10...v1.7.21) Updates `kotlin-stdlib` from 1.7.10 to 1.7.21 - [Release notes](https://github.com/JetBrains/kotlin/releases) - [Changelog](https://github.com/JetBrains/kotlin/blob/master/ChangeLog.md) - [Commits](JetBrains/kotlin@v1.7.10...v1.7.21) --- updated-dependencies: - dependency-name: org.jetbrains.kotlin:kotlin-gradle-plugin dependency-type: direct:production update-type: version-update:semver-patch - dependency-name: org.jetbrains.kotlin:kotlin-stdlib 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>
Configuration menu - View commit details
-
Copy full SHA for 0ce902a - Browse repository at this point
Copy the full SHA 0ce902aView commit details
Commits on Nov 28, 2022
-
Simplify
MatcherApplicationStrategy
(#2803)Prep work for #2796 The class is overly complex, with the precomputed `matchingType` adding to value.
Configuration menu - View commit details
-
Copy full SHA for 8f4af18 - Browse repository at this point
Copy the full SHA 8f4af18View commit details -
Bump junit from 1.1.3 to 1.1.4 (#2806)
Bumps junit from 1.1.3 to 1.1.4. --- updated-dependencies: - dependency-name: androidx.test.ext:junit 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>
Configuration menu - View commit details
-
Copy full SHA for 83a41fd - Browse repository at this point
Copy the full SHA 83a41fdView commit details
Commits on Nov 29, 2022
-
Bump kotlinVersion from 1.7.21 to 1.7.22 (#2809)
Bumps `kotlinVersion` from 1.7.21 to 1.7.22. Updates `kotlin-gradle-plugin` from 1.7.21 to 1.7.22 - [Release notes](https://github.com/JetBrains/kotlin/releases) - [Changelog](https://github.com/JetBrains/kotlin/blob/master/ChangeLog.md) - [Commits](JetBrains/kotlin@v1.7.21...v1.7.22) Updates `kotlin-stdlib` from 1.7.21 to 1.7.22 - [Release notes](https://github.com/JetBrains/kotlin/releases) - [Changelog](https://github.com/JetBrains/kotlin/blob/master/ChangeLog.md) - [Commits](JetBrains/kotlin@v1.7.21...v1.7.22) --- updated-dependencies: - dependency-name: org.jetbrains.kotlin:kotlin-gradle-plugin dependency-type: direct:production update-type: version-update:semver-patch - dependency-name: org.jetbrains.kotlin:kotlin-stdlib 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>
Configuration menu - View commit details
-
Copy full SHA for 34b8a8d - Browse repository at this point
Copy the full SHA 34b8a8dView commit details -
Bump com.github.ben-manes.versions from 0.42.0 to 0.44.0 (#2810)
Bumps com.github.ben-manes.versions from 0.42.0 to 0.44.0. --- updated-dependencies: - dependency-name: com.github.ben-manes.versions 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>
Configuration menu - View commit details
-
Copy full SHA for bdcb31e - Browse repository at this point
Copy the full SHA bdcb31eView commit details
Commits on Nov 30, 2022
-
Bump shipkit-auto-version from 1.2.1 to 1.2.2 (#2811)
Bumps shipkit-auto-version from 1.2.1 to 1.2.2. --- updated-dependencies: - dependency-name: org.shipkit:shipkit-auto-version 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>
Configuration menu - View commit details
-
Copy full SHA for 2567f05 - Browse repository at this point
Copy the full SHA 2567f05View commit details
Commits on Dec 4, 2022
-
Configuration menu - View commit details
-
Copy full SHA for ee9ba74 - Browse repository at this point
Copy the full SHA ee9ba74View commit details -
Configuration menu - View commit details
-
Copy full SHA for e2e6289 - Browse repository at this point
Copy the full SHA e2e6289View commit details
Commits on Dec 14, 2022
-
Add
mockito-subclass
artifact (#2821)Signed-off-by: Andriy Redko <andriy.redko@aiven.io>
Configuration menu - View commit details
-
Copy full SHA for a4e2e48 - Browse repository at this point
Copy the full SHA a4e2e48View commit details
Commits on Dec 28, 2022
-
Add
type()
method toArgumentMatcher
(#2807)Using the new `type()`, we can differentiate between matching all varargs or only one argument of the varargs. # Benefits: Because this approach leaves `VarargsMatcher` untouched, it does not require additional existing matchers to implement `VarargsMatcher` to fix issues such as #567. Where as the first PR would require `Null` and `NotNull` to be marked `VarargsMatcher`. This PR creates new variants of `isNotNull` and `isNull` to address #567. Having `InstanceOf` override `type()` provides a workable solution to #1593. Having `equals` override `type` addresses #1222. # Downsides The obvious downside is that this changes the public `ArgumentMatcher` interface, though in a backwards compatible way. ## Known limitation The main limitation I'm aware of, is not a new limitation. It is that it is not possible to assert only a single parameter is passed to the vararg parameter, when using a `VarargMatcher`, e.g. `any()`. (ref: #1593). For example: ```java // Given method: int vararg(String... args); // I want to mock this invocation: mock.vararag("one param"); // ...but not these: mock.vararg(); mock.vararg("more than", "one param"); ``` There is no current way to do this. This is because in the following intuitive mocking: ```java given(mock.vararg(any(String.class))).willReturn(1); ``` ... matches zero or more vararg parameters, as the `any()` method is using `VarargMatcher`. It seems to me that `VarargMatcher` is... a little broken! This is maybe something that should be consider a candiate for fixing in the next major version bump. While it is not possible to fix any `VarargMatcher` based matchers in a backwards compatible way, this the approach in this PR it is possible to mock/verify exactly one vararg param using `isA`, rather than `any`: ```java @test public void shouldMatchExactlyOnParam() { mock.varargs("one param"); verify(mock).varargs(isA(String.class)); } @test public void shouldNotMatchMoreParams() { mock.varargs("two", "params"); verify(mock, never()).varargs(isA(String.class)); } @test public void shouldMatchAnyNumberOfParams() { mock.varargs("two", "params"); verify(mock).varargs(isA(String[].class)); } ``` ... because `isA` does not implement `VarargsMatcher`, and so can work as expected once it implements `type()`. Fixes #2796 Fixes #567 Fixes #584 Fixes #1222 Fixes #1498
Configuration menu - View commit details
-
Copy full SHA for 483e15f - Browse repository at this point
Copy the full SHA 483e15fView commit details
This comparison is taking too long to generate.
Unfortunately it looks like we can’t render this comparison for you right now. It might be too big, or there might be something weird with your repository.
You can try running this command locally to see the comparison on your machine:
git diff v4.8.1...v4.11.0