Community
Participate
Working Groups
Test pass for M3 - create JUnit workspace - select TestCase.setup. - Search->Declarations->Hierarchy The result set includes matches like testSetupErrorDontTearDown() - junit.tests.ExtensionTest testSetupErrorInTestSetup() - junit.tests.ExtensionTest testSetupFails() - junit.tests.TestTest testTearDownSetupFails() - junit.tests.TestTest these matches aren't related to TestCase.setup although they are implementors of the interface Test
Dani pls investigate whether this is JCORE or UI.
All of the listed "wrong" matches are anonymous inner classes but not all of them are wrong: TornDown is an inner class in ExtensionTest (extending TestSetup) and in TestTest (extending TestCase). ==> The matches in the anonymous inner class of ExtensionTest.TornDown are therefore wrong but the two other results are correct. I guess ExtensionTest.TornDown somehow made it into the hierarchy scope. Moving JCore
The hierarchy scope is just a filter on the potential matches. In this case, you looked for the declaration of all 'setup' methods (pattern is '*.setup'). Only the one that were not part of the hierarchy were filtered out. Since it is not possible to have java elements corresponding to local type declarations, the hierarchy scope considered that the match (which is inside ExtensionTest) is part of the hierarchy since ExtensionTest is a subclass of TestCase. To have the behavior you expect, the UI should use the java element for TestCase.setup as the search pattern.