Testddata cannot not be found in testcase
Answered
Hello All,
I am trying to write a testcase by extending com.intellij.debugger.DebuggerTestCase based on the code form ‘stream-debugger’
for this I have created a folder ‘testdata’ under project root
java.lang.IllegalArgumentException: Argument for @NotNull parameter 'vDir' of com/intellij/testFramework/PsiTestUtil.addContentRoot must not be null at com.intellij.testFramework.PsiTestUtil.$$$reportNull$$$0(PsiTestUtil.java)
at com.intellij.testFramework.PsiTestUtil.addContentRoot(PsiTestUtil.java)
at com.intellij.execution.ExecutionTestCase.lambda$setUpModule$1(ExecutionTestCase.java:91)
at com.intellij.openapi.application.impl.ApplicationImpl.runWriteAction(ApplicationImpl.java:1000)
at com.intellij.execution.ExecutionTestCase.setUpModule(ExecutionTestCase.java:83)
at com.intellij.testFramework.HeavyPlatformTestCase.lambda$setUpProject$1(HeavyPlatformTestCase.java:296)
at com.intellij.openapi.roots.impl.ProjectRootManagerImpl.mergeRootsChangesDuring(ProjectRootManagerImpl.java:402)
at com.intellij.testFramework.HeavyPlatformTestCase.lambda$setUpProject$2(HeavyPlatformTestCase.java:295)
at com.intellij.openapi.application.WriteAction.run(WriteAction.java:102)
at com.intellij.testFramework.HeavyPlatformTestCase.setUpProject(HeavyPlatformTestCase.java:294)
at com.intellij.testFramework.HeavyPlatformTestCase.setUp(HeavyPlatformTestCase.java:259)
at com.intellij.testFramework.JavaProjectTestCase.setUp(JavaProjectTestCase.java:17) (edited)
moduleDir is always null even though the path clearly exists .
when I load the same path from normal Action class its able to find the path.
Please help.
Upload id: 2021_06_27_QB6t1euUQVdSdETP (files: image (1).png, image.png)
Post is closed for comments.
Answered in Slack. Please do not crosspost.