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

Introduce option to disable inline-mock-maker for a specific instance #2626

Closed
JojOatXGME opened this issue Apr 21, 2022 · 1 comment · Fixed by #2701
Closed

Introduce option to disable inline-mock-maker for a specific instance #2626

JojOatXGME opened this issue Apr 21, 2022 · 1 comment · Fixed by #2701

Comments

@JojOatXGME
Copy link
Contributor

In order to ease the migration to the inline mock maker in big projects, it would nice if the mock make can be changed for individual mocks. This would allow projects to change the default mock maker to inline-mock-maker without immediately fixing all edge cases where the new mock maker doesn't work.

Such option could be provided over a new method on the MockSettings class.

JojOatXGME added a commit to JojOatXGME/mockito that referenced this issue Jul 4, 2022
@JojOatXGME JojOatXGME changed the title Introduce option to disable inline-mock-maker for a specific instances Introduce option to disable inline-mock-maker for a specific instance Jul 4, 2022
JojOatXGME added a commit to JojOatXGME/mockito that referenced this issue Jul 4, 2022
@astromme
Copy link

astromme commented Jul 6, 2022

+1

We have a situation where we'd like to mock a JNI interface with native methods. These methods are unsupported by the new inline mockmaker according to https://javadoc.io/doc/org.mockito/mockito-core/latest/org/mockito/Mockito.html, but we need to use inline in other parts of our codebase.

JojOatXGME added a commit to JojOatXGME/mockito that referenced this issue Jul 16, 2022
JojOatXGME added a commit to JojOatXGME/mockito that referenced this issue Jul 16, 2022
JojOatXGME added a commit to JojOatXGME/mockito that referenced this issue Aug 28, 2022
JojOatXGME added a commit to JojOatXGME/mockito that referenced this issue Aug 30, 2022
JojOatXGME added a commit to JojOatXGME/mockito that referenced this issue Sep 3, 2022
JojOatXGME added a commit to JojOatXGME/mockito that referenced this issue Sep 3, 2022
JojOatXGME added a commit to JojOatXGME/mockito that referenced this issue Sep 3, 2022
JojOatXGME added a commit to JojOatXGME/mockito that referenced this issue Sep 3, 2022
JojOatXGME added a commit to JojOatXGME/mockito that referenced this issue Sep 5, 2022
JojOatXGME added a commit to JojOatXGME/mockito that referenced this issue Sep 5, 2022
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 a pull request may close this issue.

2 participants