3232
3333public class JUnitLaunchValidationOperation extends LaunchValidationOperation {
3434
35- private static final Set <String > JUNIT_PLATFORM_ENGINE_BUNLDES = Set .of (new String [] { //
36- "junit-platform -engine" , //$NON-NLS-1$
37- "org.junit.platform .engine" , //$NON-NLS-1$
35+ private static final Set <String > JUNIT_JUPITER_ENGINE_BUNLDES = Set .of (new String [] { //
36+ "junit-jupiter -engine" , //$NON-NLS-1$
37+ "org.junit.jupiter .engine" , //$NON-NLS-1$
3838 });
3939
4040 private final Map <Object , Object []> fErrors = new HashMap <>(2 );
@@ -64,8 +64,7 @@ private void checkJunitVersion(ILaunchConfiguration configuration, Set<IPluginMo
6464 case TestKindRegistry .JUNIT3_TEST_KIND_ID , TestKindRegistry .JUNIT4_TEST_KIND_ID -> {
6565 } // nothing to check
6666 case TestKindRegistry .JUNIT5_TEST_KIND_ID -> {
67- // JUnit 5 platform bundles have version range [1.0,2.0)
68- junitPlatformBundlesVersions .stream ().map (Version ::getMajor ).filter (i -> i .intValue () != 1 ).findFirst ().ifPresent (otherVersion -> {
67+ junitPlatformBundlesVersions .stream ().map (Version ::getMajor ).filter (i -> i .intValue () != 5 ).findFirst ().ifPresent (otherVersion -> {
6968 String message = NLS .bind (PDEMessages .JUnitLaunchConfiguration_error_JUnitLaunchAndRuntimeMissmatch , 5 , otherVersion );
7069 addError (message );
7170 });
@@ -92,7 +91,7 @@ public Map<Object, Object[]> getInput() {
9291
9392 private static Set <Version > junitPlatformBundleVersions (Set <IPluginModelBase > models ) {
9493 return models .stream ().map (IPluginModelBase ::getBundleDescription ) //
95- .filter (d -> JUNIT_PLATFORM_ENGINE_BUNLDES .contains (d .getSymbolicName ())) //
94+ .filter (d -> JUNIT_JUPITER_ENGINE_BUNLDES .contains (d .getSymbolicName ())) //
9695 .map (BundleDescription ::getVersion ).collect (Collectors .toSet ());
9796 }
9897}
0 commit comments