mirror of
https://github.com/Minestom/Minestom.git
synced 2025-02-22 15:22:56 +01:00
Add Junit test suites for isolated unit and integration tests.
This commit is contained in:
parent
3fbdf4f22a
commit
0bd266da23
@ -46,6 +46,8 @@ dependencies {
|
||||
testImplementation(libs.junit.api)
|
||||
testImplementation(libs.junit.params)
|
||||
testRuntimeOnly(libs.junit.engine)
|
||||
testImplementation(libs.junit.suite.api)
|
||||
testRuntimeOnly(libs.junit.suite.engine)
|
||||
// Only here to ensure J9 module support for extensions and our classloaders
|
||||
testCompileOnly(libs.mockito.core)
|
||||
|
||||
|
@ -24,6 +24,7 @@ jcTools = "3.3.0"
|
||||
|
||||
# Test
|
||||
junit-jupiter = "5.8.2"
|
||||
junit-platform = "1.8.2"
|
||||
mockito = "4.2.0"
|
||||
|
||||
# Code Generation
|
||||
@ -77,6 +78,8 @@ jcTools = { group = "org.jctools", name = "jctools-core", version.ref = "jcTools
|
||||
junit-api = { group = "org.junit.jupiter", name = "junit-jupiter-api", version.ref = "junit-jupiter" }
|
||||
junit-engine = { group = "org.junit.jupiter", name = "junit-jupiter-engine", version.ref = "junit-jupiter" }
|
||||
junit-params = { group = "org.junit.jupiter", name = "junit-jupiter-params", version.ref = "junit-jupiter" }
|
||||
junit-suite-api = { group = "org.junit.platform", name = "junit-platform-suite-api", version.ref = "junit-platform" }
|
||||
junit-suite-engine = { group = "org.junit.platform", name = "junit-platform-suite-engine", version.ref = "junit-platform" }
|
||||
mockito-core = { group = "org.mockito", name = "mockito-core", version.ref = "mockito" }
|
||||
|
||||
# Code Generation
|
||||
|
11
src/test/java/IntegrationTests.java
Normal file
11
src/test/java/IntegrationTests.java
Normal file
@ -0,0 +1,11 @@
|
||||
import org.junit.platform.suite.api.IncludeClassNamePatterns;
|
||||
import org.junit.platform.suite.api.SelectPackages;
|
||||
import org.junit.platform.suite.api.Suite;
|
||||
import org.junit.platform.suite.api.SuiteDisplayName;
|
||||
|
||||
@Suite
|
||||
@SuiteDisplayName("Integration Tests")
|
||||
@SelectPackages("net.minestom.server")
|
||||
@IncludeClassNamePatterns(".*IntegrationTest")
|
||||
public class IntegrationTests {
|
||||
}
|
11
src/test/java/UnitTests.java
Normal file
11
src/test/java/UnitTests.java
Normal file
@ -0,0 +1,11 @@
|
||||
import org.junit.platform.suite.api.ExcludeClassNamePatterns;
|
||||
import org.junit.platform.suite.api.SelectPackages;
|
||||
import org.junit.platform.suite.api.Suite;
|
||||
import org.junit.platform.suite.api.SuiteDisplayName;
|
||||
|
||||
@Suite
|
||||
@SuiteDisplayName("Unit Tests")
|
||||
@SelectPackages("net.minestom.server")
|
||||
@ExcludeClassNamePatterns(".*IntegrationTest")
|
||||
public class UnitTests {
|
||||
}
|
Loading…
Reference in New Issue
Block a user