Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update report message to use any() instead of anyObject() #1931

Merged
merged 1 commit into from May 31, 2020

Conversation

takezoe
Copy link
Contributor

@takezoe takezoe commented May 11, 2020

Because anyObject() has already been deprecated, it would be better to push to use any() instead.

Hey,

Thanks for the contribution, this is awesome.
As you may have read, project members have somehow an opinionated view on what and how should be
Mockito, e.g. we don't want mockito to be a feature bloat.
There may be a thorough review, with feedback -> code change loop.

Which branch :

  • On mockito 3.x, make your pull request target release/3.x
  • On mockito 2.x, make your pull request target release/2.x (2.x is in maintenance mode)

This block can be removed
_Something wrong in the template fix it here .github/PULL_REQUEST_TEMPLATE.md

check list

  • Read the contributing guide
  • PR should be motivated, i.e. what does it fix, why, and if relevant how
  • If possible / relevant include an example in the description, that could help all readers
    including project members to get a better picture of the change
  • Avoid other runtime dependencies
  • Meaningful commit history ; intention is important please rebase your commit history so that each
    commit is meaningful and help the people that will explore a change in 2 years
  • The pull request follows coding style
  • Mention Fixes #<issue number> in the description if relevant
  • At least one commit should mention Fixes #<issue number> if relevant

because anyObject() has already been deprecated, it would be better to push to use any()
@codecov-io
Copy link

codecov-io commented May 11, 2020

Codecov Report

Merging #1931 into release/3.x will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@              Coverage Diff               @@
##             release/3.x    #1931   +/-   ##
==============================================
  Coverage          86.67%   86.67%           
  Complexity          2526     2526           
==============================================
  Files                318      318           
  Lines               6650     6650           
  Branches             832      832           
==============================================
  Hits                5764     5764           
  Misses               685      685           
  Partials             201      201           
Impacted Files Coverage Δ Complexity Δ
...java/org/mockito/internal/exceptions/Reporter.java 93.51% <ø> (ø) 93.00 <0.00> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 56b0e54...dfdd892. Read the comment docs.

Copy link
Contributor

@TimvdLippe TimvdLippe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, thanks!

@TimvdLippe TimvdLippe merged commit b0e814b into mockito:release/3.x May 31, 2020
FlorianHockmann added a commit to FlorianHockmann/janusgraph that referenced this pull request Jun 22, 2022
Import of `org.mockito.Matchers` needed to be changed to
`org.mockito.ArgumentMatchers`. `Matchers` was already only an alias
for `ArgumentMatchers` before as described in the release notes:
https://github.com/mockito/mockito/releases/tag/v4.0.0

`any()` is the replacement for `anyObject()`:
mockito/mockito#1931

Signed-off-by: Florian Hockmann <fh@florian-hockmann.de>
FlorianHockmann added a commit to FlorianHockmann/janusgraph that referenced this pull request Jun 22, 2022
This updates JUnit, TestContainers, Lombok, and Mockito together as it
wasn't possible to only update TestContainers alone since it also
depends on JUnit, see PR JanusGraph#2972.
The same applies to Mockito.

These changes were necessary to update Mockito to v4:

Import of `org.mockito.Matchers` needed to be changed to
`org.mockito.ArgumentMatchers`. `Matchers` was already only an alias
for `ArgumentMatchers` before as described in the release notes:
https://github.com/mockito/mockito/releases/tag/v4.0.0

`any()` is the replacement for `anyObject()`:
mockito/mockito#1931

Signed-off-by: Florian Hockmann <fh@florian-hockmann.de>
FlorianHockmann added a commit to FlorianHockmann/janusgraph that referenced this pull request Jun 29, 2022
This updates JUnit, TestContainers, Lombok, and Mockito together as it
wasn't possible to only update TestContainers alone since it also
depends on JUnit, see PR JanusGraph#2972.
The same applies to Mockito.

These changes were necessary to update Mockito to v4:

Import of `org.mockito.Matchers` needed to be changed to
`org.mockito.ArgumentMatchers`. `Matchers` was already only an alias
for `ArgumentMatchers` before as described in the release notes:
https://github.com/mockito/mockito/releases/tag/v4.0.0

`any()` is the replacement for `anyObject()`:
mockito/mockito#1931

Calling `property()` on a mocked `StandardVertex` resulted in a
`NullPointer` exception, but we can also simply use a `DetachedProperty`
as all accesses to that property on the vertex are also already mocked.

Signed-off-by: Florian Hockmann <fh@florian-hockmann.de>
FlorianHockmann added a commit to JanusGraph/janusgraph that referenced this pull request Jun 30, 2022
This updates JUnit, TestContainers, Lombok, and Mockito together as it
wasn't possible to only update TestContainers alone since it also
depends on JUnit, see PR #2972.
The same applies to Mockito.

These changes were necessary to update Mockito to v4:

Import of `org.mockito.Matchers` needed to be changed to
`org.mockito.ArgumentMatchers`. `Matchers` was already only an alias
for `ArgumentMatchers` before as described in the release notes:
https://github.com/mockito/mockito/releases/tag/v4.0.0

`any()` is the replacement for `anyObject()`:
mockito/mockito#1931

Calling `property()` on a mocked `StandardVertex` resulted in a
`NullPointer` exception, but we can also simply use a `DetachedProperty`
as all accesses to that property on the vertex are also already mocked.

Signed-off-by: Florian Hockmann <fh@florian-hockmann.de>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants