forked from arquillian/smart-testing
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(arquillian#278): if custom surefire provider is specified then th…
…e logic is delegated to it and known providers resolution is skipped
- Loading branch information
1 parent
38c8f11
commit 009eead
Showing
28 changed files
with
526 additions
and
226 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<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"> | ||
<parent> | ||
<artifactId>smart-testing-parent</artifactId> | ||
<groupId>org.arquillian.smart.testing</groupId> | ||
<version>0.0.6-SNAPSHOT</version> | ||
</parent> | ||
<modelVersion>4.0.0</modelVersion> | ||
|
||
<artifactId>known-surefire-providers</artifactId> | ||
|
||
</project> |
46 changes: 46 additions & 0 deletions
46
...rs/src/main/java/org/arquillian/smart/testing/known/surefire/providers/KnownProvider.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
package org.arquillian.smart.testing.known.surefire.providers; | ||
|
||
public enum KnownProvider { | ||
|
||
JUNIT_4( | ||
"org.apache.maven.surefire", | ||
"surefire-junit4", | ||
"org.apache.maven.surefire.junit4.JUnit4Provider"), | ||
|
||
JUNIT_47( | ||
"org.apache.maven.surefire", | ||
"surefire-junit47", | ||
"org.apache.maven.surefire.junitcore.JUnitCoreProvider"), | ||
|
||
JUNIT_5( | ||
"org.junit.platform", | ||
"junit-platform-surefire-provider", | ||
"org.junit.platform.surefire.provider.JUnitPlatformProvider"), | ||
|
||
TESTNG( | ||
"org.apache.maven.surefire", | ||
"surefire-testng", | ||
"org.apache.maven.surefire.testng.TestNGProvider"); | ||
|
||
private final String groupId; | ||
private final String artifactId; | ||
private final String providerClassName; | ||
|
||
KnownProvider(String groupId, String artifactId, String providerClassName) { | ||
this.groupId = groupId; | ||
this.artifactId = artifactId; | ||
this.providerClassName = providerClassName; | ||
} | ||
|
||
public String getGroupId() { | ||
return groupId; | ||
} | ||
|
||
public String getArtifactId() { | ||
return artifactId; | ||
} | ||
|
||
public String getProviderClassName() { | ||
return providerClassName; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
...in/java/org/arquillian/smart/testing/mvn/ext/dependencies/SurefireProviderDependency.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
package org.arquillian.smart.testing.mvn.ext.dependencies; | ||
|
||
import org.apache.maven.model.Dependency; | ||
|
||
class SurefireProviderDependency { | ||
|
||
private final Dependency dependency; | ||
private final SurefireProviderResolver.SurefireProviderDefinition provider; | ||
|
||
SurefireProviderDependency(Dependency dependency, SurefireProviderResolver.SurefireProviderDefinition provider) { | ||
this.dependency = dependency; | ||
this.provider = provider; | ||
} | ||
|
||
String getGAV(){ | ||
return String.join(":", dependency.getGroupId(), dependency.getArtifactId(), dependency.getVersion()); | ||
} | ||
|
||
String getProviderClassName() { | ||
return provider.getProviderClassName(); | ||
} | ||
|
||
Dependency getDependency() { | ||
return dependency; | ||
} | ||
} |
Oops, something went wrong.