Skip to content

Commit

Permalink
Merge pull request #2228 from eclipse/junit592_in_target_2ndTry
Browse files Browse the repository at this point in the history
align junit5 in target platforms with eclipse jdts
  • Loading branch information
cdietrich authored Apr 18, 2023
2 parents 7adea6f + 8e8118b commit 0927719
Show file tree
Hide file tree
Showing 9 changed files with 88 additions and 56 deletions.
12 changes: 12 additions & 0 deletions org.eclipse.xtext.junit5.tests/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,16 @@
<version>${project.version}</version>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-surefire-plugin</artifactId>
<configuration>
<providerHint>junit5</providerHint>
</configuration>
</plugin>
</plugins>
</build>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ Require-Bundle: org.eclipse.xtext;visibility:=reexport,
org.eclipse.xtext.ide;visibility:=reexport,
org.eclipse.lsp4j;resolution:=optional,
org.eclipse.lsp4j.jsonrpc;resolution:=optional,
org.junit;bundle-version="4.13.2",
org.eclipse.xtend.lib,
org.eclipse.xtext.testing
Import-Package: org.apache.log4j;version="1.2.24",
Expand Down
27 changes: 25 additions & 2 deletions org.eclipse.xtext.testing.junit5.tests/pom.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.eclipse.xtext</groupId>
Expand All @@ -7,7 +9,7 @@
<relativePath>../org.eclipse.xtext.nodeploy.parent</relativePath>
</parent>
<artifactId>org.eclipse.xtext.testing.junit5.tests</artifactId>
<packaging>eclipse-test-plugin</packaging>
<packaging>eclipse-plugin</packaging>

<name>Junit 5 Tests for Xtext Testing Library</name>

Expand All @@ -18,4 +20,25 @@
<version>${project.version}</version>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<failIfNoTests>true</failIfNoTests>
</configuration>
<dependencies>
<!-- force to run with JUnit5 -->
<dependency>
<groupId>org.apache.maven.surefire</groupId>
<artifactId>surefire-junit-platform</artifactId>
<version>${maven-surefire-version}</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>

</project>
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,8 @@
*******************************************************************************/
package org.eclipse.xtext.testing.tests.junit5;

import static org.junit.Assert.assertEquals;

import org.eclipse.xtext.testing.extensions.InjectionExtension;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;

import com.google.inject.Inject;
Expand All @@ -29,7 +28,7 @@ public class ComposedInjectAnnotationTest {

@Test
public void didUseComposedInjectAnnotation() {
assertEquals(ComposedInject.INJECTED, toBeInjected);
Assertions.assertEquals(ComposedInject.INJECTED, toBeInjected);
}

}
3 changes: 1 addition & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -445,8 +445,7 @@
<plugin>
<!--
This will let Tycho execute tests in "eclipse-plugin" projects
as JUnit tests (NOT as plug-in tests). We force the JUnitPlatform
to execute all tests (JUnit4 and JUnit5) with the JUnit5 engine.
as JUnit tests (NOT as plug-in tests).
-->
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
Expand Down
24 changes: 12 additions & 12 deletions xtext-latest.target
Original file line number Diff line number Diff line change
Expand Up @@ -58,22 +58,22 @@
<unit id="org.antlr.runtime" version="3.2.0.v20220404-1927"/>
<unit id="org.aopalliance" version="1.0.0.v20220404-1927"/>
<unit id="org.opentest4j" version="0.0.0"/>
<unit id="org.apiguardian" version="0.0.0"/>
<unit id="org.apiguardian.api" version="0.0.0"/>
<unit id="org.objectweb.asm" version="9.5.0"/>
<unit id="io.github.classgraph" version="4.8.149.v20220915-0556"/>
<unit id="org.slf4j.binding.simple" version="0.0.0"/>
<unit id="org.junit" version="4.13.2.v20211018-1956"/>
<unit id="org.junit.jupiter.api" version="0.0.0"/>
<unit id="org.junit.jupiter.engine" version="0.0.0"/>
<unit id="org.junit.jupiter.migrationsupport" version="0.0.0"/>
<unit id="org.junit.jupiter.params" version="0.0.0"/>
<unit id="org.junit.platform.commons" version="0.0.0"/>
<unit id="org.junit.platform.engine" version="0.0.0"/>
<unit id="org.junit.platform.launcher" version="0.0.0"/>
<unit id="org.junit.platform.runner" version="0.0.0"/>
<unit id="org.junit.platform.suite.api" version="0.0.0"/>
<unit id="org.junit.platform.suite.commons" version="0.0.0"/>
<unit id="org.junit.vintage.engine" version="0.0.0"/>
<unit id="junit-jupiter-api" version="0.0.0"/>
<unit id="junit-jupiter-engine" version="0.0.0"/>
<unit id="junit-jupiter-migrationsupport" version="0.0.0"/>
<unit id="junit-jupiter-params" version="0.0.0"/>
<unit id="junit-platform-commons" version="0.0.0"/>
<unit id="junit-platform-engine" version="0.0.0"/>
<unit id="junit-platform-launcher" version="0.0.0"/>
<unit id="junit-platform-runner" version="0.0.0"/>
<unit id="junit-platform-suite-api" version="0.0.0"/>
<unit id="junit-platform-suite-commons" version="0.0.0"/>
<unit id="junit-vintage-engine" version="0.0.0"/>
</location>
<location includeAllPlatforms="false" includeConfigurePhase="false" includeMode="planner" includeSource="true" type="InstallableUnit">
<unit id="org.eclipse.license.feature.group" version="2.0.2.v20181016-2210"/>
Expand Down
24 changes: 12 additions & 12 deletions xtext-r202209.target
Original file line number Diff line number Diff line change
Expand Up @@ -59,22 +59,22 @@
<unit id="org.antlr.runtime" version="3.2.0.v20220404-1927"/>
<unit id="org.aopalliance" version="1.0.0.v20220404-1927"/>
<unit id="org.opentest4j" version="0.0.0"/>
<unit id="org.apiguardian" version="0.0.0"/>
<unit id="org.apiguardian.api" version="0.0.0"/>
<unit id="org.objectweb.asm" version="9.5.0"/>
<unit id="io.github.classgraph" version="4.8.149.v20220915-0556"/>
<unit id="org.slf4j.binding.simple" version="0.0.0"/>
<unit id="org.junit" version="4.13.2.v20211018-1956"/>
<unit id="org.junit.jupiter.api" version="0.0.0"/>
<unit id="org.junit.jupiter.engine" version="0.0.0"/>
<unit id="org.junit.jupiter.migrationsupport" version="0.0.0"/>
<unit id="org.junit.jupiter.params" version="0.0.0"/>
<unit id="org.junit.platform.commons" version="0.0.0"/>
<unit id="org.junit.platform.engine" version="0.0.0"/>
<unit id="org.junit.platform.launcher" version="0.0.0"/>
<unit id="org.junit.platform.runner" version="0.0.0"/>
<unit id="org.junit.platform.suite.api" version="0.0.0"/>
<unit id="org.junit.platform.suite.commons" version="0.0.0"/>
<unit id="org.junit.vintage.engine" version="0.0.0"/>
<unit id="junit-jupiter-api" version="0.0.0"/>
<unit id="junit-jupiter-engine" version="0.0.0"/>
<unit id="junit-jupiter-migrationsupport" version="0.0.0"/>
<unit id="junit-jupiter-params" version="0.0.0"/>
<unit id="junit-platform-commons" version="0.0.0"/>
<unit id="junit-platform-engine" version="0.0.0"/>
<unit id="junit-platform-launcher" version="0.0.0"/>
<unit id="junit-platform-runner" version="0.0.0"/>
<unit id="junit-platform-suite-api" version="0.0.0"/>
<unit id="junit-platform-suite-commons" version="0.0.0"/>
<unit id="junit-vintage-engine" version="0.0.0"/>
</location>
<location includeAllPlatforms="false" includeConfigurePhase="false" includeMode="planner" includeSource="true" type="InstallableUnit">
<unit id="org.eclipse.license.feature.group" version="2.0.2.v20181016-2210"/>
Expand Down
24 changes: 12 additions & 12 deletions xtext-r202212.target
Original file line number Diff line number Diff line change
Expand Up @@ -54,22 +54,22 @@
<unit id="org.antlr.runtime" version="3.2.0.v20220404-1927"/>
<unit id="org.aopalliance" version="1.0.0.v20220404-1927"/>
<unit id="org.opentest4j" version="0.0.0"/>
<unit id="org.apiguardian" version="0.0.0"/>
<unit id="org.apiguardian.api" version="0.0.0"/>
<unit id="org.objectweb.asm" version="9.5.0"/>
<unit id="io.github.classgraph" version="4.8.149.v20220915-0556"/>
<unit id="org.slf4j.binding.simple" version="0.0.0"/>
<unit id="org.junit" version="4.13.2.v20211018-1956"/>
<unit id="org.junit.jupiter.api" version="0.0.0"/>
<unit id="org.junit.jupiter.engine" version="0.0.0"/>
<unit id="org.junit.jupiter.migrationsupport" version="0.0.0"/>
<unit id="org.junit.jupiter.params" version="0.0.0"/>
<unit id="org.junit.platform.commons" version="0.0.0"/>
<unit id="org.junit.platform.engine" version="0.0.0"/>
<unit id="org.junit.platform.launcher" version="0.0.0"/>
<unit id="org.junit.platform.runner" version="0.0.0"/>
<unit id="org.junit.platform.suite.api" version="0.0.0"/>
<unit id="org.junit.platform.suite.commons" version="0.0.0"/>
<unit id="org.junit.vintage.engine" version="0.0.0"/>
<unit id="junit-jupiter-api" version="0.0.0"/>
<unit id="junit-jupiter-engine" version="0.0.0"/>
<unit id="junit-jupiter-migrationsupport" version="0.0.0"/>
<unit id="junit-jupiter-params" version="0.0.0"/>
<unit id="junit-platform-commons" version="0.0.0"/>
<unit id="junit-platform-engine" version="0.0.0"/>
<unit id="junit-platform-launcher" version="0.0.0"/>
<unit id="junit-platform-runner" version="0.0.0"/>
<unit id="junit-platform-suite-api" version="0.0.0"/>
<unit id="junit-platform-suite-commons" version="0.0.0"/>
<unit id="junit-vintage-engine" version="0.0.0"/>
</location>
<location includeAllPlatforms="false" includeConfigurePhase="false" includeMode="planner" includeSource="true" type="InstallableUnit">
<unit id="org.eclipse.license.feature.group" version="2.0.2.v20181016-2210"/>
Expand Down
24 changes: 12 additions & 12 deletions xtext-r202303.target
Original file line number Diff line number Diff line change
Expand Up @@ -55,22 +55,22 @@
<unit id="org.antlr.runtime" version="3.2.0.v20220404-1927"/>
<unit id="org.aopalliance" version="1.0.0.v20220404-1927"/>
<unit id="org.opentest4j" version="0.0.0"/>
<unit id="org.apiguardian" version="0.0.0"/>
<unit id="org.apiguardian.api" version="0.0.0"/>
<unit id="org.objectweb.asm" version="9.5.0"/>
<unit id="io.github.classgraph" version="4.8.149.v20220915-0556"/>
<unit id="org.slf4j.binding.simple" version="0.0.0"/>
<unit id="org.junit" version="4.13.2.v20211018-1956"/>
<unit id="org.junit.jupiter.api" version="0.0.0"/>
<unit id="org.junit.jupiter.engine" version="0.0.0"/>
<unit id="org.junit.jupiter.migrationsupport" version="0.0.0"/>
<unit id="org.junit.jupiter.params" version="0.0.0"/>
<unit id="org.junit.platform.commons" version="0.0.0"/>
<unit id="org.junit.platform.engine" version="0.0.0"/>
<unit id="org.junit.platform.launcher" version="0.0.0"/>
<unit id="org.junit.platform.runner" version="0.0.0"/>
<unit id="org.junit.platform.suite.api" version="0.0.0"/>
<unit id="org.junit.platform.suite.commons" version="0.0.0"/>
<unit id="org.junit.vintage.engine" version="0.0.0"/>
<unit id="junit-jupiter-api" version="0.0.0"/>
<unit id="junit-jupiter-engine" version="0.0.0"/>
<unit id="junit-jupiter-migrationsupport" version="0.0.0"/>
<unit id="junit-jupiter-params" version="0.0.0"/>
<unit id="junit-platform-commons" version="0.0.0"/>
<unit id="junit-platform-engine" version="0.0.0"/>
<unit id="junit-platform-launcher" version="0.0.0"/>
<unit id="junit-platform-runner" version="0.0.0"/>
<unit id="junit-platform-suite-api" version="0.0.0"/>
<unit id="junit-platform-suite-commons" version="0.0.0"/>
<unit id="junit-vintage-engine" version="0.0.0"/>
</location>
<location includeAllPlatforms="false" includeConfigurePhase="false" includeMode="planner" includeSource="true" type="InstallableUnit">
<unit id="org.eclipse.license.feature.group" version="2.0.2.v20181016-2210"/>
Expand Down

0 comments on commit 0927719

Please sign in to comment.