| Summary: | [JUnit] Opening @Ignored test classes from JUnit view leads to "Method '...' not found. Opening the test class." warning | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] JDT | Reporter: | Sebastian Dietrich <Sebastian.Dietrich> | ||||
| Component: | UI | Assignee: | Markus Keller <markus.kell.r> | ||||
| Status: | RESOLVED FIXED | QA Contact: | |||||
| Severity: | normal | ||||||
| Priority: | P3 | CC: | daniel_megert, david, markus.kell.r | ||||
| Version: | 3.6.1 | ||||||
| Target Milestone: | 3.7 M6 | ||||||
| Hardware: | PC | ||||||
| OS: | Windows XP | ||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
|
Description
Sebastian Dietrich
That's a bug in the JUnit 4 model.
In JUnit4TestClassReference#sendDescriptionTree(IVisitsTestTrees, Description), we call org.junit.runner.Description#isTest(), which returns true for an ignored class (because it has no children).
package testcase;
import org.junit.Ignore;
import org.junit.Test;
@Ignore
public class T4 {
@Test
public void myTest() throws Exception {
org.junit.Assert.assertEquals("the expected String",
"the actual String");
}
@Test
public void anotherTest() throws Exception {
junit.framework.Assert.assertEquals("the expected String",
"the actual String");
}
}
Created attachment 187482 [details]
Workaround
Fixed in HEAD. |