You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by ti...@apache.org on 2019/02/17 12:26:01 UTC

[maven-surefire] branch SUREFIRE-1585-tibor2 updated: [SUREFIRE-1585] Align JUnit Platform version at runtime

This is an automated email from the ASF dual-hosted git repository.

tibordigana pushed a commit to branch SUREFIRE-1585-tibor2
in repository https://gitbox.apache.org/repos/asf/maven-surefire.git


The following commit(s) were added to refs/heads/SUREFIRE-1585-tibor2 by this push:
     new e72bd19  [SUREFIRE-1585] Align JUnit Platform version at runtime
e72bd19 is described below

commit e72bd19e8f823a20f67e52af0912932c9d1f562a
Author: tibordigana <ti...@apache.org>
AuthorDate: Sun Feb 17 13:25:54 2019 +0100

    [SUREFIRE-1585] Align JUnit Platform version at runtime
---
 .../plugin/surefire/AbstractSurefireMojo.java      | 101 +++++++-------
 .../plugin/surefire/AbstractSurefireMojoTest.java  | 155 +++++++++++++++++++++
 .../maven/surefire/its/jiras/Surefire1585IT.java   |  45 ++++++
 .../src/test/resources/surefire-1585/pom.xml       |  54 +++++++
 .../surefire-1585/src/test/java/JupiterTest.java   |  34 +++++
 5 files changed, 335 insertions(+), 54 deletions(-)

diff --git a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/AbstractSurefireMojo.java b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/AbstractSurefireMojo.java
index 7ae7d0f..f986bc1 100644
--- a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/AbstractSurefireMojo.java
+++ b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/AbstractSurefireMojo.java
@@ -480,16 +480,6 @@ public abstract class AbstractSurefireMojo
     private String junitArtifactName;
 
     /**
-     * Allows you to select the name of JUnit5 engine.<br>
-     * If not set, all engines on classpath are used. In normal circumstances the provider is able to
-     * work with multiple engines and no selection is needed to make.
-     *
-     * @since 2.22.0
-     */
-    @Parameter( property = "junitPlatformArtifactName", defaultValue = "org.junit.platform:junit-platform-commons" )
-    private String junitPlatformArtifactName;
-
-    /**
      * Allows you to specify the name of the TestNG artifact. If not set, {@code org.testng:testng} will be used.
      *
      * @since 2.3.1
@@ -2136,11 +2126,13 @@ public abstract class AbstractSurefireMojo
 
     private Artifact getJunitPlatformArtifact()
     {
-        Artifact artifact = getProjectArtifactMap().get( getJunitPlatformArtifactName() );
+        Artifact artifact = getProjectArtifactMap().get( "org.junit.platform:junit-platform-commons" );
         Artifact projectArtifact = project.getArtifact();
-        String projectArtifactName = projectArtifact.getGroupId() + ":" + projectArtifact.getArtifactId();
+        String projectGroupId = projectArtifact.getGroupId();
 
-        if ( artifact == null && projectArtifactName.equals( getJunitPlatformArtifactName() ) )
+        if ( artifact == null && ( "org.junit.platform".equals( projectGroupId )
+                || "org.junit.jupiter".equals( projectGroupId )
+                || "org.junit.vintage".equals( projectGroupId ) ) )
         {
             artifact = projectArtifact;
         }
@@ -2918,45 +2910,58 @@ public abstract class AbstractSurefireMojo
             Map<String, Artifact> providerArtifacts =
                     dependencyResolver.getProviderClasspathAsMap( "surefire-junit-platform", surefireVersion );
             Map<String, Artifact> testDependencies = testClasspath.getTestDependencies();
-            if ( hasDependencyPlatformEngine( testDependencies ) )
-            {
-                String filterTestDependency = "org.junit.platform:junit-platform-engine";
-                logDebugOrCliShowErrors( "Test dependencies contain " + filterTestDependency );
-                narrowProviderDependencies( filterTestDependency, providerArtifacts, testDependencies );
-            }
-            else if ( hasDependencyPlatformCommons( testDependencies ) )
-            {
-                String filterTestDependency = "org.junit.platform:junit-platform-commons";
-                logDebugOrCliShowErrors( "Test dependencies contain " + filterTestDependency );
-                narrowProviderDependencies( filterTestDependency, providerArtifacts, testDependencies );
-            }
-            else if ( hasDependencyJupiterAPI( testDependencies ) )
+            if ( hasDependencyJupiterAPI( testDependencies ) )
             {
-                String api = "org.junit.jupiter:junit-jupiter-api";
                 String engineGroupId = "org.junit.jupiter";
                 String engineArtifactId = "junit-jupiter-engine";
-                String version = testDependencies.get( api ).getBaseVersion();
-                addEngineByApi( api, engineGroupId, engineArtifactId, providerArtifacts, testDependencies );
-                alignVersions( version, providerArtifacts, testDependencies );
+                String engineCoordinates = engineGroupId + ":" + engineArtifactId;
+                if ( testDependencies.containsKey( engineCoordinates ) )
+                {
+                    narrowProviderDependencies( engineCoordinates, providerArtifacts, testDependencies );
+                }
+                else
+                {
+                    String api = "org.junit.jupiter:junit-jupiter-api";
+                    logDebugOrCliShowErrors( "Test dependencies contain " + api + ". Resolving " + engineCoordinates );
+                    String engineVersion = testDependencies.get( api ).getBaseVersion();
+                    addEngineByApi( engineGroupId, engineArtifactId, engineVersion,
+                            providerArtifacts, testDependencies );
+                }
+            }
+            else
+            {
+                String filterTestDependency = null;
+                if ( hasDependencyPlatformEngine( testDependencies ) )
+                {
+                    filterTestDependency = "org.junit.platform:junit-platform-engine";
+                }
+                else if ( hasDependencyPlatformCommons( testDependencies ) )
+                {
+                    filterTestDependency = "org.junit.platform:junit-platform-commons";
+                }
+
+                if ( filterTestDependency != null )
+                {
+                    logDebugOrCliShowErrors( "Test dependencies contain " + filterTestDependency );
+                    narrowProviderDependencies( filterTestDependency, providerArtifacts, testDependencies );
+                }
             }
             return new LinkedHashSet<>( providerArtifacts.values() );
         }
 
-        private void addEngineByApi( String api,
-                                     String engineGroupId, String engineArtifactId,
-                                     Map<String, Artifact> providerArtifacts,
-                                     Map<String, Artifact> testDependencies )
+        private void addEngineByApi( String engineGroupId, String engineArtifactId, String engineVersion,
+                                     Map<String, Artifact> providerArtifacts, Map<String, Artifact> testDependencies )
         {
-            String version = testDependencies.get( api ).getBaseVersion();
-            narrowProviderDependencies( api, providerArtifacts, testDependencies );
-            for ( Artifact dep : resolve( engineGroupId, engineArtifactId, version, null, "jar" ) )
+            providerArtifacts.keySet().removeAll( testDependencies.keySet() );
+            for ( Artifact dep : resolve( engineGroupId, engineArtifactId, engineVersion, null, "jar" ) )
             {
                 String key = dep.getGroupId() + ":" + dep.getArtifactId();
-                if ( testDependencies.remove( key ) != null )
+                if ( !testDependencies.containsKey( key ) )
                 {
                     providerArtifacts.put( key, dep );
                 }
             }
+            alignVersions( providerArtifacts, testDependencies );
         }
 
         private void narrowProviderDependencies( String filterTestDependency,
@@ -2975,17 +2980,16 @@ public abstract class AbstractSurefireMojo
                 logDebugOrCliShowErrors( "Removed artifact " + engineDep
                         + " from provider. Already appears in test classpath." );
             }
-            alignVersions( version, providerArtifacts, testDependencies );
+            alignVersions( providerArtifacts, testDependencies );
         }
 
-        private void alignVersions( String version,
-                                    Map<String, Artifact> providerArtifacts,
-                                    Map<String, Artifact> testDependencies )
+        private void alignVersions( Map<String, Artifact> providerArtifacts, Map<String, Artifact> testDependencies )
         {
+            String version = testDependencies.get( "org.junit.platform:junit-platform-commons" ).getBaseVersion();
             for ( Artifact launcherArtifact : resolve( PROVIDER_DEP_GID, PROVIDER_DEP_AID, version, null, "jar" ) )
             {
                 String key = launcherArtifact.getGroupId() + ":" + launcherArtifact.getArtifactId();
-                if ( !testDependencies.containsKey( key ) )
+                if ( providerArtifacts.containsKey( key ) )
                 {
                     providerArtifacts.put( key, launcherArtifact );
                 }
@@ -3426,17 +3430,6 @@ public abstract class AbstractSurefireMojo
         this.junitArtifactName = junitArtifactName;
     }
 
-    public String getJunitPlatformArtifactName()
-    {
-        return junitPlatformArtifactName;
-    }
-
-    @SuppressWarnings( "UnusedDeclaration" )
-    public void setJunitPlatformArtifactName( String junitPlatformArtifactName )
-    {
-        this.junitPlatformArtifactName = junitPlatformArtifactName;
-    }
-
     public String getTestNGArtifactName()
     {
         return testNGArtifactName;
diff --git a/maven-surefire-common/src/test/java/org/apache/maven/plugin/surefire/AbstractSurefireMojoTest.java b/maven-surefire-common/src/test/java/org/apache/maven/plugin/surefire/AbstractSurefireMojoTest.java
index 6e7f6c7..68a7e3e 100644
--- a/maven-surefire-common/src/test/java/org/apache/maven/plugin/surefire/AbstractSurefireMojoTest.java
+++ b/maven-surefire-common/src/test/java/org/apache/maven/plugin/surefire/AbstractSurefireMojoTest.java
@@ -720,6 +720,143 @@ public class AbstractSurefireMojoTest
                         entry( "org.opentest4j:opentest4j", testClasspathOpentest4j ) );
     }
 
+    @Test
+    public void shouldSmartlyResolveJUnit5ProviderWithJupiterApi() throws Exception
+    {
+        final VersionRange surefireVersion = createFromVersion( "1" );
+
+        Artifact junitPlatformArtifact = new DefaultArtifact( "org.apache.maven.surefire",
+                "surefire-junit-platform", surefireVersion, null, "jar", null, mock( ArtifactHandler.class ) );
+
+        final Artifact testClasspathSomeTestArtifact = new DefaultArtifact( "third.party", "artifact",
+                createFromVersion( "1.0" ), null, "jar", null, mock( ArtifactHandler.class ) );
+
+        final Artifact testClasspathJupiterApi = new DefaultArtifact( "org.junit.jupiter", "junit-jupiter-api",
+                createFromVersion( "5.4.0" ), null, "jar", null, mock( ArtifactHandler.class ) );
+
+        final Artifact testClasspathApiguardian = new DefaultArtifact( "org.apiguardian", "apiguardian-api",
+                createFromVersion( "1.0.0" ), null, "jar", null, mock( ArtifactHandler.class ) );
+
+        final Artifact testClasspathCommons = new DefaultArtifact( "org.junit.platform", "junit-platform-commons",
+                createFromVersion( "1.4.0" ), null, "jar", null, mock( ArtifactHandler.class ) );
+
+        final Artifact testClasspathOpentest4j = new DefaultArtifact( "org.opentest4j", "opentest4j",
+                createFromVersion( "1.1.1" ), null, "jar", null, mock( ArtifactHandler.class ) );
+
+        Iterable<Artifact> testArtifacts = asList( testClasspathSomeTestArtifact, testClasspathJupiterApi,
+                testClasspathApiguardian, testClasspathCommons, testClasspathOpentest4j );
+
+        File classesDirectory = new File( "target/classes" );
+
+        File testClassesDirectory = new File( "target/test-classes" );
+
+        TestClassPath testClasspathWrapper =
+                new TestClassPath( testArtifacts, classesDirectory, testClassesDirectory, null );
+
+        Artifact forkedBooter = new DefaultArtifact( "org.apache.maven.surefire",
+                "surefire-booter", surefireVersion, null, "jar", null, mock( ArtifactHandler.class ) );
+
+        mojo.setPluginArtifactMap( singletonMap( "org.apache.maven.surefire:surefire-booter", forkedBooter ) );
+        mojo.setRemoteRepositories( Collections.<ArtifactRepository>emptyList() );
+        mojo.setProjectRemoteRepositories( Collections.<ArtifactRepository>emptyList() );
+        RepositorySystem repositorySystem = mock( RepositorySystem.class );
+        final Artifact surefireProvider = new DefaultArtifact( "org.apache.maven.surefire",
+                "surefire-junit-platform", surefireVersion, null, "jar", null, mock( ArtifactHandler.class ) );
+        when( repositorySystem.createDependencyArtifact( any( Dependency.class ) ) ).thenAnswer( new Answer<Artifact>()
+        {
+            @Override
+            public Artifact answer( InvocationOnMock invocation )
+            {
+                Dependency provider = (Dependency) invocation.getArguments()[0];
+                assertThat( provider.getGroupId() ).isEqualTo( "org.apache.maven.surefire" );
+                assertThat( provider.getArtifactId() ).isEqualTo( "surefire-junit-platform" );
+                return surefireProvider;
+            }
+        } );
+
+        when( repositorySystem.resolve( any( ArtifactResolutionRequest.class ) ) )
+                .thenAnswer( new Answer<ArtifactResolutionResult>()
+                {
+                    @Override
+                    public ArtifactResolutionResult answer( InvocationOnMock invocation )
+                    {
+                        ArtifactResolutionRequest req = (ArtifactResolutionRequest) invocation.getArguments()[0];
+                        Artifact resolvable = req.getArtifact();
+                        if ( resolvable == surefireProvider )
+                        {
+                            return createSurefireProviderResolutionResult( surefireVersion );
+                        }
+                        else if ( resolvable.equals( testClasspathJupiterApi )  )
+                        {
+                            return createTestClasspathCommonsResolutionResult( null,
+                                    testClasspathJupiterApi, testClasspathApiguardian, testClasspathCommons,
+                                    testClasspathOpentest4j );
+                        }
+                        else if ( "org.junit.platform".equals( resolvable.getGroupId() )
+                                && "junit-platform-launcher".equals( resolvable.getArtifactId() )
+                                && "1.4.0".equals( resolvable.getVersion() ) )
+                        {
+
+                            Artifact jupiterApi = new DefaultArtifact( "org.junit.platform", "junit-platform-engine",
+                                    createFromVersion( "1.4.0" ), null, "jar", null, mock( ArtifactHandler.class ) );
+
+                            Artifact apiguardian = new DefaultArtifact( "org.apiguardian", "apiguardian-api",
+                                    createFromVersion( "1.0.0" ), null, "jar", null, mock( ArtifactHandler.class ) );
+
+                            Artifact commons = new DefaultArtifact( "org.junit.platform", "junit-platform-commons",
+                                    createFromVersion( "1.4.0" ), null, "jar", null, mock( ArtifactHandler.class ) );
+
+                            final Artifact opentest4j = new DefaultArtifact( "org.opentest4j", "opentest4j",
+                                    createFromVersion( "1.1.1" ), null, "jar", null, mock( ArtifactHandler.class ) );
+
+                            return createJUnitPlatformLauncherResolutionResult(
+                                    jupiterApi, apiguardian, commons, opentest4j );
+                        }
+                        else if ( "org.junit.jupiter".equals( resolvable.getGroupId() )
+                                && "junit-jupiter-engine".equals( resolvable.getArtifactId() )
+                                && "5.4.0".equals( resolvable.getVersion() ) )
+                        {
+                            Artifact jupiterApi = new DefaultArtifact( "org.junit.jupiter", "junit-jupiter-api",
+                                    createFromVersion( "5.4.0" ), null, "jar", null, mock( ArtifactHandler.class ) );
+                            return createJupiterEngineResolutionResult( jupiterApi );
+                        }
+                        else
+                        {
+                            fail();
+                            return null;
+                        }
+                    }
+                } );
+
+        mojo.setRepositorySystem( repositorySystem );
+        mojo.setLogger( mock( Logger.class ) );
+
+        invokeMethod( mojo, "setupStuff" );
+        JUnitPlatformProviderInfo prov =
+                mojo.createJUnitPlatformProviderInfo( junitPlatformArtifact, testClasspathWrapper );
+        Set<Artifact> resolvedProviderArtifacts = prov.getProviderClasspath();
+
+        Artifact java5 = new DefaultArtifact( "org.apache.maven.surefire", "common-java5",
+                surefireVersion, null, "jar", null, mock( ArtifactHandler.class ) );
+        Artifact launcher = new DefaultArtifact( "org.junit.platform", "junit-platform-launcher",
+                createFromVersion( "1.4.0" ), null, "jar", null, mock( ArtifactHandler.class ) );
+        Artifact jupiterEngine = new DefaultArtifact( "org.junit.jupiter", "junit-jupiter-engine",
+                createFromVersion( "5.4.0" ), null, "jar", null, mock( ArtifactHandler.class ) );
+        Artifact platformEngine = new DefaultArtifact( "org.junit.platform", "junit-platform-engine",
+                createFromVersion( "1.4.0" ), null, "jar", null, mock( ArtifactHandler.class ) );
+        assertThat( resolvedProviderArtifacts )
+                .hasSize( 5 )
+                .containsOnly( surefireProvider, java5, launcher, jupiterEngine, platformEngine );
+
+        assertThat( testClasspathWrapper.getTestDependencies() )
+                .hasSize( 5 )
+                .includes( entry( "third.party:artifact", testClasspathSomeTestArtifact ),
+                        entry( "org.junit.jupiter:junit-jupiter-api", testClasspathJupiterApi ),
+                        entry( "org.apiguardian:apiguardian-api", testClasspathApiguardian ),
+                        entry( "org.junit.platform:junit-platform-commons", testClasspathCommons ),
+                        entry( "org.opentest4j:opentest4j", testClasspathOpentest4j ) );
+    }
+
     private static ArtifactResolutionResult createJUnitPlatformLauncherResolutionResult(
             Artifact junit5Engine, Artifact apiguardian, Artifact commons, Artifact opentest4j )
     {
@@ -738,6 +875,24 @@ public class AbstractSurefireMojoTest
         return launcherResolutionResult;
     }
 
+    private static ArtifactResolutionResult createJupiterEngineResolutionResult( Artifact jupiterApi )
+    {
+        ArtifactResolutionResult launcherResolutionResult = mock( ArtifactResolutionResult.class );
+        Set<Artifact> resolvedLauncherArtifacts = new HashSet<>();
+        resolvedLauncherArtifacts.add( new DefaultArtifact( "org.junit.jupiter", "junit-jupiter-engine",
+                jupiterApi.getVersionRange(), null, "jar", null, mock( ArtifactHandler.class ) ) );
+        resolvedLauncherArtifacts.add( jupiterApi );
+        resolvedLauncherArtifacts.add( new DefaultArtifact( "org.apiguardian", "apiguardian-api",
+                createFromVersion( "1.0.0" ), null, "jar", null, mock( ArtifactHandler.class ) ) );
+        resolvedLauncherArtifacts.add( new DefaultArtifact( "org.opentest4j", "opentest4j",
+                createFromVersion( "1.1.1" ), null, "jar", null, mock( ArtifactHandler.class ) ) );
+        resolvedLauncherArtifacts.add( new DefaultArtifact( "org.junit.platform", "junit-platform-commons",
+                createFromVersion( "1.4.0" ), null, "jar", null, mock( ArtifactHandler.class ) ) );
+        when( launcherResolutionResult.getArtifacts() )
+                .thenReturn( resolvedLauncherArtifacts );
+        return launcherResolutionResult;
+    }
+
     private static ArtifactResolutionResult createExpectedJUnitPlatformLauncherResolutionResult()
     {
         Artifact engine = new DefaultArtifact( "org.junit.platform", "junit-platform-engine",
diff --git a/surefire-its/src/test/java/org/apache/maven/surefire/its/jiras/Surefire1585IT.java b/surefire-its/src/test/java/org/apache/maven/surefire/its/jiras/Surefire1585IT.java
new file mode 100644
index 0000000..4b852b7
--- /dev/null
+++ b/surefire-its/src/test/java/org/apache/maven/surefire/its/jiras/Surefire1585IT.java
@@ -0,0 +1,45 @@
+package org.apache.maven.surefire.its.jiras;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import org.apache.maven.surefire.its.fixture.SurefireJUnit4IntegrationTestCase;
+import org.junit.Before;
+import org.junit.Test;
+
+import static org.apache.maven.surefire.its.fixture.HelperAssertions.assumeJavaVersion;
+
+public class Surefire1585IT
+        extends SurefireJUnit4IntegrationTestCase
+{
+    @Before
+    public void setUp()
+    {
+        assumeJavaVersion( 1.8d );
+    }
+
+    @Test
+    public void shouldRunWithJupiterApi()
+    {
+        unpack( "surefire-1585" )
+                .debugLogging()
+                .executeTest()
+                .verifyErrorFree( 1 );
+    }
+}
diff --git a/surefire-its/src/test/resources/surefire-1585/pom.xml b/surefire-its/src/test/resources/surefire-1585/pom.xml
new file mode 100644
index 0000000..c7975b6
--- /dev/null
+++ b/surefire-its/src/test/resources/surefire-1585/pom.xml
@@ -0,0 +1,54 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements.  See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership.  The ASF licenses this file
+  ~ to you under the Apache License, Version 2.0 (the
+  ~ "License"); you may not use this file except in compliance
+  ~ with the License.  You may obtain a copy of the License at
+  ~
+  ~     http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing,
+  ~ software distributed under the License is distributed on an
+  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~ KIND, either express or implied.  See the License for the
+  ~ specific language governing permissions and limitations
+  ~ under the License.
+  -->
+
+<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 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <groupId>org.apache.maven.plugins.surefire</groupId>
+    <artifactId>junit-jupiter-api-it</artifactId>
+    <version>1.0</version>
+
+    <properties>
+        <maven.compiler.source>1.8</maven.compiler.source>
+        <maven.compiler.target>1.8</maven.compiler.target>
+        <junit.jupiter.version>5.4.0</junit.jupiter.version>
+    </properties>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.junit.jupiter</groupId>
+            <artifactId>junit-jupiter-api</artifactId>
+            <version>${junit.jupiter.version}</version>
+            <scope>test</scope>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-surefire-plugin</artifactId>
+                <version>${surefire.version}</version>
+            </plugin>
+        </plugins>
+    </build>
+</project>
diff --git a/surefire-its/src/test/resources/surefire-1585/src/test/java/JupiterTest.java b/surefire-its/src/test/resources/surefire-1585/src/test/java/JupiterTest.java
new file mode 100644
index 0000000..26dbeca
--- /dev/null
+++ b/surefire-its/src/test/resources/surefire-1585/src/test/java/JupiterTest.java
@@ -0,0 +1,34 @@
+package junitplatformenginejupiter;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
+
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.TestInfo;
+
+class JupiterTest
+{
+    @Test
+    void test( TestInfo info )
+    {
+        assertEquals( "test(TestInfo)", info.getDisplayName(), "display name mismatch" );
+    }
+}