51
51
import org .eclipse .pde .ui .tests .util .TargetPlatformUtil ;
52
52
import org .junit .*;
53
53
import org .junit .rules .TemporaryFolder ;
54
+ import org .osgi .framework .FrameworkUtil ;
54
55
55
56
public class FeatureBasedLaunchTest extends AbstractLaunchTest {
56
57
@@ -68,9 +69,9 @@ public void setup() throws Exception {
68
69
@ Test
69
70
public void testGetMergedBundleMap_autostartLevels () throws Throwable {
70
71
TargetPlatformUtil .setRunningPlatformAsTarget ();
71
-
72
+ String javaxInjectProvider = FrameworkUtil . getBundle ( javax . inject . Inject . class ). getSymbolicName ();
72
73
createFeatureProject (FeatureBasedLaunchTest .class .getName () + "-feature" , "1.0.0" , f -> {
73
- addIncludedPlugin (f , "javax.inject" , DEFAULT_VERSION );
74
+ addIncludedPlugin (f , javaxInjectProvider , DEFAULT_VERSION );
74
75
addIncludedPlugin (f , "org.eclipse.core.runtime" , DEFAULT_VERSION );
75
76
addIncludedPlugin (f , "org.eclipse.ui" , DEFAULT_VERSION );
76
77
});
@@ -84,9 +85,9 @@ public void testGetMergedBundleMap_autostartLevels() throws Throwable {
84
85
}
85
86
86
87
assertThat (byId )//
87
- .as ("old entry without configuration has defaults" ).containsEntry ("javax.inject" , "default:default" )
88
+ .as ("old entry without config has defaults" ).containsEntry (javaxInjectProvider , "default:default" )
88
89
.as ("use configured start-levels" ).containsEntry ("org.eclipse.core.runtime" , "1:true" )
89
- .as ("ignore configured start-levels of uncheckedplugin " )
90
+ .as ("ignore configured start-levels of unchecked plugin " )
90
91
.containsEntry ("org.eclipse.ui" , "default:default" );
91
92
}
92
93
0 commit comments