This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 246783 - Run Focused Test Method does not work inside an inner class
Summary: Run Focused Test Method does not work inside an inner class
Status: NEW
Alias: None
Product: java
Classification: Unclassified
Component: JUnit (show other bugs)
Version: 8.1
Hardware: PC Linux
: P4 normal (vote)
Assignee: Theofanis Oikonomou
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-08-29 16:58 UTC by Jesse Glick
Modified: 2014-08-29 16:58 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jesse Glick 2014-08-29 16:58:43 UTC
20140825-9a94e8cb336b. If you have

@Test public void stuff() {
    assertWorks(new Runnable() {
        @Override public void run() {
            body(); // CARET
        }
    });
}

then Run/Debug Focused Test Method do nothing. You have to move the caret outside of the inner class.

The IDE should just search for the method in a top-level class if the current element is something else.