I am trying to run this file, a test class I wrote for one of my classes.
when I try to run this via IntelliJ Idea, I get no java.lang.nosuchmethoderror
, and it won't run the tests for me, it will find no test methods.
the errors are:
Exception in thread "main" java.lang.NoSuchMethodError: org.junit.platform.commons.util.ReflectionUtils.getDefaultClassLoader()Ljava/lang/ClassLoader;
at org.junit.platform.launcher.core.ServiceLoaderTestEngineRegistry.loadTestEngines(ServiceLoaderTestEngineRegistry.java:30)
at org.junit.platform.launcher.core.LauncherFactory.create(LauncherFactory.java:53)
at com.intellij.junit5.JUnit5IdeaTestRunner.createListeners(JUnit5IdeaTestRunner.java:39)
at com.intellij.rt.execution.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:49)
at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:242)
at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:70)
and this is my test class: https://pastebin.com/FMTwu3Rd
I think there are some IntelliJ Idea setting errors, but I can't seem to find it. BTW the tests are run with JUnit 4.
Thank you in advance!