How get I get PsiElement instance for specified testData's code file into junit test?


Hello, I'm writing a codegen Intellij IDEA Plugin and I want to test my plugin whether it parse code correctly.

My project folder structure:

└── src
    ├── main
    │   ├── kotlin
    │   └── resources
    └── test
        ├── kotlin
        └── testData

I place all test code into src/test/testData folder(like SimpleKtClass.kt or

How can parsed src/test/testData/SimpleKtClass.kt and get it as PsiFile Instance into junit test?


Please sign in to leave a comment.