Details
-
Bug
-
Status: Closed
-
Blocker
-
Resolution: Fixed
-
None
-
None
-
None
-
Eclipse 3.3
Description
There are multiple problems:
1. static imports are not supported :
import static org.junit.Assert.assertEquals throws an error in the editor
2. A NPE occurs in org.codehaus.groovy.eclipse.junit.launcher.JUnit4TestFinder.annotates(IMember):
String source = member.getSource().substring(0, charsToSearch);
Here are member.geSource() null. The reason seams to be that the member always is a BinaryType or BinaryMethod. Both hasn't a Source.
3. After fixing this with this and analyze the Tetsclass if there are @Test - Annotations the Testclass was executed. But the result was:
java.lang.Exception: No runnable methods
at org.junit.internal.runners.TestClassMethodsRunner.run(TestClassMethodsRunner.java:33)
at org.junit.internal.runners.TestClassRunner$1.runUnprotected(TestClassRunner.java:42)
at org.junit.internal.runners.BeforeAndAfterRunner.runProtected(BeforeAndAfterRunner.java:34)
at org.junit.internal.runners.TestClassRunner.run(TestClassRunner.java:52)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:38)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)