Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MSHARED-1152] - Migrate tests to JUnit5 #56

Merged
merged 6 commits into from
Oct 25, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 14 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,18 @@ under the License.
<project.build.outputTimestamp>2022-04-05T18:45:23Z</project.build.outputTimestamp>
</properties>

<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.junit</groupId>
<artifactId>junit-bom</artifactId>
<version>5.9.1</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>

<dependencies>
<dependency>
<groupId>org.apache.maven.shared</groupId>
Expand All @@ -84,9 +96,8 @@ under the License.
<version>1</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.13.2</version>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
*/

import java.io.File;
import java.io.IOException;
import java.net.URI;
import java.net.URISyntaxException;
import java.net.URL;
Expand All @@ -30,9 +29,9 @@

import org.apache.maven.shared.utils.Os;
import org.apache.maven.shared.utils.StringUtils;
import org.junit.Test;
import org.junit.jupiter.api.Test;

import static org.junit.Assert.assertEquals;
import static org.junit.jupiter.api.Assertions.assertEquals;

public class DefaultInvokerTest
{
Expand Down Expand Up @@ -121,7 +120,7 @@ public void testSpacePom()
request.setDebug( true );
request.setGoals( Collections.singletonList( "clean" ) );
request.setProperties( getProperties() );

InvocationResult result = invoker.execute( request );

assertEquals( 0, result.getExitCode() );
Expand Down Expand Up @@ -344,7 +343,7 @@ private void logTestStart()

System.out.println( "Starting: " + element.getMethodName() );
}

private Properties getProperties()
{
Properties properties = new Properties();
Expand All @@ -353,7 +352,7 @@ private Properties getProperties()
properties.put( "maven.compiler.source", "1.7" );
properties.put( "maven.compiler.target", "1.7" );
}

String httpProtocols = System.getProperty( "https.protocols" );
if ( httpProtocols != null )
{
Expand Down
Loading