Using Services when unit testing plugin against Idea 2019.3
Answered
Hi,
We are trying to expand the testing regime for our plugin to cover all versions that we support, including 2019.3. Some of our tests, based on `
JavaModuleTestCase
make calls to
ServiceManager.getService
However this always seems to return null for our own service classes (annotated with
@State
and implementing
PersistentStateComponent
). This works fine since Idea 2020.X. Is this some known limitation for 2019.3? Would there be any relatively pain-free workaround?
Thanks!
Scott
Please sign in to leave a comment.
The known caveats are listed here https://jetbrains.org/intellij/sdk/docs/basics/plugin_structure/plugin_services.html#light-services
If unresolved, please post code.
I'll see if I can produce a minimum example for this. Thanks!