Bug 200403

Summary: [JUnit] Navigation support for JUnit theories
Product: [Eclipse Project] JDT Reporter: David Saff <david>
Component: UIAssignee: JDT-UI-Inbox <jdt-ui-inbox>
Status: CLOSED WONTFIX QA Contact:
Severity: normal    
Priority: P5 CC: akuhn, asashour, daniel_megert, mail, markus.kell.r, martinae, moritz.eysholdt
Version: 3.4   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard: stalebug

Description David Saff CLA 2007-08-17 13:18:27 EDT
Build ID: I20070809-1105

Steps To Reproduce:
1. Create a new project
2. Download junit-4.4.jar from sourceforge, and place it on your classpath.
3. Create a test class that uses Theories, like this:

import static org.junit.Assert.assertEquals;

import org.junit.experimental.theories.Theories;
import org.junit.experimental.theories.Theory;
import org.junit.runner.RunWith;


@RunWith(Theories.class)
public class EclipseTest {
	@Theory
	public void allNumbersAreOne(int n) {
		assertEquals(1, n);
	}
}

4. Run the test
5. Try to double-click through to the failure

Receive a message "Method 'allNumbersAreOne' not found.  Opening the test class."  allNumbersAreOne is not highlighted.

More information:
Comment 1 Dani Megert CLA 2008-09-26 03:36:21 EDT
*** Bug 248650 has been marked as a duplicate of this bug. ***
Comment 2 Martin Probst CLA 2008-12-18 06:04:56 EST
*** Bug 259229 has been marked as a duplicate of this bug. ***
Comment 3 Martin Probst CLA 2008-12-18 06:07:33 EST
I'm adding this comment so the bug shows up when you search for @Parameters or Parameterized (to avoid further duplicates):

This is also triggered when you write a JUnit 4 test case that Parameterized and @Parameters:

@RunWith(Parameterized.class)
class MyTest {
  @Parameters
  public static Collection<Object[]> data() {
    return Arrays.asList(new Object[] { Boolean.TRUE });
  }

  public MyTest(boolean param) {}

  @Test
  public void testTruth() { assertTrue(true); }
}

By the way, if you fix this, maybe you could also replace the [0] tree nodes with [parameters.toString()] or similar? [true] would be much more readable, in particular if you have a lot of different parameters.
Comment 4 Markus Keller CLA 2009-01-06 06:10:15 EST
Bug  248650 and bug 259229 are not dups.

We have currently no plans to add support for undocumented types from an "experimental" package.
Comment 5 Moritz Eysholdt CLA 2012-10-03 10:56:03 EDT
see also Bug 391023
Comment 6 Eclipse Genie CLA 2020-05-14 16:17:56 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. As such, we're closing this bug.

If you have further information on the current state of the bug, please add it and reopen this bug. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.