Skip to content

Commit b43b3fe

Browse files
committed
Add Junit 5 for testing
1 parent c7f63d7 commit b43b3fe

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

build.gradle

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,10 @@ repositories {
2525
mavenCentral()
2626
}
2727

28+
test {
29+
useJUnitPlatform()
30+
}
31+
2832
dependencies {
2933

3034
ext {
@@ -39,6 +43,12 @@ dependencies {
3943
implementation 'org.zeroturnaround:zt-exec:1.12'
4044
implementation 'org.slf4j:slf4j-api:1.7.36'
4145
compileOnly 'junit:junit:4.13.2'
46+
47+
// JUnit 5 (Jupiter) + Mockito JUnit 5 integration
48+
testImplementation 'org.junit.jupiter:junit-jupiter:5.10.2'
49+
testImplementation 'org.mockito:mockito-junit-jupiter:5.12.0'
50+
51+
// Keep existing test utilities
4252
testImplementation 'ch.qos.logback:logback-classic:1.5.13'
4353
testImplementation 'com.sun.jersey:jersey-client:1.19.4'
4454
testImplementation 'com.google.guava:guava:33.0.0-jre'
@@ -50,12 +60,19 @@ dependencies {
5060
testImplementation 'org.eclipse.jetty:jetty-server:9.3.11.v20160721'
5161
testImplementation 'org.skyscreamer:jsonassert:1.5.0'
5262
testImplementation 'org.mockito:mockito-core:4.2.0'
63+
64+
// PowerMock is JUnit 4 only; will continue to run via Vintage for now if needed
5365
testImplementation 'org.powermock:powermock-module-junit4:2.0.9'
66+
67+
// JUnit 4 System Rules (will be migrated to System Lambda in follow-ups)
5468
testImplementation 'com.github.stefanbirkner:system-rules:1.19.0'
69+
5570
testImplementation 'io.projectreactor.ipc:reactor-netty:0.7.15.RELEASE'
5671
testImplementation 'io.projectreactor:reactor-test:3.2.3.RELEASE'
5772
testImplementation 'org.awaitility:awaitility:4.1.1'
5873

74+
// Enable running existing JUnit 4 tests on JUnit Platform during migration
75+
testRuntimeOnly 'org.junit.vintage:junit-vintage-engine:5.10.2'
5976
}
6077

6178
allprojects { subproj ->

0 commit comments

Comments
 (0)