PsiClass.superclass returns null in LightCodeInsightFixtureTestCase

I'm trying to understand why the assertion in the following test fails:


class TmpTest : LightCodeInsightFixtureTestCase() {

fun test() {
myFixture.configureByFiles("", "")

val childClass = myFixture.findClass("test.Child")

override fun getTestDataPath(): String {
return "src/test/resources"

The child file looks like this:

package test;

class Child extends Parent {}
1 comment
Comment actions Permalink

The solution here was to move the test class files into the correct package directory structure:

myFixture.configureByFiles("test/", "test/")

Please sign in to leave a comment.