diff --git a/.github/actions/main-build/action.yml b/.github/actions/main-build/action.yml
index 4b51887efcd8..a7817cd314f0 100644
--- a/.github/actions/main-build/action.yml
+++ b/.github/actions/main-build/action.yml
@@ -12,7 +12,7 @@ runs:
- uses: ./.github/actions/run-gradle
with:
arguments: ${{ inputs.arguments }}
- - uses: actions/upload-artifact@v2
+ - uses: actions/upload-artifact@v3
if: ${{ always() }}
with:
name: Test Distribution trace files (${{ github.job }})
diff --git a/.github/actions/run-gradle/action.yml b/.github/actions/run-gradle/action.yml
index cdd702d0a0ab..501393593a6c 100644
--- a/.github/actions/run-gradle/action.yml
+++ b/.github/actions/run-gradle/action.yml
@@ -8,7 +8,7 @@ inputs:
runs:
using: "composite"
steps:
- - uses: actions/setup-java@v2
+ - uses: actions/setup-java@v3
id: setup-gradle-jdk
with:
distribution: temurin
diff --git a/.github/actions/setup-test-jdk/action.yml b/.github/actions/setup-test-jdk/action.yml
index 8dc70985295b..4e8c96266c69 100644
--- a/.github/actions/setup-test-jdk/action.yml
+++ b/.github/actions/setup-test-jdk/action.yml
@@ -3,7 +3,7 @@ description: Sets up the JDK required to run platform-tooling-support-tests
runs:
using: "composite"
steps:
- - uses: actions/setup-java@v2
+ - uses: actions/setup-java@v3
with:
distribution: temurin
java-version: 8
diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml
index 3d2321519793..222d54f252fd 100644
--- a/.github/workflows/codeql-analysis.yml
+++ b/.github/workflows/codeql-analysis.yml
@@ -19,14 +19,17 @@ jobs:
strategy:
fail-fast: false
matrix:
- language: ['java', 'javascript']
+ language:
+ - java
+ - javascript
steps:
- name: Check out repository
- uses: actions/checkout@v2
+ uses: actions/checkout@v3
- name: Initialize CodeQL
- uses: github/codeql-action/init@v1
+ uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
+ tools: latest
- name: Build
uses: ./.github/actions/run-gradle
with:
@@ -35,4 +38,4 @@ jobs:
-Dscan.tag.CodeQL
allMainClasses
- name: Perform CodeQL Analysis
- uses: github/codeql-action/analyze@v1
+ uses: github/codeql-action/analyze@v2
diff --git a/.github/workflows/cross-version.yml b/.github/workflows/cross-version.yml
index fcea6360c17a..a6a6e0c3fde0 100644
--- a/.github/workflows/cross-version.yml
+++ b/.github/workflows/cross-version.yml
@@ -18,13 +18,14 @@ env:
jobs:
openjdk:
strategy:
+ fail-fast: false
matrix:
- jdk: [18, 19, 20]
+ jdk: [19, 20, 21]
name: "OpenJDK ${{ matrix.jdk }}"
runs-on: ubuntu-latest
steps:
- name: Check out repository
- uses: actions/checkout@v2
+ uses: actions/checkout@v3
with:
fetch-depth: 1
- name: Set up Test JDK
@@ -46,7 +47,7 @@ jobs:
-Dscan.tag.JDK_${{ matrix.jdk }}
build
- name: Upload Test Distribution trace files
- uses: actions/upload-artifact@v2
+ uses: actions/upload-artifact@v3
with:
- name: Test Distribution trace files
+ name: "Test Distribution trace files (OpenJDK ${{ matrix.jdk }})"
path: '**/build/test-results/*/trace.json'
diff --git a/.github/workflows/gradle-wrapper-validation.yml b/.github/workflows/gradle-wrapper-validation.yml
index ce98fe801382..b41829549ff3 100644
--- a/.github/workflows/gradle-wrapper-validation.yml
+++ b/.github/workflows/gradle-wrapper-validation.yml
@@ -7,7 +7,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check out repository
- uses: actions/checkout@v2
+ uses: actions/checkout@v3
with:
fetch-depth: 1
- name: Validate Gradle wrapper
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index f7a7ef835937..b1e40cf13fbe 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -20,7 +20,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check out repository
- uses: actions/checkout@v2
+ uses: actions/checkout@v3
with:
fetch-depth: 1
- name: Install Graphviz
@@ -43,13 +43,13 @@ jobs:
jacocoRootReport
prepareDocsForUploadToGhPages
- name: Upload to Codecov.io
- uses: codecov/codecov-action@v2
+ uses: codecov/codecov-action@v3
Windows:
runs-on: windows-latest
steps:
- name: Check out repository
- uses: actions/checkout@v2
+ uses: actions/checkout@v3
with:
fetch-depth: 1
- name: Build
@@ -59,7 +59,7 @@ jobs:
runs-on: macos-latest
steps:
- name: Check out repository
- uses: actions/checkout@v2
+ uses: actions/checkout@v3
with:
fetch-depth: 1
- name: Build
@@ -72,7 +72,7 @@ jobs:
if: github.event_name == 'push' && github.repository == 'junit-team/junit5' && (startsWith(github.ref, 'refs/heads/releases/') || github.ref == 'refs/heads/main')
steps:
- name: Check out repository
- uses: actions/checkout@v2
+ uses: actions/checkout@v3
with:
fetch-depth: 1
- name: Publish
@@ -85,12 +85,15 @@ jobs:
update_documentation:
name: Update Snapshot Documentation
- needs: linux
+ concurrency:
+ group: github-pages
+ cancel-in-progress: true
+ needs: Linux
runs-on: ubuntu-latest
if: github.event_name == 'push' && github.repository == 'junit-team/junit5' && github.ref == 'refs/heads/main'
steps:
- name: Check out repository
- uses: actions/checkout@v2
+ uses: actions/checkout@v3
with:
fetch-depth: 1
- name: Install Graphviz
diff --git a/.github/workflows/reproducible-build.yml b/.github/workflows/reproducible-build.yml
index 3a9d1fe3267f..3327cc7fb47b 100644
--- a/.github/workflows/reproducible-build.yml
+++ b/.github/workflows/reproducible-build.yml
@@ -18,7 +18,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check out repository
- uses: actions/checkout@v2
+ uses: actions/checkout@v3
with:
fetch-depth: 1
- name: Restore Gradle cache and display toolchains
diff --git a/README.md b/README.md
index ecf74ef5e4d5..59318bd5bb92 100644
--- a/README.md
+++ b/README.md
@@ -6,7 +6,7 @@ This repository is the home of the next generation of JUnit, _JUnit 5_.
## Latest Releases
-- General Availability (GA): [JUnit 5.9.1](https://github.com/junit-team/junit5/releases/tag/r5.9.1) (September 20, 2022)
+- General Availability (GA): [JUnit 5.9.3](https://github.com/junit-team/junit5/releases/tag/r5.9.3) (April 26, 2023)
- Preview (Milestone/Release Candidate): n/a
## Documentation
@@ -43,7 +43,7 @@ builds of the next OpenJDK.
Code coverage using [JaCoCo] for the latest build is available on [Codecov].
A code coverage report can also be generated locally via the [Gradle Wrapper] by
-executing `gradlew -PenableJaCoCo clean jacocoRootReport`. The results will be available
+executing `./gradlew -PenableJaCoCo clean jacocoRootReport`. The results will be available
in `build/reports/jacoco/jacocoRootReport/html/index.html`.
## Gradle Enterprise
@@ -65,23 +65,16 @@ task outputs from previous CI builds.
You need [JDK 17] to build JUnit 5. [Gradle toolchains] are used to detect and
potentially download additional JDKs for compilation and test execution.
-All modules can be _built_ with the [Gradle Wrapper] using the following command.
+All modules can be _built_ and _tested_ with the [Gradle Wrapper] using the following command.
-`gradlew clean assemble`
-
-All modules can be _tested_ with the [Gradle Wrapper] using the following command.
-
-`gradlew clean test`
-
-Since Gradle has excellent incremental build support, you can usually omit executing the
-`clean` task.
+`./gradlew build`
## Installing in Local Maven Repository
All modules can be _installed_ with the [Gradle Wrapper] in a local Maven repository for
consumption in other projects via the following command.
-`gradlew clean publishToMavenLocal`
+`./gradlew publishToMavenLocal`
## Dependency Metadata
@@ -100,7 +93,7 @@ See also for releases and
[Gradle Wrapper]: https://docs.gradle.org/current/userguide/gradle_wrapper.html#sec:using_wrapper
[JaCoCo]: https://www.eclemma.org/jacoco/
[Javadoc]: https://junit.org/junit5/docs/current/api/
-[JDK 17]: https://adoptium.net/archive.html?variant=openjdk17&jvmVariant=hotspot
+[JDK 17]: https://foojay.io/almanac/java-17/
[Release Notes]: https://junit.org/junit5/docs/current/release-notes/
[Samples]: https://github.com/junit-team/junit5-samples
[StackOverflow]: https://stackoverflow.com/questions/tagged/junit5
diff --git a/SECURITY.md b/SECURITY.md
index 0e51f7ff7479..fca52da512fa 100644
--- a/SECURITY.md
+++ b/SECURITY.md
@@ -4,8 +4,8 @@
| Version | Supported |
| ------- | ------------------ |
-| 5.7.x | :white_check_mark: |
-| < 5.7 | :x: |
+| 5.9.x | :white_check_mark: |
+| < 5.9 | :x: |
## Reporting a Vulnerability
diff --git a/build.gradle.kts b/build.gradle.kts
index cce12d0ae060..5379f61f82be 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -4,7 +4,7 @@ plugins {
`base-conventions`
`build-metadata`
`dependency-update-check`
- `jacoco-conventions`
+ `jacoco-aggregation-conventions`
`temp-maven-repo`
}
@@ -47,6 +47,12 @@ val vintageProjects by extra(listOf(
val mavenizedProjects by extra(platformProjects + jupiterProjects + vintageProjects)
val modularProjects by extra(mavenizedProjects - listOf(projects.junitPlatformConsoleStandalone.dependencyProject))
+dependencies {
+ (modularProjects + listOf(projects.platformTests.dependencyProject)).forEach {
+ jacocoAggregation(project(it.path))
+ }
+}
+
nexusPublishing {
packageGroup.set("org.junit")
repositories {
@@ -57,36 +63,3 @@ nexusPublishing {
nohttp {
source.exclude("buildSrc/build/generated-sources/**")
}
-
-val jacocoTestProjects = listOf(
- projects.junitJupiterEngine,
- projects.junitJupiterMigrationsupport,
- projects.junitJupiterParams,
- projects.junitVintageEngine,
- projects.platformTests
-).map { it.dependencyProject }
-val jacocoClassesDir by extra(file("$buildDir/jacoco/classes"))
-
-val jacocoRootReport by tasks.registering(JacocoReport::class) {
- modularProjects.forEach {
- dependsOn(it.tasks.named("extractJar"))
- it.pluginManager.withPlugin("java") {
- sourceDirectories.from(it.the()["main"].allSource.srcDirs)
- }
- }
- classDirectories.from(files(jacocoClassesDir))
- reports {
- html.required.set(true)
- xml.required.set(true)
- csv.required.set(false)
- }
-}
-
-afterEvaluate {
- jacocoRootReport {
- jacocoTestProjects.forEach {
- executionData(it.tasks.withType().map { task -> task.the().destinationFile })
- dependsOn(it.tasks.withType())
- }
- }
-}
diff --git a/buildSrc/build.gradle.kts b/buildSrc/build.gradle.kts
index 9fd96fb5833b..264ec0670c53 100644
--- a/buildSrc/build.gradle.kts
+++ b/buildSrc/build.gradle.kts
@@ -2,7 +2,7 @@ import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
`kotlin-dsl`
- id("com.github.ben-manes.versions") version "0.39.0"
+ id("com.github.ben-manes.versions") version "0.42.0"
}
repositories {
@@ -11,12 +11,11 @@ repositories {
dependencies {
implementation(kotlin("gradle-plugin"))
- implementation("biz.aQute.bnd:biz.aQute.bnd.gradle:6.3.1")
- implementation("com.diffplug.spotless:spotless-plugin-gradle:6.0.0")
- implementation("com.github.ben-manes:gradle-versions-plugin:0.39.0")
+ implementation("biz.aQute.bnd:biz.aQute.bnd.gradle:6.4.0")
+ implementation("com.diffplug.spotless:spotless-plugin-gradle:6.11.0")
+ implementation("com.github.ben-manes:gradle-versions-plugin:0.42.0")
implementation("gradle.plugin.com.github.johnrengelman:shadow:7.1.2")
- implementation("org.gradle:test-retry-gradle-plugin:1.4.1")
- compileOnly("com.gradle:gradle-enterprise-gradle-plugin:3.11.1") // keep in sync with root settings.gradle.kts
+ compileOnly("com.gradle:gradle-enterprise-gradle-plugin:3.12.1") // keep in sync with root settings.gradle.kts
}
tasks {
diff --git a/buildSrc/settings.gradle.kts b/buildSrc/settings.gradle.kts
index 44425d9c15fc..29744ec1bcde 100644
--- a/buildSrc/settings.gradle.kts
+++ b/buildSrc/settings.gradle.kts
@@ -1 +1 @@
-// intentionally left blank
+rootProject.name = "buildSrc"
diff --git a/buildSrc/src/main/kotlin/build-metadata.gradle.kts b/buildSrc/src/main/kotlin/build-metadata.gradle.kts
index 5d189fba246e..ad58b4898de5 100644
--- a/buildSrc/src/main/kotlin/build-metadata.gradle.kts
+++ b/buildSrc/src/main/kotlin/build-metadata.gradle.kts
@@ -1,18 +1,15 @@
-import org.codehaus.groovy.runtime.ProcessGroovyMethods
import java.time.Instant
import java.time.OffsetDateTime
import java.time.ZoneOffset
import java.time.format.DateTimeFormatter
-val buildTimeAndDate: OffsetDateTime by extra {
-
- // SOURCE_DATE_EPOCH is a UNIX timestamp for pinning build metadata against
- // in order to achieve reproducible builds
- //
- // More details - https://reproducible-builds.org/docs/source-date-epoch/
-
+val buildTimeAndDate =
if (System.getenv().containsKey("SOURCE_DATE_EPOCH")) {
+ // SOURCE_DATE_EPOCH is a UNIX timestamp for pinning build metadata against
+ // in order to achieve reproducible builds
+ //
+ // More details - https://reproducible-builds.org/docs/source-date-epoch/
val sourceDateEpoch = System.getenv("SOURCE_DATE_EPOCH").toLong()
Instant.ofEpochSecond(sourceDateEpoch).atOffset(ZoneOffset.UTC)
@@ -20,11 +17,12 @@ val buildTimeAndDate: OffsetDateTime by extra {
} else {
OffsetDateTime.now()
}
-}
val buildDate: String by extra { DateTimeFormatter.ISO_LOCAL_DATE.format(buildTimeAndDate) }
val buildTime: String by extra { DateTimeFormatter.ofPattern("HH:mm:ss.SSSZ").format(buildTimeAndDate) }
val buildRevision: String by extra {
- ProcessGroovyMethods.getText(ProcessGroovyMethods.execute("git rev-parse --verify HEAD"))
+ providers.exec {
+ commandLine("git", "rev-parse", "--verify", "HEAD")
+ }.standardOutput.asText.get()
}
val builtByValue by extra { project.findProperty("builtBy") ?: project.property("defaultBuiltBy") }
diff --git a/buildSrc/src/main/kotlin/jacoco-aggregation-conventions.gradle.kts b/buildSrc/src/main/kotlin/jacoco-aggregation-conventions.gradle.kts
new file mode 100644
index 000000000000..cd32b2d65517
--- /dev/null
+++ b/buildSrc/src/main/kotlin/jacoco-aggregation-conventions.gradle.kts
@@ -0,0 +1,17 @@
+import org.gradle.api.attributes.TestSuiteType
+import org.gradle.kotlin.dsl.invoke
+import org.gradle.kotlin.dsl.`jacoco-report-aggregation`
+import org.gradle.testing.jacoco.plugins.JacocoCoverageReport
+
+plugins {
+ id("jacoco-conventions")
+ `jacoco-report-aggregation`
+}
+
+reporting {
+ reports {
+ create("jacocoRootReport") {
+ testType.set(TestSuiteType.UNIT_TEST)
+ }
+ }
+}
diff --git a/buildSrc/src/main/kotlin/jacoco-conventions.gradle.kts b/buildSrc/src/main/kotlin/jacoco-conventions.gradle.kts
index 7e0f5a1410f6..03e5c8851345 100644
--- a/buildSrc/src/main/kotlin/jacoco-conventions.gradle.kts
+++ b/buildSrc/src/main/kotlin/jacoco-conventions.gradle.kts
@@ -1,5 +1,3 @@
-import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
-
plugins {
jacoco
}
@@ -10,51 +8,6 @@ jacoco {
toolVersion = requiredVersionFromLibs("jacoco")
}
-tasks {
- withType().configureEach {
- configure {
- isEnabled = enableJaCoCo
- }
- }
- withType().configureEach {
- enabled = enableJaCoCo
- }
-}
-
-pluginManager.withPlugin("java") {
-
- val jacocoClassesDir: File by rootProject.extra
-
- val jar by tasks.existing(Jar::class)
-
- val extractJar by tasks.registering(Copy::class) {
- from(zipTree(jar.map { it.archiveFile }))
- into(jacocoClassesDir)
- include("**/*.class")
- // don't version-specific classes of MR JARs
- exclude("META-INF/versions/**")
- includeEmptyDirs = false
- onlyIf { jar.get().enabled }
- }
-
- jar {
- finalizedBy(extractJar)
- }
-
- tasks.named("jacocoTestReport") {
- enabled = false
- }
-
- pluginManager.withPlugin("com.github.johnrengelman.shadow") {
-
- val shadowJar by tasks.existing(ShadowJar::class) {
- finalizedBy(extractJar)
- }
- extractJar {
- from(zipTree(shadowJar.map { it.archiveFile }))
- // don't report coverage for shadowed classes
- exclude("**/shadow/**")
- onlyIf { shadowJar.get().enabled }
- }
- }
+tasks.withType().configureEach {
+ enabled = enableJaCoCo
}
diff --git a/buildSrc/src/main/kotlin/jacoco-java-conventions.gradle.kts b/buildSrc/src/main/kotlin/jacoco-java-conventions.gradle.kts
new file mode 100644
index 000000000000..265ff8937069
--- /dev/null
+++ b/buildSrc/src/main/kotlin/jacoco-java-conventions.gradle.kts
@@ -0,0 +1,31 @@
+import org.gradle.api.attributes.LibraryElements.CLASSES
+import org.gradle.api.attributes.LibraryElements.LIBRARY_ELEMENTS_ATTRIBUTE
+
+plugins {
+ java
+ id("jacoco-conventions")
+}
+
+val mavenizedProjects: List by rootProject.extra
+val enableJaCoCo = project.hasProperty("enableJaCoCo")
+
+tasks.withType().configureEach {
+ configure {
+ isEnabled = enableJaCoCo
+ }
+}
+
+val codeCoverageClassesJar by tasks.registering(Jar::class) {
+ from(tasks.jar.map { zipTree(it.archiveFile) })
+ archiveClassifier.set("jacoco")
+ enabled = project in mavenizedProjects
+ duplicatesStrategy = DuplicatesStrategy.INCLUDE
+}
+
+configurations.create("codeCoverageReportClasses") {
+ isCanBeResolved = false
+ isCanBeConsumed = true
+ isTransitive = false
+ attributes.attribute(LIBRARY_ELEMENTS_ATTRIBUTE, objects.named(LibraryElements::class, CLASSES))
+ outgoing.artifact(codeCoverageClassesJar)
+}
diff --git a/buildSrc/src/main/kotlin/java-library-conventions.gradle.kts b/buildSrc/src/main/kotlin/java-library-conventions.gradle.kts
index 66e07ffbe00d..e2df86c8984f 100644
--- a/buildSrc/src/main/kotlin/java-library-conventions.gradle.kts
+++ b/buildSrc/src/main/kotlin/java-library-conventions.gradle.kts
@@ -1,5 +1,6 @@
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
-import org.gradle.api.tasks.PathSensitivity.RELATIVE
+import org.junit.gradle.java.ModulePathArgumentProvider
+import org.junit.gradle.java.PatchModuleArgumentProvider
plugins {
`java-library`
@@ -7,7 +8,7 @@ plugins {
idea
checkstyle
id("base-conventions")
- id("jacoco-conventions")
+ id("jacoco-java-conventions")
}
val mavenizedProjects: List by rootProject.extra
@@ -156,8 +157,8 @@ val compileModule by tasks.registering(JavaCompile::class) {
"-Werror", // Terminates compilation when warnings occur.
"--module-version", "${project.version}",
))
- options.compilerArgumentProviders.add(ModulePathArgumentProvider())
- options.compilerArgumentProviders.addAll(modularProjects.map { PatchModuleArgumentProvider(it) })
+ options.compilerArgumentProviders.add(objects.newInstance(ModulePathArgumentProvider::class, project, modularProjects))
+ options.compilerArgumentProviders.addAll(modularProjects.map { objects.newInstance(PatchModuleArgumentProvider::class, project, it) })
modularity.inferModulePath.set(false)
}
@@ -193,6 +194,10 @@ tasks.jar {
}
}
+tasks.withType().configureEach {
+ outputs.doNotCacheIf("Shadow jar contains a Manifest with Build-Time") { true }
+}
+
tasks.withType().configureEach {
options.encoding = "UTF-8"
}
@@ -215,45 +220,6 @@ tasks.compileTestJava {
))
}
-inner class ModulePathArgumentProvider : CommandLineArgumentProvider, Named {
- @get:CompileClasspath
- val modulePath: Provider = configurations.compileClasspath
- override fun asArguments() = listOf(
- "--module-path",
- modulePath.get().asPath,
- "--module-source-path",
- files(modularProjects.map { "${it.projectDir}/src/module" }).asPath
- )
- @Internal
- override fun getName() = "module-path"
-}
-
-inner class PatchModuleArgumentProvider(it: Project) : CommandLineArgumentProvider, Named {
-
- @get:Input
- val module: String = it.javaModuleName
-
- @get:InputFiles
- @get:PathSensitive(RELATIVE)
- val patch: Provider = provider {
- if (it == project)
- files(sourceSets.matching { it.name.startsWith("main") }.map { it.output })
- else
- files(it.sourceSets["main"].java.srcDirs)
- }
-
- override fun asArguments(): List {
- val path = patch.get().filter { it.exists() }.asPath
- if (path.isEmpty()) {
- return emptyList()
- }
- return listOf("--patch-module", "$module=$path")
- }
-
- @Internal
- override fun getName() = "patch-module($module)"
-}
-
afterEvaluate {
configurations {
apiElements {
diff --git a/buildSrc/src/main/kotlin/java-toolchain-conventions.gradle.kts b/buildSrc/src/main/kotlin/java-toolchain-conventions.gradle.kts
index c85e77e260f2..87c334d2621e 100644
--- a/buildSrc/src/main/kotlin/java-toolchain-conventions.gradle.kts
+++ b/buildSrc/src/main/kotlin/java-toolchain-conventions.gradle.kts
@@ -1,14 +1,27 @@
-val javaToolchainVersion: String? by project
-val defaultLanguageVersion = JavaLanguageVersion.of(17)
-val javaLanguageVersion = javaToolchainVersion?.let { JavaLanguageVersion.of(it) } ?: defaultLanguageVersion
+import org.jetbrains.kotlin.gradle.dsl.KotlinJvmProjectExtension
project.pluginManager.withPlugin("java") {
+ val javaToolchainVersion: String? by project
+ val defaultLanguageVersion = JavaLanguageVersion.of(17)
+ val javaLanguageVersion = javaToolchainVersion?.let { JavaLanguageVersion.of(it) } ?: defaultLanguageVersion
+
val extension = the()
val javaToolchainService = the()
+
extension.toolchain.languageVersion.set(javaLanguageVersion)
+
+ pluginManager.withPlugin("org.jetbrains.kotlin.jvm") {
+ configure {
+ jvmToolchain {
+ languageVersion.set(javaLanguageVersion)
+ }
+ }
+ }
+
tasks.withType().configureEach {
javaLauncher.set(javaToolchainService.launcherFor(extension.toolchain))
}
+
tasks.withType().configureEach {
outputs.cacheIf { javaLanguageVersion == defaultLanguageVersion }
doFirst {
@@ -19,6 +32,7 @@ project.pluginManager.withPlugin("java") {
}
}
}
+
tasks.withType().configureEach {
javaLauncher.set(javaToolchainService.launcherFor {
// Groovy does not yet support JDK 19, see https://issues.apache.org/jira/browse/GROOVY-10569
diff --git a/buildSrc/src/main/kotlin/kotlin-library-conventions.gradle.kts b/buildSrc/src/main/kotlin/kotlin-library-conventions.gradle.kts
index 08402295ff04..163190944bae 100644
--- a/buildSrc/src/main/kotlin/kotlin-library-conventions.gradle.kts
+++ b/buildSrc/src/main/kotlin/kotlin-library-conventions.gradle.kts
@@ -20,8 +20,7 @@ afterEvaluate {
kotlinOptions.jvmTarget = extension.mainJavaVersion.toString()
}
named("compileTestKotlin") {
- // The Kotlin compiler does not yet support JDK 17 and later (see https://kotlinlang.org/docs/compiler-reference.html#jvm-target-version)
- kotlinOptions.jvmTarget = minOf(JavaVersion.VERSION_16, extension.testJavaVersion).toString()
+ kotlinOptions.jvmTarget = extension.testJavaVersion.toString()
}
}
}
diff --git a/buildSrc/src/main/kotlin/org/junit/gradle/exec/RunConsoleLauncher.kt b/buildSrc/src/main/kotlin/org/junit/gradle/exec/RunConsoleLauncher.kt
new file mode 100644
index 000000000000..88889bcfbb1f
--- /dev/null
+++ b/buildSrc/src/main/kotlin/org/junit/gradle/exec/RunConsoleLauncher.kt
@@ -0,0 +1,86 @@
+package org.junit.gradle.exec
+
+import org.gradle.api.DefaultTask
+import org.gradle.api.file.ConfigurableFileCollection
+import org.gradle.api.file.DirectoryProperty
+import org.gradle.api.provider.ListProperty
+import org.gradle.api.provider.Property
+import org.gradle.api.tasks.Classpath
+import org.gradle.api.tasks.Input
+import org.gradle.api.tasks.Internal
+import org.gradle.api.tasks.OutputDirectory
+import org.gradle.api.tasks.SourceSetContainer
+import org.gradle.api.tasks.TaskAction
+import org.gradle.kotlin.dsl.get
+import org.gradle.kotlin.dsl.the
+import org.gradle.process.CommandLineArgumentProvider
+import org.gradle.process.ExecOperations
+import trackOperationSystemAsInput
+import java.io.ByteArrayOutputStream
+import javax.inject.Inject
+
+abstract class RunConsoleLauncher @Inject constructor(private val execOperations: ExecOperations): DefaultTask() {
+
+ @get:Classpath
+ abstract val runtimeClasspath: ConfigurableFileCollection
+
+ @get:Input
+ abstract val args: ListProperty
+
+ @get:OutputDirectory
+ abstract val reportsDir: DirectoryProperty
+
+ @get:Internal
+ abstract val debugging: Property
+
+ @get:Internal
+ abstract val hideOutput: Property
+
+ init {
+ runtimeClasspath.from(project.the()["test"].runtimeClasspath)
+ reportsDir.convention(project.layout.buildDirectory.dir("test-results"))
+
+ debugging.convention(
+ project.providers.gradleProperty("consoleLauncherTestDebug")
+ .map { it != "false" }
+ .orElse(false)
+ )
+ outputs.cacheIf { !debugging.get() }
+ outputs.upToDateWhen { !debugging.get() }
+
+ hideOutput.convention(debugging.map { !it })
+
+ trackOperationSystemAsInput()
+ }
+
+ @TaskAction
+ fun execute() {
+ val output = ByteArrayOutputStream()
+ val result = execOperations.javaexec {
+ classpath = runtimeClasspath
+ mainClass.set("org.junit.platform.console.ConsoleLauncher")
+ args("--scan-classpath")
+ args("--config=junit.platform.reporting.open.xml.enabled=true")
+ args(this@RunConsoleLauncher.args.get())
+ argumentProviders += CommandLineArgumentProvider {
+ listOf(
+ "--reports-dir=${reportsDir.get()}",
+ "--config=junit.platform.reporting.output.dir=${reportsDir.get()}"
+
+ )
+ }
+ systemProperty("java.util.logging.manager", "org.apache.logging.log4j.jul.LogManager")
+ debug = debugging.get()
+ if (hideOutput.get()) {
+ standardOutput = output
+ errorOutput = output
+ }
+ isIgnoreExitValue = true
+ }
+ if (result.exitValue != 0 && hideOutput.get()) {
+ System.out.write(output.toByteArray())
+ System.out.flush()
+ }
+ result.rethrowFailure().assertNormalExitValue()
+ }
+}
diff --git a/buildSrc/src/main/kotlin/org/junit/gradle/java/ExecJarAction.kt b/buildSrc/src/main/kotlin/org/junit/gradle/java/ExecJarAction.kt
new file mode 100644
index 000000000000..afc97f404fcc
--- /dev/null
+++ b/buildSrc/src/main/kotlin/org/junit/gradle/java/ExecJarAction.kt
@@ -0,0 +1,27 @@
+package org.junit.gradle.java
+
+import org.gradle.api.Action
+import org.gradle.api.Task
+import org.gradle.api.provider.ListProperty
+import org.gradle.api.provider.Property
+import org.gradle.jvm.tasks.Jar
+import org.gradle.jvm.toolchain.JavaLauncher
+import org.gradle.jvm.toolchain.JavaToolchainService
+import org.gradle.jvm.toolchain.JavaToolchainSpec
+import org.gradle.process.ExecOperations
+import javax.inject.Inject
+
+abstract class ExecJarAction @Inject constructor(private val operations: ExecOperations): Action {
+
+ abstract val javaLauncher: Property
+
+ abstract val args: ListProperty
+
+ override fun execute(t: Task) {
+ operations.exec {
+ executable = javaLauncher.get()
+ .metadata.installationPath.file("bin/jar").asFile.absolutePath
+ args = this@ExecJarAction.args.get()
+ }
+ }
+}
diff --git a/buildSrc/src/main/kotlin/org/junit/gradle/java/ModulePathArgumentProvider.kt b/buildSrc/src/main/kotlin/org/junit/gradle/java/ModulePathArgumentProvider.kt
new file mode 100644
index 000000000000..adb478c42f82
--- /dev/null
+++ b/buildSrc/src/main/kotlin/org/junit/gradle/java/ModulePathArgumentProvider.kt
@@ -0,0 +1,41 @@
+package org.junit.gradle.java
+
+import org.gradle.api.Named
+import org.gradle.api.Project
+import org.gradle.api.artifacts.Configuration
+import org.gradle.api.file.ConfigurableFileCollection
+import org.gradle.api.file.FileCollection
+import org.gradle.api.provider.Property
+import org.gradle.api.provider.Provider
+import org.gradle.api.tasks.*
+import org.gradle.kotlin.dsl.get
+import org.gradle.process.CommandLineArgumentProvider
+import javax.inject.Inject
+
+abstract class ModulePathArgumentProvider @Inject constructor(project: Project, modularProjects: List) :
+ CommandLineArgumentProvider, Named {
+
+ @get:CompileClasspath
+ abstract val modulePath: ConfigurableFileCollection
+
+ @get:InputFiles
+ @get:PathSensitive(PathSensitivity.RELATIVE)
+ abstract val moduleSourceDirs: ConfigurableFileCollection
+
+ init {
+ modulePath.from(project.configurations.named("compileClasspath"))
+ modularProjects.forEach {
+ moduleSourceDirs.from(project.files("${it.projectDir}/src/module"))
+ }
+ }
+
+ override fun asArguments() = listOf(
+ "--module-path",
+ modulePath.asPath,
+ "--module-source-path",
+ moduleSourceDirs.asPath
+ )
+
+ @Internal
+ override fun getName() = "module-path"
+}
diff --git a/buildSrc/src/main/kotlin/org/junit/gradle/java/PatchModuleArgumentProvider.kt b/buildSrc/src/main/kotlin/org/junit/gradle/java/PatchModuleArgumentProvider.kt
new file mode 100644
index 000000000000..f13fd8b9a83b
--- /dev/null
+++ b/buildSrc/src/main/kotlin/org/junit/gradle/java/PatchModuleArgumentProvider.kt
@@ -0,0 +1,47 @@
+package org.junit.gradle.java
+
+import javaModuleName
+import org.gradle.api.Named
+import org.gradle.api.Project
+import org.gradle.api.file.ConfigurableFileCollection
+import org.gradle.api.file.FileCollection
+import org.gradle.api.provider.Property
+import org.gradle.api.provider.Provider
+import org.gradle.api.tasks.*
+import org.gradle.kotlin.dsl.get
+import org.gradle.kotlin.dsl.the
+import org.gradle.process.CommandLineArgumentProvider
+import javax.inject.Inject
+
+abstract class PatchModuleArgumentProvider @Inject constructor(compiledProject: Project, patchModuleProject: Project) :
+ CommandLineArgumentProvider, Named {
+
+ @get:Input
+ abstract val module: Property
+
+ @get:InputFiles
+ @get:PathSensitive(PathSensitivity.RELATIVE)
+ abstract val patch: ConfigurableFileCollection
+
+ init {
+ module.convention(patchModuleProject.javaModuleName)
+ patch.from(compiledProject.provider {
+ if (patchModuleProject == compiledProject)
+ compiledProject.files(compiledProject.the().matching { it.name.startsWith("main") }
+ .map { it.output })
+ else
+ patchModuleProject.files(patchModuleProject.the()["main"].java.srcDirs)
+ })
+ }
+
+ override fun asArguments(): List {
+ val path = patch.filter { it.exists() }.asPath
+ if (path.isEmpty()) {
+ return emptyList()
+ }
+ return listOf("--patch-module", "${module.get()}=$path")
+ }
+
+ @Internal
+ override fun getName() = "patch-module(${module.get()})"
+}
diff --git a/buildSrc/src/main/kotlin/org/junit/gradle/java/WriteArtifactsFile.kt b/buildSrc/src/main/kotlin/org/junit/gradle/java/WriteArtifactsFile.kt
new file mode 100644
index 000000000000..12107fc8f824
--- /dev/null
+++ b/buildSrc/src/main/kotlin/org/junit/gradle/java/WriteArtifactsFile.kt
@@ -0,0 +1,36 @@
+package org.junit.gradle.java
+
+import org.gradle.api.DefaultTask
+import org.gradle.api.artifacts.Configuration
+import org.gradle.api.artifacts.ModuleVersionIdentifier
+import org.gradle.api.artifacts.ResolvedArtifact
+import org.gradle.api.file.RegularFileProperty
+import org.gradle.api.provider.Property
+import org.gradle.api.provider.Provider
+import org.gradle.api.provider.SetProperty
+import org.gradle.api.tasks.*
+
+abstract class WriteArtifactsFile : DefaultTask() {
+
+ @get:OutputFile
+ abstract val outputFile: RegularFileProperty
+
+ @get:Input
+ abstract val moduleVersions: SetProperty
+
+ fun from(configuration: Provider) {
+ moduleVersions.addAll(configuration.map {
+ it.resolvedConfiguration.resolvedArtifacts.map { it.moduleVersion.id }
+ })
+ }
+
+ @TaskAction
+ fun writeFile() {
+ outputFile.get().asFile.printWriter().use { out ->
+ moduleVersions.get()
+ .map { "${it.group}:${it.name}:${it.version}" }
+ .sorted()
+ .forEach(out::println)
+ }
+ }
+}
diff --git a/buildSrc/src/main/kotlin/osgi-conventions.gradle.kts b/buildSrc/src/main/kotlin/osgi-conventions.gradle.kts
index 2ad2fb578893..3a2bf7c6db66 100644
--- a/buildSrc/src/main/kotlin/osgi-conventions.gradle.kts
+++ b/buildSrc/src/main/kotlin/osgi-conventions.gradle.kts
@@ -10,60 +10,65 @@ val importAPIGuardian = "org.apiguardian.*;resolution:=\"optional\""
// This task enhances `jar` and `shadowJar` tasks with the bnd
// `BundleTaskExtension` extension which allows for generating OSGi
// metadata into the jar
-tasks.withType().matching {
- task: Jar -> task.name == "jar" || task.name == "shadowJar"
+tasks.withType().matching { task: Jar ->
+ task.name == "jar" || task.name == "shadowJar"
}.configureEach {
- val bte = extensions.create(BundleTaskExtension.NAME, this)
-
extra["importAPIGuardian"] = importAPIGuardian
- // These are bnd instructions necessary for generating OSGi metadata.
- // We've generalized these so that they are widely applicable limiting
- // module configurations to special cases.
- bte.setBnd("""
- # Set the Bundle-SymbolicName to the archiveBaseName.
- # We don't use the archiveClassifier which Bnd will use
- # in the default Bundle-SymbolicName value.
- Bundle-SymbolicName: ${'$'}{task.archiveBaseName}
-
- # Set the Bundle-Name from the project description
- Bundle-Name: ${'$'}{project.description}
-
- # These are the general rules for package imports.
- Import-Package: \
- ${importAPIGuardian},\
- org.junit.platform.commons.logging;status=INTERNAL,\
- kotlin.*;resolution:="optional",\
- *
-
- # This tells bnd not to complain if a module doesn't actually import
- # the kotlin and apiguardian packages, but enough modules do to make it a default.
- -fixupmessages.kotlin.import: "Unused Import-Package instructions: \\[kotlin.*\\]";is:=ignore
- -fixupmessages.apiguardian.import: "Unused Import-Package instructions: \\[org.apiguardian.*\\]";is:=ignore
-
- # This tells bnd to ignore classes it finds in `META-INF/versions/`
- # because bnd doesn't yet support multi-release jars.
- -fixupmessages.wrong.dir: "Classes found in the wrong directory: \\{META-INF/versions/...";is:=ignore
-
- # Don't scan for Class.forName package imports.
- # See https://bnd.bndtools.org/instructions/noclassforname.html
- -noclassforname: true
-
- # Don't add all the extra headers bnd normally adds.
- # See https://bnd.bndtools.org/instructions/noextraheaders.html
- -noextraheaders: true
-
- # Don't add the Private-Package header.
- # See https://bnd.bndtools.org/instructions/removeheaders.html
- -removeheaders: Private-Package
-
- # Instruct the APIGuardianAnnotations how to operate.
- # See https://bnd.bndtools.org/instructions/export-apiguardian.html
- -export-apiguardian: *;version=${'$'}{versionmask;===;${'$'}{version_cleanup;${'$'}{task.archiveVersion}}}
- """)
-
- // Do the actual work putting OSGi stuff in the jar.
- doLast(bte.buildAction())
+ extensions.create(BundleTaskExtension.NAME, this).apply {
+ properties.set(provider {
+ mapOf("project.description" to project.description)
+ })
+ // These are bnd instructions necessary for generating OSGi metadata.
+ // We've generalized these so that they are widely applicable limiting
+ // module configurations to special cases.
+ setBnd(
+ """
+ # Set the Bundle-SymbolicName to the archiveBaseName.
+ # We don't use the archiveClassifier which Bnd will use
+ # in the default Bundle-SymbolicName value.
+ Bundle-SymbolicName: ${'$'}{task.archiveBaseName}
+
+ # Set the Bundle-Name from the project description
+ Bundle-Name: ${'$'}{project.description}
+
+ # These are the general rules for package imports.
+ Import-Package: \
+ ${importAPIGuardian},\
+ org.junit.platform.commons.logging;status=INTERNAL,\
+ kotlin.*;resolution:="optional",\
+ *
+
+ # This tells bnd not to complain if a module doesn't actually import
+ # the kotlin and apiguardian packages, but enough modules do to make it a default.
+ -fixupmessages.kotlin.import: "Unused Import-Package instructions: \\[kotlin.*\\]";is:=ignore
+ -fixupmessages.apiguardian.import: "Unused Import-Package instructions: \\[org.apiguardian.*\\]";is:=ignore
+
+ # This tells bnd to ignore classes it finds in `META-INF/versions/`
+ # because bnd doesn't yet support multi-release jars.
+ -fixupmessages.wrong.dir: "Classes found in the wrong directory: \\{META-INF/versions/...";is:=ignore
+
+ # Don't scan for Class.forName package imports.
+ # See https://bnd.bndtools.org/instructions/noclassforname.html
+ -noclassforname: true
+
+ # Don't add all the extra headers bnd normally adds.
+ # See https://bnd.bndtools.org/instructions/noextraheaders.html
+ -noextraheaders: true
+
+ # Don't add the Private-Package header.
+ # See https://bnd.bndtools.org/instructions/removeheaders.html
+ -removeheaders: Private-Package
+
+ # Instruct the APIGuardianAnnotations how to operate.
+ # See https://bnd.bndtools.org/instructions/export-apiguardian.html
+ -export-apiguardian: *;version=${'$'}{versionmask;===;${'$'}{version_cleanup;${'$'}{task.archiveVersion}}}
+ """
+ )
+
+ // Do the actual work putting OSGi stuff in the jar.
+ doLast(buildAction())
+ }
}
// Bnd's Resolve task uses a properties file for its configuration. This
@@ -90,7 +95,7 @@ val osgiVerification by configurations.creating {
// that its metadata is valid. If the metadata is invalid this task will
// fail.
val verifyOSGi by tasks.registering(Resolve::class) {
- bndrun.fileProvider(osgiProperties.map{ it.outputFile })
+ bndrun.fileProvider(osgiProperties.map { it.outputFile })
outputBndrun.set(layout.buildDirectory.file("resolvedOSGiProperties.bndrun"))
isReportOptional = false
// By default bnd will use jars found in:
@@ -101,6 +106,7 @@ val verifyOSGi by tasks.registering(Resolve::class) {
// can use them to validate the metadata without causing those to
// end up in the dependencies of those projects.
bundles(osgiVerification)
+ properties.empty()
}
tasks.check {
diff --git a/buildSrc/src/main/kotlin/shadow-conventions.gradle.kts b/buildSrc/src/main/kotlin/shadow-conventions.gradle.kts
index 44c5bacec51d..19028422c41e 100644
--- a/buildSrc/src/main/kotlin/shadow-conventions.gradle.kts
+++ b/buildSrc/src/main/kotlin/shadow-conventions.gradle.kts
@@ -5,12 +5,14 @@ plugins {
val shadowed by configurations.creating
-configurations.forEach { configuration ->
- configuration.outgoing.apply {
- val removed = artifacts.removeIf { it.classifier.isNullOrEmpty() }
- if (removed) {
- artifact(tasks.shadowJar) {
- classifier = ""
+configurations {
+ listOf(apiElements, runtimeElements).forEach {
+ it.configure {
+ outgoing {
+ artifacts.clear()
+ artifact(tasks.shadowJar) {
+ classifier = ""
+ }
}
}
}
@@ -54,6 +56,10 @@ tasks {
dependsOn(shadowJar)
enabled = false
}
+ named("codeCoverageClassesJar") {
+ from(shadowJar.map { zipTree(it.archiveFile) })
+ exclude("**/shadow/**")
+ }
test {
dependsOn(shadowJar)
// in order to run the test against the shadowJar
diff --git a/buildSrc/src/main/kotlin/testing-conventions.gradle.kts b/buildSrc/src/main/kotlin/testing-conventions.gradle.kts
index a1ee801a05b7..d5a105f8a462 100644
--- a/buildSrc/src/main/kotlin/testing-conventions.gradle.kts
+++ b/buildSrc/src/main/kotlin/testing-conventions.gradle.kts
@@ -1,9 +1,10 @@
+import com.gradle.enterprise.gradleplugin.testretry.retry
import org.gradle.api.tasks.testing.logging.TestExceptionFormat.FULL
import org.gradle.api.tasks.testing.logging.TestLogEvent.FAILED
import org.gradle.internal.os.OperatingSystem
plugins {
- id("org.gradle.test-retry")
+ `java-library`
}
tasks.withType().configureEach {
@@ -67,17 +68,17 @@ tasks.withType().configureEach {
}
dependencies {
- "testImplementation"(dependencyFromLibs("assertj"))
- "testImplementation"(dependencyFromLibs("mockito"))
+ testImplementation(dependencyFromLibs("assertj"))
+ testImplementation(dependencyFromLibs("mockito"))
if (!project.name.startsWith("junit-jupiter")) {
- "testImplementation"(project(":junit-jupiter"))
+ testImplementation(project(":junit-jupiter"))
}
- "testImplementation"(testFixtures(project(":junit-jupiter-api")))
+ testImplementation(testFixtures(project(":junit-jupiter-api")))
- "testRuntimeOnly"(project(":junit-platform-engine"))
- "testRuntimeOnly"(project(":junit-platform-jfr"))
- "testRuntimeOnly"(project(":junit-platform-reporting"))
+ testRuntimeOnly(project(":junit-platform-engine"))
+ testRuntimeOnly(project(":junit-platform-jfr"))
+ testRuntimeOnly(project(":junit-platform-reporting"))
- "testRuntimeOnly"(bundleFromLibs("log4j"))
+ testRuntimeOnly(bundleFromLibs("log4j"))
}
diff --git a/documentation/documentation.gradle.kts b/documentation/documentation.gradle.kts
index 721a35e1b06d..bb832b1c668d 100644
--- a/documentation/documentation.gradle.kts
+++ b/documentation/documentation.gradle.kts
@@ -2,6 +2,7 @@ import org.asciidoctor.gradle.jvm.AbstractAsciidoctorTask
import org.gradle.api.tasks.PathSensitivity.RELATIVE
import org.jetbrains.kotlin.gradle.plugin.KotlinSourceSet
import org.junit.gradle.exec.ClasspathSystemPropertyProvider
+import org.junit.gradle.exec.RunConsoleLauncher
import org.junit.gradle.javadoc.ModuleSpecificJavadocFileOption
import java.io.ByteArrayOutputStream
import java.nio.file.Files
@@ -114,63 +115,21 @@ require(externalModulesWithoutModularJavadoc.values.all { it.endsWith("/") }) {
tasks {
- val consoleLauncherTest by registering {
- val runtimeClasspath = sourceSets["test"].runtimeClasspath
- inputs.files(runtimeClasspath).withNormalizer(ClasspathNormalizer::class)
- val reportsDir = file("$buildDir/test-results")
- outputs.dir(reportsDir)
-
- val debugging = providers.gradleProperty("consoleLauncherTestDebug")
- .map { it != "false" }
- .orElse(false)
- outputs.cacheIf { !debugging.get() }
- outputs.upToDateWhen { !debugging.get() }
-
- // Track OS as input so that tests are executed on all configured operating systems on CI
- trackOperationSystemAsInput()
- doFirst {
- val output = ByteArrayOutputStream()
- val result = javaexec {
- debug = project.findProperty("debug") == "true"
- classpath = runtimeClasspath
- mainClass.set("org.junit.platform.console.ConsoleLauncher")
- args("--scan-classpath")
- args("--config", "enableHttpServer=true")
- args("--include-classname", ".*Tests")
- args("--include-classname", ".*Demo")
- args("--exclude-tag", "exclude")
- args("--reports-dir", reportsDir)
- args("--config=junit.platform.reporting.output.dir=${reportsDir}")
- args("--config=junit.platform.reporting.open.xml.enabled=true")
- systemProperty("java.util.logging.manager", "org.apache.logging.log4j.jul.LogManager")
- debug = debugging.get()
- if (!debugging.get()) {
- standardOutput = output
- errorOutput = output
- }
- isIgnoreExitValue = true
- }
- if (result.exitValue != 0 && !debugging.get()) {
- System.out.write(output.toByteArray())
- System.out.flush()
- }
- result.rethrowFailure().assertNormalExitValue()
- }
+ val consoleLauncherTest by registering(RunConsoleLauncher::class) {
+ args.addAll("--config", "enableHttpServer=true")
+ args.addAll("--include-classname", ".*Tests")
+ args.addAll("--include-classname", ".*Demo")
+ args.addAll("--exclude-tag", "exclude")
}
- register("consoleLauncher") {
- val reportsDir = file("$buildDir/console-launcher")
- outputs.dir(reportsDir)
+ register("consoleLauncher") {
+ hideOutput.set(false)
+ reportsDir.set(layout.buildDirectory.dir("console-launcher"))
outputs.upToDateWhen { false }
- classpath = sourceSets["test"].runtimeClasspath
- mainClass.set("org.junit.platform.console.ConsoleLauncher")
- args("--scan-classpath")
- args("--config", "enableHttpServer=true")
- args("--include-classname", ".*Tests")
- args("--include-classname", ".*Demo")
- args("--exclude-tag", "exclude")
- args("--reports-dir", reportsDir)
- systemProperty("java.util.logging.manager", "org.apache.logging.log4j.jul.LogManager")
+ args.addAll("--config", "enableHttpServer=true")
+ args.addAll("--include-classname", ".*Tests")
+ args.addAll("--include-classname", ".*Demo")
+ args.addAll("--exclude-tag", "exclude")
}
test {
diff --git a/documentation/src/docs/asciidoc/release-notes/index.adoc b/documentation/src/docs/asciidoc/release-notes/index.adoc
index e4be51b9779a..6b41a3649a5e 100644
--- a/documentation/src/docs/asciidoc/release-notes/index.adoc
+++ b/documentation/src/docs/asciidoc/release-notes/index.adoc
@@ -16,6 +16,10 @@ authors as well as build tool and IDE vendors.
include::{includedir}/link-attributes.adoc[]
+include::{basedir}/release-notes-5.9.3.adoc[]
+
+include::{basedir}/release-notes-5.9.2.adoc[]
+
include::{basedir}/release-notes-5.9.1.adoc[]
include::{basedir}/release-notes-5.9.0.adoc[]
diff --git a/documentation/src/docs/asciidoc/release-notes/release-notes-5.9.2.adoc b/documentation/src/docs/asciidoc/release-notes/release-notes-5.9.2.adoc
new file mode 100644
index 000000000000..249e805dd0f0
--- /dev/null
+++ b/documentation/src/docs/asciidoc/release-notes/release-notes-5.9.2.adoc
@@ -0,0 +1,61 @@
+[[release-notes-5.9.2]]
+== 5.9.2
+
+*Date of Release:* January 10, 2023
+
+*Scope:* Bug fixes and enhancements since 5.9.1
+
+For a complete list of all _closed_ issues and pull requests for this release, consult the
+link:{junit5-repo}+/milestones/5.9.2+[5.9.2] milestone page in the JUnit repository on
+GitHub.
+
+
+[[release-notes-5.9.2-junit-platform]]
+=== JUnit Platform
+
+==== Bug Fixes
+
+* The Java 7 based constructor for `ForkJoinPool` is no longer accidentally used on Java 9
+ or higher when invalid `ParallelExecutionConfiguration` is provided. Instead, an
+ exception is thrown for invalid configuration, thereby preventing invalid configuration
+ from being silently ignored.
+
+==== New Features and Improvements
+
+* New `TestPlan.getTestIdentifier(UniqueId)` and `TestPlan.getChildren(UniqueId)` methods
+ to avoid parsing unique IDs unnecessarily during test execution.
+* Support for limiting the `max-pool-size` for parallel execution via a configuration
+ parameter.
+* Suite discovery now ignores cycles encountered in a test suite and logs an informational
+ message at `CONFIG` level instead of throwing an exception.
+
+
+[[release-notes-5.9.2-junit-jupiter]]
+=== JUnit Jupiter
+
+==== Bug Fixes
+
+* New `@MethodSource` syntax for explicitly selecting an overloaded local factory method
+ without specifying its fully qualified name.
+
+==== Deprecations and Breaking Changes
+
+* The `fixed` parallel execution strategy now allows the thread pool to be saturated by
+ default.
+
+==== New Features and Improvements
+
+* `JAVA_21` has been added to the `JRE` enum for use with JRE-based execution conditions.
+* New `junit.jupiter.execution.parallel.config.fixed.max-pool-size` configuration
+ parameter to set the maximum pool size.
+* New `junit.jupiter.execution.parallel.config.fixed.saturate` configuration parameter to
+ disable pool saturation.
+
+
+[[release-notes-5.9.2-junit-vintage]]
+=== JUnit Vintage
+
+==== Bug Fixes
+
+* `Parameterized` tests are now properly reported when used in combination with the
+ `Enclosed` runner.
diff --git a/documentation/src/docs/asciidoc/release-notes/release-notes-5.9.3.adoc b/documentation/src/docs/asciidoc/release-notes/release-notes-5.9.3.adoc
new file mode 100644
index 000000000000..09dc2a8e9f45
--- /dev/null
+++ b/documentation/src/docs/asciidoc/release-notes/release-notes-5.9.3.adoc
@@ -0,0 +1,59 @@
+[[release-notes-5.9.3]]
+== 5.9.3
+
+*Date of Release:* April 26, 2023
+
+*Scope:* Bug fixes and enhancements since 5.9.2
+
+For a complete list of all _closed_ issues and pull requests for this release, consult the
+link:{junit5-repo}+/milestone/67?closed=1+[5.9.3] milestone page in the
+JUnit repository on GitHub.
+
+
+[[release-notes-5.9.3-junit-platform]]
+=== JUnit Platform
+
+No changes.
+
+
+[[release-notes-5.9.3-junit-jupiter]]
+=== JUnit Jupiter
+
+==== Bug Fixes
+
+* Parameter types for _local_ `@MethodSource` factory method names are now validated. For
+ example, `@MethodSource("myFactory(example.NonexistentType)")` will now result in an
+ exception stating that `example.NonexistentType` cannot be resolved to a valid type.
+* The syntax for parameter types in _local_ `@MethodSource` factory method names now
+ supports canonical array names -- for example, you may now specify `int[]` as in
+ `@MethodSource("myFactory(int[])"` instead of the _binary_ name `[I` as in
+ `@MethodSource("myFactory([I)"` (which was already supported) and
+ `@MethodSource("myFactory(java.lang.String[])` instead of
+ `@MethodSource("myFactory([Ljava.lang.String;)`.
+* The search algorithm used to find `@MethodSource` factory methods now applies consistent
+ semantics for _local_ qualified method names and fully-qualified method names for
+ overloaded factory methods.
+* The `+{displayName}+` placeholder for `@ParameterizedTest` invocation names is no longer
+ parsed using `java.text.MessageFormat`.Consequently, any text in the display name of
+ the `@ParameterizedTest` method will be included unmodified in the invocation display
+ name.For example, Kotlin method names and custom display names configured via
+ `@DisplayName` can now contain apostrophes (`'`) as well as text resembling
+ `MessageFormat` elements such as `+{0}+` or `+{data}+`.
+* Exceptions thrown for files that cannot be deleted when cleaning up a temporary
+ directory created via `@TempDir` now include the root cause.
+* Lifecycle methods are allowed to be declared as `private` again for backwards
+ compatibility; however, using `private` visibility for lifecycle methods is strongly
+ discouraged and will be disallowed in a future release.
+
+==== New Features and Improvements
+
+* The search algorithm used to find `@MethodSource` factory methods now falls back to
+ lenient search semantics when a factory method cannot be found by qualified name
+ (without a parameter list) and also provides better diagnostics when a unique factory
+ method cannot be found.
+
+
+[[release-notes-5.9.3-junit-vintage]]
+=== JUnit Vintage
+
+No changes.
diff --git a/documentation/src/docs/asciidoc/release-notes/release-notes-TEMPLATE.adoc b/documentation/src/docs/asciidoc/release-notes/release-notes-TEMPLATE.adoc
index 17790483e124..ef56e8c27ff9 100644
--- a/documentation/src/docs/asciidoc/release-notes/release-notes-TEMPLATE.adoc
+++ b/documentation/src/docs/asciidoc/release-notes/release-notes-TEMPLATE.adoc
@@ -1,18 +1,31 @@
-// TODO: replace all occurrences of ⚠️ with appropriate values, delete this comment, and
-// 'include:' this new file in index.adoc.
-[[release-notes-⚠️]]
-== ⚠️
+// TODO:
+//
+// 1) Make a copy of this template file, replacing TEMPLATE in the file name with the
+// current version (for example, 5.10.0-M1, 5.10.0-RC1, 5.10.0).
+// 2) Open the new file for editing.
+// 3) Replace all occurrences of VERSION with the current version (for example, 5.10.0-M1,
+// 5.10.0-RC1, 5.10.0). The same version must be used in the file name and within the
+// file.
+// 4) Replace MILESTONE_NUMBER with the appropriate milestone number. This is an integer
+// which you can determine via https://github.com/junit-team/junit5/milestones/. If a
+// GitHub milestone does not yet exist for the given VERSION, you will need to create
+// a new GitHub milestone or ask a member of the JUnit team to create it for you.
+// 5) 'include:' this new file in index.adoc.
+// 6) Delete this entire comment block.
+//
+[[release-notes-VERSION]]
+== VERSION
*Date of Release:* ❓
*Scope:* ❓
For a complete list of all _closed_ issues and pull requests for this release, consult the
-link:{junit5-repo}+/milestone/⚠️?closed=1+[⚠️] milestone page in the JUnit repository on
-GitHub.
+link:{junit5-repo}+/milestone/MILESTONE_NUMBER?closed=1+[VERSION] milestone page in the
+JUnit repository on GitHub.
-[[release-notes-⚠️-junit-platform]]
+[[release-notes-VERSION-junit-platform]]
=== JUnit Platform
==== Bug Fixes
@@ -28,7 +41,7 @@ GitHub.
* ❓
-[[release-notes-⚠️-junit-jupiter]]
+[[release-notes-VERSION-junit-jupiter]]
=== JUnit Jupiter
==== Bug Fixes
@@ -44,7 +57,7 @@ GitHub.
* ❓
-[[release-notes-⚠️-junit-vintage]]
+= [[release-notes-VERSION-junit-vintage]]
=== JUnit Vintage
==== Bug Fixes
diff --git a/documentation/src/docs/asciidoc/user-guide/advanced-topics/engines.adoc b/documentation/src/docs/asciidoc/user-guide/advanced-topics/engines.adoc
index 3c06d5af1736..460a6fd4ba3c 100644
--- a/documentation/src/docs/asciidoc/user-guide/advanced-topics/engines.adoc
+++ b/documentation/src/docs/asciidoc/user-guide/advanced-topics/engines.adoc
@@ -78,3 +78,45 @@ For example, the `junit-jupiter-engine` module registers its
`org.junit.jupiter.engine.JupiterTestEngine` in a file named
`org.junit.platform.engine.TestEngine` within the `/META-INF/services` folder in the
`junit-jupiter-engine` JAR.
+
+[[test-engines-requirements]]
+==== Requirements
+
+NOTE: The words "must", "must not", "required", "shall", "shall not", "should", "should
+not", "recommended", "may", and "optional" in this section are to be interpreted as
+described in https://www.ietf.org/rfc/rfc2119.txt[RFC 2119.]
+
+[[test-engines-requirements-mandatory]]
+===== Mandatory requirements
+
+For interoperability with build tools and IDEs, `TestEngine` implementations must adhere
+to the following requirements:
+
+* The `TestDescriptor` returned from `TestEngine.discover()` _must_ be the root of a tree
+ of `TestDescriptor` instances. This implies that there _must not_ be any cycles between
+ a node and its descendants.
+* A `TestEngine` _must_ be able to discover `UniqueIdSelectors` for any unique ID that it
+ previously generated and returned from `TestEngine.discover()`. This enables selecting a
+ subset of tests to execute or rerun.
+* The `executionSkipped`, `executionStarted`, and `executionFinished` methods of the
+ `EngineExecutionListener` passed to `TestEngine.execute()` _must_ be called for every
+ `TestDescriptor` node in the tree returned from `TestEngine.discover()` at most
+ once. Parent nodes _must_ be reported as started before their children and as finished
+ after their children. If a node is reported as skipped, there _must not_ be any events
+ reported for its descendants.
+
+[[test-engines-requirements-enhanced-compatibility]]
+===== Enhanced compatibility
+
+Adhering to the following requirements is optional but recommended for enhanced
+compatibility with build tools and IDEs:
+
+* Unless to indicate an empty discovery result, the `TestDescriptor` returned from
+ `TestEngine.discover()` _should_ have children rather than being completely dynamic.
+ This allows tools to display the structure of the tests and to select a subset of tests
+ to execute.
+* When resolving `UniqueIdSelectors`, a `TestEngine` _should_ only return `TestDescriptor`
+ instances with matching unique IDs including their ancestors but _may_ return additional
+ siblings or other nodes that are required for the execution of the selected tests.
+* `TestEngines` _should_ support <> tests and containers so
+ that tag filters can be applied when discovering tests.
diff --git a/documentation/src/docs/asciidoc/user-guide/advanced-topics/junit-platform-suite-engine.adoc b/documentation/src/docs/asciidoc/user-guide/advanced-topics/junit-platform-suite-engine.adoc
index 18be01cd9091..d38a312d799f 100644
--- a/documentation/src/docs/asciidoc/user-guide/advanced-topics/junit-platform-suite-engine.adoc
+++ b/documentation/src/docs/asciidoc/user-guide/advanced-topics/junit-platform-suite-engine.adoc
@@ -20,7 +20,7 @@ you need _at least one_ other test engine and its dependencies on the classpath.
`TestEngine` API for declarative test suites
NOTE: Both of the required dependencies are aggregated in the `junit-platform-suite`
-artifact which can be declard in _test_ scope instead of declaring explicit dependencies
+artifact which can be declared in _test_ scope instead of declaring explicit dependencies
on `junit-platform-suite-api` and `junit-platform-suite-engine`.
[[junit-platform-suite-engine-setup-transitive-dependencies]]
diff --git a/documentation/src/docs/asciidoc/user-guide/running-tests.adoc b/documentation/src/docs/asciidoc/user-guide/running-tests.adoc
index 4a5d1bd57e6b..e88d0056e5fe 100644
--- a/documentation/src/docs/asciidoc/user-guide/running-tests.adoc
+++ b/documentation/src/docs/asciidoc/user-guide/running-tests.adoc
@@ -244,14 +244,6 @@ additional dependency to the runtime classpath.
[[running-tests-build-maven]]
==== Maven
-[WARNING]
-.The JUnit Platform Maven Surefire Provider has been discontinued
-====
-The `junit-platform-surefire-provider`, which was originally developed by the JUnit team,
-was deprecated in JUnit Platform 1.3 and discontinued in 1.4. Please use Maven Surefire's
-native support instead.
-====
-
Starting with https://issues.apache.org/jira/browse/SUREFIRE-1330[version 2.22.0], Maven
Surefire and Maven Failsafe provide
https://maven.apache.org/surefire/maven-surefire-plugin/examples/junit-platform.html[native support]
@@ -259,7 +251,31 @@ for executing tests on the JUnit Platform. The `pom.xml` file in the
`{junit5-jupiter-starter-maven}` project demonstrates how to use the Maven Surefire plugin
and can serve as a starting point for configuring your Maven build.
-NOTE: See <> for details on how to override the version
+[WARNING]
+.Use Maven Surefire/Failsafe 3.0.0-M4 or later to avoid interoperability issues
+====
+Maven Surefire/Failsafe 3.0.0-M4
+https://issues.apache.org/jira/browse/SUREFIRE-1585[introduced support] for aligning the
+version of the JUnit Platform Launcher it uses with the JUnit Platform version found on
+the test runtime classpath. Therefore, it is recommended to use version 3.0.0-M4 or later
+to avoid interoperability issues.
+
+Alternatively, you can add a test dependency on the matching version of the JUnit Platform
+Launcher to your Maven build as follows.
+
+[source,xml]
+[subs=attributes+]
+----
+
+ org.junit.platform
+ junit-platform-launcher
+ {platform-version}
+ test
+
+----
+====
+
+TIP: See <> for details on how to override the version
of JUnit used in your Spring Boot application.
[[running-tests-build-maven-engines-configure]]
diff --git a/documentation/src/docs/asciidoc/user-guide/writing-tests.adoc b/documentation/src/docs/asciidoc/user-guide/writing-tests.adoc
index 6fb1838f63ec..45bddb0d0d4d 100644
--- a/documentation/src/docs/asciidoc/user-guide/writing-tests.adoc
+++ b/documentation/src/docs/asciidoc/user-guide/writing-tests.adoc
@@ -538,10 +538,18 @@ package example;
include::{testDir}/example/ExternalCustomConditionDemo.java[tags=user_guide_external_custom_condition]
----
-NOTE: When `@EnabledIf` or `@DisabledIf` is used at class level, the condition method must
-always be `static`. Condition methods located in external classes must also be `static`.
+[NOTE]
+====
+There are several cases where a condition method would need to be `static`:
+
+- when `@EnabledIf` or `@DisabledIf` is used at class level
+- when `@EnabledIf` or `@DisabledIf` is used on a `@ParameterizedTest` or a
+ `@TestTemplate` method
+- when the condition method is located in an external class
+
In any other case, you can use either static methods or instance methods as condition
methods.
+====
[TIP]
====
@@ -1398,9 +1406,11 @@ include::{testDir}/example/ExternalMethodSourceDemo.java[tags=external_MethodSou
Factory methods can declare parameters, which will be provided by registered
implementations of the `ParameterResolver` extension API. In the following example, the
factory method is referenced by its name since there is only one such method in the test
-class. If there are several methods with the same name, the factory method must be
-referenced by its fully qualified method name – for example,
-`@MethodSource("example.MyTests#factoryMethodWithArguments(java.lang.String)")`.
+class. If there are several local methods with the same name, parameters can also be
+provided to differentiate them – for example, `@MethodSource("factoryMethod()")` or
+`@MethodSource("factoryMethod(java.lang.String)")`. Alternatively, the factory method
+can be referenced by its fully qualified method name, e.g.
+`@MethodSource("example.MyTests#factoryMethod(java.lang.String)")`.
[source,java,indent=0]
----
@@ -1666,7 +1676,7 @@ integral types: `byte`, `short`, `int`, `long`, and their boxed counterparts.
| `java.math.BigDecimal` | `"123.456e789"` -> `new BigDecimal("123.456e789")`
| `java.math.BigInteger` | `"1234567890123456789"` -> `new BigInteger("1234567890123456789")`
| `java.net.URI` | `"https://junit.org/"` -> `URI.create("https://junit.org/")`
-| `java.net.URL` | `"https://junit.org/"` -> `new URL("https://junit.org/")`
+| `java.net.URL` | `"https://junit.org/"` -> `URI.create("https://junit.org/").toURL()`
| `java.nio.charset.Charset` | `"UTF-8"` -> `Charset.forName("UTF-8")`
| `java.nio.file.Path` | `"/path/to/file"` -> `Paths.get("/path/to/file")`
| `java.time.Duration` | `"PT3S"` -> `Duration.ofSeconds(3)`
@@ -2336,6 +2346,8 @@ configuration parameter to one of the following options.
`fixed`::
Uses the mandatory `junit.jupiter.execution.parallel.config.fixed.parallelism`
configuration parameter as the desired parallelism.
+ The optional `junit.jupiter.execution.parallel.config.fixed.max-pool-size`
+ configuration parameter can be used to limit the maximum number of threads.
`custom`::
Allows you to specify a custom `{ParallelExecutionConfigurationStrategy}`
@@ -2346,13 +2358,15 @@ If no configuration strategy is set, JUnit Jupiter uses the `dynamic` configurat
strategy with a factor of `1`. Consequently, the desired parallelism will be equal to the
number of available processors/cores.
-.Parallelism does not imply maximum number of concurrent threads
-NOTE: JUnit Jupiter does not guarantee that the number of concurrently executing tests
-will not exceed the configured parallelism. For example, when using one of the
-synchronization mechanisms described in the next section, the `ForkJoinPool` that is used
-behind the scenes may spawn additional threads to ensure execution continues with
-sufficient parallelism. Thus, if you require such guarantees in a test class, please use
-your own means of controlling concurrency.
+.Parallelism alone does not imply maximum number of concurrent threads
+NOTE: By default JUnit Jupiter does not guarantee that the number of concurrently
+executing tests will not exceed the configured parallelism. For example, when using one
+of the synchronization mechanisms described in the next section, the `ForkJoinPool` that
+is used behind the scenes may spawn additional threads to ensure execution continues with
+sufficient parallelism.
+If you require such guarantees, with Java 9+, it is possible to limit the maximum number
+of concurrent threads by controlling the maximum pool size of the `fixed` and `custom`
+strategies.
[[writing-tests-parallel-execution-config-properties]]
===== Relevant properties
@@ -2404,6 +2418,20 @@ The following table lists relevant properties for configuring parallel execution
| a positive integer
| no default value
+| ```junit.jupiter.execution.parallel.config.fixed.max-pool-size```
+| Desired maximum pool size of the underlying fork-join pool for the ```fixed```
+ configuration strategy
+| a positive integer, must greater than or equal to `junit.jupiter.execution.parallel.config.fixed.parallelism`
+| 256 + the value of `junit.jupiter.execution.parallel.config.fixed.parallelism`
+
+| ```junit.jupiter.execution.parallel.config.fixed.saturate```
+| Disable saturation of the underlying fork-join pool for the ```fixed``` configuration
+ strategy
+|
+ * `true`
+ * `false`
+| ```true```
+
| ```junit.jupiter.execution.parallel.config.custom.class```
| Fully qualified class name of the _ParallelExecutionConfigurationStrategy_ to be
used for the ```custom``` configuration strategy
diff --git a/documentation/src/main/java/example/domain/Person.java b/documentation/src/main/java/example/domain/Person.java
index 2baf09e52879..b628febd36cf 100644
--- a/documentation/src/main/java/example/domain/Person.java
+++ b/documentation/src/main/java/example/domain/Person.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/documentation/src/main/java/example/registration/WebClient.java b/documentation/src/main/java/example/registration/WebClient.java
index 153222b66248..b907c2c58e95 100644
--- a/documentation/src/main/java/example/registration/WebClient.java
+++ b/documentation/src/main/java/example/registration/WebClient.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/documentation/src/main/java/example/registration/WebResponse.java b/documentation/src/main/java/example/registration/WebResponse.java
index 39c71a400436..598239f44c24 100644
--- a/documentation/src/main/java/example/registration/WebResponse.java
+++ b/documentation/src/main/java/example/registration/WebResponse.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/documentation/src/main/java/example/registration/WebServerExtension.java b/documentation/src/main/java/example/registration/WebServerExtension.java
index adcae9157bcc..80fefe787b89 100644
--- a/documentation/src/main/java/example/registration/WebServerExtension.java
+++ b/documentation/src/main/java/example/registration/WebServerExtension.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/documentation/src/main/java/example/util/Calculator.java b/documentation/src/main/java/example/util/Calculator.java
index c096b71e1877..98291f6a78fe 100644
--- a/documentation/src/main/java/example/util/Calculator.java
+++ b/documentation/src/main/java/example/util/Calculator.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/documentation/src/main/java/example/util/ListWriter.java b/documentation/src/main/java/example/util/ListWriter.java
index 3420f34a1601..88fb73137ff6 100644
--- a/documentation/src/main/java/example/util/ListWriter.java
+++ b/documentation/src/main/java/example/util/ListWriter.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/documentation/src/main/java/example/util/StringUtils.java b/documentation/src/main/java/example/util/StringUtils.java
index 2a09131c8469..b622aa3efb90 100644
--- a/documentation/src/main/java/example/util/StringUtils.java
+++ b/documentation/src/main/java/example/util/StringUtils.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/documentation/src/test/java/example/AssertionsDemo.java b/documentation/src/test/java/example/AssertionsDemo.java
index 18f398c9577e..a9cd383df6c1 100644
--- a/documentation/src/test/java/example/AssertionsDemo.java
+++ b/documentation/src/test/java/example/AssertionsDemo.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/documentation/src/test/java/example/AssumptionsDemo.java b/documentation/src/test/java/example/AssumptionsDemo.java
index 0f6755c67bec..41438feabb2f 100644
--- a/documentation/src/test/java/example/AssumptionsDemo.java
+++ b/documentation/src/test/java/example/AssumptionsDemo.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/documentation/src/test/java/example/ConditionalTestExecutionDemo.java b/documentation/src/test/java/example/ConditionalTestExecutionDemo.java
index a85031a1117c..146443c260c1 100644
--- a/documentation/src/test/java/example/ConditionalTestExecutionDemo.java
+++ b/documentation/src/test/java/example/ConditionalTestExecutionDemo.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/documentation/src/test/java/example/CustomTestEngine.java b/documentation/src/test/java/example/CustomTestEngine.java
index e14c4821e7b1..a1d0eb31bb47 100644
--- a/documentation/src/test/java/example/CustomTestEngine.java
+++ b/documentation/src/test/java/example/CustomTestEngine.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/documentation/src/test/java/example/DisabledClassDemo.java b/documentation/src/test/java/example/DisabledClassDemo.java
index a4c8168aa2d8..a2453a2aac27 100644
--- a/documentation/src/test/java/example/DisabledClassDemo.java
+++ b/documentation/src/test/java/example/DisabledClassDemo.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/documentation/src/test/java/example/DisabledTestsDemo.java b/documentation/src/test/java/example/DisabledTestsDemo.java
index 72d146f793b3..e1a7f6c0ad68 100644
--- a/documentation/src/test/java/example/DisabledTestsDemo.java
+++ b/documentation/src/test/java/example/DisabledTestsDemo.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/documentation/src/test/java/example/DisplayNameDemo.java b/documentation/src/test/java/example/DisplayNameDemo.java
index eda1c9347586..c9ee6fed5ddc 100644
--- a/documentation/src/test/java/example/DisplayNameDemo.java
+++ b/documentation/src/test/java/example/DisplayNameDemo.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/documentation/src/test/java/example/DisplayNameGeneratorDemo.java b/documentation/src/test/java/example/DisplayNameGeneratorDemo.java
index f5170e4c5bc5..f1483d15c67e 100644
--- a/documentation/src/test/java/example/DisplayNameGeneratorDemo.java
+++ b/documentation/src/test/java/example/DisplayNameGeneratorDemo.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/documentation/src/test/java/example/DocumentationTestSuite.java b/documentation/src/test/java/example/DocumentationTestSuite.java
index 52b5659b29cd..b3bc6dd0029b 100644
--- a/documentation/src/test/java/example/DocumentationTestSuite.java
+++ b/documentation/src/test/java/example/DocumentationTestSuite.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/documentation/src/test/java/example/DynamicTestsDemo.java b/documentation/src/test/java/example/DynamicTestsDemo.java
index 78081a93690b..8a8d9bef9ac0 100644
--- a/documentation/src/test/java/example/DynamicTestsDemo.java
+++ b/documentation/src/test/java/example/DynamicTestsDemo.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/documentation/src/test/java/example/ExampleTestCase.java b/documentation/src/test/java/example/ExampleTestCase.java
index 70669434358c..2a898b33e08b 100644
--- a/documentation/src/test/java/example/ExampleTestCase.java
+++ b/documentation/src/test/java/example/ExampleTestCase.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/documentation/src/test/java/example/ExternalCustomConditionDemo.java b/documentation/src/test/java/example/ExternalCustomConditionDemo.java
index afa135502243..024b07d27854 100644
--- a/documentation/src/test/java/example/ExternalCustomConditionDemo.java
+++ b/documentation/src/test/java/example/ExternalCustomConditionDemo.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/documentation/src/test/java/example/ExternalMethodSourceDemo.java b/documentation/src/test/java/example/ExternalMethodSourceDemo.java
index 93c35a6eb567..1d8299367e9b 100644
--- a/documentation/src/test/java/example/ExternalMethodSourceDemo.java
+++ b/documentation/src/test/java/example/ExternalMethodSourceDemo.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/documentation/src/test/java/example/Fast.java b/documentation/src/test/java/example/Fast.java
index 0908da76d652..1e7c78e6f6b6 100644
--- a/documentation/src/test/java/example/Fast.java
+++ b/documentation/src/test/java/example/Fast.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/documentation/src/test/java/example/FastTest.java b/documentation/src/test/java/example/FastTest.java
index 9d5fcd7e4722..af31b49d5699 100644
--- a/documentation/src/test/java/example/FastTest.java
+++ b/documentation/src/test/java/example/FastTest.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/documentation/src/test/java/example/HamcrestAssertionsDemo.java b/documentation/src/test/java/example/HamcrestAssertionsDemo.java
index 6b74a22df88a..8fa219829ce3 100644
--- a/documentation/src/test/java/example/HamcrestAssertionsDemo.java
+++ b/documentation/src/test/java/example/HamcrestAssertionsDemo.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/documentation/src/test/java/example/IgnoredTestsDemo.java b/documentation/src/test/java/example/IgnoredTestsDemo.java
index 75289a0948fc..96fca01c8ade 100644
--- a/documentation/src/test/java/example/IgnoredTestsDemo.java
+++ b/documentation/src/test/java/example/IgnoredTestsDemo.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/documentation/src/test/java/example/JUnit4Tests.java b/documentation/src/test/java/example/JUnit4Tests.java
index 86babd497881..d229e639fa2d 100644
--- a/documentation/src/test/java/example/JUnit4Tests.java
+++ b/documentation/src/test/java/example/JUnit4Tests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/documentation/src/test/java/example/JUnitPlatformClassDemo.java b/documentation/src/test/java/example/JUnitPlatformClassDemo.java
index be2844623c05..0bf0aeb06220 100644
--- a/documentation/src/test/java/example/JUnitPlatformClassDemo.java
+++ b/documentation/src/test/java/example/JUnitPlatformClassDemo.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/documentation/src/test/java/example/JUnitPlatformSuiteDemo.java b/documentation/src/test/java/example/JUnitPlatformSuiteDemo.java
index 7dd7296ed015..b563204fff2b 100644
--- a/documentation/src/test/java/example/JUnitPlatformSuiteDemo.java
+++ b/documentation/src/test/java/example/JUnitPlatformSuiteDemo.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/documentation/src/test/java/example/MethodSourceParameterResolutionDemo.java b/documentation/src/test/java/example/MethodSourceParameterResolutionDemo.java
index 36ea8701d907..45b35dbcc964 100644
--- a/documentation/src/test/java/example/MethodSourceParameterResolutionDemo.java
+++ b/documentation/src/test/java/example/MethodSourceParameterResolutionDemo.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/documentation/src/test/java/example/MyFirstJUnitJupiterTests.java b/documentation/src/test/java/example/MyFirstJUnitJupiterTests.java
index d1ddbc5b77bc..77632abc3be5 100644
--- a/documentation/src/test/java/example/MyFirstJUnitJupiterTests.java
+++ b/documentation/src/test/java/example/MyFirstJUnitJupiterTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/documentation/src/test/java/example/OrderedNestedTestClassesDemo.java b/documentation/src/test/java/example/OrderedNestedTestClassesDemo.java
index 194bfcbe3828..b5e987daca65 100644
--- a/documentation/src/test/java/example/OrderedNestedTestClassesDemo.java
+++ b/documentation/src/test/java/example/OrderedNestedTestClassesDemo.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/documentation/src/test/java/example/OrderedTestsDemo.java b/documentation/src/test/java/example/OrderedTestsDemo.java
index 10399dff02be..2ee01d3335cf 100644
--- a/documentation/src/test/java/example/OrderedTestsDemo.java
+++ b/documentation/src/test/java/example/OrderedTestsDemo.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/documentation/src/test/java/example/ParameterizedTestDemo.java b/documentation/src/test/java/example/ParameterizedTestDemo.java
index 0a35327b10e5..3afd887265e2 100644
--- a/documentation/src/test/java/example/ParameterizedTestDemo.java
+++ b/documentation/src/test/java/example/ParameterizedTestDemo.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/documentation/src/test/java/example/PollingTimeoutDemo.java b/documentation/src/test/java/example/PollingTimeoutDemo.java
index 88708cf270f1..a10b7cec8edd 100644
--- a/documentation/src/test/java/example/PollingTimeoutDemo.java
+++ b/documentation/src/test/java/example/PollingTimeoutDemo.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/documentation/src/test/java/example/RepeatedTestsDemo.java b/documentation/src/test/java/example/RepeatedTestsDemo.java
index a414d053e036..ccf468456466 100644
--- a/documentation/src/test/java/example/RepeatedTestsDemo.java
+++ b/documentation/src/test/java/example/RepeatedTestsDemo.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/documentation/src/test/java/example/SharedResourcesDemo.java b/documentation/src/test/java/example/SharedResourcesDemo.java
index b71d3e500ed1..be3d12b3ce99 100644
--- a/documentation/src/test/java/example/SharedResourcesDemo.java
+++ b/documentation/src/test/java/example/SharedResourcesDemo.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/documentation/src/test/java/example/SlowTests.java b/documentation/src/test/java/example/SlowTests.java
index 10e88d044160..f3c711e7b393 100644
--- a/documentation/src/test/java/example/SlowTests.java
+++ b/documentation/src/test/java/example/SlowTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/documentation/src/test/java/example/StandardTests.java b/documentation/src/test/java/example/StandardTests.java
index a2bd484c237e..4a6a660ea932 100644
--- a/documentation/src/test/java/example/StandardTests.java
+++ b/documentation/src/test/java/example/StandardTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/documentation/src/test/java/example/SuiteDemo.java b/documentation/src/test/java/example/SuiteDemo.java
index 182d863900cd..617806b3d035 100644
--- a/documentation/src/test/java/example/SuiteDemo.java
+++ b/documentation/src/test/java/example/SuiteDemo.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/documentation/src/test/java/example/TaggingDemo.java b/documentation/src/test/java/example/TaggingDemo.java
index 3ec3c925b1c1..ebe9594b1c2d 100644
--- a/documentation/src/test/java/example/TaggingDemo.java
+++ b/documentation/src/test/java/example/TaggingDemo.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/documentation/src/test/java/example/TempDirCleanupModeDemo.java b/documentation/src/test/java/example/TempDirCleanupModeDemo.java
index ed164c25a377..84c05b4b7999 100644
--- a/documentation/src/test/java/example/TempDirCleanupModeDemo.java
+++ b/documentation/src/test/java/example/TempDirCleanupModeDemo.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/documentation/src/test/java/example/TempDirectoryDemo.java b/documentation/src/test/java/example/TempDirectoryDemo.java
index d41b6983d85d..70ce582217c3 100644
--- a/documentation/src/test/java/example/TempDirectoryDemo.java
+++ b/documentation/src/test/java/example/TempDirectoryDemo.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/documentation/src/test/java/example/TestInfoDemo.java b/documentation/src/test/java/example/TestInfoDemo.java
index 2360fb07bb47..ac8f044edf17 100644
--- a/documentation/src/test/java/example/TestInfoDemo.java
+++ b/documentation/src/test/java/example/TestInfoDemo.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/documentation/src/test/java/example/TestReporterDemo.java b/documentation/src/test/java/example/TestReporterDemo.java
index 2a2f68cbe687..dbd78d94aa94 100644
--- a/documentation/src/test/java/example/TestReporterDemo.java
+++ b/documentation/src/test/java/example/TestReporterDemo.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/documentation/src/test/java/example/TestTemplateDemo.java b/documentation/src/test/java/example/TestTemplateDemo.java
index 4378ededc314..5f0c56a24a37 100644
--- a/documentation/src/test/java/example/TestTemplateDemo.java
+++ b/documentation/src/test/java/example/TestTemplateDemo.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/documentation/src/test/java/example/TestingAStackDemo.java b/documentation/src/test/java/example/TestingAStackDemo.java
index d46ff8bf253a..ab7b8339c989 100644
--- a/documentation/src/test/java/example/TestingAStackDemo.java
+++ b/documentation/src/test/java/example/TestingAStackDemo.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/documentation/src/test/java/example/TimeoutDemo.java b/documentation/src/test/java/example/TimeoutDemo.java
index 066bbf8d40c2..8700f23e4bad 100644
--- a/documentation/src/test/java/example/TimeoutDemo.java
+++ b/documentation/src/test/java/example/TimeoutDemo.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/documentation/src/test/java/example/UsingTheLauncherDemo.java b/documentation/src/test/java/example/UsingTheLauncherDemo.java
index a4629c04a111..403e9084c610 100644
--- a/documentation/src/test/java/example/UsingTheLauncherDemo.java
+++ b/documentation/src/test/java/example/UsingTheLauncherDemo.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/documentation/src/test/java/example/callbacks/AbstractDatabaseTests.java b/documentation/src/test/java/example/callbacks/AbstractDatabaseTests.java
index 8010fd31c696..a6eef4489d07 100644
--- a/documentation/src/test/java/example/callbacks/AbstractDatabaseTests.java
+++ b/documentation/src/test/java/example/callbacks/AbstractDatabaseTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/documentation/src/test/java/example/callbacks/BrokenLifecycleMethodConfigDemo.java b/documentation/src/test/java/example/callbacks/BrokenLifecycleMethodConfigDemo.java
index 6e4880eb4537..03da5ff8f086 100644
--- a/documentation/src/test/java/example/callbacks/BrokenLifecycleMethodConfigDemo.java
+++ b/documentation/src/test/java/example/callbacks/BrokenLifecycleMethodConfigDemo.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/documentation/src/test/java/example/callbacks/DatabaseTestsDemo.java b/documentation/src/test/java/example/callbacks/DatabaseTestsDemo.java
index b7eb652907b4..792c778810c3 100644
--- a/documentation/src/test/java/example/callbacks/DatabaseTestsDemo.java
+++ b/documentation/src/test/java/example/callbacks/DatabaseTestsDemo.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/documentation/src/test/java/example/callbacks/Extension1.java b/documentation/src/test/java/example/callbacks/Extension1.java
index b1658aa451dc..f0f5e697ba8a 100644
--- a/documentation/src/test/java/example/callbacks/Extension1.java
+++ b/documentation/src/test/java/example/callbacks/Extension1.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/documentation/src/test/java/example/callbacks/Extension2.java b/documentation/src/test/java/example/callbacks/Extension2.java
index b7ad2849598a..a7cc878f1f76 100644
--- a/documentation/src/test/java/example/callbacks/Extension2.java
+++ b/documentation/src/test/java/example/callbacks/Extension2.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/documentation/src/test/java/example/callbacks/Logger.java b/documentation/src/test/java/example/callbacks/Logger.java
index 7bfe2399bc5b..ab2271256b3f 100644
--- a/documentation/src/test/java/example/callbacks/Logger.java
+++ b/documentation/src/test/java/example/callbacks/Logger.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/documentation/src/test/java/example/defaultmethods/ComparableContract.java b/documentation/src/test/java/example/defaultmethods/ComparableContract.java
index c5580d303d80..f72d80f8894c 100644
--- a/documentation/src/test/java/example/defaultmethods/ComparableContract.java
+++ b/documentation/src/test/java/example/defaultmethods/ComparableContract.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/documentation/src/test/java/example/defaultmethods/EqualsContract.java b/documentation/src/test/java/example/defaultmethods/EqualsContract.java
index c986a0b6f619..36e30258ca92 100644
--- a/documentation/src/test/java/example/defaultmethods/EqualsContract.java
+++ b/documentation/src/test/java/example/defaultmethods/EqualsContract.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/documentation/src/test/java/example/defaultmethods/StringTests.java b/documentation/src/test/java/example/defaultmethods/StringTests.java
index 85aaac73afb1..1449f28f8dbd 100644
--- a/documentation/src/test/java/example/defaultmethods/StringTests.java
+++ b/documentation/src/test/java/example/defaultmethods/StringTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/documentation/src/test/java/example/defaultmethods/Testable.java b/documentation/src/test/java/example/defaultmethods/Testable.java
index f1ac340faf34..84bf397b87eb 100644
--- a/documentation/src/test/java/example/defaultmethods/Testable.java
+++ b/documentation/src/test/java/example/defaultmethods/Testable.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/documentation/src/test/java/example/exception/IgnoreIOExceptionExtension.java b/documentation/src/test/java/example/exception/IgnoreIOExceptionExtension.java
index 266f39292cc8..f2010d1b8efb 100644
--- a/documentation/src/test/java/example/exception/IgnoreIOExceptionExtension.java
+++ b/documentation/src/test/java/example/exception/IgnoreIOExceptionExtension.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/documentation/src/test/java/example/exception/IgnoreIOExceptionTests.java b/documentation/src/test/java/example/exception/IgnoreIOExceptionTests.java
index 6df8ce4a72e0..ca706586e858 100644
--- a/documentation/src/test/java/example/exception/IgnoreIOExceptionTests.java
+++ b/documentation/src/test/java/example/exception/IgnoreIOExceptionTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/documentation/src/test/java/example/exception/MultipleHandlersTestCase.java b/documentation/src/test/java/example/exception/MultipleHandlersTestCase.java
index 709231a6bcaa..3db997fe97a0 100644
--- a/documentation/src/test/java/example/exception/MultipleHandlersTestCase.java
+++ b/documentation/src/test/java/example/exception/MultipleHandlersTestCase.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/documentation/src/test/java/example/exception/RecordStateOnErrorExtension.java b/documentation/src/test/java/example/exception/RecordStateOnErrorExtension.java
index 5b2804684915..ed4c76979b32 100644
--- a/documentation/src/test/java/example/exception/RecordStateOnErrorExtension.java
+++ b/documentation/src/test/java/example/exception/RecordStateOnErrorExtension.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/documentation/src/test/java/example/extensions/Random.java b/documentation/src/test/java/example/extensions/Random.java
index 9d83f3d4da94..4b9a904d0bb1 100644
--- a/documentation/src/test/java/example/extensions/Random.java
+++ b/documentation/src/test/java/example/extensions/Random.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/documentation/src/test/java/example/extensions/RandomNumberDemo.java b/documentation/src/test/java/example/extensions/RandomNumberDemo.java
index 24db76bc013f..d52af0a65ef8 100644
--- a/documentation/src/test/java/example/extensions/RandomNumberDemo.java
+++ b/documentation/src/test/java/example/extensions/RandomNumberDemo.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/documentation/src/test/java/example/extensions/RandomNumberExtension.java b/documentation/src/test/java/example/extensions/RandomNumberExtension.java
index f3ed2c9f2631..98f1d1ace3f8 100644
--- a/documentation/src/test/java/example/extensions/RandomNumberExtension.java
+++ b/documentation/src/test/java/example/extensions/RandomNumberExtension.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/documentation/src/test/java/example/interceptor/SwingEdtInterceptor.java b/documentation/src/test/java/example/interceptor/SwingEdtInterceptor.java
index 5970b80b9dd7..b12094f382b9 100644
--- a/documentation/src/test/java/example/interceptor/SwingEdtInterceptor.java
+++ b/documentation/src/test/java/example/interceptor/SwingEdtInterceptor.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/documentation/src/test/java/example/registration/DocumentationDemo.java b/documentation/src/test/java/example/registration/DocumentationDemo.java
index c5cf431bce48..973b4f1967e3 100644
--- a/documentation/src/test/java/example/registration/DocumentationDemo.java
+++ b/documentation/src/test/java/example/registration/DocumentationDemo.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/documentation/src/test/java/example/registration/WebServerDemo.java b/documentation/src/test/java/example/registration/WebServerDemo.java
index 0ade52412975..25a6b2797305 100644
--- a/documentation/src/test/java/example/registration/WebServerDemo.java
+++ b/documentation/src/test/java/example/registration/WebServerDemo.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/documentation/src/test/java/example/session/GlobalSetupTeardownListener.java b/documentation/src/test/java/example/session/GlobalSetupTeardownListener.java
index 6d3417817d45..595be12b4717 100644
--- a/documentation/src/test/java/example/session/GlobalSetupTeardownListener.java
+++ b/documentation/src/test/java/example/session/GlobalSetupTeardownListener.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/documentation/src/test/java/example/session/HttpTests.java b/documentation/src/test/java/example/session/HttpTests.java
index 01477b6b0d75..cbdf5367cdfd 100644
--- a/documentation/src/test/java/example/session/HttpTests.java
+++ b/documentation/src/test/java/example/session/HttpTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
@@ -14,6 +14,7 @@
import static org.junit.jupiter.api.Assertions.assertEquals;
import java.net.HttpURLConnection;
+import java.net.URI;
import java.net.URL;
import org.junit.jupiter.api.Test;
@@ -24,7 +25,7 @@ class HttpTests {
void respondsWith204() throws Exception {
String host = System.getProperty("http.server.host"); // <1>
String port = System.getProperty("http.server.port"); // <2>
- URL url = new URL("https://" + host + ":" + port + "/test");
+ URL url = URI.create("https://" + host + ":" + port + "/test").toURL();
HttpURLConnection connection = (HttpURLConnection) url.openConnection();
connection.setRequestMethod("GET");
diff --git a/documentation/src/test/java/example/testinterface/TestInterfaceDemo.java b/documentation/src/test/java/example/testinterface/TestInterfaceDemo.java
index e37ee55e4bf2..b24ab3413733 100644
--- a/documentation/src/test/java/example/testinterface/TestInterfaceDemo.java
+++ b/documentation/src/test/java/example/testinterface/TestInterfaceDemo.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/documentation/src/test/java/example/testinterface/TestInterfaceDynamicTestsDemo.java b/documentation/src/test/java/example/testinterface/TestInterfaceDynamicTestsDemo.java
index 41cce3456765..694192dbabf0 100644
--- a/documentation/src/test/java/example/testinterface/TestInterfaceDynamicTestsDemo.java
+++ b/documentation/src/test/java/example/testinterface/TestInterfaceDynamicTestsDemo.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/documentation/src/test/java/example/testinterface/TestLifecycleLogger.java b/documentation/src/test/java/example/testinterface/TestLifecycleLogger.java
index 1d4ccbe818a1..b269bfb69a1b 100644
--- a/documentation/src/test/java/example/testinterface/TestLifecycleLogger.java
+++ b/documentation/src/test/java/example/testinterface/TestLifecycleLogger.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/documentation/src/test/java/example/testinterface/TimeExecutionLogger.java b/documentation/src/test/java/example/testinterface/TimeExecutionLogger.java
index 1f0d28276e6e..b3a53feae91a 100644
--- a/documentation/src/test/java/example/testinterface/TimeExecutionLogger.java
+++ b/documentation/src/test/java/example/testinterface/TimeExecutionLogger.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/documentation/src/test/java/example/testkit/EngineTestKitAllEventsDemo.java b/documentation/src/test/java/example/testkit/EngineTestKitAllEventsDemo.java
index 2a8991c45f93..5df68019e433 100644
--- a/documentation/src/test/java/example/testkit/EngineTestKitAllEventsDemo.java
+++ b/documentation/src/test/java/example/testkit/EngineTestKitAllEventsDemo.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/documentation/src/test/java/example/testkit/EngineTestKitFailedMethodDemo.java b/documentation/src/test/java/example/testkit/EngineTestKitFailedMethodDemo.java
index fe13c967edb0..40ea51ba8a80 100644
--- a/documentation/src/test/java/example/testkit/EngineTestKitFailedMethodDemo.java
+++ b/documentation/src/test/java/example/testkit/EngineTestKitFailedMethodDemo.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/documentation/src/test/java/example/testkit/EngineTestKitSkippedMethodDemo.java b/documentation/src/test/java/example/testkit/EngineTestKitSkippedMethodDemo.java
index 401e76881bb7..1d06770f1a25 100644
--- a/documentation/src/test/java/example/testkit/EngineTestKitSkippedMethodDemo.java
+++ b/documentation/src/test/java/example/testkit/EngineTestKitSkippedMethodDemo.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/documentation/src/test/java/example/testkit/EngineTestKitStatisticsDemo.java b/documentation/src/test/java/example/testkit/EngineTestKitStatisticsDemo.java
index 0f0d92d5be0d..b9576352389b 100644
--- a/documentation/src/test/java/example/testkit/EngineTestKitStatisticsDemo.java
+++ b/documentation/src/test/java/example/testkit/EngineTestKitStatisticsDemo.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/documentation/src/test/java/example/timing/TimingExtension.java b/documentation/src/test/java/example/timing/TimingExtension.java
index c82321201a5e..b6b51d61ce99 100644
--- a/documentation/src/test/java/example/timing/TimingExtension.java
+++ b/documentation/src/test/java/example/timing/TimingExtension.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/documentation/src/test/java/example/timing/TimingExtensionTests.java b/documentation/src/test/java/example/timing/TimingExtensionTests.java
index cf84479e7450..ee84b196b066 100644
--- a/documentation/src/test/java/example/timing/TimingExtensionTests.java
+++ b/documentation/src/test/java/example/timing/TimingExtensionTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/documentation/src/test/java/extensions/ExpectToFail.java b/documentation/src/test/java/extensions/ExpectToFail.java
index fb14a7d110eb..8dd21a717caa 100644
--- a/documentation/src/test/java/extensions/ExpectToFail.java
+++ b/documentation/src/test/java/extensions/ExpectToFail.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/documentation/src/test/java/org/junit/api/tools/AbstractApiReportWriter.java b/documentation/src/test/java/org/junit/api/tools/AbstractApiReportWriter.java
index 29b2909d3cd7..6b9a143ca463 100644
--- a/documentation/src/test/java/org/junit/api/tools/AbstractApiReportWriter.java
+++ b/documentation/src/test/java/org/junit/api/tools/AbstractApiReportWriter.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/documentation/src/test/java/org/junit/api/tools/ApiReport.java b/documentation/src/test/java/org/junit/api/tools/ApiReport.java
index 3d8a6fb498fc..b21e63e8face 100644
--- a/documentation/src/test/java/org/junit/api/tools/ApiReport.java
+++ b/documentation/src/test/java/org/junit/api/tools/ApiReport.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/documentation/src/test/java/org/junit/api/tools/ApiReportGenerator.java b/documentation/src/test/java/org/junit/api/tools/ApiReportGenerator.java
index 637513538d5f..7bdb6c21b40d 100644
--- a/documentation/src/test/java/org/junit/api/tools/ApiReportGenerator.java
+++ b/documentation/src/test/java/org/junit/api/tools/ApiReportGenerator.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/documentation/src/test/java/org/junit/api/tools/ApiReportWriter.java b/documentation/src/test/java/org/junit/api/tools/ApiReportWriter.java
index 30c430d05fe1..c231d1b4ba43 100644
--- a/documentation/src/test/java/org/junit/api/tools/ApiReportWriter.java
+++ b/documentation/src/test/java/org/junit/api/tools/ApiReportWriter.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/documentation/src/test/java/org/junit/api/tools/AsciidocApiReportWriter.java b/documentation/src/test/java/org/junit/api/tools/AsciidocApiReportWriter.java
index ce688064103e..05748d36aee3 100644
--- a/documentation/src/test/java/org/junit/api/tools/AsciidocApiReportWriter.java
+++ b/documentation/src/test/java/org/junit/api/tools/AsciidocApiReportWriter.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/documentation/src/test/java/org/junit/api/tools/HtmlApiReportWriter.java b/documentation/src/test/java/org/junit/api/tools/HtmlApiReportWriter.java
index c27ca6b9cee0..48193368370e 100644
--- a/documentation/src/test/java/org/junit/api/tools/HtmlApiReportWriter.java
+++ b/documentation/src/test/java/org/junit/api/tools/HtmlApiReportWriter.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/documentation/src/test/java/org/junit/api/tools/MarkdownApiReportWriter.java b/documentation/src/test/java/org/junit/api/tools/MarkdownApiReportWriter.java
index a6296d1a3c1c..6294ac58179b 100644
--- a/documentation/src/test/java/org/junit/api/tools/MarkdownApiReportWriter.java
+++ b/documentation/src/test/java/org/junit/api/tools/MarkdownApiReportWriter.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/documentation/src/test/kotlin/example/FibonacciCalculator.kt b/documentation/src/test/kotlin/example/FibonacciCalculator.kt
index 281cb7d492ef..33ddbe089ff1 100644
--- a/documentation/src/test/kotlin/example/FibonacciCalculator.kt
+++ b/documentation/src/test/kotlin/example/FibonacciCalculator.kt
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/documentation/src/test/kotlin/example/KotlinAssertionsDemo.kt b/documentation/src/test/kotlin/example/KotlinAssertionsDemo.kt
index 64afa0de38cd..2870ae95ac25 100644
--- a/documentation/src/test/kotlin/example/KotlinAssertionsDemo.kt
+++ b/documentation/src/test/kotlin/example/KotlinAssertionsDemo.kt
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/documentation/src/test/kotlin/example/registration/KotlinWebServerDemo.kt b/documentation/src/test/kotlin/example/registration/KotlinWebServerDemo.kt
index 3f23480c7798..52a390fe7e0f 100644
--- a/documentation/src/test/kotlin/example/registration/KotlinWebServerDemo.kt
+++ b/documentation/src/test/kotlin/example/registration/KotlinWebServerDemo.kt
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/gradle.properties b/gradle.properties
index 6ada11024510..646efedee055 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -1,13 +1,13 @@
group = org.junit
-version = 5.9.1
+version = 5.9.3
jupiterGroup = org.junit.jupiter
platformGroup = org.junit.platform
-platformVersion = 1.9.1
+platformVersion = 1.9.3
vintageGroup = org.junit.vintage
-vintageVersion = 5.9.1
+vintageVersion = 5.9.3
defaultBuiltBy = JUnit Team
@@ -21,7 +21,7 @@ org.gradle.jvmargs=-Xmx1g -XX:MaxMetaspaceSize=512m -XX:+HeapDumpOnOutOfMemoryEr
--add-exports jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED
org.gradle.caching=true
org.gradle.parallel=true
-org.gradle.java.installations.fromEnv=JDK8,JDK18,JDK19,JDK20
+org.gradle.java.installations.fromEnv=JDK8,JDK18,JDK19,JDK20,JDK21
# Test Distribution
gradle.internal.testdistribution.writeTraceFile=true
diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml
index 6bfa0b03406f..3c1dc9dfe837 100644
--- a/gradle/libs.versions.toml
+++ b/gradle/libs.versions.toml
@@ -5,46 +5,46 @@ asciidoctor-pdf = "1.5.3"
assertj = "3.23.1"
checkstyle = "9.0"
jacoco = "0.8.7"
-jmh = "1.33"
+jmh = "1.36"
junit4 = "4.13.2"
junit4Osgi = "4.13.2_1"
junit4Min = "4.12"
ktlint = "0.43.0"
-log4j = "2.17.1"
+log4j = "2.19.0"
opentest4j = "1.2.0"
openTestReporting = "0.1.0-M1"
-surefire = "2.22.2"
-xmlunit = "2.8.4"
+surefire = "3.0.0-M7"
+xmlunit = "2.9.0"
[libraries]
ant = { module = "org.apache.ant:ant", version.ref = "ant" }
ant-junit = { module = "org.apache.ant:ant-junit", version.ref = "ant" }
ant-junitlauncher = { module = "org.apache.ant:ant-junitlauncher", version.ref = "ant" }
apiguardian = { module = "org.apiguardian:apiguardian-api", version.ref = "apiguardian" }
-archunit = { module = "com.tngtech.archunit:archunit-junit5", version = "0.23.1" }
+archunit = { module = "com.tngtech.archunit:archunit-junit5", version = "1.0.1" }
assertj = { module = "org.assertj:assertj-core", version.ref = "assertj" }
bartholdy = { module = "de.sormuras:bartholdy", version = "0.2.3" }
-bnd = { module = "biz.aQute.bnd:biz.aQute.bndlib", version = "6.3.1" }
-classgraph = { module = "io.github.classgraph:classgraph", version = "4.8.132" }
+bnd = { module = "biz.aQute.bnd:biz.aQute.bndlib", version = "6.4.0" }
+classgraph = { module = "io.github.classgraph:classgraph", version = "4.8.153" }
commons-io = { module = "commons-io:commons-io", version = "2.11.0" }
-groovy4 = { module = "org.apache.groovy:groovy", version = "4.0.1" }
+groovy4 = { module = "org.apache.groovy:groovy", version = "4.0.7" }
groovy2-bom = { module = "org.codehaus.groovy:groovy-bom", version = "2.5.14" }
hamcrest = { module = "org.hamcrest:hamcrest", version = "2.2" }
jfrunit = { module = "org.moditect.jfrunit:jfrunit-core", version = "1.0.0.Alpha2" }
jmh-core = { module = "org.openjdk.jmh:jmh-core", version.ref = "jmh" }
jmh-generator-annprocess = { module = "org.openjdk.jmh:jmh-generator-annprocess", version.ref = "jmh" }
-joox = { module = "org.jooq:joox", version = "1.6.2" }
+joox = { module = "org.jooq:joox", version = "2.0.0" }
junit4 = { module = "junit:junit", version = { require = "[4.12,)", prefer = "4.13.2" } }
-kotlinx-coroutines = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-core", version = "1.4.3" }
+kotlinx-coroutines = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-core", version = "1.6.4" }
log4j-core = { module = "org.apache.logging.log4j:log4j-core", version.ref = "log4j" }
log4j-jul = { module = "org.apache.logging.log4j:log4j-jul", version.ref = "log4j" }
-maven = { module = "org.apache.maven:apache-maven", version = "3.8.5" }
-mockito = { module = "org.mockito:mockito-junit-jupiter", version = "4.1.0" }
+maven = { module = "org.apache.maven:apache-maven", version = "3.8.6" }
+mockito = { module = "org.mockito:mockito-junit-jupiter", version = "4.11.0" }
opentest4j = { module = "org.opentest4j:opentest4j", version.ref = "opentest4j" }
openTestReporting-events = { module = "org.opentest4j.reporting:open-test-reporting-events", version.ref = "openTestReporting" }
openTestReporting-tooling = { module = "org.opentest4j.reporting:open-test-reporting-tooling", version.ref = "openTestReporting" }
-picocli = { module = "info.picocli:picocli", version = "4.6.2" }
-slf4j-julBinding = { module = "org.slf4j:slf4j-jdk14", version = "1.7.32" }
+picocli = { module = "info.picocli:picocli", version = "4.7.0" }
+slf4j-julBinding = { module = "org.slf4j:slf4j-jdk14", version = "2.0.6" }
spock1 = { module = "org.spockframework:spock-core", version = "1.3-groovy-2.5" }
univocity-parsers = { module = "com.univocity:univocity-parsers", version = "2.9.1" }
xmlunit-assertj = { module = "org.xmlunit:xmlunit-assertj3", version.ref = "xmlunit" }
diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar
index 249e5832f090..943f0cbfa754 100644
Binary files a/gradle/wrapper/gradle-wrapper.jar and b/gradle/wrapper/gradle-wrapper.jar differ
diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties
index b916c04dbb24..adb6acbd81b8 100644
--- a/gradle/wrapper/gradle-wrapper.properties
+++ b/gradle/wrapper/gradle-wrapper.properties
@@ -1,6 +1,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
-distributionSha256Sum=f6b8596b10cce501591e92f229816aa4046424f3b24d771751b06779d58c8ec4
-distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-bin.zip
+distributionSha256Sum=7ba68c54029790ab444b39d7e293d3236b2632631fb5f2e012bb28b4ff669e4b
+distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-bin.zip
+networkTimeout=10000
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
diff --git a/gradlew b/gradlew
index a69d9cb6c206..65dcd68d65c8 100755
--- a/gradlew
+++ b/gradlew
@@ -55,7 +55,7 @@
# Darwin, MinGW, and NonStop.
#
# (3) This script is generated from the Groovy template
-# https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
+# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# within the Gradle project.
#
# You can find Gradle at https://github.com/gradle/gradle/.
@@ -80,10 +80,10 @@ do
esac
done
-APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
-
-APP_NAME="Gradle"
+# This is normally unused
+# shellcheck disable=SC2034
APP_BASE_NAME=${0##*/}
+APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
@@ -143,12 +143,16 @@ fi
if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
case $MAX_FD in #(
max*)
+ # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
+ # shellcheck disable=SC3045
MAX_FD=$( ulimit -H -n ) ||
warn "Could not query maximum file descriptor limit"
esac
case $MAX_FD in #(
'' | soft) :;; #(
*)
+ # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
+ # shellcheck disable=SC3045
ulimit -n "$MAX_FD" ||
warn "Could not set maximum file descriptor limit to $MAX_FD"
esac
diff --git a/gradlew.bat b/gradlew.bat
index f127cfd49d40..93e3f59f135d 100644
--- a/gradlew.bat
+++ b/gradlew.bat
@@ -26,6 +26,7 @@ if "%OS%"=="Windows_NT" setlocal
set DIRNAME=%~dp0
if "%DIRNAME%"=="" set DIRNAME=.
+@rem This is normally unused
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%
diff --git a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/AfterAll.java b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/AfterAll.java
index d356d261c9ff..52743ebef416 100644
--- a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/AfterAll.java
+++ b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/AfterAll.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
@@ -29,17 +29,20 @@
*
*
Method Signatures
*
- *
{@code @AfterAll} methods must have a {@code void} return type, must not
- * be {@code private}, and must be {@code static} by default. Consequently,
- * {@code @AfterAll} methods are not supported in {@link Nested @Nested} test
- * classes or as interface default methods unless the test class is
- * annotated with {@link TestInstance @TestInstance(Lifecycle.PER_CLASS)}.
+ *
{@code @AfterAll} methods must have a {@code void} return type and must be
+ * {@code static} by default. Consequently, {@code @AfterAll} methods are not
+ * supported in {@link Nested @Nested} test classes or as interface default
+ * methods unless the test class is annotated with
+ * {@link TestInstance @TestInstance(Lifecycle.PER_CLASS)}.
* However, beginning with Java 16 {@code @AfterAll} methods may be declared as
* {@code static} in {@link Nested @Nested} test classes, and the
* {@code Lifecycle.PER_CLASS} restriction no longer applies. {@code @AfterAll}
* methods may optionally declare parameters to be resolved by
* {@link org.junit.jupiter.api.extension.ParameterResolver ParameterResolvers}.
*
+ *
Using {@code private} visibility for {@code @BeforeAll} methods is
+ * strongly discouraged and will be disallowed in a future release.
+ *
*
Inheritance and Execution Order
*
*
{@code @AfterAll} methods are inherited from superclasses as long as
diff --git a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/AfterEach.java b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/AfterEach.java
index 3e0cab029463..8dfd018fa4f9 100644
--- a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/AfterEach.java
+++ b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/AfterEach.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
@@ -28,8 +28,9 @@
*
*
Method Signatures
*
- *
{@code @AfterEach} methods must have a {@code void} return type,
- * must not be {@code private}, and must not be {@code static}.
+ *
{@code @AfterEach} methods must have a {@code void} return type and must
+ * not be {@code static}. Using {@code private} visibility is strongly
+ * discouraged and will be disallowed in a future release.
* They may optionally declare parameters to be resolved by
* {@link org.junit.jupiter.api.extension.ParameterResolver ParameterResolvers}.
*
diff --git a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/AssertAll.java b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/AssertAll.java
index 6424dd14b2cf..601e9ecf8d9c 100644
--- a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/AssertAll.java
+++ b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/AssertAll.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/AssertArrayEquals.java b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/AssertArrayEquals.java
index 2a2f8f6d2042..45d37399c0e1 100644
--- a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/AssertArrayEquals.java
+++ b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/AssertArrayEquals.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/AssertDoesNotThrow.java b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/AssertDoesNotThrow.java
index d11a3e0e6dbf..2d424aa7ed39 100644
--- a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/AssertDoesNotThrow.java
+++ b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/AssertDoesNotThrow.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/AssertEquals.java b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/AssertEquals.java
index 9afd4b1072c5..2a46cea309f3 100644
--- a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/AssertEquals.java
+++ b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/AssertEquals.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/AssertFalse.java b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/AssertFalse.java
index 8364cb64615b..5291a6ac6ead 100644
--- a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/AssertFalse.java
+++ b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/AssertFalse.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/AssertInstanceOf.java b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/AssertInstanceOf.java
index f1891d138c83..2f265f3fc237 100644
--- a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/AssertInstanceOf.java
+++ b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/AssertInstanceOf.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/AssertIterableEquals.java b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/AssertIterableEquals.java
index a569d2105b90..b837c449bca2 100644
--- a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/AssertIterableEquals.java
+++ b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/AssertIterableEquals.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/AssertLinesMatch.java b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/AssertLinesMatch.java
index 1479728830ed..03e79081bd9e 100644
--- a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/AssertLinesMatch.java
+++ b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/AssertLinesMatch.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/AssertNotEquals.java b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/AssertNotEquals.java
index 1e8be26c6a5e..5a37b059a0fc 100644
--- a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/AssertNotEquals.java
+++ b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/AssertNotEquals.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/AssertNotNull.java b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/AssertNotNull.java
index 71be7b88a72f..43787ab8c27b 100644
--- a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/AssertNotNull.java
+++ b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/AssertNotNull.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/AssertNotSame.java b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/AssertNotSame.java
index 753e734c2a34..66f795c7a75a 100644
--- a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/AssertNotSame.java
+++ b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/AssertNotSame.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/AssertNull.java b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/AssertNull.java
index 4a9e92b2d4a0..53ceb4ce099a 100644
--- a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/AssertNull.java
+++ b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/AssertNull.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/AssertSame.java b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/AssertSame.java
index c080b3e01f65..feafa36231c9 100644
--- a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/AssertSame.java
+++ b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/AssertSame.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/AssertThrows.java b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/AssertThrows.java
index d4e8b19d3498..b61570647cb5 100644
--- a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/AssertThrows.java
+++ b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/AssertThrows.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/AssertThrowsExactly.java b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/AssertThrowsExactly.java
index 39a4c2169367..8a669388b709 100644
--- a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/AssertThrowsExactly.java
+++ b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/AssertThrowsExactly.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/AssertTimeout.java b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/AssertTimeout.java
index 93c7c11f8a71..bfd1f66806ba 100644
--- a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/AssertTimeout.java
+++ b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/AssertTimeout.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/AssertTimeoutPreemptively.java b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/AssertTimeoutPreemptively.java
index 94534171dd01..4ff96b71556d 100644
--- a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/AssertTimeoutPreemptively.java
+++ b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/AssertTimeoutPreemptively.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/AssertTrue.java b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/AssertTrue.java
index 3d250a46f68e..cf4f94277a93 100644
--- a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/AssertTrue.java
+++ b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/AssertTrue.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/AssertionFailureBuilder.java b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/AssertionFailureBuilder.java
index b1df82fab85c..8d0341d3cb46 100644
--- a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/AssertionFailureBuilder.java
+++ b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/AssertionFailureBuilder.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/AssertionUtils.java b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/AssertionUtils.java
index c591c217dadb..48a74da2ce96 100644
--- a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/AssertionUtils.java
+++ b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/AssertionUtils.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/Assertions.java b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/Assertions.java
index 62fefbe630fb..1240caa55aa2 100644
--- a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/Assertions.java
+++ b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/Assertions.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/Assumptions.java b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/Assumptions.java
index d98a44d254e2..d0448a89778e 100644
--- a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/Assumptions.java
+++ b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/Assumptions.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/BeforeAll.java b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/BeforeAll.java
index 9b3b2878281c..30eba9b73746 100644
--- a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/BeforeAll.java
+++ b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/BeforeAll.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
@@ -29,17 +29,20 @@
*
*
Method Signatures
*
- *
{@code @BeforeAll} methods must have a {@code void} return type, must not
- * be {@code private}, and must be {@code static} by default. Consequently,
- * {@code @BeforeAll} methods are not supported in {@link Nested @Nested} test
- * classes or as interface default methods unless the test class is
- * annotated with {@link TestInstance @TestInstance(Lifecycle.PER_CLASS)}.
+ *
{@code @BeforeAll} methods must have a {@code void} return type and must
+ * be {@code static} by default. Consequently, {@code @BeforeAll} methods are
+ * not supported in {@link Nested @Nested} test classes or as interface
+ * default methods unless the test class is annotated with
+ * {@link TestInstance @TestInstance(Lifecycle.PER_CLASS)}.
* However, beginning with Java 16 {@code @BeforeAll} methods may be declared as
* {@code static} in {@link Nested @Nested} test classes, and the
* {@code Lifecycle.PER_CLASS} restriction no longer applies. {@code @BeforeAll}
* methods may optionally declare parameters to be resolved by
* {@link org.junit.jupiter.api.extension.ParameterResolver ParameterResolvers}.
*
+ *
Using {@code private} visibility for {@code @BeforeAll} methods is
+ * strongly discouraged and will be disallowed in a future release.
+ *
*
Inheritance and Execution Order
*
*
{@code @BeforeAll} methods are inherited from superclasses as long as
diff --git a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/BeforeEach.java b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/BeforeEach.java
index 8d8d2a0b4173..37ca2498c889 100644
--- a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/BeforeEach.java
+++ b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/BeforeEach.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
@@ -28,8 +28,9 @@
*
*
Method Signatures
*
- *
{@code @BeforeEach} methods must have a {@code void} return type,
- * must not be {@code private}, and must not be {@code static}.
+ *
{@code @BeforeEach} methods must have a {@code void} return type and must
+ * not be {@code static}. Using {@code private} visibility is strongly
+ * discouraged and will be disallowed in a future release.
* They may optionally declare parameters to be resolved by
* {@link org.junit.jupiter.api.extension.ParameterResolver ParameterResolvers}.
*
diff --git a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/ClassDescriptor.java b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/ClassDescriptor.java
index 7496c1caa876..5ad667d13c5c 100644
--- a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/ClassDescriptor.java
+++ b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/ClassDescriptor.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/ClassOrderer.java b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/ClassOrderer.java
index 0ebdbef03653..04017c02d9a5 100644
--- a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/ClassOrderer.java
+++ b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/ClassOrderer.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/ClassOrdererContext.java b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/ClassOrdererContext.java
index cc4d169eade8..1ec2e9b899c1 100644
--- a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/ClassOrdererContext.java
+++ b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/ClassOrdererContext.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/Disabled.java b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/Disabled.java
index 88b6f16d4b54..9a7717053491 100644
--- a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/Disabled.java
+++ b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/Disabled.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/DisplayName.java b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/DisplayName.java
index 5b250299829e..e99ee34c75fc 100644
--- a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/DisplayName.java
+++ b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/DisplayName.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/DisplayNameGeneration.java b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/DisplayNameGeneration.java
index 04adf0b37798..bb0e1bf9f70a 100644
--- a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/DisplayNameGeneration.java
+++ b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/DisplayNameGeneration.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/DisplayNameGenerator.java b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/DisplayNameGenerator.java
index e23fd31e39db..7d62049a266a 100644
--- a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/DisplayNameGenerator.java
+++ b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/DisplayNameGenerator.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/DynamicContainer.java b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/DynamicContainer.java
index bae75ee8304d..dcc48186c5ec 100644
--- a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/DynamicContainer.java
+++ b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/DynamicContainer.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/DynamicNode.java b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/DynamicNode.java
index 819f1e2b0f52..c1a151779f7f 100644
--- a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/DynamicNode.java
+++ b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/DynamicNode.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/DynamicTest.java b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/DynamicTest.java
index 62a018985741..935951663d48 100644
--- a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/DynamicTest.java
+++ b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/DynamicTest.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/IndicativeSentencesGeneration.java b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/IndicativeSentencesGeneration.java
index 1f8c916d664a..6925a2b69809 100644
--- a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/IndicativeSentencesGeneration.java
+++ b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/IndicativeSentencesGeneration.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/MethodDescriptor.java b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/MethodDescriptor.java
index 256326781eec..20550832e137 100644
--- a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/MethodDescriptor.java
+++ b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/MethodDescriptor.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/MethodOrderer.java b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/MethodOrderer.java
index 89950bf4dfa4..7818020d4b6e 100644
--- a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/MethodOrderer.java
+++ b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/MethodOrderer.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/MethodOrdererContext.java b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/MethodOrdererContext.java
index 970e0ba10620..cb585b709416 100644
--- a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/MethodOrdererContext.java
+++ b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/MethodOrdererContext.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/Named.java b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/Named.java
index 1b7cb774ce7d..6dee03e4a1ea 100644
--- a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/Named.java
+++ b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/Named.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/Nested.java b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/Nested.java
index cde1fb6b07ec..1627010af1a0 100644
--- a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/Nested.java
+++ b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/Nested.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/Order.java b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/Order.java
index e8203fb3cbb4..5b48253fe0c0 100644
--- a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/Order.java
+++ b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/Order.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/RepeatedTest.java b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/RepeatedTest.java
index e66dae0bb5fa..298de922599b 100644
--- a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/RepeatedTest.java
+++ b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/RepeatedTest.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/RepetitionInfo.java b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/RepetitionInfo.java
index b75e401f17d8..89f5d1f0340f 100644
--- a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/RepetitionInfo.java
+++ b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/RepetitionInfo.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/Tag.java b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/Tag.java
index bd6a232cae41..0def1ed38dcb 100644
--- a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/Tag.java
+++ b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/Tag.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/Tags.java b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/Tags.java
index 7ac55cb3eede..0d6526ecd9b8 100644
--- a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/Tags.java
+++ b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/Tags.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/Test.java b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/Test.java
index 2e3e53fec736..53c520bd2f2a 100644
--- a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/Test.java
+++ b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/Test.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/TestClassOrder.java b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/TestClassOrder.java
index a0e17823dd51..15eedf5659ae 100644
--- a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/TestClassOrder.java
+++ b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/TestClassOrder.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/TestFactory.java b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/TestFactory.java
index 45818bb6f142..96b1f5248a03 100644
--- a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/TestFactory.java
+++ b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/TestFactory.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/TestInfo.java b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/TestInfo.java
index cfb73b39eb49..c7949d1cbb78 100644
--- a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/TestInfo.java
+++ b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/TestInfo.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/TestInstance.java b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/TestInstance.java
index 96ebcbc1ed29..0e6ae3758b63 100644
--- a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/TestInstance.java
+++ b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/TestInstance.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/TestMethodOrder.java b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/TestMethodOrder.java
index 622ce030b182..2e6a571eed1c 100644
--- a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/TestMethodOrder.java
+++ b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/TestMethodOrder.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/TestReporter.java b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/TestReporter.java
index 6ae826528479..6b5b349b62de 100644
--- a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/TestReporter.java
+++ b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/TestReporter.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/TestTemplate.java b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/TestTemplate.java
index d4daf9d8411d..24f8208a7229 100644
--- a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/TestTemplate.java
+++ b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/TestTemplate.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/Timeout.java b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/Timeout.java
index 74faf89b360f..18f0d34c48a4 100644
--- a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/Timeout.java
+++ b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/Timeout.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/condition/AbstractOsBasedExecutionCondition.java b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/condition/AbstractOsBasedExecutionCondition.java
index ec483e07f192..0a82b367c684 100644
--- a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/condition/AbstractOsBasedExecutionCondition.java
+++ b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/condition/AbstractOsBasedExecutionCondition.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/condition/AbstractRepeatableAnnotationCondition.java b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/condition/AbstractRepeatableAnnotationCondition.java
index 36c86d7427b9..5463f23c16e4 100644
--- a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/condition/AbstractRepeatableAnnotationCondition.java
+++ b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/condition/AbstractRepeatableAnnotationCondition.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/condition/BooleanExecutionCondition.java b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/condition/BooleanExecutionCondition.java
index 8124255ce253..a4f7ac18f6ab 100644
--- a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/condition/BooleanExecutionCondition.java
+++ b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/condition/BooleanExecutionCondition.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/condition/DisabledForJreRange.java b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/condition/DisabledForJreRange.java
index be2edd9642e6..57341bfaf79c 100644
--- a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/condition/DisabledForJreRange.java
+++ b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/condition/DisabledForJreRange.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/condition/DisabledForJreRangeCondition.java b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/condition/DisabledForJreRangeCondition.java
index 1fb2ba57b743..90e157d13d0a 100644
--- a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/condition/DisabledForJreRangeCondition.java
+++ b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/condition/DisabledForJreRangeCondition.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/condition/DisabledIf.java b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/condition/DisabledIf.java
index 0eb3bc627911..8ab454fb6a17 100644
--- a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/condition/DisabledIf.java
+++ b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/condition/DisabledIf.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/condition/DisabledIfCondition.java b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/condition/DisabledIfCondition.java
index 04932ebbf4b1..1998f8840d3e 100644
--- a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/condition/DisabledIfCondition.java
+++ b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/condition/DisabledIfCondition.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/condition/DisabledIfEnvironmentVariable.java b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/condition/DisabledIfEnvironmentVariable.java
index c32b693c5b03..a98c31bb4e0a 100644
--- a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/condition/DisabledIfEnvironmentVariable.java
+++ b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/condition/DisabledIfEnvironmentVariable.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/condition/DisabledIfEnvironmentVariableCondition.java b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/condition/DisabledIfEnvironmentVariableCondition.java
index 03a452d235b8..de9a85154e4c 100644
--- a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/condition/DisabledIfEnvironmentVariableCondition.java
+++ b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/condition/DisabledIfEnvironmentVariableCondition.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/condition/DisabledIfEnvironmentVariables.java b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/condition/DisabledIfEnvironmentVariables.java
index 0ad4b39c6131..deef2a4a8fa0 100644
--- a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/condition/DisabledIfEnvironmentVariables.java
+++ b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/condition/DisabledIfEnvironmentVariables.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/condition/DisabledIfSystemProperties.java b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/condition/DisabledIfSystemProperties.java
index e5134a9313b6..ff6877bf1a06 100644
--- a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/condition/DisabledIfSystemProperties.java
+++ b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/condition/DisabledIfSystemProperties.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/condition/DisabledIfSystemProperty.java b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/condition/DisabledIfSystemProperty.java
index 84f7c717f886..c8bfe4fc8cdf 100644
--- a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/condition/DisabledIfSystemProperty.java
+++ b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/condition/DisabledIfSystemProperty.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/condition/DisabledIfSystemPropertyCondition.java b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/condition/DisabledIfSystemPropertyCondition.java
index 5cb6a73f9e3d..c2e17250374e 100644
--- a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/condition/DisabledIfSystemPropertyCondition.java
+++ b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/condition/DisabledIfSystemPropertyCondition.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/condition/DisabledInNativeImage.java b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/condition/DisabledInNativeImage.java
index a51fa19a81ec..a96399e799be 100644
--- a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/condition/DisabledInNativeImage.java
+++ b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/condition/DisabledInNativeImage.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/condition/DisabledOnJre.java b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/condition/DisabledOnJre.java
index dac3c3a46c4a..ef1b5d8a5387 100644
--- a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/condition/DisabledOnJre.java
+++ b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/condition/DisabledOnJre.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/condition/DisabledOnJreCondition.java b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/condition/DisabledOnJreCondition.java
index b78cba9e8e26..a2bacd66911d 100644
--- a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/condition/DisabledOnJreCondition.java
+++ b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/condition/DisabledOnJreCondition.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/condition/DisabledOnOs.java b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/condition/DisabledOnOs.java
index 52b60f486cff..5f1e08d70a59 100644
--- a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/condition/DisabledOnOs.java
+++ b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/condition/DisabledOnOs.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/condition/DisabledOnOsCondition.java b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/condition/DisabledOnOsCondition.java
index 9500989171d5..90ec208976af 100644
--- a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/condition/DisabledOnOsCondition.java
+++ b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/condition/DisabledOnOsCondition.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/condition/EnabledForJreRange.java b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/condition/EnabledForJreRange.java
index e18d02c67bc9..9e3154d85385 100644
--- a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/condition/EnabledForJreRange.java
+++ b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/condition/EnabledForJreRange.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/condition/EnabledForJreRangeCondition.java b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/condition/EnabledForJreRangeCondition.java
index 9d1aaae5a51f..5a7c9e5417d3 100644
--- a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/condition/EnabledForJreRangeCondition.java
+++ b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/condition/EnabledForJreRangeCondition.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/condition/EnabledIf.java b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/condition/EnabledIf.java
index 3005a8f0a460..18e8a8395c46 100644
--- a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/condition/EnabledIf.java
+++ b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/condition/EnabledIf.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/condition/EnabledIfCondition.java b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/condition/EnabledIfCondition.java
index a19f6d76d77c..3ebaa594dc9a 100644
--- a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/condition/EnabledIfCondition.java
+++ b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/condition/EnabledIfCondition.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/condition/EnabledIfEnvironmentVariable.java b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/condition/EnabledIfEnvironmentVariable.java
index 7eca6dffc9bd..d7cab6c3dddf 100644
--- a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/condition/EnabledIfEnvironmentVariable.java
+++ b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/condition/EnabledIfEnvironmentVariable.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/condition/EnabledIfEnvironmentVariableCondition.java b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/condition/EnabledIfEnvironmentVariableCondition.java
index cdd7ded016b2..13848432aa0d 100644
--- a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/condition/EnabledIfEnvironmentVariableCondition.java
+++ b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/condition/EnabledIfEnvironmentVariableCondition.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/condition/EnabledIfEnvironmentVariables.java b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/condition/EnabledIfEnvironmentVariables.java
index fda577afa14f..3589ed58b217 100644
--- a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/condition/EnabledIfEnvironmentVariables.java
+++ b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/condition/EnabledIfEnvironmentVariables.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/condition/EnabledIfSystemProperties.java b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/condition/EnabledIfSystemProperties.java
index 5da673a61946..f33bdfae4790 100644
--- a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/condition/EnabledIfSystemProperties.java
+++ b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/condition/EnabledIfSystemProperties.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/condition/EnabledIfSystemProperty.java b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/condition/EnabledIfSystemProperty.java
index f26b972ce6e7..cd658e4e0aad 100644
--- a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/condition/EnabledIfSystemProperty.java
+++ b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/condition/EnabledIfSystemProperty.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/condition/EnabledIfSystemPropertyCondition.java b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/condition/EnabledIfSystemPropertyCondition.java
index c6d9e632addb..af8c7cb903cb 100644
--- a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/condition/EnabledIfSystemPropertyCondition.java
+++ b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/condition/EnabledIfSystemPropertyCondition.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/condition/EnabledInNativeImage.java b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/condition/EnabledInNativeImage.java
index 81fd19cbf338..33641509e7a0 100644
--- a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/condition/EnabledInNativeImage.java
+++ b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/condition/EnabledInNativeImage.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/condition/EnabledOnJre.java b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/condition/EnabledOnJre.java
index d8210bf71f8b..c5ca85ea4dbb 100644
--- a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/condition/EnabledOnJre.java
+++ b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/condition/EnabledOnJre.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/condition/EnabledOnJreCondition.java b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/condition/EnabledOnJreCondition.java
index 0e81c803787f..2bd865351d20 100644
--- a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/condition/EnabledOnJreCondition.java
+++ b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/condition/EnabledOnJreCondition.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/condition/EnabledOnOs.java b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/condition/EnabledOnOs.java
index e0c17deda556..2805fc40025e 100644
--- a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/condition/EnabledOnOs.java
+++ b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/condition/EnabledOnOs.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/condition/EnabledOnOsCondition.java b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/condition/EnabledOnOsCondition.java
index be61ace4f8d4..092342f7a2ac 100644
--- a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/condition/EnabledOnOsCondition.java
+++ b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/condition/EnabledOnOsCondition.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/condition/JRE.java b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/condition/JRE.java
index 6e7150ec56f3..b42bc90e90c3 100644
--- a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/condition/JRE.java
+++ b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/condition/JRE.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
@@ -138,12 +138,20 @@ public enum JRE {
@API(status = STABLE, since = "5.9")
JAVA_20,
+ /**
+ * Java 20.
+ *
+ * @since 5.9.2
+ */
+ @API(status = STABLE, since = "5.9.2")
+ JAVA_21,
+
/**
* A JRE version other than {@link #JAVA_8}, {@link #JAVA_9},
* {@link #JAVA_10}, {@link #JAVA_11}, {@link #JAVA_12},
* {@link #JAVA_13}, {@link #JAVA_14}, {@link #JAVA_15},
* {@link #JAVA_16}, {@link #JAVA_17}, {@link #JAVA_18},
- * {@link #JAVA_19}, or {@link #JAVA_20}.
+ * {@link #JAVA_19}, {@link #JAVA_20}, or {@link #JAVA_21}.
*/
OTHER;
@@ -197,6 +205,8 @@ private static JRE determineCurrentVersion() {
return JAVA_19;
case 20:
return JAVA_20;
+ case 21:
+ return JAVA_21;
default:
return OTHER;
}
diff --git a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/condition/MethodBasedCondition.java b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/condition/MethodBasedCondition.java
index a7b269db570e..403304792e75 100644
--- a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/condition/MethodBasedCondition.java
+++ b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/condition/MethodBasedCondition.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/condition/OS.java b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/condition/OS.java
index f0ea46685b02..5acb383e3137 100644
--- a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/condition/OS.java
+++ b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/condition/OS.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/extension/AfterAllCallback.java b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/extension/AfterAllCallback.java
index aa6240fd3b4a..cdf4c267c468 100644
--- a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/extension/AfterAllCallback.java
+++ b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/extension/AfterAllCallback.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/extension/AfterEachCallback.java b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/extension/AfterEachCallback.java
index b07965047d78..6c26cc11743c 100644
--- a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/extension/AfterEachCallback.java
+++ b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/extension/AfterEachCallback.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/extension/AfterTestExecutionCallback.java b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/extension/AfterTestExecutionCallback.java
index f1be46050bcb..817744a167fe 100644
--- a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/extension/AfterTestExecutionCallback.java
+++ b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/extension/AfterTestExecutionCallback.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/extension/BeforeAllCallback.java b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/extension/BeforeAllCallback.java
index fb5c86f98122..ae78aa2ddc10 100644
--- a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/extension/BeforeAllCallback.java
+++ b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/extension/BeforeAllCallback.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/extension/BeforeEachCallback.java b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/extension/BeforeEachCallback.java
index b133ca23298c..2ba5b378abe5 100644
--- a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/extension/BeforeEachCallback.java
+++ b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/extension/BeforeEachCallback.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/extension/BeforeTestExecutionCallback.java b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/extension/BeforeTestExecutionCallback.java
index 3dfcec8ac981..9a25088158ad 100644
--- a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/extension/BeforeTestExecutionCallback.java
+++ b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/extension/BeforeTestExecutionCallback.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/extension/ConditionEvaluationResult.java b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/extension/ConditionEvaluationResult.java
index 0f89cf1a3e1b..e01c5ac66b43 100644
--- a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/extension/ConditionEvaluationResult.java
+++ b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/extension/ConditionEvaluationResult.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/extension/DynamicTestInvocationContext.java b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/extension/DynamicTestInvocationContext.java
index aee09435610b..a040ae804347 100644
--- a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/extension/DynamicTestInvocationContext.java
+++ b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/extension/DynamicTestInvocationContext.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/extension/ExecutableInvoker.java b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/extension/ExecutableInvoker.java
index f14d8cc1e961..7cfad263ad5b 100644
--- a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/extension/ExecutableInvoker.java
+++ b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/extension/ExecutableInvoker.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/extension/ExecutionCondition.java b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/extension/ExecutionCondition.java
index 4edc1dafb849..9747a1e4d82c 100644
--- a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/extension/ExecutionCondition.java
+++ b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/extension/ExecutionCondition.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/extension/ExtendWith.java b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/extension/ExtendWith.java
index b1819de7bf6c..dbee47c2c483 100644
--- a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/extension/ExtendWith.java
+++ b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/extension/ExtendWith.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/extension/Extension.java b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/extension/Extension.java
index 600eb74b0eb7..fa1d255e65c1 100644
--- a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/extension/Extension.java
+++ b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/extension/Extension.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/extension/ExtensionConfigurationException.java b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/extension/ExtensionConfigurationException.java
index 6631cde0bab8..f4204b49427c 100644
--- a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/extension/ExtensionConfigurationException.java
+++ b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/extension/ExtensionConfigurationException.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/extension/ExtensionContext.java b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/extension/ExtensionContext.java
index 55c7fad2e50f..e58f585fdf59 100644
--- a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/extension/ExtensionContext.java
+++ b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/extension/ExtensionContext.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/extension/ExtensionContextException.java b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/extension/ExtensionContextException.java
index be16215c49d6..957c0ed6910f 100644
--- a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/extension/ExtensionContextException.java
+++ b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/extension/ExtensionContextException.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/extension/Extensions.java b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/extension/Extensions.java
index 0f1e73320d46..a683dea9ff2c 100644
--- a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/extension/Extensions.java
+++ b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/extension/Extensions.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/extension/InvocationInterceptor.java b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/extension/InvocationInterceptor.java
index 4771ecddcd4b..5d4bbdb2935b 100644
--- a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/extension/InvocationInterceptor.java
+++ b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/extension/InvocationInterceptor.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/extension/LifecycleMethodExecutionExceptionHandler.java b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/extension/LifecycleMethodExecutionExceptionHandler.java
index d19355e4ff78..7b7eb21084ab 100644
--- a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/extension/LifecycleMethodExecutionExceptionHandler.java
+++ b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/extension/LifecycleMethodExecutionExceptionHandler.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/extension/ParameterContext.java b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/extension/ParameterContext.java
index c80242cfb821..1bce9ffbe16c 100644
--- a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/extension/ParameterContext.java
+++ b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/extension/ParameterContext.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/extension/ParameterResolutionException.java b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/extension/ParameterResolutionException.java
index afdb3bc3c051..5e34e82330ce 100644
--- a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/extension/ParameterResolutionException.java
+++ b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/extension/ParameterResolutionException.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/extension/ParameterResolver.java b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/extension/ParameterResolver.java
index f85beccfee34..3ce4fdb4ba82 100644
--- a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/extension/ParameterResolver.java
+++ b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/extension/ParameterResolver.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/extension/ReflectiveInvocationContext.java b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/extension/ReflectiveInvocationContext.java
index fb0ac752931f..90666658ad6f 100644
--- a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/extension/ReflectiveInvocationContext.java
+++ b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/extension/ReflectiveInvocationContext.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/extension/RegisterExtension.java b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/extension/RegisterExtension.java
index 6c0058d60a05..c3f89728f385 100644
--- a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/extension/RegisterExtension.java
+++ b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/extension/RegisterExtension.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/extension/TestExecutionExceptionHandler.java b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/extension/TestExecutionExceptionHandler.java
index a6bb2b638049..cfd03f746b32 100644
--- a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/extension/TestExecutionExceptionHandler.java
+++ b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/extension/TestExecutionExceptionHandler.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/extension/TestInstanceFactory.java b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/extension/TestInstanceFactory.java
index fc1eaf0411ab..beb98895641b 100644
--- a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/extension/TestInstanceFactory.java
+++ b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/extension/TestInstanceFactory.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/extension/TestInstanceFactoryContext.java b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/extension/TestInstanceFactoryContext.java
index 22a04b91f060..99af882dfc06 100644
--- a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/extension/TestInstanceFactoryContext.java
+++ b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/extension/TestInstanceFactoryContext.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/extension/TestInstancePostProcessor.java b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/extension/TestInstancePostProcessor.java
index 78aeed9c4d48..a2ec718e48e8 100644
--- a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/extension/TestInstancePostProcessor.java
+++ b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/extension/TestInstancePostProcessor.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/extension/TestInstancePreConstructCallback.java b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/extension/TestInstancePreConstructCallback.java
index 935318723a64..0bad10b8c447 100644
--- a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/extension/TestInstancePreConstructCallback.java
+++ b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/extension/TestInstancePreConstructCallback.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/extension/TestInstancePreDestroyCallback.java b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/extension/TestInstancePreDestroyCallback.java
index 705c9055ab88..1feab18515e8 100644
--- a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/extension/TestInstancePreDestroyCallback.java
+++ b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/extension/TestInstancePreDestroyCallback.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/extension/TestInstances.java b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/extension/TestInstances.java
index e9eb29129427..d2bab8067aa9 100644
--- a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/extension/TestInstances.java
+++ b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/extension/TestInstances.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/extension/TestInstantiationException.java b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/extension/TestInstantiationException.java
index 3311e8943945..e8c5920bf3aa 100644
--- a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/extension/TestInstantiationException.java
+++ b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/extension/TestInstantiationException.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/extension/TestTemplateInvocationContext.java b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/extension/TestTemplateInvocationContext.java
index 4d775d529393..268b5c474e52 100644
--- a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/extension/TestTemplateInvocationContext.java
+++ b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/extension/TestTemplateInvocationContext.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/extension/TestTemplateInvocationContextProvider.java b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/extension/TestTemplateInvocationContextProvider.java
index 469e47bdd4fd..f7e0d61b31b6 100644
--- a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/extension/TestTemplateInvocationContextProvider.java
+++ b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/extension/TestTemplateInvocationContextProvider.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/extension/TestWatcher.java b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/extension/TestWatcher.java
index e2efd5114c64..a720af0e061e 100644
--- a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/extension/TestWatcher.java
+++ b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/extension/TestWatcher.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/extension/support/TypeBasedParameterResolver.java b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/extension/support/TypeBasedParameterResolver.java
index a3a0f40c2278..0346fc0bb3ba 100644
--- a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/extension/support/TypeBasedParameterResolver.java
+++ b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/extension/support/TypeBasedParameterResolver.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/function/Executable.java b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/function/Executable.java
index 0e98ee489e6e..c6309581f83e 100644
--- a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/function/Executable.java
+++ b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/function/Executable.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/function/ThrowingConsumer.java b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/function/ThrowingConsumer.java
index bf937eb35583..a5f74507466f 100644
--- a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/function/ThrowingConsumer.java
+++ b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/function/ThrowingConsumer.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/function/ThrowingSupplier.java b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/function/ThrowingSupplier.java
index 8c35fcae626a..573dffe70f12 100644
--- a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/function/ThrowingSupplier.java
+++ b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/function/ThrowingSupplier.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/io/CleanupMode.java b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/io/CleanupMode.java
index 016dc5b09e7c..59472e28dcf4 100644
--- a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/io/CleanupMode.java
+++ b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/io/CleanupMode.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/io/TempDir.java b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/io/TempDir.java
index 762c8d6defc9..8d0e6dad480a 100644
--- a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/io/TempDir.java
+++ b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/io/TempDir.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/parallel/Execution.java b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/parallel/Execution.java
index ad67864faf9b..86d051c6b5bc 100644
--- a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/parallel/Execution.java
+++ b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/parallel/Execution.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/parallel/ExecutionMode.java b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/parallel/ExecutionMode.java
index 989455659cf4..b0b7752a6c4b 100644
--- a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/parallel/ExecutionMode.java
+++ b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/parallel/ExecutionMode.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/parallel/Isolated.java b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/parallel/Isolated.java
index ff4eaa06cea1..5dc97602e4ff 100644
--- a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/parallel/Isolated.java
+++ b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/parallel/Isolated.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/parallel/ResourceAccessMode.java b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/parallel/ResourceAccessMode.java
index 3ded110722ed..30378f53d160 100644
--- a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/parallel/ResourceAccessMode.java
+++ b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/parallel/ResourceAccessMode.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/parallel/ResourceLock.java b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/parallel/ResourceLock.java
index ddac32f503e2..4f7f97d403fb 100644
--- a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/parallel/ResourceLock.java
+++ b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/parallel/ResourceLock.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/parallel/ResourceLocks.java b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/parallel/ResourceLocks.java
index fe4d18661660..f15bfbc38797 100644
--- a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/parallel/ResourceLocks.java
+++ b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/parallel/ResourceLocks.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/parallel/Resources.java b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/parallel/Resources.java
index 5421662c8674..ccdbaefe1627 100644
--- a/junit-jupiter-api/src/main/java/org/junit/jupiter/api/parallel/Resources.java
+++ b/junit-jupiter-api/src/main/java/org/junit/jupiter/api/parallel/Resources.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-api/src/main/kotlin/org/junit/jupiter/api/Assertions.kt b/junit-jupiter-api/src/main/kotlin/org/junit/jupiter/api/Assertions.kt
index 60e82a8fb4a2..d0f5af1e218b 100644
--- a/junit-jupiter-api/src/main/kotlin/org/junit/jupiter/api/Assertions.kt
+++ b/junit-jupiter-api/src/main/kotlin/org/junit/jupiter/api/Assertions.kt
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-api/src/testFixtures/java/org/junit/jupiter/api/extension/ExtensionContextParameterResolver.java b/junit-jupiter-api/src/testFixtures/java/org/junit/jupiter/api/extension/ExtensionContextParameterResolver.java
index 275f46b3f08a..836aabab88f8 100644
--- a/junit-jupiter-api/src/testFixtures/java/org/junit/jupiter/api/extension/ExtensionContextParameterResolver.java
+++ b/junit-jupiter-api/src/testFixtures/java/org/junit/jupiter/api/extension/ExtensionContextParameterResolver.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-api/src/testFixtures/java/org/junit/jupiter/api/fixtures/TrackLogRecords.java b/junit-jupiter-api/src/testFixtures/java/org/junit/jupiter/api/fixtures/TrackLogRecords.java
index 52885647d71c..ef33de69dda6 100644
--- a/junit-jupiter-api/src/testFixtures/java/org/junit/jupiter/api/fixtures/TrackLogRecords.java
+++ b/junit-jupiter-api/src/testFixtures/java/org/junit/jupiter/api/fixtures/TrackLogRecords.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/Constants.java b/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/Constants.java
index b68a9bdbb2ba..f99d61d82947 100644
--- a/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/Constants.java
+++ b/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/Constants.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
@@ -15,7 +15,9 @@
import static org.apiguardian.api.API.Status.STABLE;
import static org.junit.platform.engine.support.hierarchical.DefaultParallelExecutionConfigurationStrategy.CONFIG_CUSTOM_CLASS_PROPERTY_NAME;
import static org.junit.platform.engine.support.hierarchical.DefaultParallelExecutionConfigurationStrategy.CONFIG_DYNAMIC_FACTOR_PROPERTY_NAME;
+import static org.junit.platform.engine.support.hierarchical.DefaultParallelExecutionConfigurationStrategy.CONFIG_FIXED_MAX_POOL_SIZE_PROPERTY_NAME;
import static org.junit.platform.engine.support.hierarchical.DefaultParallelExecutionConfigurationStrategy.CONFIG_FIXED_PARALLELISM_PROPERTY_NAME;
+import static org.junit.platform.engine.support.hierarchical.DefaultParallelExecutionConfigurationStrategy.CONFIG_FIXED_SATURATE_PROPERTY_NAME;
import static org.junit.platform.engine.support.hierarchical.DefaultParallelExecutionConfigurationStrategy.CONFIG_STRATEGY_PROPERTY_NAME;
import org.apiguardian.api.API;
@@ -166,6 +168,40 @@ public final class Constants {
public static final String PARALLEL_CONFIG_FIXED_PARALLELISM_PROPERTY_NAME = PARALLEL_CONFIG_PREFIX
+ CONFIG_FIXED_PARALLELISM_PROPERTY_NAME;
+ /**
+ * Property name used to configure the maximum pool size of the underlying
+ * fork-join pool for the {@code fixed} configuration strategy: {@value}
+ *
+ *
Value must be an integer and greater than or equal to
+ * {@value #PARALLEL_CONFIG_FIXED_PARALLELISM_PROPERTY_NAME}; defaults to
+ * {@code 256 + fixed.parallelism}.
+ *
+ *
Note: This property only takes affect on Java 9+.
+ *
+ * @since 5.10
+ */
+ @API(status = EXPERIMENTAL, since = "5.10")
+ public static final String PARALLEL_CONFIG_FIXED_MAX_POOL_SIZE_PROPERTY_NAME = PARALLEL_CONFIG_PREFIX
+ + CONFIG_FIXED_MAX_POOL_SIZE_PROPERTY_NAME;
+
+ /**
+ * Property name used to disable saturation of the underlying fork-join pool
+ * for the {@code fixed} configuration strategy: {@value}
+ *
+ *
When set to {@code false} the underlying fork-join pool will reject
+ * additional tasks if all available workers are busy and the maximum
+ * pool-size would be exceeded.
+
+ *
Value must either {@code true} or {@code false}; defaults to {@code true}.
+ *
+ *
Note: This property only takes affect on Java 9+.
+ *
+ * @since 5.10
+ */
+ @API(status = EXPERIMENTAL, since = "5.10")
+ public static final String PARALLEL_CONFIG_FIXED_SATURATE_PROPERTY_NAME = PARALLEL_CONFIG_PREFIX
+ + CONFIG_FIXED_SATURATE_PROPERTY_NAME;
+
/**
* Property name used to set the factor to be multiplied with the number of
* available processors/cores to determine the desired parallelism for the
diff --git a/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/JupiterTestEngine.java b/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/JupiterTestEngine.java
index cc3ffa3d98fd..dbd799b7f5b2 100644
--- a/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/JupiterTestEngine.java
+++ b/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/JupiterTestEngine.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/config/CachingJupiterConfiguration.java b/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/config/CachingJupiterConfiguration.java
index 76c566f77d39..ebf547344bdc 100644
--- a/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/config/CachingJupiterConfiguration.java
+++ b/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/config/CachingJupiterConfiguration.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/config/DefaultJupiterConfiguration.java b/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/config/DefaultJupiterConfiguration.java
index a21a9c7ef249..ae8a4944904f 100644
--- a/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/config/DefaultJupiterConfiguration.java
+++ b/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/config/DefaultJupiterConfiguration.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/config/EnumConfigurationParameterConverter.java b/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/config/EnumConfigurationParameterConverter.java
index 6ee650d10ed7..75fd3f99f708 100644
--- a/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/config/EnumConfigurationParameterConverter.java
+++ b/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/config/EnumConfigurationParameterConverter.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/config/InstantiatingConfigurationParameterConverter.java b/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/config/InstantiatingConfigurationParameterConverter.java
index 2aada5cae621..7f77d47122ce 100644
--- a/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/config/InstantiatingConfigurationParameterConverter.java
+++ b/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/config/InstantiatingConfigurationParameterConverter.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/config/JupiterConfiguration.java b/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/config/JupiterConfiguration.java
index 0ae65007d888..d0027c15e70b 100644
--- a/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/config/JupiterConfiguration.java
+++ b/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/config/JupiterConfiguration.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/descriptor/AbstractExtensionContext.java b/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/descriptor/AbstractExtensionContext.java
index 5ed8ce41c398..90b6a9326797 100644
--- a/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/descriptor/AbstractExtensionContext.java
+++ b/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/descriptor/AbstractExtensionContext.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/descriptor/ClassBasedTestDescriptor.java b/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/descriptor/ClassBasedTestDescriptor.java
index 7dfa614dc2b5..d1fed9511f38 100644
--- a/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/descriptor/ClassBasedTestDescriptor.java
+++ b/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/descriptor/ClassBasedTestDescriptor.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/descriptor/ClassExtensionContext.java b/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/descriptor/ClassExtensionContext.java
index 5fbcb0e5f925..57d40a86edbb 100644
--- a/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/descriptor/ClassExtensionContext.java
+++ b/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/descriptor/ClassExtensionContext.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/descriptor/ClassTestDescriptor.java b/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/descriptor/ClassTestDescriptor.java
index c294c99c7639..2296129809d8 100644
--- a/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/descriptor/ClassTestDescriptor.java
+++ b/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/descriptor/ClassTestDescriptor.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/descriptor/DefaultDynamicTestInvocationContext.java b/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/descriptor/DefaultDynamicTestInvocationContext.java
index ca0d47800af5..f6e272bc3e99 100644
--- a/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/descriptor/DefaultDynamicTestInvocationContext.java
+++ b/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/descriptor/DefaultDynamicTestInvocationContext.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/descriptor/DefaultTestInstanceFactoryContext.java b/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/descriptor/DefaultTestInstanceFactoryContext.java
index 5a15bbfc611a..affdf5b57545 100644
--- a/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/descriptor/DefaultTestInstanceFactoryContext.java
+++ b/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/descriptor/DefaultTestInstanceFactoryContext.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/descriptor/DisplayNameUtils.java b/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/descriptor/DisplayNameUtils.java
index 6e580ef3baac..7e2b313030fc 100644
--- a/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/descriptor/DisplayNameUtils.java
+++ b/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/descriptor/DisplayNameUtils.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/descriptor/DynamicContainerTestDescriptor.java b/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/descriptor/DynamicContainerTestDescriptor.java
index 811a11205c83..a72981df70d3 100644
--- a/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/descriptor/DynamicContainerTestDescriptor.java
+++ b/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/descriptor/DynamicContainerTestDescriptor.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/descriptor/DynamicDescendantFilter.java b/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/descriptor/DynamicDescendantFilter.java
index d08c3ba0d3e9..48e45e0bb11d 100644
--- a/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/descriptor/DynamicDescendantFilter.java
+++ b/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/descriptor/DynamicDescendantFilter.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/descriptor/DynamicExtensionContext.java b/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/descriptor/DynamicExtensionContext.java
index 4e0c3cb72a70..92ec7b24abeb 100644
--- a/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/descriptor/DynamicExtensionContext.java
+++ b/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/descriptor/DynamicExtensionContext.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/descriptor/DynamicNodeTestDescriptor.java b/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/descriptor/DynamicNodeTestDescriptor.java
index 8619bb1fba58..bf5bde6c63dd 100644
--- a/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/descriptor/DynamicNodeTestDescriptor.java
+++ b/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/descriptor/DynamicNodeTestDescriptor.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/descriptor/DynamicTestTestDescriptor.java b/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/descriptor/DynamicTestTestDescriptor.java
index f8252afbac23..3fc75d00c0ed 100644
--- a/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/descriptor/DynamicTestTestDescriptor.java
+++ b/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/descriptor/DynamicTestTestDescriptor.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/descriptor/ExtensionUtils.java b/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/descriptor/ExtensionUtils.java
index 810d7e5a0a18..b444f632c405 100644
--- a/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/descriptor/ExtensionUtils.java
+++ b/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/descriptor/ExtensionUtils.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/descriptor/Filterable.java b/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/descriptor/Filterable.java
index 827151de5bb3..a9ca7ad14dc4 100644
--- a/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/descriptor/Filterable.java
+++ b/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/descriptor/Filterable.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/descriptor/JupiterEngineDescriptor.java b/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/descriptor/JupiterEngineDescriptor.java
index 0aa9d9056770..3a87753ca530 100644
--- a/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/descriptor/JupiterEngineDescriptor.java
+++ b/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/descriptor/JupiterEngineDescriptor.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/descriptor/JupiterEngineExtensionContext.java b/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/descriptor/JupiterEngineExtensionContext.java
index 14c042e3c8be..26eb83f7fa50 100644
--- a/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/descriptor/JupiterEngineExtensionContext.java
+++ b/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/descriptor/JupiterEngineExtensionContext.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/descriptor/JupiterTestDescriptor.java b/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/descriptor/JupiterTestDescriptor.java
index 0b17e0b07a2d..5492e8a6890e 100644
--- a/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/descriptor/JupiterTestDescriptor.java
+++ b/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/descriptor/JupiterTestDescriptor.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/descriptor/LifecycleMethodUtils.java b/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/descriptor/LifecycleMethodUtils.java
index 28efaaa8eba0..9adb38ff3945 100644
--- a/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/descriptor/LifecycleMethodUtils.java
+++ b/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/descriptor/LifecycleMethodUtils.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
@@ -61,7 +61,6 @@ private static List findMethodsAndAssertStaticAndNonPrivate(Class> tes
if (requireStatic) {
methods.forEach(method -> assertStatic(annotationType, method));
}
- methods.forEach(method -> assertNonPrivate(annotationType, method));
return methods;
}
@@ -69,10 +68,7 @@ private static List findMethodsAndAssertNonStaticAndNonPrivate(Class>
Class extends Annotation> annotationType, HierarchyTraversalMode traversalMode) {
List methods = findMethodsAndCheckVoidReturnType(testClass, annotationType, traversalMode);
- methods.forEach(method -> {
- assertNonStatic(annotationType, method);
- assertNonPrivate(annotationType, method);
- });
+ methods.forEach(method -> assertNonStatic(annotationType, method));
return methods;
}
@@ -99,13 +95,6 @@ private static void assertNonStatic(Class extends Annotation> annotationType,
}
}
- private static void assertNonPrivate(Class extends Annotation> annotationType, Method method) {
- if (ReflectionUtils.isPrivate(method)) {
- throw new JUnitException(String.format("@%s method '%s' must not be private.",
- annotationType.getSimpleName(), method.toGenericString()));
- }
- }
-
private static void assertVoid(Class extends Annotation> annotationType, Method method) {
if (!returnsVoid(method)) {
throw new JUnitException(String.format("@%s method '%s' must not return a value.",
diff --git a/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/descriptor/MethodBasedTestDescriptor.java b/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/descriptor/MethodBasedTestDescriptor.java
index 356b22a5ef1b..bb0d3907501d 100644
--- a/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/descriptor/MethodBasedTestDescriptor.java
+++ b/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/descriptor/MethodBasedTestDescriptor.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/descriptor/MethodExtensionContext.java b/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/descriptor/MethodExtensionContext.java
index b10be186c15d..22db33b33de3 100644
--- a/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/descriptor/MethodExtensionContext.java
+++ b/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/descriptor/MethodExtensionContext.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/descriptor/MethodSourceSupport.java b/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/descriptor/MethodSourceSupport.java
index 14f4c517d0c4..fd461ba479cf 100644
--- a/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/descriptor/MethodSourceSupport.java
+++ b/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/descriptor/MethodSourceSupport.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/descriptor/NestedClassTestDescriptor.java b/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/descriptor/NestedClassTestDescriptor.java
index 4cb82ea99614..f750e2f5c432 100644
--- a/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/descriptor/NestedClassTestDescriptor.java
+++ b/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/descriptor/NestedClassTestDescriptor.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/descriptor/TestFactoryTestDescriptor.java b/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/descriptor/TestFactoryTestDescriptor.java
index 49461ccf607a..671cc6b63fc6 100644
--- a/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/descriptor/TestFactoryTestDescriptor.java
+++ b/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/descriptor/TestFactoryTestDescriptor.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/descriptor/TestInstanceLifecycleUtils.java b/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/descriptor/TestInstanceLifecycleUtils.java
index 4ec69200e5d2..8aae97f9b754 100644
--- a/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/descriptor/TestInstanceLifecycleUtils.java
+++ b/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/descriptor/TestInstanceLifecycleUtils.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/descriptor/TestMethodTestDescriptor.java b/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/descriptor/TestMethodTestDescriptor.java
index 253e093e579e..c5c784b06abc 100644
--- a/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/descriptor/TestMethodTestDescriptor.java
+++ b/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/descriptor/TestMethodTestDescriptor.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/descriptor/TestTemplateExtensionContext.java b/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/descriptor/TestTemplateExtensionContext.java
index 164552deaba5..5a3506f8ea6a 100644
--- a/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/descriptor/TestTemplateExtensionContext.java
+++ b/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/descriptor/TestTemplateExtensionContext.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/descriptor/TestTemplateInvocationTestDescriptor.java b/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/descriptor/TestTemplateInvocationTestDescriptor.java
index a6bdd8c09e65..4d522615dcaa 100644
--- a/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/descriptor/TestTemplateInvocationTestDescriptor.java
+++ b/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/descriptor/TestTemplateInvocationTestDescriptor.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/descriptor/TestTemplateTestDescriptor.java b/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/descriptor/TestTemplateTestDescriptor.java
index 8d44338c722b..885a07d93636 100644
--- a/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/descriptor/TestTemplateTestDescriptor.java
+++ b/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/descriptor/TestTemplateTestDescriptor.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/discovery/AbstractAnnotatedDescriptorWrapper.java b/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/discovery/AbstractAnnotatedDescriptorWrapper.java
index 463f077c2d52..31666b8c2ecb 100644
--- a/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/discovery/AbstractAnnotatedDescriptorWrapper.java
+++ b/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/discovery/AbstractAnnotatedDescriptorWrapper.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/discovery/AbstractOrderingVisitor.java b/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/discovery/AbstractOrderingVisitor.java
index 03da534699d8..e19e5c967d82 100644
--- a/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/discovery/AbstractOrderingVisitor.java
+++ b/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/discovery/AbstractOrderingVisitor.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/discovery/ClassOrderingVisitor.java b/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/discovery/ClassOrderingVisitor.java
index b1a154a3ac11..0b8ea6d09c13 100644
--- a/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/discovery/ClassOrderingVisitor.java
+++ b/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/discovery/ClassOrderingVisitor.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/discovery/ClassSelectorResolver.java b/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/discovery/ClassSelectorResolver.java
index 18f7107b992b..fd98636776dc 100644
--- a/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/discovery/ClassSelectorResolver.java
+++ b/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/discovery/ClassSelectorResolver.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/discovery/DefaultClassDescriptor.java b/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/discovery/DefaultClassDescriptor.java
index e6f0b220a5a1..b11c1b0270e0 100644
--- a/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/discovery/DefaultClassDescriptor.java
+++ b/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/discovery/DefaultClassDescriptor.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/discovery/DefaultClassOrdererContext.java b/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/discovery/DefaultClassOrdererContext.java
index cc26708bf419..2c8c8743bca2 100644
--- a/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/discovery/DefaultClassOrdererContext.java
+++ b/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/discovery/DefaultClassOrdererContext.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/discovery/DefaultMethodDescriptor.java b/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/discovery/DefaultMethodDescriptor.java
index b4a5cba81e04..a8cdd12c575a 100644
--- a/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/discovery/DefaultMethodDescriptor.java
+++ b/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/discovery/DefaultMethodDescriptor.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/discovery/DefaultMethodOrdererContext.java b/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/discovery/DefaultMethodOrdererContext.java
index f70c675d465b..fd51d4b7cd64 100644
--- a/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/discovery/DefaultMethodOrdererContext.java
+++ b/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/discovery/DefaultMethodOrdererContext.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/discovery/DiscoverySelectorResolver.java b/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/discovery/DiscoverySelectorResolver.java
index 2c5de8cc58c4..42771f96d1a7 100644
--- a/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/discovery/DiscoverySelectorResolver.java
+++ b/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/discovery/DiscoverySelectorResolver.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/discovery/MethodFinder.java b/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/discovery/MethodFinder.java
index c7b0c5bfee81..648ad453b3dd 100644
--- a/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/discovery/MethodFinder.java
+++ b/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/discovery/MethodFinder.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/discovery/MethodOrderingVisitor.java b/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/discovery/MethodOrderingVisitor.java
index f3fd6d867890..e1e7c8afab03 100644
--- a/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/discovery/MethodOrderingVisitor.java
+++ b/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/discovery/MethodOrderingVisitor.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/discovery/MethodSelectorResolver.java b/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/discovery/MethodSelectorResolver.java
index 01a51ab5056c..62698001ee5b 100644
--- a/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/discovery/MethodSelectorResolver.java
+++ b/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/discovery/MethodSelectorResolver.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/discovery/predicates/IsInnerClass.java b/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/discovery/predicates/IsInnerClass.java
index 968c4054e8c6..c46822be0edc 100644
--- a/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/discovery/predicates/IsInnerClass.java
+++ b/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/discovery/predicates/IsInnerClass.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/discovery/predicates/IsNestedTestClass.java b/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/discovery/predicates/IsNestedTestClass.java
index ff7dd1ac24c1..ceaa9f3de12b 100644
--- a/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/discovery/predicates/IsNestedTestClass.java
+++ b/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/discovery/predicates/IsNestedTestClass.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/discovery/predicates/IsPotentialTestContainer.java b/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/discovery/predicates/IsPotentialTestContainer.java
index c35d02204fc8..525e9aaf6aa3 100644
--- a/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/discovery/predicates/IsPotentialTestContainer.java
+++ b/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/discovery/predicates/IsPotentialTestContainer.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/discovery/predicates/IsTestClassWithTests.java b/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/discovery/predicates/IsTestClassWithTests.java
index e55ecffa9789..edec7724a83e 100644
--- a/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/discovery/predicates/IsTestClassWithTests.java
+++ b/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/discovery/predicates/IsTestClassWithTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/discovery/predicates/IsTestFactoryMethod.java b/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/discovery/predicates/IsTestFactoryMethod.java
index 77b40190fe11..186d5ab6333f 100644
--- a/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/discovery/predicates/IsTestFactoryMethod.java
+++ b/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/discovery/predicates/IsTestFactoryMethod.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/discovery/predicates/IsTestMethod.java b/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/discovery/predicates/IsTestMethod.java
index da014aca0664..9d30765d1ce5 100644
--- a/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/discovery/predicates/IsTestMethod.java
+++ b/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/discovery/predicates/IsTestMethod.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/discovery/predicates/IsTestTemplateMethod.java b/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/discovery/predicates/IsTestTemplateMethod.java
index 2136aff69e47..70a4391a6912 100644
--- a/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/discovery/predicates/IsTestTemplateMethod.java
+++ b/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/discovery/predicates/IsTestTemplateMethod.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/discovery/predicates/IsTestableMethod.java b/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/discovery/predicates/IsTestableMethod.java
index f793ccda36b0..e8906f0d55ac 100644
--- a/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/discovery/predicates/IsTestableMethod.java
+++ b/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/discovery/predicates/IsTestableMethod.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/execution/AfterEachMethodAdapter.java b/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/execution/AfterEachMethodAdapter.java
index d80ba914a472..2b9dff6876d3 100644
--- a/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/execution/AfterEachMethodAdapter.java
+++ b/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/execution/AfterEachMethodAdapter.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/execution/BeforeEachMethodAdapter.java b/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/execution/BeforeEachMethodAdapter.java
index 0f0f03dcfeaf..709e35e80759 100644
--- a/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/execution/BeforeEachMethodAdapter.java
+++ b/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/execution/BeforeEachMethodAdapter.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/execution/ConditionEvaluationException.java b/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/execution/ConditionEvaluationException.java
index 02f56c677ac2..ddafc0a4ad21 100644
--- a/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/execution/ConditionEvaluationException.java
+++ b/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/execution/ConditionEvaluationException.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/execution/ConditionEvaluator.java b/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/execution/ConditionEvaluator.java
index 1a6dba0f7bea..fb5e0ff2ace8 100644
--- a/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/execution/ConditionEvaluator.java
+++ b/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/execution/ConditionEvaluator.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/execution/ConstructorInvocation.java b/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/execution/ConstructorInvocation.java
index f5af1cefdbaa..4100d667a780 100644
--- a/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/execution/ConstructorInvocation.java
+++ b/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/execution/ConstructorInvocation.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/execution/DefaultExecutableInvoker.java b/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/execution/DefaultExecutableInvoker.java
index 0c13e3ef03a6..2276cc94273b 100644
--- a/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/execution/DefaultExecutableInvoker.java
+++ b/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/execution/DefaultExecutableInvoker.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/execution/DefaultParameterContext.java b/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/execution/DefaultParameterContext.java
index f14efc5a4568..900289b3b39f 100644
--- a/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/execution/DefaultParameterContext.java
+++ b/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/execution/DefaultParameterContext.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/execution/DefaultTestInstances.java b/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/execution/DefaultTestInstances.java
index b03b3f4a3c86..dc611f69975d 100644
--- a/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/execution/DefaultTestInstances.java
+++ b/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/execution/DefaultTestInstances.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/execution/ExtensionValuesStore.java b/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/execution/ExtensionValuesStore.java
index 5b06d7eae56a..133e3d6b0156 100644
--- a/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/execution/ExtensionValuesStore.java
+++ b/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/execution/ExtensionValuesStore.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/execution/InterceptingExecutableInvoker.java b/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/execution/InterceptingExecutableInvoker.java
index 50aaf7dba71e..b0a1fdb28283 100644
--- a/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/execution/InterceptingExecutableInvoker.java
+++ b/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/execution/InterceptingExecutableInvoker.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/execution/InvocationInterceptorChain.java b/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/execution/InvocationInterceptorChain.java
index c45a9f2dbfe3..f622a386360c 100644
--- a/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/execution/InvocationInterceptorChain.java
+++ b/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/execution/InvocationInterceptorChain.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/execution/JupiterEngineExecutionContext.java b/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/execution/JupiterEngineExecutionContext.java
index daf0eeb6f837..a31c9c02ad27 100644
--- a/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/execution/JupiterEngineExecutionContext.java
+++ b/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/execution/JupiterEngineExecutionContext.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/execution/MethodInvocation.java b/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/execution/MethodInvocation.java
index d2cd8f77aae4..a8bb6ae7dc14 100644
--- a/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/execution/MethodInvocation.java
+++ b/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/execution/MethodInvocation.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/execution/NamespaceAwareStore.java b/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/execution/NamespaceAwareStore.java
index 0f343b713ecd..1b56304505f1 100644
--- a/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/execution/NamespaceAwareStore.java
+++ b/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/execution/NamespaceAwareStore.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/execution/ParameterResolutionUtils.java b/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/execution/ParameterResolutionUtils.java
index a2ebffad05ea..87e121a3a496 100644
--- a/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/execution/ParameterResolutionUtils.java
+++ b/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/execution/ParameterResolutionUtils.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/execution/TestInstancesProvider.java b/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/execution/TestInstancesProvider.java
index c8e93a9f30cb..1f5819a68282 100644
--- a/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/execution/TestInstancesProvider.java
+++ b/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/execution/TestInstancesProvider.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/extension/DisabledCondition.java b/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/extension/DisabledCondition.java
index a2464b72da94..6279cac68e13 100644
--- a/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/extension/DisabledCondition.java
+++ b/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/extension/DisabledCondition.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/extension/ExtensionRegistrar.java b/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/extension/ExtensionRegistrar.java
index 703fd3fef2dc..e555aecde0bd 100644
--- a/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/extension/ExtensionRegistrar.java
+++ b/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/extension/ExtensionRegistrar.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/extension/ExtensionRegistry.java b/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/extension/ExtensionRegistry.java
index 915a64197d79..d859d6b82323 100644
--- a/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/extension/ExtensionRegistry.java
+++ b/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/extension/ExtensionRegistry.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/extension/MutableExtensionRegistry.java b/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/extension/MutableExtensionRegistry.java
index 58ce3cf285b7..2856cdc3a628 100644
--- a/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/extension/MutableExtensionRegistry.java
+++ b/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/extension/MutableExtensionRegistry.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/extension/RepeatedTestDisplayNameFormatter.java b/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/extension/RepeatedTestDisplayNameFormatter.java
index b1c2df6bdd5d..1b2657fdac28 100644
--- a/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/extension/RepeatedTestDisplayNameFormatter.java
+++ b/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/extension/RepeatedTestDisplayNameFormatter.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/extension/RepeatedTestExtension.java b/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/extension/RepeatedTestExtension.java
index 1ddd7e01acc2..ce561b5867af 100644
--- a/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/extension/RepeatedTestExtension.java
+++ b/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/extension/RepeatedTestExtension.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/extension/RepeatedTestInvocationContext.java b/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/extension/RepeatedTestInvocationContext.java
index bd82bdc5fe2e..1ec271b73cb2 100644
--- a/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/extension/RepeatedTestInvocationContext.java
+++ b/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/extension/RepeatedTestInvocationContext.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/extension/RepetitionInfoParameterResolver.java b/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/extension/RepetitionInfoParameterResolver.java
index ec44504ef4f2..be104eed997d 100644
--- a/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/extension/RepetitionInfoParameterResolver.java
+++ b/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/extension/RepetitionInfoParameterResolver.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/extension/SameThreadTimeoutInvocation.java b/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/extension/SameThreadTimeoutInvocation.java
index 7cb93b5dff07..e620151dffd7 100644
--- a/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/extension/SameThreadTimeoutInvocation.java
+++ b/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/extension/SameThreadTimeoutInvocation.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/extension/SeparateThreadTimeoutInvocation.java b/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/extension/SeparateThreadTimeoutInvocation.java
index 16f22d1b09f6..9453577a472a 100644
--- a/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/extension/SeparateThreadTimeoutInvocation.java
+++ b/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/extension/SeparateThreadTimeoutInvocation.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/extension/TempDirectory.java b/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/extension/TempDirectory.java
index 4b33f7ed1743..624c9adbce80 100644
--- a/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/extension/TempDirectory.java
+++ b/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/extension/TempDirectory.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
@@ -30,6 +30,7 @@
import java.nio.file.Files;
import java.nio.file.NoSuchFileException;
import java.nio.file.Path;
+import java.nio.file.Paths;
import java.nio.file.SimpleFileVisitor;
import java.nio.file.attribute.BasicFileAttributes;
import java.util.Collections;
@@ -319,6 +320,7 @@ private void resetPermissionsAndTryToDeleteAgain(Path path, IOException exceptio
}
catch (Exception suppressed) {
exception.addSuppressed(suppressed);
+ failures.put(path, exception);
}
}
else {
@@ -340,13 +342,12 @@ private static void resetPermissions(Path path) {
}
private IOException createIOExceptionWithAttachedFailures(SortedMap failures) {
- // @formatter:off
- String joinedPaths = failures.keySet().stream()
- .map(this::tryToDeleteOnExit)
- .map(this::relativizeSafely)
- .map(String::valueOf)
+ Path emptyPath = Paths.get("");
+ String joinedPaths = failures.keySet().stream() //
+ .map(this::tryToDeleteOnExit) //
+ .map(this::relativizeSafely) //
+ .map(path -> emptyPath.equals(path) ? "" : path.toString()) //
.collect(joining(", "));
- // @formatter:on
IOException exception = new IOException("Failed to delete temp directory " + dir.toAbsolutePath()
+ ". The following paths could not be deleted (see suppressed exceptions for details): "
+ joinedPaths);
diff --git a/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/extension/TestInfoParameterResolver.java b/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/extension/TestInfoParameterResolver.java
index adaa7bf76fb1..1fdd3c7b9e5a 100644
--- a/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/extension/TestInfoParameterResolver.java
+++ b/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/extension/TestInfoParameterResolver.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/extension/TestReporterParameterResolver.java b/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/extension/TestReporterParameterResolver.java
index cac64e58fadf..ffa5cf066e2a 100644
--- a/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/extension/TestReporterParameterResolver.java
+++ b/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/extension/TestReporterParameterResolver.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/extension/TimeoutConfiguration.java b/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/extension/TimeoutConfiguration.java
index 799255432b4e..1391d4cd293e 100644
--- a/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/extension/TimeoutConfiguration.java
+++ b/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/extension/TimeoutConfiguration.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/extension/TimeoutDuration.java b/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/extension/TimeoutDuration.java
index 553964d18bb8..eb058aef673e 100644
--- a/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/extension/TimeoutDuration.java
+++ b/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/extension/TimeoutDuration.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/extension/TimeoutDurationParser.java b/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/extension/TimeoutDurationParser.java
index 6b19159c0cb3..9412983b6495 100644
--- a/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/extension/TimeoutDurationParser.java
+++ b/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/extension/TimeoutDurationParser.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/extension/TimeoutExceptionFactory.java b/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/extension/TimeoutExceptionFactory.java
index 4c94a3c0a281..82c39e5d9a87 100644
--- a/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/extension/TimeoutExceptionFactory.java
+++ b/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/extension/TimeoutExceptionFactory.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/extension/TimeoutExtension.java b/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/extension/TimeoutExtension.java
index 4f1de2fdfe17..9efe2255e9d3 100644
--- a/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/extension/TimeoutExtension.java
+++ b/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/extension/TimeoutExtension.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/extension/TimeoutInvocationFactory.java b/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/extension/TimeoutInvocationFactory.java
index 2af93e782d8c..08f6851f1943 100644
--- a/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/extension/TimeoutInvocationFactory.java
+++ b/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/extension/TimeoutInvocationFactory.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/support/JupiterThrowableCollectorFactory.java b/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/support/JupiterThrowableCollectorFactory.java
index a218d7e2d126..49a80ddb6c33 100644
--- a/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/support/JupiterThrowableCollectorFactory.java
+++ b/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/support/JupiterThrowableCollectorFactory.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/support/OpenTest4JAndJUnit4AwareThrowableCollector.java b/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/support/OpenTest4JAndJUnit4AwareThrowableCollector.java
index 238e0219f54b..5df8ff6a9074 100644
--- a/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/support/OpenTest4JAndJUnit4AwareThrowableCollector.java
+++ b/junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/support/OpenTest4JAndJUnit4AwareThrowableCollector.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/test/java/DefaultPackageTestCase.java b/junit-jupiter-engine/src/test/java/DefaultPackageTestCase.java
index cb6da73a100e..3b10c68b5d56 100644
--- a/junit-jupiter-engine/src/test/java/DefaultPackageTestCase.java
+++ b/junit-jupiter-engine/src/test/java/DefaultPackageTestCase.java
@@ -1,6 +1,6 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/test/java/example/B_TestCase.java b/junit-jupiter-engine/src/test/java/example/B_TestCase.java
index 9020f1894469..95ab9959760f 100644
--- a/junit-jupiter-engine/src/test/java/example/B_TestCase.java
+++ b/junit-jupiter-engine/src/test/java/example/B_TestCase.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/test/java/org/junit/jupiter/JupiterTestSuite.java b/junit-jupiter-engine/src/test/java/org/junit/jupiter/JupiterTestSuite.java
index b8021fb769d5..470fb7be4461 100644
--- a/junit-jupiter-engine/src/test/java/org/junit/jupiter/JupiterTestSuite.java
+++ b/junit-jupiter-engine/src/test/java/org/junit/jupiter/JupiterTestSuite.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/AssertAllAssertionsTests.java b/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/AssertAllAssertionsTests.java
index a99eb1ca51b6..ac8d045eeb25 100644
--- a/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/AssertAllAssertionsTests.java
+++ b/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/AssertAllAssertionsTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/AssertArrayEqualsAssertionsTests.java b/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/AssertArrayEqualsAssertionsTests.java
index b67c52ec79e4..5900e356a2ad 100644
--- a/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/AssertArrayEqualsAssertionsTests.java
+++ b/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/AssertArrayEqualsAssertionsTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/AssertDoesNotThrowAssertionsTests.java b/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/AssertDoesNotThrowAssertionsTests.java
index 5238db6275b9..77bc9ce42eec 100644
--- a/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/AssertDoesNotThrowAssertionsTests.java
+++ b/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/AssertDoesNotThrowAssertionsTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/AssertEqualsAssertionsTests.java b/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/AssertEqualsAssertionsTests.java
index a68f5c47fcab..8c09c72c925d 100644
--- a/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/AssertEqualsAssertionsTests.java
+++ b/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/AssertEqualsAssertionsTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/AssertFalseAssertionsTests.java b/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/AssertFalseAssertionsTests.java
index 7b711bad2e5b..ee2f2f61a34c 100644
--- a/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/AssertFalseAssertionsTests.java
+++ b/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/AssertFalseAssertionsTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/AssertInstanceOfAssertionsTests.java b/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/AssertInstanceOfAssertionsTests.java
index 12ba2fa92f9f..70d5882b3915 100644
--- a/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/AssertInstanceOfAssertionsTests.java
+++ b/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/AssertInstanceOfAssertionsTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/AssertIterableEqualsAssertionsTests.java b/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/AssertIterableEqualsAssertionsTests.java
index dc3d10b3e250..843f2af7dcd9 100644
--- a/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/AssertIterableEqualsAssertionsTests.java
+++ b/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/AssertIterableEqualsAssertionsTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/AssertLinesMatchAssertionsTests.java b/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/AssertLinesMatchAssertionsTests.java
index 3080cc2d4221..97263cd66343 100644
--- a/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/AssertLinesMatchAssertionsTests.java
+++ b/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/AssertLinesMatchAssertionsTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/AssertNotEqualsAssertionsTests.java b/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/AssertNotEqualsAssertionsTests.java
index 5755fa66c5fb..1606c6be17e8 100644
--- a/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/AssertNotEqualsAssertionsTests.java
+++ b/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/AssertNotEqualsAssertionsTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/AssertNotNullAssertionsTests.java b/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/AssertNotNullAssertionsTests.java
index 2854a3d28939..bf234197f224 100644
--- a/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/AssertNotNullAssertionsTests.java
+++ b/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/AssertNotNullAssertionsTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/AssertNotSameAssertionsTests.java b/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/AssertNotSameAssertionsTests.java
index da8cb57915bb..4429f33b4bad 100644
--- a/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/AssertNotSameAssertionsTests.java
+++ b/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/AssertNotSameAssertionsTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/AssertNullAssertionsTests.java b/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/AssertNullAssertionsTests.java
index 145b25aa1e6f..e97ed12f3bd5 100644
--- a/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/AssertNullAssertionsTests.java
+++ b/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/AssertNullAssertionsTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/AssertSameAssertionsTests.java b/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/AssertSameAssertionsTests.java
index 4143b41b2a76..e9ab08de1a49 100644
--- a/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/AssertSameAssertionsTests.java
+++ b/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/AssertSameAssertionsTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/AssertThrowsAssertionsTests.java b/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/AssertThrowsAssertionsTests.java
index 302914794a38..7a807db61d55 100644
--- a/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/AssertThrowsAssertionsTests.java
+++ b/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/AssertThrowsAssertionsTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
@@ -201,6 +201,7 @@ void assertThrowsWithExecutableThatThrowsAnUnexpectedExceptionWithMessageSupplie
}
@Test
+ @SuppressWarnings("serial")
void assertThrowsWithExecutableThatThrowsInstanceOfAnonymousInnerClassAsUnexpectedException() {
try {
assertThrows(IllegalStateException.class, () -> {
diff --git a/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/AssertThrowsExactlyAssertionsTests.java b/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/AssertThrowsExactlyAssertionsTests.java
index 8d810e16d4c6..79c1f32876d8 100644
--- a/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/AssertThrowsExactlyAssertionsTests.java
+++ b/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/AssertThrowsExactlyAssertionsTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
@@ -241,6 +241,7 @@ void assertThrowsWithExecutableThatThrowsAnUnexpectedExceptionWithMessageSupplie
}
@Test
+ @SuppressWarnings("serial")
void assertThrowsWithExecutableThatThrowsInstanceOfAnonymousInnerClassAsUnexpectedException() {
try {
assertThrowsExactly(IllegalStateException.class, () -> {
diff --git a/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/AssertTimeoutAssertionsTests.java b/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/AssertTimeoutAssertionsTests.java
index 0dfd4e7d6e13..65ef3620eeb5 100644
--- a/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/AssertTimeoutAssertionsTests.java
+++ b/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/AssertTimeoutAssertionsTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/AssertTimeoutPreemptivelyAssertionsTests.java b/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/AssertTimeoutPreemptivelyAssertionsTests.java
index 1f4d453cd698..c1570e6a004c 100644
--- a/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/AssertTimeoutPreemptivelyAssertionsTests.java
+++ b/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/AssertTimeoutPreemptivelyAssertionsTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/AssertTrueAssertionsTests.java b/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/AssertTrueAssertionsTests.java
index faeadabe0569..edbda5c9b01c 100644
--- a/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/AssertTrueAssertionsTests.java
+++ b/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/AssertTrueAssertionsTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/AssertionTestUtils.java b/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/AssertionTestUtils.java
index 94c39bef39bf..3db358427077 100644
--- a/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/AssertionTestUtils.java
+++ b/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/AssertionTestUtils.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/AssumptionsTests.java b/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/AssumptionsTests.java
index 3e9cba4d55f9..badeff93f66c 100644
--- a/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/AssumptionsTests.java
+++ b/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/AssumptionsTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/DisplayNameGenerationInheritanceTestCase.java b/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/DisplayNameGenerationInheritanceTestCase.java
index 7f68db1e0c7d..427ebdfc1fd0 100644
--- a/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/DisplayNameGenerationInheritanceTestCase.java
+++ b/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/DisplayNameGenerationInheritanceTestCase.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/DisplayNameGenerationTests.java b/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/DisplayNameGenerationTests.java
index 1f3f468f86d5..a02a9adfe1a2 100644
--- a/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/DisplayNameGenerationTests.java
+++ b/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/DisplayNameGenerationTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/DynamicTestTests.java b/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/DynamicTestTests.java
index b4c586b43948..91a49501f0e1 100644
--- a/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/DynamicTestTests.java
+++ b/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/DynamicTestTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/EnigmaThrowable.java b/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/EnigmaThrowable.java
index 9e4061ced067..c3ce961104ff 100644
--- a/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/EnigmaThrowable.java
+++ b/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/EnigmaThrowable.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/FailAssertionsTests.java b/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/FailAssertionsTests.java
index 599b088b1925..fa2edce64b6b 100644
--- a/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/FailAssertionsTests.java
+++ b/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/FailAssertionsTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/IndicativeSentencesGenerationInheritanceTestCase.java b/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/IndicativeSentencesGenerationInheritanceTestCase.java
index 1b60dbd8f0b6..1a506ee02968 100644
--- a/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/IndicativeSentencesGenerationInheritanceTestCase.java
+++ b/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/IndicativeSentencesGenerationInheritanceTestCase.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/IndicativeSentencesNestedTestCase.java b/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/IndicativeSentencesNestedTestCase.java
index e3edd5b758f8..8b6db62d1b20 100644
--- a/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/IndicativeSentencesNestedTestCase.java
+++ b/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/IndicativeSentencesNestedTestCase.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/IndicativeSentencesTopLevelTestCase.java b/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/IndicativeSentencesTopLevelTestCase.java
index f9764f89eef8..d1cdbcdbbb98 100644
--- a/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/IndicativeSentencesTopLevelTestCase.java
+++ b/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/IndicativeSentencesTopLevelTestCase.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/IterableFactory.java b/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/IterableFactory.java
index 9e02a3c4643a..0bf31285d9b7 100644
--- a/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/IterableFactory.java
+++ b/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/IterableFactory.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/condition/AbstractExecutionConditionTests.java b/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/condition/AbstractExecutionConditionTests.java
index a61cd0c48bf9..7e02a7d3360b 100644
--- a/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/condition/AbstractExecutionConditionTests.java
+++ b/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/condition/AbstractExecutionConditionTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
@@ -50,7 +50,7 @@
@TestInstance(Lifecycle.PER_CLASS)
abstract class AbstractExecutionConditionTests {
- private final ExtensionContext context = mock(ExtensionContext.class);
+ private final ExtensionContext context = mock();
private ConditionEvaluationResult result;
diff --git a/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/condition/DisabledForJreRangeConditionTests.java b/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/condition/DisabledForJreRangeConditionTests.java
index c4a4d8dc7275..9ccce353304a 100644
--- a/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/condition/DisabledForJreRangeConditionTests.java
+++ b/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/condition/DisabledForJreRangeConditionTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
@@ -22,6 +22,7 @@
import static org.junit.jupiter.api.condition.EnabledOnJreIntegrationTests.onJava18;
import static org.junit.jupiter.api.condition.EnabledOnJreIntegrationTests.onJava19;
import static org.junit.jupiter.api.condition.EnabledOnJreIntegrationTests.onJava20;
+import static org.junit.jupiter.api.condition.EnabledOnJreIntegrationTests.onJava21;
import static org.junit.jupiter.api.condition.EnabledOnJreIntegrationTests.onJava8;
import static org.junit.jupiter.api.condition.EnabledOnJreIntegrationTests.onJava9;
@@ -113,8 +114,9 @@ void javaMin18() {
@Test
void other() {
evaluateCondition();
- assertDisabledOnCurrentJreIf(!(onJava8() || onJava9() || onJava10() || onJava11() || onJava12() || onJava13()
- || onJava14() || onJava15() || onJava16() || onJava17() || onJava18() || onJava19() || onJava20()));
+ assertDisabledOnCurrentJreIf(
+ !(onJava8() || onJava9() || onJava10() || onJava11() || onJava12() || onJava13() || onJava14() || onJava15()
+ || onJava16() || onJava17() || onJava18() || onJava19() || onJava20() || onJava21()));
}
private void assertDisabledOnCurrentJreIf(boolean condition) {
diff --git a/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/condition/DisabledForJreRangeIntegrationTests.java b/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/condition/DisabledForJreRangeIntegrationTests.java
index d05c043ecf78..bcca45f99859 100644
--- a/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/condition/DisabledForJreRangeIntegrationTests.java
+++ b/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/condition/DisabledForJreRangeIntegrationTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
@@ -24,6 +24,7 @@
import static org.junit.jupiter.api.condition.EnabledOnJreIntegrationTests.onJava18;
import static org.junit.jupiter.api.condition.EnabledOnJreIntegrationTests.onJava19;
import static org.junit.jupiter.api.condition.EnabledOnJreIntegrationTests.onJava20;
+import static org.junit.jupiter.api.condition.EnabledOnJreIntegrationTests.onJava21;
import static org.junit.jupiter.api.condition.EnabledOnJreIntegrationTests.onJava8;
import static org.junit.jupiter.api.condition.EnabledOnJreIntegrationTests.onJava9;
import static org.junit.jupiter.api.condition.JRE.JAVA_17;
@@ -82,7 +83,7 @@ void javaMin18() {
@DisabledForJreRange(min = OTHER, max = OTHER)
void other() {
assertTrue(onJava8() || onJava9() || onJava10() || onJava11() || onJava12() || onJava13() || onJava14()
- || onJava15() || onJava16() || onJava17() || onJava18() || onJava19() || onJava20());
+ || onJava15() || onJava16() || onJava17() || onJava18() || onJava19() || onJava20() || onJava21());
}
}
diff --git a/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/condition/DisabledIfConditionTests.java b/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/condition/DisabledIfConditionTests.java
index c8fdbd9b86e5..fc1524d89192 100644
--- a/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/condition/DisabledIfConditionTests.java
+++ b/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/condition/DisabledIfConditionTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/condition/DisabledIfEnvironmentVariableConditionTests.java b/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/condition/DisabledIfEnvironmentVariableConditionTests.java
index 5a8946b77224..07a3e78242c8 100644
--- a/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/condition/DisabledIfEnvironmentVariableConditionTests.java
+++ b/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/condition/DisabledIfEnvironmentVariableConditionTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/condition/DisabledIfEnvironmentVariableIntegrationTests.java b/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/condition/DisabledIfEnvironmentVariableIntegrationTests.java
index 50b9714ee3f2..cbc06823cc52 100644
--- a/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/condition/DisabledIfEnvironmentVariableIntegrationTests.java
+++ b/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/condition/DisabledIfEnvironmentVariableIntegrationTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/condition/DisabledIfIntegrationTests.java b/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/condition/DisabledIfIntegrationTests.java
index 26ff4be04a03..c783d3229387 100644
--- a/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/condition/DisabledIfIntegrationTests.java
+++ b/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/condition/DisabledIfIntegrationTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/condition/DisabledIfSystemPropertyConditionTests.java b/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/condition/DisabledIfSystemPropertyConditionTests.java
index 6933a1773b0f..d7be117713aa 100644
--- a/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/condition/DisabledIfSystemPropertyConditionTests.java
+++ b/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/condition/DisabledIfSystemPropertyConditionTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/condition/DisabledIfSystemPropertyIntegrationTests.java b/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/condition/DisabledIfSystemPropertyIntegrationTests.java
index 927d04c7d00f..7dd479d362f2 100644
--- a/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/condition/DisabledIfSystemPropertyIntegrationTests.java
+++ b/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/condition/DisabledIfSystemPropertyIntegrationTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/condition/DisabledOnJreConditionTests.java b/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/condition/DisabledOnJreConditionTests.java
index 187f763fad94..35fa2e52bd85 100644
--- a/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/condition/DisabledOnJreConditionTests.java
+++ b/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/condition/DisabledOnJreConditionTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
@@ -23,6 +23,7 @@
import static org.junit.jupiter.api.condition.EnabledOnJreIntegrationTests.onJava18;
import static org.junit.jupiter.api.condition.EnabledOnJreIntegrationTests.onJava19;
import static org.junit.jupiter.api.condition.EnabledOnJreIntegrationTests.onJava20;
+import static org.junit.jupiter.api.condition.EnabledOnJreIntegrationTests.onJava21;
import static org.junit.jupiter.api.condition.EnabledOnJreIntegrationTests.onJava8;
import static org.junit.jupiter.api.condition.EnabledOnJreIntegrationTests.onJava9;
@@ -196,14 +197,24 @@ void java20() {
assertDisabledOnCurrentJreIf(onJava20());
}
+ /**
+ * @see DisabledOnJreIntegrationTests#java21()
+ */
+ @Test
+ void java21() {
+ evaluateCondition();
+ assertDisabledOnCurrentJreIf(onJava21());
+ }
+
/**
* @see DisabledOnJreIntegrationTests#other()
*/
@Test
void other() {
evaluateCondition();
- assertDisabledOnCurrentJreIf(!(onJava8() || onJava9() || onJava10() || onJava11() || onJava12() || onJava13()
- || onJava14() || onJava15() || onJava16() || onJava17() || onJava18() || onJava19() || onJava20()));
+ assertDisabledOnCurrentJreIf(
+ !(onJava8() || onJava9() || onJava10() || onJava11() || onJava12() || onJava13() || onJava14() || onJava15()
+ || onJava16() || onJava17() || onJava18() || onJava19() || onJava20() || onJava21()));
}
private void assertDisabledOnCurrentJreIf(boolean condition) {
diff --git a/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/condition/DisabledOnJreIntegrationTests.java b/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/condition/DisabledOnJreIntegrationTests.java
index 42c24ddbf5e1..12ece2e580a9 100644
--- a/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/condition/DisabledOnJreIntegrationTests.java
+++ b/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/condition/DisabledOnJreIntegrationTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
@@ -24,6 +24,7 @@
import static org.junit.jupiter.api.condition.EnabledOnJreIntegrationTests.onJava18;
import static org.junit.jupiter.api.condition.EnabledOnJreIntegrationTests.onJava19;
import static org.junit.jupiter.api.condition.EnabledOnJreIntegrationTests.onJava20;
+import static org.junit.jupiter.api.condition.EnabledOnJreIntegrationTests.onJava21;
import static org.junit.jupiter.api.condition.EnabledOnJreIntegrationTests.onJava8;
import static org.junit.jupiter.api.condition.EnabledOnJreIntegrationTests.onJava9;
import static org.junit.jupiter.api.condition.JRE.JAVA_10;
@@ -37,6 +38,7 @@
import static org.junit.jupiter.api.condition.JRE.JAVA_18;
import static org.junit.jupiter.api.condition.JRE.JAVA_19;
import static org.junit.jupiter.api.condition.JRE.JAVA_20;
+import static org.junit.jupiter.api.condition.JRE.JAVA_21;
import static org.junit.jupiter.api.condition.JRE.JAVA_8;
import static org.junit.jupiter.api.condition.JRE.JAVA_9;
import static org.junit.jupiter.api.condition.JRE.OTHER;
@@ -64,7 +66,7 @@ void missingJreDeclaration() {
@Test
@DisabledOnJre(value = { JAVA_8, JAVA_9, JAVA_10, JAVA_11, JAVA_12, JAVA_13, JAVA_14, JAVA_15, JAVA_16, JAVA_17,
- JAVA_18, JAVA_19, JAVA_20, OTHER }, disabledReason = "Disabled on every JRE")
+ JAVA_18, JAVA_19, JAVA_20, JAVA_21, OTHER }, disabledReason = "Disabled on every JRE")
void disabledOnAllJavaVersions() {
fail("should be disabled");
}
@@ -147,11 +149,17 @@ void java20() {
assertFalse(onJava20());
}
+ @Test
+ @DisabledOnJre(JAVA_21)
+ void java21() {
+ assertFalse(onJava21());
+ }
+
@Test
@DisabledOnJre(OTHER)
void other() {
assertTrue(onJava8() || onJava9() || onJava10() || onJava11() || onJava12() || onJava13() || onJava14()
- || onJava15() || onJava16() || onJava17() || onJava18() || onJava19() || onJava20());
+ || onJava15() || onJava16() || onJava17() || onJava18() || onJava19() || onJava20() || onJava21());
}
}
diff --git a/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/condition/DisabledOnOsConditionTests.java b/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/condition/DisabledOnOsConditionTests.java
index d6c4af6998f3..bab7f53dc24b 100644
--- a/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/condition/DisabledOnOsConditionTests.java
+++ b/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/condition/DisabledOnOsConditionTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/condition/DisabledOnOsIntegrationTests.java b/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/condition/DisabledOnOsIntegrationTests.java
index 859fd018e742..d5a27e7ed29d 100644
--- a/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/condition/DisabledOnOsIntegrationTests.java
+++ b/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/condition/DisabledOnOsIntegrationTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/condition/EnabledForJreRangeConditionTests.java b/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/condition/EnabledForJreRangeConditionTests.java
index 9d5e506c30f0..f894695285d2 100644
--- a/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/condition/EnabledForJreRangeConditionTests.java
+++ b/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/condition/EnabledForJreRangeConditionTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
@@ -22,6 +22,7 @@
import static org.junit.jupiter.api.condition.EnabledOnJreIntegrationTests.onJava18;
import static org.junit.jupiter.api.condition.EnabledOnJreIntegrationTests.onJava19;
import static org.junit.jupiter.api.condition.EnabledOnJreIntegrationTests.onJava20;
+import static org.junit.jupiter.api.condition.EnabledOnJreIntegrationTests.onJava21;
import static org.junit.jupiter.api.condition.EnabledOnJreIntegrationTests.onJava8;
import static org.junit.jupiter.api.condition.EnabledOnJreIntegrationTests.onJava9;
@@ -112,8 +113,9 @@ void javaMin18() {
@Test
void other() {
evaluateCondition();
- assertEnabledOnCurrentJreIf(!(onJava8() || onJava9() || onJava10() || onJava11() || onJava12() || onJava13()
- || onJava14() || onJava15() || onJava16() || onJava17() || onJava18() || onJava19() || onJava20()));
+ assertEnabledOnCurrentJreIf(
+ !(onJava8() || onJava9() || onJava10() || onJava11() || onJava12() || onJava13() || onJava14() || onJava15()
+ || onJava16() || onJava17() || onJava18() || onJava19() || onJava20() || onJava21()));
}
private void assertEnabledOnCurrentJreIf(boolean condition) {
diff --git a/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/condition/EnabledForJreRangeIntegrationTests.java b/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/condition/EnabledForJreRangeIntegrationTests.java
index d3900f82899e..5007240e7f2a 100644
--- a/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/condition/EnabledForJreRangeIntegrationTests.java
+++ b/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/condition/EnabledForJreRangeIntegrationTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
@@ -24,6 +24,7 @@
import static org.junit.jupiter.api.condition.EnabledOnJreIntegrationTests.onJava18;
import static org.junit.jupiter.api.condition.EnabledOnJreIntegrationTests.onJava19;
import static org.junit.jupiter.api.condition.EnabledOnJreIntegrationTests.onJava20;
+import static org.junit.jupiter.api.condition.EnabledOnJreIntegrationTests.onJava21;
import static org.junit.jupiter.api.condition.EnabledOnJreIntegrationTests.onJava8;
import static org.junit.jupiter.api.condition.EnabledOnJreIntegrationTests.onJava9;
import static org.junit.jupiter.api.condition.JRE.JAVA_17;
@@ -77,7 +78,7 @@ void javaMax18() {
@Test
@EnabledForJreRange(min = JAVA_18)
void javaMin18() {
- assertTrue(onJava18() || onJava19() || onJava20());
+ assertTrue(onJava18() || onJava19() || onJava20() || onJava21());
assertFalse(onJava17());
}
@@ -85,7 +86,7 @@ void javaMin18() {
@EnabledForJreRange(min = OTHER, max = OTHER)
void other() {
assertFalse(onJava8() || onJava9() || onJava10() || onJava11() || onJava12() || onJava13() || onJava14()
- || onJava15() || onJava16() || onJava17() || onJava18() || onJava19() || onJava20());
+ || onJava15() || onJava16() || onJava17() || onJava18() || onJava19() || onJava20() || onJava21());
}
}
diff --git a/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/condition/EnabledIfConditionTests.java b/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/condition/EnabledIfConditionTests.java
index 840e4a912d61..ec249667d8be 100644
--- a/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/condition/EnabledIfConditionTests.java
+++ b/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/condition/EnabledIfConditionTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/condition/EnabledIfEnvironmentVariableConditionTests.java b/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/condition/EnabledIfEnvironmentVariableConditionTests.java
index 1c38c1eba721..c90c28c226f8 100644
--- a/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/condition/EnabledIfEnvironmentVariableConditionTests.java
+++ b/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/condition/EnabledIfEnvironmentVariableConditionTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/condition/EnabledIfEnvironmentVariableIntegrationTests.java b/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/condition/EnabledIfEnvironmentVariableIntegrationTests.java
index 09b9050c112b..2e0224c310bd 100644
--- a/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/condition/EnabledIfEnvironmentVariableIntegrationTests.java
+++ b/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/condition/EnabledIfEnvironmentVariableIntegrationTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/condition/EnabledIfIntegrationTests.java b/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/condition/EnabledIfIntegrationTests.java
index 8b8df8820cf1..60eac3adcb41 100644
--- a/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/condition/EnabledIfIntegrationTests.java
+++ b/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/condition/EnabledIfIntegrationTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/condition/EnabledIfSystemPropertyConditionTests.java b/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/condition/EnabledIfSystemPropertyConditionTests.java
index dc5529d4c26b..399687ddfe58 100644
--- a/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/condition/EnabledIfSystemPropertyConditionTests.java
+++ b/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/condition/EnabledIfSystemPropertyConditionTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/condition/EnabledIfSystemPropertyIntegrationTests.java b/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/condition/EnabledIfSystemPropertyIntegrationTests.java
index 7af53e704efc..2a6010e38af1 100644
--- a/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/condition/EnabledIfSystemPropertyIntegrationTests.java
+++ b/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/condition/EnabledIfSystemPropertyIntegrationTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/condition/EnabledOnJreConditionTests.java b/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/condition/EnabledOnJreConditionTests.java
index e2f217f118d3..9c4bb4c2a143 100644
--- a/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/condition/EnabledOnJreConditionTests.java
+++ b/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/condition/EnabledOnJreConditionTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
@@ -23,6 +23,7 @@
import static org.junit.jupiter.api.condition.EnabledOnJreIntegrationTests.onJava18;
import static org.junit.jupiter.api.condition.EnabledOnJreIntegrationTests.onJava19;
import static org.junit.jupiter.api.condition.EnabledOnJreIntegrationTests.onJava20;
+import static org.junit.jupiter.api.condition.EnabledOnJreIntegrationTests.onJava21;
import static org.junit.jupiter.api.condition.EnabledOnJreIntegrationTests.onJava8;
import static org.junit.jupiter.api.condition.EnabledOnJreIntegrationTests.onJava9;
@@ -195,14 +196,24 @@ void java20() {
assertEnabledOnCurrentJreIf(onJava20());
}
+ /**
+ * @see EnabledOnJreIntegrationTests#java21()
+ */
+ @Test
+ void java21() {
+ evaluateCondition();
+ assertEnabledOnCurrentJreIf(onJava21());
+ }
+
/**
* @see EnabledOnJreIntegrationTests#other()
*/
@Test
void other() {
evaluateCondition();
- assertEnabledOnCurrentJreIf(!(onJava8() || onJava9() || onJava10() || onJava11() || onJava12() || onJava13()
- || onJava14() || onJava15() || onJava16() || onJava17() || onJava18() || onJava19() || onJava20()));
+ assertEnabledOnCurrentJreIf(
+ !(onJava8() || onJava9() || onJava10() || onJava11() || onJava12() || onJava13() || onJava14() || onJava15()
+ || onJava16() || onJava17() || onJava18() || onJava19() || onJava20() || onJava21()));
assertCustomDisabledReasonIs("Disabled on almost every JRE");
}
diff --git a/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/condition/EnabledOnJreIntegrationTests.java b/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/condition/EnabledOnJreIntegrationTests.java
index 7ba00a917fc4..a7a414486727 100644
--- a/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/condition/EnabledOnJreIntegrationTests.java
+++ b/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/condition/EnabledOnJreIntegrationTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
@@ -23,6 +23,7 @@
import static org.junit.jupiter.api.condition.JRE.JAVA_18;
import static org.junit.jupiter.api.condition.JRE.JAVA_19;
import static org.junit.jupiter.api.condition.JRE.JAVA_20;
+import static org.junit.jupiter.api.condition.JRE.JAVA_21;
import static org.junit.jupiter.api.condition.JRE.JAVA_8;
import static org.junit.jupiter.api.condition.JRE.JAVA_9;
import static org.junit.jupiter.api.condition.JRE.OTHER;
@@ -52,7 +53,7 @@ void missingJreDeclaration() {
@Test
@EnabledOnJre({ JAVA_8, JAVA_9, JAVA_10, JAVA_11, JAVA_12, JAVA_13, JAVA_14, JAVA_15, JAVA_16, JAVA_17, JAVA_18,
- JAVA_19, JAVA_20, OTHER })
+ JAVA_19, JAVA_20, JAVA_21, OTHER })
void enabledOnAllJavaVersions() {
}
@@ -134,11 +135,17 @@ void java20() {
assertTrue(onJava20());
}
+ @Test
+ @EnabledOnJre(JAVA_21)
+ void java21() {
+ assertTrue(onJava21());
+ }
+
@Test
@EnabledOnJre(value = OTHER, disabledReason = "Disabled on almost every JRE")
void other() {
assertFalse(onJava8() || onJava9() || onJava10() || onJava11() || onJava12() || onJava13() || onJava14()
- || onJava15() || onJava16() || onJava17() || onJava18() || onJava19() || onJava20());
+ || onJava15() || onJava16() || onJava17() || onJava18() || onJava19() || onJava20() || onJava21());
}
static boolean onJava8() {
@@ -193,4 +200,8 @@ static boolean onJava20() {
return JAVA_VERSION.startsWith("20");
}
+ static boolean onJava21() {
+ return JAVA_VERSION.startsWith("21");
+ }
+
}
diff --git a/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/condition/EnabledOnOsConditionTests.java b/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/condition/EnabledOnOsConditionTests.java
index ddfccaebeb93..267e5e69f53c 100644
--- a/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/condition/EnabledOnOsConditionTests.java
+++ b/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/condition/EnabledOnOsConditionTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/condition/EnabledOnOsIntegrationTests.java b/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/condition/EnabledOnOsIntegrationTests.java
index 8e8f8b1c8f6d..5e7b15c6b740 100644
--- a/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/condition/EnabledOnOsIntegrationTests.java
+++ b/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/condition/EnabledOnOsIntegrationTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/condition/JRETests.java b/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/condition/JRETests.java
index da6d7d4db6ce..f915146cfee4 100644
--- a/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/condition/JRETests.java
+++ b/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/condition/JRETests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
@@ -11,18 +11,11 @@
package org.junit.jupiter.api.condition;
import static org.junit.jupiter.api.Assertions.assertEquals;
-import static org.junit.jupiter.api.condition.JRE.JAVA_10;
-import static org.junit.jupiter.api.condition.JRE.JAVA_11;
-import static org.junit.jupiter.api.condition.JRE.JAVA_12;
-import static org.junit.jupiter.api.condition.JRE.JAVA_13;
-import static org.junit.jupiter.api.condition.JRE.JAVA_14;
-import static org.junit.jupiter.api.condition.JRE.JAVA_15;
-import static org.junit.jupiter.api.condition.JRE.JAVA_16;
import static org.junit.jupiter.api.condition.JRE.JAVA_17;
import static org.junit.jupiter.api.condition.JRE.JAVA_18;
import static org.junit.jupiter.api.condition.JRE.JAVA_19;
-import static org.junit.jupiter.api.condition.JRE.JAVA_8;
-import static org.junit.jupiter.api.condition.JRE.JAVA_9;
+import static org.junit.jupiter.api.condition.JRE.JAVA_20;
+import static org.junit.jupiter.api.condition.JRE.JAVA_21;
import static org.junit.jupiter.api.condition.JRE.OTHER;
import org.junit.jupiter.api.Test;
@@ -34,60 +27,6 @@
*/
public class JRETests {
- @Test
- @EnabledOnJre(JAVA_8)
- void java8() {
- assertEquals(JAVA_8, JRE.currentVersion());
- }
-
- @Test
- @EnabledOnJre(JAVA_9)
- void java9() {
- assertEquals(JAVA_9, JRE.currentVersion());
- }
-
- @Test
- @EnabledOnJre(JAVA_10)
- void java10() {
- assertEquals(JAVA_10, JRE.currentVersion());
- }
-
- @Test
- @EnabledOnJre(JAVA_11)
- void java11() {
- assertEquals(JAVA_11, JRE.currentVersion());
- }
-
- @Test
- @EnabledOnJre(JAVA_12)
- void java12() {
- assertEquals(JAVA_12, JRE.currentVersion());
- }
-
- @Test
- @EnabledOnJre(JAVA_13)
- void java13() {
- assertEquals(JAVA_13, JRE.currentVersion());
- }
-
- @Test
- @EnabledOnJre(JAVA_14)
- void java14() {
- assertEquals(JAVA_14, JRE.currentVersion());
- }
-
- @Test
- @EnabledOnJre(JAVA_15)
- void java15() {
- assertEquals(JAVA_15, JRE.currentVersion());
- }
-
- @Test
- @EnabledOnJre(JAVA_16)
- void java16() {
- assertEquals(JAVA_16, JRE.currentVersion());
- }
-
@Test
@EnabledOnJre(JAVA_17)
void java17() {
@@ -106,6 +45,18 @@ void java19() {
assertEquals(JAVA_19, JRE.currentVersion());
}
+ @Test
+ @EnabledOnJre(JAVA_20)
+ void java20() {
+ assertEquals(JAVA_20, JRE.currentVersion());
+ }
+
+ @Test
+ @EnabledOnJre(JAVA_21)
+ void java21() {
+ assertEquals(JAVA_21, JRE.currentVersion());
+ }
+
@Test
@EnabledOnJre(OTHER)
void other() {
diff --git a/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/condition/StaticConditionMethods.java b/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/condition/StaticConditionMethods.java
index f4d8e378b2d0..1175c870824c 100644
--- a/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/condition/StaticConditionMethods.java
+++ b/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/condition/StaticConditionMethods.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/extension/CloseableResourceIntegrationTests.java b/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/extension/CloseableResourceIntegrationTests.java
index f9e35c4d3a57..f96e1b6341d2 100644
--- a/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/extension/CloseableResourceIntegrationTests.java
+++ b/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/extension/CloseableResourceIntegrationTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/extension/ExecutableInvokerIntegrationTests.java b/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/extension/ExecutableInvokerIntegrationTests.java
index a9c25aff5145..82a96d168e0a 100644
--- a/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/extension/ExecutableInvokerIntegrationTests.java
+++ b/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/extension/ExecutableInvokerIntegrationTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/extension/ExtensionComposabilityTests.java b/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/extension/ExtensionComposabilityTests.java
index f8db055077e1..1ac243cfc520 100644
--- a/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/extension/ExtensionComposabilityTests.java
+++ b/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/extension/ExtensionComposabilityTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/extension/KitchenSinkExtension.java b/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/extension/KitchenSinkExtension.java
index 2a9b874637fb..1740f609d951 100644
--- a/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/extension/KitchenSinkExtension.java
+++ b/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/extension/KitchenSinkExtension.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/extension/support/TypeBasedParameterResolverTests.java b/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/extension/support/TypeBasedParameterResolverTests.java
index 75950433a3cb..40a333efb5d8 100644
--- a/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/extension/support/TypeBasedParameterResolverTests.java
+++ b/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/extension/support/TypeBasedParameterResolverTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
@@ -14,6 +14,7 @@
import static org.junit.jupiter.api.Assertions.assertFalse;
import static org.junit.jupiter.api.Assertions.assertThrows;
import static org.junit.jupiter.api.Assertions.assertTrue;
+import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;
import java.lang.annotation.ElementType;
@@ -32,7 +33,6 @@
import org.junit.jupiter.api.extension.ParameterResolver;
import org.junit.platform.commons.PreconditionViolationException;
import org.junit.platform.commons.util.ReflectionUtils;
-import org.mockito.Mockito;
/**
* @since 5.6
@@ -86,13 +86,13 @@ void resolve() {
}
private static ParameterContext parameterContext(Parameter parameter) {
- ParameterContext parameterContext = Mockito.mock(ParameterContext.class);
+ ParameterContext parameterContext = mock();
when(parameterContext.getParameter()).thenReturn(parameter);
return parameterContext;
}
private static ExtensionContext extensionContext() {
- ExtensionContext extensionContext = Mockito.mock(ExtensionContext.class);
+ ExtensionContext extensionContext = mock();
when(extensionContext.getDisplayName()).thenReturn("Displaying");
return extensionContext;
}
diff --git a/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/subpackage/SubclassedAssertionsTests.java b/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/subpackage/SubclassedAssertionsTests.java
index 9fcde033ed49..0efa28c947bc 100644
--- a/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/subpackage/SubclassedAssertionsTests.java
+++ b/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/subpackage/SubclassedAssertionsTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/subpackage/SubclassedAssumptionsTests.java b/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/subpackage/SubclassedAssumptionsTests.java
index 08ad11b8ab62..0d5cc0bb062c 100644
--- a/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/subpackage/SubclassedAssumptionsTests.java
+++ b/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/subpackage/SubclassedAssumptionsTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/AbstractJupiterTestEngineTests.java b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/AbstractJupiterTestEngineTests.java
index 856780e0dbaa..69264f903287 100644
--- a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/AbstractJupiterTestEngineTests.java
+++ b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/AbstractJupiterTestEngineTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/AtypicalJvmMethodNameTests.java b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/AtypicalJvmMethodNameTests.java
index 7fe62961777d..38bef70a8411 100644
--- a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/AtypicalJvmMethodNameTests.java
+++ b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/AtypicalJvmMethodNameTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/BeforeAllAndAfterAllComposedAnnotationTests.java b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/BeforeAllAndAfterAllComposedAnnotationTests.java
index 8161147d2852..2cbbf64ad53d 100644
--- a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/BeforeAllAndAfterAllComposedAnnotationTests.java
+++ b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/BeforeAllAndAfterAllComposedAnnotationTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/BeforeEachAndAfterEachComposedAnnotationTests.java b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/BeforeEachAndAfterEachComposedAnnotationTests.java
index b6c671a8665b..e6c3804877ee 100644
--- a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/BeforeEachAndAfterEachComposedAnnotationTests.java
+++ b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/BeforeEachAndAfterEachComposedAnnotationTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/DefaultExecutionModeTests.java b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/DefaultExecutionModeTests.java
index 8fe90401e8ff..7dd37e1ea3ca 100644
--- a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/DefaultExecutionModeTests.java
+++ b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/DefaultExecutionModeTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/DefaultMethodTests.java b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/DefaultMethodTests.java
index c784f1dd8bff..45d86c7c1773 100644
--- a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/DefaultMethodTests.java
+++ b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/DefaultMethodTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/DisabledTests.java b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/DisabledTests.java
index b66f56895f02..63f433671e64 100644
--- a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/DisabledTests.java
+++ b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/DisabledTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/DynamicNodeGenerationTests.java b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/DynamicNodeGenerationTests.java
index b6857d0f26f3..87dcf40c4fc6 100644
--- a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/DynamicNodeGenerationTests.java
+++ b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/DynamicNodeGenerationTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/ExceptionHandlingTests.java b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/ExceptionHandlingTests.java
index 107e3e9c8fb6..b1662d658fdc 100644
--- a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/ExceptionHandlingTests.java
+++ b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/ExceptionHandlingTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/FailedAssumptionsTests.java b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/FailedAssumptionsTests.java
index 276b022254ca..726eb885b82e 100644
--- a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/FailedAssumptionsTests.java
+++ b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/FailedAssumptionsTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/InvalidLifecycleMethodConfigurationTests.java b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/InvalidLifecycleMethodConfigurationTests.java
index a4ef6b34f3b7..37dc164993ab 100644
--- a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/InvalidLifecycleMethodConfigurationTests.java
+++ b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/InvalidLifecycleMethodConfigurationTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
@@ -35,45 +35,25 @@ class InvalidLifecycleMethodConfigurationTests extends AbstractJupiterTestEngine
@Test
void executeValidTestCaseAlongsideTestCaseWithInvalidNonStaticBeforeAllDeclaration() {
- assertExecutionResults(TestCaseWithInvalidNonStaticBeforeAllMethod.class);
- }
-
- @Test
- void executeValidTestCaseAlongsideTestCaseWithInvalidPrivateBeforeAllDeclaration() {
- assertExecutionResults(TestCaseWithInvalidPrivateBeforeAllMethod.class);
+ assertContainerFailed(TestCaseWithInvalidNonStaticBeforeAllMethod.class);
}
@Test
void executeValidTestCaseAlongsideTestCaseWithInvalidNonStaticAfterAllDeclaration() {
- assertExecutionResults(TestCaseWithInvalidNonStaticAfterAllMethod.class);
- }
-
- @Test
- void executeValidTestCaseAlongsideTestCaseWithInvalidPrivateAfterAllDeclaration() {
- assertExecutionResults(TestCaseWithInvalidPrivateAfterAllMethod.class);
+ assertContainerFailed(TestCaseWithInvalidNonStaticAfterAllMethod.class);
}
@Test
void executeValidTestCaseAlongsideTestCaseWithInvalidStaticBeforeEachDeclaration() {
- assertExecutionResults(TestCaseWithInvalidStaticBeforeEachMethod.class);
- }
-
- @Test
- void executeValidTestCaseAlongsideTestCaseWithInvalidPrivateBeforeEachDeclaration() {
- assertExecutionResults(TestCaseWithInvalidPrivateBeforeEachMethod.class);
+ assertContainerFailed(TestCaseWithInvalidStaticBeforeEachMethod.class);
}
@Test
void executeValidTestCaseAlongsideTestCaseWithInvalidStaticAfterEachDeclaration() {
- assertExecutionResults(TestCaseWithInvalidStaticAfterEachMethod.class);
- }
-
- @Test
- void executeValidTestCaseAlongsideTestCaseWithInvalidPrivateAfterEachDeclaration() {
- assertExecutionResults(TestCaseWithInvalidPrivateAfterEachMethod.class);
+ assertContainerFailed(TestCaseWithInvalidStaticAfterEachMethod.class);
}
- private void assertExecutionResults(Class> invalidTestClass) {
+ private void assertContainerFailed(Class> invalidTestClass) {
EngineExecutionResults executionResults = executeTests(selectClass(TestCase.class),
selectClass(invalidTestClass));
Events containers = executionResults.containerEvents();
@@ -112,18 +92,6 @@ void test() {
}
}
- static class TestCaseWithInvalidPrivateBeforeAllMethod {
-
- // must not be private
- @BeforeAll
- private static void beforeAll() {
- }
-
- @Test
- void test() {
- }
- }
-
static class TestCaseWithInvalidNonStaticAfterAllMethod {
// must be static
@@ -136,18 +104,6 @@ void test() {
}
}
- static class TestCaseWithInvalidPrivateAfterAllMethod {
-
- // must not be private
- @AfterAll
- private static void afterAll() {
- }
-
- @Test
- void test() {
- }
- }
-
static class TestCaseWithInvalidStaticBeforeEachMethod {
// must NOT be static
@@ -160,18 +116,6 @@ void test() {
}
}
- static class TestCaseWithInvalidPrivateBeforeEachMethod {
-
- // must NOT be private
- @BeforeEach
- private void beforeEach() {
- }
-
- @Test
- void test() {
- }
- }
-
static class TestCaseWithInvalidStaticAfterEachMethod {
// must NOT be static
@@ -184,16 +128,4 @@ void test() {
}
}
- static class TestCaseWithInvalidPrivateAfterEachMethod {
-
- // must NOT be private
- @AfterEach
- private void afterEach() {
- }
-
- @Test
- void test() {
- }
- }
-
}
diff --git a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/JupiterTestEngineBasicTests.java b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/JupiterTestEngineBasicTests.java
index 22038843e8a5..5358e434e834 100644
--- a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/JupiterTestEngineBasicTests.java
+++ b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/JupiterTestEngineBasicTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/LifecycleMethodOverridingAndSupersedingTests.java b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/LifecycleMethodOverridingAndSupersedingTests.java
index 2204151b8ee5..f2a584fe02a1 100644
--- a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/LifecycleMethodOverridingAndSupersedingTests.java
+++ b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/LifecycleMethodOverridingAndSupersedingTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
@@ -10,16 +10,6 @@
package org.junit.jupiter.engine;
-/*
- * Copyright 2015-2022 the original author or authors.
- *
- * All rights reserved. This program and the accompanying materials are
- * made available under the terms of the Eclipse Public License v2.0 which
- * accompanies this distribution and is available at
- *
- * https://www.eclipse.org/legal/epl-v20.html
- */
-
import static org.junit.jupiter.api.Assertions.fail;
import org.junit.jupiter.api.BeforeEach;
diff --git a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/MultipleTestableAnnotationsTests.java b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/MultipleTestableAnnotationsTests.java
index ee6dd3bf778e..f8ded8659782 100644
--- a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/MultipleTestableAnnotationsTests.java
+++ b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/MultipleTestableAnnotationsTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/NestedTestClassesTests.java b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/NestedTestClassesTests.java
index 87114faf8994..2788b157021e 100644
--- a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/NestedTestClassesTests.java
+++ b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/NestedTestClassesTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/NestedWithInheritanceTests.java b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/NestedWithInheritanceTests.java
index bf4c5ef3a674..529026ecdbf8 100644
--- a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/NestedWithInheritanceTests.java
+++ b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/NestedWithInheritanceTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/NestedWithSeparateInheritanceTests.java b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/NestedWithSeparateInheritanceTests.java
index 4528405018a9..8b69ac205dee 100644
--- a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/NestedWithSeparateInheritanceTests.java
+++ b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/NestedWithSeparateInheritanceTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/NonVoidTestableMethodIntegrationTests.java b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/NonVoidTestableMethodIntegrationTests.java
index 5c5659e7a6c9..8f44af792f38 100644
--- a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/NonVoidTestableMethodIntegrationTests.java
+++ b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/NonVoidTestableMethodIntegrationTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/OverloadedTestMethodTests.java b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/OverloadedTestMethodTests.java
index cf54b3b9a7a0..6f17f3678cd8 100644
--- a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/OverloadedTestMethodTests.java
+++ b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/OverloadedTestMethodTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
@@ -18,6 +18,7 @@
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.TestInfo;
+import org.junit.platform.engine.UniqueId;
import org.junit.platform.launcher.TestIdentifier;
import org.junit.platform.testkit.engine.Event;
import org.junit.platform.testkit.engine.Events;
@@ -40,7 +41,7 @@ void executeTestCaseWithOverloadedMethodsAndThenRerunOnlyOneOfTheMethodsSelected
event -> event.getTestDescriptor().getUniqueId().toString().contains(TestInfo.class.getName())).findFirst();
assertTrue(first.isPresent());
TestIdentifier testIdentifier = TestIdentifier.from(first.get().getTestDescriptor());
- String uniqueId = testIdentifier.getUniqueId();
+ UniqueId uniqueId = testIdentifier.getUniqueIdObject();
tests = executeTests(selectUniqueId(uniqueId)).testEvents();
diff --git a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/RecordTests.java b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/RecordTests.java
index 776cd53ebd2c..f5a05db35c2e 100644
--- a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/RecordTests.java
+++ b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/RecordTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/ReportingTests.java b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/ReportingTests.java
index fb623569cdc5..ca909b8db483 100644
--- a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/ReportingTests.java
+++ b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/ReportingTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/SealedClassTests.java b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/SealedClassTests.java
index 6faf5e0cdd14..e1e0f7dc36a0 100644
--- a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/SealedClassTests.java
+++ b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/SealedClassTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/StandardTestClassTests.java b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/StandardTestClassTests.java
index 61f622aeee5a..230d5ebc1d3d 100644
--- a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/StandardTestClassTests.java
+++ b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/StandardTestClassTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/StaticNestedBeforeAllAndAfterAllMethodsTests.java b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/StaticNestedBeforeAllAndAfterAllMethodsTests.java
index 473dda4b393b..4264860252da 100644
--- a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/StaticNestedBeforeAllAndAfterAllMethodsTests.java
+++ b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/StaticNestedBeforeAllAndAfterAllMethodsTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/TestClassInheritanceTests.java b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/TestClassInheritanceTests.java
index 21a885ba49d7..12aa4566ac36 100644
--- a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/TestClassInheritanceTests.java
+++ b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/TestClassInheritanceTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/TestInstanceLifecycleConfigurationTests.java b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/TestInstanceLifecycleConfigurationTests.java
index 0d80fc60c299..87260717f3d6 100644
--- a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/TestInstanceLifecycleConfigurationTests.java
+++ b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/TestInstanceLifecycleConfigurationTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/TestInstanceLifecycleKotlinTests.java b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/TestInstanceLifecycleKotlinTests.java
index e785ea5751a1..50d059df5093 100644
--- a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/TestInstanceLifecycleKotlinTests.java
+++ b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/TestInstanceLifecycleKotlinTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/TestInstanceLifecycleTests.java b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/TestInstanceLifecycleTests.java
index b72d4e497db8..91548496d9ea 100644
--- a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/TestInstanceLifecycleTests.java
+++ b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/TestInstanceLifecycleTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/TestTemplateInvocationTests.java b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/TestTemplateInvocationTests.java
index 8c129f4e1aac..5b63eee0c373 100644
--- a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/TestTemplateInvocationTests.java
+++ b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/TestTemplateInvocationTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/bridge/AbstractNonGenericTests.java b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/bridge/AbstractNonGenericTests.java
index 7058c4b58741..0bc7550085bb 100644
--- a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/bridge/AbstractNonGenericTests.java
+++ b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/bridge/AbstractNonGenericTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/bridge/AbstractNumberTests.java b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/bridge/AbstractNumberTests.java
index 1f644e595084..afecac3326b5 100644
--- a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/bridge/AbstractNumberTests.java
+++ b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/bridge/AbstractNumberTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/bridge/BridgeMethodTests.java b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/bridge/BridgeMethodTests.java
index 516ee7646acb..13150e88b212 100644
--- a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/bridge/BridgeMethodTests.java
+++ b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/bridge/BridgeMethodTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/bridge/ChildWithBridgeMethods.java b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/bridge/ChildWithBridgeMethods.java
index edd08cfe9f42..bd3cb864ed5f 100644
--- a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/bridge/ChildWithBridgeMethods.java
+++ b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/bridge/ChildWithBridgeMethods.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/bridge/ChildWithoutBridgeMethods.java b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/bridge/ChildWithoutBridgeMethods.java
index 620d695b68bc..2a5169126c2a 100644
--- a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/bridge/ChildWithoutBridgeMethods.java
+++ b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/bridge/ChildWithoutBridgeMethods.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/bridge/NumberResolver.java b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/bridge/NumberResolver.java
index e6ca05fd4dc4..114d6a6100e2 100644
--- a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/bridge/NumberResolver.java
+++ b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/bridge/NumberResolver.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/bridge/NumberTestGroup.java b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/bridge/NumberTestGroup.java
index 49bf69a03cdd..5f2146f65c7f 100644
--- a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/bridge/NumberTestGroup.java
+++ b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/bridge/NumberTestGroup.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/bridge/PackagePrivateParent.java b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/bridge/PackagePrivateParent.java
index ece447bf5ff5..909139a09ae1 100644
--- a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/bridge/PackagePrivateParent.java
+++ b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/bridge/PackagePrivateParent.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/config/CachingJupiterConfigurationTests.java b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/config/CachingJupiterConfigurationTests.java
index 72717bffd608..cb4f88f73b47 100644
--- a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/config/CachingJupiterConfigurationTests.java
+++ b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/config/CachingJupiterConfigurationTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
@@ -34,7 +34,7 @@
*/
class CachingJupiterConfigurationTests {
- private final JupiterConfiguration delegate = mock(JupiterConfiguration.class);
+ private final JupiterConfiguration delegate = mock();
private final JupiterConfiguration cache = new CachingJupiterConfiguration(delegate);
@Test
diff --git a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/config/DefaultJupiterConfigurationTests.java b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/config/DefaultJupiterConfigurationTests.java
index 584f65f1d8ae..2592fe256b35 100644
--- a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/config/DefaultJupiterConfigurationTests.java
+++ b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/config/DefaultJupiterConfigurationTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
@@ -45,14 +45,14 @@ void getDefaultTestInstanceLifecyclePreconditions() {
@Test
void getDefaultTestInstanceLifecycleWithNoConfigParamSet() {
- JupiterConfiguration configuration = new DefaultJupiterConfiguration(mock(ConfigurationParameters.class));
+ JupiterConfiguration configuration = new DefaultJupiterConfiguration(mock());
Lifecycle lifecycle = configuration.getDefaultTestInstanceLifecycle();
assertThat(lifecycle).isEqualTo(PER_METHOD);
}
@Test
void getDefaultTempDirCleanupModeWithNoConfigParamSet() {
- JupiterConfiguration configuration = new DefaultJupiterConfiguration(mock(ConfigurationParameters.class));
+ JupiterConfiguration configuration = new DefaultJupiterConfiguration(mock());
CleanupMode cleanupMode = configuration.getDefaultTempDirCleanupMode();
assertThat(cleanupMode).isEqualTo(ALWAYS);
}
@@ -74,7 +74,7 @@ void getDefaultTestInstanceLifecycleWithConfigParamSet() {
@Test
void shouldGetDefaultDisplayNameGeneratorWithConfigParamSet() {
- ConfigurationParameters parameters = mock(ConfigurationParameters.class);
+ ConfigurationParameters parameters = mock();
String key = Constants.DEFAULT_DISPLAY_NAME_GENERATOR_PROPERTY_NAME;
when(parameters.get(key)).thenReturn(Optional.of(CustomDisplayNameGenerator.class.getName()));
JupiterConfiguration configuration = new DefaultJupiterConfiguration(parameters);
@@ -86,7 +86,7 @@ void shouldGetDefaultDisplayNameGeneratorWithConfigParamSet() {
@Test
void shouldGetStandardAsDefaultDisplayNameGeneratorWithoutConfigParamSet() {
- ConfigurationParameters parameters = mock(ConfigurationParameters.class);
+ ConfigurationParameters parameters = mock();
String key = Constants.DEFAULT_DISPLAY_NAME_GENERATOR_PROPERTY_NAME;
when(parameters.get(key)).thenReturn(Optional.empty());
JupiterConfiguration configuration = new DefaultJupiterConfiguration(parameters);
@@ -98,7 +98,7 @@ void shouldGetStandardAsDefaultDisplayNameGeneratorWithoutConfigParamSet() {
@Test
void shouldGetNothingAsDefaultTestMethodOrderWithoutConfigParamSet() {
- ConfigurationParameters parameters = mock(ConfigurationParameters.class);
+ ConfigurationParameters parameters = mock();
String key = Constants.DEFAULT_TEST_METHOD_ORDER_PROPERTY_NAME;
when(parameters.get(key)).thenReturn(Optional.empty());
JupiterConfiguration configuration = new DefaultJupiterConfiguration(parameters);
@@ -109,7 +109,7 @@ void shouldGetNothingAsDefaultTestMethodOrderWithoutConfigParamSet() {
}
private void assertDefaultConfigParam(String configValue, Lifecycle expected) {
- ConfigurationParameters configParams = mock(ConfigurationParameters.class);
+ ConfigurationParameters configParams = mock();
when(configParams.get(KEY)).thenReturn(Optional.ofNullable(configValue));
Lifecycle lifecycle = new DefaultJupiterConfiguration(configParams).getDefaultTestInstanceLifecycle();
assertThat(lifecycle).isEqualTo(expected);
diff --git a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/config/InstantiatingConfigurationParameterConverterTests.java b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/config/InstantiatingConfigurationParameterConverterTests.java
index 0ff5eb56c9dc..5848cda93b4a 100644
--- a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/config/InstantiatingConfigurationParameterConverterTests.java
+++ b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/config/InstantiatingConfigurationParameterConverterTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
@@ -38,7 +38,7 @@ class InstantiatingConfigurationParameterConverterTests {
@Test
void shouldInstantiateConfiguredClass(LogRecordListener listener) {
- ConfigurationParameters configurationParameters = mock(ConfigurationParameters.class);
+ ConfigurationParameters configurationParameters = mock();
when(configurationParameters.get(KEY)).thenReturn(Optional.of(CustomDisplayNameGenerator.class.getName()));
InstantiatingConfigurationParameterConverter converter = new InstantiatingConfigurationParameterConverter<>(
@@ -54,7 +54,7 @@ void shouldInstantiateConfiguredClass(LogRecordListener listener) {
@Test
void shouldReturnEmptyOptionalIfNoConfigurationFound() {
- ConfigurationParameters configurationParameters = mock(ConfigurationParameters.class);
+ ConfigurationParameters configurationParameters = mock();
when(configurationParameters.get(KEY)).thenReturn(Optional.empty());
InstantiatingConfigurationParameterConverter converter = new InstantiatingConfigurationParameterConverter<>(
@@ -66,7 +66,7 @@ void shouldReturnEmptyOptionalIfNoConfigurationFound() {
@Test
void shouldReturnEmptyOptionalIfConfigurationIsBlank() {
- ConfigurationParameters configurationParameters = mock(ConfigurationParameters.class);
+ ConfigurationParameters configurationParameters = mock();
when(configurationParameters.get(KEY)).thenReturn(Optional.of(""));
InstantiatingConfigurationParameterConverter converter = new InstantiatingConfigurationParameterConverter<>(
@@ -78,7 +78,7 @@ void shouldReturnEmptyOptionalIfConfigurationIsBlank() {
@Test
void shouldTrimAndInstantiateConfiguredClass(LogRecordListener listener) {
- ConfigurationParameters configurationParameters = mock(ConfigurationParameters.class);
+ ConfigurationParameters configurationParameters = mock();
String classNameWithSpaces = " " + CustomDisplayNameGenerator.class.getName() + " ";
when(configurationParameters.get(KEY)).thenReturn(Optional.of(classNameWithSpaces));
@@ -95,7 +95,7 @@ void shouldTrimAndInstantiateConfiguredClass(LogRecordListener listener) {
@Test
void shouldReturnEmptyOptionalIfNoClassFound(LogRecordListener listener) {
- ConfigurationParameters configurationParameters = mock(ConfigurationParameters.class);
+ ConfigurationParameters configurationParameters = mock();
when(configurationParameters.get(KEY)).thenReturn(Optional.of("random-string"));
InstantiatingConfigurationParameterConverter converter = new InstantiatingConfigurationParameterConverter<>(
@@ -111,7 +111,7 @@ void shouldReturnEmptyOptionalIfNoClassFound(LogRecordListener listener) {
@Test
void shouldReturnEmptyOptionalIfClassFoundIsNotATypeOfExpectedType(LogRecordListener listener) {
- ConfigurationParameters configurationParameters = mock(ConfigurationParameters.class);
+ ConfigurationParameters configurationParameters = mock();
when(configurationParameters.get(KEY)).thenReturn(Optional.of(Object.class.getName()));
InstantiatingConfigurationParameterConverter converter = new InstantiatingConfigurationParameterConverter<>(
@@ -127,7 +127,7 @@ void shouldReturnEmptyOptionalIfClassFoundIsNotATypeOfExpectedType(LogRecordList
@Test
void shouldReturnEmptyOptionalIfClassNameIsNotFullyQualified(LogRecordListener listener) {
- ConfigurationParameters configurationParameters = mock(ConfigurationParameters.class);
+ ConfigurationParameters configurationParameters = mock();
when(configurationParameters.get(KEY)).thenReturn(
Optional.of(CustomDisplayNameGenerator.class.getSimpleName()));
diff --git a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/descriptor/CustomDisplayNameGenerator.java b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/descriptor/CustomDisplayNameGenerator.java
index bd74cbf208c4..40ef487c7815 100644
--- a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/descriptor/CustomDisplayNameGenerator.java
+++ b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/descriptor/CustomDisplayNameGenerator.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/descriptor/DisplayNameUtilsTests.java b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/descriptor/DisplayNameUtilsTests.java
index ec8894e67f47..022f93af9caf 100644
--- a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/descriptor/DisplayNameUtilsTests.java
+++ b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/descriptor/DisplayNameUtilsTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
@@ -71,7 +71,7 @@ void shouldGetDisplayNameFromSupplierIfNoDisplayNameAnnotationPresent() {
@Nested
class ClassDisplayNameSupplierTests {
- private JupiterConfiguration configuration = mock(JupiterConfiguration.class);
+ private JupiterConfiguration configuration = mock();
@Test
void shouldGetDisplayNameFromDisplayNameGenerationAnnotation() {
@@ -107,7 +107,7 @@ void shouldGetDisplayNameFromDefaultDisplayNameGenerator() {
@Nested
class NestedClassDisplayNameTests {
- private JupiterConfiguration configuration = mock(JupiterConfiguration.class);
+ private JupiterConfiguration configuration = mock();
@Test
void shouldGetDisplayNameFromDisplayNameGenerationAnnotation() {
@@ -131,7 +131,7 @@ void shouldGetDisplayNameFromDefaultDisplayNameGenerator() {
@Nested
class MethodDisplayNameTests {
- private JupiterConfiguration configuration = mock(JupiterConfiguration.class);
+ private JupiterConfiguration configuration = mock();
@Test
void shouldGetDisplayNameFromDisplayNameGenerationAnnotation() throws Exception {
diff --git a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/descriptor/ExtensionContextTests.java b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/descriptor/ExtensionContextTests.java
index 61703eb251b9..af140f29f877 100644
--- a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/descriptor/ExtensionContextTests.java
+++ b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/descriptor/ExtensionContextTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
@@ -59,7 +59,7 @@
*/
public class ExtensionContextTests {
- private final JupiterConfiguration configuration = mock(JupiterConfiguration.class);
+ private final JupiterConfiguration configuration = mock();
@BeforeEach
void setUp() {
diff --git a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/descriptor/JupiterTestDescriptorTests.java b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/descriptor/JupiterTestDescriptorTests.java
index 0c540d8f7e72..ecd65438b861 100644
--- a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/descriptor/JupiterTestDescriptorTests.java
+++ b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/descriptor/JupiterTestDescriptorTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
@@ -53,7 +53,7 @@ class JupiterTestDescriptorTests {
private static final UniqueId uniqueId = UniqueId.root("enigma", "foo");
- private final JupiterConfiguration configuration = mock(JupiterConfiguration.class);
+ private final JupiterConfiguration configuration = mock();
@BeforeEach
void setUp() {
diff --git a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/descriptor/LifecycleMethodUtilsTests.java b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/descriptor/LifecycleMethodUtilsTests.java
index ccf78cd02f47..a77ec6abb918 100644
--- a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/descriptor/LifecycleMethodUtilsTests.java
+++ b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/descriptor/LifecycleMethodUtilsTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/descriptor/TestFactoryTestDescriptorTests.java b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/descriptor/TestFactoryTestDescriptorTests.java
index a88700f06044..7718e771ae2f 100644
--- a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/descriptor/TestFactoryTestDescriptorTests.java
+++ b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/descriptor/TestFactoryTestDescriptorTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
@@ -30,7 +30,6 @@
import org.junit.jupiter.api.extension.ExtensionContext;
import org.junit.jupiter.engine.config.JupiterConfiguration;
import org.junit.jupiter.engine.execution.JupiterEngineExecutionContext;
-import org.junit.jupiter.engine.extension.MutableExtensionRegistry;
import org.junit.platform.engine.TestSource;
import org.junit.platform.engine.UniqueId;
import org.junit.platform.engine.support.descriptor.ClasspathResourceSource;
@@ -39,7 +38,6 @@
import org.junit.platform.engine.support.descriptor.FileSource;
import org.junit.platform.engine.support.descriptor.MethodSource;
import org.junit.platform.engine.support.descriptor.UriSource;
-import org.junit.platform.engine.support.hierarchical.Node;
import org.junit.platform.engine.support.hierarchical.OpenTest4JAwareThrowableCollector;
/**
@@ -134,17 +132,17 @@ class Streams {
@BeforeEach
void before() throws Exception {
- jupiterConfiguration = mock(JupiterConfiguration.class);
+ jupiterConfiguration = mock();
when(jupiterConfiguration.getDefaultDisplayNameGenerator()).thenReturn(new DisplayNameGenerator.Standard());
- extensionContext = mock(ExtensionContext.class);
+ extensionContext = mock();
isClosed = false;
context = new JupiterEngineExecutionContext(null, null) //
.extend() //
.withThrowableCollector(new OpenTest4JAwareThrowableCollector()) //
.withExtensionContext(extensionContext) //
- .withExtensionRegistry(mock(MutableExtensionRegistry.class)) //
+ .withExtensionRegistry(mock()) //
.build();
Method testMethod = CustomStreamTestCase.class.getDeclaredMethod("customStream");
@@ -158,7 +156,7 @@ void streamsFromTestFactoriesShouldBeClosed() {
Stream dynamicTestStream = Stream.empty();
prepareMockForTestInstanceWithCustomStream(dynamicTestStream);
- descriptor.invokeTestMethod(context, mock(Node.DynamicTestExecutor.class));
+ descriptor.invokeTestMethod(context, mock());
assertTrue(isClosed);
}
@@ -168,7 +166,7 @@ void streamsFromTestFactoriesShouldBeClosedWhenTheyThrow() {
Stream integerStream = Stream.of(1, 2);
prepareMockForTestInstanceWithCustomStream(integerStream);
- descriptor.invokeTestMethod(context, mock(Node.DynamicTestExecutor.class));
+ descriptor.invokeTestMethod(context, mock());
assertTrue(isClosed);
}
diff --git a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/descriptor/TestInstanceLifecycleUtilsTests.java b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/descriptor/TestInstanceLifecycleUtilsTests.java
index d22845ecc42d..46fab2deece5 100644
--- a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/descriptor/TestInstanceLifecycleUtilsTests.java
+++ b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/descriptor/TestInstanceLifecycleUtilsTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
@@ -50,7 +50,7 @@ class TestInstanceLifecycleUtilsTests {
@Test
void getTestInstanceLifecyclePreconditions() {
PreconditionViolationException exception = assertThrows(PreconditionViolationException.class,
- () -> getTestInstanceLifecycle(null, new DefaultJupiterConfiguration(mock(ConfigurationParameters.class))));
+ () -> getTestInstanceLifecycle(null, new DefaultJupiterConfiguration(mock())));
assertThat(exception).hasMessage("testClass must not be null");
exception = assertThrows(PreconditionViolationException.class,
@@ -60,14 +60,13 @@ void getTestInstanceLifecyclePreconditions() {
@Test
void getTestInstanceLifecycleWithNoConfigParamSet() {
- Lifecycle lifecycle = getTestInstanceLifecycle(getClass(),
- new DefaultJupiterConfiguration(mock(ConfigurationParameters.class)));
+ Lifecycle lifecycle = getTestInstanceLifecycle(getClass(), new DefaultJupiterConfiguration(mock()));
assertThat(lifecycle).isEqualTo(PER_METHOD);
}
@Test
void getTestInstanceLifecycleWithConfigParamSet() {
- ConfigurationParameters configParams = mock(ConfigurationParameters.class);
+ ConfigurationParameters configParams = mock();
when(configParams.get(KEY)).thenReturn(Optional.of(PER_CLASS.name().toLowerCase()));
Lifecycle lifecycle = getTestInstanceLifecycle(getClass(), new DefaultJupiterConfiguration(configParams));
assertThat(lifecycle).isEqualTo(PER_CLASS);
@@ -75,7 +74,7 @@ void getTestInstanceLifecycleWithConfigParamSet() {
@Test
void getTestInstanceLifecycleWithLocalConfigThatOverridesCustomDefaultSetViaConfigParam() {
- ConfigurationParameters configParams = mock(ConfigurationParameters.class);
+ ConfigurationParameters configParams = mock();
when(configParams.get(KEY)).thenReturn(Optional.of(PER_CLASS.name().toLowerCase()));
Lifecycle lifecycle = getTestInstanceLifecycle(TestCase.class, new DefaultJupiterConfiguration(configParams));
assertThat(lifecycle).isEqualTo(PER_METHOD);
@@ -84,16 +83,14 @@ void getTestInstanceLifecycleWithLocalConfigThatOverridesCustomDefaultSetViaConf
@Test
void getTestInstanceLifecycleFromMetaAnnotationWithNoConfigParamSet() {
Class> testClass = BaseMetaAnnotatedTestCase.class;
- Lifecycle lifecycle = getTestInstanceLifecycle(testClass,
- new DefaultJupiterConfiguration(mock(ConfigurationParameters.class)));
+ Lifecycle lifecycle = getTestInstanceLifecycle(testClass, new DefaultJupiterConfiguration(mock()));
assertThat(lifecycle).isEqualTo(PER_CLASS);
}
@Test
void getTestInstanceLifecycleFromSpecializedClassWithNoConfigParamSet() {
Class> testClass = SpecializedTestCase.class;
- Lifecycle lifecycle = getTestInstanceLifecycle(testClass,
- new DefaultJupiterConfiguration(mock(ConfigurationParameters.class)));
+ Lifecycle lifecycle = getTestInstanceLifecycle(testClass, new DefaultJupiterConfiguration(mock()));
assertThat(lifecycle).isEqualTo(PER_CLASS);
}
diff --git a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/descriptor/TestTemplateInvocationTestDescriptorTests.java b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/descriptor/TestTemplateInvocationTestDescriptorTests.java
index 67182614032a..b00060eb8e0b 100644
--- a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/descriptor/TestTemplateInvocationTestDescriptorTests.java
+++ b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/descriptor/TestTemplateInvocationTestDescriptorTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
@@ -31,11 +31,11 @@ class TestTemplateInvocationTestDescriptorTests {
void invocationsDoNotDeclareExclusiveResources() throws Exception {
Class testClass = MyTestCase.class;
Method testTemplateMethod = testClass.getDeclaredMethod("testTemplate");
- JupiterConfiguration configuration = mock(JupiterConfiguration.class);
+ JupiterConfiguration configuration = mock();
when(configuration.getDefaultDisplayNameGenerator()).thenReturn(new DisplayNameGenerator.Standard());
TestTemplateTestDescriptor parent = new TestTemplateTestDescriptor(UniqueId.root("segment", "template"),
testClass, testTemplateMethod, configuration);
- TestTemplateInvocationContext invocationContext = mock(TestTemplateInvocationContext.class);
+ TestTemplateInvocationContext invocationContext = mock();
when(invocationContext.getDisplayName(anyInt())).thenReturn("invocation");
TestTemplateInvocationTestDescriptor testDescriptor = new TestTemplateInvocationTestDescriptor(
diff --git a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/descriptor/TestTemplateTestDescriptorTests.java b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/descriptor/TestTemplateTestDescriptorTests.java
index a370c4c2e961..f9649ddac33f 100644
--- a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/descriptor/TestTemplateTestDescriptorTests.java
+++ b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/descriptor/TestTemplateTestDescriptorTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
@@ -32,7 +32,7 @@
* @since 5.0
*/
class TestTemplateTestDescriptorTests {
- private JupiterConfiguration jupiterConfiguration = mock(JupiterConfiguration.class);
+ private JupiterConfiguration jupiterConfiguration = mock();
@Test
void inheritsTagsFromParent() throws Exception {
diff --git a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/descriptor/subpackage/Class1WithTestCases.java b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/descriptor/subpackage/Class1WithTestCases.java
index d5043609a6b5..25091d05bd80 100644
--- a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/descriptor/subpackage/Class1WithTestCases.java
+++ b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/descriptor/subpackage/Class1WithTestCases.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/descriptor/subpackage/Class2WithTestCases.java b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/descriptor/subpackage/Class2WithTestCases.java
index 0be3cb79fb67..2732b2742e53 100644
--- a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/descriptor/subpackage/Class2WithTestCases.java
+++ b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/descriptor/subpackage/Class2WithTestCases.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/descriptor/subpackage/ClassWithStaticInnerTestCases.java b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/descriptor/subpackage/ClassWithStaticInnerTestCases.java
index 58f9e7321676..139f38e6f287 100644
--- a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/descriptor/subpackage/ClassWithStaticInnerTestCases.java
+++ b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/descriptor/subpackage/ClassWithStaticInnerTestCases.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/descriptor/subpackage/ClassWithoutTestCases.java b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/descriptor/subpackage/ClassWithoutTestCases.java
index 0e0b253030cf..bb0d49fecd0c 100644
--- a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/descriptor/subpackage/ClassWithoutTestCases.java
+++ b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/descriptor/subpackage/ClassWithoutTestCases.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/discovery/DiscoverySelectorResolverTests.java b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/discovery/DiscoverySelectorResolverTests.java
index 207c6c8f0ae4..a71d0665e14b 100644
--- a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/discovery/DiscoverySelectorResolverTests.java
+++ b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/discovery/DiscoverySelectorResolverTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
@@ -91,8 +91,8 @@
*/
class DiscoverySelectorResolverTests {
- private final JupiterConfiguration configuration = mock(JupiterConfiguration.class);
- private final LauncherDiscoveryListener discoveryListener = mock(LauncherDiscoveryListener.class);
+ private final JupiterConfiguration configuration = mock();
+ private final LauncherDiscoveryListener discoveryListener = mock();
private final JupiterEngineDescriptor engineDescriptor = new JupiterEngineDescriptor(engineId(), configuration);
@BeforeEach
diff --git a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/discovery/DiscoveryTests.java b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/discovery/DiscoveryTests.java
index 2ea7f18a35f5..3ab385d7eded 100644
--- a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/discovery/DiscoveryTests.java
+++ b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/discovery/DiscoveryTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/discovery/predicates/IsInnerClassTests.java b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/discovery/predicates/IsInnerClassTests.java
index 8c7c734b119f..99a4116617ea 100644
--- a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/discovery/predicates/IsInnerClassTests.java
+++ b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/discovery/predicates/IsInnerClassTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/discovery/predicates/IsNestedTestClassTests.java b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/discovery/predicates/IsNestedTestClassTests.java
index e5e7b20938e8..9ce907e8582f 100644
--- a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/discovery/predicates/IsNestedTestClassTests.java
+++ b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/discovery/predicates/IsNestedTestClassTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/discovery/predicates/IsPotentialTestContainerTests.java b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/discovery/predicates/IsPotentialTestContainerTests.java
index a513ef5eb9f1..09fee4aa77b5 100644
--- a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/discovery/predicates/IsPotentialTestContainerTests.java
+++ b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/discovery/predicates/IsPotentialTestContainerTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/discovery/predicates/IsTestClassWithTestsTests.java b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/discovery/predicates/IsTestClassWithTestsTests.java
index 4a5cb17432f2..53537e9afe61 100644
--- a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/discovery/predicates/IsTestClassWithTestsTests.java
+++ b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/discovery/predicates/IsTestClassWithTestsTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/discovery/predicates/IsTestFactoryMethodTests.java b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/discovery/predicates/IsTestFactoryMethodTests.java
index ba9706e970b7..e814cee4c496 100644
--- a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/discovery/predicates/IsTestFactoryMethodTests.java
+++ b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/discovery/predicates/IsTestFactoryMethodTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/discovery/predicates/IsTestMethodTests.java b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/discovery/predicates/IsTestMethodTests.java
index 6c41992e2707..f4d211f84fdd 100644
--- a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/discovery/predicates/IsTestMethodTests.java
+++ b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/discovery/predicates/IsTestMethodTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/discovery/predicates/IsTestTemplateMethodTests.java b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/discovery/predicates/IsTestTemplateMethodTests.java
index 6a28c9bbf0e1..a260e0d6cbc3 100644
--- a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/discovery/predicates/IsTestTemplateMethodTests.java
+++ b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/discovery/predicates/IsTestTemplateMethodTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/execution/AbstractExecutableInvokerTests.java b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/execution/AbstractExecutableInvokerTests.java
index 4841213b3a5e..786782339281 100644
--- a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/execution/AbstractExecutableInvokerTests.java
+++ b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/execution/AbstractExecutableInvokerTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
@@ -37,12 +37,12 @@ abstract class AbstractExecutableInvokerTests {
private static final String ENIGMA = "enigma";
- protected final MethodSource instance = mock(MethodSource.class);
+ protected final MethodSource instance = mock();
protected Method method;
- protected final ExtensionContext extensionContext = mock(ExtensionContext.class);
+ protected final ExtensionContext extensionContext = mock();
- private final JupiterConfiguration configuration = mock(JupiterConfiguration.class);
+ private final JupiterConfiguration configuration = mock();
protected final MutableExtensionRegistry extensionRegistry = MutableExtensionRegistry.createRegistryWithDefaultExtensions(
configuration);
diff --git a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/execution/DefaultExecutableInvokerTests.java b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/execution/DefaultExecutableInvokerTests.java
index aa1f264f741e..ab54aade988c 100644
--- a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/execution/DefaultExecutableInvokerTests.java
+++ b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/execution/DefaultExecutableInvokerTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/execution/DefaultTestInstancesTests.java b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/execution/DefaultTestInstancesTests.java
index ac439d333230..d3881a3dfcea 100644
--- a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/execution/DefaultTestInstancesTests.java
+++ b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/execution/DefaultTestInstancesTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/execution/DynamicTestIntegrationTests.java b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/execution/DynamicTestIntegrationTests.java
index 1ebdd27c2626..c03c65813145 100644
--- a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/execution/DynamicTestIntegrationTests.java
+++ b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/execution/DynamicTestIntegrationTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/execution/ExtensionContextStoreConcurrencyTests.java b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/execution/ExtensionContextStoreConcurrencyTests.java
index b3bde4a57706..f09fb6990655 100644
--- a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/execution/ExtensionContextStoreConcurrencyTests.java
+++ b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/execution/ExtensionContextStoreConcurrencyTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/execution/ExtensionContextStoreTests.java b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/execution/ExtensionContextStoreTests.java
index 0d62b1d4dfca..16f40334473d 100644
--- a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/execution/ExtensionContextStoreTests.java
+++ b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/execution/ExtensionContextStoreTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/execution/ExtensionValuesStoreTests.java b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/execution/ExtensionValuesStoreTests.java
index 97a7b215a407..04d6fc009ece 100644
--- a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/execution/ExtensionValuesStoreTests.java
+++ b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/execution/ExtensionValuesStoreTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/execution/InterceptingExecutableInvokerTests.java b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/execution/InterceptingExecutableInvokerTests.java
index a270e28d487c..544317661154 100644
--- a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/execution/InterceptingExecutableInvokerTests.java
+++ b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/execution/InterceptingExecutableInvokerTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/execution/JupiterEngineExecutionContextTests.java b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/execution/JupiterEngineExecutionContextTests.java
index 4d86c68f7f68..d6e619d886bd 100644
--- a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/execution/JupiterEngineExecutionContextTests.java
+++ b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/execution/JupiterEngineExecutionContextTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
@@ -35,9 +35,9 @@
*/
class JupiterEngineExecutionContextTests {
- private final JupiterConfiguration configuration = mock(JupiterConfiguration.class);
+ private final JupiterConfiguration configuration = mock();
- private final EngineExecutionListener engineExecutionListener = mock(EngineExecutionListener.class);
+ private final EngineExecutionListener engineExecutionListener = mock();
private final JupiterEngineExecutionContext originalContext = new JupiterEngineExecutionContext(
engineExecutionListener, configuration);
@@ -51,10 +51,10 @@ void executionListenerIsHandedOnWhenContextIsExtended() {
@Test
void extendWithAllAttributes() {
- ExtensionContext extensionContext = mock(ExtensionContext.class);
+ ExtensionContext extensionContext = mock();
MutableExtensionRegistry extensionRegistry = MutableExtensionRegistry.createRegistryWithDefaultExtensions(
configuration);
- TestInstancesProvider testInstancesProvider = mock(TestInstancesProvider.class);
+ TestInstancesProvider testInstancesProvider = mock();
JupiterEngineExecutionContext newContext = originalContext.extend() //
.withExtensionContext(extensionContext) //
.withExtensionRegistry(extensionRegistry) //
@@ -68,11 +68,11 @@ void extendWithAllAttributes() {
@Test
void canOverrideAttributeWhenContextIsExtended() {
- ExtensionContext extensionContext = mock(ExtensionContext.class);
+ ExtensionContext extensionContext = mock();
MutableExtensionRegistry extensionRegistry = MutableExtensionRegistry.createRegistryWithDefaultExtensions(
configuration);
- TestInstancesProvider testInstancesProvider = mock(TestInstancesProvider.class);
- ExtensionContext newExtensionContext = mock(ExtensionContext.class);
+ TestInstancesProvider testInstancesProvider = mock();
+ ExtensionContext newExtensionContext = mock();
JupiterEngineExecutionContext newContext = originalContext.extend() //
.withExtensionContext(extensionContext) //
diff --git a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/execution/ParameterResolutionUtilsTests.java b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/execution/ParameterResolutionUtilsTests.java
index 31dbb1657c40..1c371f6f775f 100644
--- a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/execution/ParameterResolutionUtilsTests.java
+++ b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/execution/ParameterResolutionUtilsTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
@@ -43,12 +43,12 @@ class ParameterResolutionUtilsTests {
private static final String ENIGMA = "enigma";
- private final MethodSource instance = mock(MethodSource.class);
+ private final MethodSource instance = mock();
private Method method;
- private final ExtensionContext extensionContext = mock(ExtensionContext.class);
+ private final ExtensionContext extensionContext = mock();
- private final JupiterConfiguration configuration = mock(JupiterConfiguration.class);
+ private final JupiterConfiguration configuration = mock();
private final MutableExtensionRegistry extensionRegistry = MutableExtensionRegistry.createRegistryWithDefaultExtensions(
configuration);
diff --git a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/execution/UniqueIdParsingForArrayParameterIntegrationTests.java b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/execution/UniqueIdParsingForArrayParameterIntegrationTests.java
index 3ddaecfc0b79..a5184a8484d2 100644
--- a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/execution/UniqueIdParsingForArrayParameterIntegrationTests.java
+++ b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/execution/UniqueIdParsingForArrayParameterIntegrationTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/execution/injection/sample/CustomAnnotation.java b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/execution/injection/sample/CustomAnnotation.java
index d371b025b9c6..01d89a574f3c 100644
--- a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/execution/injection/sample/CustomAnnotation.java
+++ b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/execution/injection/sample/CustomAnnotation.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/execution/injection/sample/CustomAnnotationParameterResolver.java b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/execution/injection/sample/CustomAnnotationParameterResolver.java
index 14f631cb55f0..b24aad8b792a 100644
--- a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/execution/injection/sample/CustomAnnotationParameterResolver.java
+++ b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/execution/injection/sample/CustomAnnotationParameterResolver.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/execution/injection/sample/CustomType.java b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/execution/injection/sample/CustomType.java
index cf9a1f6d50a8..e9df48a082c3 100644
--- a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/execution/injection/sample/CustomType.java
+++ b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/execution/injection/sample/CustomType.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/execution/injection/sample/CustomTypeParameterResolver.java b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/execution/injection/sample/CustomTypeParameterResolver.java
index dddcffa24033..2907826621d4 100644
--- a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/execution/injection/sample/CustomTypeParameterResolver.java
+++ b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/execution/injection/sample/CustomTypeParameterResolver.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/execution/injection/sample/DoubleParameterResolver.java b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/execution/injection/sample/DoubleParameterResolver.java
index e5f26ad0f96d..3f4ee2c5487c 100644
--- a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/execution/injection/sample/DoubleParameterResolver.java
+++ b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/execution/injection/sample/DoubleParameterResolver.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/execution/injection/sample/LongParameterResolver.java b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/execution/injection/sample/LongParameterResolver.java
index bf2857364305..9b796003a4f9 100644
--- a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/execution/injection/sample/LongParameterResolver.java
+++ b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/execution/injection/sample/LongParameterResolver.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/execution/injection/sample/MapOfListsTypeBasedParameterResolver.java b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/execution/injection/sample/MapOfListsTypeBasedParameterResolver.java
index 54b11d6bd4b6..ce4f0f6ff0bb 100644
--- a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/execution/injection/sample/MapOfListsTypeBasedParameterResolver.java
+++ b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/execution/injection/sample/MapOfListsTypeBasedParameterResolver.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/execution/injection/sample/MapOfStringsParameterResolver.java b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/execution/injection/sample/MapOfStringsParameterResolver.java
index 617e8d087dc7..d8f94f09c90e 100644
--- a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/execution/injection/sample/MapOfStringsParameterResolver.java
+++ b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/execution/injection/sample/MapOfStringsParameterResolver.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/execution/injection/sample/NullIntegerParameterResolver.java b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/execution/injection/sample/NullIntegerParameterResolver.java
index 7aa08b57deaf..c44c9dd27876 100644
--- a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/execution/injection/sample/NullIntegerParameterResolver.java
+++ b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/execution/injection/sample/NullIntegerParameterResolver.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/execution/injection/sample/NumberParameterResolver.java b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/execution/injection/sample/NumberParameterResolver.java
index 245d86e4b565..f1c826ae522a 100644
--- a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/execution/injection/sample/NumberParameterResolver.java
+++ b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/execution/injection/sample/NumberParameterResolver.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/execution/injection/sample/PrimitiveArrayParameterResolver.java b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/execution/injection/sample/PrimitiveArrayParameterResolver.java
index 161fb68b2209..2c6ce89a5c1e 100644
--- a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/execution/injection/sample/PrimitiveArrayParameterResolver.java
+++ b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/execution/injection/sample/PrimitiveArrayParameterResolver.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/execution/injection/sample/PrimitiveIntegerParameterResolver.java b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/execution/injection/sample/PrimitiveIntegerParameterResolver.java
index 4732cdcbdad1..9893412bad23 100644
--- a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/execution/injection/sample/PrimitiveIntegerParameterResolver.java
+++ b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/execution/injection/sample/PrimitiveIntegerParameterResolver.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/extension/BeforeAndAfterAllTests.java b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/extension/BeforeAndAfterAllTests.java
index 5546fd35dd3a..57a128e46f1c 100644
--- a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/extension/BeforeAndAfterAllTests.java
+++ b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/extension/BeforeAndAfterAllTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/extension/BeforeAndAfterEachTests.java b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/extension/BeforeAndAfterEachTests.java
index d40a133316e3..93f03748c33c 100644
--- a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/extension/BeforeAndAfterEachTests.java
+++ b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/extension/BeforeAndAfterEachTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/extension/BeforeAndAfterTestExecutionCallbackTests.java b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/extension/BeforeAndAfterTestExecutionCallbackTests.java
index 15619e87133c..a06ceed8158d 100644
--- a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/extension/BeforeAndAfterTestExecutionCallbackTests.java
+++ b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/extension/BeforeAndAfterTestExecutionCallbackTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/extension/CloseablePathCleanupTests.java b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/extension/CloseablePathCleanupTests.java
index 0daa108be3c0..7d9557609345 100644
--- a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/extension/CloseablePathCleanupTests.java
+++ b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/extension/CloseablePathCleanupTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
@@ -44,7 +44,7 @@
*/
class CloseablePathCleanupTests extends AbstractJupiterTestEngineTests {
- private final ExtensionContext extensionContext = mock(ExtensionContext.class);
+ private final ExtensionContext extensionContext = mock();
private TempDirectory.CloseablePath closeablePath;
diff --git a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/extension/EnigmaException.java b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/extension/EnigmaException.java
index cbd0362b2dd6..db1823b1abb2 100644
--- a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/extension/EnigmaException.java
+++ b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/extension/EnigmaException.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/extension/EventuallyInterruptibleInvocation.java b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/extension/EventuallyInterruptibleInvocation.java
index ae1d146b5723..811bde21c6b4 100644
--- a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/extension/EventuallyInterruptibleInvocation.java
+++ b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/extension/EventuallyInterruptibleInvocation.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/extension/ExecutionConditionTests.java b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/extension/ExecutionConditionTests.java
index 12c6d81fa3b7..33422f049fa9 100644
--- a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/extension/ExecutionConditionTests.java
+++ b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/extension/ExecutionConditionTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/extension/ExtensionContextExecutionTests.java b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/extension/ExtensionContextExecutionTests.java
index 6ffa4f7ff187..f87d38cbd995 100644
--- a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/extension/ExtensionContextExecutionTests.java
+++ b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/extension/ExtensionContextExecutionTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/extension/ExtensionRegistrationViaParametersAndFieldsTests.java b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/extension/ExtensionRegistrationViaParametersAndFieldsTests.java
index 836fbc085f51..5b8a208d0492 100644
--- a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/extension/ExtensionRegistrationViaParametersAndFieldsTests.java
+++ b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/extension/ExtensionRegistrationViaParametersAndFieldsTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/extension/ExtensionRegistryTests.java b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/extension/ExtensionRegistryTests.java
index 07094380bc8f..cbe91c6ea9f6 100644
--- a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/extension/ExtensionRegistryTests.java
+++ b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/extension/ExtensionRegistryTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
@@ -41,7 +41,7 @@ class ExtensionRegistryTests {
private static final int NUM_DEFAULT_EXTENSIONS = 6;
- private final JupiterConfiguration configuration = mock(JupiterConfiguration.class);
+ private final JupiterConfiguration configuration = mock();
private MutableExtensionRegistry registry = createRegistryWithDefaultExtensions(configuration);
diff --git a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/extension/InvocationInterceptorTests.java b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/extension/InvocationInterceptorTests.java
index 01e3d10ebb7b..c04636c2367c 100644
--- a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/extension/InvocationInterceptorTests.java
+++ b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/extension/InvocationInterceptorTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/extension/LifecycleMethodExecutionExceptionHandlerTests.java b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/extension/LifecycleMethodExecutionExceptionHandlerTests.java
index 323d88a212b1..4214dcfb5679 100644
--- a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/extension/LifecycleMethodExecutionExceptionHandlerTests.java
+++ b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/extension/LifecycleMethodExecutionExceptionHandlerTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/extension/OrderedClassTests.java b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/extension/OrderedClassTests.java
index 1bd1b9156113..09026c6b1362 100644
--- a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/extension/OrderedClassTests.java
+++ b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/extension/OrderedClassTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/extension/OrderedMethodTests.java b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/extension/OrderedMethodTests.java
index e6187b55aee3..ed86fd2a2448 100644
--- a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/extension/OrderedMethodTests.java
+++ b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/extension/OrderedMethodTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/extension/OrderedProgrammaticExtensionRegistrationTests.java b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/extension/OrderedProgrammaticExtensionRegistrationTests.java
index 24f83c5f9f73..6d74a431d4b7 100644
--- a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/extension/OrderedProgrammaticExtensionRegistrationTests.java
+++ b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/extension/OrderedProgrammaticExtensionRegistrationTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/extension/ParameterResolverTests.java b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/extension/ParameterResolverTests.java
index ef6ae8fcff11..9809dc3af816 100644
--- a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/extension/ParameterResolverTests.java
+++ b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/extension/ParameterResolverTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/extension/ProgrammaticExtensionRegistrationTests.java b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/extension/ProgrammaticExtensionRegistrationTests.java
index 16be2561acb3..5ae50c4cf50d 100644
--- a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/extension/ProgrammaticExtensionRegistrationTests.java
+++ b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/extension/ProgrammaticExtensionRegistrationTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/extension/RandomlyOrderedTests.java b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/extension/RandomlyOrderedTests.java
index b6997ca15455..dc2d5329c469 100644
--- a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/extension/RandomlyOrderedTests.java
+++ b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/extension/RandomlyOrderedTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/extension/RepeatedTestTests.java b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/extension/RepeatedTestTests.java
index af28805f4673..44514c06374a 100644
--- a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/extension/RepeatedTestTests.java
+++ b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/extension/RepeatedTestTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/extension/SameThreadTimeoutInvocationTests.java b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/extension/SameThreadTimeoutInvocationTests.java
index f4af4da6c0ad..81630493d66e 100644
--- a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/extension/SameThreadTimeoutInvocationTests.java
+++ b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/extension/SameThreadTimeoutInvocationTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/extension/SeparateThreadTimeoutInvocationTest.java b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/extension/SeparateThreadTimeoutInvocationTest.java
index a5355fa63682..8ea41562ddf6 100644
--- a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/extension/SeparateThreadTimeoutInvocationTest.java
+++ b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/extension/SeparateThreadTimeoutInvocationTest.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/extension/ServiceLoaderExtension.java b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/extension/ServiceLoaderExtension.java
index 5785cdcba363..abaf97bd92d3 100644
--- a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/extension/ServiceLoaderExtension.java
+++ b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/extension/ServiceLoaderExtension.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/extension/TempDirectoryCleanupTests.java b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/extension/TempDirectoryCleanupTests.java
index 9a4b8fb1fd01..ddaaa214f786 100644
--- a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/extension/TempDirectoryCleanupTests.java
+++ b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/extension/TempDirectoryCleanupTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/extension/TempDirectoryPerContextTests.java b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/extension/TempDirectoryPerContextTests.java
index d03ee596aff2..60c9f383bda9 100644
--- a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/extension/TempDirectoryPerContextTests.java
+++ b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/extension/TempDirectoryPerContextTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
@@ -98,21 +98,21 @@ void tempDirectoryDoesNotPreventUserFromDeletingTempDir() {
}
@Test
- @DisplayName("is capable of removal of a read-only file")
+ @DisplayName("is capable of removing a read-only file")
void nonWritableFileDoesNotCauseFailure() {
executeTestsForClass(NonWritableFileDoesNotCauseFailureTestCase.class).testEvents()//
.assertStatistics(stats -> stats.started(1).succeeded(1));
}
@Test
- @DisplayName("is capable of removal of non-executable, non-writable, or non-readable directories and folders")
+ @DisplayName("is capable of removing non-executable, non-writable, or non-readable directories and folders")
void nonMintPermissionsContentDoesNotCauseFailure() {
executeTestsForClass(NonMintPermissionContentInTempDirectoryDoesNotCauseFailureTestCase.class).testEvents()//
.assertStatistics(stats -> stats.started(13).succeeded(13));
}
@Test
- @DisplayName("is capable of removal when its permissions were been changed")
+ @DisplayName("is capable of removing a directory when its permissions have been changed")
void nonMintPermissionsDoNotCauseFailure() {
executeTestsForClass(NonMintTempDirectoryPermissionsDoNotCauseFailureTestCase.class).testEvents()//
.assertStatistics(stats -> stats.started(42).succeeded(42));
@@ -120,7 +120,7 @@ void nonMintPermissionsDoNotCauseFailure() {
@Test
@DisabledOnOs(OS.WINDOWS)
- @DisplayName("is capable of removal of a read-only file in a read-only dir")
+ @DisplayName("is capable of removing a read-only file in a read-only dir")
void readOnlyFileInReadOnlyDirDoesNotCauseFailure() {
executeTestsForClass(ReadOnlyFileInReadOnlyDirDoesNotCauseFailureTestCase.class).testEvents()//
.assertStatistics(stats -> stats.started(1).succeeded(1));
@@ -128,7 +128,7 @@ void readOnlyFileInReadOnlyDirDoesNotCauseFailure() {
@Test
@DisabledOnOs(OS.WINDOWS)
- @DisplayName("is capable of removal of a read-only file in a dir in a read-only dir")
+ @DisplayName("is capable of removing a read-only file in a dir in a read-only dir")
void readOnlyFileInNestedReadOnlyDirDoesNotCauseFailure() {
executeTestsForClass(ReadOnlyFileInDirInReadOnlyDirDoesNotCauseFailureTestCase.class).testEvents()//
.assertStatistics(stats -> stats.started(1).succeeded(1));
@@ -784,7 +784,6 @@ static class FileInjectionTestCase {
Path pathTempDir;
@Test
- @DisplayName("and injected File and Path reference the same temp directory")
void checkFile(@TempDir File tempDir, @TempDir Path ref) {
assertFileAndPathAreEqual(tempDir, ref);
assertFileAndPathAreEqual(this.fileTempDir, this.pathTempDir);
diff --git a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/extension/TempDirectoryPerDeclarationTests.java b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/extension/TempDirectoryPerDeclarationTests.java
index fdcdb166f0e1..c98e99e0514d 100644
--- a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/extension/TempDirectoryPerDeclarationTests.java
+++ b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/extension/TempDirectoryPerDeclarationTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
@@ -11,6 +11,7 @@
package org.junit.jupiter.engine.extension;
import static org.assertj.core.api.Assertions.assertThat;
+import static org.junit.jupiter.api.Assertions.assertNotEquals;
import static org.junit.jupiter.api.Assertions.assertNotNull;
import static org.junit.jupiter.api.Assertions.assertSame;
import static org.junit.jupiter.api.Assertions.assertTrue;
@@ -28,6 +29,7 @@
import java.io.File;
import java.io.IOException;
+import java.nio.file.DirectoryNotEmptyException;
import java.nio.file.Files;
import java.nio.file.Path;
import java.util.Arrays;
@@ -51,10 +53,10 @@
import org.junit.jupiter.api.TestInfo;
import org.junit.jupiter.api.TestInstance;
import org.junit.jupiter.api.TestMethodOrder;
+import org.junit.jupiter.api.TestReporter;
import org.junit.jupiter.api.condition.DisabledOnOs;
import org.junit.jupiter.api.condition.OS;
import org.junit.jupiter.api.extension.BeforeEachCallback;
-import org.junit.jupiter.api.extension.Extension;
import org.junit.jupiter.api.extension.ExtensionConfigurationException;
import org.junit.jupiter.api.extension.ParameterResolutionException;
import org.junit.jupiter.api.extension.RegisterExtension;
@@ -62,6 +64,7 @@
import org.junit.jupiter.engine.AbstractJupiterTestEngineTests;
import org.junit.jupiter.engine.Constants;
import org.junit.jupiter.engine.extension.TempDirectory.FileOperations;
+import org.junit.platform.engine.reporting.ReportEntry;
import org.junit.platform.testkit.engine.EngineExecutionResults;
/**
@@ -141,21 +144,21 @@ void tempDirectoryDoesNotPreventUserFromDeletingTempDir() {
}
@Test
- @DisplayName("is capable of removal of a read-only file")
+ @DisplayName("is capable of removing a read-only file")
void nonWritableFileDoesNotCauseFailure() {
executeTestsForClass(NonWritableFileDoesNotCauseFailureTestCase.class).testEvents()//
.assertStatistics(stats -> stats.started(1).succeeded(1));
}
@Test
- @DisplayName("is capable of removal of non-executable, non-writable, or non-readable directories and folders")
+ @DisplayName("is capable of removing non-executable, non-writable, or non-readable directories and folders")
void nonMintPermissionsContentDoesNotCauseFailure() {
executeTestsForClass(NonMintPermissionContentInTempDirectoryDoesNotCauseFailureTestCase.class).testEvents()//
.assertStatistics(stats -> stats.started(13).succeeded(13));
}
@Test
- @DisplayName("is capable of removal when its permissions were been changed")
+ @DisplayName("is capable of removing a directory when its permissions have been changed")
void nonMintPermissionsDoNotCauseFailure() {
executeTestsForClass(NonMintTempDirectoryPermissionsDoNotCauseFailureTestCase.class).testEvents()//
.assertStatistics(stats -> stats.started(42).succeeded(42));
@@ -163,7 +166,7 @@ void nonMintPermissionsDoNotCauseFailure() {
@Test
@DisabledOnOs(OS.WINDOWS)
- @DisplayName("is capable of removal of a read-only file in a read-only dir")
+ @DisplayName("is capable of removing a read-only file in a read-only dir")
void readOnlyFileInReadOnlyDirDoesNotCauseFailure() {
executeTestsForClass(ReadOnlyFileInReadOnlyDirDoesNotCauseFailureTestCase.class).testEvents()//
.assertStatistics(stats -> stats.started(1).succeeded(1));
@@ -171,7 +174,7 @@ void readOnlyFileInReadOnlyDirDoesNotCauseFailure() {
@Test
@DisabledOnOs(OS.WINDOWS)
- @DisplayName("is capable of removal of a read-only file in a dir in a read-only dir")
+ @DisplayName("is capable of removing a read-only file in a dir in a read-only dir")
void readOnlyFileInNestedReadOnlyDirDoesNotCauseFailure() {
executeTestsForClass(ReadOnlyFileInDirInReadOnlyDirDoesNotCauseFailureTestCase.class).testEvents()//
.assertStatistics(stats -> stats.started(1).succeeded(1));
@@ -191,14 +194,27 @@ void canBeUsedViaStaticFieldInsideNestedTestClasses() {
.assertStatistics(stats -> stats.started(2).succeeded(2));
}
- @Test
- void onlyAttemptsToDeleteUndeletableDirectoriesOnce() {
- var results = executeTestsForClass(UndeletableDirectoryTestCase.class);
+ @TestFactory
+ @DisplayName("only attempts to delete undeletable paths once")
+ Stream onlyAttemptsToDeleteUndeletablePathsOnce() {
+ return Stream.of( //
+ dynamicTest("directory", () -> onlyAttemptsToDeleteUndeletablePathOnce(UndeletableDirectoryTestCase.class)), //
+ dynamicTest("file", () -> onlyAttemptsToDeleteUndeletablePathOnce(UndeletableFileTestCase.class)) //
+ );
+ }
+
+ private void onlyAttemptsToDeleteUndeletablePathOnce(Class extends UndeletableTestCase> testClass) {
+ var results = executeTestsForClass(testClass);
+
+ var tempDir = results.testEvents().reportingEntryPublished().stream().map(
+ it -> it.getPayload(ReportEntry.class).orElseThrow()).map(
+ it -> Path.of(it.getKeyValuePairs().get(UndeletableTestCase.TEMP_DIR))).findAny().orElseThrow();
assertSingleFailedTest(results, //
instanceOf(IOException.class), //
- message(it -> it.startsWith("Failed to delete temp directory")), //
- suppressed(0, instanceOf(IOException.class), message("Simulated failure")), //
+ message("Failed to delete temp directory " + tempDir.toAbsolutePath() + ". " + //
+ "The following paths could not be deleted (see suppressed exceptions for details): , undeletable"), //
+ suppressed(0, instanceOf(DirectoryNotEmptyException.class)), //
suppressed(1, instanceOf(IOException.class), message("Simulated failure")));
}
@@ -410,12 +426,16 @@ class FileAndPathInjection {
Path pathTempDir;
@Test
- @DisplayName("and injected File and Path reference the same temp directory")
+ @DisplayName("and injected File and Path do not reference the same temp directory")
void checkFile(@TempDir File tempDir, @TempDir Path ref) {
- assertNotNull(tempDir);
- assertNotNull(ref);
- assertNotNull(this.fileTempDir);
- assertNotNull(this.pathTempDir);
+ assertFileAndPathAreNotEqual(tempDir, ref);
+ assertFileAndPathAreNotEqual(this.fileTempDir, this.pathTempDir);
+ }
+
+ private static void assertFileAndPathAreNotEqual(File tempDir, Path ref) {
+ Path path = tempDir.toPath();
+ assertNotEquals(ref.toAbsolutePath(), path.toAbsolutePath());
+ assertTrue(Files.exists(path));
}
}
@@ -1006,18 +1026,43 @@ private static Map getTempDirs(TestInfo testInfo) {
}
}
- static class UndeletableDirectoryTestCase {
+ static class UndeletableTestCase {
+
+ static final Path UNDELETABLE_PATH = Path.of("undeletable");
+ static final String TEMP_DIR = "TEMP_DIR";
@RegisterExtension
- Extension injector = (BeforeEachCallback) context -> context //
+ BeforeEachCallback injector = context -> context //
.getStore(TempDirectory.NAMESPACE) //
.put(TempDirectory.FILE_OPERATIONS_KEY, (FileOperations) path -> {
- throw new IOException("Simulated failure");
+ if (path.endsWith(UNDELETABLE_PATH)) {
+ throw new IOException("Simulated failure");
+ }
+ else {
+ Files.delete(path);
+ }
});
+ @TempDir
+ Path tempDir;
+
+ @BeforeEach
+ void reportTempDir(TestReporter reporter) {
+ reporter.publishEntry(TEMP_DIR, tempDir.toString());
+ }
+ }
+
+ static class UndeletableDirectoryTestCase extends UndeletableTestCase {
@Test
- void test(@TempDir Path tempDir) throws Exception {
- Files.createDirectory(tempDir.resolve("test-sub-dir"));
+ void test() throws Exception {
+ Files.createDirectory(tempDir.resolve(UNDELETABLE_PATH));
+ }
+ }
+
+ static class UndeletableFileTestCase extends UndeletableTestCase {
+ @Test
+ void test() throws Exception {
+ Files.createFile(tempDir.resolve(UNDELETABLE_PATH));
}
}
}
diff --git a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/extension/TempDirectoryPreconditionTests.java b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/extension/TempDirectoryPreconditionTests.java
index 56539b997b8e..4a5b020e0fde 100644
--- a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/extension/TempDirectoryPreconditionTests.java
+++ b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/extension/TempDirectoryPreconditionTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/extension/TestExecutionExceptionHandlerTests.java b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/extension/TestExecutionExceptionHandlerTests.java
index 366d2a4f4ea0..1c4409c03dd3 100644
--- a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/extension/TestExecutionExceptionHandlerTests.java
+++ b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/extension/TestExecutionExceptionHandlerTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/extension/TestInfoParameterResolverTests.java b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/extension/TestInfoParameterResolverTests.java
index 070ec9c06051..ba4610797714 100644
--- a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/extension/TestInfoParameterResolverTests.java
+++ b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/extension/TestInfoParameterResolverTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/extension/TestInstanceFactoryTests.java b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/extension/TestInstanceFactoryTests.java
index ddd25f01c166..b773e9eefbf6 100644
--- a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/extension/TestInstanceFactoryTests.java
+++ b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/extension/TestInstanceFactoryTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/extension/TestInstancePostProcessorAndPreDestroyCallbackTests.java b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/extension/TestInstancePostProcessorAndPreDestroyCallbackTests.java
index 256a41257a9b..2b684fa941b3 100644
--- a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/extension/TestInstancePostProcessorAndPreDestroyCallbackTests.java
+++ b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/extension/TestInstancePostProcessorAndPreDestroyCallbackTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/extension/TestInstancePostProcessorTests.java b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/extension/TestInstancePostProcessorTests.java
index 26142267cf45..225e89de951b 100644
--- a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/extension/TestInstancePostProcessorTests.java
+++ b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/extension/TestInstancePostProcessorTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/extension/TestInstancePreConstructCallbackTests.java b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/extension/TestInstancePreConstructCallbackTests.java
index d6975a2c096b..100cb30fddb2 100644
--- a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/extension/TestInstancePreConstructCallbackTests.java
+++ b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/extension/TestInstancePreConstructCallbackTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/extension/TestInstancePreDestroyCallbackTests.java b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/extension/TestInstancePreDestroyCallbackTests.java
index 7dda92365286..a20d3460b5af 100644
--- a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/extension/TestInstancePreDestroyCallbackTests.java
+++ b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/extension/TestInstancePreDestroyCallbackTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/extension/TestInstancePreDestroyCallbackUtilityMethodTests.java b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/extension/TestInstancePreDestroyCallbackUtilityMethodTests.java
index 54a3ed110dcd..4ffff6264b37 100644
--- a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/extension/TestInstancePreDestroyCallbackUtilityMethodTests.java
+++ b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/extension/TestInstancePreDestroyCallbackUtilityMethodTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/extension/TestReporterParameterResolverTests.java b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/extension/TestReporterParameterResolverTests.java
index 394ab6b09006..6acbcafa6126 100644
--- a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/extension/TestReporterParameterResolverTests.java
+++ b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/extension/TestReporterParameterResolverTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
@@ -13,6 +13,7 @@
import static org.junit.jupiter.api.Assertions.assertFalse;
import static org.junit.jupiter.api.Assertions.assertNotNull;
import static org.junit.jupiter.api.Assertions.assertTrue;
+import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;
import java.lang.reflect.Method;
@@ -20,10 +21,8 @@
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.TestReporter;
-import org.junit.jupiter.api.extension.ExtensionContext;
import org.junit.jupiter.api.extension.ParameterContext;
import org.junit.platform.commons.util.ReflectionUtils;
-import org.mockito.Mockito;
/**
* @since 5.0
@@ -45,8 +44,7 @@ void supports() {
void resolve() {
Parameter parameter = findParameterOfMethod("methodWithTestReporterParameter", TestReporter.class);
- TestReporter testReporter = this.resolver.resolveParameter(parameterContext(parameter),
- Mockito.mock(ExtensionContext.class));
+ TestReporter testReporter = this.resolver.resolveParameter(parameterContext(parameter), mock());
assertNotNull(testReporter);
}
@@ -56,7 +54,7 @@ private Parameter findParameterOfMethod(String methodName, Class>... parameter
}
private static ParameterContext parameterContext(Parameter parameter) {
- ParameterContext parameterContext = Mockito.mock(ParameterContext.class);
+ ParameterContext parameterContext = mock();
when(parameterContext.getParameter()).thenReturn(parameter);
return parameterContext;
}
diff --git a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/extension/TestWatcherTests.java b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/extension/TestWatcherTests.java
index 315f70642145..4c446f6fa094 100644
--- a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/extension/TestWatcherTests.java
+++ b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/extension/TestWatcherTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/extension/TimeoutConfigurationTests.java b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/extension/TimeoutConfigurationTests.java
index 5df3617b92f0..d37d922fb9ad 100644
--- a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/extension/TimeoutConfigurationTests.java
+++ b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/extension/TimeoutConfigurationTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
@@ -47,7 +47,7 @@
*/
class TimeoutConfigurationTests {
- ExtensionContext extensionContext = mock(ExtensionContext.class);
+ ExtensionContext extensionContext = mock();
TimeoutConfiguration config = new TimeoutConfiguration(extensionContext);
@Test
diff --git a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/extension/TimeoutDurationParserTests.java b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/extension/TimeoutDurationParserTests.java
index b3195c7bad3b..7eee8ae416a0 100644
--- a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/extension/TimeoutDurationParserTests.java
+++ b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/extension/TimeoutDurationParserTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/extension/TimeoutDurationTests.java b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/extension/TimeoutDurationTests.java
index 1fc87607fc68..494ea9dfa6ee 100644
--- a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/extension/TimeoutDurationTests.java
+++ b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/extension/TimeoutDurationTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/extension/TimeoutExceptionFactoryTest.java b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/extension/TimeoutExceptionFactoryTest.java
index 75de6f895309..95aa77c42c42 100644
--- a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/extension/TimeoutExceptionFactoryTest.java
+++ b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/extension/TimeoutExceptionFactoryTest.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/extension/TimeoutExtensionTests.java b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/extension/TimeoutExtensionTests.java
index 012074155dbe..6fc772440c22 100644
--- a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/extension/TimeoutExtensionTests.java
+++ b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/extension/TimeoutExtensionTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/extension/TimeoutInvocationFactoryTest.java b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/extension/TimeoutInvocationFactoryTest.java
index 6fc152a368d9..31dda7730477 100644
--- a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/extension/TimeoutInvocationFactoryTest.java
+++ b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/extension/TimeoutInvocationFactoryTest.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/extension/sub/AlwaysDisabledCondition.java b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/extension/sub/AlwaysDisabledCondition.java
index 0b820dfb60dc..9e9533e45223 100644
--- a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/extension/sub/AlwaysDisabledCondition.java
+++ b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/extension/sub/AlwaysDisabledCondition.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/extension/sub/AnotherAlwaysDisabledCondition.java b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/extension/sub/AnotherAlwaysDisabledCondition.java
index cce8fa3f6d61..d8846b32aa58 100644
--- a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/extension/sub/AnotherAlwaysDisabledCondition.java
+++ b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/extension/sub/AnotherAlwaysDisabledCondition.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/extension/sub/SystemPropertyCondition.java b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/extension/sub/SystemPropertyCondition.java
index 79d126531464..f2f2cab45200 100644
--- a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/extension/sub/SystemPropertyCondition.java
+++ b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/extension/sub/SystemPropertyCondition.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/subpackage/SuperClassWithPackagePrivateLifecycleMethodInDifferentPackageTestCase.java b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/subpackage/SuperClassWithPackagePrivateLifecycleMethodInDifferentPackageTestCase.java
index 90c8ecc39ccf..c2d184262083 100644
--- a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/subpackage/SuperClassWithPackagePrivateLifecycleMethodInDifferentPackageTestCase.java
+++ b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/subpackage/SuperClassWithPackagePrivateLifecycleMethodInDifferentPackageTestCase.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/support/OpenTest4JAndJUnit4AwareThrowableCollectorTests.java b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/support/OpenTest4JAndJUnit4AwareThrowableCollectorTests.java
index fa8ea0a99b7d..a3b492b8e254 100644
--- a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/support/OpenTest4JAndJUnit4AwareThrowableCollectorTests.java
+++ b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/support/OpenTest4JAndJUnit4AwareThrowableCollectorTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/test/kotlin/org/junit/jupiter/api/KotlinAssertTimeoutAssertionsTests.kt b/junit-jupiter-engine/src/test/kotlin/org/junit/jupiter/api/KotlinAssertTimeoutAssertionsTests.kt
index 94d1cfc111f6..9170c22c9e7d 100644
--- a/junit-jupiter-engine/src/test/kotlin/org/junit/jupiter/api/KotlinAssertTimeoutAssertionsTests.kt
+++ b/junit-jupiter-engine/src/test/kotlin/org/junit/jupiter/api/KotlinAssertTimeoutAssertionsTests.kt
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/test/kotlin/org/junit/jupiter/api/KotlinAssertionsTests.kt b/junit-jupiter-engine/src/test/kotlin/org/junit/jupiter/api/KotlinAssertionsTests.kt
index 7e44ea799b3f..d283aad8eeaf 100644
--- a/junit-jupiter-engine/src/test/kotlin/org/junit/jupiter/api/KotlinAssertionsTests.kt
+++ b/junit-jupiter-engine/src/test/kotlin/org/junit/jupiter/api/KotlinAssertionsTests.kt
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/test/kotlin/org/junit/jupiter/api/KotlinFailAssertionsTests.kt b/junit-jupiter-engine/src/test/kotlin/org/junit/jupiter/api/KotlinFailAssertionsTests.kt
index 2234f5dce3fd..00023d0a5723 100644
--- a/junit-jupiter-engine/src/test/kotlin/org/junit/jupiter/api/KotlinFailAssertionsTests.kt
+++ b/junit-jupiter-engine/src/test/kotlin/org/junit/jupiter/api/KotlinFailAssertionsTests.kt
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/test/kotlin/org/junit/jupiter/engine/kotlin/ArbitraryNamingKotlinTestCase.kt b/junit-jupiter-engine/src/test/kotlin/org/junit/jupiter/engine/kotlin/ArbitraryNamingKotlinTestCase.kt
index 79489fb84221..1b919a9f2ae0 100644
--- a/junit-jupiter-engine/src/test/kotlin/org/junit/jupiter/engine/kotlin/ArbitraryNamingKotlinTestCase.kt
+++ b/junit-jupiter-engine/src/test/kotlin/org/junit/jupiter/engine/kotlin/ArbitraryNamingKotlinTestCase.kt
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/test/kotlin/org/junit/jupiter/engine/kotlin/InstancePerClassKotlinTestCase.kt b/junit-jupiter-engine/src/test/kotlin/org/junit/jupiter/engine/kotlin/InstancePerClassKotlinTestCase.kt
index a6aa021e858a..f5c4e5b88dbd 100644
--- a/junit-jupiter-engine/src/test/kotlin/org/junit/jupiter/engine/kotlin/InstancePerClassKotlinTestCase.kt
+++ b/junit-jupiter-engine/src/test/kotlin/org/junit/jupiter/engine/kotlin/InstancePerClassKotlinTestCase.kt
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/test/kotlin/org/junit/jupiter/engine/kotlin/InstancePerMethodKotlinTestCase.kt b/junit-jupiter-engine/src/test/kotlin/org/junit/jupiter/engine/kotlin/InstancePerMethodKotlinTestCase.kt
index 67a14a37e923..b5845f9ae0fb 100644
--- a/junit-jupiter-engine/src/test/kotlin/org/junit/jupiter/engine/kotlin/InstancePerMethodKotlinTestCase.kt
+++ b/junit-jupiter-engine/src/test/kotlin/org/junit/jupiter/engine/kotlin/InstancePerMethodKotlinTestCase.kt
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-engine/src/testFixtures/java/org/junit/jupiter/engine/discovery/JupiterUniqueIdBuilder.java b/junit-jupiter-engine/src/testFixtures/java/org/junit/jupiter/engine/discovery/JupiterUniqueIdBuilder.java
index c50399eea78b..e80608fb41b4 100644
--- a/junit-jupiter-engine/src/testFixtures/java/org/junit/jupiter/engine/discovery/JupiterUniqueIdBuilder.java
+++ b/junit-jupiter-engine/src/testFixtures/java/org/junit/jupiter/engine/discovery/JupiterUniqueIdBuilder.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-migrationsupport/src/main/java/org/junit/jupiter/migrationsupport/EnableJUnit4MigrationSupport.java b/junit-jupiter-migrationsupport/src/main/java/org/junit/jupiter/migrationsupport/EnableJUnit4MigrationSupport.java
index 6bf825945f20..a5ee8bc8824c 100644
--- a/junit-jupiter-migrationsupport/src/main/java/org/junit/jupiter/migrationsupport/EnableJUnit4MigrationSupport.java
+++ b/junit-jupiter-migrationsupport/src/main/java/org/junit/jupiter/migrationsupport/EnableJUnit4MigrationSupport.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-migrationsupport/src/main/java/org/junit/jupiter/migrationsupport/conditions/IgnoreCondition.java b/junit-jupiter-migrationsupport/src/main/java/org/junit/jupiter/migrationsupport/conditions/IgnoreCondition.java
index bc0e47b6c5d1..477cedcb6213 100644
--- a/junit-jupiter-migrationsupport/src/main/java/org/junit/jupiter/migrationsupport/conditions/IgnoreCondition.java
+++ b/junit-jupiter-migrationsupport/src/main/java/org/junit/jupiter/migrationsupport/conditions/IgnoreCondition.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-migrationsupport/src/main/java/org/junit/jupiter/migrationsupport/rules/EnableRuleMigrationSupport.java b/junit-jupiter-migrationsupport/src/main/java/org/junit/jupiter/migrationsupport/rules/EnableRuleMigrationSupport.java
index f28802c5003f..c215ecc808a6 100644
--- a/junit-jupiter-migrationsupport/src/main/java/org/junit/jupiter/migrationsupport/rules/EnableRuleMigrationSupport.java
+++ b/junit-jupiter-migrationsupport/src/main/java/org/junit/jupiter/migrationsupport/rules/EnableRuleMigrationSupport.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-migrationsupport/src/main/java/org/junit/jupiter/migrationsupport/rules/ExpectedExceptionSupport.java b/junit-jupiter-migrationsupport/src/main/java/org/junit/jupiter/migrationsupport/rules/ExpectedExceptionSupport.java
index 66280212ac8e..538a053b1e32 100644
--- a/junit-jupiter-migrationsupport/src/main/java/org/junit/jupiter/migrationsupport/rules/ExpectedExceptionSupport.java
+++ b/junit-jupiter-migrationsupport/src/main/java/org/junit/jupiter/migrationsupport/rules/ExpectedExceptionSupport.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-migrationsupport/src/main/java/org/junit/jupiter/migrationsupport/rules/ExternalResourceSupport.java b/junit-jupiter-migrationsupport/src/main/java/org/junit/jupiter/migrationsupport/rules/ExternalResourceSupport.java
index 34789798babb..f31d6bc1f9dd 100644
--- a/junit-jupiter-migrationsupport/src/main/java/org/junit/jupiter/migrationsupport/rules/ExternalResourceSupport.java
+++ b/junit-jupiter-migrationsupport/src/main/java/org/junit/jupiter/migrationsupport/rules/ExternalResourceSupport.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-migrationsupport/src/main/java/org/junit/jupiter/migrationsupport/rules/TestRuleSupport.java b/junit-jupiter-migrationsupport/src/main/java/org/junit/jupiter/migrationsupport/rules/TestRuleSupport.java
index df82a22a9017..99a24d9b438b 100644
--- a/junit-jupiter-migrationsupport/src/main/java/org/junit/jupiter/migrationsupport/rules/TestRuleSupport.java
+++ b/junit-jupiter-migrationsupport/src/main/java/org/junit/jupiter/migrationsupport/rules/TestRuleSupport.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-migrationsupport/src/main/java/org/junit/jupiter/migrationsupport/rules/VerifierSupport.java b/junit-jupiter-migrationsupport/src/main/java/org/junit/jupiter/migrationsupport/rules/VerifierSupport.java
index ba0dbc96631a..dca4784fddba 100644
--- a/junit-jupiter-migrationsupport/src/main/java/org/junit/jupiter/migrationsupport/rules/VerifierSupport.java
+++ b/junit-jupiter-migrationsupport/src/main/java/org/junit/jupiter/migrationsupport/rules/VerifierSupport.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-migrationsupport/src/main/java/org/junit/jupiter/migrationsupport/rules/adapter/AbstractTestRuleAdapter.java b/junit-jupiter-migrationsupport/src/main/java/org/junit/jupiter/migrationsupport/rules/adapter/AbstractTestRuleAdapter.java
index 9f24bbf5976c..223f609e225c 100644
--- a/junit-jupiter-migrationsupport/src/main/java/org/junit/jupiter/migrationsupport/rules/adapter/AbstractTestRuleAdapter.java
+++ b/junit-jupiter-migrationsupport/src/main/java/org/junit/jupiter/migrationsupport/rules/adapter/AbstractTestRuleAdapter.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-migrationsupport/src/main/java/org/junit/jupiter/migrationsupport/rules/adapter/ExpectedExceptionAdapter.java b/junit-jupiter-migrationsupport/src/main/java/org/junit/jupiter/migrationsupport/rules/adapter/ExpectedExceptionAdapter.java
index f0c5041dcb38..1b1971b2d04d 100644
--- a/junit-jupiter-migrationsupport/src/main/java/org/junit/jupiter/migrationsupport/rules/adapter/ExpectedExceptionAdapter.java
+++ b/junit-jupiter-migrationsupport/src/main/java/org/junit/jupiter/migrationsupport/rules/adapter/ExpectedExceptionAdapter.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-migrationsupport/src/main/java/org/junit/jupiter/migrationsupport/rules/adapter/ExternalResourceAdapter.java b/junit-jupiter-migrationsupport/src/main/java/org/junit/jupiter/migrationsupport/rules/adapter/ExternalResourceAdapter.java
index 4295952113f9..b6905f42da2d 100644
--- a/junit-jupiter-migrationsupport/src/main/java/org/junit/jupiter/migrationsupport/rules/adapter/ExternalResourceAdapter.java
+++ b/junit-jupiter-migrationsupport/src/main/java/org/junit/jupiter/migrationsupport/rules/adapter/ExternalResourceAdapter.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-migrationsupport/src/main/java/org/junit/jupiter/migrationsupport/rules/adapter/GenericBeforeAndAfterAdvice.java b/junit-jupiter-migrationsupport/src/main/java/org/junit/jupiter/migrationsupport/rules/adapter/GenericBeforeAndAfterAdvice.java
index 202148eeb52b..ad384ce9f47a 100644
--- a/junit-jupiter-migrationsupport/src/main/java/org/junit/jupiter/migrationsupport/rules/adapter/GenericBeforeAndAfterAdvice.java
+++ b/junit-jupiter-migrationsupport/src/main/java/org/junit/jupiter/migrationsupport/rules/adapter/GenericBeforeAndAfterAdvice.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-migrationsupport/src/main/java/org/junit/jupiter/migrationsupport/rules/adapter/VerifierAdapter.java b/junit-jupiter-migrationsupport/src/main/java/org/junit/jupiter/migrationsupport/rules/adapter/VerifierAdapter.java
index aef447ef4bb7..ec00fc823e2c 100644
--- a/junit-jupiter-migrationsupport/src/main/java/org/junit/jupiter/migrationsupport/rules/adapter/VerifierAdapter.java
+++ b/junit-jupiter-migrationsupport/src/main/java/org/junit/jupiter/migrationsupport/rules/adapter/VerifierAdapter.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-migrationsupport/src/main/java/org/junit/jupiter/migrationsupport/rules/member/AbstractTestRuleAnnotatedMember.java b/junit-jupiter-migrationsupport/src/main/java/org/junit/jupiter/migrationsupport/rules/member/AbstractTestRuleAnnotatedMember.java
index b6409a85babd..c7dcdd6830ce 100644
--- a/junit-jupiter-migrationsupport/src/main/java/org/junit/jupiter/migrationsupport/rules/member/AbstractTestRuleAnnotatedMember.java
+++ b/junit-jupiter-migrationsupport/src/main/java/org/junit/jupiter/migrationsupport/rules/member/AbstractTestRuleAnnotatedMember.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-migrationsupport/src/main/java/org/junit/jupiter/migrationsupport/rules/member/TestRuleAnnotatedField.java b/junit-jupiter-migrationsupport/src/main/java/org/junit/jupiter/migrationsupport/rules/member/TestRuleAnnotatedField.java
index cab356a3448b..7a8dd0c501ba 100644
--- a/junit-jupiter-migrationsupport/src/main/java/org/junit/jupiter/migrationsupport/rules/member/TestRuleAnnotatedField.java
+++ b/junit-jupiter-migrationsupport/src/main/java/org/junit/jupiter/migrationsupport/rules/member/TestRuleAnnotatedField.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-migrationsupport/src/main/java/org/junit/jupiter/migrationsupport/rules/member/TestRuleAnnotatedMember.java b/junit-jupiter-migrationsupport/src/main/java/org/junit/jupiter/migrationsupport/rules/member/TestRuleAnnotatedMember.java
index 01506885103e..0004b905fdf5 100644
--- a/junit-jupiter-migrationsupport/src/main/java/org/junit/jupiter/migrationsupport/rules/member/TestRuleAnnotatedMember.java
+++ b/junit-jupiter-migrationsupport/src/main/java/org/junit/jupiter/migrationsupport/rules/member/TestRuleAnnotatedMember.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-migrationsupport/src/main/java/org/junit/jupiter/migrationsupport/rules/member/TestRuleAnnotatedMethod.java b/junit-jupiter-migrationsupport/src/main/java/org/junit/jupiter/migrationsupport/rules/member/TestRuleAnnotatedMethod.java
index 2950842bba1e..75fc5ad6ee5c 100644
--- a/junit-jupiter-migrationsupport/src/main/java/org/junit/jupiter/migrationsupport/rules/member/TestRuleAnnotatedMethod.java
+++ b/junit-jupiter-migrationsupport/src/main/java/org/junit/jupiter/migrationsupport/rules/member/TestRuleAnnotatedMethod.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-migrationsupport/src/test/java/org/junit/jupiter/migrationsupport/JupiterMigrationSupportTestSuite.java b/junit-jupiter-migrationsupport/src/test/java/org/junit/jupiter/migrationsupport/JupiterMigrationSupportTestSuite.java
index 35513bee0a74..f37c15b81a90 100644
--- a/junit-jupiter-migrationsupport/src/test/java/org/junit/jupiter/migrationsupport/JupiterMigrationSupportTestSuite.java
+++ b/junit-jupiter-migrationsupport/src/test/java/org/junit/jupiter/migrationsupport/JupiterMigrationSupportTestSuite.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-migrationsupport/src/test/java/org/junit/jupiter/migrationsupport/conditions/IgnoreAnnotationIntegrationTests.java b/junit-jupiter-migrationsupport/src/test/java/org/junit/jupiter/migrationsupport/conditions/IgnoreAnnotationIntegrationTests.java
index fb18f895de66..3befccdf3373 100644
--- a/junit-jupiter-migrationsupport/src/test/java/org/junit/jupiter/migrationsupport/conditions/IgnoreAnnotationIntegrationTests.java
+++ b/junit-jupiter-migrationsupport/src/test/java/org/junit/jupiter/migrationsupport/conditions/IgnoreAnnotationIntegrationTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-migrationsupport/src/test/java/org/junit/jupiter/migrationsupport/conditions/IgnoreConditionTests.java b/junit-jupiter-migrationsupport/src/test/java/org/junit/jupiter/migrationsupport/conditions/IgnoreConditionTests.java
index 1b5d14b43c76..95be5fb351e8 100644
--- a/junit-jupiter-migrationsupport/src/test/java/org/junit/jupiter/migrationsupport/conditions/IgnoreConditionTests.java
+++ b/junit-jupiter-migrationsupport/src/test/java/org/junit/jupiter/migrationsupport/conditions/IgnoreConditionTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-migrationsupport/src/test/java/org/junit/jupiter/migrationsupport/rules/AbstractTestRuleAdapterTests.java b/junit-jupiter-migrationsupport/src/test/java/org/junit/jupiter/migrationsupport/rules/AbstractTestRuleAdapterTests.java
index 642d0dc8f107..4829db6d1634 100644
--- a/junit-jupiter-migrationsupport/src/test/java/org/junit/jupiter/migrationsupport/rules/AbstractTestRuleAdapterTests.java
+++ b/junit-jupiter-migrationsupport/src/test/java/org/junit/jupiter/migrationsupport/rules/AbstractTestRuleAdapterTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-migrationsupport/src/test/java/org/junit/jupiter/migrationsupport/rules/EnableRuleMigrationSupportWithBothRuleTypesTests.java b/junit-jupiter-migrationsupport/src/test/java/org/junit/jupiter/migrationsupport/rules/EnableRuleMigrationSupportWithBothRuleTypesTests.java
index 461b84ec5d20..00185dfd91be 100644
--- a/junit-jupiter-migrationsupport/src/test/java/org/junit/jupiter/migrationsupport/rules/EnableRuleMigrationSupportWithBothRuleTypesTests.java
+++ b/junit-jupiter-migrationsupport/src/test/java/org/junit/jupiter/migrationsupport/rules/EnableRuleMigrationSupportWithBothRuleTypesTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-migrationsupport/src/test/java/org/junit/jupiter/migrationsupport/rules/ExpectedExceptionSupportTests.java b/junit-jupiter-migrationsupport/src/test/java/org/junit/jupiter/migrationsupport/rules/ExpectedExceptionSupportTests.java
index f1df8401212e..548459026e3f 100644
--- a/junit-jupiter-migrationsupport/src/test/java/org/junit/jupiter/migrationsupport/rules/ExpectedExceptionSupportTests.java
+++ b/junit-jupiter-migrationsupport/src/test/java/org/junit/jupiter/migrationsupport/rules/ExpectedExceptionSupportTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-migrationsupport/src/test/java/org/junit/jupiter/migrationsupport/rules/ExternalResourceSupportForDifferentDeclaredReturnTypesRulesTests.java b/junit-jupiter-migrationsupport/src/test/java/org/junit/jupiter/migrationsupport/rules/ExternalResourceSupportForDifferentDeclaredReturnTypesRulesTests.java
index 9715660fa1de..96629e2ec313 100644
--- a/junit-jupiter-migrationsupport/src/test/java/org/junit/jupiter/migrationsupport/rules/ExternalResourceSupportForDifferentDeclaredReturnTypesRulesTests.java
+++ b/junit-jupiter-migrationsupport/src/test/java/org/junit/jupiter/migrationsupport/rules/ExternalResourceSupportForDifferentDeclaredReturnTypesRulesTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-migrationsupport/src/test/java/org/junit/jupiter/migrationsupport/rules/ExternalResourceSupportForMixedMethodAndFieldRulesTests.java b/junit-jupiter-migrationsupport/src/test/java/org/junit/jupiter/migrationsupport/rules/ExternalResourceSupportForMixedMethodAndFieldRulesTests.java
index 6108ceda7a02..45a5e81e7413 100644
--- a/junit-jupiter-migrationsupport/src/test/java/org/junit/jupiter/migrationsupport/rules/ExternalResourceSupportForMixedMethodAndFieldRulesTests.java
+++ b/junit-jupiter-migrationsupport/src/test/java/org/junit/jupiter/migrationsupport/rules/ExternalResourceSupportForMixedMethodAndFieldRulesTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-migrationsupport/src/test/java/org/junit/jupiter/migrationsupport/rules/ExternalResourceSupportForMultipleFieldRulesTests.java b/junit-jupiter-migrationsupport/src/test/java/org/junit/jupiter/migrationsupport/rules/ExternalResourceSupportForMultipleFieldRulesTests.java
index 110309901ecf..28bedf135ffb 100644
--- a/junit-jupiter-migrationsupport/src/test/java/org/junit/jupiter/migrationsupport/rules/ExternalResourceSupportForMultipleFieldRulesTests.java
+++ b/junit-jupiter-migrationsupport/src/test/java/org/junit/jupiter/migrationsupport/rules/ExternalResourceSupportForMultipleFieldRulesTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-migrationsupport/src/test/java/org/junit/jupiter/migrationsupport/rules/ExternalResourceSupportForMultipleMethodRulesTests.java b/junit-jupiter-migrationsupport/src/test/java/org/junit/jupiter/migrationsupport/rules/ExternalResourceSupportForMultipleMethodRulesTests.java
index 9789c2dcf15c..7e15b4abc866 100644
--- a/junit-jupiter-migrationsupport/src/test/java/org/junit/jupiter/migrationsupport/rules/ExternalResourceSupportForMultipleMethodRulesTests.java
+++ b/junit-jupiter-migrationsupport/src/test/java/org/junit/jupiter/migrationsupport/rules/ExternalResourceSupportForMultipleMethodRulesTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-migrationsupport/src/test/java/org/junit/jupiter/migrationsupport/rules/ExternalResourceSupportForTemporaryFolderFieldTests.java b/junit-jupiter-migrationsupport/src/test/java/org/junit/jupiter/migrationsupport/rules/ExternalResourceSupportForTemporaryFolderFieldTests.java
index ff03a0d6d09a..4119170dba5f 100644
--- a/junit-jupiter-migrationsupport/src/test/java/org/junit/jupiter/migrationsupport/rules/ExternalResourceSupportForTemporaryFolderFieldTests.java
+++ b/junit-jupiter-migrationsupport/src/test/java/org/junit/jupiter/migrationsupport/rules/ExternalResourceSupportForTemporaryFolderFieldTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-migrationsupport/src/test/java/org/junit/jupiter/migrationsupport/rules/ExternalResourceSupportWithInheritanceTests.java b/junit-jupiter-migrationsupport/src/test/java/org/junit/jupiter/migrationsupport/rules/ExternalResourceSupportWithInheritanceTests.java
index 3d639ce44e2c..dc6f4fcaee05 100644
--- a/junit-jupiter-migrationsupport/src/test/java/org/junit/jupiter/migrationsupport/rules/ExternalResourceSupportWithInheritanceTests.java
+++ b/junit-jupiter-migrationsupport/src/test/java/org/junit/jupiter/migrationsupport/rules/ExternalResourceSupportWithInheritanceTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-migrationsupport/src/test/java/org/junit/jupiter/migrationsupport/rules/ExternalResourceWithoutAdapterTests.java b/junit-jupiter-migrationsupport/src/test/java/org/junit/jupiter/migrationsupport/rules/ExternalResourceWithoutAdapterTests.java
index c6a730abe9c5..67c395b46a58 100644
--- a/junit-jupiter-migrationsupport/src/test/java/org/junit/jupiter/migrationsupport/rules/ExternalResourceWithoutAdapterTests.java
+++ b/junit-jupiter-migrationsupport/src/test/java/org/junit/jupiter/migrationsupport/rules/ExternalResourceWithoutAdapterTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-migrationsupport/src/test/java/org/junit/jupiter/migrationsupport/rules/FailAfterAllHelper.java b/junit-jupiter-migrationsupport/src/test/java/org/junit/jupiter/migrationsupport/rules/FailAfterAllHelper.java
index 99b3abcfcf62..08d51f17968a 100644
--- a/junit-jupiter-migrationsupport/src/test/java/org/junit/jupiter/migrationsupport/rules/FailAfterAllHelper.java
+++ b/junit-jupiter-migrationsupport/src/test/java/org/junit/jupiter/migrationsupport/rules/FailAfterAllHelper.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-migrationsupport/src/test/java/org/junit/jupiter/migrationsupport/rules/LauncherBasedEnableRuleMigrationSupportTests.java b/junit-jupiter-migrationsupport/src/test/java/org/junit/jupiter/migrationsupport/rules/LauncherBasedEnableRuleMigrationSupportTests.java
index 4ef4ef732c97..37774078b0f0 100644
--- a/junit-jupiter-migrationsupport/src/test/java/org/junit/jupiter/migrationsupport/rules/LauncherBasedEnableRuleMigrationSupportTests.java
+++ b/junit-jupiter-migrationsupport/src/test/java/org/junit/jupiter/migrationsupport/rules/LauncherBasedEnableRuleMigrationSupportTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-migrationsupport/src/test/java/org/junit/jupiter/migrationsupport/rules/VerifierSupportForMixedMethodAndFieldRulesTests.java b/junit-jupiter-migrationsupport/src/test/java/org/junit/jupiter/migrationsupport/rules/VerifierSupportForMixedMethodAndFieldRulesTests.java
index 109c6608fe71..a42db4c56638 100644
--- a/junit-jupiter-migrationsupport/src/test/java/org/junit/jupiter/migrationsupport/rules/VerifierSupportForMixedMethodAndFieldRulesTests.java
+++ b/junit-jupiter-migrationsupport/src/test/java/org/junit/jupiter/migrationsupport/rules/VerifierSupportForMixedMethodAndFieldRulesTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-migrationsupport/src/test/java/org/junit/jupiter/migrationsupport/rules/WrongExtendWithForVerifierFieldTests.java b/junit-jupiter-migrationsupport/src/test/java/org/junit/jupiter/migrationsupport/rules/WrongExtendWithForVerifierFieldTests.java
index 0a0d43702a08..9b559cc0a2e6 100644
--- a/junit-jupiter-migrationsupport/src/test/java/org/junit/jupiter/migrationsupport/rules/WrongExtendWithForVerifierFieldTests.java
+++ b/junit-jupiter-migrationsupport/src/test/java/org/junit/jupiter/migrationsupport/rules/WrongExtendWithForVerifierFieldTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-migrationsupport/src/test/java/org/junit/jupiter/migrationsupport/rules/WrongExtendWithForVerifierMethodTests.java b/junit-jupiter-migrationsupport/src/test/java/org/junit/jupiter/migrationsupport/rules/WrongExtendWithForVerifierMethodTests.java
index 023a78a723ca..9d566a581b77 100644
--- a/junit-jupiter-migrationsupport/src/test/java/org/junit/jupiter/migrationsupport/rules/WrongExtendWithForVerifierMethodTests.java
+++ b/junit-jupiter-migrationsupport/src/test/java/org/junit/jupiter/migrationsupport/rules/WrongExtendWithForVerifierMethodTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-params/src/main/java/org/junit/jupiter/params/ParameterizedTest.java b/junit-jupiter-params/src/main/java/org/junit/jupiter/params/ParameterizedTest.java
index eeb0bdb7b31d..1fcdd80bb829 100644
--- a/junit-jupiter-params/src/main/java/org/junit/jupiter/params/ParameterizedTest.java
+++ b/junit-jupiter-params/src/main/java/org/junit/jupiter/params/ParameterizedTest.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-params/src/main/java/org/junit/jupiter/params/ParameterizedTestExtension.java b/junit-jupiter-params/src/main/java/org/junit/jupiter/params/ParameterizedTestExtension.java
index 1df2deed467b..3b9f8c3ce4c1 100644
--- a/junit-jupiter-params/src/main/java/org/junit/jupiter/params/ParameterizedTestExtension.java
+++ b/junit-jupiter-params/src/main/java/org/junit/jupiter/params/ParameterizedTestExtension.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-params/src/main/java/org/junit/jupiter/params/ParameterizedTestInvocationContext.java b/junit-jupiter-params/src/main/java/org/junit/jupiter/params/ParameterizedTestInvocationContext.java
index 1110cc196c4a..778fe9363e28 100644
--- a/junit-jupiter-params/src/main/java/org/junit/jupiter/params/ParameterizedTestInvocationContext.java
+++ b/junit-jupiter-params/src/main/java/org/junit/jupiter/params/ParameterizedTestInvocationContext.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-params/src/main/java/org/junit/jupiter/params/ParameterizedTestMethodContext.java b/junit-jupiter-params/src/main/java/org/junit/jupiter/params/ParameterizedTestMethodContext.java
index d9dc2ed4e556..fc0c3c0e57e0 100644
--- a/junit-jupiter-params/src/main/java/org/junit/jupiter/params/ParameterizedTestMethodContext.java
+++ b/junit-jupiter-params/src/main/java/org/junit/jupiter/params/ParameterizedTestMethodContext.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-params/src/main/java/org/junit/jupiter/params/ParameterizedTestNameFormatter.java b/junit-jupiter-params/src/main/java/org/junit/jupiter/params/ParameterizedTestNameFormatter.java
index 07f308070563..a505bd81f91e 100644
--- a/junit-jupiter-params/src/main/java/org/junit/jupiter/params/ParameterizedTestNameFormatter.java
+++ b/junit-jupiter-params/src/main/java/org/junit/jupiter/params/ParameterizedTestNameFormatter.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
@@ -31,6 +31,7 @@
class ParameterizedTestNameFormatter {
private static final char ELLIPSIS = '\u2026';
+ private static final String TEMPORARY_DISPLAY_NAME_PLACEHOLDER = "~~~JUNIT_DISPLAY_NAME~~~";
private final String pattern;
private final String displayName;
@@ -61,7 +62,8 @@ private String formatSafely(int invocationIndex, Object[] arguments) {
String pattern = prepareMessageFormatPattern(invocationIndex, namedArguments);
MessageFormat format = new MessageFormat(pattern);
Object[] humanReadableArguments = makeReadable(format, namedArguments);
- return format.format(humanReadableArguments);
+ String formatted = format.format(humanReadableArguments);
+ return formatted.replace(TEMPORARY_DISPLAY_NAME_PLACEHOLDER, this.displayName);
}
private Object[] extractNamedArguments(Object[] arguments) {
@@ -72,7 +74,7 @@ private Object[] extractNamedArguments(Object[] arguments) {
private String prepareMessageFormatPattern(int invocationIndex, Object[] arguments) {
String result = pattern//
- .replace(DISPLAY_NAME_PLACEHOLDER, this.displayName)//
+ .replace(DISPLAY_NAME_PLACEHOLDER, TEMPORARY_DISPLAY_NAME_PLACEHOLDER)//
.replace(INDEX_PLACEHOLDER, String.valueOf(invocationIndex));
if (result.contains(ARGUMENTS_WITH_NAMES_PLACEHOLDER)) {
diff --git a/junit-jupiter-params/src/main/java/org/junit/jupiter/params/ParameterizedTestParameterResolver.java b/junit-jupiter-params/src/main/java/org/junit/jupiter/params/ParameterizedTestParameterResolver.java
index ca5ba2ba2596..b9d6a7b4b197 100644
--- a/junit-jupiter-params/src/main/java/org/junit/jupiter/params/ParameterizedTestParameterResolver.java
+++ b/junit-jupiter-params/src/main/java/org/junit/jupiter/params/ParameterizedTestParameterResolver.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-params/src/main/java/org/junit/jupiter/params/aggregator/AggregateWith.java b/junit-jupiter-params/src/main/java/org/junit/jupiter/params/aggregator/AggregateWith.java
index d4c5f8d6e859..57a0b88f3201 100644
--- a/junit-jupiter-params/src/main/java/org/junit/jupiter/params/aggregator/AggregateWith.java
+++ b/junit-jupiter-params/src/main/java/org/junit/jupiter/params/aggregator/AggregateWith.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-params/src/main/java/org/junit/jupiter/params/aggregator/ArgumentAccessException.java b/junit-jupiter-params/src/main/java/org/junit/jupiter/params/aggregator/ArgumentAccessException.java
index 6f143a759cf4..ce439621dae8 100644
--- a/junit-jupiter-params/src/main/java/org/junit/jupiter/params/aggregator/ArgumentAccessException.java
+++ b/junit-jupiter-params/src/main/java/org/junit/jupiter/params/aggregator/ArgumentAccessException.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-params/src/main/java/org/junit/jupiter/params/aggregator/ArgumentsAccessor.java b/junit-jupiter-params/src/main/java/org/junit/jupiter/params/aggregator/ArgumentsAccessor.java
index e31c8080fecb..e62d7864f14f 100644
--- a/junit-jupiter-params/src/main/java/org/junit/jupiter/params/aggregator/ArgumentsAccessor.java
+++ b/junit-jupiter-params/src/main/java/org/junit/jupiter/params/aggregator/ArgumentsAccessor.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-params/src/main/java/org/junit/jupiter/params/aggregator/ArgumentsAggregationException.java b/junit-jupiter-params/src/main/java/org/junit/jupiter/params/aggregator/ArgumentsAggregationException.java
index 379c9aac1b94..10b96762420f 100644
--- a/junit-jupiter-params/src/main/java/org/junit/jupiter/params/aggregator/ArgumentsAggregationException.java
+++ b/junit-jupiter-params/src/main/java/org/junit/jupiter/params/aggregator/ArgumentsAggregationException.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-params/src/main/java/org/junit/jupiter/params/aggregator/ArgumentsAggregator.java b/junit-jupiter-params/src/main/java/org/junit/jupiter/params/aggregator/ArgumentsAggregator.java
index 5779699497ca..52887ed5de94 100644
--- a/junit-jupiter-params/src/main/java/org/junit/jupiter/params/aggregator/ArgumentsAggregator.java
+++ b/junit-jupiter-params/src/main/java/org/junit/jupiter/params/aggregator/ArgumentsAggregator.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-params/src/main/java/org/junit/jupiter/params/aggregator/DefaultArgumentsAccessor.java b/junit-jupiter-params/src/main/java/org/junit/jupiter/params/aggregator/DefaultArgumentsAccessor.java
index 65f53071cc75..d0e4d3634975 100644
--- a/junit-jupiter-params/src/main/java/org/junit/jupiter/params/aggregator/DefaultArgumentsAccessor.java
+++ b/junit-jupiter-params/src/main/java/org/junit/jupiter/params/aggregator/DefaultArgumentsAccessor.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-params/src/main/java/org/junit/jupiter/params/converter/ArgumentConversionException.java b/junit-jupiter-params/src/main/java/org/junit/jupiter/params/converter/ArgumentConversionException.java
index eee4c0120a59..0bd9513c9cbf 100644
--- a/junit-jupiter-params/src/main/java/org/junit/jupiter/params/converter/ArgumentConversionException.java
+++ b/junit-jupiter-params/src/main/java/org/junit/jupiter/params/converter/ArgumentConversionException.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-params/src/main/java/org/junit/jupiter/params/converter/ArgumentConverter.java b/junit-jupiter-params/src/main/java/org/junit/jupiter/params/converter/ArgumentConverter.java
index f7b4a75739cc..d17589655ae4 100644
--- a/junit-jupiter-params/src/main/java/org/junit/jupiter/params/converter/ArgumentConverter.java
+++ b/junit-jupiter-params/src/main/java/org/junit/jupiter/params/converter/ArgumentConverter.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-params/src/main/java/org/junit/jupiter/params/converter/ConvertWith.java b/junit-jupiter-params/src/main/java/org/junit/jupiter/params/converter/ConvertWith.java
index 46b4d121b1e3..42be3c88f65d 100644
--- a/junit-jupiter-params/src/main/java/org/junit/jupiter/params/converter/ConvertWith.java
+++ b/junit-jupiter-params/src/main/java/org/junit/jupiter/params/converter/ConvertWith.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-params/src/main/java/org/junit/jupiter/params/converter/DefaultArgumentConverter.java b/junit-jupiter-params/src/main/java/org/junit/jupiter/params/converter/DefaultArgumentConverter.java
index bed208d512ee..0db0027c89dc 100644
--- a/junit-jupiter-params/src/main/java/org/junit/jupiter/params/converter/DefaultArgumentConverter.java
+++ b/junit-jupiter-params/src/main/java/org/junit/jupiter/params/converter/DefaultArgumentConverter.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
@@ -289,7 +289,7 @@ private static Class> toClass(String type) {
private static URL toURL(String url) {
try {
- return new URL(url);
+ return URI.create(url).toURL();
}
catch (MalformedURLException ex) {
throw new ArgumentConversionException(
diff --git a/junit-jupiter-params/src/main/java/org/junit/jupiter/params/converter/FallbackStringToObjectConverter.java b/junit-jupiter-params/src/main/java/org/junit/jupiter/params/converter/FallbackStringToObjectConverter.java
index 67d20dd30e9b..be2ea7d1370b 100644
--- a/junit-jupiter-params/src/main/java/org/junit/jupiter/params/converter/FallbackStringToObjectConverter.java
+++ b/junit-jupiter-params/src/main/java/org/junit/jupiter/params/converter/FallbackStringToObjectConverter.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-params/src/main/java/org/junit/jupiter/params/converter/JavaTimeArgumentConverter.java b/junit-jupiter-params/src/main/java/org/junit/jupiter/params/converter/JavaTimeArgumentConverter.java
index c049b8a59f04..7c1defaa3180 100644
--- a/junit-jupiter-params/src/main/java/org/junit/jupiter/params/converter/JavaTimeArgumentConverter.java
+++ b/junit-jupiter-params/src/main/java/org/junit/jupiter/params/converter/JavaTimeArgumentConverter.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-params/src/main/java/org/junit/jupiter/params/converter/JavaTimeConversionPattern.java b/junit-jupiter-params/src/main/java/org/junit/jupiter/params/converter/JavaTimeConversionPattern.java
index f491fbf72fdc..bbfab9e6f006 100644
--- a/junit-jupiter-params/src/main/java/org/junit/jupiter/params/converter/JavaTimeConversionPattern.java
+++ b/junit-jupiter-params/src/main/java/org/junit/jupiter/params/converter/JavaTimeConversionPattern.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-params/src/main/java/org/junit/jupiter/params/converter/SimpleArgumentConverter.java b/junit-jupiter-params/src/main/java/org/junit/jupiter/params/converter/SimpleArgumentConverter.java
index 6cb2a32ea2e1..dc1a32ea8742 100644
--- a/junit-jupiter-params/src/main/java/org/junit/jupiter/params/converter/SimpleArgumentConverter.java
+++ b/junit-jupiter-params/src/main/java/org/junit/jupiter/params/converter/SimpleArgumentConverter.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-params/src/main/java/org/junit/jupiter/params/converter/TypedArgumentConverter.java b/junit-jupiter-params/src/main/java/org/junit/jupiter/params/converter/TypedArgumentConverter.java
index f6ea5ad66858..505ba540c33a 100644
--- a/junit-jupiter-params/src/main/java/org/junit/jupiter/params/converter/TypedArgumentConverter.java
+++ b/junit-jupiter-params/src/main/java/org/junit/jupiter/params/converter/TypedArgumentConverter.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-params/src/main/java/org/junit/jupiter/params/provider/Arguments.java b/junit-jupiter-params/src/main/java/org/junit/jupiter/params/provider/Arguments.java
index 98d1aa082496..da3371f3795c 100644
--- a/junit-jupiter-params/src/main/java/org/junit/jupiter/params/provider/Arguments.java
+++ b/junit-jupiter-params/src/main/java/org/junit/jupiter/params/provider/Arguments.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-params/src/main/java/org/junit/jupiter/params/provider/ArgumentsProvider.java b/junit-jupiter-params/src/main/java/org/junit/jupiter/params/provider/ArgumentsProvider.java
index 2fb7ff668955..e57f5423cb5d 100644
--- a/junit-jupiter-params/src/main/java/org/junit/jupiter/params/provider/ArgumentsProvider.java
+++ b/junit-jupiter-params/src/main/java/org/junit/jupiter/params/provider/ArgumentsProvider.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-params/src/main/java/org/junit/jupiter/params/provider/ArgumentsSource.java b/junit-jupiter-params/src/main/java/org/junit/jupiter/params/provider/ArgumentsSource.java
index 757a11344c5d..04f7849d91e0 100644
--- a/junit-jupiter-params/src/main/java/org/junit/jupiter/params/provider/ArgumentsSource.java
+++ b/junit-jupiter-params/src/main/java/org/junit/jupiter/params/provider/ArgumentsSource.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-params/src/main/java/org/junit/jupiter/params/provider/ArgumentsSources.java b/junit-jupiter-params/src/main/java/org/junit/jupiter/params/provider/ArgumentsSources.java
index 706910de1bab..320c8ad8232e 100644
--- a/junit-jupiter-params/src/main/java/org/junit/jupiter/params/provider/ArgumentsSources.java
+++ b/junit-jupiter-params/src/main/java/org/junit/jupiter/params/provider/ArgumentsSources.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-params/src/main/java/org/junit/jupiter/params/provider/CsvArgumentsProvider.java b/junit-jupiter-params/src/main/java/org/junit/jupiter/params/provider/CsvArgumentsProvider.java
index 7a2999eaaf56..ceecaccb2ab7 100644
--- a/junit-jupiter-params/src/main/java/org/junit/jupiter/params/provider/CsvArgumentsProvider.java
+++ b/junit-jupiter-params/src/main/java/org/junit/jupiter/params/provider/CsvArgumentsProvider.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-params/src/main/java/org/junit/jupiter/params/provider/CsvFileArgumentsProvider.java b/junit-jupiter-params/src/main/java/org/junit/jupiter/params/provider/CsvFileArgumentsProvider.java
index 10112978b59d..14650f66e26d 100644
--- a/junit-jupiter-params/src/main/java/org/junit/jupiter/params/provider/CsvFileArgumentsProvider.java
+++ b/junit-jupiter-params/src/main/java/org/junit/jupiter/params/provider/CsvFileArgumentsProvider.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-params/src/main/java/org/junit/jupiter/params/provider/CsvFileSource.java b/junit-jupiter-params/src/main/java/org/junit/jupiter/params/provider/CsvFileSource.java
index 84a980638b3d..6c0a765c54e6 100644
--- a/junit-jupiter-params/src/main/java/org/junit/jupiter/params/provider/CsvFileSource.java
+++ b/junit-jupiter-params/src/main/java/org/junit/jupiter/params/provider/CsvFileSource.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-params/src/main/java/org/junit/jupiter/params/provider/CsvParserFactory.java b/junit-jupiter-params/src/main/java/org/junit/jupiter/params/provider/CsvParserFactory.java
index aa31d3cc1963..b31f522309f6 100644
--- a/junit-jupiter-params/src/main/java/org/junit/jupiter/params/provider/CsvParserFactory.java
+++ b/junit-jupiter-params/src/main/java/org/junit/jupiter/params/provider/CsvParserFactory.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-params/src/main/java/org/junit/jupiter/params/provider/CsvParsingException.java b/junit-jupiter-params/src/main/java/org/junit/jupiter/params/provider/CsvParsingException.java
index 6e47ffb1eae1..252670610966 100644
--- a/junit-jupiter-params/src/main/java/org/junit/jupiter/params/provider/CsvParsingException.java
+++ b/junit-jupiter-params/src/main/java/org/junit/jupiter/params/provider/CsvParsingException.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-params/src/main/java/org/junit/jupiter/params/provider/CsvSource.java b/junit-jupiter-params/src/main/java/org/junit/jupiter/params/provider/CsvSource.java
index f1930dcedbee..be44973c9031 100644
--- a/junit-jupiter-params/src/main/java/org/junit/jupiter/params/provider/CsvSource.java
+++ b/junit-jupiter-params/src/main/java/org/junit/jupiter/params/provider/CsvSource.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-params/src/main/java/org/junit/jupiter/params/provider/EmptyArgumentsProvider.java b/junit-jupiter-params/src/main/java/org/junit/jupiter/params/provider/EmptyArgumentsProvider.java
index ac6d1b01358f..8debbb3a86ff 100644
--- a/junit-jupiter-params/src/main/java/org/junit/jupiter/params/provider/EmptyArgumentsProvider.java
+++ b/junit-jupiter-params/src/main/java/org/junit/jupiter/params/provider/EmptyArgumentsProvider.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-params/src/main/java/org/junit/jupiter/params/provider/EmptySource.java b/junit-jupiter-params/src/main/java/org/junit/jupiter/params/provider/EmptySource.java
index 65b2ad69fd51..99023a73e9dd 100644
--- a/junit-jupiter-params/src/main/java/org/junit/jupiter/params/provider/EmptySource.java
+++ b/junit-jupiter-params/src/main/java/org/junit/jupiter/params/provider/EmptySource.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-params/src/main/java/org/junit/jupiter/params/provider/EnumArgumentsProvider.java b/junit-jupiter-params/src/main/java/org/junit/jupiter/params/provider/EnumArgumentsProvider.java
index 6985bb8c838f..a4853eeb9339 100644
--- a/junit-jupiter-params/src/main/java/org/junit/jupiter/params/provider/EnumArgumentsProvider.java
+++ b/junit-jupiter-params/src/main/java/org/junit/jupiter/params/provider/EnumArgumentsProvider.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-params/src/main/java/org/junit/jupiter/params/provider/EnumSource.java b/junit-jupiter-params/src/main/java/org/junit/jupiter/params/provider/EnumSource.java
index 59b1ebfedb8a..2a215ae10865 100644
--- a/junit-jupiter-params/src/main/java/org/junit/jupiter/params/provider/EnumSource.java
+++ b/junit-jupiter-params/src/main/java/org/junit/jupiter/params/provider/EnumSource.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
@@ -29,7 +29,7 @@
import org.junit.platform.commons.util.Preconditions;
/**
- * {@code @EnumSource} is an {@link ArgumentsSource} for constants of a
+ * {@code @EnumSource} is an {@link ArgumentsSource} for constants of
* an {@link Enum}.
*
*
The enum constants will be provided as arguments to the annotated
diff --git a/junit-jupiter-params/src/main/java/org/junit/jupiter/params/provider/MethodArgumentsProvider.java b/junit-jupiter-params/src/main/java/org/junit/jupiter/params/provider/MethodArgumentsProvider.java
index a4696a2739ec..d9fdffab336f 100644
--- a/junit-jupiter-params/src/main/java/org/junit/jupiter/params/provider/MethodArgumentsProvider.java
+++ b/junit-jupiter-params/src/main/java/org/junit/jupiter/params/provider/MethodArgumentsProvider.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
@@ -11,13 +11,13 @@
package org.junit.jupiter.params.provider;
import static java.lang.String.format;
+import static java.util.Arrays.stream;
import static java.util.stream.Collectors.toList;
import static org.junit.jupiter.params.provider.Arguments.arguments;
import static org.junit.platform.commons.util.AnnotationUtils.isAnnotated;
import static org.junit.platform.commons.util.CollectionUtils.isConvertibleToStream;
import java.lang.reflect.Method;
-import java.util.Arrays;
import java.util.List;
import java.util.function.Predicate;
import java.util.stream.Stream;
@@ -28,6 +28,7 @@
import org.junit.jupiter.api.extension.ExtensionContext;
import org.junit.jupiter.params.support.AnnotationConsumer;
import org.junit.platform.commons.JUnitException;
+import org.junit.platform.commons.PreconditionViolationException;
import org.junit.platform.commons.util.CollectionUtils;
import org.junit.platform.commons.util.Preconditions;
import org.junit.platform.commons.util.ReflectionUtils;
@@ -40,6 +41,9 @@ class MethodArgumentsProvider implements ArgumentsProvider, AnnotationConsumer isFactoryMethod = //
+ method -> isConvertibleToStream(method.getReturnType()) && !isTestMethod(method);
+
@Override
public void accept(MethodSource annotation) {
this.methodNames = annotation.value();
@@ -47,51 +51,108 @@ public void accept(MethodSource annotation) {
@Override
public Stream provideArguments(ExtensionContext context) {
+ Class> testClass = context.getRequiredTestClass();
+ Method testMethod = context.getRequiredTestMethod();
Object testInstance = context.getTestInstance().orElse(null);
// @formatter:off
- return Arrays.stream(this.methodNames)
- .map(factoryMethodName -> getFactoryMethod(context, factoryMethodName))
+ return stream(this.methodNames)
+ .map(factoryMethodName -> findFactoryMethod(testClass, testMethod, factoryMethodName))
.map(factoryMethod -> context.getExecutableInvoker().invoke(factoryMethod, testInstance))
.flatMap(CollectionUtils::toStream)
.map(MethodArgumentsProvider::toArguments);
// @formatter:on
}
- private Method getFactoryMethod(ExtensionContext context, String factoryMethodName) {
- Method testMethod = context.getRequiredTestMethod();
+ private static Method findFactoryMethod(Class> testClass, Method testMethod, String factoryMethodName) {
+ String originalFactoryMethodName = factoryMethodName;
+
+ // If the user did not provide a factory method name, find a "default" local
+ // factory method with the same name as the parameterized test method.
if (StringUtils.isBlank(factoryMethodName)) {
factoryMethodName = testMethod.getName();
+ return findFactoryMethodBySimpleName(testClass, testMethod, factoryMethodName);
}
- if (factoryMethodName.contains(".") || factoryMethodName.contains("#")) {
- return getFactoryMethodByFullyQualifiedName(factoryMethodName);
+
+ // Convert local factory method name to fully-qualified method name.
+ if (!looksLikeAFullyQualifiedMethodName(factoryMethodName)) {
+ factoryMethodName = testClass.getName() + "#" + factoryMethodName;
}
- return getFactoryMethodBySimpleName(context.getRequiredTestClass(), testMethod, factoryMethodName);
+
+ // Find factory method using fully-qualified name.
+ Method factoryMethod = findFactoryMethodByFullyQualifiedName(testMethod, factoryMethodName);
+
+ // Ensure factory method has a valid return type and is not a test method.
+ Preconditions.condition(isFactoryMethod.test(factoryMethod), () -> format(
+ "Could not find valid factory method [%s] for test class [%s] but found the following invalid candidate: %s",
+ originalFactoryMethodName, testClass.getName(), factoryMethod));
+
+ return factoryMethod;
}
- private Method getFactoryMethodByFullyQualifiedName(String fullyQualifiedMethodName) {
+ private static boolean looksLikeAFullyQualifiedMethodName(String factoryMethodName) {
+ if (factoryMethodName.contains("#")) {
+ return true;
+ }
+ int indexOfDot = factoryMethodName.indexOf(".");
+ if (indexOfDot == -1) {
+ return false;
+ }
+ int indexOfOpeningParenthesis = factoryMethodName.indexOf("(");
+ if (indexOfOpeningParenthesis > 0) {
+ // Exclude simple method names with parameters
+ return indexOfDot < indexOfOpeningParenthesis;
+ }
+ // If we get this far, we conclude the supplied factory method name "looks"
+ // like it was intended to be a fully-qualified method name, even if the
+ // syntax is invalid. We do this in order to provide better diagnostics for
+ // the user when a fully-qualified method name is in fact invalid.
+ return true;
+ }
+
+ private static Method findFactoryMethodByFullyQualifiedName(Method testMethod, String fullyQualifiedMethodName) {
String[] methodParts = ReflectionUtils.parseFullyQualifiedMethodName(fullyQualifiedMethodName);
String className = methodParts[0];
String methodName = methodParts[1];
String methodParameters = methodParts[2];
+ Class> clazz = loadRequiredClass(className);
+
+ // Attempt to find an exact match first.
+ Method factoryMethod = ReflectionUtils.findMethod(clazz, methodName, methodParameters).orElse(null);
+ if (factoryMethod != null) {
+ return factoryMethod;
+ }
- return ReflectionUtils.findMethod(loadRequiredClass(className), methodName, methodParameters).orElseThrow(
- () -> new JUnitException(format("Could not find factory method [%s(%s)] in class [%s]", methodName,
- methodParameters, className)));
+ boolean explicitParameterListSpecified = //
+ StringUtils.isNotBlank(methodParameters) || fullyQualifiedMethodName.endsWith("()");
+
+ // If we didn't find an exact match but an explicit parameter list was specified,
+ // that's a user configuration error.
+ Preconditions.condition(!explicitParameterListSpecified,
+ () -> format("Could not find factory method [%s(%s)] in class [%s]", methodName, methodParameters,
+ className));
+
+ // Otherwise, fall back to the same lenient search semantics that are used
+ // to locate a "default" local factory method.
+ return findFactoryMethodBySimpleName(clazz, testMethod, methodName);
}
/**
- * Find all methods in the given {@code testClass} with the desired {@code factoryMethodName}
- * which have return types that can be converted to a {@link Stream}, ignoring the
- * {@code testMethod} itself as well as any {@code @Test}, {@code @TestTemplate},
- * or {@code @TestFactory} methods with the same name.
+ * Find the factory method by searching for all methods in the given {@code clazz}
+ * with the desired {@code factoryMethodName} which have return types that can be
+ * converted to a {@link Stream}, ignoring the {@code testMethod} itself as well
+ * as any {@code @Test}, {@code @TestTemplate}, or {@code @TestFactory} methods
+ * with the same name.
+ * @return the single factory method matching the search criteria
+ * @throws PreconditionViolationException if the factory method was not found or
+ * multiple competing factory methods with the same name were found
*/
- private Method getFactoryMethodBySimpleName(Class> testClass, Method testMethod, String factoryMethodName) {
+ private static Method findFactoryMethodBySimpleName(Class> clazz, Method testMethod, String factoryMethodName) {
Predicate isCandidate = candidate -> factoryMethodName.equals(candidate.getName())
&& !testMethod.equals(candidate);
- List candidates = ReflectionUtils.findMethods(testClass, isCandidate);
- Predicate isFactoryMethod = method -> isConvertibleToStream(method.getReturnType())
- && !isTestMethod(method);
+ List candidates = ReflectionUtils.findMethods(clazz, isCandidate);
+
List factoryMethods = candidates.stream().filter(isFactoryMethod).collect(toList());
+
Preconditions.condition(factoryMethods.size() > 0, () -> {
// If we didn't find the factory method using the isFactoryMethod Predicate, perhaps
// the specified factory method has an invalid return type or is a test method.
@@ -99,23 +160,23 @@ private Method getFactoryMethodBySimpleName(Class> testClass, Method testMetho
if (candidates.size() > 0) {
return format(
"Could not find valid factory method [%s] in class [%s] but found the following invalid candidates: %s",
- factoryMethodName, testClass.getName(), candidates);
+ factoryMethodName, clazz.getName(), candidates);
}
// Otherwise, report that we didn't find anything.
- return format("Could not find factory method [%s] in class [%s]", factoryMethodName, testClass.getName());
+ return format("Could not find factory method [%s] in class [%s]", factoryMethodName, clazz.getName());
});
Preconditions.condition(factoryMethods.size() == 1,
() -> format("%d factory methods named [%s] were found in class [%s]: %s", factoryMethods.size(),
- factoryMethodName, testClass.getName(), factoryMethods));
+ factoryMethodName, clazz.getName(), factoryMethods));
return factoryMethods.get(0);
}
- private boolean isTestMethod(Method candidate) {
+ private static boolean isTestMethod(Method candidate) {
return isAnnotated(candidate, Test.class) || isAnnotated(candidate, TestTemplate.class)
|| isAnnotated(candidate, TestFactory.class);
}
- private Class> loadRequiredClass(String className) {
+ private static Class> loadRequiredClass(String className) {
return ReflectionUtils.tryToLoadClass(className).getOrThrow(
cause -> new JUnitException(format("Could not load class [%s]", className), cause));
}
diff --git a/junit-jupiter-params/src/main/java/org/junit/jupiter/params/provider/MethodSource.java b/junit-jupiter-params/src/main/java/org/junit/jupiter/params/provider/MethodSource.java
index 26d70432d85b..94f6225fd53f 100644
--- a/junit-jupiter-params/src/main/java/org/junit/jupiter/params/provider/MethodSource.java
+++ b/junit-jupiter-params/src/main/java/org/junit/jupiter/params/provider/MethodSource.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
@@ -110,12 +110,20 @@
* The names of factory methods within the test class or in external classes
* to use as sources for arguments.
*
- *
Factory methods in external classes must be referenced by fully
- * qualified method name — for example,
- * {@code com.example.StringsProviders#blankStrings} or
- * {@code com.example.TopLevelClass$NestedClass#classMethod} for a factory
+ *
Factory methods in external classes must be referenced by
+ * fully-qualified method name — for example,
+ * {@code "com.example.StringsProviders#blankStrings"} or
+ * {@code "com.example.TopLevelClass$NestedClass#classMethod"} for a factory
* method in a static nested class.
*
+ *
If a factory method accepts arguments that are provided by a
+ * {@link org.junit.jupiter.api.extension.ParameterResolver ParameterResolver},
+ * you can supply the formal parameter list in the qualified method name to
+ * disambiguate between overloaded variants of the factory method. For example,
+ * {@code "blankStrings(int)"} for a local qualified method name or
+ * {@code "com.example.StringsProviders#blankStrings(int)"} for a fully-qualified
+ * method name.
+ *
*
If no factory method names are declared, a method within the test class
* that has the same name as the test method will be used as the factory
* method by default.
diff --git a/junit-jupiter-params/src/main/java/org/junit/jupiter/params/provider/NullAndEmptySource.java b/junit-jupiter-params/src/main/java/org/junit/jupiter/params/provider/NullAndEmptySource.java
index 09ad77c258ab..ebbd4162ae63 100644
--- a/junit-jupiter-params/src/main/java/org/junit/jupiter/params/provider/NullAndEmptySource.java
+++ b/junit-jupiter-params/src/main/java/org/junit/jupiter/params/provider/NullAndEmptySource.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-params/src/main/java/org/junit/jupiter/params/provider/NullArgumentsProvider.java b/junit-jupiter-params/src/main/java/org/junit/jupiter/params/provider/NullArgumentsProvider.java
index b33bd5d88431..569dffded498 100644
--- a/junit-jupiter-params/src/main/java/org/junit/jupiter/params/provider/NullArgumentsProvider.java
+++ b/junit-jupiter-params/src/main/java/org/junit/jupiter/params/provider/NullArgumentsProvider.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-params/src/main/java/org/junit/jupiter/params/provider/NullEnum.java b/junit-jupiter-params/src/main/java/org/junit/jupiter/params/provider/NullEnum.java
index f314531d8cb0..f040c26c9c83 100644
--- a/junit-jupiter-params/src/main/java/org/junit/jupiter/params/provider/NullEnum.java
+++ b/junit-jupiter-params/src/main/java/org/junit/jupiter/params/provider/NullEnum.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-params/src/main/java/org/junit/jupiter/params/provider/NullSource.java b/junit-jupiter-params/src/main/java/org/junit/jupiter/params/provider/NullSource.java
index 841af2641408..283e78bf212c 100644
--- a/junit-jupiter-params/src/main/java/org/junit/jupiter/params/provider/NullSource.java
+++ b/junit-jupiter-params/src/main/java/org/junit/jupiter/params/provider/NullSource.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-params/src/main/java/org/junit/jupiter/params/provider/ValueArgumentsProvider.java b/junit-jupiter-params/src/main/java/org/junit/jupiter/params/provider/ValueArgumentsProvider.java
index a8ee833916db..8bda32cf50e4 100644
--- a/junit-jupiter-params/src/main/java/org/junit/jupiter/params/provider/ValueArgumentsProvider.java
+++ b/junit-jupiter-params/src/main/java/org/junit/jupiter/params/provider/ValueArgumentsProvider.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-params/src/main/java/org/junit/jupiter/params/provider/ValueSource.java b/junit-jupiter-params/src/main/java/org/junit/jupiter/params/provider/ValueSource.java
index ee047975faed..bc63eb037203 100644
--- a/junit-jupiter-params/src/main/java/org/junit/jupiter/params/provider/ValueSource.java
+++ b/junit-jupiter-params/src/main/java/org/junit/jupiter/params/provider/ValueSource.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-params/src/main/java/org/junit/jupiter/params/support/AnnotationConsumer.java b/junit-jupiter-params/src/main/java/org/junit/jupiter/params/support/AnnotationConsumer.java
index 731d77f0ac54..4930441cd4fd 100644
--- a/junit-jupiter-params/src/main/java/org/junit/jupiter/params/support/AnnotationConsumer.java
+++ b/junit-jupiter-params/src/main/java/org/junit/jupiter/params/support/AnnotationConsumer.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-params/src/main/java/org/junit/jupiter/params/support/AnnotationConsumerInitializer.java b/junit-jupiter-params/src/main/java/org/junit/jupiter/params/support/AnnotationConsumerInitializer.java
index 2ea65af2fafa..a9e2f01a6a32 100644
--- a/junit-jupiter-params/src/main/java/org/junit/jupiter/params/support/AnnotationConsumerInitializer.java
+++ b/junit-jupiter-params/src/main/java/org/junit/jupiter/params/support/AnnotationConsumerInitializer.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-params/src/main/kotlin/org/junit/jupiter/params/aggregator/ArgumentsAccessor.kt b/junit-jupiter-params/src/main/kotlin/org/junit/jupiter/params/aggregator/ArgumentsAccessor.kt
index 4601274c701d..bd1ef56d1169 100644
--- a/junit-jupiter-params/src/main/kotlin/org/junit/jupiter/params/aggregator/ArgumentsAccessor.kt
+++ b/junit-jupiter-params/src/main/kotlin/org/junit/jupiter/params/aggregator/ArgumentsAccessor.kt
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-params/src/test/java/org/junit/jupiter/params/ParameterizedTestExtensionTests.java b/junit-jupiter-params/src/test/java/org/junit/jupiter/params/ParameterizedTestExtensionTests.java
index a02039e1a46a..12f044db13e0 100644
--- a/junit-jupiter-params/src/test/java/org/junit/jupiter/params/ParameterizedTestExtensionTests.java
+++ b/junit-jupiter-params/src/test/java/org/junit/jupiter/params/ParameterizedTestExtensionTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-params/src/test/java/org/junit/jupiter/params/ParameterizedTestIntegrationTests.java b/junit-jupiter-params/src/test/java/org/junit/jupiter/params/ParameterizedTestIntegrationTests.java
index 56f35329262d..24d2a711960d 100644
--- a/junit-jupiter-params/src/test/java/org/junit/jupiter/params/ParameterizedTestIntegrationTests.java
+++ b/junit-jupiter-params/src/test/java/org/junit/jupiter/params/ParameterizedTestIntegrationTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-params/src/test/java/org/junit/jupiter/params/ParameterizedTestMethodContextTests.java b/junit-jupiter-params/src/test/java/org/junit/jupiter/params/ParameterizedTestMethodContextTests.java
index befc91a2f9f5..038c350210da 100644
--- a/junit-jupiter-params/src/test/java/org/junit/jupiter/params/ParameterizedTestMethodContextTests.java
+++ b/junit-jupiter-params/src/test/java/org/junit/jupiter/params/ParameterizedTestMethodContextTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-params/src/test/java/org/junit/jupiter/params/ParameterizedTestNameFormatterTests.java b/junit-jupiter-params/src/test/java/org/junit/jupiter/params/ParameterizedTestNameFormatterTests.java
index 5cbea3c75e10..1cbabc827991 100644
--- a/junit-jupiter-params/src/test/java/org/junit/jupiter/params/ParameterizedTestNameFormatterTests.java
+++ b/junit-jupiter-params/src/test/java/org/junit/jupiter/params/ParameterizedTestNameFormatterTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
@@ -60,6 +60,24 @@ void formatsDisplayName() {
assertEquals("enigma", formatter.format(2));
}
+ @Test
+ void formatsDisplayNameContainingApostrophe() {
+ String displayName = "display'Zero";
+ var formatter = formatter(DISPLAY_NAME_PLACEHOLDER, "display'Zero");
+
+ assertEquals(displayName, formatter.format(1));
+ assertEquals(displayName, formatter.format(2));
+ }
+
+ @Test
+ void formatsDisplayNameContainingFormatElements() {
+ String displayName = "{enigma} {0} '{1}'";
+ var formatter = formatter(DISPLAY_NAME_PLACEHOLDER, displayName);
+
+ assertEquals(displayName, formatter.format(1));
+ assertEquals(displayName, formatter.format(2));
+ }
+
@Test
void formatsInvocationIndex() {
var formatter = formatter(INDEX_PLACEHOLDER, "enigma");
@@ -229,13 +247,11 @@ void truncatesArgumentsThatExceedMaxLength() {
}
private static ParameterizedTestNameFormatter formatter(String pattern, String displayName) {
- return new ParameterizedTestNameFormatter(pattern, displayName, mock(ParameterizedTestMethodContext.class),
- 512);
+ return new ParameterizedTestNameFormatter(pattern, displayName, mock(), 512);
}
private static ParameterizedTestNameFormatter formatter(String pattern, int argumentMaxLength) {
- return new ParameterizedTestNameFormatter(pattern, "display name", mock(ParameterizedTestMethodContext.class),
- argumentMaxLength);
+ return new ParameterizedTestNameFormatter(pattern, "display name", mock(), argumentMaxLength);
}
private static ParameterizedTestNameFormatter formatter(String pattern, String displayName, Method method) {
diff --git a/junit-jupiter-params/src/test/java/org/junit/jupiter/params/ParameterizedTestSuite.java b/junit-jupiter-params/src/test/java/org/junit/jupiter/params/ParameterizedTestSuite.java
index 43f8145e64af..dd3a68eb74a5 100644
--- a/junit-jupiter-params/src/test/java/org/junit/jupiter/params/ParameterizedTestSuite.java
+++ b/junit-jupiter-params/src/test/java/org/junit/jupiter/params/ParameterizedTestSuite.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-params/src/test/java/org/junit/jupiter/params/aggregator/AggregatorIntegrationTests.java b/junit-jupiter-params/src/test/java/org/junit/jupiter/params/aggregator/AggregatorIntegrationTests.java
index 9df38a3a5c1d..97d814f6fc01 100644
--- a/junit-jupiter-params/src/test/java/org/junit/jupiter/params/aggregator/AggregatorIntegrationTests.java
+++ b/junit-jupiter-params/src/test/java/org/junit/jupiter/params/aggregator/AggregatorIntegrationTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-params/src/test/java/org/junit/jupiter/params/aggregator/DefaultArgumentsAccessorTests.java b/junit-jupiter-params/src/test/java/org/junit/jupiter/params/aggregator/DefaultArgumentsAccessorTests.java
index 33c3c3b88c83..198a05b46d68 100644
--- a/junit-jupiter-params/src/test/java/org/junit/jupiter/params/aggregator/DefaultArgumentsAccessorTests.java
+++ b/junit-jupiter-params/src/test/java/org/junit/jupiter/params/aggregator/DefaultArgumentsAccessorTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-params/src/test/java/org/junit/jupiter/params/converter/DefaultArgumentConverterTests.java b/junit-jupiter-params/src/test/java/org/junit/jupiter/params/converter/DefaultArgumentConverterTests.java
index 4a8d75cede13..12ad9cca0703 100644
--- a/junit-jupiter-params/src/test/java/org/junit/jupiter/params/converter/DefaultArgumentConverterTests.java
+++ b/junit-jupiter-params/src/test/java/org/junit/jupiter/params/converter/DefaultArgumentConverterTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
@@ -184,7 +184,7 @@ void convertsStringToURI() {
@Test
void convertsStringToURL() throws Exception {
- assertConverts("https://junit.org/junit5", URL.class, new URL("https://junit.org/junit5"));
+ assertConverts("https://junit.org/junit5", URL.class, URI.create("https://junit.org/junit5").toURL());
}
// --- java.time -----------------------------------------------------------
diff --git a/junit-jupiter-params/src/test/java/org/junit/jupiter/params/converter/FallbackStringToObjectConverterTests.java b/junit-jupiter-params/src/test/java/org/junit/jupiter/params/converter/FallbackStringToObjectConverterTests.java
index b88a48cde398..1d2cd21a6fdf 100644
--- a/junit-jupiter-params/src/test/java/org/junit/jupiter/params/converter/FallbackStringToObjectConverterTests.java
+++ b/junit-jupiter-params/src/test/java/org/junit/jupiter/params/converter/FallbackStringToObjectConverterTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-params/src/test/java/org/junit/jupiter/params/converter/JavaTimeArgumentConverterTests.java b/junit-jupiter-params/src/test/java/org/junit/jupiter/params/converter/JavaTimeArgumentConverterTests.java
index 0180957c5394..3bb890746dd9 100644
--- a/junit-jupiter-params/src/test/java/org/junit/jupiter/params/converter/JavaTimeArgumentConverterTests.java
+++ b/junit-jupiter-params/src/test/java/org/junit/jupiter/params/converter/JavaTimeArgumentConverterTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-params/src/test/java/org/junit/jupiter/params/converter/TypedArgumentConverterTests.java b/junit-jupiter-params/src/test/java/org/junit/jupiter/params/converter/TypedArgumentConverterTests.java
index 0f82f5e7e73c..c32a0313968e 100644
--- a/junit-jupiter-params/src/test/java/org/junit/jupiter/params/converter/TypedArgumentConverterTests.java
+++ b/junit-jupiter-params/src/test/java/org/junit/jupiter/params/converter/TypedArgumentConverterTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
@@ -13,6 +13,7 @@
import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.assertThatExceptionOfType;
import static org.junit.jupiter.api.Assertions.assertAll;
+import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;
import java.lang.annotation.ElementType;
@@ -30,7 +31,6 @@
import org.junit.jupiter.params.provider.ValueSource;
import org.junit.platform.commons.PreconditionViolationException;
import org.junit.platform.commons.util.ReflectionUtils;
-import org.mockito.Mockito;
/**
* Tests for {@link TypedArgumentConverter}.
@@ -92,7 +92,7 @@ void targetTypeMismatch() {
}
private ParameterContext parameterContext(Parameter parameter) {
- ParameterContext parameterContext = Mockito.mock(ParameterContext.class);
+ ParameterContext parameterContext = mock();
when(parameterContext.getParameter()).thenReturn(parameter);
return parameterContext;
}
diff --git a/junit-jupiter-params/src/test/java/org/junit/jupiter/params/provider/ArgumentsTests.java b/junit-jupiter-params/src/test/java/org/junit/jupiter/params/provider/ArgumentsTests.java
index e8ff584e033d..48958cf40eb2 100644
--- a/junit-jupiter-params/src/test/java/org/junit/jupiter/params/provider/ArgumentsTests.java
+++ b/junit-jupiter-params/src/test/java/org/junit/jupiter/params/provider/ArgumentsTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-params/src/test/java/org/junit/jupiter/params/provider/CsvArgumentsProviderTests.java b/junit-jupiter-params/src/test/java/org/junit/jupiter/params/provider/CsvArgumentsProviderTests.java
index 2fb55af504e6..67acc181a2d2 100644
--- a/junit-jupiter-params/src/test/java/org/junit/jupiter/params/provider/CsvArgumentsProviderTests.java
+++ b/junit-jupiter-params/src/test/java/org/junit/jupiter/params/provider/CsvArgumentsProviderTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-params/src/test/java/org/junit/jupiter/params/provider/CsvFileArgumentsProviderTests.java b/junit-jupiter-params/src/test/java/org/junit/jupiter/params/provider/CsvFileArgumentsProviderTests.java
index 44b11dbe3b95..1933e502656f 100644
--- a/junit-jupiter-params/src/test/java/org/junit/jupiter/params/provider/CsvFileArgumentsProviderTests.java
+++ b/junit-jupiter-params/src/test/java/org/junit/jupiter/params/provider/CsvFileArgumentsProviderTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-params/src/test/java/org/junit/jupiter/params/provider/EnumArgumentsProviderTests.java b/junit-jupiter-params/src/test/java/org/junit/jupiter/params/provider/EnumArgumentsProviderTests.java
index 135df1f40f6f..eb265d3e8ffc 100644
--- a/junit-jupiter-params/src/test/java/org/junit/jupiter/params/provider/EnumArgumentsProviderTests.java
+++ b/junit-jupiter-params/src/test/java/org/junit/jupiter/params/provider/EnumArgumentsProviderTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
@@ -24,14 +24,13 @@
import org.junit.jupiter.api.extension.ExtensionContext;
import org.junit.jupiter.params.provider.EnumSource.Mode;
import org.junit.platform.commons.PreconditionViolationException;
-import org.mockito.Mockito;
/**
* @since 5.0
*/
class EnumArgumentsProviderTests {
- private ExtensionContext extensionContext = Mockito.mock(ExtensionContext.class);
+ private ExtensionContext extensionContext = mock();
@Test
void providesAllEnumConstants() {
diff --git a/junit-jupiter-params/src/test/java/org/junit/jupiter/params/provider/EnumSourceTests.java b/junit-jupiter-params/src/test/java/org/junit/jupiter/params/provider/EnumSourceTests.java
index cb85817bfd80..f36a31407aca 100644
--- a/junit-jupiter-params/src/test/java/org/junit/jupiter/params/provider/EnumSourceTests.java
+++ b/junit-jupiter-params/src/test/java/org/junit/jupiter/params/provider/EnumSourceTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
diff --git a/junit-jupiter-params/src/test/java/org/junit/jupiter/params/provider/MethodArgumentsProviderTests.java b/junit-jupiter-params/src/test/java/org/junit/jupiter/params/provider/MethodArgumentsProviderTests.java
index 21f14662ecc9..1bd49479bb06 100644
--- a/junit-jupiter-params/src/test/java/org/junit/jupiter/params/provider/MethodArgumentsProviderTests.java
+++ b/junit-jupiter-params/src/test/java/org/junit/jupiter/params/provider/MethodArgumentsProviderTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2022 the original author or authors.
+ * Copyright 2015-2023 the original author or authors.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
@@ -13,7 +13,7 @@
import static org.assertj.core.api.Assertions.assertThat;
import static org.junit.jupiter.api.Assertions.assertThrows;
import static org.junit.jupiter.engine.extension.MutableExtensionRegistry.createRegistryWithDefaultExtensions;
-import static org.junit.jupiter.params.provider.MethodArgumentsProviderTests.DefaultFactoryMethodNameTestCase.TEST_METHOD;
+import static org.junit.platform.commons.util.ReflectionUtils.findMethod;
import static org.mockito.Mockito.doCallRealMethod;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;
@@ -23,6 +23,7 @@
import java.util.Iterator;
import java.util.List;
import java.util.Optional;
+import java.util.stream.Collectors;
import java.util.stream.DoubleStream;
import java.util.stream.IntStream;
import java.util.stream.LongStream;
@@ -34,9 +35,9 @@
import org.junit.jupiter.api.extension.ExtensionContext;
import org.junit.jupiter.api.extension.ParameterContext;
import org.junit.jupiter.api.extension.ParameterResolver;
-import org.junit.jupiter.engine.config.JupiterConfiguration;
import org.junit.jupiter.engine.execution.DefaultExecutableInvoker;
import org.junit.jupiter.engine.extension.MutableExtensionRegistry;
+import org.junit.jupiter.params.ParameterizedTest;
import org.junit.platform.commons.JUnitException;
import org.junit.platform.commons.PreconditionViolationException;
import org.junit.platform.commons.util.ReflectionUtils;
@@ -48,26 +49,6 @@ class MethodArgumentsProviderTests {
private MutableExtensionRegistry extensionRegistry;
- @Test
- void throwsExceptionWhenFactoryMethodDoesNotExist() {
- var exception = assertThrows(JUnitException.class, () -> provideArguments("unknownMethod").toArray());
-
- assertThat(exception.getMessage()).isEqualTo(
- "Could not find factory method [unknownMethod] in class [" + TestCase.class.getName() + "]");
- }
-
- @Test
- void throwsExceptionForIllegalReturnType() {
- var exception = assertThrows(PreconditionViolationException.class,
- () -> provideArguments("providerWithIllegalReturnType").toArray());
-
- assertThat(exception.getMessage())//
- .containsSubsequence("Could not find valid factory method [providerWithIllegalReturnType] in class [",
- TestCase.class.getName() + "]", //
- "but found the following invalid candidates: ", //
- "[static java.lang.Object org.junit.jupiter.params.provider.MethodArgumentsProviderTests$TestCase.providerWithIllegalReturnType()]");
- }
-
@Test
void providesArgumentsUsingStream() {
var arguments = provideArguments("stringStreamProvider");
@@ -193,7 +174,7 @@ void providesArgumentsUsingListOfObjectArrays() {
@Test
void throwsExceptionWhenNonStaticFactoryMethodIsReferencedAndStaticIsRequired() {
- var exception = assertThrows(JUnitException.class,
+ var exception = assertThrows(PreconditionViolationException.class,
() -> provideArguments(NonStaticTestCase.class, null, false, "nonStaticStringStreamProvider").toArray());
assertThat(exception).hasMessageContaining("Cannot invoke non-static method");
@@ -207,9 +188,11 @@ void providesArgumentsFromNonStaticFactoryMethodWhenStaticIsNotRequired() {
}
@Test
- void providesArgumentsUsingDefaultFactoryMethodName() throws Exception {
- Class> testClass = DefaultFactoryMethodNameTestCase.class;
- var testMethod = testClass.getDeclaredMethod(TEST_METHOD, String.class);
+ void providesArgumentsUsingDefaultFactoryMethodName() {
+ var testClass = DefaultFactoryMethodNameTestCase.class;
+ var methodName = "testDefaultFactoryMethodName";
+ var testMethod = findMethod(testClass, methodName, String.class).get();
+
var arguments = provideArguments(testClass, testMethod, false, "");
assertThat(arguments).containsExactly(array("foo"), array("bar"));
@@ -244,35 +227,6 @@ void providesArgumentsUsingExternalAndInternalFactoryMethodsCombined() {
assertThat(arguments).containsExactly(array("foo"), array("bar"), array("string1"), array("string2"));
}
- @Test
- void throwsExceptionWhenClassForExternalFactoryMethodCannotBeLoaded() {
- var exception = assertThrows(JUnitException.class,
- () -> provideArguments("com.example.NonExistentExternalFactoryMethods#stringsProvider").toArray());
-
- assertThat(exception.getMessage()).isEqualTo(
- "Could not load class [com.example.NonExistentExternalFactoryMethods]");
- }
-
- @Test
- void throwsExceptionWhenExternalFactoryMethodCannotBeFound() {
- var exception = assertThrows(JUnitException.class,
- () -> provideArguments(ExternalFactoryMethods.class.getName() + "#nonExistentMethod").toArray());
-
- assertThat(exception.getMessage()).isEqualTo("Could not find factory method [nonExistentMethod()] in class ["
- + ExternalFactoryMethods.class.getName() + "]");
- }
-
- @Test
- void throwsExceptionWhenFullyQualifiedMethodNameIsInvalid() {
- var exception = assertThrows(JUnitException.class,
- () -> provideArguments(ExternalFactoryMethods.class.getName() + ".wrongSyntax").toArray());
-
- assertThat(exception.getMessage()).isEqualTo(
- "[" + ExternalFactoryMethods.class.getName() + ".wrongSyntax] is not a valid fully qualified method name: "
- + "it must start with a fully qualified class name followed by a '#' and then the method name, "
- + "optionally followed by a parameter list enclosed in parentheses.");
- }
-
@Nested
class PrimitiveArrays {
@@ -363,31 +317,41 @@ void providesArgumentsUsing2dObjectArray() {
@Nested
class ParameterResolution {
+ private final Method testMethod = findMethod(TestCase.class, "test").get();
+
@BeforeEach
void registerParameterResolver() {
- JupiterConfiguration configuration = mock(JupiterConfiguration.class);
- extensionRegistry = createRegistryWithDefaultExtensions(configuration);
+ extensionRegistry = createRegistryWithDefaultExtensions(mock());
extensionRegistry.registerExtension(StringResolver.class);
+ extensionRegistry.registerExtension(StringArrayResolver.class);
+ extensionRegistry.registerExtension(IntArrayResolver.class);
}
@Test
- void providesArgumentsUsingDefaultFactoryMethodWithParameter() throws Exception {
- Class> testClass = TestCase.class;
- var testMethod = testClass.getDeclaredMethod("overloadedStringStreamProvider", Object.class);
- var arguments = provideArguments(testClass, testMethod, false, "");
+ void providesArgumentsInferringDefaultFactoryMethodThatAcceptsArgument() {
+ Method testMethod = findMethod(TestCase.class, "overloadedStringStreamProvider", Object.class).get();
+ String factoryMethodName = ""; // signals to use default
+ var arguments = provideArguments(testMethod, factoryMethodName);
assertThat(arguments).containsExactly(array("foo!"), array("bar!"));
}
@Test
- void providesArgumentsUsingFactoryMethodWithParameter() {
+ void providesArgumentsUsingSimpleNameForFactoryMethodThatAcceptsArgumentWithoutSpecifyingParameterList() {
var arguments = provideArguments("stringStreamProviderWithParameter");
assertThat(arguments).containsExactly(array("foo!"), array("bar!"));
}
@Test
- void providesArgumentsUsingFullyQualifiedNameWithParameter() {
+ void providesArgumentsUsingFullyQualifiedNameForFactoryMethodThatAcceptsArgumentWithoutSpecifyingParameterList() {
+ var arguments = provideArguments(TestCase.class.getName() + "#stringStreamProviderWithParameter");
+
+ assertThat(arguments).containsExactly(array("foo!"), array("bar!"));
+ }
+
+ @Test
+ void providesArgumentsUsingFullyQualifiedNameSpecifyingParameter() {
var arguments = provideArguments(
TestCase.class.getName() + "#stringStreamProviderWithParameter(java.lang.String)");
@@ -395,19 +359,29 @@ void providesArgumentsUsingFullyQualifiedNameWithParameter() {
}
@Test
- void throwsExceptionWhenSeveralFactoryMethodsWithSameNameAreAvailable() {
- var exception = assertThrows(PreconditionViolationException.class,
- () -> provideArguments("stringStreamProviderWithOrWithoutParameter").toArray());
+ void providesArgumentsUsingLocalQualifiedNameSpecifyingParameter() {
+ var arguments = provideArguments(testMethod, "stringStreamProviderWithParameter(java.lang.String)");
- assertThat(exception.getMessage())//
- .startsWith("2 factory methods named [stringStreamProviderWithOrWithoutParameter] were found in "
- + "class [org.junit.jupiter.params.provider.MethodArgumentsProviderTests$TestCase]: ")//
- .contains("stringStreamProviderWithOrWithoutParameter()",
- "stringStreamProviderWithOrWithoutParameter(java.lang.String)");
+ assertThat(arguments).containsExactly(array("foo!"), array("bar!"));
}
@Test
- void providesArgumentsUsingFactoryMethodSelectedViaFullyQualifiedNameWithParameter() {
+ void providesArgumentsUsingFullyQualifiedNameForOverloadedFactoryMethodSpecifyingEmptyParameterList() {
+ var arguments = provideArguments(
+ TestCase.class.getName() + "#stringStreamProviderWithOrWithoutParameter()");
+
+ assertThat(arguments).containsExactly(array("foo"), array("bar"));
+ }
+
+ @Test
+ void providesArgumentsUsingLocalQualifiedNameForOverloadedFactoryMethodSpecifyingEmptyParameterList() {
+ var arguments = provideArguments(this.testMethod, "stringStreamProviderWithOrWithoutParameter()");
+
+ assertThat(arguments).containsExactly(array("foo"), array("bar"));
+ }
+
+ @Test
+ void providesArgumentsUsingFullyQualifiedNameForOverloadedFactoryMethodSpecifyingParameter() {
var arguments = provideArguments(
TestCase.class.getName() + "#stringStreamProviderWithOrWithoutParameter(java.lang.String)");
@@ -415,13 +389,280 @@ void providesArgumentsUsingFactoryMethodSelectedViaFullyQualifiedNameWithParamet
}
@Test
- void providesArgumentsUsingFactoryMethodSelectedViaFullyQualifiedNameWithoutParameter() {
- var arguments = provideArguments(
- TestCase.class.getName() + "#stringStreamProviderWithOrWithoutParameter()");
+ void providesArgumentsUsingLocalQualifiedNameForOverloadedFactoryMethodSpecifyingParameter() {
+ var arguments = provideArguments(testMethod,
+ "stringStreamProviderWithOrWithoutParameter(java.lang.String)");
+
+ assertThat(arguments).containsExactly(array("foo!"), array("bar!"));
+ }
+
+ @Test
+ void failsToProvideArgumentsUsingFullyQualifiedNameSpecifyingInvalidParameterType() {
+ String method = TestCase.class.getName() + "#stringStreamProviderWithParameter(example.FooBar)";
+ var exception = assertThrows(JUnitException.class, () -> provideArguments(method).toArray());
+
+ assertThat(exception).hasMessage("""
+ Failed to load parameter type [example.FooBar] for method [stringStreamProviderWithParameter] \
+ in class [org.junit.jupiter.params.provider.MethodArgumentsProviderTests$TestCase].""");
+ }
+
+ @Test
+ void failsToProvideArgumentsUsingLocalQualifiedNameSpecifyingInvalidParameterType() {
+ var method = "stringStreamProviderWithParameter(example.FooBar)";
+ var exception = assertThrows(JUnitException.class,
+ () -> provideArguments(this.testMethod, method).toArray());
+
+ assertThat(exception).hasMessage("""
+ Failed to load parameter type [example.FooBar] for method [stringStreamProviderWithParameter] \
+ in class [org.junit.jupiter.params.provider.MethodArgumentsProviderTests$TestCase].""");
+ }
+
+ @Test
+ void failsToProvideArgumentsUsingFullyQualifiedNameSpecifyingIncorrectParameterType() {
+ String method = TestCase.class.getName() + "#stringStreamProviderWithParameter(java.lang.Integer)";
+ var exception = assertThrows(PreconditionViolationException.class,
+ () -> provideArguments(method).toArray());
+
+ assertThat(exception).hasMessage("""
+ Could not find factory method [stringStreamProviderWithParameter(java.lang.Integer)] in \
+ class [org.junit.jupiter.params.provider.MethodArgumentsProviderTests$TestCase]""");
+ }
+
+ @Test
+ void failsToProvideArgumentsUsingLocalQualifiedNameSpecifyingIncorrectParameterType() {
+ var method = "stringStreamProviderWithParameter(java.lang.Integer)";
+ var exception = assertThrows(PreconditionViolationException.class,
+ () -> provideArguments(this.testMethod, method).toArray());
+
+ assertThat(exception).hasMessage("""
+ Could not find factory method [stringStreamProviderWithParameter(java.lang.Integer)] in \
+ class [org.junit.jupiter.params.provider.MethodArgumentsProviderTests$TestCase]""");
+ }
+
+ @ParameterizedTest
+ @ValueSource(strings = {
+ "org.junit.jupiter.params.provider.MethodArgumentsProviderTests$TestCase#stringStreamProviderWithArrayParameter(java.lang.String[])",
+ "org.junit.jupiter.params.provider.MethodArgumentsProviderTests$TestCase#stringStreamProviderWithArrayParameter([Ljava.lang.String;)", })
+ void providesArgumentsUsingFullyQualifiedNameSpecifyingObjectArrayParameter(String method) {
+ var arguments = provideArguments(method);
+
+ assertThat(arguments).containsExactly(array("foo :)"), array("bar :)"));
+ }
+
+ @ParameterizedTest
+ @ValueSource(strings = { //
+ "stringStreamProviderWithArrayParameter(java.lang.String[])",
+ "stringStreamProviderWithArrayParameter([Ljava.lang.String;)" })
+ void providesArgumentsUsingLocalQualifiedNameSpecifyingObjectArrayParameter(String method) {
+ var arguments = provideArguments(this.testMethod, method);
+
+ assertThat(arguments).containsExactly(array("foo :)"), array("bar :)"));
+ }
+
+ @ParameterizedTest
+ @ValueSource(strings = {
+ "org.junit.jupiter.params.provider.MethodArgumentsProviderTests$TestCase#stringStreamProviderWithArrayParameter(int[])",
+ "org.junit.jupiter.params.provider.MethodArgumentsProviderTests$TestCase#stringStreamProviderWithArrayParameter([I)", })
+ void providesArgumentsUsingFullyQualifiedNameSpecifyingPrimitiveArrayParameter(String method) {
+ var arguments = provideArguments(method);
+
+ assertThat(arguments).containsExactly(array("foo 42"), array("bar 42"));
+ }
+
+ @ParameterizedTest
+ @ValueSource(strings = { //
+ "stringStreamProviderWithArrayParameter(int[])", //
+ "stringStreamProviderWithArrayParameter([I)" })
+ void providesArgumentsUsingLocalQualifiedNameSpecifyingPrimitiveArrayParameter(String method) {
+ var arguments = provideArguments(this.testMethod, method);
+
+ assertThat(arguments).containsExactly(array("foo 42"), array("bar 42"));
+ }
+
+ @ParameterizedTest
+ @ValueSource(strings = { "java.lang.String,java.lang.String", "java.lang.String, java.lang.String",
+ "java.lang.String, java.lang.String" })
+ void providesArgumentsUsingFullyQualifiedNameSpecifyingMultipleParameters(String params) {
+ var method = TestCase.class.getName() + "#stringStreamProviderWithOrWithoutParameter(" + params + ")";
+ var arguments = provideArguments(method);
+
+ assertThat(arguments).containsExactly(array("foo!!"), array("bar!!"));
+ }
+
+ @ParameterizedTest
+ @ValueSource(strings = { "java.lang.String,java.lang.String", "java.lang.String, java.lang.String",
+ "java.lang.String, java.lang.String" })
+ void providesArgumentsUsingLocalQualifiedNameSpecifyingMultipleParameters(String params) {
+ var arguments = provideArguments(this.testMethod,
+ "stringStreamProviderWithOrWithoutParameter(" + params + ")");
+
+ assertThat(arguments).containsExactly(array("foo!!"), array("bar!!"));
+ }
+
+ @Test
+ void providesArgumentsUsingFullyQualifiedNameForOverloadedFactoryMethodWhenParameterListIsNotSpecified() {
+ var arguments = provideArguments(TestCase.class.getName() + "#stringStreamProviderWithOrWithoutParameter");
assertThat(arguments).containsExactly(array("foo"), array("bar"));
}
+ @Test
+ void providesArgumentsUsingLocalQualifiedNameForOverloadedFactoryMethodWhenParameterListIsNotSpecified() {
+ var arguments = provideArguments("stringStreamProviderWithOrWithoutParameter").toArray();
+
+ assertThat(arguments).containsExactly(array("foo"), array("bar"));
+ }
+
+ }
+
+ @Nested
+ class ErrorCases {
+
+ @Test
+ void throwsExceptionWhenFullyQualifiedMethodNameSyntaxIsInvalid() {
+ var exception = assertThrows(PreconditionViolationException.class,
+ () -> provideArguments("org.example.wrongSyntax").toArray());
+
+ assertThat(exception.getMessage()).isEqualTo(
+ "[org.example.wrongSyntax] is not a valid fully qualified method name: "
+ + "it must start with a fully qualified class name followed by a '#' and then the method name, "
+ + "optionally followed by a parameter list enclosed in parentheses.");
+ }
+
+ @Test
+ void throwsExceptionWhenClassForExternalFactoryMethodCannotBeLoaded() {
+ var exception = assertThrows(JUnitException.class,
+ () -> provideArguments("com.example.NonExistentClass#stringsProvider").toArray());
+
+ assertThat(exception.getMessage()).isEqualTo("Could not load class [com.example.NonExistentClass]");
+ }
+
+ @Test
+ void throwsExceptionWhenExternalFactoryMethodDoesNotExist() {
+ String factoryClass = ExternalFactoryMethods.class.getName();
+
+ var exception = assertThrows(PreconditionViolationException.class,
+ () -> provideArguments(factoryClass + "#nonExistentMethod").toArray());
+
+ assertThat(exception.getMessage()).isEqualTo(
+ "Could not find factory method [nonExistentMethod] in class [%s]", factoryClass);
+ }
+
+ @Test
+ void throwsExceptionWhenLocalFactoryMethodDoesNotExist() {
+ var exception = assertThrows(PreconditionViolationException.class,
+ () -> provideArguments("nonExistentMethod").toArray());
+
+ assertThat(exception.getMessage()).isEqualTo(
+ "Could not find factory method [nonExistentMethod] in class [%s]", TestCase.class.getName());
+ }
+
+ @Test
+ void throwsExceptionWhenExternalFactoryMethodAcceptingSingleArgumentDoesNotExist() {
+ String factoryClass = ExternalFactoryMethods.class.getName();
+
+ var exception = assertThrows(PreconditionViolationException.class,
+ () -> provideArguments(factoryClass + "#nonExistentMethod(int)").toArray());
+
+ assertThat(exception.getMessage()).isEqualTo(
+ "Could not find factory method [nonExistentMethod(int)] in class [%s]", factoryClass);
+ }
+
+ @Test
+ void throwsExceptionWhenLocalFactoryMethodAcceptingSingleArgumentDoesNotExist() {
+ var exception = assertThrows(PreconditionViolationException.class,
+ () -> provideArguments("nonExistentMethod(int)").toArray());
+
+ assertThat(exception.getMessage()).isEqualTo(
+ "Could not find factory method [nonExistentMethod(int)] in class [%s]", TestCase.class.getName());
+ }
+
+ @Test
+ void throwsExceptionWhenExternalFactoryMethodAcceptingMultipleArgumentsDoesNotExist() {
+ String factoryClass = ExternalFactoryMethods.class.getName();
+
+ var exception = assertThrows(PreconditionViolationException.class,
+ () -> provideArguments(factoryClass + "#nonExistentMethod(int, java.lang.String)").toArray());
+
+ assertThat(exception.getMessage()).isEqualTo(
+ "Could not find factory method [nonExistentMethod(int, java.lang.String)] in class [%s]", factoryClass);
+ }
+
+ @Test
+ void throwsExceptionWhenLocalFactoryMethodAcceptingMultipleArgumentsDoesNotExist() {
+ var exception = assertThrows(PreconditionViolationException.class,
+ () -> provideArguments("nonExistentMethod(java.lang.String,int)").toArray());
+
+ assertThat(exception.getMessage()).isEqualTo(
+ "Could not find factory method [nonExistentMethod(java.lang.String,int)] in class [%s]",
+ TestCase.class.getName());
+ }
+
+ @Test
+ void throwsExceptionWhenExternalFactoryMethodHasInvalidReturnType() {
+ String testClass = TestCase.class.getName();
+ String factoryClass = ExternalFactoryMethods.class.getName();
+ String factoryMethod = factoryClass + "#factoryWithInvalidReturnType";
+
+ var exception = assertThrows(PreconditionViolationException.class,
+ () -> provideArguments(TestCase.class, null, false, factoryMethod).toArray());
+
+ assertThat(exception.getMessage())//
+ .containsSubsequence("Could not find valid factory method [" + factoryMethod + "] for test class [",
+ testClass + "]", //
+ "but found the following invalid candidate: ",
+ "static java.lang.Object " + factoryClass + ".factoryWithInvalidReturnType()");
+ }
+
+ @Test
+ void throwsExceptionWhenLocalFactoryMethodHasInvalidReturnType() {
+ String testClass = TestCase.class.getName();
+ String factoryClass = testClass;
+ String factoryMethod = "factoryWithInvalidReturnType";
+
+ var exception = assertThrows(PreconditionViolationException.class,
+ () -> provideArguments(factoryMethod).toArray());
+
+ assertThat(exception.getMessage())//
+ .containsSubsequence("Could not find valid factory method [" + factoryMethod + "] for test class [",
+ factoryClass + "]", //
+ "but found the following invalid candidate: ", //
+ "static java.lang.Object " + factoryClass + ".factoryWithInvalidReturnType()");
+ }
+
+ @Test
+ void throwsExceptionWhenMultipleDefaultFactoryMethodCandidatesExist() {
+ var testClass = MultipleDefaultFactoriesTestCase.class;
+ var methodName = "test";
+ var testMethod = findMethod(testClass, methodName, String.class).get();
+
+ var exception = assertThrows(PreconditionViolationException.class,
+ () -> provideArguments(testClass, testMethod, false, "").toArray());
+
+ assertThat(exception.getMessage()).contains(//
+ "2 factory methods named [test] were found in class [", testClass.getName() + "]: ", //
+ "$MultipleDefaultFactoriesTestCase.test()", //
+ "$MultipleDefaultFactoriesTestCase.test(int)"//
+ );
+ }
+
+ @Test
+ void throwsExceptionWhenMultipleInvalidDefaultFactoryMethodCandidatesExist() {
+ var testClass = MultipleInvalidDefaultFactoriesTestCase.class;
+ var methodName = "test";
+ var testMethod = findMethod(testClass, methodName, String.class).get();
+
+ var exception = assertThrows(PreconditionViolationException.class,
+ () -> provideArguments(testClass, testMethod, false, "").toArray());
+
+ assertThat(exception.getMessage()).contains(//
+ "Could not find valid factory method [test] in class [", testClass.getName() + "]", //
+ "but found the following invalid candidates: ", //
+ "$MultipleInvalidDefaultFactoriesTestCase.test()", //
+ "$MultipleInvalidDefaultFactoriesTestCase.test(int)"//
+ );
+ }
+
}
// -------------------------------------------------------------------------
@@ -430,17 +671,26 @@ private static Object[] array(Object... objects) {
return objects;
}
- private Stream