Load a project component in LightIdeaTestCase ?

Hi!

Is there any way to load a project component when running LightIdeaTestCase ?

5 comments
Comment actions Permalink

Any chance this is possible?

I want to write test on psi reference resolve and many resolve implementations use cache at a project-component level.

Maybe there's a better way to test resolve ?

0
Comment actions Permalink

You could mock out the interface to IDEA OpenAPI and test without IdeaTestCase at all.

0
Comment actions Permalink

Could you explain it please ?

0
Comment actions Permalink

Is there any way to load a project component when running LightIdeaTestCase ?


It's supposed that you don't change any aspect of IDEA runtime
configuration while running LightIdeaTestCase.

0
Comment actions Permalink

If i get you right then i should add that i run LightIdeaTestCase with "-Didea.plugins.load=false" option declared (otherwise some of the plugins produces fatal error)

and in the setUp function i call a static method of my application component which loads the language support.

Actually i borrowed such a structure from Ruby plugin tests, maybe there's a better way to test psi parsing/reference resolve and actions...

0

Please sign in to leave a comment.