This repository was archived by the owner on Feb 23, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 352
Add support for Mockito #1063
Labels
status: blocked
An issue that's blocked on an external project change or another issue
Comments
Hey, thanks for raising this. For hints curious, they should. But maybe you could first try to make a POC without Spring Native involved to check it works with GraalVM 21.2 + native build tools JUnit support? As a second step we could have a look on Spring side. |
Ok, I'll see if I find some time tomorrow to get a working setup. I really would like to see this working. |
Mockito support need to be added at Spring AOT level, see related this related comment. |
sdeleuze
added a commit
that referenced
this issue
Dec 20, 2021
Since Mockito Definition parameters are not supported yet and Mockito unsupported on native for now (see gh-1063), MockitoPostProcessor should be excluded in order to throw a more meaningful "NoSuchBeanDefinitionException: No qualifying bean of type 'MockitoPostProcessor' available" error rather than the current "IllegalArgumentException: Code should not be empty" one. This commit also updates the support documentation to explicitly mention that Mockito is unsupported at this stage. Closes gh-1343
GraalVM team is working actively on that, so I close the issue on Spring Native side. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Mockito has a new feature that allows disabling byte code generation and working with jdk proxies instead (of course limited to interfaces)
It has to be activated by creating a file called
mockito-extensions/org.mockito.plugins.MockMaker
with a content of
mock-maker-proxy
I seriously tried to make this work, but it seems like the typehints do not count for test classes.
Do you think this could be an option to be supported?
The text was updated successfully, but these errors were encountered: