-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Reproduce #54 * Dispatcher: Use NestedSuiteSelector / NestedTestSelector (SBT 1.3) * Configuration: test identifier: filter out identifiers not containing source - e.g. the platform (skipped by path.stream().skip(1) - e.g. for JUnit 5 suites the engine used to start the test in the test suite * TaskName: remove JUnit 5 suite name if present, add tests * Adjust the expected value --------- Co-authored-by: H. Habighorst <h.habighorst@protonmail.com>
- Loading branch information
Showing
11 changed files
with
91 additions
and
56 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,13 @@ | ||
val junit = Def.setting { "org.junit.jupiter" % "junit-jupiter-api" % JupiterKeys.junitJupiterVersion.value } | ||
val junitEngine = Def.setting { "org.junit.jupiter" % "junit-jupiter-engine" % JupiterKeys.junitJupiterVersion.value } | ||
val junitRunner = Def.setting { "org.junit.platform" % "junit-platform-runner" % JupiterKeys.junitPlatformVersion.value } | ||
val junitSuiteEngine = Def.setting { "org.junit.platform" % "junit-platform-suite-engine" % JupiterKeys.junitPlatformVersion.value } | ||
|
||
name := "test-project" | ||
libraryDependencies ++= Seq( | ||
junit.value % Test, | ||
junitEngine.value % Test, | ||
junitRunner.value % Test, | ||
junitSuiteEngine.value % Test, | ||
"com.github.sbt.junit" % "jupiter-interface" % JupiterKeys.jupiterVersion.value % Test, | ||
) |
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 @@ | ||
addSbtPlugin("com.github.sbt.junit" % "sbt-jupiter-interface" % sys.props("project.version")) |
7 changes: 7 additions & 0 deletions
7
src/plugin/src/sbt-test/basic/suite-demo/src/main/java/example/foo/A.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,7 @@ | ||
package example.foo; | ||
|
||
public class A { | ||
public static String get() { | ||
return "Test"; | ||
} | ||
} |
12 changes: 12 additions & 0 deletions
12
src/plugin/src/sbt-test/basic/suite-demo/src/test/java/example/TestSuite.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,12 @@ | ||
package example; | ||
|
||
import org.junit.platform.suite.api.IncludeClassNamePatterns; | ||
import org.junit.platform.suite.api.SelectPackages; | ||
import org.junit.platform.suite.api.Suite; | ||
|
||
@Suite | ||
@SelectPackages("example.foo") | ||
@IncludeClassNamePatterns({".*Test"}) | ||
public class TestSuite { | ||
|
||
} |
14 changes: 14 additions & 0 deletions
14
src/plugin/src/sbt-test/basic/suite-demo/src/test/java/example/foo/ATest.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,14 @@ | ||
package example.foo; | ||
|
||
import static org.junit.jupiter.api.Assertions.assertEquals; | ||
|
||
import org.junit.jupiter.api.Test; | ||
|
||
class ATest { | ||
|
||
@Test | ||
void testGet() { | ||
assertEquals("Test", A.get()); | ||
} | ||
|
||
} |
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 @@ | ||
> test |