'this' is not available - when enabling mock-maker-inline
See original GitHub issueWhen we enable mock-maker-inline
in our project and debug a class with @Spy
annotated on it IntelliJ reports that 'this' is not available
:
When we unset mock-maker-inline
then things work as expected and we can inspect the class variables:
It appears to be the same as this report: https://stackoverflow.com/questions/62661996/unable-to-debug-junit-test-anywhere
Is this expected Mockito behaviour?
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:32 (19 by maintainers)
Top Results From Across the Web
Using mockito-inline in project throws "Mockito cannot mock ...
MockMaker file in project's src/test/resources/mockito-extensions ... up the post Mockito fails with inlined mocks enabled with Invalid ...
Read more >How to use the Mockito's inline mock maker - David Vlijmincx
Option 2: Adding a file to enable the Mock maker inline. Create a resources directory in your test directory if you do not...
Read more >Mockito 4.2.0 API - javadoc.io
The Mockito library enables mock creation, verification and stubbing. ... Be aware that you cannot use the inline mock maker on Android due...
Read more >Mock Final Classes and Methods with Mockito - Baeldung
mock -maker-inline. Copy. Mockito checks the extensions directory for configuration files when it is loaded. This file enables the mocking of ...
Read more >Enable the option to mock final classes | by André Mion
MockMaker. It's a simple text file, in which you have to write: mock-maker-inline. Read at: https://antonioleiva.com/mockito-2-kotlin/.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Same issue with Mockito-inline 3.8.0 and java 15. This makes tests very difficult to debug, because it makes impossible to debug the code step by step
It should fix both. A new release is underway in this minute.