You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
IntelliJ IDEA offers to run object speks annotated with @RunWith(JUnitPlatform::class) but running such results in a KotlinNullPointerException. I personally like using object for tests/specifications as they are indeed singletons (unless data driven, but that usually happens within a test/specification and not at the top-level and if it does then enum/class can be used with whatever annotations/etc. the framework supports for driving such).
Aug 26, 2016 10:49:17 AM org.junit.platform.launcher.core.ServiceLoaderTestEngineRegistry loadTestEngines
INFO: Discovered TestEngines with IDs: [spek]
kotlin.KotlinNullPointerException
at org.jetbrains.spek.engine.SpekTestEngine.resolveSpec(SpekTestEngine.kt:97)
at org.jetbrains.spek.engine.SpekTestEngine.resolveSpecs(SpekTestEngine.kt:62)
at org.jetbrains.spek.engine.SpekTestEngine.discover(SpekTestEngine.kt:36)
at org.junit.platform.launcher.core.DefaultLauncher.discoverRoot(DefaultLauncher.java:108)
at org.junit.platform.launcher.core.DefaultLauncher.discover(DefaultLauncher.java:78)
at org.junit.platform.runner.JUnitPlatform.generateTestTree(JUnitPlatform.java:113)
at org.junit.platform.runner.JUnitPlatform.<init>(JUnitPlatform.java:96)
at org.junit.platform.runner.JUnitPlatform.<init>(JUnitPlatform.java:88)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:422)
at org.junit.internal.builders.AnnotatedBuilder.buildRunner(AnnotatedBuilder.java:104)
at org.junit.internal.builders.AnnotatedBuilder.runnerForClass(AnnotatedBuilder.java:86)
at org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:59)
at org.junit.internal.builders.AllDefaultPossibilitiesBuilder.runnerForClass(AllDefaultPossibilitiesBuilder.java:26)
at org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:59)
at org.junit.internal.requests.ClassRequest.getRunner(ClassRequest.java:33)
at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:96)
at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:42)
at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:262)
at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:84)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:147)
The text was updated successfully, but these errors were encountered:
IntelliJ IDEA offers to run
object
speks annotated with@RunWith(JUnitPlatform::class)
but running such results in aKotlinNullPointerException
. I personally like usingobject
for tests/specifications as they are indeed singletons (unless data driven, but that usually happens within a test/specification and not at the top-level and if it does then enum/class can be used with whatever annotations/etc. the framework supports for driving such).The text was updated successfully, but these errors were encountered: