Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
JMockit fails to inject primitive when annotated with @Value #572
Please provide the following information:
Forgive me if this is working as intended or otherwise not an issue, but after several hours of searching I am unable to find anything to indicate otherwise.
I'm trying to use
It looks like JMockit is trying to use the literal value of Spring's
Sample class to test:
And test class for it:
And the first few lines of the stack trace when running the test:
In case it matters, this is with JUnit 5.
I understand I can probably use the Spring Test module to create my beans, but in my real case my service class has tons of autowired dependencies that are much easier to mock using JMockit expectations.
Here's the repo with the code above: https://github.com/michael-pratt/jmockit-inject-value